query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Unsubscribe to a chan
public function unsubscribe( $resourceType, $resourceId, $subscriberId, $subscriberType = null ) { $this ->backend ->fetchSubscriptions([ Field::CHAN_ID => $this->getChanIdList($resourceType, $resourceId), Field::SUBER_NAME => $this->getSubscriberNameList($subscriberId, $subscriberType), ]) ->delete() ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function unsubscribe($channel=null);", "public function unsubscribe(): void;", "private function unsubscribe()\n {\n $this->botman->hears('unsubscribe', function(BotMan $bot) {\n $userId = $bot->getUser()->getId();\n Subscriber::where('telegram_user_id', $userId)->delete();\n $bot->reply('You have just unsubscribed from our updates!');\n });\n }", "public function unSubscribe()\n {\n }", "public function punsubscribe($pattern=null);", "public function onUnSubscribe(ConnectionInterface $conn, $topic)\n {\n $conn->close();\n }", "public function unsubscribe(ConnectionInterface $conn, $topic)\n {\n $resource_id = $conn->resourceId;\n\n $client = Client::where('resource_id', $resource_id)->first();\n if (!$client) {\n qlog(\"Unverified client attempted to unsubscribe from {$topic}.\");\n $conn->close();\n }\n\n list($original, $channel, $key, $event) = $this->seperatePrivateChannel($topic);\n list($channel, $site) = $this->validatePrivateToken($conn, $channel, $key);\n\n if ($channel) {\n $client->unsubscribe($channel, $event);\n qlog(\"{$resource_id} tuned out of {$channel->name} on {$site->name} for {$event}.\");\n\n return $channel->name.'('.$channel->public.')|'.$event;\n }\n }", "public function unsubscribe( $sChannel )\n\t{\n\t\t$this->initSubscriber();\n\n\t\tif ( $this->m_bHasEventLoop )\n\t\t{\n\t\t\t$this->m_cSubscriber->unsubscribe( $sChannel );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->m_cSubscriber->setSockOpt( \\ZMQ::SOCKOPT_UNSUBSCRIBE, $sChannel );\n\t\t}\n\t}", "function ts3client_requestChannelUnsubscribeAll($serverConnectionHandlerID) {}", "public function unsubscribe(Topic $topic, Connection $connection);", "public function unSubscribe()\n {\n $this->disconnect();\n $this->queue = $this->currentEnvelope = null;\n }", "public function unsubscribeThread(ThreadRepositoryInterface $thread): PodiumResponse;", "public function unsubscribe()\n {\n echo \"<br>\";\n echo \"Action: Cancelling Subscription !\";\n unset($this->plan);\n unset($this->server);\n unset($this->serverList);\n\n }", "public function unsubscribe($delete = FALSE);", "public function onUnSubscribe(ConnectionInterface $connection, Topic $topic, WampRequest $request)\n {\n }", "public function unsubscribe($channel, $user, $debug = false)\n {\n return $this->trigger('unsubscribe', array(\"channel\" => $channel, \"user\" => $user), $debug);\n }", "public function destroy($channel, Thread $thread)\n {\n $thread->unsubscribe();\n }", "public function unsubscribe($commandName, CommandHandlerInterface $handler);", "public function unsubscribe(Subscriber $subscriber)\n\t{\n\t\t$this->getEventEmitter()->unsubscribe($subscriber);\n\t}", "public function onMqUnsubscribe($server, int $fd, $fromId, $data)\n {\n echo \"取消订阅\";\n\n $payload = [];\n foreach ($data['topics'] as $K => $v){\n if (is_numeric($v) && $v < 3 ){\n $payload[] = chr($v);\n }else{\n $payload[] = chr(0x80);\n }\n }\n $server->send(\n $fd,\n MQTT::getAck(\n [\n 'cmd' => 11,\n 'message_id' => $data['message_id'] ??'',\n 'payload' => $payload\n ]\n )\n );\n\n }", "function unsubscribe ($destination, $properties = null)\n {\n $headers = array();\n if ( isset($properties) )\n {\n foreach ( $properties as $name => $value )\n {\n $headers[$name] = $value;\n }\n }\n $headers['destination'] = $destination;\n $this->writeFrame(new StompFrame('UNSUBSCRIBE', $headers));\n unset($this->subscriptions[$destination]);\n }", "public function unsubscribeBy($userId = null);", "function Unregister($client, $msg);", "private function unsubscribeUser()\n {\n try\n {\n $request = $_POST;\n\n $uid = userid();\n\n if (!$uid)\n throw_error_msg( lang(\"you_not_logged_in\") ) ;\n\n if( !isset($request['subscribed_to']) || $request['subscribed_to']==\"\" )\n throw_error_msg(\"subscribed to not provided\");\n\n if( !is_numeric($request['subscribed_to']) )\n throw_error_msg(\"invalid subscribed to\");\n\n global $userquery;\n $userquery->remove_subscription($request['subscribed_to']);\n \n if( error() )\n {\n throw_error_msg(error('single')); \n }\n\n if( msg() )\n {\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => 'unsubscribed successfully', \"data\" => array());\n $this->response($this->json($data));\n } \n\n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n }\n }", "public function unbind(ConnectionInterface $conn)\n {\n $resourceId = $conn->resourceId;\n\n qlog(\"{$resourceId} disconnected.\");\n self::$clients->forget($resourceId);\n\n $client = Client::where('resource_id', $resourceId)->first();\n if ($client) {\n $id = $client->id;\n DB::table('clients')->where('id', $id)->delete();\n DB::table('channel_client')->where('client_id', $id)->delete();\n }\n }", "public function removeSubscribes();", "public function unsubscribeThreads($userid, $threads = false);", "public function unregister(Topic $topic);", "function channelDelete(ChannelInterface $channel);", "public function newsletterUnsubscribe($observer)\n {\n $subscriber = $observer->getSubscriber();\n \n $result = Mage::getSingleton('extensions_store_constantcontact/constantcontact')->updateSubscriber($subscriber);\n \n return $observer; \n }", "public function destroy(UnsubscribeMotive $motive)\n {\n //\n }", "protected function removeRecipient()\n\t{\n\t\t$arrChannels = $this->Input->post('channels');\n\t\t$arrChannels = array_intersect($arrChannels, $this->nl_channels); // see #3240\n\n\t\t// Check the selection\n\t\tif (!is_array($arrChannels) || count($arrChannels) < 1)\n\t\t{\n\t\t\t$_SESSION['UNSUBSCRIBE_ERROR'] = $GLOBALS['TL_LANG']['ERR']['noChannels'];\n\t\t\t$this->reload();\n\t\t}\n\n\t\t$arrSubscriptions = array();\n\t\t\n\t\t$email = \\Idna::encodeEmail($this->Input->post('email', true));\n\t\t\n\t\t$subscriber = new Subscriber($email);\n\n\t\t// Get active subscriptions\n\t\t$objSubscription = $this->Database->prepare(\"SELECT pid FROM tl_newsletter_recipients WHERE email=? AND active=1\")\n\t\t\t\t\t\t\t\t\t\t ->execute($email);\n\n\t\tif ($objSubscription->numRows)\n\t\t{\n\t\t\t$arrSubscriptions = $objSubscription->fetchEach('pid');\n\t\t}\n\n\t\t$arrRemove = array_intersect($arrChannels, $arrSubscriptions);\n\n\t\t// Return if there are no subscriptions to remove\n\t\tif (!is_array($arrRemove) || count($arrRemove) < 1)\n\t\t{\n\t\t\t$_SESSION['UNSUBSCRIBE_ERROR'] = $GLOBALS['TL_LANG']['ERR']['unsubscribed'];\n\t\t\t$this->reload();\n\t\t}\n\n\t\t// check for cleverreach support\n\t\t$objChannel = $this->Database->execute(\"SELECT id FROM tl_newsletter_channel WHERE cleverreach_active = 1 AND id IN(\" . implode(',', array_map('intval', $arrRemove)) . \")\");\n\n\t\t// TODO: multiple channel unsubscription\n\t\t$subscriber->getByChannel($arrRemove[0]);\n\n\t\t// Remove subscriptions\n\t\t$subscriber->remove($arrRemove);\n\t\t\n\t\t// optional Cleverreach Deletion\n\t\tif($objChannel->numRows > 0)\n\t\t{\n\t\t\t$subscriber->removeFromCR($objChannel->fetchEach('id'));\n\t\t}\n\n\t\t// Get channels\n\t\t$objChannels = $this->Database->execute(\"SELECT title FROM tl_newsletter_channel WHERE id IN(\" . implode(',', array_map('intval', $arrRemove)) . \")\");\n\t\t$arrChannels = $objChannels->fetchEach('title');\n\n\t\t// HOOK: post unsubscribe callback\n\t\tif (isset($GLOBALS['TL_HOOKS']['removeRecipient']) && is_array($GLOBALS['TL_HOOKS']['removeRecipient']))\n\t\t{\n\t\t\tforeach ($GLOBALS['TL_HOOKS']['removeRecipient'] as $callback)\n\t\t\t{\n\t\t\t\t$this->import($callback[0]);\n\t\t\t\t$this->{$callback[0]}->{$callback[1]}($varInput, $arrRemove);\n\t\t\t}\n\t\t}\n\n\t\tglobal $objPage;\n\n\t\t// Redirect to jumpTo page\n\t\tif (strlen($this->jumpTo) && $this->jumpTo != $objPage->id)\n\t\t{\n\t\t\t$objNextPage = $this->Database->prepare(\"SELECT id, alias FROM tl_page WHERE id=?\")\n\t\t\t\t\t\t\t\t\t\t ->limit(1)\n\t\t\t\t\t\t\t\t\t\t ->execute($this->jumpTo);\n\n\t\t\tif ($objNextPage->numRows)\n\t\t\t{\n\t\t\t\t$this->redirect($this->generateFrontendUrl($objNextPage->fetchAssoc()));\n\t\t\t}\n\t\t}\n\n\t\tif($subscriber->sendUnSubscribeMail($arrRemove))\n\t\t{\n\t\t\t$this->reload();\n\t\t}\n\t}", "public function unsubscribe($subId)\n {\n $this->subscriptions->forget($subId);\n }", "public function StopMonitor($channel);", "public function actionUnsubscribe()\n {\n $uid = craft()->request->getQueryStringWithoutPath();\n $uid = substr($uid,0,-1);\n // get PC model based on string\n $PrayerCornerRecord = PrayerCornerRecord::model()->findByAttributes(array('uid' => $uid));\n // if PC record exists\n if (count($PrayerCornerRecord)) {\n\n $entryId = $PrayerCornerRecord->entryId;\n // get entry record\n $entry = craft()->entries->getEntryById($entryId);\n // delete record\n $PrayerCornerRecord->delete();\n craft()->userSession->setFlash('message', 'You have unsubscribed from notifications!');\n // log unsubscribe\n PrayerCornerPlugin::log(\n 'User (' . $PrayerCornerRecord->email . ') has successfully unsubscribed from ' . $entry->title,\n LogLevel::Info,\n true\n );\n // redirect user\n $this->redirect($entry->getUrl());\n } else {\n // log error\n PrayerCornerPlugin::log(\n 'Erroneous unsubscribe link followed (' . $uid. ')',\n LogLevel::Info,\n true\n );\n // redirect user to site root\n $this->redirect( craft()->getSiteUrl() );\n }\n\n }", "public function destroy(Subscribe $subscribe)\n {\n //\n }", "public function onUnSubscribe(ConnectionInterface $connection, Topic $topic, WampRequest $request)\n {\n //this will broadcast the message to ALL subscribers of this topic.\n // $topic->broadcast(['msg' => $connection->resourceId . \" has left \" . $topic->getId()]);\n }", "public function onUnSubscribe(ConnectionInterface $connection, Topic $topic, WampRequest $request)\n {\n // This will broadcast the message to ALL subscribers of this topic.\n //$topic->broadcast(['msg' => $connection->resourceId.' has left '.$topic->getId()]);\n }", "public function onUnSubscribe(ConnectionInterface $connection, Topic $topic, WampRequest $request): void\n {\n $topic->broadcast(['msg' => $connection->resourceId.' has left '.$topic->getId()]);\n }", "public function unsubscribe(SubscriptionRequestEntity $requestEntity);", "function unsubscribe($email) {\n // We need to build the subscriber data structure.\n $email = array(\n \t\t 'EmailAddress' => $email \n );\n \n return $this->post_request($this->_subscribers_base_route.'/unsubscribe.json', $email);\n }", "public function unfollowChannel($user, $target) {\r\n $this->requireAuthentication();\r\n \r\n $this->makeRequest('delete', \"/users/{$user}/follows/channels/{$target}\");\r\n }", "public function onUnSubscribe(ConnectionInterface $connection, Topic $topic, WampRequest $request)\n {\n //this will broadcast the message to ALL subscribers of this topic.\n $topic->broadcast(['msg' => $connection->resourceId . \" has left \" . $topic->getId()]);\n }", "public function destroy(string $subscription): void\n {\n $this->subscribers->destroy($subscription);\n\n abort(204);\n }", "public function unsubscribe(string $topic, string $subscriber)\n {\n return TopicSubscriber::join('topics', 'topics.id', 'topic_subscribers.topic_id')\n ->join('subscribers', 'subscribers.id', 'topic_subscribers.subscriber_id')\n ->where('topics.name', $topic)\n ->where('subscribers.name', $subscriber)\n ->delete();\n }", "public function __destruct() {\n\t\t$this->Unsubscribe();\n\t\t$this->CloseConnections();\n\t}", "public function unsubscribe($user_id, $channel = null)\n {\n $params = [\n 'user' => (string) $user_id\n ];\n\n if (! is_null($channel)) {\n $params['channel'] = $channel;\n }\n\n return $this->send('unsubscribe', $params);\n }", "protected function _unsubscribeFromEngineEvents()\n {\n $events = array(\n Streamwide_Engine_Events_Event::SDP,\n Streamwide_Engine_Events_Event::CHILD,\n Streamwide_Engine_Events_Event::OKMOVED,\n Streamwide_Engine_Events_Event::MOVED,\n Streamwide_Engine_Events_Event::FAILMOVED\n );\n \n $controller = $this->getController();\n foreach ( $events as $event ) {\n $controller->removeEventListener( $event, array( 'callback' => array( $this, 'onSignalReceived' ) ) );\n }\n }", "function unSubScribe($subScribeARN = '') {\n try {\n if ($subScribeARN != '') {\n $this->SNS_OBJ->unsubscribe(array(\n 'SubscriptionArn' => $subScribeARN,\n ));\n }\n } catch (Exception $ex) {\n throw new Exception('Error in unSubScribe function - ' . $ex);\n }\n }", "public function destroy(Subscriber $subscriber)\n {\n //\n }", "protected function _disconnect() {\n\t\t@fclose($this->socket);\n\t\t$this->socket = NULL;\n\t}", "public function Unsubscribe($request)\n {\n return $this->makeRequest(__FUNCTION__, $request);\n }", "function evel_list_unsubscribe($scope, $tag, $address) {\n global $evel_client;\n $params = func_get_args();\n $result = $evel_client->call('EvEl.list_unsubscribe', $params);\n return $result;\n}", "public function unsubscribe($queueName, array $headers = array())\n {\n $this->connect();\n return $this->stomp->unsubscribe($queueName, $headers);\n }", "public function broadcastOn()\n {\n return new Channel('cancel');\n }", "public function discard()\n {\n $this->channel->basic_reject(\n $this->tag(),\n false\n );\n }", "public function unsubscribe(iPlugin $plugin, $event)\n {\n // Unsubscribe recursively.\n if ($event == '*')\n {\n foreach ($this->subscriptions as $event)\n {\n $this->unsubscribe($plugin, $event);\n }\n }\n elseif (isset($this->subscriptions[$event]))\n {\n foreach ($this->subscriptions[$event] as $index => $subscription)\n {\n if ($subscription[0] == $plugin)\n {\n unset($this->subscriptions[$event][$index]);\n }\n }\n }\n }", "public function unregisterClient() {\n $server->unregisterClient($serverKey, $clientKey);\n // todo save server and client key\n }", "public function unsubscribe( ?IObserver $observer = null ) : IObservable\n {\n\n for ( $i = 0, $c = \\count( $this->_observers ); $i < $c; $i++)\n {\n if ( $observer === $this->_observers[ $i ] )\n {\n unset( $this->_observers[ $i ] );\n }\n }\n\n $this->_observers = array_values( $this->_observers );\n\n return $this;\n\n }", "protected function removeRecipient()\n\t{\n\t\t$arrChannels = $this->Input->post('channels');\n\n\t\t// Check selection\n\t\tif (!is_array($arrChannels) || count($arrChannels) < 1)\n\t\t{\n\t\t\t$_SESSION['UNSUBSCRIBE_ERROR'] = $GLOBALS['TL_LANG']['ERR']['noChannels'];\n\t\t\t$this->reload();\n\t\t}\n\n\t\t// Validate e-mail address\n\t\tif (!preg_match('/^\\w+([!#\\$%&\\'\\*\\+\\-\\/=\\?^_`\\.\\{\\|\\}~]*\\w+)*@\\w+([_\\.-]*\\w+)*\\.[a-z]{2,6}$/i', $this->Input->post('email', true)))\n\t\t{\n\t\t\t$_SESSION['UNSUBSCRIBE_ERROR'] = $GLOBALS['TL_LANG']['ERR']['email'];\n\t\t\t$this->reload();\n\t\t}\n\n\t\t$arrSubscriptions = array();\n\n\t\t// Get active subscriptions\n\t\t$objSubscription = $this->Database->prepare(\"SELECT pid FROM tl_newsletter_recipients WHERE email=? AND active=?\")\n\t\t\t\t\t\t\t\t\t\t ->execute($this->Input->post('email', true), 1);\n\n\t\tif ($objSubscription->numRows)\n\t\t{\n\t\t\t$arrSubscriptions = $objSubscription->fetchEach('pid');\n\t\t}\n\n\t\t$arrRemove = array_intersect($arrChannels, $arrSubscriptions);\n\n\t\t// Return if there are no subscriptions to remove\n\t\tif (!is_array($arrRemove) || count($arrRemove) < 1)\n\t\t{\n\t\t\t$_SESSION['UNSUBSCRIBE_ERROR'] = $GLOBALS['TL_LANG']['ERR']['unsubscribed'];\n\t\t\t$this->reload();\n\t\t}\n\n\t\t// Remove subscriptions\n\t\t$this->Database->prepare(\"DELETE FROM tl_newsletter_recipients WHERE email=? AND pid IN(\" . implode(',', $arrRemove) . \")\")\n\t\t\t\t\t ->execute($this->Input->post('email', true));\n\t\t\t\t\t \n\t\t// Remove member\n\t\t$arrRetain = array_diff($arrSubscriptions, $arrChannels);\n\t\tif (count($arrRetain))\n\t\t{\n\t\t\t$this->Database->prepare(\"UPDATE tl_member SET newsletter=? WHERE email=?\")->execute(serialize($arrRetain), $this->Input->post('email'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Delete only if member groups match\n\t\t\t$this->Database->prepare(\"DELETE FROM tl_member WHERE email=? AND groups=?\")->execute($this->Input->post('email'), $this->reg_groups);\n\t\t}\n\n\t\t// Confirmation e-mail\n\t\t$objEmail = new Email();\n\n\t\t// Get channels\n\t\t$objChannel = $this->Database->execute(\"SELECT title FROM tl_newsletter_channel WHERE id IN(\" . implode(',', $arrChannels) . \")\");\n\t\t\n\t\t// HOOK: post unsubscribe callback\n\t\tif (isset($GLOBALS['TL_HOOKS']['removeRecipient']) && is_array($GLOBALS['TL_HOOKS']['removeRecipient']))\n\t\t{\n\t\t\tforeach ($GLOBALS['TL_HOOKS']['removeRecipient'] as $callback)\n\t\t\t{\n\t\t\t\t$this->import($callback[0]);\n\t\t\t\t$this->$callback[0]->$callback[1]($this->Input->post('email', true), $arrRemove, $objChannel->fetchEach('title'));\n\t\t\t}\n\t\t}\n\n\t\t$strText = str_replace('##domain##', $this->Environment->host, $this->nl_unsubscribe);\n\t\t$strText = str_replace(array('##channel##', '##channels##'), implode(\"\\n\", $objChannel->fetchEach('title')), $strText);\n\n\t\t$objEmail->from = $GLOBALS['TL_ADMIN_EMAIL'];\n\t\t$objEmail->subject = sprintf($GLOBALS['TL_LANG']['MSC']['nl_subject'], $this->Environment->host);\n\t\t$objEmail->text = $strText;\n\n\t\t$objEmail->sendTo($this->Input->post('email', true));\n\t\tglobal $objPage;\n\n\t\t// Redirect to jumpTo page\n\t\tif (strlen($this->jumpTo) && $this->jumpTo != $objPage->id)\n\t\t{\n\t\t\t$objNextPage = $this->Database->prepare(\"SELECT id, alias FROM tl_page WHERE id=?\")\n\t\t\t\t\t\t\t\t\t\t ->limit(1)\n\t\t\t\t\t\t\t\t\t\t ->execute($this->jumpTo);\n\n\t\t\tif ($objNextPage->numRows)\n\t\t\t{\n\t\t\t\t$this->redirect($this->generateFrontendUrl($objNextPage->fetchAssoc()));\n\t\t\t}\n\t\t}\n\n\t\t$_SESSION['UNSUBSCRIBE_CONFIRM'] = $GLOBALS['TL_LANG']['MSC']['nl_removed'];\n\t\t$this->reload();\n\t}", "public static function unRegister($topic, $channel = null)\n {\n if ($channel) {\n return \"UNREGISTER $topic $channel\\n\";\n } else {\n return \"UNREGISTER $topic\\n\";\n }\n }", "public function unsubscribe($url, $hubSecret = null)\n {\n $res = $this->call('unsubscribe', $url, $hubSecret);\n if (!empty($res['info']['http_code']) && $res['info']['http_code'] == 204) {\n return true;\n } else {\n error_log('Could not unsubscribe. ');\n return false;\n }\n }", "function destroy()\n {\n eval(PUBSUB_MUTATE);\n $this->_evl->clearInterestOnReadable($this->_insock);\n if ($this->_insock != $this->_outsock)\n {\n @socket_close($this->_insock);\n }\n $this->_read_eof = true;\n\n $this->_evl->clearInterestOnWritable($this->_outsock);\n @socket_close($this->_outsock);\n $this->_output_shutdown = true;\n $this->_finished_writing = true;\n\n $this->_call_close_callback();\n }", "public function clearSubscribers();", "public function unsubscribe($data) {\n if (empty($data['email'])) {\n throw new MailerException(\"Unsubscribe email is required.\");\n }\n\n $path = 'mailinglists/unsubscribe.json';\n $data = array('unsubscribe' => $data);\n return $this->request($path, 'POST', $data);\n }", "public function unpublish(Channel $channel)\n {\n return Notification::send($channel->user, new ChannelNotifyer($channel, 'unpublish'));;\n\n }", "public function unsubscribe(string $email)\n {\n return $this->client->post(\"emails/unsubscribe\", [$email]);\n }", "function unSubscribeUser($SUBSCRIPTION_ARN) {\n try {\n if ($SUBSCRIPTION_ARN != '') {\n $this->SNS_OBJ->unsubscribe(array(\n 'SubscriptionArn' => $SUBSCRIPTION_ARN,\n ));\n }\n } catch (Exception $ex) {\n throw new Exception('Error in unSubscribeUser function - ' . $ex);\n }\n }", "public function destroy(Subscription $subscription)\n {\n //\n }", "static function shutdown()\n\t{\n\t\tif (!empty(self::$channel))\n\t\t{\n\t\t\tself::$channel->close();\n\t\t\tself::$channel = null;\n\t\t}\n\n\t\tif (!empty(self::$connection))\n\t\t{\n\t\t\tself::$connection->close();\n\t\t\tself::$connection = null;\n\t\t}\n\t}", "public function unsubscribe($userId)\n {\n return $this->_Unsubscribe_operation->call(['userId' => $userId]);\n }", "public static function unsubscribe_user($userid, $reactforum, $context = null, $userrequest = false) {\n global $DB;\n\n $sqlparams = array(\n 'userid' => $userid,\n 'reactforum' => $reactforum->id,\n );\n $DB->delete_records('reactforum_digests', $sqlparams);\n\n if ($reactforumsubscription = $DB->get_record('reactforum_subscriptions', $sqlparams)) {\n $DB->delete_records('reactforum_subscriptions', array('id' => $reactforumsubscription->id));\n\n if ($userrequest) {\n $discussionsubscriptions = $DB->get_recordset('reactforum_discussion_subs', $sqlparams);\n $DB->delete_records('reactforum_discussion_subs',\n array('userid' => $userid, 'reactforum' => $reactforum->id, 'preference' => self::REACTFORUM_DISCUSSION_UNSUBSCRIBED));\n\n // We know that the there were previously entries and there aren't any more.\n if (isset(self::$reactforumdiscussioncache[$userid]) && isset(self::$reactforumdiscussioncache[$userid][$reactforum->id])) {\n self::$reactforumdiscussioncache[$userid][$reactforum->id] = array();\n }\n }\n\n // Reset the cache for this reactforum.\n self::$reactforumcache[$userid][$reactforum->id] = false;\n\n $context = reactforum_get_context($reactforum->id, $context);\n $params = array(\n 'context' => $context,\n 'objectid' => $reactforumsubscription->id,\n 'relateduserid' => $userid,\n 'other' => array('reactforumid' => $reactforum->id),\n\n );\n $event = event\\subscription_deleted::create($params);\n $event->add_record_snapshot('reactforum_subscriptions', $reactforumsubscription);\n if ($userrequest && $discussionsubscriptions) {\n foreach ($discussionsubscriptions as $subscription) {\n $event->add_record_snapshot('reactforum_discussion_subs', $subscription);\n }\n $discussionsubscriptions->close();\n }\n $event->trigger();\n }\n\n return true;\n }", "public function unSubscribe()\n {\n if (imap_unsubscribe($this->imap, $this->mailbox)) {\n return true;\n }\n else {\n return false;\n }\n }", "public function __destruct() {\n\t\tif($this->_listeningenabled)\n\t\t\t$this->unlisten();\n\t}", "public function disconnect() \n\t{\n\t\tunset($this->connection);\n\t}", "public function destroy(HashtagSubscriber $hashtagSubscriber)\n {\n //\n }", "public function unsubscribes($cid, $opts=array()) {\n $_params = array(\"cid\" => $cid, \"opts\" => $opts);\n return $this->master->call('reports/unsubscribes', $_params);\n }", "function quit(&$irc, &$data)\n\t{\n\t\tglobal $pickup;\n\t\tglobal $users;\n\t\tglobal $irc;\n\t\tglobal $pickupchannel;\n\t\tglobal $pickup;\n\t\tglobal $pickupstatus;\n\n\t\t//Get data\n\t\t$nick = $data->nick;\n\t\t$qauth = $users->nicktoqauth($nick);\n\n\t\t//Remove from pickup\n\t\tif($pickup->is_added($qauth))\n\t\t{\n\t\t\t$pickup->rm_player($qauth);\n SetTopic();\n\t\t}\n\n\t\t//Mark the user out the channel\n\t\t$users->mark_outchannel($qauth);\n\t}", "function disconnect ()\n {\n if ( $this->socket )\n {\n $this->writeFrame(new StompFrame('DISCONNECT'));\n }\n socket_shutdown($this->socket, 1);\n usleep(500);\n socket_shutdown($this->socket, 2);\n socket_close($this->socket);\n $this->socket = NULL;\n }", "function unSubscribeById ( $id )\n {\n try\n {\n $result = $this->apiCall('delete',\"{$this->api['cms_manager_url']}/resources/subscriptions/{$id}\",array(),'json');\n return $this->createResponse($result,'Un-Subscribe','Id');\n } catch ( Exception $e ) {\n return $this->createResponse($e,'API Call');\n }\n }", "public function deleteChannel($id) \n {\n $this->find($id)->delete();\n }", "public function getUnsubscribe()\n {\n return $this->readOneof(2);\n }", "public function destroy($website, $subscriber)\n {\n $website = Website::find($website);\n \tif ($website->subscribers->contains($subscriber))\n \t\t$website->subscribers()->detach($subscriber);\n return response(['message' => 'Website Unsubscribed']);\n }", "public function disconnect() {\n\t\t@fclose ( $this->socket );\n\t}", "public function onClose(ConnectionInterface $conn) {\n foreach ($this->subscribedTopics as $topic) {\n if (preg_match('/user_(\\d+)_watch_wait/', $topic->getId(), $matches)) {\n if (($userId = $matches[1])) {\n // Add active agents to the wait stack\n $connectionId = $conn->WAMP->sessionId;\n $memcache = new \\Memcache();\n $memcache->connect('localhost', 11211) or die(\"Could not connect\");\n $activeUserArr = $memcache->get(self::MEMCACHE_WATCH_WAIT_LIST);\n $activeUserArr = $this->checkSessions($activeUserArr); // Check sessions statuses\n if (!isset($activeUserArr) || !is_array($activeUserArr))\n $activeUserArr = [];\n if (isset($activeUserArr[$userId]) && is_array($activeUserArr[$userId]) && ($connectionKey = array_search($connectionId, $activeUserArr[$userId])) !== false) {\n if (isset($activeUserArr[$userId][$connectionKey]))\n unset($activeUserArr[$userId][$connectionKey]);\n if (count($activeUserArr[$userId]) === 0)\n unset($activeUserArr[$userId]);\n }\n $memcache->set(self::MEMCACHE_WATCH_WAIT_LIST, $activeUserArr);\n return;\n }\n }\n }\n // Remove from connections list \n unset($this->connections[$conn->WAMP->sessionId]);\n }", "abstract function disconnect($socket);", "public function setUnsubscribe($var)\n {\n GPBUtil::checkMessage($var, \\Io\\Axoniq\\Axonserver\\Grpc\\Command\\CommandSubscription::class);\n $this->writeOneof(2, $var);\n\n return $this;\n }", "public function destroy(SubscribedUser $subscribedUser)\n {\n //\n }", "public function unsubscribe($email)\n {\n return $this->runOnSubscriber($email, function ($subscriber) use ($email) {\n if (is_null($subscriber)) {\n return true;\n }\n return $this->update($subscriber, ['email' => $email, 'subscription' => false]);\n });\n }", "public function unsubscribe($id_event=0) {\n\t\t$this->import('FrontendUser', 'User');\n\t\t$sql = \"DELETE \";\n\t\t$sql .= \"FROM tl_calendar_events_subscribe \";\n\t\t$sql .= \"WHERE id_member=? \";\n\t\t$sql .= \"AND pid=? \";\n\t\t$event = $this->Database->prepare($sql)->execute($this->User->id, $id_event);\n\t\treturn $event;\n\t}", "public function unsubscribeCategories($userid, $catids = false);", "public static function disconnect(){\n\t\tself::$cnx = NULL;\t\n\t\t\n\t}", "public function customer_unsubscribe( $customer_id, $at_period_end = TRUE ) {\r\n\t\t$at_period_end ? $pend = 'true' : $pend = 'false';\r\n\t\t$url = 'customers/'.$customer_id.'/subscription?at_period_end='.$pend;\r\n\t\t \r\n\t\treturn $this->_send_request( $url, array(), STRIPE_METHOD_DELETE );\r\n\t}", "function unsubscribe($entity){\n\t\tif($entity instanceof ElggUser){\n\t\t\treturn $entity->setMetaData('isSubscribedNewsletter',false);\n\t\t}else{\n\t\t\tregister_error(elgg_echo('vazco_newsletter:notanuser'));\n\t\t\treturn false;\n\t\t}\n\t}", "function ts3client_stopConnection($serverConnectionHandlerID, $quitMessage) {}", "function onClose(Ratchet\\ConnectionInterface $conn)\r\n {\r\n echo $conn->resourceId . \" has disconnected\\n\";\r\n\r\n $message = array(\r\n 'resourceId' => $conn->resourceId,\r\n 'type' => 'closeConnection'\r\n );\r\n \r\n foreach($this->clients as $client){\r\n if ($conn !== $client){\r\n $client->send(json_encode($message));\r\n }\r\n }\r\n\r\n $this->clients->detach($conn);\r\n }", "public function close($connection)\n\t{\n\t\t// channel if the connection is closed\n\t\tif(isset($connection->_handler))\n\t\t{\n\t\t\t$connection->_handler->unsubscribe($connection, 'stream');\n\t\t}\n\t}", "function campaignUnsubscribes($cid, $start=0, $limit=1000) {\n $params = array();\n $params[\"cid\"] = $cid;\n $params[\"start\"] = $start;\n $params[\"limit\"] = $limit;\n return $this->callServer(\"campaignUnsubscribes\", $params);\n }", "public function reject()\n {\n $this->channel->basic_reject(\n $this->tag(),\n true\n );\n }", "public static function unsubscribe($email, $listId = null) {\n $mc = new Mailchimp(self::$apikey);\n $mcList = new Mailchimp_Lists($mc);\n\n // list, odkud chci clena odhlasit\n if (!$listId) {\n // zjistit id listu pro danou zemi, ve kterem je zakaznik prihlasen\n $allCountryLists = self::getCountryMailListIds();\n foreach ($allCountryLists as $acl) {\n if (self::isSubscribed($email, $acl)) {\n $listId = $acl;\n break;\n }\n }\n }\n\n if ($listId) {\n $emailVar = array('email' => $email);\n $deleteMember = false;\n $sendGoodbye = false;\n $sendNotify = false;\n\n self::log('EMAIL: '.$email);\n self::log(\"List ID=\".$listId.\"\\n\");\n\n try {\n $res = $mcList->unsubscribe($listId, $emailVar, $deleteMember, $sendGoodbye, $sendNotify);\n self::log(\"Unsubscribed successfully - look for the confirmation email!\\n\");\n } catch (Mailchimp_Email_NotExists $mene) {\n self::log(\"Unable to unsubscribe, Mailchimp Email Not Exists!\\n\");\n self::log(\"\\tCode=\".$e->getCode().\"\\n\");\n self::log(\"\\tMsg=\".$e->getMessage().\"\\n\");\n } catch (Mailchimp_List_DoesNotExist $mldne) {\n self::log(\"Unable to unsubscribe, Mailchimp List Does Not Exist!\\n\");\n self::log(\"\\tCode=\".$e->getCode().\"\\n\");\n self::log(\"\\tMsg=\".$e->getMessage().\"\\n\");\n } catch (Exception $e) {\n self::log(\"Unable to load unsubscribe()!\\n\");\n self::log(\"\\tCode=\".$e->getCode().\"\\n\");\n self::log(\"\\tMsg=\".$e->getMessage().\"\\n\");\n }\n }\n }" ]
[ "0.7559348", "0.70654386", "0.69989914", "0.6736201", "0.6705151", "0.6547445", "0.65436345", "0.6532159", "0.6484924", "0.64621824", "0.6454529", "0.6450998", "0.6358939", "0.62621576", "0.60844123", "0.5938163", "0.5936604", "0.58988833", "0.5898759", "0.5885378", "0.58497155", "0.582899", "0.57854825", "0.5779727", "0.5767245", "0.5725499", "0.57105994", "0.57003653", "0.56245327", "0.56155", "0.55995715", "0.5578785", "0.5563801", "0.5563093", "0.55492973", "0.5540148", "0.5538841", "0.5531856", "0.5508494", "0.55011684", "0.5475272", "0.54612696", "0.5444149", "0.5424238", "0.53991157", "0.53670985", "0.535916", "0.53501743", "0.5341547", "0.5340544", "0.53399736", "0.5319893", "0.530354", "0.52992433", "0.5291695", "0.52905077", "0.52746475", "0.52524525", "0.5250186", "0.52287567", "0.5222892", "0.522202", "0.5210804", "0.51867163", "0.5150029", "0.51452327", "0.5124763", "0.51210755", "0.5113121", "0.5108894", "0.5107821", "0.50965905", "0.50903755", "0.5089906", "0.5086364", "0.50793105", "0.5053803", "0.5051185", "0.5047249", "0.50395274", "0.5035829", "0.501576", "0.50075185", "0.50020176", "0.4994621", "0.49873734", "0.49842548", "0.49837825", "0.49748385", "0.49704915", "0.4967593", "0.49656567", "0.4964813", "0.49468076", "0.49378988", "0.49284253", "0.49226725", "0.49202868", "0.49193606", "0.4917694" ]
0.49518833
93
Delete all subscriber information
public function deleteSubscriber($subscriberId, $subscriberType = null) { $this->backend->deleteSubscriber($this->getSubscriberName($subscriberId, $subscriberType)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clearSubscribers();", "public function removeSubscribes();", "public function destroy(Subscriber $subscriber)\n {\n //\n }", "public function mpp_delete_subscriber(){\n $response = array();\n $response['success'] = false;\n $response['message'] = __( 'Error: Unable to delete subscriber.', 'masterpopups' );\n\n if( ! $this->is_valid_nonce( 'xbox_ajax_nonce' ) ){\n die();\n }\n\n if( ! isset( $_POST['email'] ) || ! isset( $_POST['audience_id'] ) ){\n wp_send_json( $response );\n }\n $audience = get_post( $_POST['audience_id'] );\n if( $audience ){\n $email = $_POST['email'];\n $subscribers = (array) get_post_meta( $audience->ID, 'mpp_subscribers', true );\n if( isset( $subscribers[$email] ) ){\n unset( $subscribers[$email] );\n update_post_meta( $audience->ID, 'mpp_subscribers', $subscribers );\n $total_subscribers = (int) get_post_meta( $audience->ID, 'mpp_total-subscribers', true );\n update_post_meta( $audience->ID, 'mpp_total-subscribers', --$total_subscribers );\n $response['success'] = true;\n $response['message'] = __( 'Subscriber successfully deleted.', 'masterpopups' );\n $response['total'] = $total_subscribers;\n }\n }\n wp_send_json( $response );\n }", "public function clearTopicSubscriptions()\n {\n $this->topicSubscriptions->clear();\n }", "public static function delete($id) {\n $subscriber=Subscriber::delete($id);\n // 2. Include de la lview\n }", "public function subscribersGridDelete(){\n\n\t\t// Get record\n\t\t$record = model('NewsletterSubscriberModel')->get(Input::postInt('id'));\n\t\tif(!$record){\n\t\t\toutput_json_encode(array(\n\t\t\t\t'success'\t=> false,\n\t\t\t\t'message'\t=> 'Record bestaat niet (meer)'\n\t\t\t));\n\t\t}\n\t\t\n\t\t// Delete record\n\t\tmodel('NewsletterSubscriberModel')->delete($record['id']);\n\t\toutput_json_encode(array(\n\t\t\t'success'\t=> true\n\t\t));\n\t}", "public function delete()\n {\n $this->entityManager->getConnection()->exec(\"TRUNCATE subscriptions_products;\");\n $this->entityManager->getConnection()->exec(\"TRUNCATE subscriptions_products_tiers;\");\n $this->entityManager->getConnection()->exec(\"TRUNCATE subscriptions_products_tiers_payment_options;\");\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 }", "public function destroy(Subscribe $subscribe)\n {\n //\n }", "public function unsubscribe($delete = FALSE);", "private function unsubscribe()\n {\n $this->botman->hears('unsubscribe', function(BotMan $bot) {\n $userId = $bot->getUser()->getId();\n Subscriber::where('telegram_user_id', $userId)->delete();\n $bot->reply('You have just unsubscribed from our updates!');\n });\n }", "public function delete()\n {\n $table = $this->getTable();\n $where = $table->getAdapter()->quoteInto('subscriber_id = ?', $this->_subscriberId);\n $result = $table->delete($where);\n return $result;\n }", "public function unSubscribe()\n {\n }", "public function unsubscribe(): void;", "public function clearForumSubscriptions()\n {\n $this->forumSubscriptions->clear();\n }", "public function deleting(Reminder $reminder)\n {\n $reminder->deleted_by = Auth::user()->id;\n //Delete subscriptions\n $reminder->subscribers()->each(function ($item) {\n $item->delete();\n });\n\n }", "public function unSubscribe()\n {\n $this->disconnect();\n $this->queue = $this->currentEnvelope = null;\n }", "public function unsubscribe()\n {\n echo \"<br>\";\n echo \"Action: Cancelling Subscription !\";\n unset($this->plan);\n unset($this->server);\n unset($this->serverList);\n\n }", "public function destroy(Subscriber $subscriber)\n {\n $subscriber->delete();\n return back()->with('success','Deleted Successfully');\n }", "public function Delete()\n {\n \t$rs = mysql_query(\"DELETE FROM subscriptions WHERE subscription_id=\" . $this->subscription_id);\n \t\n \tif (mysql_errno())\n \t{\n \t\treturn \"MySQL error \".mysql_errno().\": \".mysql_error().\"\\n<br>When executing:<br>\\n$rs\\n<br>\";\n \t}\n }", "public function delete()\n {\n $this->staff->delete();\n $this->notify('Staff member was removed', 'hub.staff.index');\n }", "public function deleteAllEmails(): void\n {\n try {\n $this->mailhog->request('DELETE', '/api/v1/messages');\n } catch (Exception $e) {\n $this->fail('Exception: ' . $e->getMessage());\n }\n }", "public function _delete()\n\t {\n\t \t$this->notifyObservers(__FUNCTION__);\n\t }", "public function delete() {\n // Deleting microarticles.\n $microarticles = $this->getMicroarticles();\n if (!empty($microarticles)) {\n foreach ($microarticles as $microarticle) {\n $microarticle->delete();\n }\n }\n\n // Deleting selfservices.\n $selfServices = $this->getSelfservices();\n if (!empty($selfServices)) {\n foreach ($selfServices as $selfService) {\n $selfService->delete();\n }\n }\n\n parent::delete();\n }", "public function delete_all()\n {\n }", "public function resetCurrentSubscribers()\n {\n $this->currentSubscribers = [];\n }", "public function deleteAll($subscriberListID, $subscribers)\n\t{\n\n\t\t$command = \"Command=Subscribers.Delete\";\n\t\t$subscriberListID = \"SubscriberListID=\".$subscriberListID;\n\t\t$subscribers = \"Subscribers=\".$subscribers;\n\t\t\n\t\t$apiPath = $command\n\t\t\t\t\t\t.'&'.$subscriberListID\n\t\t\t\t\t\t.'&'.$subscribers\n\t\t;\n\n\t\treturn SessionData::getSession()->getResponse($apiPath);\n\n\t}", "public function destroy($id)\n {\n// $subscriber = Subscriber::find($id)->first();\n// $subscriber = Subscriber::where('id',$id)->first();\n Subscriber::destroy($id);\n return 1;\n// $subscriber = Subscriber::where('email',$email)->first();\n// return $subscriber::destroy($id);\n }", "public function clearAllRecipients()\n {\n }", "public function destroy(SubscribedUser $subscribedUser)\n {\n //\n }", "public function delete_messages()\n {\n $this->message=array();\n Session::instance()->delete(\"hana_message\");\n }", "public function tearDown() {\n $this->subscriber = null;\n }", "public function deleteSubscription($request);", "public function deleteAll();", "public function deleteAll();", "public function deleteAll();", "public function clearCCs()\n {\n foreach ($this->cc as $cc) {\n unset($this->all_recipients[strtolower($cc[0])]);\n }\n $this->cc = array();\n $this->clearQueuedAddresses('cc');\n }", "public function deleteAll(): void;", "public function deleteAll() {\n\n $this->start();\n $_SESSION = array();\n\n }", "public function deleteSubscriptions($id_person) {\n $this->db->where('ID_PERSON', $id_person);\n $this->db->delete($this->table);\n if ($this->db->affected_rows() > 0) {\n return true;\n }else{\n return false;\n }\n}", "public function deleteAll(): void\n {\n $this->client->delete($this->baseUri);\n }", "function delete_subscriber($idList, $number){\n if($number == 1){\n deleteRecord(TAB_SUBSCRIBERS, \"id = $idList\");\n }else{\n for($i = 0; $i < count($idList); $i++){\n $id = $idList[$i];\n deleteRecord(TAB_SUBSCRIBERS, \"id = $id\");\n }\n }\n}", "public function destroy(HashtagSubscriber $hashtagSubscriber)\n {\n //\n }", "public function destroy($id)\n {\n $key = Session::get('apiKeySession');\n $url = \"https://api.mailerlite.com/api/v2/subscribers/$id\";\n\n $curl = curl_init($url);\n curl_setopt($curl, CURLOPT_URL, $url);\n // curl_setopt($curl, CURLOPT_DELETE, true);\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n \n $headers = [\n \"X-MailerLite-ApiKey: $key\",\n ];\n\n curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\n \n $resp = curl_exec($curl);\n curl_close($curl);\n }", "public function destroy($id)\n {\n try{\n $subscriber = Subscriber::findOrFail($id);\n $subscriber->delete();\n return redirect()->route('subscriber.index')->with('message','Subscriber is Deleted Successfully.');\n }catch(QueryException $e){\n return redirect()\n ->route('subscriber.index')\n ->withErrors($e->getMessage());\n }\n }", "private function deleteAll()\n {\n unset($_SESSION['flash_messages']);\n }", "public function destroy()\n {\n $posts = Post::where('published', 0)->get();\n\n foreach ($posts as $post) {\n $post->subscriptions->each(function ($subscription) {\n $subscription->delete();\n });\n }\n\n return redirect(route('admin.subscription.index'));\n }", "public function destroy($id)\n {\n $subscriber=Subscriber::find($id);\n $subscriber->delete();\n\n return redirect('admin/subscribers')->with('success', 'Subscriber Deleted Successfully.');\n }", "public function delete(){\r\n $rsid_array = $this -> uri -> segment_array();\r\n\r\n foreach ($rsid_array as $key => $value) {\r\n \r\n //If the key is greater than 2 i.e is one of the the ids\r\n if ($key > 2) {\r\n\r\n //Run delete\r\n $this -> db -> delete('refSubs', array('id' => $value));\r\n\r\n } \r\n }\r\n\r\n }", "public function delall()\n {\n }", "function delSubs($command,$subscriber,$keyword){\n\t$sql_del=\"update subscriptions set active = 0 where msisdn like '%$subscriber%' and dateUnsubscribed=now() limit 1\";\n\t$result = mysql_query($sql_del);\n\t#logging\n\tif(!$result){\n\t\t$dbErr=\"SQL Error: \".mysql_error().\"SQL CODE: \".$sqlKW;\n\t\tflog($dbErr, $_SERVER[\"SCRIPT_FILENAME\"]);\n\t}else{\n\t\t$subsLogs = \"Successfully unsubscribed \".$subscriber .\" to $keyword alerts\";\n\t\tlogSubs($subsLogs, $_SERVER[\"SCRIPT_FILENAME\"]);\n\t}\n\t\n}", "public function deleteAllEmails()\n {\n $messages = $this->inbox->getMessages();\n foreach ($messages as $message) {\n $message->delete();\n }\n $this->imapConnection->expunge();\n $this->imapConnection->getResource()->clearLastMailboxUsedCache();\n }", "public function destroy($bunch_id , $subscriber_id)\n {\n Subscriber::find($subscriber_id)->delete();\n\n return redirect()->route('subscriber.index',[$bunch_id]);\n }", "public function delete_all() {\n\t\t$this->_cache = array();\n\t\t$this->_collections = array();\n\t}", "function clear_all () {\n $this->clear_to();\n $this->clear_cc();\n $this->clear_bcc();\n $this->all_emails = array();\n }", "public function destroy(NewsletterContacts $newsletterContacts)\n {\n //\n }", "protected function removeRecipient()\n\t{\n\t\t$arrChannels = $this->Input->post('channels');\n\t\t$arrChannels = array_intersect($arrChannels, $this->nl_channels); // see #3240\n\n\t\t// Check the selection\n\t\tif (!is_array($arrChannels) || count($arrChannels) < 1)\n\t\t{\n\t\t\t$_SESSION['UNSUBSCRIBE_ERROR'] = $GLOBALS['TL_LANG']['ERR']['noChannels'];\n\t\t\t$this->reload();\n\t\t}\n\n\t\t$arrSubscriptions = array();\n\t\t\n\t\t$email = \\Idna::encodeEmail($this->Input->post('email', true));\n\t\t\n\t\t$subscriber = new Subscriber($email);\n\n\t\t// Get active subscriptions\n\t\t$objSubscription = $this->Database->prepare(\"SELECT pid FROM tl_newsletter_recipients WHERE email=? AND active=1\")\n\t\t\t\t\t\t\t\t\t\t ->execute($email);\n\n\t\tif ($objSubscription->numRows)\n\t\t{\n\t\t\t$arrSubscriptions = $objSubscription->fetchEach('pid');\n\t\t}\n\n\t\t$arrRemove = array_intersect($arrChannels, $arrSubscriptions);\n\n\t\t// Return if there are no subscriptions to remove\n\t\tif (!is_array($arrRemove) || count($arrRemove) < 1)\n\t\t{\n\t\t\t$_SESSION['UNSUBSCRIBE_ERROR'] = $GLOBALS['TL_LANG']['ERR']['unsubscribed'];\n\t\t\t$this->reload();\n\t\t}\n\n\t\t// check for cleverreach support\n\t\t$objChannel = $this->Database->execute(\"SELECT id FROM tl_newsletter_channel WHERE cleverreach_active = 1 AND id IN(\" . implode(',', array_map('intval', $arrRemove)) . \")\");\n\n\t\t// TODO: multiple channel unsubscription\n\t\t$subscriber->getByChannel($arrRemove[0]);\n\n\t\t// Remove subscriptions\n\t\t$subscriber->remove($arrRemove);\n\t\t\n\t\t// optional Cleverreach Deletion\n\t\tif($objChannel->numRows > 0)\n\t\t{\n\t\t\t$subscriber->removeFromCR($objChannel->fetchEach('id'));\n\t\t}\n\n\t\t// Get channels\n\t\t$objChannels = $this->Database->execute(\"SELECT title FROM tl_newsletter_channel WHERE id IN(\" . implode(',', array_map('intval', $arrRemove)) . \")\");\n\t\t$arrChannels = $objChannels->fetchEach('title');\n\n\t\t// HOOK: post unsubscribe callback\n\t\tif (isset($GLOBALS['TL_HOOKS']['removeRecipient']) && is_array($GLOBALS['TL_HOOKS']['removeRecipient']))\n\t\t{\n\t\t\tforeach ($GLOBALS['TL_HOOKS']['removeRecipient'] as $callback)\n\t\t\t{\n\t\t\t\t$this->import($callback[0]);\n\t\t\t\t$this->{$callback[0]}->{$callback[1]}($varInput, $arrRemove);\n\t\t\t}\n\t\t}\n\n\t\tglobal $objPage;\n\n\t\t// Redirect to jumpTo page\n\t\tif (strlen($this->jumpTo) && $this->jumpTo != $objPage->id)\n\t\t{\n\t\t\t$objNextPage = $this->Database->prepare(\"SELECT id, alias FROM tl_page WHERE id=?\")\n\t\t\t\t\t\t\t\t\t\t ->limit(1)\n\t\t\t\t\t\t\t\t\t\t ->execute($this->jumpTo);\n\n\t\t\tif ($objNextPage->numRows)\n\t\t\t{\n\t\t\t\t$this->redirect($this->generateFrontendUrl($objNextPage->fetchAssoc()));\n\t\t\t}\n\t\t}\n\n\t\tif($subscriber->sendUnSubscribeMail($arrRemove))\n\t\t{\n\t\t\t$this->reload();\n\t\t}\n\t}", "public function clearAuditorias()\n\t{\n\t\t$this->collAuditorias = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function run() {\n DB::collection('log')->delete();\n \tDB::collection('redeem')->delete();\n \tDB::collection('speaks')->delete();\n DB::collection('origin_words')->delete();\n \tDB::collection('translated_words')->delete();\n DB::collection('categorized_words')->delete();\n }", "public function deleteAllMessages(){\r\n\t\t$query = 'TRUNCATE TABLE chat';\r\n\t\t$result = $this->mysqli->query($query);\r\n\t}", "public function delete()\n {\n parent::delete();\n $this->azure->deleteMessage($this->job);\n }", "public final function delete() {\n }", "function delete(){\n // Renumber resolutions\n $resolutions = resolution::getResolutions($this->committeeId, $this->topicId);\n foreach($resolutions as $resolution){\n if($resolution->resolutionNum <= $this->resolutionNum)\n continue;\n $resolution->resolutionNum--;\n $resolution->saveInfo();\n }\n // Delete subclauses\n foreach($this->preambulatory as $clause){\n $clause->delete();\n }\n foreach($this->operative as $clause){\n $clause->delete();\n }\n // Delete resolution\n mysql_query(\"DELETE FROM resolution_list WHERE id='$this->resolutionId'\") or die(mysql_error());\n }", "abstract public function deleteAll();", "public function destroy(Newsletter $newsletter)\n {\n // DELETE\n }", "public function clear()\r\n {\r\n $this->messages->clear();\r\n }", "public function purge() {}", "public function clear () {\n //$prefix = $this->redis->getOptions()->__get('prefix')->getPrefix();\n foreach($this->redis->keys(\"*\") as $key) {\n $this->redis->del($key);\n }\n }", "public function purge();", "public function purge();", "public function purge();", "public function clear()\n {\n $this->connection->del($this->key);\n\n if ($this->on_change) {\n call_user_func($this->on_change, []);\n }\n\n if ($this->on_clear) {\n call_user_func($this->on_clear, []);\n }\n }", "function delete_contact_from_list($cat_id, $email) {\n require_once 'createsend-php-5.1.2/csrest_subscribers.php';\n $auth = array('api_key' => CM_API_KEY);\n\n $wrap = new CS_REST_Subscribers(get_term_meta($cat_id, 'list_id', true), $auth);\n $result = $wrap->delete($email);\n}", "public function deleteUnpublished()\n {\n /**\n * @var OrderProduct[] $products\n */\n $products = $this->products;\n foreach ($products as $product) {\n $product->delete();\n }\n \n $this->delete();\n }", "public function destroy(Newsletter $newsletter) {\n //\n }", "public function removeNotifications()\n {\n foreach ($this->notifications as $notification) {\n $notification->delete();\n }\n }", "protected function deleteStore()\n {\n $keys = ['name', 'email'];\n foreach ($keys as $key) {\n $this->store->delete($key);\n }\n }", "function clearNotifs(){\n $aNotification = $this->model('Notification');\n\t\t$aNotification->clearNotifications();\n }", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function destroy(individualDelegates $individualDelegates)\n {\n //\n }", "public function delete() {}", "public function actionDelete($list_uid,$subscriber_uid)\n {\n\n $request = Yii::app()->request;\n\n if(!$request->isDeleteRequest)\n {\n return $this->renderJson(array(\n 'status' => 'error',\n 'error' => Yii::t('api','Only DELETE requests allowed for this endpoint.')\n ),400);\n }\n\n if(!($list = $this->loadListByUid($list_uid)))\n {\n return $this->renderJson(array(\n 'status' => 'error',\n 'error' => Yii::t('api','The subscribers list does not exist.')\n ),404);\n }\n\n $subscriber = ListSubscriber::model()->findByAttributes(array(\n 'subscriber_uid' => $subscriber_uid,\n 'list_id' => $list->list_id,\n ));\n\n if(empty($subscriber))\n {\n return $this->renderJson(array(\n 'status' => 'error',\n 'error' => Yii::t('api','The subscriber does not exist in this list.')\n ),404);\n }\n\n $subscriber->delete();\n\n if($logAction = Yii::app()->user->getModel()->asa('logAction'))\n {\n $logAction->subscriberDeleted($subscriber);\n }\n\n return $this->renderJson(array(\n 'status' => 'success',\n ),200);\n }", "public function clear()\n {\n $this->messages = [];\n }", "function cleanUpOrphanedSubscriptions() {\n $existing_user_ids = DB::executeFirstColumn(\"SELECT id FROM \" . TABLE_PREFIX . \"users\");\n if (is_foreachable($existing_user_ids)) {\n try {\n DB::execute(\"DELETE FROM \" . TABLE_PREFIX . \"subscriptions WHERE user_id NOT IN (?)\", $existing_user_ids);\n } catch (Exception $e) {\n return $e->getMessage();\n } // try\n } // if - actually, else should die('your aC is WRONG!')\n\n return true;\n }", "public function\n\tclearMessages()\n\t{\n\t\t$this -> m_aStorage = [];\n\t}", "function clear_cc () {\n $this->sendcc = array();\n $this->all_emails = array();\n }", "public function clear(): void\n {\n $this->messages = [];\n }", "function clearAllRecipients() {\n\t\t$this->setRecipients(array());\n\t\t$this->setCcs(array());\n\t\t$this->setBccs(array());\n\t}", "public function destroy($id)\n\t{\n\t\t$contact=DB::table('subject')->where('id', $id)->delete();;\n\t}", "public function destroy(Newsletter $newsletter)\n {\n //\n }", "public function destroy(Newsletter $newsletter)\n {\n //\n }", "public function destroy(Newsletter $newsletter)\n {\n //\n }", "public function DELETE() {\n #\n }", "public function purgeTickets()\n\t{\n\t\t$ticket_ids = $this->db->fetchAllCol(\"\n\t\t\tSELECT id FROM tickets WHERE person_id = ? AND hidden_status != 'deleted'\n\t\t\", array($this->person->getId()));\n\n\t\tif (!$ticket_ids) {\n\t\t\treturn;\n\t\t}\n\n\t\t#------------------------------\n\t\t# Insert delete logs\n\t\t#------------------------------\n\n\t\t$by_person_id = null;\n\t\tif ($this->person_context) {\n\t\t\t$by_person_id = $this->person_context->getId();\n\t\t}\n\n\t\t$date_str = date('Y-m-d H:i:s');\n\t\t$reason_str = 'User was deleted';\n\n\t\t$inserts = array();\n\n\t\tforeach ($ticket_ids as $ticket_id) {\n\t\t\t$inserts[] = array('ticket_id' => $ticket_id, 'by_person_id' => $by_person_id, 'new_ticket_id' => 0, 'date_created' => $date_str, 'reason' => $reason_str);\n\t\t}\n\n\t\t$this->db->batchInsert('tickets_deleted', $inserts);\n\n\t\t#------------------------------\n\t\t# Clear out the search tables\n\t\t#------------------------------\n\n\t\t$this->db->delete('tickets_search_active', array('person_id' => $this->person->getId()));\n\t\t$this->db->delete('tickets_search_message', array('person_id' => $this->person->getId()));\n\t\t$this->db->delete('tickets_search_message_active', array('person_id' => $this->person->getId()));\n\t\t$this->db->executeUpdate(\"DELETE FROM tickets_search_subject WHERE id IN (\" . implode(',', $ticket_ids) . \")\");\n\t}", "protected function removeRecipient()\n\t{\n\t\t$arrChannels = $this->Input->post('channels');\n\n\t\t// Check selection\n\t\tif (!is_array($arrChannels) || count($arrChannels) < 1)\n\t\t{\n\t\t\t$_SESSION['UNSUBSCRIBE_ERROR'] = $GLOBALS['TL_LANG']['ERR']['noChannels'];\n\t\t\t$this->reload();\n\t\t}\n\n\t\t// Validate e-mail address\n\t\tif (!preg_match('/^\\w+([!#\\$%&\\'\\*\\+\\-\\/=\\?^_`\\.\\{\\|\\}~]*\\w+)*@\\w+([_\\.-]*\\w+)*\\.[a-z]{2,6}$/i', $this->Input->post('email', true)))\n\t\t{\n\t\t\t$_SESSION['UNSUBSCRIBE_ERROR'] = $GLOBALS['TL_LANG']['ERR']['email'];\n\t\t\t$this->reload();\n\t\t}\n\n\t\t$arrSubscriptions = array();\n\n\t\t// Get active subscriptions\n\t\t$objSubscription = $this->Database->prepare(\"SELECT pid FROM tl_newsletter_recipients WHERE email=? AND active=?\")\n\t\t\t\t\t\t\t\t\t\t ->execute($this->Input->post('email', true), 1);\n\n\t\tif ($objSubscription->numRows)\n\t\t{\n\t\t\t$arrSubscriptions = $objSubscription->fetchEach('pid');\n\t\t}\n\n\t\t$arrRemove = array_intersect($arrChannels, $arrSubscriptions);\n\n\t\t// Return if there are no subscriptions to remove\n\t\tif (!is_array($arrRemove) || count($arrRemove) < 1)\n\t\t{\n\t\t\t$_SESSION['UNSUBSCRIBE_ERROR'] = $GLOBALS['TL_LANG']['ERR']['unsubscribed'];\n\t\t\t$this->reload();\n\t\t}\n\n\t\t// Remove subscriptions\n\t\t$this->Database->prepare(\"DELETE FROM tl_newsletter_recipients WHERE email=? AND pid IN(\" . implode(',', $arrRemove) . \")\")\n\t\t\t\t\t ->execute($this->Input->post('email', true));\n\t\t\t\t\t \n\t\t// Remove member\n\t\t$arrRetain = array_diff($arrSubscriptions, $arrChannels);\n\t\tif (count($arrRetain))\n\t\t{\n\t\t\t$this->Database->prepare(\"UPDATE tl_member SET newsletter=? WHERE email=?\")->execute(serialize($arrRetain), $this->Input->post('email'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Delete only if member groups match\n\t\t\t$this->Database->prepare(\"DELETE FROM tl_member WHERE email=? AND groups=?\")->execute($this->Input->post('email'), $this->reg_groups);\n\t\t}\n\n\t\t// Confirmation e-mail\n\t\t$objEmail = new Email();\n\n\t\t// Get channels\n\t\t$objChannel = $this->Database->execute(\"SELECT title FROM tl_newsletter_channel WHERE id IN(\" . implode(',', $arrChannels) . \")\");\n\t\t\n\t\t// HOOK: post unsubscribe callback\n\t\tif (isset($GLOBALS['TL_HOOKS']['removeRecipient']) && is_array($GLOBALS['TL_HOOKS']['removeRecipient']))\n\t\t{\n\t\t\tforeach ($GLOBALS['TL_HOOKS']['removeRecipient'] as $callback)\n\t\t\t{\n\t\t\t\t$this->import($callback[0]);\n\t\t\t\t$this->$callback[0]->$callback[1]($this->Input->post('email', true), $arrRemove, $objChannel->fetchEach('title'));\n\t\t\t}\n\t\t}\n\n\t\t$strText = str_replace('##domain##', $this->Environment->host, $this->nl_unsubscribe);\n\t\t$strText = str_replace(array('##channel##', '##channels##'), implode(\"\\n\", $objChannel->fetchEach('title')), $strText);\n\n\t\t$objEmail->from = $GLOBALS['TL_ADMIN_EMAIL'];\n\t\t$objEmail->subject = sprintf($GLOBALS['TL_LANG']['MSC']['nl_subject'], $this->Environment->host);\n\t\t$objEmail->text = $strText;\n\n\t\t$objEmail->sendTo($this->Input->post('email', true));\n\t\tglobal $objPage;\n\n\t\t// Redirect to jumpTo page\n\t\tif (strlen($this->jumpTo) && $this->jumpTo != $objPage->id)\n\t\t{\n\t\t\t$objNextPage = $this->Database->prepare(\"SELECT id, alias FROM tl_page WHERE id=?\")\n\t\t\t\t\t\t\t\t\t\t ->limit(1)\n\t\t\t\t\t\t\t\t\t\t ->execute($this->jumpTo);\n\n\t\t\tif ($objNextPage->numRows)\n\t\t\t{\n\t\t\t\t$this->redirect($this->generateFrontendUrl($objNextPage->fetchAssoc()));\n\t\t\t}\n\t\t}\n\n\t\t$_SESSION['UNSUBSCRIBE_CONFIRM'] = $GLOBALS['TL_LANG']['MSC']['nl_removed'];\n\t\t$this->reload();\n\t}", "function delete($email) {\n return $this->delete_request($this->_subscribers_base_route.'.json?email='.urlencode($email));\n }", "function removeSubscriber($smsMessage) {\n\t\t$country = $smsMessage->getCountry();\n\t\tif ($this->service == null) {\n\t\t\t$this->sendResponse($smsMessage, \"Unknown Service. Please check and try again.\");\n\t\t}\n\n\t\tswitch ($this->isSubscribed($smsMessage->getOriginator(), $this->service[\"Keyword\"])) {\t\n\t\t\tcase \"Awaiting Confirmation\":\n\t\t\tcase \"Subscribed\":\n\t\t\t\t$number = $smsMessage->getOriginator();\n\t\t\t\t$message = \"You have now been unsubscribed from \" .\t$this->service[\"Description\"];\n\t\t\t\t$sql = \"DELETE FROM \\\"Subscriptions\\\" WHERE \\\"Number\\\" = '$number'\";\n\t\t\t\tpg_query($this->dbConnection,$sql);\n\t\t\t\t$this->sendResponse($smsMessage, $message);\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$message = \"You are not subscribed to \" . $this->service[\"Description\"] . \".\";\n\t\t\t\t$this->sendResponse($smsMessage, $message);\n\t\t\tbreak;\n\t\t}\n\t\n\t}", "public function destroy(Request $request)\n {\n $email = $request->email;\n $newsletter = NewsLetter::where('email', '=', $email)->firstOrFail();\n $newsletter->delete();\n \n }" ]
[ "0.78684413", "0.7143973", "0.6965729", "0.6713598", "0.6678256", "0.6671317", "0.6530665", "0.64878887", "0.64183944", "0.6385615", "0.6384603", "0.6373077", "0.63399434", "0.6316889", "0.6304023", "0.6222982", "0.6211773", "0.6210456", "0.6195898", "0.6153217", "0.61155623", "0.6100385", "0.609288", "0.60819834", "0.60815907", "0.607068", "0.605431", "0.6048576", "0.60483265", "0.6043458", "0.6029176", "0.6021925", "0.6020732", "0.60150033", "0.6005337", "0.6005337", "0.6005337", "0.5989075", "0.5987618", "0.59765226", "0.5973636", "0.5970577", "0.5965836", "0.59576184", "0.5951983", "0.593384", "0.5918529", "0.5891502", "0.58899975", "0.58614486", "0.5859866", "0.5858121", "0.5852157", "0.581802", "0.5808091", "0.5803346", "0.579572", "0.5784292", "0.5779569", "0.57591385", "0.575812", "0.5750571", "0.5747124", "0.5741884", "0.57387793", "0.57298166", "0.57254595", "0.5724456", "0.5718107", "0.569896", "0.569896", "0.569896", "0.56943005", "0.56900316", "0.56798434", "0.5679357", "0.5679322", "0.5677432", "0.56702596", "0.56685174", "0.5668339", "0.5668339", "0.56677985", "0.56667715", "0.566624", "0.56593525", "0.5649877", "0.5647815", "0.564566", "0.5638452", "0.5628439", "0.56277", "0.5624957", "0.5624957", "0.5624957", "0.56152236", "0.5608646", "0.56058675", "0.56014353", "0.55996895", "0.5591012" ]
0.0
-1
Delete all subscriber information
public function deleteSubscriberList($subscriberIdList, $subscriberType = null) { $this->backend->deleteSubscribers($this->getSubscriberNameList($subscriberIdList, $subscriberType)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clearSubscribers();", "public function removeSubscribes();", "public function destroy(Subscriber $subscriber)\n {\n //\n }", "public function mpp_delete_subscriber(){\n $response = array();\n $response['success'] = false;\n $response['message'] = __( 'Error: Unable to delete subscriber.', 'masterpopups' );\n\n if( ! $this->is_valid_nonce( 'xbox_ajax_nonce' ) ){\n die();\n }\n\n if( ! isset( $_POST['email'] ) || ! isset( $_POST['audience_id'] ) ){\n wp_send_json( $response );\n }\n $audience = get_post( $_POST['audience_id'] );\n if( $audience ){\n $email = $_POST['email'];\n $subscribers = (array) get_post_meta( $audience->ID, 'mpp_subscribers', true );\n if( isset( $subscribers[$email] ) ){\n unset( $subscribers[$email] );\n update_post_meta( $audience->ID, 'mpp_subscribers', $subscribers );\n $total_subscribers = (int) get_post_meta( $audience->ID, 'mpp_total-subscribers', true );\n update_post_meta( $audience->ID, 'mpp_total-subscribers', --$total_subscribers );\n $response['success'] = true;\n $response['message'] = __( 'Subscriber successfully deleted.', 'masterpopups' );\n $response['total'] = $total_subscribers;\n }\n }\n wp_send_json( $response );\n }", "public function clearTopicSubscriptions()\n {\n $this->topicSubscriptions->clear();\n }", "public static function delete($id) {\n $subscriber=Subscriber::delete($id);\n // 2. Include de la lview\n }", "public function subscribersGridDelete(){\n\n\t\t// Get record\n\t\t$record = model('NewsletterSubscriberModel')->get(Input::postInt('id'));\n\t\tif(!$record){\n\t\t\toutput_json_encode(array(\n\t\t\t\t'success'\t=> false,\n\t\t\t\t'message'\t=> 'Record bestaat niet (meer)'\n\t\t\t));\n\t\t}\n\t\t\n\t\t// Delete record\n\t\tmodel('NewsletterSubscriberModel')->delete($record['id']);\n\t\toutput_json_encode(array(\n\t\t\t'success'\t=> true\n\t\t));\n\t}", "public function delete()\n {\n $this->entityManager->getConnection()->exec(\"TRUNCATE subscriptions_products;\");\n $this->entityManager->getConnection()->exec(\"TRUNCATE subscriptions_products_tiers;\");\n $this->entityManager->getConnection()->exec(\"TRUNCATE subscriptions_products_tiers_payment_options;\");\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 }", "public function destroy(Subscribe $subscribe)\n {\n //\n }", "public function unsubscribe($delete = FALSE);", "private function unsubscribe()\n {\n $this->botman->hears('unsubscribe', function(BotMan $bot) {\n $userId = $bot->getUser()->getId();\n Subscriber::where('telegram_user_id', $userId)->delete();\n $bot->reply('You have just unsubscribed from our updates!');\n });\n }", "public function delete()\n {\n $table = $this->getTable();\n $where = $table->getAdapter()->quoteInto('subscriber_id = ?', $this->_subscriberId);\n $result = $table->delete($where);\n return $result;\n }", "public function unSubscribe()\n {\n }", "public function unsubscribe(): void;", "public function clearForumSubscriptions()\n {\n $this->forumSubscriptions->clear();\n }", "public function deleting(Reminder $reminder)\n {\n $reminder->deleted_by = Auth::user()->id;\n //Delete subscriptions\n $reminder->subscribers()->each(function ($item) {\n $item->delete();\n });\n\n }", "public function unSubscribe()\n {\n $this->disconnect();\n $this->queue = $this->currentEnvelope = null;\n }", "public function unsubscribe()\n {\n echo \"<br>\";\n echo \"Action: Cancelling Subscription !\";\n unset($this->plan);\n unset($this->server);\n unset($this->serverList);\n\n }", "public function destroy(Subscriber $subscriber)\n {\n $subscriber->delete();\n return back()->with('success','Deleted Successfully');\n }", "public function Delete()\n {\n \t$rs = mysql_query(\"DELETE FROM subscriptions WHERE subscription_id=\" . $this->subscription_id);\n \t\n \tif (mysql_errno())\n \t{\n \t\treturn \"MySQL error \".mysql_errno().\": \".mysql_error().\"\\n<br>When executing:<br>\\n$rs\\n<br>\";\n \t}\n }", "public function delete()\n {\n $this->staff->delete();\n $this->notify('Staff member was removed', 'hub.staff.index');\n }", "public function deleteAllEmails(): void\n {\n try {\n $this->mailhog->request('DELETE', '/api/v1/messages');\n } catch (Exception $e) {\n $this->fail('Exception: ' . $e->getMessage());\n }\n }", "public function _delete()\n\t {\n\t \t$this->notifyObservers(__FUNCTION__);\n\t }", "public function delete() {\n // Deleting microarticles.\n $microarticles = $this->getMicroarticles();\n if (!empty($microarticles)) {\n foreach ($microarticles as $microarticle) {\n $microarticle->delete();\n }\n }\n\n // Deleting selfservices.\n $selfServices = $this->getSelfservices();\n if (!empty($selfServices)) {\n foreach ($selfServices as $selfService) {\n $selfService->delete();\n }\n }\n\n parent::delete();\n }", "public function delete_all()\n {\n }", "public function resetCurrentSubscribers()\n {\n $this->currentSubscribers = [];\n }", "public function deleteAll($subscriberListID, $subscribers)\n\t{\n\n\t\t$command = \"Command=Subscribers.Delete\";\n\t\t$subscriberListID = \"SubscriberListID=\".$subscriberListID;\n\t\t$subscribers = \"Subscribers=\".$subscribers;\n\t\t\n\t\t$apiPath = $command\n\t\t\t\t\t\t.'&'.$subscriberListID\n\t\t\t\t\t\t.'&'.$subscribers\n\t\t;\n\n\t\treturn SessionData::getSession()->getResponse($apiPath);\n\n\t}", "public function destroy($id)\n {\n// $subscriber = Subscriber::find($id)->first();\n// $subscriber = Subscriber::where('id',$id)->first();\n Subscriber::destroy($id);\n return 1;\n// $subscriber = Subscriber::where('email',$email)->first();\n// return $subscriber::destroy($id);\n }", "public function clearAllRecipients()\n {\n }", "public function destroy(SubscribedUser $subscribedUser)\n {\n //\n }", "public function delete_messages()\n {\n $this->message=array();\n Session::instance()->delete(\"hana_message\");\n }", "public function tearDown() {\n $this->subscriber = null;\n }", "public function deleteSubscription($request);", "public function deleteAll();", "public function deleteAll();", "public function deleteAll();", "public function clearCCs()\n {\n foreach ($this->cc as $cc) {\n unset($this->all_recipients[strtolower($cc[0])]);\n }\n $this->cc = array();\n $this->clearQueuedAddresses('cc');\n }", "public function deleteAll(): void;", "public function deleteAll() {\n\n $this->start();\n $_SESSION = array();\n\n }", "public function deleteSubscriptions($id_person) {\n $this->db->where('ID_PERSON', $id_person);\n $this->db->delete($this->table);\n if ($this->db->affected_rows() > 0) {\n return true;\n }else{\n return false;\n }\n}", "public function deleteAll(): void\n {\n $this->client->delete($this->baseUri);\n }", "function delete_subscriber($idList, $number){\n if($number == 1){\n deleteRecord(TAB_SUBSCRIBERS, \"id = $idList\");\n }else{\n for($i = 0; $i < count($idList); $i++){\n $id = $idList[$i];\n deleteRecord(TAB_SUBSCRIBERS, \"id = $id\");\n }\n }\n}", "public function destroy(HashtagSubscriber $hashtagSubscriber)\n {\n //\n }", "public function destroy($id)\n {\n $key = Session::get('apiKeySession');\n $url = \"https://api.mailerlite.com/api/v2/subscribers/$id\";\n\n $curl = curl_init($url);\n curl_setopt($curl, CURLOPT_URL, $url);\n // curl_setopt($curl, CURLOPT_DELETE, true);\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n \n $headers = [\n \"X-MailerLite-ApiKey: $key\",\n ];\n\n curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\n \n $resp = curl_exec($curl);\n curl_close($curl);\n }", "public function destroy($id)\n {\n try{\n $subscriber = Subscriber::findOrFail($id);\n $subscriber->delete();\n return redirect()->route('subscriber.index')->with('message','Subscriber is Deleted Successfully.');\n }catch(QueryException $e){\n return redirect()\n ->route('subscriber.index')\n ->withErrors($e->getMessage());\n }\n }", "private function deleteAll()\n {\n unset($_SESSION['flash_messages']);\n }", "public function destroy()\n {\n $posts = Post::where('published', 0)->get();\n\n foreach ($posts as $post) {\n $post->subscriptions->each(function ($subscription) {\n $subscription->delete();\n });\n }\n\n return redirect(route('admin.subscription.index'));\n }", "public function destroy($id)\n {\n $subscriber=Subscriber::find($id);\n $subscriber->delete();\n\n return redirect('admin/subscribers')->with('success', 'Subscriber Deleted Successfully.');\n }", "public function delete(){\r\n $rsid_array = $this -> uri -> segment_array();\r\n\r\n foreach ($rsid_array as $key => $value) {\r\n \r\n //If the key is greater than 2 i.e is one of the the ids\r\n if ($key > 2) {\r\n\r\n //Run delete\r\n $this -> db -> delete('refSubs', array('id' => $value));\r\n\r\n } \r\n }\r\n\r\n }", "public function delall()\n {\n }", "function delSubs($command,$subscriber,$keyword){\n\t$sql_del=\"update subscriptions set active = 0 where msisdn like '%$subscriber%' and dateUnsubscribed=now() limit 1\";\n\t$result = mysql_query($sql_del);\n\t#logging\n\tif(!$result){\n\t\t$dbErr=\"SQL Error: \".mysql_error().\"SQL CODE: \".$sqlKW;\n\t\tflog($dbErr, $_SERVER[\"SCRIPT_FILENAME\"]);\n\t}else{\n\t\t$subsLogs = \"Successfully unsubscribed \".$subscriber .\" to $keyword alerts\";\n\t\tlogSubs($subsLogs, $_SERVER[\"SCRIPT_FILENAME\"]);\n\t}\n\t\n}", "public function deleteAllEmails()\n {\n $messages = $this->inbox->getMessages();\n foreach ($messages as $message) {\n $message->delete();\n }\n $this->imapConnection->expunge();\n $this->imapConnection->getResource()->clearLastMailboxUsedCache();\n }", "public function destroy($bunch_id , $subscriber_id)\n {\n Subscriber::find($subscriber_id)->delete();\n\n return redirect()->route('subscriber.index',[$bunch_id]);\n }", "public function delete_all() {\n\t\t$this->_cache = array();\n\t\t$this->_collections = array();\n\t}", "function clear_all () {\n $this->clear_to();\n $this->clear_cc();\n $this->clear_bcc();\n $this->all_emails = array();\n }", "public function destroy(NewsletterContacts $newsletterContacts)\n {\n //\n }", "protected function removeRecipient()\n\t{\n\t\t$arrChannels = $this->Input->post('channels');\n\t\t$arrChannels = array_intersect($arrChannels, $this->nl_channels); // see #3240\n\n\t\t// Check the selection\n\t\tif (!is_array($arrChannels) || count($arrChannels) < 1)\n\t\t{\n\t\t\t$_SESSION['UNSUBSCRIBE_ERROR'] = $GLOBALS['TL_LANG']['ERR']['noChannels'];\n\t\t\t$this->reload();\n\t\t}\n\n\t\t$arrSubscriptions = array();\n\t\t\n\t\t$email = \\Idna::encodeEmail($this->Input->post('email', true));\n\t\t\n\t\t$subscriber = new Subscriber($email);\n\n\t\t// Get active subscriptions\n\t\t$objSubscription = $this->Database->prepare(\"SELECT pid FROM tl_newsletter_recipients WHERE email=? AND active=1\")\n\t\t\t\t\t\t\t\t\t\t ->execute($email);\n\n\t\tif ($objSubscription->numRows)\n\t\t{\n\t\t\t$arrSubscriptions = $objSubscription->fetchEach('pid');\n\t\t}\n\n\t\t$arrRemove = array_intersect($arrChannels, $arrSubscriptions);\n\n\t\t// Return if there are no subscriptions to remove\n\t\tif (!is_array($arrRemove) || count($arrRemove) < 1)\n\t\t{\n\t\t\t$_SESSION['UNSUBSCRIBE_ERROR'] = $GLOBALS['TL_LANG']['ERR']['unsubscribed'];\n\t\t\t$this->reload();\n\t\t}\n\n\t\t// check for cleverreach support\n\t\t$objChannel = $this->Database->execute(\"SELECT id FROM tl_newsletter_channel WHERE cleverreach_active = 1 AND id IN(\" . implode(',', array_map('intval', $arrRemove)) . \")\");\n\n\t\t// TODO: multiple channel unsubscription\n\t\t$subscriber->getByChannel($arrRemove[0]);\n\n\t\t// Remove subscriptions\n\t\t$subscriber->remove($arrRemove);\n\t\t\n\t\t// optional Cleverreach Deletion\n\t\tif($objChannel->numRows > 0)\n\t\t{\n\t\t\t$subscriber->removeFromCR($objChannel->fetchEach('id'));\n\t\t}\n\n\t\t// Get channels\n\t\t$objChannels = $this->Database->execute(\"SELECT title FROM tl_newsletter_channel WHERE id IN(\" . implode(',', array_map('intval', $arrRemove)) . \")\");\n\t\t$arrChannels = $objChannels->fetchEach('title');\n\n\t\t// HOOK: post unsubscribe callback\n\t\tif (isset($GLOBALS['TL_HOOKS']['removeRecipient']) && is_array($GLOBALS['TL_HOOKS']['removeRecipient']))\n\t\t{\n\t\t\tforeach ($GLOBALS['TL_HOOKS']['removeRecipient'] as $callback)\n\t\t\t{\n\t\t\t\t$this->import($callback[0]);\n\t\t\t\t$this->{$callback[0]}->{$callback[1]}($varInput, $arrRemove);\n\t\t\t}\n\t\t}\n\n\t\tglobal $objPage;\n\n\t\t// Redirect to jumpTo page\n\t\tif (strlen($this->jumpTo) && $this->jumpTo != $objPage->id)\n\t\t{\n\t\t\t$objNextPage = $this->Database->prepare(\"SELECT id, alias FROM tl_page WHERE id=?\")\n\t\t\t\t\t\t\t\t\t\t ->limit(1)\n\t\t\t\t\t\t\t\t\t\t ->execute($this->jumpTo);\n\n\t\t\tif ($objNextPage->numRows)\n\t\t\t{\n\t\t\t\t$this->redirect($this->generateFrontendUrl($objNextPage->fetchAssoc()));\n\t\t\t}\n\t\t}\n\n\t\tif($subscriber->sendUnSubscribeMail($arrRemove))\n\t\t{\n\t\t\t$this->reload();\n\t\t}\n\t}", "public function clearAuditorias()\n\t{\n\t\t$this->collAuditorias = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function run() {\n DB::collection('log')->delete();\n \tDB::collection('redeem')->delete();\n \tDB::collection('speaks')->delete();\n DB::collection('origin_words')->delete();\n \tDB::collection('translated_words')->delete();\n DB::collection('categorized_words')->delete();\n }", "public function deleteAllMessages(){\r\n\t\t$query = 'TRUNCATE TABLE chat';\r\n\t\t$result = $this->mysqli->query($query);\r\n\t}", "public function delete()\n {\n parent::delete();\n $this->azure->deleteMessage($this->job);\n }", "public final function delete() {\n }", "function delete(){\n // Renumber resolutions\n $resolutions = resolution::getResolutions($this->committeeId, $this->topicId);\n foreach($resolutions as $resolution){\n if($resolution->resolutionNum <= $this->resolutionNum)\n continue;\n $resolution->resolutionNum--;\n $resolution->saveInfo();\n }\n // Delete subclauses\n foreach($this->preambulatory as $clause){\n $clause->delete();\n }\n foreach($this->operative as $clause){\n $clause->delete();\n }\n // Delete resolution\n mysql_query(\"DELETE FROM resolution_list WHERE id='$this->resolutionId'\") or die(mysql_error());\n }", "abstract public function deleteAll();", "public function destroy(Newsletter $newsletter)\n {\n // DELETE\n }", "public function clear()\r\n {\r\n $this->messages->clear();\r\n }", "public function purge() {}", "public function clear () {\n //$prefix = $this->redis->getOptions()->__get('prefix')->getPrefix();\n foreach($this->redis->keys(\"*\") as $key) {\n $this->redis->del($key);\n }\n }", "public function purge();", "public function purge();", "public function purge();", "public function clear()\n {\n $this->connection->del($this->key);\n\n if ($this->on_change) {\n call_user_func($this->on_change, []);\n }\n\n if ($this->on_clear) {\n call_user_func($this->on_clear, []);\n }\n }", "function delete_contact_from_list($cat_id, $email) {\n require_once 'createsend-php-5.1.2/csrest_subscribers.php';\n $auth = array('api_key' => CM_API_KEY);\n\n $wrap = new CS_REST_Subscribers(get_term_meta($cat_id, 'list_id', true), $auth);\n $result = $wrap->delete($email);\n}", "public function deleteUnpublished()\n {\n /**\n * @var OrderProduct[] $products\n */\n $products = $this->products;\n foreach ($products as $product) {\n $product->delete();\n }\n \n $this->delete();\n }", "public function destroy(Newsletter $newsletter) {\n //\n }", "public function removeNotifications()\n {\n foreach ($this->notifications as $notification) {\n $notification->delete();\n }\n }", "protected function deleteStore()\n {\n $keys = ['name', 'email'];\n foreach ($keys as $key) {\n $this->store->delete($key);\n }\n }", "function clearNotifs(){\n $aNotification = $this->model('Notification');\n\t\t$aNotification->clearNotifications();\n }", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function destroy(individualDelegates $individualDelegates)\n {\n //\n }", "public function delete() {}", "public function actionDelete($list_uid,$subscriber_uid)\n {\n\n $request = Yii::app()->request;\n\n if(!$request->isDeleteRequest)\n {\n return $this->renderJson(array(\n 'status' => 'error',\n 'error' => Yii::t('api','Only DELETE requests allowed for this endpoint.')\n ),400);\n }\n\n if(!($list = $this->loadListByUid($list_uid)))\n {\n return $this->renderJson(array(\n 'status' => 'error',\n 'error' => Yii::t('api','The subscribers list does not exist.')\n ),404);\n }\n\n $subscriber = ListSubscriber::model()->findByAttributes(array(\n 'subscriber_uid' => $subscriber_uid,\n 'list_id' => $list->list_id,\n ));\n\n if(empty($subscriber))\n {\n return $this->renderJson(array(\n 'status' => 'error',\n 'error' => Yii::t('api','The subscriber does not exist in this list.')\n ),404);\n }\n\n $subscriber->delete();\n\n if($logAction = Yii::app()->user->getModel()->asa('logAction'))\n {\n $logAction->subscriberDeleted($subscriber);\n }\n\n return $this->renderJson(array(\n 'status' => 'success',\n ),200);\n }", "public function clear()\n {\n $this->messages = [];\n }", "function cleanUpOrphanedSubscriptions() {\n $existing_user_ids = DB::executeFirstColumn(\"SELECT id FROM \" . TABLE_PREFIX . \"users\");\n if (is_foreachable($existing_user_ids)) {\n try {\n DB::execute(\"DELETE FROM \" . TABLE_PREFIX . \"subscriptions WHERE user_id NOT IN (?)\", $existing_user_ids);\n } catch (Exception $e) {\n return $e->getMessage();\n } // try\n } // if - actually, else should die('your aC is WRONG!')\n\n return true;\n }", "public function\n\tclearMessages()\n\t{\n\t\t$this -> m_aStorage = [];\n\t}", "function clear_cc () {\n $this->sendcc = array();\n $this->all_emails = array();\n }", "public function clear(): void\n {\n $this->messages = [];\n }", "function clearAllRecipients() {\n\t\t$this->setRecipients(array());\n\t\t$this->setCcs(array());\n\t\t$this->setBccs(array());\n\t}", "public function destroy($id)\n\t{\n\t\t$contact=DB::table('subject')->where('id', $id)->delete();;\n\t}", "public function destroy(Newsletter $newsletter)\n {\n //\n }", "public function destroy(Newsletter $newsletter)\n {\n //\n }", "public function destroy(Newsletter $newsletter)\n {\n //\n }", "public function DELETE() {\n #\n }", "public function purgeTickets()\n\t{\n\t\t$ticket_ids = $this->db->fetchAllCol(\"\n\t\t\tSELECT id FROM tickets WHERE person_id = ? AND hidden_status != 'deleted'\n\t\t\", array($this->person->getId()));\n\n\t\tif (!$ticket_ids) {\n\t\t\treturn;\n\t\t}\n\n\t\t#------------------------------\n\t\t# Insert delete logs\n\t\t#------------------------------\n\n\t\t$by_person_id = null;\n\t\tif ($this->person_context) {\n\t\t\t$by_person_id = $this->person_context->getId();\n\t\t}\n\n\t\t$date_str = date('Y-m-d H:i:s');\n\t\t$reason_str = 'User was deleted';\n\n\t\t$inserts = array();\n\n\t\tforeach ($ticket_ids as $ticket_id) {\n\t\t\t$inserts[] = array('ticket_id' => $ticket_id, 'by_person_id' => $by_person_id, 'new_ticket_id' => 0, 'date_created' => $date_str, 'reason' => $reason_str);\n\t\t}\n\n\t\t$this->db->batchInsert('tickets_deleted', $inserts);\n\n\t\t#------------------------------\n\t\t# Clear out the search tables\n\t\t#------------------------------\n\n\t\t$this->db->delete('tickets_search_active', array('person_id' => $this->person->getId()));\n\t\t$this->db->delete('tickets_search_message', array('person_id' => $this->person->getId()));\n\t\t$this->db->delete('tickets_search_message_active', array('person_id' => $this->person->getId()));\n\t\t$this->db->executeUpdate(\"DELETE FROM tickets_search_subject WHERE id IN (\" . implode(',', $ticket_ids) . \")\");\n\t}", "protected function removeRecipient()\n\t{\n\t\t$arrChannels = $this->Input->post('channels');\n\n\t\t// Check selection\n\t\tif (!is_array($arrChannels) || count($arrChannels) < 1)\n\t\t{\n\t\t\t$_SESSION['UNSUBSCRIBE_ERROR'] = $GLOBALS['TL_LANG']['ERR']['noChannels'];\n\t\t\t$this->reload();\n\t\t}\n\n\t\t// Validate e-mail address\n\t\tif (!preg_match('/^\\w+([!#\\$%&\\'\\*\\+\\-\\/=\\?^_`\\.\\{\\|\\}~]*\\w+)*@\\w+([_\\.-]*\\w+)*\\.[a-z]{2,6}$/i', $this->Input->post('email', true)))\n\t\t{\n\t\t\t$_SESSION['UNSUBSCRIBE_ERROR'] = $GLOBALS['TL_LANG']['ERR']['email'];\n\t\t\t$this->reload();\n\t\t}\n\n\t\t$arrSubscriptions = array();\n\n\t\t// Get active subscriptions\n\t\t$objSubscription = $this->Database->prepare(\"SELECT pid FROM tl_newsletter_recipients WHERE email=? AND active=?\")\n\t\t\t\t\t\t\t\t\t\t ->execute($this->Input->post('email', true), 1);\n\n\t\tif ($objSubscription->numRows)\n\t\t{\n\t\t\t$arrSubscriptions = $objSubscription->fetchEach('pid');\n\t\t}\n\n\t\t$arrRemove = array_intersect($arrChannels, $arrSubscriptions);\n\n\t\t// Return if there are no subscriptions to remove\n\t\tif (!is_array($arrRemove) || count($arrRemove) < 1)\n\t\t{\n\t\t\t$_SESSION['UNSUBSCRIBE_ERROR'] = $GLOBALS['TL_LANG']['ERR']['unsubscribed'];\n\t\t\t$this->reload();\n\t\t}\n\n\t\t// Remove subscriptions\n\t\t$this->Database->prepare(\"DELETE FROM tl_newsletter_recipients WHERE email=? AND pid IN(\" . implode(',', $arrRemove) . \")\")\n\t\t\t\t\t ->execute($this->Input->post('email', true));\n\t\t\t\t\t \n\t\t// Remove member\n\t\t$arrRetain = array_diff($arrSubscriptions, $arrChannels);\n\t\tif (count($arrRetain))\n\t\t{\n\t\t\t$this->Database->prepare(\"UPDATE tl_member SET newsletter=? WHERE email=?\")->execute(serialize($arrRetain), $this->Input->post('email'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Delete only if member groups match\n\t\t\t$this->Database->prepare(\"DELETE FROM tl_member WHERE email=? AND groups=?\")->execute($this->Input->post('email'), $this->reg_groups);\n\t\t}\n\n\t\t// Confirmation e-mail\n\t\t$objEmail = new Email();\n\n\t\t// Get channels\n\t\t$objChannel = $this->Database->execute(\"SELECT title FROM tl_newsletter_channel WHERE id IN(\" . implode(',', $arrChannels) . \")\");\n\t\t\n\t\t// HOOK: post unsubscribe callback\n\t\tif (isset($GLOBALS['TL_HOOKS']['removeRecipient']) && is_array($GLOBALS['TL_HOOKS']['removeRecipient']))\n\t\t{\n\t\t\tforeach ($GLOBALS['TL_HOOKS']['removeRecipient'] as $callback)\n\t\t\t{\n\t\t\t\t$this->import($callback[0]);\n\t\t\t\t$this->$callback[0]->$callback[1]($this->Input->post('email', true), $arrRemove, $objChannel->fetchEach('title'));\n\t\t\t}\n\t\t}\n\n\t\t$strText = str_replace('##domain##', $this->Environment->host, $this->nl_unsubscribe);\n\t\t$strText = str_replace(array('##channel##', '##channels##'), implode(\"\\n\", $objChannel->fetchEach('title')), $strText);\n\n\t\t$objEmail->from = $GLOBALS['TL_ADMIN_EMAIL'];\n\t\t$objEmail->subject = sprintf($GLOBALS['TL_LANG']['MSC']['nl_subject'], $this->Environment->host);\n\t\t$objEmail->text = $strText;\n\n\t\t$objEmail->sendTo($this->Input->post('email', true));\n\t\tglobal $objPage;\n\n\t\t// Redirect to jumpTo page\n\t\tif (strlen($this->jumpTo) && $this->jumpTo != $objPage->id)\n\t\t{\n\t\t\t$objNextPage = $this->Database->prepare(\"SELECT id, alias FROM tl_page WHERE id=?\")\n\t\t\t\t\t\t\t\t\t\t ->limit(1)\n\t\t\t\t\t\t\t\t\t\t ->execute($this->jumpTo);\n\n\t\t\tif ($objNextPage->numRows)\n\t\t\t{\n\t\t\t\t$this->redirect($this->generateFrontendUrl($objNextPage->fetchAssoc()));\n\t\t\t}\n\t\t}\n\n\t\t$_SESSION['UNSUBSCRIBE_CONFIRM'] = $GLOBALS['TL_LANG']['MSC']['nl_removed'];\n\t\t$this->reload();\n\t}", "function delete($email) {\n return $this->delete_request($this->_subscribers_base_route.'.json?email='.urlencode($email));\n }", "function removeSubscriber($smsMessage) {\n\t\t$country = $smsMessage->getCountry();\n\t\tif ($this->service == null) {\n\t\t\t$this->sendResponse($smsMessage, \"Unknown Service. Please check and try again.\");\n\t\t}\n\n\t\tswitch ($this->isSubscribed($smsMessage->getOriginator(), $this->service[\"Keyword\"])) {\t\n\t\t\tcase \"Awaiting Confirmation\":\n\t\t\tcase \"Subscribed\":\n\t\t\t\t$number = $smsMessage->getOriginator();\n\t\t\t\t$message = \"You have now been unsubscribed from \" .\t$this->service[\"Description\"];\n\t\t\t\t$sql = \"DELETE FROM \\\"Subscriptions\\\" WHERE \\\"Number\\\" = '$number'\";\n\t\t\t\tpg_query($this->dbConnection,$sql);\n\t\t\t\t$this->sendResponse($smsMessage, $message);\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$message = \"You are not subscribed to \" . $this->service[\"Description\"] . \".\";\n\t\t\t\t$this->sendResponse($smsMessage, $message);\n\t\t\tbreak;\n\t\t}\n\t\n\t}", "public function destroy(Request $request)\n {\n $email = $request->email;\n $newsletter = NewsLetter::where('email', '=', $email)->firstOrFail();\n $newsletter->delete();\n \n }" ]
[ "0.78684413", "0.7143973", "0.6965729", "0.6713598", "0.6678256", "0.6671317", "0.6530665", "0.64878887", "0.64183944", "0.6385615", "0.6384603", "0.6373077", "0.63399434", "0.6316889", "0.6304023", "0.6222982", "0.6211773", "0.6210456", "0.6195898", "0.6153217", "0.61155623", "0.6100385", "0.609288", "0.60819834", "0.60815907", "0.607068", "0.605431", "0.6048576", "0.60483265", "0.6043458", "0.6029176", "0.6021925", "0.6020732", "0.60150033", "0.6005337", "0.6005337", "0.6005337", "0.5989075", "0.5987618", "0.59765226", "0.5973636", "0.5970577", "0.5965836", "0.59576184", "0.5951983", "0.593384", "0.5918529", "0.5891502", "0.58899975", "0.58614486", "0.5859866", "0.5858121", "0.5852157", "0.581802", "0.5808091", "0.5803346", "0.579572", "0.5784292", "0.5779569", "0.57591385", "0.575812", "0.5750571", "0.5747124", "0.5741884", "0.57387793", "0.57298166", "0.57254595", "0.5724456", "0.5718107", "0.569896", "0.569896", "0.569896", "0.56943005", "0.56900316", "0.56798434", "0.5679357", "0.5679322", "0.5677432", "0.56702596", "0.56685174", "0.5668339", "0.5668339", "0.56677985", "0.56667715", "0.566624", "0.56593525", "0.5649877", "0.5647815", "0.564566", "0.5638452", "0.5628439", "0.56277", "0.5624957", "0.5624957", "0.5624957", "0.56152236", "0.5608646", "0.56058675", "0.56014353", "0.55996895", "0.5591012" ]
0.0
-1
Notify an action happened on a resource
public function notify( $resourceType, $resourceId, $action, $data = [], $level = null, $doExcludeCurrent = true ) { return $this ->notifyChannel( $this->getChanIdList($resourceType, $resourceId), $resourceType, $resourceId, $action, $data, $level, $doExcludeCurrent ) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function on($resource);", "public function activityNotify();", "public function notify() {}", "public function notify() {}", "public function notify() {}", "function notify();", "public function notify($instance);", "public function eventMethod1()\n {\n // some code here...\n\n $this->notify(\"action1\");\n }", "public function callback(ResourceInterface $resource)\n : void\n {\n $this->getChannel($resource)->callback();\n }", "public function NotifyAction()\n {\n $rma = Mage::getModel('ProductReturn/Rma')->load($this->getRequest()->getParam('rma_id'));\n\n try {\n\n\n if (!Mage::helper('ProductReturn/Returnlabel')->isExists($rma))\n throw new Exception($this->__('No return label found'));\n\n Mage::helper('ProductReturn/Returnlabel')->notifyLabel($rma);\n\n Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Customer successfully notified.'));\n } catch (Exception $ex) {\n Mage::getSingleton('adminhtml/session')->addError($this->__('Unable to notify customer') . ' : ' . $ex->getMessage());\n }\n\n $this->_redirect('ProductReturn/Admin/Edit', array('rma_id' => $rma->getId()));\n }", "public function notification();", "public function notification();", "public function notify()\n {\n // @TODO: Needs to handle the various types of bounces: References, Recommendations, and general bounces that should be purged\n }", "public function notify()\n\t\t{\n\t\t\techo \"Notifying via YM\\n\";\n\t\t}", "public function send() {\r\n\t\t$this->resource->send();\r\n\t}", "public function notify(string $event, $data) : int ;", "public function setResource($resource);", "public function notify() : bool{}", "public function onAdministrate(CustomActionResourceEvent $event) {\n $mediaResource = $event->getResource();\n $route = $this->container\n ->get('router')\n ->generate('innova_media_resource_administrate', array(\n 'id' => $mediaResource->getId(),\n 'workspaceId' => $mediaResource->getWorkspace()->getId()\n )\n );\n $event->setResponse(new RedirectResponse($route));\n $event->stopPropagation();\n }", "public function didInvokeAction(string $action, ControllerResultInterface $result): void;", "public function take_action()\n {\n }", "public function take_action()\n {\n }", "private function notify($event_key, array $action)\n {\n /*\n $this->container->get('ftfs_notification.notifier.event_registration_notifier')\n ->register($event_key, $current_user, $action);\n */\n $actor = $this->container->get('security.context')->getToken()->getUser();\n $this->container->get('ftfs_notification.event_notifier')\n ->notify($event_key, $actor, $action);\n }", "function notify() {\n if ($this->active_invoice->isLoaded()) {\n if ($this->active_invoice->canResendEmail($this->logged_user)) {\n $company = $this->active_invoice->getCompany();\n if(!($company instanceof Company)) {\n $this->response->operationFailed();\n } // if\n \n $issue_data = $this->request->post('issue', array(\n 'issued_on' => $this->active_invoice->getIssuedOn(),\n 'due_on' => $this->active_invoice->getDueOn(),\n 'issued_to_id' => $this->active_invoice->getIssuedToId()\n ));\n \n $this->response->assign('issue_data', $issue_data);\n \n if ($this->request->isSubmitted()) {\n try {\n if($this->active_invoice->isIssued()) {\n $this->active_invoice->setDueOn($issue_data['due_on']);\n } // if\n \n $resend_to = isset($issue_data['user_id']) && $issue_data['user_id'] ? Users::findById($issue_data['user_id']) : null;\n \n if($issue_data['send_emails'] && $resend_to instanceof IUser) {\n $this->active_invoice->setIssuedTo($resend_to);\n \n $recipients = array($resend_to);\n\n AngieApplication::notifications()\n ->notifyAbout('invoicing/invoice_reminder', $this->active_invoice)\n ->sendToUsers($recipients, true);\n } // if\n \n $this->active_invoice->save();\n \n $this->response->respondWithData($this->active_invoice, array(\n 'detailed' => true, \n \t'as' => 'invoice'\n ));\n \t} catch (Exception $e) {\n \t DB::rollback('Failed to resend email @ ' . __CLASS__);\n \t $this->response->exception($e);\n \t} // try\n } // if\n } else {\n $this->response->forbidden();\n } // if\n } else {\n $this->response->notFound();\n } // if\n }", "public function notificationsAction()\n {\n $callback = function ($msg) {\n //check the db before running anything\n if (!$this->isDbConnected('db')) {\n return ;\n }\n\n if ($this->di->has('dblocal')) {\n if (!$this->isDbConnected('dblocal')) {\n return ;\n }\n }\n\n //we get the data from our event trigger and unserialize\n $notification = unserialize($msg->body);\n\n //overwrite the user who is running this process\n if ($notification['from'] instanceof Users) {\n $this->di->setShared('userData', $notification['from']);\n }\n\n if (!$notification['to'] instanceof Users) {\n echo 'Attribute TO has to be a User' . PHP_EOL;\n return;\n }\n\n if (!class_exists($notification['notification'])) {\n echo 'Attribute notification has to be a Notificatoin' . PHP_EOL;\n return;\n }\n $notificationClass = $notification['notification'];\n\n if (!$notification['entity'] instanceof Model) {\n echo 'Attribute entity has to be a Model' . PHP_EOL;\n return;\n }\n\n $user = $notification['to'];\n\n //instance notification and pass the entity\n $notification = new $notification['notification']($notification['entity']);\n //disable the queue so we process it now\n $notification->disableQueue();\n\n //run notify for the specifiy user\n $user->notify($notification);\n\n $this->log->info(\n \"Notification ({$notificationClass}) sent to {$user->email} - Process ID \" . $msg->delivery_info['consumer_tag']\n );\n };\n\n Queue::process(QUEUE::NOTIFICATIONS, $callback);\n }", "public function reactivateResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->reactivateResource($id);\n $this->_f3->reroute('/Admin');\n }", "public function willInvokeAction(string $action): void;", "public function isUpdateResource();", "public function notify($type): void {\n\t\tif (!$this->notify_user) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tswitch ($type) {\n\t\t\tcase 'replace':\n\t\t\t\telgg_register_success_message(elgg_echo('tag_tools:rule:notify:replace', [$this->from_tag, $this->to_tag]));\n\t\t\t\tbreak;\n\t\t\tcase 'delete':\n\t\t\t\telgg_register_success_message(elgg_echo('tag_tools:rule:notify:delete', [$this->from_tag]));\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function registerResource($id, $resource);", "abstract public function resource($resource);", "public function notify(ParameterBag $params);", "public function notify()\n {\n $eventName = $this->getEventName();\n if (empty($this->observers[$eventName])) {\n $observerNames = Model::factory('Observer')->getByEventName($eventName);\n foreach ($observerNames as $observerName) {\n $this->observers[$eventName][] = new $observerName();\n }\n }\n if (!empty($this->observers[$eventName])) {\n foreach ($this->observers[$eventName] as $observer) {\n $observer->update($this);\n }\n }\n }", "public function notifyOne() : bool{}", "public function setResource($resource) {\n\n $this->resource = $resource;\n }", "public function check(Resource $resource);", "public function notify() {\n $this->observers->rewind();\n while($this->observers->valid()) {\n $object = $this->observers->current();\n // dump($object);die;\n $object->update($this);\n $this->observers->next();\n }\n }", "public function updateStream($resource);", "protected function updateAction()\n {\n }", "public function invoke($action);", "public function notify()\n\t{\n\t\tforeach ($this->observers as $obs)\n\t\t{\n\t\t\t$obs->update($this);\n\t\t}\n\t}", "public function notify()\n {\n foreach ($this->storage as $obs){\n $obs->update($this);\n }\n }", "protected abstract function sendResource(Response $response);", "function notifyServer($type);", "public function notification(int $id, array $attributes): ResponseInterface;", "public function runNotifications():void;", "public function _doAction();", "public function handle(ResourceAbstract $resource)\n {\n }", "function notify($event)\n {\n return;\n }", "private function activateResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->activateResource($resource);\n $this->validateActivatedResource($blueprint, $resource);\n }", "public function activate_resource($resource_id, $page)\n\t{\n\t\tif($this->resource_model->activate_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been activated');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be activated');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "function setNotify($notify) {\r\r\n\t\t$this->notify = $notify;\r\r\n\t}", "public function update( \\Aimeos\\MW\\Observer\\Publisher\\Iface $p, $action, $value = null );", "public function register_notifications();", "public function getVersion($resource) {}", "public function updateAction()\n {\n }", "public function resource($actions, $resource, $model)\n {\n \n //Create a new Resource.\n $instance = $this->resourceFactory->__invoke($actions, $model);\n \n //Attach the resource to the router.\n $this->router->attach('rest.resource.'.$resource, \"{$this->routePrefix}/$resource\", $instance);\n \n //Return it for further manipulation.\n return $instance;\n \n }", "public function sendAction() {\n\t\t$this->certificateAction(TRUE);\n\t\t$this->groupAction(TRUE);\n\t\t$this->statAction(TRUE);\n\t}", "public function notify(string $type, \\Phalcon\\Mvc\\ModelInterface $model)\n {\n }", "public function notify() {\n\t\tforeach($this->_observers as $key => $val) {\n\t\t\t$val->update($this);\n\t\t}\n\t}", "public function testNotify() {\n $sText = md5(time());\n $this->assertInstanceOf('\\notifyy\\AbstractAdapter', $this->_object->notify(\n \\notifyy\\Notifyable::SUCCESS,\n $sText\n ));\n\n $this->expectOutputRegex(sprintf('/%s/', $sText));\n }", "public function trigger($data);", "public function controllerActionPredispatch($observer)\n {\n // Run the feed\n Mage::getModel('googleplusone/feed')->updateIfAllowed();\n }", "public function answerRegistryRequest($name, $resource)\n {\n $this->$name = $resource;\n\n return true;\n }", "public function notify()\r\n {\r\n foreach( $this->observers as $observer )\r\n $observer->update( $this );\r\n\r\n }", "public function _update()\n\t {\n\t \t$this->notifyObservers(__FUNCTION__);\n\t }", "public function notify($instance)\n {\n app(Dispatcher::class)->send($this, $instance);\n }", "protected function executeAction() {}", "protected function executeAction() {}", "protected function executeAction() {}", "protected function executeAction() {}", "abstract function fire($action, $args);", "protected function _handleNotifications(Kronolith_Event $event, $action)\n {\n Kronolith::sendNotification($event, $action);\n }", "public function invalidateAction()\n {\n\n }", "public function notifyPayment()\n {\n }", "public function notify($event, $subject = null, $params = array());", "abstract protected function manage(LockableInterface $resource);", "public function actionRemovenotifycount()\n\t{\n\t\t$time=new CTimestamp;\n\t\t$value=$time->getDate();\n\t\t$uid = Yii::app()->user->id;\n\t\tUsers::model()->updateNotificationDate($uid,$value[0]);\n\t\tYii::app()->user->setState(\"notify_readdate\",$value[0]);\n\t\tYii::app()->user->setState(\"notify_count\",'');\n\t\techo CJSON::encode(array(\n\t\t\t 'status'=>'success',\n\t\t\t 'values'=>''\n\t\t));\n\t\tYii::app()->end();\n\t}", "public function edit(Resource $resource)\n {\n //\n }", "public function setsubscribableAction()\n {\n \n }", "public static function action_note() {\n\t\t// Make sure that both plugins are active before actioning the note.\n\t\t$active_plugin_slugs = PluginsHelper::get_active_plugin_slugs();\n\t\t$jp_active = in_array( 'jetpack', $active_plugin_slugs, true );\n\t\t$wcs_active = in_array( 'woocommerce-services', $active_plugin_slugs, true );\n\n\t\tif ( ! $jp_active || ! $wcs_active ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Action any notes with a matching name.\n\t\t$data_store = \\WC_Data_Store::load( 'admin-note' );\n\t\t$note_ids = $data_store->get_notes_with_name( self::NOTE_NAME );\n\n\t\tforeach ( $note_ids as $note_id ) {\n\t\t\t$note = Notes::get_note( $note_id );\n\n\t\t\tif ( $note ) {\n\t\t\t\t$note->set_status( Note::E_WC_ADMIN_NOTE_ACTIONED );\n\t\t\t\t$note->save();\n\t\t\t}\n\t\t}\n\t}", "public function userupdatesuccessAction()\n {\n }", "public function onActionNotFound() {\n if ( method_exists( $this->controller, \"onActionNotFound\" ) ) {\n $this->controller->onActionNotFound();\n } else {\n $closure = $this->onActionNotFound;\n if ( is_object( $closure ) && get_class( $closure ) == \"Closure\" ) {\n $closure();\n }\n }\n }", "public function inform() {\n $this->deliveryType(DELIVERY_TYPE_BOOL);\n $this->deliveryMethod(DELIVERY_METHOD_JSON);\n\n // Retrieve all notifications and inform them.\n NotificationsController::informNotifications($this);\n $this->fireEvent('BeforeInformNotifications');\n\n $this->render();\n }", "public function refreshActionLookups()\n {\n //\n }", "public function handleEvent(string $controllerAction, object $message): void;", "function notify()\n {\n foreach ($this->observers as $observer) {\n $observer->update($this);\n }\n }", "public function vote($object, $action);", "public function isAssigned($resource);", "public function broadcastOn();", "public function broadcastOn();", "function sendEvent( $event )\n {\n Event_Manager::notify( $event );\n }", "public function action(Action $action);", "function notify()\n {\n foreach ($this->observers as $obKey => $obValue) {\n $obValue->update($this);\n }\n }", "public function notify($type, \\Phalcon\\Mvc\\CollectionInterface $model){ }", "function notify($event) {\r\n\t\tif ( count($this->_listeners) > 0 ) {\r\n\t\t\tif ( false ) $listener = new ftpClientObserver();\r\n\t\t\tforeach ( $this->_listeners as $id => $listener ) {\r\n\t\t\t\t$listener->notify($event);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function markresolvedAction() {\r\n \r\n \t$log_id = $_POST['log_id'];print_r();\r\n \t$this->jobs->resolve($log_id);\r\n \t$data = array();\r\n \t$data['status'] = \"success\";\r\n \t$data['message'] = \"Alert resolved successfully.\";\r\n \techo json_encode($data);\r\n \tdie;\r\n }", "public function act() {\n\t}", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function notifyChannel(\n $chanId,\n $resourceType,\n $resourceId,\n $action,\n $data = [],\n $level = null,\n $doExcludeCurrent = true\n ) {\n if (null === $level) {\n $level = NotificationInterface::LEVEL_INFO;\n }\n\n $chanIdList = Misc::toIterable($chanId);\n\n $data = ['data' => $data];\n $data['id'] = Misc::toArray($resourceId);\n $type = $resourceType . ':' . $action;\n\n try {\n $exclude = [];\n\n if ($doExcludeCurrent && $this->currentSubscribers) {\n foreach ($this->currentSubscribers as $name) {\n // Using getSubscriptionIds() will avoid an odd number of\n // backend queries (at least for SQL backend). I do hope\n // that our current subscriber does not have thousands...\n $exclude = array_merge(\n $exclude,\n $this->backend->getSubscriber($name)->getSubscriptionsIds()\n );\n }\n }\n\n $this->prepareNotification($type, $data, $level);\n\n // Channels are not automatically created\n // TODO Find a better a way, to filter out non-existing channels\n $this->backend->createChannels($chanIdList, true);\n\n $this->backend->send($chanIdList, $data, $type, null, $level, $exclude);\n\n } catch (ChannelDoesNotExistException $e) {\n // Nothing to do, no channel means no subscription\n } catch (Exception $e) {\n // Any other exception must be shutdown when in production mode\n if (!$this->silentMode) {\n throw $e;\n }\n }\n }" ]
[ "0.6633664", "0.646473", "0.62180316", "0.62180316", "0.62180316", "0.60472614", "0.5987602", "0.58293796", "0.57437634", "0.57328594", "0.5611502", "0.5611502", "0.5479141", "0.54410875", "0.5383758", "0.5361154", "0.53425926", "0.53246677", "0.5312561", "0.52792335", "0.52631015", "0.52631015", "0.52067333", "0.519816", "0.5190759", "0.51283556", "0.5122671", "0.5100662", "0.50814706", "0.50733554", "0.5067841", "0.504291", "0.5019744", "0.50191647", "0.5002673", "0.5001465", "0.49970457", "0.4996298", "0.4993895", "0.49906707", "0.49771053", "0.4974943", "0.49678946", "0.49539807", "0.4953128", "0.49487594", "0.4943981", "0.4940031", "0.4936758", "0.4932538", "0.49308303", "0.4923247", "0.4905747", "0.49053138", "0.4904883", "0.4903691", "0.48758623", "0.48725882", "0.48637414", "0.48552915", "0.4848423", "0.48480663", "0.4848064", "0.48434496", "0.48432094", "0.48363212", "0.48295993", "0.48225144", "0.48225144", "0.48225144", "0.4822076", "0.48186222", "0.48154455", "0.4806896", "0.48051736", "0.4797787", "0.47931588", "0.4786008", "0.47801444", "0.47792053", "0.47685522", "0.4753328", "0.4753254", "0.47517538", "0.47456437", "0.47403726", "0.47398588", "0.47261837", "0.47246137", "0.47182044", "0.47182044", "0.47147065", "0.47105038", "0.4709979", "0.47091508", "0.4708325", "0.47082657", "0.47018367", "0.47004706", "0.4699817" ]
0.5750485
8
Notify an action happened on a resource in an arbitrary channel
public function notifyChannel( $chanId, $resourceType, $resourceId, $action, $data = [], $level = null, $doExcludeCurrent = true ) { if (null === $level) { $level = NotificationInterface::LEVEL_INFO; } $chanIdList = Misc::toIterable($chanId); $data = ['data' => $data]; $data['id'] = Misc::toArray($resourceId); $type = $resourceType . ':' . $action; try { $exclude = []; if ($doExcludeCurrent && $this->currentSubscribers) { foreach ($this->currentSubscribers as $name) { // Using getSubscriptionIds() will avoid an odd number of // backend queries (at least for SQL backend). I do hope // that our current subscriber does not have thousands... $exclude = array_merge( $exclude, $this->backend->getSubscriber($name)->getSubscriptionsIds() ); } } $this->prepareNotification($type, $data, $level); // Channels are not automatically created // TODO Find a better a way, to filter out non-existing channels $this->backend->createChannels($chanIdList, true); $this->backend->send($chanIdList, $data, $type, null, $level, $exclude); } catch (ChannelDoesNotExistException $e) { // Nothing to do, no channel means no subscription } catch (Exception $e) { // Any other exception must be shutdown when in production mode if (!$this->silentMode) { throw $e; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function onChannel($channel);", "public function notify(\n $resourceType,\n $resourceId,\n $action,\n $data = [],\n $level = null,\n $doExcludeCurrent = true\n ) {\n return $this\n ->notifyChannel(\n $this->getChanIdList($resourceType, $resourceId),\n $resourceType,\n $resourceId,\n $action,\n $data,\n $level,\n $doExcludeCurrent\n )\n ;\n }", "public function notify() {}", "public function notify() {}", "public function notify() {}", "public function activityNotify();", "public function channel($channel);", "public function channel()\n {\n }", "public function callback(ResourceInterface $resource)\n : void\n {\n $this->getChannel($resource)->callback();\n }", "function notify();", "public function broadcastOn()\n {\n return new Channel('haircut');\n \t \n }", "public function broadcastOn()\n {\n return new Channel(\"votes.$this->resource_type.$this->resource_id\");\n }", "public function Status($channel, $actionId);", "function channelUpdate(ChannelInterface $new, ?ChannelInterface $old);", "public function broadcastOn()\n {\n return (new PrivateChannel('editor-notify'));\n }", "public function broadcastOn()\n {\n return new Channel('riskgenius');\n }", "public function broadcastOn()\n {\n// return new PrivateChannel('news-action');\n// return ['news-action'];\n return new Channel('news-action.');\n }", "public function notify($instance);", "public function getChannel();", "public function notify($identifier, $context, $data = [], $channel = null)\n {\n // okay, lets find any notification set up with this identifier\n if ($notifications = SystemNotification::get()->filter('Identifier', $identifier)) {\n foreach ($notifications as $notification) {\n if ($notification->NotifyOnClass) {\n $subclasses = ClassInfo::subclassesFor($notification->NotifyOnClass);\n if (!isset($subclasses[strtolower(get_class($context))])) {\n continue;\n }\n }\n\n // figure out the channels to send the notification on\n $channels = $channel ? [$channel] : [];\n if ($notification->Channels) {\n $channels = json_decode($notification->Channels);\n }\n\n $this->sendNotification($notification, $context, $data, $channels);\n }\n }\n }", "public function ChangeMonitor($channel, $file);", "public function notify(string $event, $data) : int ;", "public function on($resource);", "private function notify($event_key, array $action)\n {\n /*\n $this->container->get('ftfs_notification.notifier.event_registration_notifier')\n ->register($event_key, $current_user, $action);\n */\n $actor = $this->container->get('security.context')->getToken()->getUser();\n $this->container->get('ftfs_notification.event_notifier')\n ->notify($event_key, $actor, $action);\n }", "function ts3client_flushChannelUpdates($serverConnectionHandlerID, $channelID) {}", "public function testChannelsReplies()\n {\n }", "public function updated(Channel $channel)\n {\n //\n }", "public function notify() : bool{}", "function notify_new_income() {\n $message = new Message;\n $message\n ->setTitle('新的存款通知')\n ->setMessage('您有一笔新的收入,请查照')\n ->setUrl('/depositing_siteapi_audit.php')\n ->setDelay(5000); //顯示1sec後dismiss 不設則不會消失\n\n // get channel\n $channel = get_message_channel(\n 'backstage', // platform = [front|backstage]\n 'test' // channel\n );\n\n// send message\n mqtt_send(\n $channel,\n $message\n );\n}", "public function broadcastOn()\n {\n return new Channel('chess');\n }", "public function eventMethod1()\n {\n // some code here...\n\n $this->notify(\"action1\");\n }", "public function notify($event, $subject = null, $params = array());", "public function channel($id_or_name, $synced_at = null);", "public function broadcastOn()\n {\n// return new PrivateChannel('channel-name');\n }", "public function broadcastOn()\n {\n// return new PrivateChannel('channel-name');\n }", "public function broadcastOn()\n {\n return new Channel('my-channel');\n }", "public function publish($channel, $message);", "public function notifyNow($instance, array $channels = null)\n {\n app(Dispatcher::class)->sendNow($this, $instance, $channels);\n }", "public function onChannel($pattern, $callback)\n {\n $handler = new EventListener($pattern, $callback);\n $this->dispatcher->addListener('message.channel', array($handler, 'testAndExecute'));\n }", "public function broadcastOn() {\n// return new PrivateChannel('channel-name');\n }", "public function broadcastOn()\n {\n return ['my-channel'];\n }", "public function broadcastOn()\n {\n //return new PrivateChannel('channel-name');\n }", "public function broadcastOn()\n {\n //return new PrivateChannel('channel-name');\n }", "public function broadcastOn()\n {\n //return new PrivateChannel('channel-name');\n }", "public function broadcastOn()\n {\n //return new PrivateChannel('channel-name');\n }", "private function dispatchNotifications() {\n $this->channels->each(function($channel) {\n $notifiable = new AnonymousNotifiable();\n $notifiable->route($channel->type, $channel->endpoint);\n DispatchNotification::dispatch($notifiable, $this->notification);\n });\n }", "function notifyServer($type);", "public function broadcastOn()\n {\n return new Channel('test');\n }", "public function notificationsAction()\n {\n $callback = function ($msg) {\n //check the db before running anything\n if (!$this->isDbConnected('db')) {\n return ;\n }\n\n if ($this->di->has('dblocal')) {\n if (!$this->isDbConnected('dblocal')) {\n return ;\n }\n }\n\n //we get the data from our event trigger and unserialize\n $notification = unserialize($msg->body);\n\n //overwrite the user who is running this process\n if ($notification['from'] instanceof Users) {\n $this->di->setShared('userData', $notification['from']);\n }\n\n if (!$notification['to'] instanceof Users) {\n echo 'Attribute TO has to be a User' . PHP_EOL;\n return;\n }\n\n if (!class_exists($notification['notification'])) {\n echo 'Attribute notification has to be a Notificatoin' . PHP_EOL;\n return;\n }\n $notificationClass = $notification['notification'];\n\n if (!$notification['entity'] instanceof Model) {\n echo 'Attribute entity has to be a Model' . PHP_EOL;\n return;\n }\n\n $user = $notification['to'];\n\n //instance notification and pass the entity\n $notification = new $notification['notification']($notification['entity']);\n //disable the queue so we process it now\n $notification->disableQueue();\n\n //run notify for the specifiy user\n $user->notify($notification);\n\n $this->log->info(\n \"Notification ({$notificationClass}) sent to {$user->email} - Process ID \" . $msg->delivery_info['consumer_tag']\n );\n };\n\n Queue::process(QUEUE::NOTIFICATIONS, $callback);\n }", "function channelCreate(ChannelInterface $channel);", "private function notifyBySocket($channelId)\n {\n $this->client->request('POST', 'flare/' . $channelId);\n }", "public function broadcastOn();", "public function broadcastOn();", "public function broadcastOn()\n {\n return new PrivateChannel('rt-sensor');\n }", "public function run(Channel $channel, Cancellation $cancellation): mixed;", "public abstract function sendNotification($notification);", "public function notification();", "public function notification();", "public function broadcastOn()\n {\n return new Channel('new-idea');\n }", "public function Monitor($channel, $file, $format, $mix);", "public function pushDiscordNotify( string $message, $user, string $action ) {\n\t\tglobal $wgDiscordNotificationsIncomingWebhookUrl, $wgDiscordNotificationsSendMethod;\n\n\t\tif ( defined( 'MW_PHPUNIT_TEST' ) ) {\n\t\t\tself::$lastMessage = $message;\n\t\t}\n\n\t\tif ( !in_array( $wgDiscordNotificationsSendMethod, [ 'MWHttpRequest', 'file_get_contents', 'curl' ] ) ) {\n\t\t\tself::getLogger()->warning( \"Unknown send method: $wgDiscordNotificationsSendMethod\" );\n\t\t\treturn false;\n\t\t}\n\n\t\t$hooks = $wgDiscordNotificationsIncomingWebhookUrl;\n\t\tif ( !$hooks ) {\n\t\t\tself::getLogger()->warning( '$wgDiscordNotificationsIncomingWebhookUrl is not set' );\n\t\t\treturn false;\n\t\t} elseif ( is_string( $hooks ) ) {\n\t\t\t$hooks = [ $hooks ];\n\t\t}\n\n\t\t// Users with the permission suppress notifications\n\t\tif ( $user && $user instanceof User && self::userIsExcluded( $user ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( defined( 'MW_PHPUNIT_TEST' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$post = $this->makePost( $message, $action );\n\t\tforeach ( $hooks as $hook ) {\n\t\t\tswitch ( $wgDiscordNotificationsSendMethod ) {\n\t\t\t\tcase 'MWHttpRequest':\n\t\t\t\t\treturn self::sendMWHttpRequest( $hook, $post );\n\t\t\t\tcase 'file_get_contents':\n\t\t\t\t\tself::getLogger()->warning(\n\t\t\t\t\t\t'\\'file_get_contents\\' for \\$wgDiscordNotificationsSendMethod is deprecated' );\n\t\t\t\t\t// Use file_get_contents to send the data. Note that you will need to have allow_url_fopen\n\t\t\t\t\t// enabled in php.ini for this to work.\n\t\t\t\t\tself::sendHttpRequest( $hook, $post );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'curl':\n\t\t\t\t\tself::getLogger()->warning( '\\'curl\\' for \\$wgDiscordNotificationsSendMethod is deprecated' );\n\t\t\t\t\t// Call the Discord API through cURL (default way). Note that you will need to have cURL\n\t\t\t\t\t// enabled for this to work.\n\t\t\t\t\tself::sendCurlRequest( $hook, $post );\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public function broadcastOn()\n {\n return ['whatcanido-channel'];\n }", "abstract public function act($message);", "public function notify()\n\t\t{\n\t\t\techo \"Notifying via YM\\n\";\n\t\t}", "public function subscribe($channels);", "public function notifyOne() : bool{}", "public function subscribeThread(ThreadRepositoryInterface $thread): PodiumResponse;", "public function broadcastOn()\n {\n return new Channel('doctor-notification');\n }", "public function testNotify() {\n $sText = md5(time());\n $this->assertInstanceOf('\\notifyy\\AbstractAdapter', $this->_object->notify(\n \\notifyy\\Notifyable::SUCCESS,\n $sText\n ));\n\n $this->expectOutputRegex(sprintf('/%s/', $sText));\n }", "function switchChannel($ch)\n {\n exec( $this->arfilelocation['iwpriv'] . ' '\n . escapeshellarg($this->interface) . ' set Channel='.$ch);\n }", "function notify($event) {\r\n\t\tif ( count($this->_listeners) > 0 ) {\r\n\t\t\tif ( false ) $listener = new ftpClientObserver();\r\n\t\t\tforeach ( $this->_listeners as $id => $listener ) {\r\n\t\t\t\t$listener->notify($event);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function testReceiveNewMessageNotification()\n {\n $wsNtfyChannel = self::$ctnClientAsync2->createWsNotifyChannel('new-msg-received');\n\n $data = null;\n $error = null;\n $message = null;\n $messageId = null;\n\n $wsNtfyChannel->on('error', function ($err) use (&$error) {\n // Get error and stop event loop\n $error = new Exception('Error in the underlying WebSocket connection: ' . $err);\n self::$loop->stop();\n });\n \n $wsNtfyChannel->on('close', function ($code, $reason) use (&$data, &$error) {\n if (is_null($data)) {\n // Get close reason and stop event loop\n $error = new Exception(\"WebSocket connection has been closed: [$code] $reason\");\n self::$loop->stop();\n }\n });\n \n $wsNtfyChannel->on('open', function () use (&$message, &$messageId, &$error) {\n // WebSocket notification channel successfully open and ready to send notifications.\n // Send message from device #1 to device #2\n $message = 'Test message #' . rand();\n\n try {\n // Save message and save returned message ID\n $messageId = self::$ctnClient1->sendMessage($message, self::$device2)->messageId;\n } catch (Exception $ex) {\n // Get error and stop event loop\n $error = $ex;\n self::$loop->stop();\n }\n });\n \n $wsNtfyChannel->on('notify', function ($retVal) use (&$data, &$wsNtfyChannel, &$messageId) {\n if (!is_null($messageId)) {\n // Notification received. Get returned data, close notification channel, and stop event loop\n $data = $retVal;\n $wsNtfyChannel->close();\n self::$loop->stop();\n }\n });\n \n $wsNtfyChannel->open()->then(\n function () {\n // WebSocket client successfully connected. Wait for open event\n },\n function (\\Catenis\\Exception\\WsNotificationException $ex) use (&$error) {\n // Get error and stop event loop\n $error = $ex;\n self::$loop->stop();\n }\n );\n\n // Start event loop\n self::$loop->run();\n\n // Process result\n if (!is_null($data)) {\n $this->assertEquals($data->messageId, $messageId);\n\n return [\n 'message' => $message,\n 'messageId' => $messageId\n ];\n } else {\n throw $error;\n }\n }", "public static function subscribe($channel)\n {\n return parent::subscribe($channel);\n }", "public function broadcastOn(): Channel\n {\n return new Channel('board-votes.' . $this->vote->board_id);\n }", "public function notify()\n {\n // @TODO: Needs to handle the various types of bounces: References, Recommendations, and general bounces that should be purged\n }", "abstract public function getChannel($additionalInformation);", "function channel(): Channel\n {\n return new Channel();\n }", "public function broadcastOn()\n {\n return new Channel('cancel');\n }", "public function broadcastOn()\n {\n // Have no idea about this\n // return new PrivateChannel('channel-name');\n }", "public function send(NotificationInterface $notification);", "function notifyOnSlack($message)\n{\n $notifyToChannel = array(\n 'channel' => SLACK_CHANNEL,\n 'text' => $message\n );\n $payload = \"payload=\" . json_encode($notifyToChannel);\n \n $ch = curl_init();\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_URL, SLACK_WEBHOOK_URL);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);\n curl_exec($ch);\n curl_close($ch);\n}", "public function broadcastOn()\n {\n return new Channel('notification_user');\n }", "function channelDelete(ChannelInterface $channel);", "public function broadcastOn()\n {\n return new Channel('user'.$this->user->id);\n }", "function ts3client_requestClientKickFromChannel($serverConnectionHandlerID, $clientID, $kickReason) {}", "function messageUpdateRaw(TextChannelInterface $channel, array $data);", "public function broadcastOn()\n {\n return new Channel('notifications');\n }", "public function send() {\r\n\t\t$this->resource->send();\r\n\t}", "public function broadcastOn()\n {\n return new Channel('histopatologia.'.$this->object['serial']);\n }", "public function update( \\Aimeos\\MW\\Observer\\Publisher\\Iface $p, $action, $value = null );", "abstract function fire($action, $args);", "public function subscribes();", "public function setsubscribableAction()\n {\n \n }", "function notifyEvent( $eventType, $args )\n {\n $event = new Event( $eventType, $args );\n $this->sendEvent( $event );\n }", "public function notify(EventInterface $event)\n {\n if ($event instanceof IrcCommandEvent) {\n $server = $event->getServer();\n if (array_key_exists($server, $this->servers))\n $this->servers[$server]->execute($event->getCommand());\n }\n }", "public function notifyInteraction($user, $targetUser, $interactionCode, $item = null, array $categories = []);", "#[CustomOpenApi\\Operation(id: 'channelShow', tags: [Tags::Channel, Tags::V1])]\n #[OpenApi\\Parameters(factory: DefaultHeaderParameters::class)]\n #[CustomOpenApi\\Response(resource: ChannelResource::class, statusCode: 200)]\n public function show(Channel $channel): ChannelResource\n {\n return new ChannelResource($channel);\n }", "public function notify(ParameterBag $params);", "function rabbitMqNotify(){\n $ini_file = parse_ini_file(\"/etc/airtime/airtime.conf\", true);\n $url = \"http://localhost/api/rabbitmq-do-push/format/json/api_key/\".$ini_file[\"general\"][\"api_key\"];\n\n echo \"Contacting $url\".PHP_EOL;\n $ch = curl_init($url);\n curl_exec($ch);\n curl_close($ch); \n}", "function sendChannelMessage($message)\n\t{\n\t\t$this->sendMessage($this->channel, $message);\n\t}" ]
[ "0.6189385", "0.5805159", "0.57198465", "0.57198465", "0.57198465", "0.5704993", "0.5657994", "0.5577943", "0.5526601", "0.54631615", "0.54407775", "0.5431415", "0.5395973", "0.5395417", "0.53906596", "0.53641", "0.534757", "0.5301867", "0.5289996", "0.52534723", "0.5252467", "0.5198363", "0.5191458", "0.5190863", "0.51717335", "0.5113061", "0.5077581", "0.50454336", "0.5037573", "0.50356984", "0.50314647", "0.5024866", "0.5016263", "0.50102895", "0.50102895", "0.4974421", "0.4958345", "0.49555248", "0.4949683", "0.49471843", "0.49346292", "0.49260977", "0.49260977", "0.49260977", "0.49260977", "0.49220031", "0.49115303", "0.48929074", "0.48864478", "0.48823988", "0.48716083", "0.4869753", "0.4869753", "0.48653755", "0.48629305", "0.48399752", "0.4837228", "0.4837228", "0.48257506", "0.4824752", "0.48189968", "0.4814214", "0.48073527", "0.48042914", "0.4799583", "0.47969416", "0.47951478", "0.47739208", "0.47677636", "0.47551814", "0.47515815", "0.47514835", "0.47492775", "0.47452635", "0.47442985", "0.47406393", "0.47247386", "0.47194105", "0.47146955", "0.4711418", "0.4703225", "0.46926662", "0.46895084", "0.4687969", "0.4679236", "0.46786937", "0.4677", "0.46759647", "0.4673969", "0.46629786", "0.4650732", "0.46501106", "0.46465006", "0.4643585", "0.46347126", "0.46159634", "0.4609046", "0.46073413", "0.46035808", "0.46010908" ]
0.5949152
1
Build notification from message instance
public function getNotification(MessageInstanceInterface $message) { return new DefaultNotification($message, $this->formatterRegistry->get($message->getType())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createMessageObject(string $type, string $message): Notification\n {\n $msg = new Notification();\n\n $msg->setType($type);\n $msg->setMessage($message);\n\n $this->handler->add($msg);\n\n return $msg;\n }", "private function buildNotificationsBlock(): void\n {\n //====================================================================//\n // Notifications Block\n $notifications = array(\n \"error\" => \"This is a Sample Error Notification\",\n \"warning\" => \"This is a Sample Warning Notification\",\n \"success\" => \"This is a Sample Success Notification\",\n \"info\" => \"This is a Sample Infomation Notification\",\n );\n\n $this->blocksFactory()->addNotificationsBlock($notifications, array(\"Width\" => self::SIZE_M));\n }", "public static function create($notification){\n }", "protected function createMessage()\n {\n $message = new Message(new Swift_Message);\n\n\n // If a global from address has been specified we will set it on every message\n // instances so the developer does not have to repeat themselves every time\n // they create a new message. We will just go ahead and push the address.\n if (isset($this->from['address'])) {\n $message->from($this->from['address'], $this->from['name']);\n }\n\n return $message;\n }", "protected static function newMessage()\n {\n self::$message = \\Swift_Message::newInstance();\n }", "public function buildChangedMessage() {\n\t\t\tvar_dump(array_diff($this->data, $this->original_data));\n\t\t\t$message = array();\n\t\t\t$this->changed_message = implode(' ', $message);\n\t\t}", "function createMessage($object) {\n\tglobal $USER;\n\t\n\t$message = new \\core\\message\\message();\n\t$message->component = 'local_littlehelpers';\n\t$message->name = 'paragraph52notification';\n\t$message->userfrom = $USER;\n\t\n\t// Get user\n\t$message->userto = core_user::get_user($object->useridto);\n\t\n\t// force email sending\n\t$message->userto->emailstop = 0;\n\t\n\t$message->subject = $object->subject;\n\t$message->fullmessage = $object->fullmessage;\n\t$message->fullmessageformat = FORMAT_MARKDOWN;\n\t$message->fullmessagehtml = $object->fullmessagehtml;\n\t$message->smallmessage = $object->smallmessage;\n\t$message->notification = '0';\n\t\n\t$message->contexturl = 'https://moodle.tu-darmstadt.de/local/littlehelpers/paragraph52';\n\t$message->contexturlname = 'Paragraph52';\n\t$message->replyto = \"[email protected]\";\n\n\treturn $message;\n}", "public function initMessage() {}", "public function __construct($new_postNotification)\n {\n //\n $this->postNotification = $new_postNotification;\n\n }", "function model_prepare_notification($hook, $type, $notification, $params) {\n\t$entity = $params['event']->getObject();\n\t$owner = $params['event']->getActor();\n\t$recipient = $params['recipient'];\n\t$language = $params['language'];\n\t$method = $params['method'];\n\n\t$notification->subject = elgg_echo('model:notify:subject', array($entity->title), $language);\n\t$notification->body = elgg_echo('model:notify:body', array(\n\t\t$owner->name,\n\t\t$entity->title,\n\t\t$entity->getExcerpt(),\n\t\t$entity->getURL()\n\t), $language);\n\t$notification->summary = elgg_echo('model:notify:summary', array($entity->title), $language);\n\n\treturn $notification;\n}", "public function notificationsAction()\n {\n $callback = function ($msg) {\n //check the db before running anything\n if (!$this->isDbConnected('db')) {\n return ;\n }\n\n if ($this->di->has('dblocal')) {\n if (!$this->isDbConnected('dblocal')) {\n return ;\n }\n }\n\n //we get the data from our event trigger and unserialize\n $notification = unserialize($msg->body);\n\n //overwrite the user who is running this process\n if ($notification['from'] instanceof Users) {\n $this->di->setShared('userData', $notification['from']);\n }\n\n if (!$notification['to'] instanceof Users) {\n echo 'Attribute TO has to be a User' . PHP_EOL;\n return;\n }\n\n if (!class_exists($notification['notification'])) {\n echo 'Attribute notification has to be a Notificatoin' . PHP_EOL;\n return;\n }\n $notificationClass = $notification['notification'];\n\n if (!$notification['entity'] instanceof Model) {\n echo 'Attribute entity has to be a Model' . PHP_EOL;\n return;\n }\n\n $user = $notification['to'];\n\n //instance notification and pass the entity\n $notification = new $notification['notification']($notification['entity']);\n //disable the queue so we process it now\n $notification->disableQueue();\n\n //run notify for the specifiy user\n $user->notify($notification);\n\n $this->log->info(\n \"Notification ({$notificationClass}) sent to {$user->email} - Process ID \" . $msg->delivery_info['consumer_tag']\n );\n };\n\n Queue::process(QUEUE::NOTIFICATIONS, $callback);\n }", "protected function createMessage() {\n $config = $this->messageConfig;\n if (!array_key_exists('class', $config)) {\n $config['class'] = $this->messageClass;\n }\n $config['smser'] = $this;\n return Yii::createObject($config);\n }", "public function createMessage(): MessageInterface;", "public function build_notifications($proposal_id = '', $agreement_number = '', $client_reference = '', $balance_to_finance = 0)\n {\n $this->build_notifications[] = array\n (\n 'ProposalID' => $proposal_id,\n 'AgreementNumber' => $agreement_number,\n 'ClientReference' => $client_reference,\n 'BalanceToFinance' => $balance_to_finance\n );\n }", "public function _buildNotification($encrypt=false)\n {\n $notif = Session::get('ses_notif');\n \n Session::forget('ses_notif');\n \n $mesage = view('global.notif', ['notif'=>$notif]);\n \n return $encrypt ? base64_encode($mesage) : $mesage;\n }", "public function notification();", "public function notification();", "function notify($user_id, $message)\n{\n return (new Notification([\n 'user_id' => $user_id,\n 'message' => $message\n ]))->save();\n}", "protected function create_notification_email_object()\n\t{\n\t\t$category = $this->category();\n\n\t\t$email = new Charcoal_Email;\n\t\t$email->to = $this->get_notified_email_address();\n\t\t$email->reply_to = $this->get_lead_email_address();\n\n\t\tif ( $category ) {\n\t\t\t$email->subject = $category->p('confirmation_email_subject')->text();\n\t\t\t$email->from = $category->p('confirmation_email_from')->text();\n\t\t\t$email->cc = $category->v('confirmation_email_cc');\n\t\t\t$email->bcc = $category->v('confirmation_email_bcc');\n\t\t}\n\n\t\treturn $email;\n\t}", "function wd_notification() {\n return WeDevs_Notification::init();\n}", "public function maybe_create_notification() {\n\t\tif ( ! $this->should_show_notification() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! $this->notification_center->get_notification_by_id( self::NOTIFICATION_ID ) ) {\n\t\t\t$notification = $this->notification();\n\t\t\t$this->notification_helper->restore_notification( $notification );\n\t\t\t$this->notification_center->add_notification( $notification );\n\t\t}\n\t}", "function send_push_notification($token, $msg) {\n $message = new ApnsPHP_Message($token);\n\n // Set a custom identifier. To get back this identifier use the getCustomIdentifier() method\n // over a ApnsPHP_Message object retrieved with the getErrors() message.\n //$message->setCustomIdentifier(\"Message-Badge-3\");\n\n // Set badge icon to \"3\"\n $message->setBadge(1);\n\n // Set a simple welcome text\n $message->setText($msg);\n\n // Play the default sound\n $message->setSound();\n\n // Set a custom property\n //$message->setCustomProperty('acme2', array('bang', 'whiz'));\n\n // Set another custom property\n //$message->setCustomProperty('acme3', array('bing', 'bong'));\n\n // Set the expiry value to 30 seconds\n $message->setExpiry(30);\n\n return $message;\n}", "protected function emitNotificationCreated(Notification $notification) {}", "function __construct($input) {\n \n $this->textMessage = $input['entry'][0]['messaging'][0]['message']['text'];\n $this->buttonMessage = $input['entry'][0]['messaging'][0]['postback']['payload'];\n $this->quickReplyMessage = $input['entry'][0]['messaging'][0]['message']['quick_reply']['payload'];\n $this->attachmentMessage = $input['entry'][0]['messaging'][0]['message']['attachments'][0]['type'];\n\n\n }", "public function toFCM($notifiable, FirebaseMessage $message);", "public static function notify($member) {\n $notification = Model_Notification::factory('notification');\n\n if(is_numeric($member)) {\n $notification->to = $member;\n } else if(is_object($member) && $member instanceof Model_Member) {\n $notification->to = $member->id;\n } else if(is_object($member) && $member instanceof Model_Blab) {\n\t\t\t$notification->to = $member->getCommentees();\n\t\t}\n\n\t\t$notification->from = Session::instance()->get('user_id');\n \n $notification->unread = 1;\n\n\t\t$notification->created = date('Y-m-d h:i:s');\n\n return $notification;\n }", "private function newMessage()\n {\n /* @var $config ModuleOptions */\n $config = $this->serviceLocator->get('EscoMail\\Options');\n\n $this->message = new Message();\n $this->message->setFrom($config->getMailSendFrom(), $config->getMailSendFromName());\n\n return $this->message;\n }", "public function format(NotificationInterface $notification)\n {\n parent::format($notification);\n\n /** @var DatabaseNotifiableInterface $notifiable */\n $notifiable = $notification->getNotifiable();\n if (!$notifiable instanceof DatabaseNotifiableInterface) {\n $this->createFormatterException(DatabaseNotifiableInterface::class, $this->channelName);\n }\n\n // Build the dispatch data array.\n $dispatchData = [\n 'id' => $notifiable->getIdentifier(),\n 'notifiable' => $notifiable,\n 'uuid' => $notification->getUuid(),\n 'type' => get_class($notification),\n ];\n\n $messageData = self::createMessagaData($notification->getDataArray());\n\n return self::createMessage($dispatchData, $messageData, $this->channelName);\n }", "public function create()\n {\n //\n $this->message->sendMessage();\n }", "protected function buildMessage(Message $message)\n {\n $msg = array(\n 'external_user_name' => str_replace(\" \", \"\", $message->getFrom()['name']),\n 'content' => $message->getBody()\n );\n\n $tags = $message->getTags();\n if (is_array($this->tags) && !empty($this->tags))\n $tags = array_merge($tags, $this->tags);\n\n if (!empty($tags))\n $msg['tags'] = $tags;\n\n return $msg;\n }", "public function __construct(Notification $notification)\n {\n $this->notification = $notification;\n }", "public function __construct(Notification $notification)\n {\n $this->notification = $notification;\n }", "public function __construct(Notification $notification)\n {\n $this->notification = $notification;\n }", "public function createMailMessage();", "private function createDeliveryInfoMessage() {\n\t\treturn array(\n\t\t\tChatMessagesDao::COLUMN_TEXT => self::DELIVERY_MESSAGE,\n\t\t\tChatMessagesDao::COLUMN_TYPE => ChatMessagesDao::TYPE_INFO_MESSAGE\n\t\t);\n\t}", "public function getMessage()\n {\n $lastMsg = $this->getUpdates();\n if(count($lastMsg))\n {\n $lastMsg = $lastMsg[count($lastMsg) - 1];\n $this->currentChat = $lastMsg['message']['chat']['id'];\n $this->currentMsg = $lastMsg['message'];\n $this->currentMsgId = $lastMsg['message']['message_id'];\n $this->currentUser = $lastMsg['message']['from']['id'];\n $this->messageType = (isset($lastMsg['message']['contact'])) ? 'register' : 'text';\n $this->setLastUpdate($lastMsg['update_id'] + 1);\n }\n else\n {\n $this->currentMsg = array();\n }\n }", "public static function create( array $info ) {\n\t\t$obj = new Notification();\n\t\tstatic $validFields = [ 'event', 'user' ];\n\n\t\tforeach ( $validFields as $field ) {\n\t\t\tif ( isset( $info[$field] ) ) {\n\t\t\t\t$obj->$field = $info[$field];\n\t\t\t} else {\n\t\t\t\tthrow new InvalidArgumentException( \"Field $field is required\" );\n\t\t\t}\n\t\t}\n\n\t\tif ( !$obj->user instanceof User ) {\n\t\t\tthrow new InvalidArgumentException( 'Invalid user parameter, expected: User object' );\n\t\t}\n\n\t\tif ( !$obj->event instanceof Event ) {\n\t\t\tthrow new InvalidArgumentException( 'Invalid event parameter, expected: Event object' );\n\t\t}\n\n\t\t// Notification timestamp should be the same as event timestamp\n\t\t$obj->timestamp = $obj->event->getTimestamp();\n\t\t// Safe fallback\n\t\tif ( !$obj->timestamp ) {\n\t\t\t$obj->timestamp = wfTimestampNow();\n\t\t}\n\n\t\t// @Todo - Database insert logic should not be inside the model\n\t\t$obj->insert();\n\n\t\treturn $obj;\n\t}", "protected function createMessage()\n\t{\n\t\t$config = $this->messageConfig;\n\t\tif (!array_key_exists('class', $config)) {\n\t\t\t$config['class'] = $this->messageClass;\n\t\t}\n\t\t$config['mailer'] = $this;\n\n\t\treturn Yii::createObject($config);\n\t}", "public static function build(string $type): MessengerInterface;", "public static function createFromArray($fields) \n\t{\n\t\t$notification = new Notification();\n\t\tself::populate($notification,$fields);\n\t\treturn $notification;\n\t}", "protected abstract function _message();", "public function buildMessage() {\n\t\t\t$message = array();\n\t\t\t\n\t\t\t$message[] = $this->highway;\n\t\t\t$message[] = $this->direction;\n\t\t\t\n\t\t\tif ($this->location) {\n\t\t\t\t$message[] = $this->location;\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->from_at && $this->to) {\n\t\t\t\t$message[] = 'From ' . $this->from_at . ' to ' . $this->to;\n\t\t\t}\n\t\t\telse if ($this->from_at && !$this->to) {\n\t\t\t\t$message[] = 'At ' . $this->from_at;\n\t\t\t}\n\t\t\telse if (!$this->from_at && $this->to) {\n\t\t\t\t$message[] = 'To ' . $this->to;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new Exception('from_at and to are both empty?!' . print_r($this, true));\n\t\t\t}\n\t\t\t\n\t\t\t$message[] = '-';\n\t\t\t\n\t\t\tif ($this->reason == 'Other') {\n\t\t\t\t$reason = 'Incident';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$reason = $this->reason;\n\t\t\t}\n\t\t\t\n\t\t\t// \"All Lanes Closed due to Serious Collision\"\n\t\t\tif ($this->lanes_affected == 'All Lanes Closed') {\n\t\t\t\t$message[] = 'All Lanes Closed Due to';\n\t\t\t\tif ($this->traffic_impact) {\n\t\t\t\t\t$message[] = $this->traffic_impact;\n\t\t\t\t}\n\t\t\t\t$message[] = $reason;\n\t\t\t}\n\t\t\t// \"Serious Collision Affecting 1 Right Lane\"\n\t\t\telse {\n\t\t\t\tif ($this->traffic_impact) {\n\t\t\t\t\t$message[] = $this->traffic_impact;\n\t\t\t\t}\n\t\t\t\t$message[] = $reason;\n\t\t\t\t$message[] = 'Affecting';\n\t\t\t\t$message[] = $this->lanes_affected; \n\t\t\t}\n\t\t\t\n\t\t\t$this->message = implode(' ', $message);\n\t\t}", "public function notify($instance);", "public function __construct($notification)\n {\n parent::__construct($notification);\n }", "public function notification(Notification $notification, array $parameters = []);", "public function __construct()\n {\n $this->notificationTypes = ['TransactionBillWasClosed', 'LoyaltyRewardEarned', 'CustomerRedeemReward', 'CustomerRedeemDeal'];\n }", "protected function createNotificationInstance($data)\n {\n if ($data === false) {\n return null;\n }\n\n /** @var Notification $model */\n $model = Instance::ensure($this->dataClass, Notification::class);\n\n if (!empty($data['id'])) {\n $model->setId($data['id']);\n }\n\n $model->setType($data['type']);\n $model->setData(is_string($data['data']) ? Json::decode($data['data']) : $data['data']);\n $model->setUserId($data['user_id']);\n $model->setTimestamp($data['created_at']);\n $model->setRead((bool)$data['is_read']);\n $model->setOwner($this->owner);\n\n return $model;\n }", "public static function createNotification($type, $eventid){\n\t\t$notification = new Notification; \n\t\t$notification->type = $type;\n\t\t$notification->eventid = $eventid;\n\t\t$notification->time = date('Y-m-d H:i:s');\n\t\t$notification->save();\n\t\treturn $notification;\n\t}", "public function newNotification($event)\n {\n return new ExampleNotification($event);\n }", "function getNotification(){\n\n\n}", "public function buildEngineMessage(ArcanistLandEngine $engine) {\n $this->findRevisions();\n $engine->setCommitMessageFile($this->messageFile);\n $engine->setRevisionIdsInStackOrder($this->revision_ids);\n }", "public function rawMessage(){\n $return = array(\n 'message' => '',\n 'options' => array(),\n );\n if ($this->getWillLend() && $this->isItHome()) {\n $return['message'] = 'bibdk_holding_material_is_home';\n }\n else if (!$this->isItHome() && $this->getExpectedDelivery()) {\n $return['message'] = 'bibdk_holding_material_will_be_home @date';\n $return['options'] = array('@date' => format_date($this->getExpectedDelivery(), 'custom', 'd.m.Y'));\n }\n else if ($note = $this->hasNote()){\n $return['message'] = $note;\n }\n else if ($error = $this->getErrorMessage()) {\n $return['message'] = $error;\n }\n else {\n $return['message'] = 'bibdk_holding_someting_went_wrong';\n }\n\n return $return;\n }", "private function initMessage()\n {\n $this->_message['MSG_ERROR'] = Utils::getMessageError();\n $this->_message['MSG_ALERT'] = Utils::getMessageALert();\n }", "private function newMessage(array $data)\n {\n\n $message = Message::create([\n 'channel_id' => $data['channel_id'],\n 'user_id' => Auth::guard()->user()->id,\n 'message' => $data['message']\n ]);\n if ($message) {\n $this->notifyChannelUsers($data['channel_id']);\n }\n return $message;\n }", "public function notify($type, $message)\n {\n return $message?<<<NOTIFY\n<div class=\"hide notifier\" data-class-name=\"$type\">\n$message\n</div>\nNOTIFY\n: null;\n }", "public function build(): SubscriptionEvent\n {\n return CoreHelper::clone($this->instance);\n }", "function prepare_notification($hook, $type, $notification, $params) {\n\tif (!($notification instanceof \\Elgg\\Notifications\\Notification)) {\n\t\treturn $notification;\n\t}\n\n\t$notification->body = handler_replace($notification->body);\n\t$notification->subject = handler_replace($notification->subject);\n\n\treturn $notification;\n}", "function _osg_singout_notifier_prep_message($info,$data) {\n global $base_url;\n $message = array();\n $separator = md5(time());\n // carriage return type (we use a PHP end of line constant)\n $eol = PHP_EOL;\n\n //$params['to'] = $record['email'];\n $recipient = $info['first_name'].' '.$info['last_name'].' <[email protected]'.'>';\n $sender = variable_get('site_mail', '[email protected]');\n $message['subject'] = 'These Performances are available for registration.';\n $fudge = count($data) > 2?'s':'';\n $fudge = \"Please visit <a href=\\\"$base_url\\\">\".variable_get('site_name','[Some Cool Site]').\"</a>\"\n .\" and indicate your attendance plan for the following event$fudge:\";\n $data[0] = $fudge;\n $body = implode(\"<br>\",$data);\n\n\n\n $message['body'] = $body;\n\n debug($message,'$message');\n //drupal_mail($module, $key, $to, $language, $params = array(), $from = NULL, $send = TRUE)\n drupal_mail('osg_singout_notifier'\n , 'registration_needed'\n , $recipient\n , language_default()\n , $message\n , $sender\n );\n\n}", "public function create(Message $message): void\n {\n $this->items[$message->getEventName()][$message->getId()] = $message;\n }", "private function newMediaReceivedMessageBody() {\n $worksReceived = array();\n $worksNotYetReceived = array();\n foreach ($this->referencedWorks as $referencedWork) {\n if (self::mediaReceivedFor($referencedWork)) $worksReceived[] = $referencedWork;\n else $worksNotYetReceived[] = $referencedWork;\n } \n $remainingWorksCount = $worksCount = count($worksReceived);\n $message = 'Thank you very much for your submission';\n $message .= ($worksCount > 1) ? 's ' : ' ';\n $message .= 'to the 2010 Sans Souci Festival of Dance Cinema. We have received the media for ';\n foreach ($worksReceived as $referencedWork) {\n $remainingWorksCount--;\n $terminator = ($remainingWorksCount == 0 && $worksCount > 1) ? '.' : '';\n $punctuation = ($remainingWorksCount > 0 && $worksCount > 2) ? ',' : $terminator;\n $message .= '\"' . $referencedWork['title'] . $punctuation . '\"';\n $conjunction = ($remainingWorksCount == 1) ? ' and ' : ' ';\n $message .= $conjunction;\n }\n $nextPhraseStart = ($remainingWorksCount == 0 && $worksCount > 1) ? 'We ' : 'and we ';\n $pieceString = ($worksCount == 1) ? 'it' : 'them'; // alternately: ? 'this piece' : 'these pieces';\n $entryString = ($worksCount == 1) ? 'entry' : 'entries';\n $message .= $nextPhraseStart;\n $message .= 'look forward to viewing ' . $pieceString . ' as we curate the festival. ';\n if (count($worksNotYetReceived) > 0) { // We have not received all the submissions entered for this person.\n $message .= 'We have not yet received '; // (or, at least not yet checked in) ';\n $remainingWorksCount = $worksCount = count($worksNotYetReceived);\n foreach ($worksNotYetReceived as $referencedWork) {\n $remainingWorksCount--;\n $terminator = ($remainingWorksCount == 0) ? '.' : '';\n $punctuation = ($remainingWorksCount > 0 && $worksCount > 2) ? ',' : $terminator;\n $message .= '\"' . $referencedWork['title'] . $punctuation . '\"';\n $disjunction = ($remainingWorksCount == 1) ? ' or ' : ' ';\n $message .= $disjunction;\n }\n }\n $message .= \"\\r\\n\\r\\n\" . 'You can expect to hear from us again sometime in July.';\n $message .= \"\\r\\n\\r\\n\" . 'Again, thanks for your ' . $entryString . '.' . \"\\r\\n\";\n return $message;\n }", "function get_new_pm_notification( $limit=0, $xmlout = 0 )\n\t{\n\t\t//-----------------------------------------\n\t\t// Make sure we have a skin...\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( ! $this->compiled_templates['skin_global'] )\n\t\t{\n\t\t\t$this->load_template( 'skin_global' );\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// posty parsery\n\t\t//-----------------------------------------\n\t\t\n\t\trequire_once( ROOT_PATH.\"sources/handlers/han_parse_bbcode.php\" );\n $parser = new parse_bbcode();\n $parser->ipsclass =& $this;\n $parser->allow_update_caches = 0;\n $parser->parse_bbcode\t\t = 1;\n $parser->parse_smilies\t\t = 1;\n $parser->parse_html\t\t \t = 0;\n\t\t\n\t\t//-----------------------------------------\n\t\t// Get last PM details\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->DB->cache_add_query( 'msg_get_new_pm_notification', array( 'mid' => $this->member['id'], 'limit_a' => intval($limit) ) );\n\t\t$this->DB->simple_exec();\n\t\t\n\t\t$msg = $this->DB->fetch_row();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Check...\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( ! $msg['msg_id'] and ! $msg['mt_id'] and ! $msg['id'] )\n\t\t{\n\t\t\treturn '<!-- CANT FIND MESSAGE -->';\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Strip and wrap\n\t\t//-----------------------------------------\n\t\t\n\t\t$msg['msg_post'] = $parser->strip_all_tags( $msg['msg_post'] );\n\t\t\n\t\t$msg['msg_post'] = preg_replace(\"#([^\\s<>'\\\"/\\.\\\\-\\?&\\n\\r\\%]{80})#i\", \" \\\\1\".\"<br />\", $msg['msg_post']);\n\t\t$msg['msg_post'] = str_replace( \"\\n\", \"<br />\", trim($msg['msg_post']) );\n\t\t\n\t\tif ( strlen( $msg['msg_post'] ) > 300 )\n\t\t{\n\t\t\t$msg['msg_post'] = substr( $msg['msg_post'], 0, 350 ) . '...';\n\t\t\t$msg['msg_post'] = preg_replace( \"/&(#(\\d+;?)?)?\\.\\.\\.$/\", '...', $msg['msg_post'] );\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Add attach icon\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $msg['mt_hasattach'] )\n\t\t{\n\t\t\t$msg['attach_img'] = '<{ATTACH_ICON}>&nbsp;';\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Date\n\t\t//-----------------------------------------\n\t\t\n\t\t$msg['msg_date'] = $this->get_date( $msg['msg_date'], 'TINY' );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Next / Total links\n\t\t//-----------------------------------------\n\t\t\n\t\t$msg['_cur_num'] = intval($limit) + 1;\n\t\t$msg['_msg_total'] = intval($this->member['new_msg']) ? intval($this->member['new_msg']) : 1;\n\t\t\n\t\t//-----------------------------------------\n\t\t// Return loverly HTML\n\t\t//-----------------------------------------\n\t\t\n\t\t$return = $this->compiled_templates['skin_global']->msg_get_new_pm_notification( $msg, $xmlout );\n\t\t\n\t\t//-----------------------------------------\n\t\t// XML request?\n\t\t//-----------------------------------------\n\t\t\n\t\treturn $return;\n\t}", "protected function buildMessage() {\n $msg = $this->getMethod() . ' ' . $this->getUri() . ' ';\n $msg.= 'HTTP/' . $this->getHttpVersion() . \"\\r\\n\";\n \n foreach ($this->getAllHeaders() as $header => $value) {\n $msg.= \"$header: $value\\r\\n\";\n }\n $msg.= \"\\r\\n\" . $this->getBody();\n \n return $msg;\n }", "private function _updateInternalMessage()\n {\n $from = trim($this->_generalSettings->getFrom());\n $from_name = trim($this->_generalSettings->getFromName());\n $reply_to = trim($this->_generalSettings->getReplyTo());\n $categories = explode(',', $this->_generalSettings->getCategories());\n $template = trim($this->_generalSettings->getTemplateID());\n $asm_group_id = trim($this->_generalSettings->getAsmGroupId());\n\n $xsmtpapi_header['category'] = [ 'magento2_sendgrid_plugin' ];\n foreach ($categories as $category) {\n $xsmtpapi_header['category'][] = trim($category);\n }\n\n if (! empty($template)) {\n $xsmtpapi_header['filters']['templates']['settings']['enable'] = 1;\n $xsmtpapi_header['filters']['templates']['settings']['template_id'] = $template;\n }\n\n // asm group id\n if ($asm_group_id != false and $asm_group_id != 0) {\n $xsmtpapi_header['asm_group_id'] = intval($asm_group_id);\n }\n\n if (! empty($from)) {\n $this->_message->setFrom($from);\n }\n\n if (! empty($from_name) and ! empty($from)) {\n $this->_message->setFrom($from, $from_name);\n }\n\n if (! empty($from_name) and empty($from)) {\n $initial_from = $this->_message->getFrom();\n $this->_message->setFrom($initial_from, $from_name);\n }\n\n if (! empty($reply_to)) {\n $this->_message->setReplyTo($reply_to);\n }\n }", "function buildXmlNotice()\n\t{\n\t\t$doc = new SimpleXMLElement('<notice />');\n\t\t$doc->addAttribute('version', self::NOTIFIER_API_VERSION);\n\t\t$doc->addChild('api-key', $this->apiKey);\n\n\t\t$notifier = $doc->addChild('notifier');\n\t\t$notifier->addChild('name', self::NOTIFIER_NAME);\n\t\t$notifier->addChild('version', self::NOTIFIER_VERSION);\n\t\t$notifier->addChild('url', self::NOTIFIER_URL);\n\n\t\t$error = $doc->addChild('error');\n\t\t$error->addChild('class', $this->error_class);\n\t\t$error->addChild('message', $this->message);\n\t\t$this->addXmlBacktrace($error);\n\n\t\t$request = $doc->addChild('request');\n\t\t$request->addChild('url', $this->request_uri());\n\t\t$request->addChild('component', $this->component());\n\t\t$request->addChild('action', $this->action());\n\n\t\tif (isset($_REQUEST)) $this->addXmlVars($request, 'params', $this->params());\n\t\tif (isset($_SESSION)) $this->addXmlVars($request, 'session', $this->session());\n\t\tif (isset($_SERVER)) {\n\t\t\tif(isset($_SERVER['argv']))\n\t\t\t\tunset($_SERVER['argv']);\n\t\t\t$this->addXmlVars($request, 'cgi-data', $this->cgi_data());\n\t\t}\n\n\t\t$env = $doc->addChild('server-environment');\n\t\t$env->addChild('project-root', $this->project_root());\n\t\t$env->addChild('environment-name', $this->environment());\n\n\t\treturn $doc->asXML();\n\t}", "public function addNotification($id, $message, $type = 'status');", "public function __construct()\n {\n $this->fields = [\n 'notification' => [],\n 'content_available' => true\n ];\n }", "private static function addNotification(User $notified,\n User $notifying,\n Post $post,\n Version $version,\n $type,\n $source,\n $originElementId) {\n //$source: expected String \"comment\" or \"post\" or \"version\" ( or \"user\")\n\n $message = \"\";\n\n if ($type == 'comment') {\n\n $message = $notifying->name .' a commenté la version '. $version->number .' de '. $post->title;\n\n } else if ($type == 'vote') {\n\n if ($source == 'post') {\n\n $message = $notifying->name .' a voté pour votre post '. $post->title;\n\n } else if ($source == 'version') {\n\n $message = $notifying->name .' a voté pour la version '. $version->number .' que vous avez proposée sur '. $post->title;\n\n } else if ($source == 'comment') {\n\n $message = $notifying->name .' a voté pour votre commentaire sur la version '. $version->number .' de '. $post->title;\n\n }\n } else if ($type == 'version') {\n\n $message = $notifying->name .' a créé une nouvelle version pour '. $post->title;\n\n } else if ($type == 'follow') {\n\n $message = $notifying->name.' vous suit.';\n }\n\n if (!$message == \"\"\n && $notified->id != $notifying->id) {\n $notif = new Notification();\n $notif->notified_user_id = $notified->id;\n $notif->message = $message;\n if ($type = 'follow') {\n $notif->request_route_link = '/public-page/'.str_replace(' ','-',$notifying->name).'/'.$notifying->id;\n } else {\n $notif->request_route_link = '/posts/'.$post->id.'/'.$version->id;\n }\n $notif->version = array(\n \"id\"=>$version->id,\n \"number\"=>$version->number\n );\n $notif->post_id = $post->id;\n $notif->unread = true;\n $notif->origin_element_id = $originElementId;\n $notif->save();\n }\n }", "public function create($payload)\n {\n return $this->notification->create($payload);\n }", "protected function getMessage()\n {\n //return new \\Swift_Message('Test subject', 'Test body.');\n }", "function query_subscription_mail($key, &$message, $params) {\n if ($key !== 'notification') return;\n\n $user = $params['user'];\n $changes = $params['changes'];\n\n watchdog('query_subscription', \"Sending notification mail to @email (uid @uid)\",\n array('@email' => $user->mail, '@uid' => $user->uid), WATCHDOG_INFO);\n\n // translate to appropriate user's language and html escape function\n $ht = function($txt) use ($user) {\n // php 5.3, so there is no ENT_SUBSTITUTE, ENT_HTML401\n return htmlspecialchars(t($txt, array(), array('langcode' => $user->language)), ENT_QUOTES);\n };\n\n // html escape function\n $e = function($txt) {\n // php 5.3, so there is no ENT_SUBSTITUTE, ENT_HTML401\n return htmlspecialchars($txt, ENT_QUOTES);\n };\n\n // format link as html anchor with translation\n $l = function($txt, $link) use ($user) {\n return l($txt, $link, array('language' => $user->language, 'absolute' => true));\n };\n\n // Build html containing tables with data on what changed\n /*\n * Todo: group queries by dataset. Per-dataset information such as new/removed studies or expirations should only be\n * shown once instead of for every query affected. The $changes array already has this grouping but we don't do\n * anything with it now.\n */\n $datasets_html = '';\n $datasets_expired_html = '';\n $datasets_expired = array();\n foreach($changes as $dschanges) foreach($dschanges as $change) {\n $data = '';\n $subscription = $change['subscription'];\n $query = $subscription->query();\n // Emails are only sent if the structure of the query has not changed, so descriptors for old and new values are the same.\n $descriptors = $subscription->descriptors();\n\n $expiration_date = $old_matching = $new_matching = $old_cardinality = $new_cardinality = null;\n $studies_added_links = $studies_removed_links = array();\n $query_uri = entity_uri('mica_query', $query);\n $query_link = $l($query->name ? : $ht(\"unnamed query\"), $query_uri['path']);\n $dataset_link = $l($descriptors['dataset']->title, 'node/'.$descriptors['dataset']->nid);\n $prevdate = $e($subscription->updated()->format(\"d-m-Y\"));\n $curdate = $e(date('d-m-Y'));\n $expired = $change['expired'];\n if ($expired) {\n $expiration_date = $e($descriptors['dataset_expiration_date']->format('d-m-Y'));\n $datasets_expired[$dataset_link] = 1;\n } else {\n $differences = $change['differences'];\n\n $old_matching = $e($differences['old_matched']);\n $new_matching = $e($differences['new_matched']);\n\n if(isset($differences['old_cardinality'])) {\n $old_cardinality = $e($differences['old_cardinality']);\n $new_cardinality = $e($differences['new_cardinality']);\n }\n\n foreach($differences['studies_added'] as $conn_id) {\n $study = QuerySubscription::study_for_connection_id($conn_id);\n $studies_added_links[] = $l($study->title, 'node/'.$study->nid);\n }\n foreach($differences['studies_removed'] as $conn_id) {\n $study = QuerySubscription::study_for_connection_id($conn_id);\n $studies_removed_links[] = $l($study->title, 'node/'.$study->nid);\n }\n }\n\n // we cannot use stylesheets in html mail, as many webmail systems such as gmail don't support it. Use inline styles.\n $th = \"th style='text-align: left'\";\n $td = \"td style='padding: 0 .2em'\";\n\n // The per-query header\n $data .= \"<div style='margin: 1em 0 1em -.2em'><table>\\n\" .\n \" <tr><$th>{$ht('Query')}:</th><$td>$query_link</td></tr>\\n\" .\n \" <tr><$th>{$ht('Dataset')}:</th><$td>$dataset_link</td></tr>\\n\" .\n \" <tr><$th>{$ht('Date')}:</th><$td>$curdate</td></tr>\\n\" .\n \" <tr><$th>{$ht('Previous check date')}:</th><$td>$prevdate</td></tr>\\n\";\n if (!$expired) {\n if(count($studies_added_links) > 0) {\n $studies_list = implode('<br>', $studies_added_links);\n $data .= \" <tr><$th>{$ht('New Studies')}:</th><$td>$studies_list</td></tr>\\n\";\n }\n if(count($studies_removed_links) > 0) {\n $studies_list = implode('<br>', $studies_removed_links);\n $data .= \" <tr><$th>{$ht('Removed Studies')}:</th><$td>$studies_list</td></tr>\\n\";\n }\n\n } else {\n $data .= \"<tr><$th>{$ht('Expiration date')}:</th><$td>$expiration_date</td>\\n\";\n }\n $data .= \"</table></div><br>\\n\\n\";\n\n if($expired) {\n $datasets_expired_html .= $data;\n continue;\n }\n\n $th = \"th style='text-align: left'\";\n $td = \"td style='padding: 0 1em; text-align: center'\";\n $italic = function($txt) {return \"<span style='font-style: italic;'>$txt</span>\";};\n\n // changes in values\n $data .= \"<div style='margin: .5em 0 1em -1em'><table>\\n\" .\n \" <tr><$th></th><$td>{$italic($prevdate)}</td><$td>{$italic($ht('Now'))}</td></tr>\\n\";\n\n $cross_ids = array_diff(array_keys($change['old_values']['_all']['_matched']), array('_all', '_cardinality'));\n if(empty($cross_ids)) {\n $old = $old_matching;\n $new = $new_matching;\n } else {\n $olds = $news = array();\n foreach($change['old_values']['_all']['_matched'] as $cross_cat => $value) {\n if(in_array($cross_cat, array('_all', '_cardinality'))) continue;\n $cross_label = $descriptors['categories'][$cross_cat];\n $olds[] = $e(\"\\\"$cross_label\\\" ({$cross_cat}): $value\");\n }\n $olds[] = $ht(\"Total\").\": $old_matching\";\n if(!is_null($old_cardinality)) {\n $olds[] = $ht(\"No. of Patients\").\": $old_cardinality\";\n }\n foreach($change['new_values']['_all']['_matched'] as $cross_cat => $value) {\n if(in_array($cross_cat, array('_all', '_cardinality'))) continue;\n $cross_label = $descriptors['categories'][$cross_cat];\n $news[] = $e(\"\\\"$cross_label\\\" ({$cross_cat}): $value\");\n }\n $news[] = $ht(\"Total\").\": $new_matching\";\n if(!is_null($new_cardinality)) {\n $news[] = $ht(\"No. of Patients\").\": $new_cardinality\";\n }\n\n $old = implode('<br>', $olds);\n $new = implode('<br>', $news);\n }\n\n $data .=\n \" <tr><$th>{$ht('Total Matching Results')}:</th><$td>$old</td><$td>$new</td></tr>\\n\";\n\n if(isset($differences['old_cardinality'])) {\n $data .=\n \" <tr><$th>{$ht('Total Matching no. of Patients')}:</th><$td>$old_cardinality</td><$td>$new_cardinality</td></tr>\\n\";\n }\n\n $data .= \"</table></div><br>\\n\\n\";\n\n $datasets_html .= $data;\n }\n\n $datasets_expired = array_keys($datasets_expired);\n if (count($datasets_expired) > 0) {\n $expired_notice = t(<<<EOF\n<p><span style='font-weight: bold; font-size: 105%'>The following datasets have expired.</span>\\n\nYou will no longer receive updates for queries on these datasets. New versions of datasets may be available:</p>\\n\nEOF\n , array(), array('langcode' => $user->language));\n $expired_notice .= \"<ul>\\n\" . implode('', array_map(function($d) {return \"<li>$d</li>\\n\";}, $datasets_expired)) . \"</ul>\\n\\n\";\n } else {\n $expired_notice = '';\n }\n\n $body = <<<EOF\n<h1 style=\"font-size: 120%\">CMI data update notification</h1>\n\n<p>You have asked to be notified of changes in saved queries at CMI. The following changes have been found:</p>\n\n!expired_notice\n!data_expired\n!data_html\n\n<p style=\"font-size: 90%\">!subscriptions_url</p>\n\n<p style=\"font-size: 90%\">!home_link</p>\nEOF;\n\n $subscriptions_url = $l($ht('View update notification settings'), \"my-queries\");\n $home_link = $l($ht(\"CMI home page\"), '/');\n\n $message['subject'] = t('CMI data update notification', array(), array('langcode' => $user->language));\n $message['body'] = t($body,\n array(\n '!expired_notice' => $expired_notice,\n '!data_expired' => $datasets_expired_html,\n '!data_html' => $datasets_html,\n '!subscriptions_url' => $subscriptions_url,\n '!home_link' => $home_link,\n ),\n array('langcode' => $user->language));\n}", "private function _messageFor()\n {\n // First, get the message\n //$message_for = preg_match('^!messagefor-[$1]', $this->_data->message)\n //preg_match('/^!messagefor-(.*):/', '!messagefor-Mike I missed you', $matches); var_dump($matches);\n try {\n // Connect\n $dbh = $this->_connectToDb();\n\n // Insert\n $stmt = $dbh->prepare(\"INSERT INTO message(`nick`, `message`, `when`, `from`) VALUES (:nick, :message, NOW(), :from)\");\n\n $stmt->bindParam(':nick', $message_for, PDO::PARAM_STR);\n $stmt->bindParam(':message', $message_payload, PDO::PARAM_STR);\n $stmt->bindParam(':from', $this->_data->nick, PDO::PARAM_STR);\n\n $stmt->execute();\n\n $dbh = null;\n\n }\n catch(PDOException $e)\n {\n echo $e->getMessage();\n }\n }", "private function get_message()\n {\n switch (self::$requestType) {\n case 'payRequest':\n self::$msg = sha1(self::$mid . self::$amount . self::$cac . self::$MsTxnId . self::$firstName . self::$familyName . self::$timeStamp, true);\n break;\n case 'payNote':\n self::$msg = sha1(self::$mid . self::$amount . self::$cac . self::$PspTxnId . self::$MsTxnId . self::$timeStamp . self::$Result, true);\n break;\n }\n }", "protected function buildMessagePayload(Message $message)\n\t{\n\t\t$payload = array();\n\n\t\tif (isset($message->mailboxId)) {\n\t\t\t$payload['mailbox_id'] = $message->mailboxId;\n\t\t}\n\n\t\tif (isset($message->staffId)) {\n\t\t\t$payload['staff_id'] = $message->staffId;\n\t\t}\n\n\t\t$payload['id'] = $message->ticketId;\n\t\t$payload['subject'] = (string) $message->subject;\n\t\t$payload['message'] = $message->message;\n\t\t$payload['attachments'] = array();\n\t\t$payload['tags'] = $message->tags;\n\t\t$payload['scope'] = $message->scope ?: 'public';\n\t\t$payload['status'] = $message->keepWaiting ? 'waiting' : null;\n\n\t\tif ($message->system)\n\t\t{\n\t\t\t$payload['system'] = true;\n\t\t}\n\n\t\tif (isset($message->from)) {\n\t\t\t$payload['from'][] = array('name' => $message->from['name'], 'address' => $address = $message->from['address']);\n\t\t\tif (filter_var($address, FILTER_VALIDATE_EMAIL) === false)\n\t\t\t{\n\t\t\t\tthrow new \\InvalidArgumentException(\"Invalid e-mail address [$address].\");\n\t\t\t}\n\t\t}\n\n\t\tforeach (array('to', 'bcc', 'cc') as $type) {\n\t\t\tforeach ($message->{$type} as $name => $address) {\n\t\t\t\tif (is_numeric($name)) $name = $address;\n\t\t\t\t$payload[$type][] = compact('name', 'address');\n\t\t\t\tif (filter_var($address, FILTER_VALIDATE_EMAIL) === false)\n\t\t\t\t{\n\t\t\t\t\tthrow new \\InvalidArgumentException(\"Invalid e-mail address [$address].\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$payload['contact_extras'] = $message->contactExtras;\n\n\t\treturn json_encode($payload);\n\t}", "public function __construct() {\r\n $this->setEntity('mst_notification');\r\n }", "function get_message($message){\n\t\t$this->gmessage = $message;\n\t}", "public static function create_service_message($update, $version_user = false) {\n\t\treturn self::update_service_message(false, $update, $version_user);\n\t}", "function ajan_core_render_message() {\n\n\t// Get ActivityNotifications\n\t$ajan = activitynotifications();\n\n\tif ( !empty( $ajan->template_message ) ) :\n\t\t$type = ( 'success' === $ajan->template_message_type ) ? 'updated' : 'error';\n\t\t$content = apply_filters( 'ajan_core_render_message_content', $ajan->template_message, $type ); ?>\n\n\t\t<div id=\"message\" class=\"ajan-template-notice <?php echo esc_attr( $type ); ?>\">\n\n\t\t\t<?php echo $content; ?>\n\n\t\t</div>\n\n\t<?php\n\n\t\tdo_action( 'ajan_core_render_message' );\n\n\tendif;\n}", "public function __construct(NotificationTrigger $notification_trigger)\n {\n $this->notification_trigger = $notification_trigger;\n }", "abstract public function get_message();", "protected function prepareMessage() {\n //Initialize $message\n $message = '';\n //loop through $this->_storage array\n foreach ($this->_storage as $key => $value) {\n // if it has no value, assign 'Not provided' \n $value = (empty($value)) ? 'Not provided' : $value;\n // if an array, expand as comma-separated string \n if (is_array($value)) {\n $value = implode(', ', $value);\n }\n // replace underscores and hyphens in the label with spaces \n $key = str_replace(array('_', '-'), ' ', $key);\n // add label and value to the message body. Uppercase first letter\n $message .=ucfirst($key) . \": $value\\r\\n\\r\\n\";\n }\n // limit line length to 70 characters \n $this->_body = wordwrap($message, 70);\n }", "public function createMimeMessage();", "function host_cancle($from, $to, $togcm, $type, $message, $sender_name, $event_refrence){\n$arr = array(\"host\" => $from,\n\t \"to_id\" => $to,\n\t \"payload_type\" => $type,\n\t \"sender_name\" => $sender_name,\n\t \"event_reference\" => $event_refrence,\n \"payload_message\" => $message);\n$new_payload = json_encode($arr);\nsend_gcm_notify($togcm, $new_payload);\n}", "public function __construct()\n {\n $this->data['messagetype'] = get_class($this);\n }", "function parse_push_notifications_send($message){\n\n\t//$data = array(\"alert\" => $message);\n\n ParsePush::send(array(\n \"channels\" => array( \"Ryan\" ),\n data => array(\n \"alert\" => $message,\n )\n ));\n\n // Notification for iOS users\n// $queryIOS = ParseInstallation::query();\n// $queryIOS->equalTo('deviceType', 'ios');\n\n// ParsePush::send(array(\n// \"where\" => $queryIOS,\n// \"data\" => array(\n// \"alert\" => $message\n// )\n// ));\n\n }", "public function testPushNotification(){\n $noti=new Notification();\n $data=' {\n\t \"to\": \"/topics/important\",\n\t \"notification\": {\n\t \t\"title\": \"Hola Mundo\",\n\t\t \"body\": \"Mensaje de prueba\",\n\t\t \"icon\":\"http://www.alabamapublica.com/wp-content/uploads/sites/43/2017/06/cntx170619019-150x150.jpg\"\n\t\t \"click_action\": \"https://critica-xarkamx.c9users.io\"\n\t }\n }';\n $this->assertArrayHasKey(\"message_id\",$noti->sendPushNotification($data));\n }", "public function build()\n {\n return $this->from($this->mailData [\"from_address\"])->subject($this->mailData[\"subject\"])->view('emails.rappel-rdv');\n }", "public function createMessage()\n {\n $msg = $this->method . ' action of ' . $this->controller;\n if(count($this->params) > 0){\n $msg .= ' with params ' . implode(\", \", $this->params);\n }\n return $msg;\n }", "public function __construct($data)\n {\n \n\n $usuario_reserva = User::find($data->id_user);\n $coordinador = User::find($usuario_reserva->departamento->coordinador->id);\n\n $mensaje = new \\stdClass();\n $mensaje->user = $usuario_reserva->name.' '.$usuario_reserva->last_name;\n $mensaje->userid = $usuario_reserva->id;\n $mensaje->recipient = $coordinador->name.' '.$coordinador->last_name;\n $mensaje->recipientid = $coordinador->id;\n $mensaje->reservaid = $data->id;\n $mensaje->datereserva = date('Y-m-d H:i:s');\n $mensaje->text = 'ah generado una reserva';\n $notificacion = new Notificaciontest($mensaje);\n \n $coordinador->notify($notificacion);\n $this->notif = $mensaje;\n }", "public function __construct($data)\n {\n $this->message = $data;\n }", "public function __construct($data)\n {\n $this->message = $data;\n }", "public function __construct()\n {\n if (1 == func_num_args()) {\n $this->messages = func_get_arg(0);\n }\n }", "public static function newData()\n {\n if (is_null(self::$instance)) {\n self::$instance = new DatabaseNotificationBuilder();\n }\n self::$instance->reset();\n\n return self::$instance;\n }", "protected function createMessageBuilder()\n {\n if (!($this->mailer instanceof Mailer)) {\n throw new Exception('BatchMessage must be created from the Mailgun Mailer');\n }\n return $this->mailer->getMailgun()->messages()->getBatchMessage($this->mailer->domain, false);\n }", "protected function prepareMessage() {\n\n\t\tif (empty($this->messageTemplate)) {\n\t\t\tthrow new \\RuntimeException('Messenger: message template was not defined', 1354536584);\n\t\t}\n\n\t\tif (empty($this->to)) {\n\t\t\tthrow new \\RuntimeException('Messenger: no recipient was defined', 1354536585);\n\t\t}\n\n\t\t// Substitute markers\n\t\t$subject = $this->getContentRenderer()->render($this->messageTemplate->getSubject(), $this->markers);\n\t\t$body = $this->getContentRenderer()->render($this->messageTemplate->getBody(), $this->markers);\n\n\t\t// Parse Markdown only if necessary\n\t\tif ($this->messageTemplate->getTemplateEngine() === TemplateEngine::FLUID_AND_MARKDOWN) {\n\t\t\t$body = Markdown::defaultTransform($body);\n\t\t}\n\n\t\t$this->getMailMessage()->setTo($this->getTo())\n\t\t\t->setCc($this->getCc())\n\t\t\t->setBcc($this->getBcc())\n\t\t\t->setFrom($this->getSender())\n\t\t\t->setReplyTo($this->getReplyTo())\n\t\t\t->setSubject($subject)\n\t\t\t->setBody($body, 'text/html');\n\n\t\t// Attach plain text version if HTML tags are found in body\n\t\tif ($this->hasHtml($body)) {\n\t\t\t$text = Html2Text::getInstance()->convert($body);\n\t\t\t$this->getMailMessage()->addPart($text, 'text/plain');\n\t\t}\n\n\t\t// Handle attachment\n\t\tforeach ($this->attachments as $attachment) {\n\t\t\t$this->getMailMessage()->attach($attachment);\n\t\t}\n\t}", "public function getGeneratedMessage()\n {\n # Force the template to render\n (string) $this->prepareTemplate();\n\n $m = $this->template->__message;\n\n if (!$m->getFrom()) {\n trigger_error(\"You should add 'from' information.\", E_USER_WARNING);\n }\n\n if (!$m->getSubject()) {\n trigger_error(\"You should add 'subject'.\", E_USER_WARNING);\n }\n\n if (!$m->getHeader('To')) {\n trigger_error(\"You should add recipients.\", E_USER_WARNING);\n }\n\n foreach ($this->attachments as $attachment) {\n list($filename, $content, $type) = $attachment;\n $m->addAttachment($filename, $content, $type);\n }\n\n return $m;\n }", "public function new_notification_is_created ($notification) {\n $user = $this->get_session_user();\n $eventdata = new \\core\\message\\message();\n $eventdata->courseid = 1;\n $eventdata->name = 'fake_notification';\n $eventdata->component = 'block_culactivity_stream';\n $eventdata->userfrom = $user;\n $eventdata->subject = $notification;\n $eventdata->fullmessage = $notification;\n $eventdata->fullmessageformat = FORMAT_PLAIN;\n $eventdata->fullmessagehtml = $notification;\n $eventdata->smallmessage = $notification;\n $eventdata->notification = 1;\n $eventdata->userto = $user;\n $messageid = message_send($eventdata);\n\n if (!$messageid) {\n throw new Exception(get_string('messageerror', 'block_culactivity_stream'));\n }\n }", "protected function _createMessage($messageKey, $value)\n {\n\n return $value;\n }", "public function user_message_create() {\n\t\t$this->onDebug ( __METHOD__, 1 );\n\t\tif ($this->valide_userid () == false) {\n\t\t\treturn $this;\n\t\t}\n\t\t$message_created = $this->getObjetO365Wsclient ()\n\t\t\t->jsonPostMethod ( '/users/' . $this->getUserId () . '/messages', $this->getEmailContent () );\n\t\t$this->onDebug ( $message_created, 2 );\n\t\tif (isset ( $message_created->id ) && ! empty ( $message_created->id )) {\n\t\t\treturn $this->setO356MessageRef ( $message_created )\n\t\t\t\t->setMessageId ( $message_created->id );\n\t\t}\n\t\treturn $this->onError ( 'Pas d\\'ID durant la creation du message de O365', $message_created, 1 );\n\t}", "public function get_portfolio_notification();", "private function createNotification($id, $request)\n {\n $count = Notification::max('count');\n\n $notification = Notification::create([\n 'model_id' => $id,\n 'count' => intval($count) + 1,\n 'type' => $request->get('ntype'),\n 'subject' => $request->get('subject'),\n 'message' => $request->get('message'),\n 'sent_at' => Carbon::now(),\n ]);\n }" ]
[ "0.64002085", "0.5899662", "0.57749265", "0.57603616", "0.57600236", "0.57511544", "0.5738588", "0.5684837", "0.56596583", "0.5606979", "0.55988276", "0.55371207", "0.5525252", "0.54845864", "0.5483535", "0.5473821", "0.5473821", "0.546826", "0.5454964", "0.54362714", "0.542961", "0.5398497", "0.53942555", "0.537502", "0.5368292", "0.53464323", "0.53248453", "0.5323133", "0.5308869", "0.53070134", "0.5296693", "0.5296693", "0.5296693", "0.52853596", "0.5277889", "0.5271554", "0.52703583", "0.52493155", "0.52381295", "0.5236463", "0.5225705", "0.5222622", "0.52219915", "0.52190745", "0.52023345", "0.52015346", "0.51951706", "0.5189109", "0.51794386", "0.51744735", "0.51701593", "0.5162099", "0.5142165", "0.513306", "0.5130704", "0.51180995", "0.5115463", "0.5103731", "0.5090477", "0.5087082", "0.5086354", "0.5084439", "0.50807273", "0.5078628", "0.50697315", "0.50683224", "0.5064037", "0.5061595", "0.5060981", "0.5055438", "0.50524867", "0.50479233", "0.5037297", "0.50369024", "0.50299424", "0.5027301", "0.502628", "0.5006027", "0.5004182", "0.50032705", "0.49997994", "0.4991046", "0.49882448", "0.4969433", "0.49553734", "0.49498507", "0.49473822", "0.4945252", "0.4945225", "0.4945225", "0.4942095", "0.4940576", "0.49370968", "0.49310964", "0.49206936", "0.49186254", "0.4917192", "0.49100107", "0.49045724", "0.49016398" ]
0.6008841
1
Gets the format from the options
protected function format(array $options): string { return strtolower($options[0] ?? ''); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFormat() {}", "public function getFormat() {}", "public function getFormat() {}", "public function getFormat();", "public function getFormat();", "public function getFormat();", "public function getFormat();", "public function getFormat();", "public function getFormat();", "abstract public function getFormat();", "public function getRequestFormat(array $options = array())\n {\n $format = $this->config->getFormat();\n if ( isset($options['format']) ){\n $format = $options['format'];\n }\n return $format;\n }", "protected function getFormat($options)\n {\n // In Symfony Console, there is no way for us to differentiate\n // between the user specifying '--format=table', and the user\n // not specifying --format when the default value is 'table'.\n // Therefore, we must make --field always override --format; it\n // cannot become the default value for --format.\n if (!empty($options['field'])) {\n return 'string';\n }\n $options += [\n 'default-format' => false,\n 'pipe' => false,\n ];\n $options += [\n 'format' => $options['default-format'],\n 'format-pipe' => $options['default-format'],\n ];\n\n $format = $options['format'];\n if ($options['pipe']) {\n $format = $options['format-pipe'];\n }\n return $format;\n }", "protected function getFormat()\n {\n return $this->format;\n }", "public static function getFormat(): string;", "public function getFormat()\n {\n return $this->format;\n }", "public function getFormat()\n {\n return $this->format;\n }", "public function getFormat()\n {\n return $this->format;\n }", "public function getFormat()\n {\n return $this->format;\n }", "public function getFormat()\n {\n return $this->format;\n }", "public function getFormat()\n {\n return $this->format;\n }", "public function getFormat()\n {\n return $this->format;\n }", "public function getFormat()\n {\n return $this->format;\n }", "public function getFormat()\n {\n return $this->format;\n }", "public function getFormat()\n {\n return $this->format;\n }", "public function getFormat() { return $this->_format; }", "public function getFormat() {\n $result = TingOpenformatMethods::parseFields($this->_getDetails(), array('format'));\n return $result;\n }", "public function getFormat()\n\t{\n\t\treturn $this->format; \n\n\t}", "public function format() {\n return $this->format;\n }", "public function getFormat() {\r\n\t\treturn $this->format;\r\n\t}", "public function getFormat() {\n return $this->format;\n }", "public function getFormat()\n {\n\n return $this->format;\n }", "public function getFormat()\n {\n return $this->_format;\n }", "public function GetFormat () {\n\t\treturn $this->format;\n\t}", "public function getFormat() {\n\t\t\treturn $this->_format;\n\t\t}", "public function getFormat()\n\t\t\t{\n\t\t\t\treturn $this->format;\n\t\t\t}", "public function getFormat(): string\n {\n if ($this->format === null) {\n $this->format = self::$default_format;\n }\n return $this->format;\n }", "public function format(string $format, array $options = []): string;", "public function getFormatSetting()\n {\n return $this->format_setting;\n }", "abstract public function format($options = null): ?string;", "public static function getFormats()\n {\n return self::$formats;\n }", "public function getFormat(): int;", "public static function formats()\n {\n return self::$formats;\n }", "public static function getFormats() {\n return array(\n 'none',\n 'pretty',\n 'php',\n 'php-data',\n 'json-pretty',\n 'json-strict',\n 'serialize',\n 'shell',\n );\n }", "public function GetFormat($formatType);", "protected function getFormat()\n {\n return 'FORMAT: 1A';\n }", "public function getFormat()\n {\n return get_post_format($this->id) ? get_post_format($this->id) : 'standard';\n }", "public function getFormatName();", "public static function getDefaultFormat()\n {\n return self::$defaultFormat;\n }", "public function defaultFormat()\n\t{\n\t\treturn $this->format();\n\t}", "public function getFormats()\n {\n return $this->_formats;\n }", "public function getResultFormat()\n {\n return $this->resultFormat;\n }", "public function getFormatter();", "public function format($format);", "abstract public function getFormat(): int;", "public function supportedFormats();", "public function getFormat(): array;", "public function getFormats()\n {\n\t $format_field = $this->getValue('format');\n\t return wed_decodeJSON($format_field,true);\n }", "public function getTimeFormat()\n\t{\n\t\treturn isset($this->config['time-format']) ? $this->config['time-format'] : NULL;\n\t}", "public function getFormat($fileExtension);", "public static function getDefaultFormat(): string\n {\n return static::$default_format;\n }", "protected function extractFormatOptions(array $options): array {\n\n\t\t\t// first option is the format\n\t\t\tarray_shift($options);\n\n\t\t\treturn $this->extractNamedOptions($options);\n\t\t}", "public function getFormat(): int\n {\n return self::FORMAT_6;\n }", "public function format($format = null)\n\t{\n\t\treturn parent::format($format ? $format : $this->defaultFormat);\n\t}", "protected function getClientOptions()\n\t{\n\t\t$format = array_map('intval', array_slice(str_split($this->format), 0, 2));\n\t\t$format[0] = ArrayHelper::getValue($format, 0, 1);\n\t\t$format[1] = ArrayHelper::getValue($format, 1, 3);\n\t\t$options = [\n\t\t\t'format' => $format,\n\t\t];\n\n\t\treturn $options;\n\t}", "public static function format($format = null) {\n\t\tif ($format == null) {\n\t\t\treturn static::$format;\n\t\t}\n\t\treturn static::$format = $format;\n\t}", "public function formatting(array $options = []): array;", "public function getDataFormat()\n {\n return $this->data_format;\n }", "public function getDataFormat()\n {\n return $this->data_format;\n }", "public function getFormatter()\n {\n }", "public function getFormatter()\n {\n }", "public function getToStringFormat()\n {\n return $this->_to_string_format;\n }", "public function getPublicationFormat() {\n $fields = array('format');\n $result = TingOpenformatMethods::parseFields($this->_getPublicationDetails(), $fields);\n return (is_array($result)) ? reset($result) : $result;\n }", "public function &GetFormats()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n return $this->_formats;\n }", "public function getFormatAction()\n {\n $content = null;\n try {\n $content = $this->dms()->getService()->getInfo($this->params('file'), 'format');\n } catch (NoFileException $e) {\n $content = $e->getMessage();\n }\n\n return $this->getResponse()->setContent($content);\n }", "public function getSourceFormat() {\n return $this->sourceFormat;\n }", "public static function getFormatInfo($format)\n {\n switch ($format) {\n case 0:\n return ['', 'Continuation of string variable'];\n case self::FORMAT_TYPE_A:\n return ['A', 'Alphanumeric'];\n case self::FORMAT_TYPE_AHEX:\n return ['AHEX', 'alphanumeric hexadecimal'];\n case self::FORMAT_TYPE_COMMA:\n return ['COMMA', 'F format with commas'];\n case self::FORMAT_TYPE_DOLLAR:\n return ['DOLLAR', 'Commas and floating point dollar sign'];\n case self::FORMAT_TYPE_F:\n return ['F', 'F (default numeric) format'];\n case self::FORMAT_TYPE_IB:\n return ['IB', 'Integer binary'];\n case self::FORMAT_TYPE_PIBHEX:\n return ['PIBHEX', 'Positive binary integer - hexadecimal'];\n case self::FORMAT_TYPE_P:\n return ['P', 'Packed decimal'];\n case self::FORMAT_TYPE_PIB:\n return ['PIB', 'Positive integer binary (Unsigned)'];\n case self::FORMAT_TYPE_PK:\n return ['PK', 'Positive packed decimal (Unsigned)'];\n case self::FORMAT_TYPE_RB:\n return ['RB', 'Floating point binary'];\n case self::FORMAT_TYPE_RBHEX:\n return ['RBHEX', 'Floating point binary - hexadecimal'];\n case self::FORMAT_TYPE_Z:\n return ['Z', 'Zoned decimal'];\n case self::FORMAT_TYPE_N:\n return ['N', 'N format - unsigned with leading zeros'];\n case self::FORMAT_TYPE_E:\n return ['E', 'E format - with explicit power of ten'];\n case self::FORMAT_TYPE_DATE:\n return ['DATE', 'Date format dd-mmm-yyyy'];\n case self::FORMAT_TYPE_TIME:\n return ['TIME', 'Time format hh:mm:ss.s'];\n case self::FORMAT_TYPE_DATETIME:\n return ['DATETIME', 'Date and time'];\n case self::FORMAT_TYPE_ADATE:\n return ['ADATE', 'Date in mm/dd/yyyy form'];\n case self::FORMAT_TYPE_JDATE:\n return ['JDATE', 'Julian date - yyyyddd'];\n case self::FORMAT_TYPE_DTIME:\n return ['DTIME', 'Date-time dd hh:mm:ss.s'];\n case self::FORMAT_TYPE_WKDAY:\n return ['WKDAY', 'Day of the week'];\n case self::FORMAT_TYPE_MONTH:\n return ['MONTH', 'Month'];\n case self::FORMAT_TYPE_MOYR:\n return ['MOYR', 'mmm yyyy'];\n case self::FORMAT_TYPE_QYR:\n return ['QYR', 'q Q yyyy'];\n case self::FORMAT_TYPE_WKYR:\n return ['WKYR', 'ww WK yyyy'];\n case self::FORMAT_TYPE_PCT:\n return ['PCT', 'Percent - F followed by \"%\"'];\n case self::FORMAT_TYPE_DOT:\n return ['DOT', 'Like COMMA, switching dot for comma'];\n case self::FORMAT_TYPE_CCA:\n return ['CCA', 'User-programmable currency format (1)'];\n case self::FORMAT_TYPE_CCB:\n return ['CCB', 'User-programmable currency format (2)'];\n case self::FORMAT_TYPE_CCC:\n return ['CCC', 'User-programmable currency format (3)'];\n case self::FORMAT_TYPE_CCD:\n return ['CCD', 'User-programmable currency format (4)'];\n case self::FORMAT_TYPE_CCE:\n return ['CCE', 'User-programmable currency format (5)'];\n case self::FORMAT_TYPE_EDATE:\n return ['EDATE', 'Date in dd.mm.yyyy style'];\n case self::FORMAT_TYPE_SDATE:\n return ['SDATE', 'Date in yyyy/mm/dd style'];\n default:\n return [null, null];\n }\n }", "public function getFormat()\n {\n if ($this->quality !== null || $this->progressive) {\n return 'jpg';\n }\n\n return $this->format;\n }", "function getStyle($opts)\n{\n $style = empty($opts['s']) ? '' : strtolower(substr($opts['s'], 0, 3));\n switch($style)\n {\n case 'pat':\n $style = NumberFormatter::PATTERN_DECIMAL;\n echo '::PATTERN_DECIMAL style requested' . PHP_EOL;\n break;\n\n case 'dec':\n $style = NumberFormatter::DECIMAL;\n echo '::DECIMAL style requested' . PHP_EOL;\n break;\n\n case 'cur':\n $style = NumberFormatter::CURRENCY;\n echo '::CURRENCY style requested' . PHP_EOL;\n break;\n\n case 'per':\n $style = NumberFormatter::PERCENT;\n echo '::PERCENT style requested' . PHP_EOL;\n break;\n\n case 'sci':\n $style = NumberFormatter::SCIENTIFIC;\n echo '::SCIENTIFIC style requested' . PHP_EOL;\n break;\n\n case 'spe':\n $style = NumberFormatter::SPELLOUT;\n echo '::SPELLOUT style requested' . PHP_EOL;\n break;\n\n case 'ord':\n $style = NumberFormatter::ORDINAL;\n echo '::ORDINAL style requested' . PHP_EOL;\n break;\n\n case 'dur':\n $style = NumberFormatter::DURATION;\n echo '::DURATION style requested' . PHP_EOL;\n break;\n\n case 'rul':\n $style = NumberFormatter::PATTERN_RULEBASED;\n echo '::PATTERN_RULEBASED style requested' . PHP_EOL;\n break;\n\n default:\n $style = NumberFormatter::DEFAULT_STYLE;\n echo '::DEFAULT_STYLE style requested' . PHP_EOL;\n }//end switch\n\n return $style;\n}", "public function getFormat($format){\n\t\t$this->_format = $format;\n\t}", "public function getDateTimeFormat()\n {\n $value = $this->_config->get('dataprocessing/general/date_time_format');\n\n if ($value === null) {\n $value = 'Y.m.d H:i:s';\n }\n\n return $value;\n }", "public function getFormatClass() {\n\t\t$formatClasses = array(\n\t\t\t'list' => 'CargoListFormat',\n\t\t\t'ul' => 'CargoULFormat',\n\t\t\t'ol' => 'CargoOLFormat',\n\t\t\t'template' => 'CargoTemplateFormat',\n\t\t\t'embedded' => 'CargoEmbeddedFormat',\n\t\t\t'csv' => 'CargoCSVFormat',\n\t\t\t'json' => 'CargoJSONFormat',\n\t\t\t'outline' => 'CargoOutlineFormat',\n\t\t\t'tree' => 'CargoTreeFormat',\n\t\t\t'table' => 'CargoTableFormat',\n\t\t\t'dynamic table' => 'CargoDynamicTableFormat',\n\t\t\t'googlemaps' => 'CargoGoogleMapsFormat',\n\t\t\t'openlayers' => 'CargoOpenLayersFormat',\n\t\t\t'calendar' => 'CargoCalendarFormat',\n\t\t\t'timeline' => 'CargoTimelineFormat',\n\t\t\t'category' => 'CargoCategoryFormat',\n\t\t\t'bar chart' => 'CargoBarChartFormat',\n\t\t);\n\n\t\tif ( array_key_exists( $this->mFormat, $formatClasses ) ) {\n\t\t\treturn $formatClasses[$this->mFormat];\n\t\t}\n\n\t\t$formatClass = null;\n\t\twfRunHooks( 'CargoGetFormatClass', array( $this->mFormat, &$formatClass ) );\n\t\tif ( $formatClass != null ) {\n\t\t\treturn $formatClass;\n\t\t}\n\n\t\tif ( count( $this->mFieldDescriptions ) > 1 ) {\n\t\t\t$format = 'table';\n\t\t} else {\n\t\t\t$format = 'list';\n\t\t}\n\t\treturn $formatClasses[$format];\n\t}", "function _validateFormat($format)\n {\n if (!array_key_exists($format, $this->conf['all_syntax']))\n $format = 'text';\n \n return $format; \n }", "private function getAvailableFormats()\n {\n return array(\n 'tab',\n 'xml',\n 'json',\n 'perl',\n 'php',\n 'vaml',\n 'html',\n );\n }", "public function getFormatList()\n {\n return $this->formatList;\n }", "public function applicable_formats() {\n return array('my' => true);\n }", "protected function getDateFormat()\n {\n return \\MUtil_Model_Bridge_FormBridge::getFixedOption('datetime', 'dateFormat');\n }", "public function getFormatting() {\n\t\treturn $this->formatting;\n\t}", "public function getDateFormat()\n\t{\n\t\treturn isset($this->config['date-format']) ? $this->config['date-format'] : NULL;\n\t}", "public function getFormatList() {\r\n\t\treturn $this->formatList;\r\n\t}", "public function getFormat()\n {\n $taxonomy = $this->taxonomies()\n ->where('taxonomy', 'post_format')\n ->first();\n\n if (! is_null($taxonomy) && isset($taxonomy->term)) {\n return str_replace('post-format-', '', $taxonomy->term->slug);\n }\n\n return false;\n }", "public function getFormatMail()\n {\n return $this->get(self::_FORMAT_MAIL);\n }", "abstract function format();", "public function format(): string;", "protected function getOutputFormat()\n {\n return $this->_outputFormat;\n }", "protected function dateFormat($format)\n {\n return config(\"date_formats.$format\");\n }", "public static function getFormat($format, $orientation = self::ORIENTATION_PORTRAIT) {}", "public function getDateFormat()\n {\n return $this->dateFormats;\n }", "protected function getFormats(): array\n {\n return [self::FORMAT_JSON, self::FORMAT_XML];\n }", "public static function getFormatter()\n {\n return static::$formatter;\n }", "public function getOutputFormat()\n {\n if ($this->outputFormat === null) {\n return static::$defaultCase;\n }\n\n return $this->outputFormat;\n }" ]
[ "0.806224", "0.806224", "0.806224", "0.7942394", "0.7942394", "0.7942394", "0.7942394", "0.7942394", "0.7942394", "0.7671255", "0.7641368", "0.7638767", "0.7597225", "0.75448304", "0.74843556", "0.74843556", "0.74843556", "0.74843556", "0.74843556", "0.74843556", "0.74843556", "0.74843556", "0.74843556", "0.74843556", "0.7464814", "0.74522847", "0.7451392", "0.7444749", "0.74365836", "0.7434831", "0.7420095", "0.74117154", "0.73803425", "0.726641", "0.7262291", "0.72255045", "0.71643376", "0.71636987", "0.71111375", "0.69755065", "0.69487965", "0.6931011", "0.68886787", "0.68787855", "0.68403065", "0.6824259", "0.679012", "0.6755731", "0.67126715", "0.67002904", "0.6697503", "0.6667381", "0.66476965", "0.6631743", "0.6628928", "0.6627908", "0.66050917", "0.65932304", "0.6575085", "0.6568639", "0.6516172", "0.6486982", "0.6409958", "0.63950473", "0.63515747", "0.63365376", "0.6332097", "0.6332097", "0.6321146", "0.6321146", "0.6300475", "0.6277404", "0.62733245", "0.6260852", "0.62572587", "0.6237536", "0.6215001", "0.6189104", "0.6177553", "0.61758494", "0.61665803", "0.6146312", "0.6142278", "0.6136088", "0.61301005", "0.61176854", "0.61069703", "0.60995716", "0.60800916", "0.60705495", "0.6064626", "0.60610306", "0.60450834", "0.6029468", "0.60274714", "0.60223895", "0.60165", "0.59943193", "0.598285", "0.5941832" ]
0.628267
71
Returns the file extension to set for the asset
protected function extension(array $options) { $formatOptions = $this->extractFormatOptions($options); $ext = ($formatOptions[self::EXTENSION_OPT] ?? null); // fallback to default if ($ext === null) $ext = $this->defaultExtension($this->format($options)); return $ext; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFileExtension()\n {\n return $this->originalAsset->getFileExtension();\n }", "public function getExt()\n {\n $type = $this->getType();\n if ($type === 'style') {\n return 'css';\n } elseif ($type === 'script') {\n return 'js';\n } elseif ($type === 'image') {\n return pathinfo($this->getSourcePath(), PATHINFO_EXTENSION);\n }\n }", "public function getExtension()\n {\n return $this->file['extension'];\n }", "public function getExtension()\n {\n return $this->fileExtension;\n }", "public function extension() : string {\n return $this->file->extension;\n }", "public function getExtension() {\n\t\treturn CFileHelper::getExtension($this->getName());\n\t}", "public function getFileExtension(): string\n {\n return $this->fileExtension;\n }", "public function getExtension()\n {\n return $this->file->getExtensionName();\n }", "public function get_file_extension () {\r\n\t\treturn $this->_file_extension;\r\n\t}", "public function getExtensionAttribute()\n {\n return pathinfo($this->file_path, PATHINFO_EXTENSION);\n }", "public function getFileExtension()\n {\n return $this->fileExtension;\n }", "public function getFileExtension()\n {\n return $this->fileExtension;\n }", "public function getFileExtension(){\n\n if($this->isPhoto()){\n return \"jpg\";\n }\n\n if($this->isVideo()){\n return \"mp4\";\n }\n\n return \"bin\";\n\n }", "public function getFileExtension()\n\t{\n\t\treturn $this->fileExtension;\n\t}", "public function getFileExtension()\n {\n return $this->_fileExtension;\n }", "public function getExtension() {\n\t\t\n\t\t$filename = $this->file['name'];\n\t\t\n\t\t$parts = explode('.', $filename);\n\t\t$extension = end($parts);\n\t\t\n\t\treturn strtolower($extension);\n\t\t\n\t}", "public function fileExtension(): string\n {\n return match_data($this,\n [\n Format::Xlsx => 'xlsx',\n Format::Pdf => 'pdf',\n Format::Html => 'html',\n Format::Ods => 'ods',\n ]);\n }", "public function getFileExtension();", "public function getExtension()\n {\n return $this->_path['extension'];\n }", "public function getExtension()\n {\n return File::get_file_extension($this->getField('Name'));\n }", "protected function getFileExtension()\n {\n $filePath = '/downloads/episodes/'.\n $this->folder_name.'/'.\n $this->folder_name.'.';\n\n foreach(config('airflix.extensions.video') as $extension)\n {\n if(Storage::disk('public')->exists($filePath.$extension)) {\n return $extension;\n }\n }\n\n return 'm4v';\n }", "public function getExt()\n {\n $filename = $this->getPath(); \n return pathinfo($filename, PATHINFO_EXTENSION);\n }", "public function getExtension(): string\n {\n return $this->extension;\n }", "public function getExtension(): string\n {\n return $this->extension;\n }", "public function getExtension()\r\n {\r\n return pathinfo($this->filename, PATHINFO_EXTENSION);\r\n }", "public function getFileExtension() {\n\t\t$pathInfo = pathinfo($this->filename);\n\t\tif (!isset($pathInfo['extension'])) {\n\t\t\treturn '???';\n\t\t} else {\n\t\t\treturn $pathInfo['extension'];\n\t\t}\n\t}", "public function getExtension(): string\n {\n return pathinfo($this->getFilename(), PATHINFO_EXTENSION);\n }", "public function getExtension(): string\n {\n return $this->getMeta()->getExtension();\n }", "public function getExtension()\n {\n return pathinfo($this->name, PATHINFO_EXTENSION);\n }", "public function getExtension() : string\n {\n return pathinfo($this->name, PATHINFO_EXTENSION);\n }", "public function extension()\n {\n return pathinfo($this->path_filename, PATHINFO_EXTENSION);\n }", "public function getExtension(): string\n {\n return pathinfo($this->getRelativePath(), PATHINFO_EXTENSION);\n }", "public function getExtension()\n {\n return $this->extension;\n }", "public function getExtension()\n {\n return $this->extension;\n }", "public function getExtension()\n {\n return $this->extension;\n }", "public function getExtension()\n {\n return $this->extension;\n }", "public function getExtension()\n {\n return $this->extension;\n }", "public function getExtension()\n {\n return $this->extension;\n }", "public function getExtension()\n {\n return $this->extension;\n }", "public function getExtension()\n\t{\n\t\treturn pathinfo($this->path, PATHINFO_EXTENSION);\n\t}", "public function getExtension()\n {\n return substr(strrchr($this->getBasename(), '.'), 1);\n }", "public function getName()\n {\n return 'AssetExtension';\n }", "public function getTargetFileExtension() {}", "public function getTargetFileExtension() {}", "public function getExtension() : string;", "function getTargetFileExtension() ;", "abstract protected function getFileExtension();", "public function getExtension()\n {\n return $this->_extension;\n }", "public function getExtension(){\n if( ! $this->extension ){\n throw new \\RuntimeException(self::class . \" does not define a file extension\");\n }\n return $this->extension;\n }", "public function getExtension() {\n \n return $this->extension;\n \n }", "public function getExtension();", "public function getExtension();", "public function getExtension();", "public function getExtension() {}", "public function getExtension() {}", "public function get_extension()\n {\n return $this->m_extension;\n }", "public function getExtensionFromName()\n {\n $vars = explode('.', $this->getClientFilename());\n return strtolower(array_pop($vars));\n }", "public function getExtension()\n {\n \treturn $this->_extension;\n }", "public function getOriginalExtension(): string\n {\n return pathinfo($this->originalName, PATHINFO_EXTENSION);\n }", "public function extension()\n\t{\n\t\t$type = $this->type();\n\t\treturn self::getExtension($type);\n\t}", "function getExtension() ;", "function getFileNameWithExtension()\n {\n return $this->fileNameWithExt;\n }", "public function getFileSuffix(){\n return $this->cfg_extension;\n }", "private function detectExtension()\n {\n $arr = explode('.', $this->file['name']);\n $this->file['extension'] = end($arr);\n }", "function getExt() {\n\t\treturn $this->_Ext;\n\t}", "public function get_extension()\n {\n }", "function setFilenameExtension()\n\t{\n\t\t$sOldFilenameExtension = substr($this->filename, strlen($this->filename) - 4, 4);\n\t\tif (($sOldFilenameExtension != '.gif') &&\n\t\t\t\t($sOldFilenameExtension != '.jpg') &&\n\t\t\t\t($sOldFilenameExtension != '.png')) {\n\t\t\t$this->printError('invalid filename extension');\n\t\t}\n\n\t\tswitch ($this->type) {\n\t\t\tcase 1:\n\t\t\t\t$this->filename = substr($this->filename, 0, strlen($this->filename) - 4) . '.gif';\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$this->filename = substr($this->filename, 0, strlen($this->filename) - 4) . '.jpg';\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$this->filename = substr($this->filename, 0, strlen($this->filename) - 4) . '.png';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->printError('invalid imagetype');\n\t\t}\n\t}", "public function getImageDefaultFileExtension(): string\n {\n return $this->imageDefaultFileExtension;\n }", "public function extension($filePath);", "private function getExt($file) {\n\n\t\t$info = pathinfo($file);\n\t\treturn $info['extension'];\n\t}", "protected function determineTargetFileExtension() {}", "public static function get_extension() {\n\t\tif ($_FILES[\"images\"][\"type\"][0] == \"image/jpeg\") {\n\t\t\t$extension = '.jpeg';\n\t\t} else if ($_FILES[\"images\"][\"type\"][0] == \"image/png\") {\n\t\t\t$extension = '.png';\n\t\t} \n\t\tglobal $firephp;\n\t\t$firephp->log('The extension is:');\n\t\t$firephp->log($extension);\n\t\treturn $extension;\n\t}", "public function getExt(): string\n {\n return (string)$this->env['EXT'];\n }", "public function getClientOriginalExtension();", "public function getFileExtension($format);", "function file_ext($file) {\n return strtolower(pathinfo($file, PATHINFO_EXTENSION));\n }", "public function getDocumentExtension() {\n return $this->document['extension'];\n }", "final public static function fext($file){\n\t\treturn pathinfo($file, PATHINFO_EXTENSION);\n\t}", "public function getDefaultExtension(): string\n {\n return $this->defaultExtension;\n }", "public function getFileExtension()\n {\n return $this->getUserOS() == 'win' ? '.exe' : '';\n }", "public function getExtensionName() {}", "private function getFileType()\n {\n $uriString = $this->uri->getPath();\n\n if (substr($uriString, strlen($uriString) - 1) == \"/\") {\n return 'html';\n }\n\n $pathParts = pathinfo($uriString);\n\n if (!array_key_exists('extension', $pathParts)) {\n return 'html';\n } else {\n $extension = $pathParts['extension'];\n if ($extension === \"\") {\n return 'html';\n } else {\n // @todo if ? and # are set this function will not work correct\n $pos = max((int)strpos($extension, \"?\"), (int)strpos($extension, \"#\"));\n if ($pos === 0) {\n $pos = strlen($extension);\n }\n return substr($extension, 0, $pos);\n }\n }\n }", "public abstract function getExtension();", "public function getExtension() {\n\n\t if(!$this->extension) {\n\n \t if(!$this->inputName)\n \t throw new UploadException('inputName required');\n\n \t $name = $_FILES[$this->inputName]['name'];\n \t $pieces = explode('.', $name);\n \t $this->extension = array_pop($pieces);\n\t }\n\n\t \t return $this->extension;\n\t }", "abstract function getExtension(): string;", "public static function getExtension(string $mime_type):string;", "function getfileextension($filename){\n return pathinfo($filename, PATHINFO_EXTENSION);\n }", "public function extension()\n {\n return '';\n }", "public function getAllowFileExtensions()\n\t{\n\t\treturn implode(',', array_merge($this->videoExtensions, $this->imageExtensions, $this->audioExtensions, $this->docExtensions ));\n\t\t//return Yii::app()->params['fileExtensions'];\n\t}", "protected function getFileExtensions() {\n\t\treturn $this->fileExtensions;\n\t}", "public function getExtension()\n\t{\n\t\treturn null;\n\t}", "public function getExtension()\n\t{\n\t\treturn null;\n\t}", "public function getExtension()\r\n {\r\n $this->caseClosedOrFail();\r\n\r\n return $this->extension;\r\n }", "function get_file_extension($file){\n\t$tmp = explode('.',$file);\n\treturn strtolower(end($tmp)) ;\n}", "public function getExtendedType()\n {\n return 'file';\n }", "protected function getCacheFileExtension()\n {\n // return Extension of css files\n return '.js';\n }", "public function getAllowedExtensions()\n {\n return $this->allowedFiles;\n }", "public function setExtension($ext);", "function getExt($file) \n\t{\n\t\t$dot = strrpos($file, '.') + 1;\n\t\treturn substr($file, $dot);\n\t}", "public static function file_extension($filename)\r\r\n\t{\r\r\n\t $path_info = pathinfo($filename);\r\r\n\t return $path_info['extension'];\r\r\n\t}", "abstract public function getExtensionName();" ]
[ "0.86695397", "0.8069207", "0.8037109", "0.80190414", "0.79883343", "0.7969394", "0.7909591", "0.78998107", "0.7899413", "0.7898048", "0.7878502", "0.7878502", "0.78506315", "0.78281534", "0.78209937", "0.77917796", "0.77671874", "0.77389616", "0.77157754", "0.76904076", "0.7619513", "0.7605476", "0.7585494", "0.7585494", "0.757385", "0.755061", "0.7514984", "0.74977154", "0.7478814", "0.74541426", "0.7447537", "0.73806167", "0.7355378", "0.7355378", "0.7355378", "0.7355378", "0.7355378", "0.7355378", "0.7355378", "0.7344977", "0.73119265", "0.72797656", "0.7260897", "0.72596735", "0.725286", "0.7251602", "0.72179526", "0.72060525", "0.7201261", "0.71442074", "0.7111133", "0.7111133", "0.7111133", "0.7108367", "0.7106865", "0.7104876", "0.7095856", "0.70773864", "0.7058615", "0.70200044", "0.70116115", "0.6990684", "0.69708985", "0.6953385", "0.6946842", "0.69424146", "0.69138837", "0.6911472", "0.6888676", "0.688037", "0.6874656", "0.6854523", "0.68262035", "0.68196315", "0.6815936", "0.68127084", "0.6781191", "0.6770346", "0.67546135", "0.6740148", "0.6732325", "0.67284137", "0.6725257", "0.67159456", "0.6714152", "0.6711841", "0.66972655", "0.6690458", "0.6671824", "0.6663395", "0.66584224", "0.66584224", "0.66459614", "0.6634985", "0.6619239", "0.66098183", "0.6608428", "0.6602593", "0.65996337", "0.65951824", "0.6590929" ]
0.0
-1
Gets the default file extension for the given format
protected function defaultExtension(string $format): ?string { if ($format === '') return null; return $format; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFileExtension($format);", "public function fileExtension(): string\n {\n return match_data($this,\n [\n Format::Xlsx => 'xlsx',\n Format::Pdf => 'pdf',\n Format::Html => 'html',\n Format::Ods => 'ods',\n ]);\n }", "public function getDefaultExtension(): string\n {\n return $this->defaultExtension;\n }", "public function getFileExtension() {\n\t\t$pathInfo = pathinfo($this->filename);\n\t\tif (!isset($pathInfo['extension'])) {\n\t\t\treturn '???';\n\t\t} else {\n\t\t\treturn $pathInfo['extension'];\n\t\t}\n\t}", "public function getImageDefaultFileExtension(): string\n {\n return $this->imageDefaultFileExtension;\n }", "public function getExtension() {\n\t\t\n\t\t$filename = $this->file['name'];\n\t\t\n\t\t$parts = explode('.', $filename);\n\t\t$extension = end($parts);\n\t\t\n\t\treturn strtolower($extension);\n\t\t\n\t}", "public function getFileExtension();", "public function getFileExtension(){\n\n if($this->isPhoto()){\n return \"jpg\";\n }\n\n if($this->isVideo()){\n return \"mp4\";\n }\n\n return \"bin\";\n\n }", "public function getFormat($fileExtension);", "public function get_file_extension () {\r\n\t\treturn $this->_file_extension;\r\n\t}", "public function getExtension()\n {\n return $this->file['extension'];\n }", "public function getExtension()\n {\n return File::get_file_extension($this->getField('Name'));\n }", "public function getExtension()\n {\n return $this->file->getExtensionName();\n }", "public function getExtension()\r\n {\r\n return pathinfo($this->filename, PATHINFO_EXTENSION);\r\n }", "public function getExtension()\n {\n return $this->fileExtension;\n }", "public function getFileFormatByExt($ext) {\n foreach($this->extBasedFileFormats as $fileFormat => $extensions) {\n if(in_array($ext, $extensions))\n return $fileFormat;\n }\n\n return '';\n }", "public function getExtension()\n {\n return $this->_path['extension'];\n }", "public function getFileExtension()\n\t{\n\t\treturn $this->fileExtension;\n\t}", "public function getExt()\n {\n $filename = $this->getPath(); \n return pathinfo($filename, PATHINFO_EXTENSION);\n }", "public function extension() : string {\n return $this->file->extension;\n }", "public function getExtension(): string\n {\n return pathinfo($this->getFilename(), PATHINFO_EXTENSION);\n }", "public function getExtension() {\n\t\treturn CFileHelper::getExtension($this->getName());\n\t}", "public function getFileExtension()\n {\n return $this->fileExtension;\n }", "public function getFileExtension()\n {\n return $this->fileExtension;\n }", "public function getFileExtension(): string\n {\n return $this->fileExtension;\n }", "function wp_get_default_extension_for_mime_type($mime_type)\n {\n }", "public function getExtension()\n\t{\n\t\treturn pathinfo($this->path, PATHINFO_EXTENSION);\n\t}", "public function getFileExtension()\n {\n return $this->_fileExtension;\n }", "public function extension()\n {\n return pathinfo($this->path_filename, PATHINFO_EXTENSION);\n }", "public function extension($default = null)\n {\n if (!$this->extension) {\n $this->extension = $default;\n }\n\n return $this->extension;\n }", "public function getExt()\n {\n $type = $this->getType();\n if ($type === 'style') {\n return 'css';\n } elseif ($type === 'script') {\n return 'js';\n } elseif ($type === 'image') {\n return pathinfo($this->getSourcePath(), PATHINFO_EXTENSION);\n }\n }", "public function getExtension()\n {\n return pathinfo($this->name, PATHINFO_EXTENSION);\n }", "protected function getFileExtension()\n {\n $filePath = '/downloads/episodes/'.\n $this->folder_name.'/'.\n $this->folder_name.'.';\n\n foreach(config('airflix.extensions.video') as $extension)\n {\n if(Storage::disk('public')->exists($filePath.$extension)) {\n return $extension;\n }\n }\n\n return 'm4v';\n }", "public function getFileExtension()\n {\n return $this->originalAsset->getFileExtension();\n }", "public function getExtension()\n {\n return substr(strrchr($this->getBasename(), '.'), 1);\n }", "public function getExtension(): string\n {\n return pathinfo($this->getRelativePath(), PATHINFO_EXTENSION);\n }", "public function getExtension() : string\n {\n return pathinfo($this->name, PATHINFO_EXTENSION);\n }", "public function getExtensionFromName()\n {\n $vars = explode('.', $this->getClientFilename());\n return strtolower(array_pop($vars));\n }", "public static function getDefaultFormat()\n {\n return self::$defaultFormat;\n }", "function getTargetFileExtension() ;", "private function getFileType()\n {\n $uriString = $this->uri->getPath();\n\n if (substr($uriString, strlen($uriString) - 1) == \"/\") {\n return 'html';\n }\n\n $pathParts = pathinfo($uriString);\n\n if (!array_key_exists('extension', $pathParts)) {\n return 'html';\n } else {\n $extension = $pathParts['extension'];\n if ($extension === \"\") {\n return 'html';\n } else {\n // @todo if ? and # are set this function will not work correct\n $pos = max((int)strpos($extension, \"?\"), (int)strpos($extension, \"#\"));\n if ($pos === 0) {\n $pos = strlen($extension);\n }\n return substr($extension, 0, $pos);\n }\n }\n }", "public function getFileSuffix(){\n return $this->cfg_extension;\n }", "abstract protected function getFileExtension();", "public static function getExtension(string $mime_type):string;", "protected function getExt(string $file, string $default = null): ?string\n {\n $pos = strrpos($file, '.');\n if (false !== $pos) {\n return strtolower(substr($file, $pos + 1));\n } else {\n return $default;\n }\n }", "public static function get_extension() {\n\t\tif ($_FILES[\"images\"][\"type\"][0] == \"image/jpeg\") {\n\t\t\t$extension = '.jpeg';\n\t\t} else if ($_FILES[\"images\"][\"type\"][0] == \"image/png\") {\n\t\t\t$extension = '.png';\n\t\t} \n\t\tglobal $firephp;\n\t\t$firephp->log('The extension is:');\n\t\t$firephp->log($extension);\n\t\treturn $extension;\n\t}", "function getExtension($filename) {\n\treturn substr(strrchr($filename,'.'),1);\n}", "public function getExtension(): string\n {\n return $this->extension;\n }", "public function getExtension(): string\n {\n return $this->extension;\n }", "private function getExt($file) {\n\n\t\t$info = pathinfo($file);\n\t\treturn $info['extension'];\n\t}", "public static function getDefaultFormat(): string\n {\n return static::$default_format;\n }", "function getExt($file) \n\t{\n\t\t$dot = strrpos($file, '.') + 1;\n\t\treturn substr($file, $dot);\n\t}", "function file_get_extension($filename)\r\n\t{\r\n\t\treturn substr($filename, strrpos($filename, \".\") + 1, strlen($filename));\r\n\t}", "function getExtension($filename)\n{\n\t$info = pathinfo($filename);\n\treturn $info['extension'];\n}", "public function getTargetFileExtension() {}", "public static function extension($mime) {\n\n\t\t$data = explode(\"/\", $mime);\n\t\t$extension = $data['1'];\n\n\t\tif ($extension == 'jpeg') { $extension = 'jpg'; }\n\n\t\treturn $extension;\n\n\t}", "function get_file_extension($file_path)\n {\n if (!@is_file($file_path))\n return NULL;\n return substr($file_path, -3);\n }", "function get_file_extension($file_name) {\n\treturn substr(strrchr($file_name,'.'),1);\n }", "public function getTargetFileExtension() {}", "public function getOriginalExtension(): string\n {\n return pathinfo($this->originalName, PATHINFO_EXTENSION);\n }", "function getFileFormatFromFile(string $file_name): string\n{\n\n\t$ext = strtolower(pathinfo($file_name, PATHINFO_EXTENSION));\n\tif (true == in_array($ext, array_keys(FILE_FORMATS)) ) {\n\t\treturn FILE_FORMATS[$ext];\n\t}\n\treturn \"Unknown File Format\" ;\n}", "function getFormatFilename()\n\n\t{\n\n\t\tglobal $config;\n\n\t\tglobal $config;\n\n\n\n\t\t$bitrate = $this->bitrate;\n\n\t\tfor ($i=0;$i<count($config['audioFormats']);$i++)\n\n\t\t\tif (abs($config['audioFormats'][$i]['bitrate'] - $this->bitrate) < $config['bitrateTolerance'])\n\n\t\t\t\t$bitrate = $config['audioFormats'][$i]['bitrate'];\n\n\t\treturn round($bitrate) . 'kbps_' . $this->channels . 'chn_' . $this->samplerate . 'Hz.' . $this->format;\n\n\t}", "function get_file_extension($filename){\n if(strpos($filename, \"jpeg\")){\n $ext = \"jpeg\";\n }\n else if(strpos($filename, \"png\")){\n $ext = \"png\";\n }\n else if(strpos($filename, \"gif\")){\n $ext = \"gif\";\n }\n else{\n $ext = \"jpg\";\n }\n return $ext;\n }", "public function getExtension() : string;", "protected function determineTargetFileExtension() {}", "function getExtension() ;", "public function extension($filePath);", "function GetExt($file){\n return substr($file, strrpos($file,'.') + 1);\n}", "function getfileextension($filename){\n return pathinfo($filename, PATHINFO_EXTENSION);\n }", "function get_extension($file)\n{\n return substr(strrchr($file, '.'), 1);\n}", "final public static function fext($file){\n\t\treturn pathinfo($file, PATHINFO_EXTENSION);\n\t}", "public static function extensionToMime($extension, $default = \"application/octet-stream\"){\n\t\tif (array_key_exists($extension, self::$extensionsMapping)){\n\t\t\treturn self::$extensionsMapping[$extension][0];\n\t\t}\n\t\treturn $default;\n\t}", "function fileExtension($nameFile) {\n\t$format = substr($nameFile, -4);\n\treturn ($format == \".pat\");\n}", "public static function file_extension($filename)\r\r\n\t{\r\r\n\t $path_info = pathinfo($filename);\r\r\n\t return $path_info['extension'];\r\r\n\t}", "public function resolveExtension()\n {\n if (($pos = strrpos($this->path, '.')) !== false) {\n return substr($this->path, $pos + 1);\n }\n\n return '';\n }", "static function getFormat(string $path): string\n {\n return strtolower(pathinfo($path, PATHINFO_EXTENSION));\n }", "public function extension($var = null): string\n {\n if (null !== $var) {\n $this->setProperty('format', $var);\n }\n\n $language = $this->language();\n if ($language) {\n $language = '.' . $language;\n }\n $format = '.' . ($this->getProperty('format') ?? Utils::pathinfo($this->name(), PATHINFO_EXTENSION));\n\n return $language . $format;\n }", "function get_file_extension($file_name) {\n return substr(strrchr($file_name,'.'),1);\n}", "function fromExt($ext) \n {\n $mtl = $GLOBALS['File_MimeType'];\n $ext = strtolower($ext);\n foreach($mtl as $mtd) {\n if (in_array($ext, $mtd[1])) {\n return $mtd[0];\n }\n }\n return 'application/octet-stream';\n }", "function getFileExtension($file)\n{\n $tmp = explode(\".\", $file);\n $extension = end($tmp);\n return $extension ? $extension : null;\n}", "private function get_ext( $filename='' )\n\t{\n\t\treturn substr( $filename, strrpos( $filename, '.' ) + 1);\t\n\t}", "public function getExtension(){\n $guesser = \"\\Symfony\\Component\\Mime\\MimeTypes\";\n if (class_exists($guesser) !== false) {\n /** @var Symfony\\Component\\Mime\\MimeTypes $guesser */\n $extensions = $guesser::getDefault()->getExtensions($this->getMimeType());\n return $extensions[0] ?? null;\n }\n\n $deprecated_guesser = \"\\Symfony\\Component\\HttpFoundation\\File\\MimeType\\ExtensionGuesser\";\n if (class_exists($deprecated_guesser) !== false){\n /** @var \\Symfony\\Component\\HttpFoundation\\File\\MimeType\\ExtensionGuesser $deprecated_guesser */\n return $deprecated_guesser::getInstance()->guess($this->getMimeType());\n }\n\n return null;\n }", "function get_file_extension($file_name) \n{\n return substr(strrchr($file_name,'.'),1);\n}", "public function getExtension();", "public function getExtension();", "public function getExtension();", "function file_ext($file) {\n return strtolower(pathinfo($file, PATHINFO_EXTENSION));\n }", "function _file_get_type($file) {\n $ext = file_ext($file);\n if (preg_match(\"/$ext/i\", get_setting(\"image_ext\")))\n return IMAGE;\n if (preg_match(\"/$ext/i\", get_setting(\"audio_ext\")))\n return AUDIO;\n if (preg_match(\"/$ext/i\", get_setting(\"video_ext\")))\n return VIDEO;\n if (preg_match(\"/$ext/i\", get_setting(\"document_ext\")))\n return DOCUMENT;\n if (preg_match(\"/$ext/i\", get_setting(\"archive_ext\")))\n return ARCHIVE;\n }", "public function guessExtension();", "function getExt($filename){\n return strtolower(substr(strrchr($fileName, '.'), 1));\n}", "function cmfcFile_getFileExtension($path) {\n\t\t$path_parts = pathinfo($path);\n\t//\techo $path_parts['dirname'], \"\\n\";\n\t//\techo $path_parts['basename'], \"\\n\";\n\t\treturn strtolower($path_parts['extension']);\n\t}", "public function getExtension(): string\n {\n return $this->getMeta()->getExtension();\n }", "function get_file_extension($file){\n\t$tmp = explode('.',$file);\n\treturn strtolower(end($tmp)) ;\n}", "static public function getExtension($filename) {\r\n\t\t// 1. The \"explode/end\" approach\r\n\t\t//$ext = end(explode('.', $filename));\r\n\t\t// 2. The \"strrchr\" approach\r\n\t\t//$ext = substr(strrchr($filename, '.'), 1);\r\n\t\t// 3. The \"strrpos\" approach\r\n\t\t//$ext = substr($filename, strrpos($filename, '.') + 1);\r\n\t\t// 4. The \"preg_replace\" approach\r\n\t\t//$ext = preg_replace('/^.*\\.([^.]+)$/D', '$1', $filename);\r\n\t\t// 5. The \"pathinfo\" approach\r\n\t\t$ext = pathinfo($filename, PATHINFO_EXTENSION);\r\n\t\t\r\n\t\t/*\r\n\t\t// OLD STYLE\r\n\t\t$i = strrpos($filename, \".\");\r\n\t\tif (!$i) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\t$l = strlen($filename) - $i;\r\n\t\t$ext = substr($filename, $i + 1, $l);\r\n\t\t*/\r\n\t\t\r\n\t\treturn strtolower($ext);\r\n\t}", "function get_file_extension($file_name) {\n if(empty($file_name) OR !is_string($file_name)) {\n return false;\n }\n return strtolower(substr(strrchr($file_name,'.'), 1));\n}", "public function getExtensionForMediaType($mediaType) {\n return $this->mimeTypes->getExtension($mediaType);\n }", "public function getExtension() {}", "public function getExtension() {}", "public function getDocumentExtension() {\n return $this->document['extension'];\n }", "function getExtension($filename = null)\n{\n\tif($filename != '') {\n\t\treturn pathinfo($filename, PATHINFO_EXTENSION);\n\t}\n\treturn null;\n}" ]
[ "0.8279462", "0.7792805", "0.76325345", "0.75568694", "0.7512768", "0.74028885", "0.7298033", "0.72927266", "0.7228356", "0.72227067", "0.7204391", "0.71614575", "0.7151602", "0.7128192", "0.7117779", "0.71068716", "0.70959836", "0.70890063", "0.70879036", "0.70772696", "0.7066912", "0.70639366", "0.70477706", "0.70477706", "0.7033374", "0.7015418", "0.70124215", "0.7010209", "0.7005957", "0.69602937", "0.6956141", "0.69294345", "0.692404", "0.6866306", "0.6853666", "0.6848235", "0.68296266", "0.6807694", "0.67908955", "0.6767121", "0.67511225", "0.67509377", "0.67393184", "0.67124885", "0.6704596", "0.6685012", "0.6660971", "0.665949", "0.665949", "0.66532534", "0.6651796", "0.66331816", "0.66116595", "0.6602322", "0.6598542", "0.65981996", "0.6598147", "0.6596964", "0.6596829", "0.6595483", "0.65917677", "0.6585765", "0.65826374", "0.6576165", "0.6572443", "0.65719146", "0.65694237", "0.6568435", "0.65596884", "0.65534693", "0.65464646", "0.65408427", "0.65356123", "0.65345216", "0.65292025", "0.6526752", "0.6511973", "0.6506165", "0.6495373", "0.64943165", "0.64922535", "0.64895314", "0.64862764", "0.6477161", "0.6477161", "0.6477161", "0.646215", "0.646078", "0.64595616", "0.6458473", "0.6456942", "0.6455412", "0.64541554", "0.644598", "0.64323306", "0.6423069", "0.64108944", "0.64095813", "0.63866544", "0.6383355" ]
0.78104687
1
Extracts the format options from the options
protected function extractFormatOptions(array $options): array { // first option is the format array_shift($options); return $this->extractNamedOptions($options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFormat() {\n $result = TingOpenformatMethods::parseFields($this->_getDetails(), array('format'));\n return $result;\n }", "protected static abstract function getOptions();", "function getOptions() ;", "abstract public function getOptions();", "public function getFormat() {}", "public function getFormat() {}", "public function getFormat() {}", "protected function getOptions() {}", "protected function getOptions() {}", "protected function getOptions() {}", "public function formatting(array $options = []): array;", "abstract public function getFormat();", "protected function get_options()\n\t{}", "public static function getFormats() {\n return array(\n 'none',\n 'pretty',\n 'php',\n 'php-data',\n 'json-pretty',\n 'json-strict',\n 'serialize',\n 'shell',\n );\n }", "protected function getClientOptions()\n\t{\n\t\t$format = array_map('intval', array_slice(str_split($this->format), 0, 2));\n\t\t$format[0] = ArrayHelper::getValue($format, 0, 1);\n\t\t$format[1] = ArrayHelper::getValue($format, 1, 3);\n\t\t$options = [\n\t\t\t'format' => $format,\n\t\t];\n\n\t\treturn $options;\n\t}", "public function getOptions() {}", "public function getOptions() {}", "public function getOptions() {}", "public function supportedFormats();", "public function getFormat();", "public function getFormat();", "public function getFormat();", "public function getFormat();", "public function getFormat();", "public function getFormat();", "public function section_format_options($foreditform = false) {\n static $sectionformatoptions = false;\n if ($sectionformatoptions === false) {\n $sectionformatoptions = array(\n 'sectiontype' => array(\n 'default' => 'default',\n 'type' => PARAM_ALPHA,\n 'cache' => true,\n ),\n );\n }\n if ($foreditform && !isset($sectionformatoptions['sectiontype']['label'])) {\n $sectionformatoptionsedit = array(\n 'sectiontype' => array(\n 'label' => new lang_string('sectiontype', 'format_usqflexopen'),\n 'help' => 'sectiontype',\n 'help_component' => 'format_usqflexopen',\n 'element_type' => 'select',\n 'element_attributes' => array(\n array(\n 'default' => new lang_string('sectiontypedefault', 'format_usqflexopen'),\n 'week' => new lang_string('sectiontypeweek', 'format_usqflexopen'),\n 'topic' => new lang_string('sectiontypetopic', 'format_usqflexopen'),\n 'assess' => new lang_string('sectiontypeassess', 'format_usqflexopen'),\n 'getstarted' => new lang_string('sectiontypegetstarted', 'format_usqflexopen'),\n )\n ),\n ),\n );\n $sectionformatoptions = array_merge_recursive($sectionformatoptions, $sectionformatoptionsedit);\n }\n return $sectionformatoptions;\n }", "abstract function options();", "public function getFormOptions(){\n $options = parent::getFormOptions();\n $padding = $this->getPadding(3);\n $eol = $this->getEol();\n $options .= $padding.'\\'image\\' => $this->getSkinUrl(\\'images/grid-cal.gif\\'),'.$eol;;\n $options .= $padding.'\\'format\\' => Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT),'.$eol;\n return $options;\n }", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getFormats()\n {\n\t $format_field = $this->getValue('format');\n\t return wed_decodeJSON($format_field,true);\n }", "protected function getOptions()\n {\n return [\n ['format', 'f', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'The names of formats you would like to generate.', null],\n ['regenerate', 'r', InputOption::VALUE_NONE, 'Whether all files must be regenerated even if exist.', null],\n ['temp', 't', InputOption::VALUE_NONE, 'Whether the temporary storage must be processed.', null],\n ];\n }", "abstract function fields_options();", "function getOptions();", "public function get_stLight_options($data_options);", "protected function getOptions()\n\t{\n\t\treturn [\n\t\t\t\n\t\t];\n\t}", "abstract protected function readOptions(array $options);", "public function applicable_formats() {\n return array('my' => true);\n }", "protected function _options() {\n\t\t\treturn array();\n\t\t}", "function applicable_formats()\r\n\t\t{\r\n\t\t\treturn array('all' => true);\r\n\t\t}", "function magictoolbox_WordPress_MagicScroll_parse_option_from_string($options) {\n $opt = array();\n\n $options = explode(\";\", $options);\n array_pop($options);\n\n foreach ($options as $value) {\n $value = trim($value);\n if (!empty($value)) {\n $value = explode(\":\", $value);\n // $opt[$value[0]] = trim($value[1]);\n $k = array_shift($value);\n $v = join(\":\",$value);\n $opt[$k] = trim($v);\n }\n }\n return $opt;\n}", "public function getOptions() {\n\t\tif ($this->row->options != '') {\n\t\t\t$options = explode(\";\", $this->row->options);\n\t\t}\n\t\tif ($this->row->intoptions != '') {\n\t\t\t$intoptions = explode(\";\", $this->row->intoptions);\n\t\t\t$options_map = array_combine($intoptions, $options);\n\t\t}\n\t\tif ($options) {\n\t\t\t$msg = \"Predefined Options:\\n\";\n\t\t\tif ($intoptions) {\n\t\t\t\tforeach ($options_map as $key => $label) {\n\t\t\t\t\t$save_link = $this->text->makeChatcmd('Select', \"/tell <myname> settings save {$this->row->name} {$key}\");\n\t\t\t\t\t$msg .= \"<tab> <highlight>{$label}<end> ({$save_link})\\n\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tforeach ($options as $char) {\n\t\t\t\t\t$save_link = $this->text->makeChatcmd('Select', \"/tell <myname> settings save {$this->row->name} {$char}\");\n\t\t\t\t\t$msg .= \"<tab> <highlight>{$char}<end> ({$save_link})\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $msg;\n\t}", "abstract protected function options(): array;", "public function options();", "public function options();", "public function options();", "public function options();", "public function options();", "public function getFormat(): array;", "public function course_format_options($foreditform = false) {\n static $courseformatoptions = false;\n if ($courseformatoptions === false) {\n $courseconfig = get_config('moodlecourse');\n $courseformatoptions = array(\n 'defaultsectiontype' => array(\n 'default' => 'topic',\n 'type' => PARAM_ALPHA,\n ),\n 'displaysectiontypegetstarted' => array(\n 'default' => false,\n 'type' => PARAM_BOOL,\n ),\n 'displaysectiontypeassess' => array(\n 'default' => false,\n 'type' => PARAM_BOOL,\n ),\n 'hiddensections' => array(\n 'default' => $courseconfig->hiddensections,\n 'type' => PARAM_INT,\n ),\n 'coursedisplay' => array(\n 'default' => $courseconfig->coursedisplay,\n 'type' => PARAM_INT,\n ),\n );\n }\n if ($foreditform && !isset($courseformatoptions['coursedisplay']['label'])) {\n $courseconfig = get_config('moodlecourse');\n $sectionmenu = array();\n $max = $courseconfig->maxsections;\n if (!isset($max) || !is_numeric($max)) {\n $max = 52;\n }\n for ($i = 0; $i <= $max; $i++) {\n $sectionmenu[$i] = \"$i\";\n }\n $courseformatoptionsedit = array(\n 'defaultsectiontype' => array(\n 'label' => new lang_string('defaultsectiontype', 'format_usqflexopen'),\n 'help' => 'defaultsectiontype',\n 'help_component' => 'format_usqflexopen',\n 'element_type' => 'select',\n 'element_attributes' => array(\n array(\n 'topic' => new lang_string('sectiontypetopic', 'format_usqflexopen'),\n 'week' => new lang_string('sectiontypeweek', 'format_usqflexopen')\n )\n ),\n ),\n 'displaysectiontypegetstarted' => array(\n 'label' => new lang_string('displaysectiontypegetstarted', 'format_usqflexopen'),\n 'help' => 'displaysectiontypegetstarted',\n 'help_component' => 'format_usqflexopen',\n 'element_type' => 'advcheckbox',\n 'element_attributes' => array(),\n ),\n 'displaysectiontypeassess' => array(\n 'label' => new lang_string('displaysectiontypeassess', 'format_usqflexopen'),\n 'help' => 'displaysectiontypeassess',\n 'help_component' => 'format_usqflexopen',\n 'element_type' => 'advcheckbox',\n 'element_attributes' => array(),\n ),\n 'hiddensections' => array(\n 'label' => new lang_string('hiddensections'),\n 'help' => 'hiddensections',\n 'help_component' => 'moodle',\n 'element_type' => 'select',\n 'element_attributes' => array(\n array(\n 0 => new lang_string('hiddensectionscollapsed'),\n 1 => new lang_string('hiddensectionsinvisible')\n )\n ),\n ),\n 'coursedisplay' => array(\n 'label' => new lang_string('coursedisplay'),\n 'element_type' => 'select',\n 'element_attributes' => array(\n array(\n COURSE_DISPLAY_SINGLEPAGE => new lang_string('coursedisplay_single'),\n COURSE_DISPLAY_MULTIPAGE => new lang_string('coursedisplay_multi'),\n self::COURSE_DISPLAY_SEPARATEPAGE => new lang_string('coursedisplay_separate', 'format_usqflexopen'),\n )\n ),\n 'help' => 'coursedisplay',\n 'help_component' => 'moodle',\n )\n );\n $courseformatoptions = array_merge_recursive($courseformatoptions, $courseformatoptionsedit);\n }\n return $courseformatoptions;\n }", "public static function getFormatInfo($format)\n {\n switch ($format) {\n case 0:\n return ['', 'Continuation of string variable'];\n case self::FORMAT_TYPE_A:\n return ['A', 'Alphanumeric'];\n case self::FORMAT_TYPE_AHEX:\n return ['AHEX', 'alphanumeric hexadecimal'];\n case self::FORMAT_TYPE_COMMA:\n return ['COMMA', 'F format with commas'];\n case self::FORMAT_TYPE_DOLLAR:\n return ['DOLLAR', 'Commas and floating point dollar sign'];\n case self::FORMAT_TYPE_F:\n return ['F', 'F (default numeric) format'];\n case self::FORMAT_TYPE_IB:\n return ['IB', 'Integer binary'];\n case self::FORMAT_TYPE_PIBHEX:\n return ['PIBHEX', 'Positive binary integer - hexadecimal'];\n case self::FORMAT_TYPE_P:\n return ['P', 'Packed decimal'];\n case self::FORMAT_TYPE_PIB:\n return ['PIB', 'Positive integer binary (Unsigned)'];\n case self::FORMAT_TYPE_PK:\n return ['PK', 'Positive packed decimal (Unsigned)'];\n case self::FORMAT_TYPE_RB:\n return ['RB', 'Floating point binary'];\n case self::FORMAT_TYPE_RBHEX:\n return ['RBHEX', 'Floating point binary - hexadecimal'];\n case self::FORMAT_TYPE_Z:\n return ['Z', 'Zoned decimal'];\n case self::FORMAT_TYPE_N:\n return ['N', 'N format - unsigned with leading zeros'];\n case self::FORMAT_TYPE_E:\n return ['E', 'E format - with explicit power of ten'];\n case self::FORMAT_TYPE_DATE:\n return ['DATE', 'Date format dd-mmm-yyyy'];\n case self::FORMAT_TYPE_TIME:\n return ['TIME', 'Time format hh:mm:ss.s'];\n case self::FORMAT_TYPE_DATETIME:\n return ['DATETIME', 'Date and time'];\n case self::FORMAT_TYPE_ADATE:\n return ['ADATE', 'Date in mm/dd/yyyy form'];\n case self::FORMAT_TYPE_JDATE:\n return ['JDATE', 'Julian date - yyyyddd'];\n case self::FORMAT_TYPE_DTIME:\n return ['DTIME', 'Date-time dd hh:mm:ss.s'];\n case self::FORMAT_TYPE_WKDAY:\n return ['WKDAY', 'Day of the week'];\n case self::FORMAT_TYPE_MONTH:\n return ['MONTH', 'Month'];\n case self::FORMAT_TYPE_MOYR:\n return ['MOYR', 'mmm yyyy'];\n case self::FORMAT_TYPE_QYR:\n return ['QYR', 'q Q yyyy'];\n case self::FORMAT_TYPE_WKYR:\n return ['WKYR', 'ww WK yyyy'];\n case self::FORMAT_TYPE_PCT:\n return ['PCT', 'Percent - F followed by \"%\"'];\n case self::FORMAT_TYPE_DOT:\n return ['DOT', 'Like COMMA, switching dot for comma'];\n case self::FORMAT_TYPE_CCA:\n return ['CCA', 'User-programmable currency format (1)'];\n case self::FORMAT_TYPE_CCB:\n return ['CCB', 'User-programmable currency format (2)'];\n case self::FORMAT_TYPE_CCC:\n return ['CCC', 'User-programmable currency format (3)'];\n case self::FORMAT_TYPE_CCD:\n return ['CCD', 'User-programmable currency format (4)'];\n case self::FORMAT_TYPE_CCE:\n return ['CCE', 'User-programmable currency format (5)'];\n case self::FORMAT_TYPE_EDATE:\n return ['EDATE', 'Date in dd.mm.yyyy style'];\n case self::FORMAT_TYPE_SDATE:\n return ['SDATE', 'Date in yyyy/mm/dd style'];\n default:\n return [null, null];\n }\n }", "public static function formats()\n {\n return self::$formats;\n }", "private function getAvailableFormats()\n {\n return array(\n 'tab',\n 'xml',\n 'json',\n 'perl',\n 'php',\n 'vaml',\n 'html',\n );\n }", "static public function options($language, $text_format, $md5_passwords) {\n return compact('language', 'text_format', 'md5_passwords');\n }", "private function parse_options()\n\t\t{\n\t\t\t$options = $this->options;\n\n\t\t\tforeach ( $options as $option ) {\n\n\t\t\t\tif ( $option[ 'type' ] == 'heading' ) {\n\t\t\t\t\t$tab_name = sanitize_title( $option[ 'name' ] );\n\t\t\t\t\t$this->tab_headers = array( $tab_name => $option[ 'name' ] );\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$option[ 'tab' ] = $tab_name;\n\t\t\t\t$tabs[ $tab_name ][ ] = $option;\n\n\t\t\t}\n\n\t\t\t$this->tabs = $tabs;\n\n\t\t\treturn $tabs;\n\t\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "public function parse_opts() : array {\n\t\tself::$opts = (object) json_decode( @file_get_contents( __DIR__.\"/opts.json\" ) );\n\t\tself::$opts = [ self::$opts->paste, self::$opts->expire ];\n\t\treturn self::$opts;\n\t}", "function applicable_formats() {\n return array('all' => true);\n }", "public static function getFormats()\n {\n return self::$formats;\n }", "public function getOptions()\r\n {\r\n }", "public function getFormats()\n {\n return $this->_formats;\n }", "public function get_options()\n {\n }", "protected function _getExtraOptions()\n {\n return array(\n 'table|t-s' => 'Which table to generate its DAO.',\n 'modelnamespace|M=s' => 'The model namespace',\n 'tablenamespace|T=s' => 'The table namespace'\n );\n }", "function custom_field_formats_for_select() {\n $model = ClassRegistry::init('CustomField');\n $formats = $model->FIELD_FORMATS;\n uasort($formats, array($this, '__sort_custom_field_formats_for_select'));\n $select = array();\n foreach ($formats as $k=>$format) {\n $select[$k] = __($format['name']);\n }\n return $select;\n }", "protected function getFormat($options)\n {\n // In Symfony Console, there is no way for us to differentiate\n // between the user specifying '--format=table', and the user\n // not specifying --format when the default value is 'table'.\n // Therefore, we must make --field always override --format; it\n // cannot become the default value for --format.\n if (!empty($options['field'])) {\n return 'string';\n }\n $options += [\n 'default-format' => false,\n 'pipe' => false,\n ];\n $options += [\n 'format' => $options['default-format'],\n 'format-pipe' => $options['default-format'],\n ];\n\n $format = $options['format'];\n if ($options['pipe']) {\n $format = $options['format-pipe'];\n }\n return $format;\n }", "public static function getFiletypeOptions()\n\t{\n\t\t$ftOptions = array(\n\t\t\tJHtml::_('select.option', 'pdf', JText::_('COM_ARTOFGM_OPTION_FORMAT_PDF')),\n\t\t\tJHtml::_('select.option', 'ps', JText::_('COM_ARTOFGM_OPTION_FORMAT_PS')),\n\t\t\tJHtml::_('select.option', 'doc', JText::_('COM_ARTOFGM_OPTION_FORMAT_DOC')),\n\t\t\tJHtml::_('select.option', 'xls', JText::_('COM_ARTOFGM_OPTION_FORMAT_XLS')),\n\t\t\tJHtml::_('select.option', 'ppt', JText::_('COM_ARTOFGM_OPTION_FORMAT_PPT')),\n\t\t\tJHtml::_('select.option', 'rtf', JText::_('COM_ARTOFGM_OPTION_FORMAT_RTF')),\n\t\t);\n\n\t\treturn $ftOptions;\n\t}", "public static function listFormats(){\n $list = array();\n foreach(self::$_resultFormats as $key => $item){\n $list[$key] = $item['description'];\n }\n return $list;\n }", "protected function _getOptions()\n {\n $options = array();\n\n // The default values for config settings.\n $options['files'] = $this->_getFilesToCheck($this->getArgument('to_check'));\n $options['standard'] = Mage::getBaseDir('lib') . DS . 'MageUC' . DS . 'Console' . DS .'Task' . DS . 'CheckStyle' . DS .'ruleset.xml';\n $options['verbosity'] = 1;\n $options['interactive'] = false;\n $options['local'] = false;\n $options['showSources'] = false;\n $options['extensions'] = array();\n $options['sniffs'] = array();\n $options['ignored'] = array();\n if (!is_null($this->getArgument('report_format'))) {\n $options['reports'] = array($this->getArgument('report_format') => null);\n } else {\n $options['reports'] = array();\n }\n $options['reportFile'] = self::getReportFileName();\n $options['reportWidth'] = 80;\n $options['generator'] = '';\n $options['tabWidth'] = 4;\n $options['encoding'] = 'utf-8';\n $options['errorSeverity'] = 1;\n $options['warningSeverity'] = 1;\n $options['default_standard'] = 'Zend'; //http://framework.zend.com/manual/fr/coding-standard.coding-style.html\n $options['showProgress'] = false;\n\n return $options;\n }", "public function getMatchableFormatParams();", "function applicable_formats() {\n return array('course-view-wiki' => true, 'mod-wiki' => true);\n }", "public function applicable_formats() {\n return array(\n 'course-view' => true,\n 'site' => true,\n 'mod' => false,\n 'my' => false,\n );\n }", "public function applicable_formats() {\n return array(\n 'course-view' => true,\n 'site' => true,\n 'mod' => false,\n 'my' => true\n );\n }", "public function getConvertOptionsAsString()\n {\n $options = $this->imagePath . ' ';\n foreach ($this->convertCommandOptions as $commandKey => $commandValue) {\n $options .= implode(' ', $this->getConvertFilters($commandKey)) . ' ';\n $options .= \"-{$commandKey} {$commandValue} \";\n }\n\n return $options;\n }", "public function parse_options(){\n\t\t\n\t\t//switch (explode(',',$this->options)){case title: $return[]='title: {usw}';break;} $this->parsed_options=implode(',',return);\n\t\t\n\t\t$this->parsed_options=\"chart: {\trenderTo: 'container',\tdefaultSeriesType: 'area',\t\tinverted: true},\n\t\t\t\t\ttitle: {\ttext: 'ein Beispiel'},\n\t\t\t\t\tsubtitle: {\tstyle: {position: 'absolute',right: '0px',\tbottom: '10px'\t}},\n\t\t\t\t\tlegend: {\tlayout: 'vertical',\talign: 'right',\tverticalAlign: 'top',x: -150,y: 100,floating: true,\tborderWidth: 1,\tbackgroundColor: '#FFFFFF'},\n\t\t\t\t\txAxis: {categories: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']},\n\t\t\t\t\tyAxis: {title: {text: 'x-Axentitel'},labels: {formatter: function() {return this.value;}},min: 0},\n\t\t\t\t\t\";\n\t\treturn true;\n\t}", "function option_definition() {\n $options = parent::option_definition();\n $options['year_range'] = array('default' => '-3:+3');\n $options['granularity'] = array('default' => 'month');\n $options['default_argument_type']['default'] = 'date';\n $options['add_delta'] = array('default' => '');\n $options['use_fromto'] = array('default' => '');\n $options['title_format'] = array('default' => '');\n $options['title_format_custom'] = array('default' => '');\n return $options;\n }", "public function &GetFormats()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n return $this->_formats;\n }", "protected function getOptions()\n\t{\n\t\treturn [\n\t\t];\n\t}", "protected function getOptions() {\n\t\treturn array(\n\t\t);\n\t}", "abstract public function format($options = null): ?string;", "public function getOptions($encoding = 'UTF-8') {}", "public function applicable_formats() {\n return array('site-index' => true, 'course-view-*' => true);\n }", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}" ]
[ "0.6208235", "0.620234", "0.6194938", "0.61932117", "0.6177409", "0.6177409", "0.6177409", "0.61272454", "0.61272454", "0.612638", "0.61212885", "0.6092796", "0.60680914", "0.5989749", "0.5973268", "0.5971609", "0.5971609", "0.5970162", "0.59525895", "0.5952339", "0.5952339", "0.5952339", "0.5952339", "0.5952339", "0.5952339", "0.59119153", "0.59044164", "0.58601016", "0.5859908", "0.5859908", "0.5859908", "0.5859908", "0.5859908", "0.5859908", "0.5859908", "0.5859908", "0.5859908", "0.5859908", "0.5859908", "0.5859908", "0.5859908", "0.5859908", "0.5859908", "0.5859908", "0.58550787", "0.5837469", "0.5828624", "0.58065015", "0.5801888", "0.5791236", "0.5778556", "0.5764485", "0.57592404", "0.5737969", "0.57379377", "0.5737748", "0.5725989", "0.5704419", "0.5704419", "0.5704419", "0.5704419", "0.5704419", "0.5703448", "0.5685449", "0.5681676", "0.5666396", "0.5660437", "0.5649446", "0.56472903", "0.5645765", "0.5645765", "0.5645765", "0.5645765", "0.56345373", "0.5611649", "0.56026214", "0.5595273", "0.5593798", "0.559216", "0.558182", "0.5579099", "0.5578587", "0.5578356", "0.55763817", "0.55762196", "0.5573427", "0.55488217", "0.55481815", "0.55431", "0.5542818", "0.5540605", "0.5535634", "0.5523128", "0.5520462", "0.5517421", "0.55121785", "0.5510089", "0.55067205", "0.5503696", "0.5503696" ]
0.7741456
0
Returns the static model of the specified AR class.
public static function model($className=__CLASS__) { return parent::model($className); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function model()\r\n {\r\n return static::class;\r\n }", "public static function model() {\n return parent::model(get_called_class());\n }", "public static function model($class = __CLASS__)\n {\n return parent::model($class);\n }", "public static function model($class = __CLASS__)\n\t{\n\t\treturn parent::model(get_called_class());\n\t}", "static public function model($className = __CLASS__)\r\n {\r\n return parent::model($className);\r\n }", "public static function model($className=__CLASS__) { return parent::model($className); }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return CActiveRecord::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }" ]
[ "0.7483812", "0.7379309", "0.71527064", "0.7139308", "0.7061938", "0.70307606", "0.69274145", "0.69274145", "0.69244", "0.69023794", "0.68936044", "0.68936044", "0.68887764", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226", "0.68688226" ]
0.0
-1
Retrieves a list of models based on the current search/filter conditions.
public function search() { // Warning: Please modify the following code to remove attributes that // should not be searched. $criteria=new CDbCriteria; $criteria->compare('pk',$this->pk); $criteria->compare('nombres',$this->nombres,true); $criteria->compare('apellidos',$this->apellidos,true); $criteria->compare('rut',$this->rut); $criteria->compare('fecha_nacimiento',$this->fecha_nacimiento,true); $criteria->compare('genero',$this->genero,true); $criteria->compare('direccion',$this->direccion,true); $criteria->compare('comuna_id',$this->comuna_id); $criteria->compare('ec_fk',$this->ec_fk); $criteria->compare('carrera_fk',$this->carrera_fk); $criteria->compare('telefono',$this->telefono,true); $criteria->compare('celular',$this->celular,true); $criteria->compare('email',$this->email,true); $criteria->compare('estado',$this->estado); $criteria->compare('busqueda',$this->busqueda); $criteria->compare('archivo_curriculum',$this->archivo_curriculum,true); return new CActiveDataProvider($this, array( 'criteria'=>$criteria, )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getModels();", "public function getModels();", "public function findAll($model);", "public function getListSearch()\n {\n //set warehouse and client id\n $warehouse_id = ( !is_numeric(request()->get('warehouse_id')) ) ? auth()->user()->current_warehouse_id : request()->get('warehouse_id');\n $client_id = ( !is_numeric(request()->get('client_id')) ) ? auth()->user()->current_client_id : request()->get('client_id');\n\n //instantiate model and run search\n $product_model = new Product();\n return $product_model->getListSearch(request()->get('search_term'), $warehouse_id, $client_id);\n }", "public function getModels()\n\t{\n\t\t$scope = $this->scopeName;\n\t\treturn CActiveRecord::model($this->baseModel)->$scope()->findAll();\n\t}", "protected function findModel()\n {\n $class = $this->model;\n $query = $class::query();\n\n foreach ($this->input as $key => $value) {\n $where = is_array($value) ? 'whereIn' : 'where';\n $query->$where($key, $value);\n }\n\n return $query->get();\n }", "public function modelScans()\n {\n if ($this->scanEverything) {\n return $this->getAllClasses();\n }\n\n return $this->scanModels;\n }", "public function listModels() {\n\n $config = $this->initConfig($version = AnalyzeModel::VERSION);\n\n $config->setQuery( [ 'version' => $version ] );\n\n $config->setMethod(HttpClientConfiguration::METHOD_GET);\n $config->setType(HttpClientConfiguration::DATA_TYPE_JSON);\n $config->setURL(self::BASE_URL.\"/models\");\n\n return $this->sendRequest($config);\n }", "public function getModelsForIndex()\n {\n $models = [];\n $all_models = $this->getAllModels();\n\n foreach ($all_models as $model) {\n //parse model\n $pieces = explode('.', $model);\n if (count($pieces) != 2) {\n throw new Exception('Parse error in AppModelList');\n }\n //check form match\n $app_model = $pieces[1];\n $link = $this->convertModelToLink($app_model);\n\n // add to actions\n $models[$app_model]['GET'] = [\n [\n 'action' => 'index',\n 'description' => 'List & filter all ' . $app_model . ' resources.',\n 'route' => '/' . env('EASY_API_BASE_URL', 'easy-api') . '/' . $link\n ],\n [\n 'action' => 'show',\n 'description' => 'Show the ' . $app_model . ' that has the matching {id} from the route.',\n 'route' => '/' . env('EASY_API_BASE_URL', 'easy-api') . '/' . $link . '/{id}'\n ]\n ];\n }\n return $models;\n }", "public function getModels()\n {\n $this->prepare();\n\n return $this->_models;\n }", "public function getModels()\n {\n $this->prepare();\n\n return $this->_models;\n }", "public function searchableBy()\n {\n return [];\n }", "public function all($model){\n\n if(!class_exists($model)){\n return new $model;\n }\n\n $table = $this->getTableName($model);\n $stmt = $this->pdo->prepare('select * from ' . $table);\n $stmt->execute();\n\n return $stmt->fetchAll(\\PDO::FETCH_CLASS, $model);\n }", "public static function find($model, $conditions = null, $orderby = null){\n\t\t$sql = \"SELECT * FROM \" . self::table_for($model);\n\t\tif ($conditions) $sql .= \" WHERE \" . self::make_conditions($conditions);\n\t\tif ($orderby)\t$sql .= \" ORDER BY \" . $orderby;\n\t\t\n\t\t$resultset = self::do_query($sql);\n\t\treturn self::get_results($resultset, $model);\n\t}", "function get_model_list($where=\"1\",$where_array,$sort_by=\"\"){\n\t\t$data= $this->select_query(\"make_model\",\"id,name,del_status\",$where,$where_array,$sort_by);\n\t\treturn $data;\n\t}", "public static function search()\n {\n return self::filterSearch([\n 'plot_ref' => 'string',\n 'plot_name' => 'string',\n 'plot_start_date' => 'string',\n 'user.name' => self::filterOption([\n 'select' => 'id',\n 'label' => trans_title('users', 'plural'),\n 'fields' => ['id', 'name'],\n //ComboBox user list base on the current client\n //See in App\\Models\\Users\\UsersScopes\n 'model' => app(User::class)->bySearch(),\n ]),\n 'client.client_name' => self::filterOption([\n 'conditional' => Credentials::hasRoles(['admin', 'admin-gv']),\n 'select' => 'client_id',\n 'label' => trans_title('clients', 'plural'),\n 'model' => Client::class,\n 'fields' => ['id', 'client_name']\n ])\n ]);\n }", "public function getList()\n {\n \treturn $this->model->where('is_base', '=', 0)->get();\n }", "public function getList()\n {\n $this->db->order_by(\"id\", 'desc');\n $this->db->where('status', 1);\n return $this->db->get($this->model);\n }", "public function findAll()\n {\n $fields = $options = [];\n //$options['debug'] = 1;\n $options['enablefieldsfe'] = 1;\n\n return $this->search($fields, $options);\n }", "public function findAll()\n {\n return $this->model->all();\n }", "public function get_multiple()\n\t{\n\t\t$options = array_merge(array(\n\t\t\t'offset' => 0,\n\t\t\t'limit' => 20,\n\t\t\t'sort_by' => 'name',\n\t\t\t'order' => 'ASC'\n\t\t), Input::all(), $this->options);\n\n\t\t// Preparing our query\n\t\t$results = $this->model->with($this->includes);\n\n\t\tif(count($this->join) > 0)\n\t\t{\n\t\t\tforeach ($this->join as $table => $settings) {\n\t\t\t\t$results = $results->join($table, $settings['join'][0], $settings['join'][1], $settings['join'][2]);\n\t\t\t\tif($settings['columns'])\n\t\t\t\t{\n\t\t\t\t\t$options['sort_by'] = (in_array($options['sort_by'], $settings['columns']) ? $table : $this->model->table()).'.'.$options['sort_by'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(stripos($options['sort_by'], '.') === 0)\n\t\t{\n\t\t\t$options['sort_by'] = $this->model->table().'.' . $options['sort_by'];\n\t\t}\n\t\t\n\t\t// Add where's to our query\n\t\tif(array_key_exists('search', $options))\n\t\t{\n\t\t\tforeach($options['search']['columns'] as $column)\n\t\t\t{\n\t\t\t\t$results = $results->or_where($column, '~*', $options['search']['string']);\n\t\t\t}\n\t\t}\n\n\t\t$total = (int) $results->count();\n\n\t\t// Add order_by, skip & take to our results query\n\t\t$results = $results->order_by($options['sort_by'], $options['order'])->skip($options['offset'])->take($options['limit'])->get();\n\n\t\t$response = array(\n\t\t\t'results' => to_array($results),\n\t\t\t'total' => $total,\n\t\t\t'pages' => ceil($total / $options['limit'])\n\t\t);\n\n\t\treturn Response::json($response);\n\t}", "public function getAll()\n {\n return DB::table('product_models')->get()->all();\n }", "public function filter($params) {\n $model = $this->model;\n $keyword = isset($params['keyword'])?$params['keyword']:'';\n $sort = isset($params['sort'])?$params['sort']:''; \n if ($sort == 'name') {\n $query = $model->where('name','LIKE','%'.$keyword.'%')->orderBy('name'); \n }\n else if ($sort == 'newest') {\n $query = $model->where('name','LIKE','%'.$keyword.'%')->orderBy('updated_at','desc'); \n }\n else {\n $query = $model->where('name','LIKE','%'.$keyword.'%'); \n }\n /** filter by class_id */ \n if (isset($params['byclass']) && isset($params['bysubject'])) {\n $query = $model->listClass($params['byclass'], $params['bysubject']);\n return $query; \n }\n else if (isset($params['byclass'])) { \n $query = $model->listClass($params['byclass']);\n return $query;\n }\n else if (isset($params['bysubject'])) {\n $query = $model->listClass(0,$params['bysubject']);\n return $query;\n }\n /** filter by course status */\n if (isset($params['incomming'])) {\n $query = $model->listCourse('incomming');\n return $query;\n }\n else if (isset($params['upcomming'])) {\n $query = $model->listCourse('upcomming');\n return $query;\n }\n $result = $query->paginate(10); \n return $result; \n }", "public function getAll($model, $filters = array())\n {\n $repo = $this->getRepository($model);\n\n return $repo->getAll($filters);\n }", "public function filters(Model $model): array\n {\n return [];\n }", "public function getResults()\n {\n if($this->search) {\n foreach ($this->filters as $field) {\n $field = array_filter(explode('.', $field));\n if(count($field) == 2) {\n $this->query->whereHas($field[0], function ($q) use ($field) {\n $q->where($field[1], 'ilike', \"%{$this->search}%\");\n });\n }\n if(count($field) == 1) {\n $this->query->orWhere($field[0], 'ilike', \"%{$this->search}%\");\n }\n }\n }\n\n if($this->where) {\n foreach ($this->where as $field => $value) {\n $this->query->where($field, $value);\n }\n }\n\n if ($this->whereBetween) {\n foreach ($this->whereBetween as $field => $value)\n $this->query->whereBetween($field, $value);\n }\n// dd($this->query->toSql());\n return $this->query->paginate($this->per_page);\n }", "protected function _searchInModel(Model $model, Builder $items){\n foreach($model->searchable as $param){\n if($param != 'id'){\n if(isset($this->request[$param]))\n $items = $items->where($param, $this->request[$param]);\n if(isset($this->request[$param.'_like']))\n $items = $items->where($param, 'like', '%'.$this->request[$param.'_like'].'%');\n }else{\n if(isset($this->request['id'])){\n $ids = explode(',', $this->request['id']);\n $items = $items->whereIn('id', $ids);\n }\n }\n }\n\n return $items;\n }", "public function getAll($model)\n {\n $sql = \"SELECT * FROM {$this->table}\";\n $req = Database::getBdd()->prepare($sql);\n $req->execute();\n return $req->fetchAll(PDO::FETCH_CLASS,get_class($this->model));\n }", "private function getAllModels()\n {\n return (object)ModelRegistry::getAllObjects();\n }", "public function findAll()\n {\n return $this->driver->findAll($this->model);\n }", "public function getAllFilters();", "public function GetAll()\n {\n return $this->model->all();\n }", "public function fetch_all_models() {\n global $pdo;\n\n $query = $pdo->prepare(\"SELECT * FROM talents\");\n $query -> execute();\n return $query->fetchAll(\\PDO::FETCH_ASSOC);\n }", "public function findWhere($model, $conditions, $limit = 0){\n\n if(!class_exists($model)){\n return new $model;\n }\n\n $table = $this->getTableName($model);\n\n $sql = 'select * from ' . $table . ' where ';\n $values = [];\n $counter = 1;\n\n foreach ($conditions as $key => $value) {\n if($counter > 1)\n $sql .= ' AND ';\n\n $sql .= $key . '=?';\n $values[] = $value; \n $counter++;\n }\n\n if($limit > 0)\n $sql .= ' LIMIT ' . $limit;\n \n $stmt = $this->pdo->prepare($sql);\n $stmt->execute($values);\n\n return $stmt->fetchAll(\\PDO::FETCH_CLASS, $model);\n }", "public function search() {\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('type', $this->type);\n\n return $criteria;\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t//$criteria->compare('object_id',$this->object_id);\n\t\t$criteria->compare('object_type_id',$this->object_type_id);\n\t\t$criteria->compare('data_type_id',$this->data_type_id);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('client_ip',$this->client_ip,true);\n\t\t$criteria->compare('url',$this->url,true);\n\t\t$criteria->compare('url_origin',$this->url_origin,true);\n\t\t$criteria->compare('device',$this->device,true);\n\t\t$criteria->compare('country_name',$this->country_name,true);\n\t\t$criteria->compare('country_code',$this->country_code,true);\n\t\t$criteria->compare('regionName',$this->regionName,true);\n\t\t$criteria->compare('cityName',$this->cityName,true);\n\t\t$criteria->compare('browser',$this->browser,true);\n\t\t$criteria->compare('os',$this->os,true);\n\t\t\t// se agrego el filtro por el usuario actual\n\t\t$idUsuario=Yii::app()->user->getId();\n\t\t$model = Listings::model()->finbyAttributes(array('user_id'=>$idUsuario));\n\t\tif($model->id!=\"\"){\n\t\t\t$criteria->compare('object_id',$model->id);\t\n\t\t}else{\n\t\t\t$criteria->compare('object_id',\"Null\");\t\n\t\t}\n\t\t\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function getModels()\n {\n return $this->_models;\n }", "public function getSearchFields();", "public function all()\n {\n return $this->model->get();\n }", "public function getAllModels()\n {\n try {\n return AppModelList::models();\n }\n catch (Throwable $t) {\n throw new Exception('Parse Error: AppModelList.php has been corrupted.');\n }\n }", "protected function _list_items_query()\n\t{\n\t\t$this->filters = (array) $this->filters;\n\t\t$where_or = array();\n\t\t$where_and = array();\n\t\tforeach($this->filters as $key => $val)\n\t\t{\n\t\t\tif (is_int($key))\n\t\t\t{\n\t\t\t\tif (isset($this->filters[$val])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$key = $val;\n\t\t\t\t$val = $this->filter_value;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// used for separating table names and fields since periods get translated to underscores\n\t\t\t\t$key = str_replace(':', '.', $key);\n\t\t\t}\n\t\t\t\n\t\t\t$joiner = $this->filter_join;\n\t\t\t\n\t\t\tif (is_array($joiner))\n\t\t\t{\n\t\t\t\tif (isset($joiner[$key]))\n\t\t\t\t{\n\t\t\t\t\t$joiner = $joiner[$key];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$joiner = 'or';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!empty($val)) \n\t\t\t{\n\t\t\t\t$joiner_arr = 'where_'.$joiner;\n\t\t\t\t\n\t\t\t\tif (strpos($key, '.') === FALSE AND strpos($key, '(') === FALSE) $key = $this->table_name.'.'.$key;\n\t\t\t\t\n\t\t\t\t//$method = ($joiner == 'or') ? 'or_where' : 'where';\n\t\t\t\t\n\t\t\t\t// do a direct match if the values are integers and have _id in them\n\t\t\t\tif (preg_match('#_id$#', $key) AND is_numeric($val))\n\t\t\t\t{\n\t\t\t\t\t//$this->db->where(array($key => $val));\n\t\t\t\t\tarray_push($$joiner_arr, $key.'='.$val);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// from imknight https://github.com/daylightstudio/FUEL-CMS/pull/113#commits-pushed-57c156f\n\t\t\t\t//else if (preg_match('#_from#', $key) OR preg_match('#_to#', $key))\n\t\t\t\telse if (preg_match('#_from$#', $key) OR preg_match('#_fromequal$#', $key) OR preg_match('#_to$#', $key) OR preg_match('#_toequal$#', $key) OR preg_match('#_equal$#', $key))\n\t\t\t\t{\n\t\t\t\t\t//$key = strtr($key, array('_from' => ' >', '_fromequal' => ' >=', '_to' => ' <', '_toequal' => ' <='));\n\t\t\t\t\t$key_with_comparison_operator = preg_replace(array('#_from$#', '#_fromequal$#', '#_to$#', '#_toequal$#', '#_equal$#'), array(' >', ' >=', ' <', ' <=', ' ='), $key);\n\t\t\t\t\t//$this->db->where(array($key => $val));\n\t\t\t\t\t//$where_or[] = $key.'='.$this->db->escape($val);\n\t\t\t\t\tarray_push($$joiner_arr, $key_with_comparison_operator.$this->db->escape($val));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//$method = ($joiner == 'or') ? 'or_like' : 'like';\n\t\t\t\t\t//$this->db->$method('LOWER('.$key.')', strtolower($val), 'both');\n\t\t\t\t\tarray_push($$joiner_arr, 'LOWER('.$key.') LIKE \"%'.strtolower($val).'%\"');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// here we will group the AND and OR separately which should handle most cases me thinks... but if not, you can always overwrite\n\t\t$where = array();\n\t\tif (!empty($where_or))\n\t\t{\n\t\t\t$where[] = '('.implode(' OR ', $where_or).')';\n\t\t}\n\t\tif (!empty($where_and))\n\t\t{\n\t\t\t$where[] = '('.implode(' AND ', $where_and).')';\n\t\t}\n\t\tif (!empty($where))\n\t\t{\n\t\t\t$where_sql = implode(' AND ', $where);\n\t\t\t$this->db->where($where_sql);\n\t\t}\n\t\t\n\t\t\n\t\t// set the table here so that items total will work\n\t\t$this->db->from($this->table_name);\n\t}", "public function getAll()\n {\n return $this->fetchAll($this->searchQuery(0));\n }", "public function listAction() {\n\t\t$this->view->config = Marcel_Backoffice_Config::getInstance()->getConfig();\n\t\t$modelName = $this->_getParam('model');\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$this->view->cols = $model->info('cols');\n\t\t$select = null;\n\t\t\n\t\tif ($this->_request->getParam('data')) {\n\t\t\t\n\t\t\t$data = unserialize($this->_request->getParam('data'));\n\t\t\t$aWhere = array();\n\t\t\t$searchText = array();\n\t\t\t\n\t\t\tforeach ($data['query'] as $key => $q) {\n\t\t\t\n\t\t\t\tif (isset($data['fields'][$key]) && !empty($data['fields'][$key])) {\n\t\t\t\t\n\t\t\t\t\t$func = addslashes($data['func'][$key]);\n\t\t\t\t\t$q =\taddslashes($q);\n\t\t\t\t\t$tmpWhere = array();\n\t\t\t\t\t$searchText[] = implode(' OU ', $data['fields'][$key]) . ' ' . $this->view->func[$func] . ' \"' . stripslashes($q) . '\"';\n\t\t\t\t\t\n\t\t\t\t\tforeach ($data['fields'][$key] as $field) {\n\t\t\t\t\t\n\t\t\t\t\t\t$field\t=\taddslashes($field);\n\t\t\t\t\t\tswitch ($func) {\n\t\t\t\t\t\t\tcase 'LIKE':\n\t\t\t\t\t\t\tcase 'NOT LIKE':\n\t\t\t\t\t\t\tcase '=':\n\t\t\t\t\t\t\tcase '!=':\n\t\t\t\t\t\t\tcase '>':\n\t\t\t\t\t\t\tcase '>=':\n\t\t\t\t\t\t\tcase '<':\n\t\t\t\t\t\t\tcase '<=':\n\t\t\t\t\t\t\t\tif (trim($q) != '') { $tmpWhere[] = $field . ' ' . $func . ' \\'' . $q . '\\''; }\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"= ''\":\n\t\t\t\t\t\t\tcase \"!= ''\":\n\t\t\t\t\t\t\tcase 'IS NULL':\n\t\t\t\t\t\t\tcase 'IS NOT NULL':\n\t\t\t\t\t\t\t\t$tmpWhere[] = $field . ' ' . stripslashes($func);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tif (trim($q) != '') { $tmpWhere[] = $field . ' LIKE \\'%' . $q . '%\\''; }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$aWhere[] = '(' . implode(' OR ', $tmpWhere) . ')';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!empty($aWhere)) { $select = $model->select()->where(implode(' AND ', $aWhere)); }\n\t\t\t$this->view->searchText = $searchText;\n\t\t}\n\t\t$this->view->model = $modelName;\n\t\t$this->view->allData = $model->fetchAll($select);\n\t\t$this->view->data = Zend_Paginator::factory($this->view->allData)\n\t\t\t\t\t\t\t->setCurrentPageNumber($this->_getParam('page', 1));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\n\t\t$criteria->compare('type_key',$this->type_key,true);\n\n\t\t$criteria->compare('type_name',$this->type_name,true);\n\n\t\t$criteria->compare('model',$this->model,true);\n\n\t\t$criteria->compare('status',$this->status,true);\n\t\t\n\t\t$criteria->compare('seo_title',$this->seo_title,true);\n\t\t\n\t\t$criteria->compare('seo_keywords',$this->seo_keywords,true);\n\t\t\n\t\t$criteria->compare('seo_description',$this->seo_description,true);\n\n\t\treturn new CActiveDataProvider('ModelType', array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function index(Request $request)\n {\n $this->validate($request, [\n 'type' => 'required',\n 'searched' => 'required',\n ]);\n\n try {\n if ($request->type == 'Categories') {\n return Category::search($request->searched)->take(20)->get();\n }\n\n if ($request->type == 'Submissions') {\n return $this->sugarFilter(Submission::search($request->searched)->take(20)->get());\n }\n\n if ($request->type == 'Comments') {\n return $this->withoutChildren(Comment::search($request->searched)->take(20)->get());\n }\n\n if ($request->type == 'Users') {\n return User::search($request->searched)->take(20)->get();\n }\n } catch (\\Exception $exception) {\n app('sentry')->captureException($exception);\n\n return [];\n }\n }", "public function getReturnModels(){\r\n return array_values($this->models);\r\n }", "public function findAll()\n {\n $models = $this->getDoctrineRepository()->findAll();\n $this->events()->trigger(__FUNCTION__ . '.post', $this, array(\n 'model' => $models,\n 'om' => $this->getObjectManager())\n );\n return $models;\n }", "public function models();", "public function search($conditions)\n\t{\n\t\t$limit = (isset($conditions['limit']) && $conditions['limit'] !== null ? $conditions['limit'] : 10);\n\t\t$result = array();\n\t\t$alphabets = [];\n\n\t\tDB::enableQueryLog();\n\n\t\t$mem = new Memcached();\n\t\t$mem->addServer(env('memcached_server'), env('memcached_port'));\n\n\t\t/* Get Default Logo Link on setting_object table */\n\t\t$logoMem = $mem->get('logo_course');\n\n\t\tif ($logoMem)\n\t\t{\n\t\t\t$default_logo = $logoMem;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$default_logo = $this->getDefaultLogo();\n\t\t\t$mem->set('logo_course', $default_logo);\n\t\t}\n\n\t\tif (isset($conditions['alphabet']) && $conditions['alphabet'] !== null && sizeof($conditions['alphabet']) > 0) {\n\t\t\tforeach ($conditions['alphabet'] as $item) {\n\t\t\t\t$alphabets[] = \"lower(entity.name) like \" . DB::Raw(\"'\" . strtolower($item) . \"%'\");\n\t\t\t\t$alphabets[] = \"lower(curriculum.name) like \" . DB::Raw(\"'\" . strtolower($item) . \"%'\");\n\t\t\t}\n\t\t}\n\n\t\t$extraGroup = (isset($conditions['sort']) && $conditions['sort'] !== null ? $conditions['sort'] : '' );\n\t\t$extraGroup = str_replace(' ASC', '',$extraGroup);\n\t\t$extraGroup = str_replace(' DESC', '',$extraGroup);\n\n\t\t$searchData = DB::table('course')\n\t\t\t->select('curriculum.curriculum_id','course.course_id', DB::raw('entity.logo entity_logo'), 'course.day_of_week',\n\t\t\t\tDB::raw('entity.name entity_name, curriculum.name curriculum_name'), 'course.time_start', 'course.time_end')\n\t\t\t->whereRaw(\n\t\t\t\t(isset($conditions['is_free_trial'])&& sizeof($conditions['is_free_trial']) > 0 ? \"course.is_free_trial in (\" . implode(\",\", $conditions['is_free_trial']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['country_id']) && $conditions['country_id'] !== null ? \"campus.country_id in (\" . implode(\",\",$conditions['country_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['city_id']) && $conditions['city_id'] !== null ? \"campus.city_id in (\" . implode(\",\",$conditions['city_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['location_id']) && $conditions['location_id'] !== null ? \"campus.location_id in (\" . implode(\",\",$conditions['location_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['activity_id']) && $conditions['activity_id'] !== null ? \"program.activity_id in (\" . implode(\",\",$conditions['activity_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_classification_id']) && $conditions['activity_classification_id'] !== null ? \"activity.activity_classification_id in (\" . implode(\",\",$conditions['activity_classification_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_type_id']) && $conditions['activity_type_id'] !== null ? \"activity_classification.activity_type_id in (\" . implode(\",\",$conditions['activity_type_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['event_type_id']) && $conditions['event_type_id'] !== null ? \"program.event_type_id in (\" . implode(\",\",$conditions['event_type_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['facility_id']) && $conditions['facility_id'] !== null ? \"campus.facility_id in (\" . implode(\",\",$conditions['facility_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['campus_id']) && $conditions['campus_id'] !== null ? \"campus_arena.campus_id in (\" . implode(\",\",$conditions['campus_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['program_id']) && $conditions['program_id'] !== null ? \"curriculum.program_id in (\" . implode(\",\",$conditions['program_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['arena_id']) && $conditions['arena_id'] !== null ? \"campus_arena.arena_id in (\" . implode(\",\",$conditions['arena_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['provider_id']) && $conditions['provider_id'] !== null ? \"program.provider_id in (\" . implode(\",\",$conditions['provider_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['user_id']) && $conditions['user_id'] !== null ? \"schedule.instructor_id in (\" . implode(\",\",$conditions['user_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['day_of_week']) && $conditions['day_of_week'] !== null ? \"course.day_of_week in (\" . implode(\",\",$conditions['day_of_week']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['time_start']) && $conditions['time_start'] !== null ? \"time(course.time_start) = time('\" . $conditions['time_start'] . \"') AND \" : '') .\n\t\t\t\t(isset($conditions['time_end']) && $conditions['time_end'] !== null ? \"time(course.time_end) = time('\" . $conditions['time_end'] . \"') AND \" : '') .\n\n\t\t\t\t(isset($conditions['audience_gender_id']) && $conditions['audience_gender_id'] !== null ? \"course.audience_gender_id in (\" . implode(\",\",$conditions['audience_gender_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['audience_generation_id']) && $conditions['audience_generation_id'] !== null ? \"course.audience_generation_id in (\" . implode(\",\",$conditions['audience_generation_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['age_range_top']) && $conditions['age_range_top'] !== null ? \"course.age_range_top >= \" . $conditions['age_range_top'] . \" AND \" : '') .\n\t\t\t\t(isset($conditions['age_range_bottom']) && $conditions['age_range_bottom'] !== null ? \"course.age_range_bottom <= \" . $conditions['age_range_bottom'] . \" AND \" : '') .\n\n\t\t\t\t(isset($conditions['keyword']) && sizeof($conditions['keyword']) > 0 ? \"(\" . implode(\" OR \", $conditions['keyword']) . \") AND \" : '') .\n\t\t\t\t(isset($alphabets) && sizeof($alphabets) > 0 ? \"(\" . join(\" OR \", $alphabets) . \") AND \" : '') .\n\t\t\t\t('course.status = 0')\n\t\t\t)\n\t\t\t->join('campus_arena', function($join){\n\t\t\t\t$join->on('course.campus_arena_id','campus_arena.campus_arena_id');\n\t\t\t\t//$join->on('course.arena_id', 'campus_arena.arena_id');\n\t\t\t})\n\t\t\t->leftjoin('campus', 'campus_arena.campus_id', 'campus.campus_id')\n\t\t\t->leftjoin('location', 'campus.location_id', 'location.location_id')\n\n\t\t\t->leftjoin('facility', function ($join) {\n\t\t\t\t$join->on('campus.facility_id','facility.facility_id');\n\t\t\t\t$join->on('campus.country_id','facility.country_id');\n\t\t\t})\n\n\t\t\t->leftjoin('curriculum', 'course.curriculum_id', 'curriculum.curriculum_id')\n\n\t\t\t->leftjoin('program','program.program_id','curriculum.program_id')\n\t\t\t->leftjoin('provider', 'program.provider_id', 'provider.provider_id')\n\t\t\t->leftjoin('entity','provider.entity_id','entity.entity_id')\n\t\t\t->leftjoin('event_type', 'program.event_type_id', 'event_type.event_type_id')\n\t\t\t/*->join('entity', 'provider.entity_id', 'entity.entity_id')*/\n\n\t\t\t->leftjoin('schedule', 'course.course_id', 'schedule.course_id')\n\t\t\t->leftjoin('user', 'schedule.instructor_id', 'user.user_id')\n\t\t\t->leftjoin('activity', 'program.activity_id', 'activity.activity_id')\n\t\t\t->leftjoin('activity_classification', 'activity_classification.activity_classification_id', 'activity.activity_classification_id')\n\t\t\t->groupBy(\n\t\t\t\tDB::raw('curriculum.curriculum_id, course.course_id, entity.logo, course.day_of_week, entity.name, curriculum.name, course.time_start, course.time_end' .\n\t\t\t\t\t(isset($conditions['sort']) && $conditions['sort'] !== null ? \", \" . $extraGroup : '' )\n\t\t\t\t)\n\t\t\t)\n\t\t\t->orderByRaw(isset($conditions['sort']) && $conditions['sort'] !== null ? $conditions['sort'] : 'course.day_of_week ASC, course.course_id DESC')\n\t\t\t->limit($limit)\n\t\t\t->offset(isset($conditions['page']) && $conditions['page'] !== null ? ($conditions['page']-1) * $limit : 0)\n\t\t\t->get();\n\n\t\t$searchAll = DB::table('course')\n\t\t\t->select('curriculum.curriculum_id','course.course_id', DB::raw('entity.logo entity_logo'), 'course.day_of_week',\n\t\t\t\tDB::raw('entity.name entity_name, curriculum.name curriculum_name'), 'course.time_start', 'course.time_end')\n\t\t\t->whereRaw(\n\t\t\t\t(isset($conditions['is_free_trial'])&& sizeof($conditions['is_free_trial']) > 0 ? \"course.is_free_trial in (\" . implode(\",\", $conditions['is_free_trial']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['country_id']) && $conditions['country_id'] !== null ? \"campus.country_id in (\" . implode(\",\",$conditions['country_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['city_id']) && $conditions['city_id'] !== null ? \"campus.city_id in (\" . implode(\",\",$conditions['city_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['location_id']) && $conditions['location_id'] !== null ? \"campus.location_id in (\" . implode(\",\",$conditions['location_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['activity_id']) && $conditions['activity_id'] !== null ? \"program.activity_id in (\" . implode(\",\",$conditions['activity_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_classification_id']) && $conditions['activity_classification_id'] !== null ? \"activity.activity_classification_id in (\" . implode(\",\",$conditions['activity_classification_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_type_id']) && $conditions['activity_type_id'] !== null ? \"activity_classification.activity_type_id in (\" . implode(\",\",$conditions['activity_type_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['event_type_id']) && $conditions['event_type_id'] !== null ? \"program.event_type_id in (\" . implode(\",\",$conditions['event_type_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['facility_id']) && $conditions['facility_id'] !== null ? \"campus.facility_id in (\" . implode(\",\",$conditions['facility_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['campus_id']) && $conditions['campus_id'] !== null ? \"campus_arena.campus_id in (\" . implode(\",\",$conditions['campus_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['program_id']) && $conditions['program_id'] !== null ? \"curriculum.program_id in (\" . implode(\",\",$conditions['program_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['arena_id']) && $conditions['arena_id'] !== null ? \"campus_arena.arena_id in (\" . implode(\",\",$conditions['arena_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['provider_id']) && $conditions['provider_id'] !== null ? \"program.provider_id in (\" . implode(\",\",$conditions['provider_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['user_id']) && $conditions['user_id'] !== null ? \"schedule.instructor_id in (\" . implode(\",\",$conditions['user_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['day_of_week']) && $conditions['day_of_week'] !== null ? \"course.day_of_week in (\" . implode(\",\",$conditions['day_of_week']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['time_start']) && $conditions['time_start'] !== null ? \"time(course.time_start) = time('\" . $conditions['time_start'] . \"') AND \" : '') .\n\t\t\t\t(isset($conditions['time_end']) && $conditions['time_end'] !== null ? \"time(course.time_end) = time('\" . $conditions['time_end'] . \"') AND \" : '') .\n\n\t\t\t\t(isset($conditions['audience_gender_id']) && $conditions['audience_gender_id'] !== null ? \"course.audience_gender_id in (\" . implode(\",\",$conditions['audience_gender_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['audience_generation_id']) && $conditions['audience_generation_id'] !== null ? \"course.audience_generation_id in (\" . implode(\",\",$conditions['audience_generation_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['age_range_top']) && $conditions['age_range_top'] !== null ? \"course.age_range_top >= \" . $conditions['age_range_top'] . \" AND \" : '') .\n\t\t\t\t(isset($conditions['age_range_bottom']) && $conditions['age_range_bottom'] !== null ? \"course.age_range_bottom <= \" . $conditions['age_range_bottom'] . \" AND \" : '') .\n\n\t\t\t\t(isset($conditions['keyword']) && sizeof($conditions['keyword']) > 0 ? \"(\" . implode(\" OR \", $conditions['keyword']) . \") AND \" : '') .\n\t\t\t\t(isset($alphabets) && sizeof($alphabets) > 0 ? \"(\" . join(\" OR \", $alphabets) . \") AND \" : '') .\n\t\t\t\t('course.status = 0')\n\t\t\t)\n\t\t\t->join('campus_arena', function($join){\n\t\t\t\t$join->on('course.campus_arena_id','campus_arena.campus_arena_id');\n\t\t\t\t//$join->on('course.arena_id', 'campus_arena.arena_id');\n\t\t\t})\n\t\t\t->leftjoin('campus', 'campus_arena.campus_id', 'campus.campus_id')\n\t\t\t->leftjoin('location', 'campus.location_id', 'location.location_id')\n\n\t\t\t->leftjoin('facility', function ($join) {\n\t\t\t\t$join->on('campus.facility_id','facility.facility_id');\n\t\t\t\t$join->on('campus.country_id','facility.country_id');\n\t\t\t})\n\n\t\t\t->leftjoin('curriculum', 'course.curriculum_id', 'curriculum.curriculum_id')\n\n\t\t\t->leftjoin('program','program.program_id','curriculum.program_id')\n\t\t\t->leftjoin('provider', 'program.provider_id', 'provider.provider_id')\n\t\t\t->leftjoin('entity','provider.entity_id','entity.entity_id')\n\t\t\t->leftjoin('event_type', 'program.event_type_id', 'event_type.event_type_id')\n\t\t\t/*->join('entity', 'provider.entity_id', 'entity.entity_id')*/\n\n\t\t\t->leftjoin('schedule', 'course.course_id', 'schedule.course_id')\n\t\t\t->leftjoin('user', 'schedule.instructor_id', 'user.user_id')\n\t\t\t->leftjoin('activity', 'program.activity_id', 'activity.activity_id')\n\t\t\t->leftjoin('activity_classification', 'activity_classification.activity_classification_id', 'activity.activity_classification_id')\n\t\t\t//->groupBy('course.course_id','schedule.instructor_id','curriculum.curriculum_id','entity.logo', 'course.day_of_week','entity.name','curriculum.name','course.time_start', 'course.time_end','event_type.name')\n\t\t\t->groupBy(\n\t\t\t\tDB::raw('curriculum.curriculum_id, course.course_id, entity.logo, course.day_of_week, entity.name, curriculum.name, course.time_start, course.time_end' .\n\t\t\t\t\t(isset($conditions['sort']) && $conditions['sort'] !== null ? \", \" . $extraGroup : '' )\n\t\t\t\t)\n\t\t\t)\n\t\t\t->orderByRaw(isset($conditions['sort']) && $conditions['sort'] !== null ? $conditions['sort'] : 'course.day_of_week ASC, course.course_id DESC')\n\t\t\t->get();\n\n\t\t//echo(\"<br>Total : \" . sizeof($searchData) . \" records\");\n\t\tforeach ($searchData as $data) {\n\t\t\t/*echo('<br>' . $data->program_id . '|' . $data->program_name . '|'. $data->activity_id . '|' . $data->provider_name . '|' . $data->location_name);*/\n\t\t\t//echo('<br>' . $data->provider_id . '|' . $data->provider_name . '|' . $data->location_name);\n\n\n\t\t\t$day = DB::table('day_of_week')->where('day_of_week.day_of_week_id',$data->day_of_week)->first();\n\t\t\t$day = DB::table('day_of_week')->where('day_of_week.day_of_week_id',$data->day_of_week)->first();\n\n\n\t\t\t//echo('<br>' . $data->course_id . \"~\" . $data->program_name . '#'.$day->name. \"|\". date('h:i',strtotime($data->time_start)) . '-' .date('h:i',strtotime($data->time_end)));\n\t\t\t$item = ['course_id' => $data->course_id,\n\t\t\t\t'entity_logo' => ($data->entity_logo ? $data->entity_logo : $default_logo),\n\t\t\t\t'entity_name' => $data->entity_name,\n\t\t\t\t'curriculum_name' => $data->curriculum_name,\n\t\t\t\t'day_name' => $day->name,\n\t\t\t\t'time_start' => date('H:i',strtotime($data->time_start)),\n\t\t\t\t'time_end' => date('H:i',strtotime($data->time_end))];\n\n\t\t\t/*$schedules = DB::table('schedule')\n\t\t\t\t->select('schedule.schedule_id', 'program.name')\n\t\t\t\t->join('program', 'program.program_id', 'curriculum.program_id')\n\t\t\t\t->where('curriculum.curriculum_id', $data->curriculum_id)\n\t\t\t\t->orderBy('program.activity_id', 'DESC')\n\t\t\t\t->get();\n\n\t\t\tforeach ($schedules as $schedule) {\n\t\t\t\t//echo($program->program_id . '|' . $program->name );\n\t\t\t}*/\n\n\t\t\t$programs = DB::table('curriculum')\n\t\t\t\t->select('program.program_id', 'program.name')\n\t\t\t\t->join('program', 'program.program_id', 'curriculum.program_id')\n\t\t\t\t->where('curriculum.curriculum_id', $data->curriculum_id)\n\t\t\t\t->orderBy('program.activity_id', 'DESC')\n\t\t\t\t->get();\n\n\t\t\t$searchActivities = [];\n\t\t\tforeach ($programs as $program) {\n\t\t\t\t//echo($program->program_id . '|' . $program->name );\n\t\t\t\t$activities = DB::table('program')\n\t\t\t\t\t->select('activity.logo', 'program.provider_id', DB::raw('program.name program_name'))\n\t\t\t\t\t->join('activity', 'program.activity_id', 'activity.activity_id')\n\t\t\t\t\t->leftjoin('activity_classification', 'activity.activity_classification_id', 'activity_classification.activity_classification_id')\n\t\t\t\t\t->where('program.program_id', $program->program_id)\n\t\t\t\t\t->whereRaw(\n\t\t\t\t\t\t(isset($conditions['activity_id']) && $conditions['activity_id'] !== null ? \"program.activity_id in (\" . implode(\",\",$conditions['activity_id']) . \") AND \" : '') .\n\t\t\t\t\t\t(isset($conditions['activity_classification_id']) && $conditions['activity_classification_id'] !== null ? \"activity.activity_classification_id in (\" . implode(\",\",$conditions['activity_classification_id']) . \") AND \" : '') .\n\t\t\t\t\t\t(isset($conditions['activity_type_id']) && $conditions['activity_type_id'] !== null ? \"activity_classification.activity_type_id in (\" . implode(\",\",$conditions['activity_type_id']) . \") AND \" : '') .\n\t\t\t\t\t\t('program.status = 0')\n\t\t\t\t\t)\n\t\t\t\t\t//->groupBy('activity.logo')\n\t\t\t\t\t->get();\n\n\t\t\t\tforeach ($activities as $activity) {\n\t\t\t\t\t//echo('<img src=\"' . $activity->logo . '\" style=\"width:2%;\" alt=\"' . $activity->program_name . '\" title=\"' . $activity->program_name . '\">');\n\t\t\t\t\t$searchActivity = [\n\t\t\t\t\t\t'logo' => $activity->logo,\n\t\t\t\t\t\t'name' => $activity->program_name,\n\t\t\t\t\t];\n\t\t\t\t\tarray_push($searchActivities, $searchActivity);\n\t\t\t\t}\n\t\t\t}\n\t\t\tarray_push($result, array('item' => $item, 'activity' => $searchActivities));\n\t\t}\n\n\t\t$final = array('totalPage' => ceil(sizeof($searchAll)/$limit), 'total' => ( sizeof($searchAll) > 0 ? sizeof($searchAll) : 0), 'result' => $result, 'debug' => DB::getQueryLog()[0]['query']);\n\t\treturn $final;\n\t}", "public function searchAction() {\n\t\t$modelName = $this->_getParam('model');\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$this->view->cols = $model->info('cols');\n\t\t$this->view->model = $this->_getParam('model');\n\t\t$this->view->config = Marcel_Backoffice_Config::getInstance()->getConfig();\n\t\t\n\t\tif ($this->_request->isPost()) {\n\t\t\t$fields = array();\n\t\t\t$func \t= array();\n\t\t\t$query \t= array();\n\t\t\tforeach ($_POST['query'] as $key => $q) {\n\t\t\t\tif (isset($_POST['fields'][$key]) && !empty($_POST['fields'][$key])) {\n\t\t\t\t\t$fields[$key] = $_POST['fields'][$key];\n\t\t\t\t\t$func[$key] \t= $_POST['func'][$key];\n\t\t\t\t\t$query[$key] \t= $_POST['query'][$key];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$data = array('fields' => $fields, 'func' => $func, 'query' => $query);\n\t\t\t$data = serialize($data);\n\t\t\t$this->_helper->redirector('list', null, null, array('model' => $modelName, 'data' => $data));\n\t\t}\n\t}", "public function all()\n {\n return $this->model->get();\n }", "public function master_search() {\r\n $this->db->join(\r\n '__Vehicles', \r\n '__Vehicles.__ContactId = ' . $this->table_name. '.' . $this->contactId_fieldname ,\r\n 'left outer'\r\n ); \r\n return $this->get();\r\n }", "public function getItemsBy($params = false)\n {\n $query = $this->model->query();\n\n /*== RELATIONSHIPS ==*/\n if (in_array('*', $params->include)) {//If Request all relationships\n $query->with([]);\n } else {//Especific relationships\n $includeDefault = [];//Default relationships\n if (isset($params->include))//merge relations with default relationships\n $includeDefault = array_merge($includeDefault, $params->include);\n $query->with($includeDefault);//Add Relationships to query\n }\n\n /*== FILTERS ==*/\n if (isset($params->filter)) {\n $filter = $params->filter;//Short filter\n\n //Filter by date\n if (isset($filter->date)) {\n $date = $filter->date;//Short filter date\n $date->field = $date->field ?? 'created_at';\n if (isset($date->from))//From a date\n $query->whereDate($date->field, '>=', $date->from);\n if (isset($date->to))//to a date\n $query->whereDate($date->field, '<=', $date->to);\n }\n\n //Order by\n if (isset($filter->order)) {\n $orderByField = $filter->order->field ?? 'position';//Default field\n $orderWay = $filter->order->way ?? 'desc';//Default way\n $query->orderBy($orderByField, $orderWay);//Add order to query\n }\n\n // Filter By Menu\n if (isset($filter->menu)) {\n $query->where('menu_id', $filter->menu);\n }\n\n //add filter by search\n if (isset($filter->search)) {\n //find search in columns\n $query->where(function ($query) use ($filter) {\n $query->whereHas('translations', function ($query) use ($filter) {\n $query->where('locale', $filter->locale)\n ->where('title', 'like', '%' . $filter->search . '%');\n })->orWhere('id', 'like', '%' . $filter->search . '%')\n ->orWhere('updated_at', 'like', '%' . $filter->search . '%')\n ->orWhere('created_at', 'like', '%' . $filter->search . '%');\n });\n }\n\n }\n\n /*== FIELDS ==*/\n if (isset($params->fields) && count($params->fields))\n $query->select($params->fields);\n\n /*== REQUEST ==*/\n if (isset($params->page) && $params->page) {\n return $query->paginate($params->take);\n } else {\n $params->take ? $query->take($params->take) : false;//Take\n return $query->get();\n }\n }", "public function getAll()\n {\n return $this->model->all();\n }", "public function getAll()\n {\n return $this->model->all();\n }", "public function getAll()\n {\n return $this->model->all();\n }", "public function getList()\n {\n return $this->model->getList();\n }", "public function findBy(array $filters);", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('brand',$this->brand,true);\n\t\t$criteria->compare('status',$this->status,true);\n\t\t$criteria->compare('width',$this->width);\n\t\t$criteria->compare('height',$this->height);\n\t\t$criteria->compare('goods_thumb',$this->goods_thumb,true);\n\t\t$criteria->compare('goods_img',$this->goods_img,true);\n\t\t$criteria->compare('model_search',$this->model_search,true);\n\t\t$criteria->compare('brand_search',$this->brand_search,true);\n\t\t$criteria->compare('brand2',$this->brand2,true);\n\t\t$criteria->compare('brand2_search',$this->brand2_search,true);\n\t\t$criteria->compare('brand3',$this->brand3,true);\n\t\t$criteria->compare('brand3_search',$this->brand3_search,true);\n\t\t$criteria->compare('brand4',$this->brand4,true);\n\t\t$criteria->compare('brand4_search',$this->brand4_search,true);\n\t\t$criteria->compare('model2',$this->model2,true);\n\t\t$criteria->compare('model2_search',$this->model2_search,true);\n\t\t$criteria->compare('model3',$this->model3,true);\n\t\t$criteria->compare('model3_search',$this->model3_search,true);\n\t\t$criteria->compare('model4',$this->model4,true);\n\t\t$criteria->compare('model4_search',$this->model4_search,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function getList($params = [])\n {\n $model = $this->prepareModel();\n return $model::all();\n }", "abstract protected function getSearchModelName(): string;", "public function getItemsCriteria() {}", "public function getItemsCriteria() {}", "public function getFilters();", "public static function getList(array $filters){\n return self::model()->findAllByAttributes($filters);\n }", "public function getSearch();", "public function search()\n {\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('url', $this->url);\n $criteria->compare('type', $this->type);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => array('pageSize' => 100),\n ));\n }", "public function actionList() {\n switch ($_GET['model']) {\n case 'Product':\n $models = Product::model()->findAll();\n break;\n case 'Vendor':\n $models = Vendor::model()->findAll();\n break;\n case 'FavoriteProduct':\n $models = FavoriteProduct::model()->findAll();\n break;\n case 'Order':\n $models = Order::model()->findAll();\n break;\n case 'Rating':\n $models = Rating::model()->findAll();\n break;\n case 'Review':\n $models = Review::model()->findAll();\n break;\n case 'UserAddress':\n $models = UserAddress::model()->findAll();\n break;\n case 'OrderDetail':\n $models = OrderDetail::model()->findAll();\n break;\n default:\n $this->_sendResponse(0, 'You have pass invalid modal name');\n Yii::app()->end();\n }\n // Did we get some results?\n if (empty($models)) {\n // No\n $this->_sendResponse(0, 'No Record found ');\n } else {\n // Prepare response\n $rows = array();\n $i = 0;\n foreach ($models as $model) {\n $rows[] = $model->attributes;\n if ($_GET['model'] == 'Order') {\n $rows[$i]['cart_items'] = Product::model()->getProducts($model->product_id);\n $rows[$i]['order_detail'] = OrderDetail::model()->findAll(array('condition' => 'order_id ='.$model->id));\n }\n $i = $i + 1;\n }\n // Send the response\n $this->_sendResponse(1, '', $rows);\n }\n }", "static public function filterData($model_name)\n {\n $query = \"{$model_name}Query\";\n $objects = $query::create()->find();\n \n if ($objects != null) {\n\n $array = array();\n foreach ($objects as $object) {\n $array[$object->getId()] = $object->__toString();\n }\n\n return $array;\n } else {\n return array();\n }\n }", "public static function getList(string $filter='')\n {\n $query = self::with(['product','insuredPerson','agency'])->whereNotNull('n_OwnerId_FK');\n\n $filterArray = json_decode(request('filter'));\n\n if (is_object($filterArray)) {\n foreach($filterArray as $key=>$value) {\n if (empty($value)) {\n continue;\n }\n if (is_array($value)) {\n $query->whereIn($key, $value);\n continue;\n }\n $query->where($key, 'like', \"%$value%\");\n }\n }\n return $query;\n }", "public function getCriteria();", "public static function getSearchable()\n {\n return [\n 'columns' => [],\n 'joins' => [\n \n ]\n ];\n }", "static function filter($model) {\n $cond = Session::get('filter', strtolower($model->source));\n $param = array(\n /* Relaciones */\n 'rel' => array(\n '=' => 'Igual',\n 'LIKE' => 'Parecido',\n '<>' => 'Diferente',\n '<' => 'Menor',\n '>' => 'Mayor'\n ),\n 'col' => array_diff($model->fields, $model->_at, $model->_in, $model->primary_key),\n 'model' => $model,\n 'cond' => $cond\n );\n ob_start();\n View::partial('backend/filter', false, $param);\n return ob_get_clean();\n }", "public function findByModelName($model_name);", "abstract public function getFieldsSearchable();", "function _get_by_related($model, $arguments = array())\r\n\t{\r\n\t\tif ( ! empty($model))\r\n\t\t{\r\n\t\t\t// Add model to start of arguments\r\n\t\t\t$arguments = array_merge(array($model), $arguments);\r\n\t\t}\r\n\r\n\t\t$this->_related('where', $arguments);\r\n\r\n\t\treturn $this->get();\r\n\t}", "public static function getModels()\n\t{\n\t\t$result = [];\n\t\t$path = __DIR__ . DIRECTORY_SEPARATOR . 'model' . DIRECTORY_SEPARATOR;\n\t\t$Iterator = new RecursiveDirectoryIterator($path);\n\t\t$objects = new RecursiveIteratorIterator($Iterator, RecursiveIteratorIterator::SELF_FIRST);\n\t\tforeach ($objects as $name => $object)\n\t\t{\n\t\t\tif (strtolower(substr($name, -4) != '.php'))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$name = strtolower(str_replace($path, '', substr($name, 0, strlen($name) - 4)));\n\t\t\t$name = str_replace(DIRECTORY_SEPARATOR, '\\\\', $name);\n\t\t\t$name = 'Model\\\\' . ucwords($name, '\\\\');\n\t\t\tif (class_exists($name))\n\t\t\t{\n\t\t\t\t$result[]= $name;\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "public function autocomplete_search() {\n\tif (!empty($this->request->query['term'])) {\n\t $model = Inflector::camelize(Inflector::singularize($this->request->params['controller']));\n\t $my_models = $this->$model->find('all', array(\n\t\t 'conditions' => array($model . '.name LIKE' => $this->request->query['term'] . '%'),\n\t\t 'limit' => 10,\n\t\t 'contain' => false,\n\t\t\t ));\n\t $json_array = array();\n\t foreach ($my_models as $my_model) {\n\t\t$json_array[] = $my_model[$model];\n\t }\n\t $json_str = json_encode($json_array);\n\t $this->autoRender = false;\n\t return $json_str;\n\t}\n }", "public function getListQuery();", "public function search($model, $request)\n {\n $search = filter_var($request->get('search'), FILTER_SANITIZE_STRING);\n\n // Get optional filters\n // FILTER: GEOLOCATION\n if($request->input('location')) {\n $location = filter_var($request->get('location'), FILTER_SANITIZE_STRING);\n }\n if($request->input('geo_lat')) {\n $geo_lat = filter_var($request->get('geo_lat'), FILTER_SANITIZE_STRING);\n $geo_lng = filter_var($request->get('geo_lng'), FILTER_SANITIZE_STRING);\n }\n\n /**\n * Get current page number for location manual Pagination\n */\n $page = $request->get('page') ? $request->get('page') : 1;\n\n\n // Location first, since it's a special query\n if(isset($geo_lat) && isset($geo_lng)) {\n \n $location_data = Posts::location($geo_lat, $geo_lng, $search, 25, 100); \n\n // Hard and dirty search function through collection\n // since search with location method doesn't work still\n if($search !== '') {\n $location_data = $location_data->filter(function ($item) use ($search) {\n return stripos($item->name, $search) !== false;\n });\n }\n\n // Paginate results because location method can't\n $paginate = new Paginate;\n return $paginate->paginate($location_data, 15, $page, [\n 'path' => '/search/'\n ]);\n\n } \n // Section selection handler (brands/shops/prods/strains)\n elseif($search)\n {\n return $model->where('name', 'like', \"%$search%\");\n }\n\n }", "public function getWorkFlowModels()\n {\n return $this->postRequest('GetWorkFlowModels');\n }", "private function _getAllModels(): array {\n\t\t$models = Array();\n\t\t$folder = Environment::$dirs->models;\n\t\t$files = array_diff(scandir($folder), array('.', '..'));\n\t\tforeach ($files as $fileName) {\n\t\t\tinclude_once($folder.DIRECTORY_SEPARATOR.$fileName);\n\t\t\t$className = basename($fileName, \".php\");\n\t\t\t$classNameNamespaced = \"\\\\Jeff\\\\Api\\\\Models\\\\\" . ucfirst($className);\n\t\t\t$model = new $classNameNamespaced($this->db, $this->account);\n\t\t\t$models[$model->modelNamePlural] = $model;\n\t\t}\n\t\treturn $models;\n\t}", "public function getList()\n {\n $filter = $this->getEvent()->getRouteMatch()->getParam('filter', null);\n return $this->getService()\n ->getList($filter);\n }", "function getAll(){\n\n\t\t\t$this->db->order_by(\"status\", \"asc\");\n\t\t\t$query = $this->db->get_where($this->table);\n\t\t\treturn $query;\n\t\t}", "public function actionViewModelList($modelName)\n\t{\n\t\t$pageSize = BaseModel::PAGE_SIZE;\n\t\tif ($_POST[\"sortBy\"]) {\n\t\t\t$order = $_POST[\"sortBy\"];\n\t\t}\n\t\t//echo $order;\n\t\t/*if (!$modelName) {\n\t\t\t\n\t\t}*/\n\t\t$sess_data = Yii::app()->session->get($modelName.'search');\n\t\t$searchId = $_GET[\"search_id\"];\n\t\t$fromSearchId = TriggerValues::model() -> decodeSearchId($searchId);\n\t\t//print_r($fromSearchId);\n\t\t//echo \"<br/>\";\n\t\t//Если задан $_POST/GET с формы, то сливаем его с массивом из searchId с приоритетом у searchId\n\t\tif ($_POST[$modelName.'SearchForm'])\n\t\t{\n\t\t\t$fromPage = array_merge($_POST[$modelName.'SearchForm'], $fromSearchId);\n\t\t} else {\n\t\t\t//Если же он не задан, то все данные берем из searchId\n\t\t\t$fromPage = $fromSearchId;\n\t\t}\n\t\t//print_r($fromPage);\n\t\tif ((!$fromPage)&&(!$sess_data))\n\t\t{\n\t\t\t//Если никаких критереев не задано, то выдаем все модели.\n\t\t\t$searched = $modelName::model() -> userSearch(array(),$order);\n\t\t} else {\n\t\t\tif ($_GET[\"clear\"]==1)\n\t\t\t{\n\t\t\t\t//Если критерии заданы, но мы хотим их сбросить, то снова выдаем все и обнуляем нужную сессию\n\t\t\t\tYii::app()->session->remove($modelName.'search');\n\t\t\t\t$page = 1;\n\t\t\t\t//was://$searched = $modelName::model() -> userSearch(array(),$order);\n\t\t\t\t$searched = $modelName::model() -> userSearch($fromSearchId,$order);\n\t\t\t} else {\n\t\t\t\t//Если же заданы какие-то критерии, но не со страницы, то вместо них подаем данные из сессии\n\t\t\t\tif (!$fromPage)\n\t\t\t\t{\n\t\t\t\t\t$fromPage = $sess_data;\n\t\t\t\t\t//echo \"from session\";\n\t\t\t\t}\n\t\t\t\t//Адаптируем критерии под специализацию. Если для данной специализации нет какого-то критерия, а он где-то сохранен, то убираем его.\n\t\t\t\t$fromPage = Filters::model() -> FilterSearchCriteria($fromPage, $modelName);\n\t\t\t\t//Если критерии заданы и обнулять их не нужно, то запускаем поиск и сохраняем его критерии в сессию.\n\t\t\t\tYii::app()->session->add($modelName.'search',$fromPage);\n\t\t\t\t$searched = $modelName::model() -> userSearch($fromPage,$order);\n\t\t\t}\n\t\t}\n\t\t//делаем из массива объектов dataProvider\n $dataProvider = new CArrayDataProvider($searched['objects'],\n array( 'keyField' =>'id'\n ));\n\t\t$this -> layout = 'layoutNoForm';\n\t\t//Определяем страницу.\n\t\t$maxPage = ceil(count($searched['objects'])/$pageSize);\n\t\tif ($_GET[\"page\"]) {\n\t\t\t$_POST[\"page\"] = $_GET[\"page\"];\n\t\t}\n\t\t$page = $_POST[\"page\"] ? $_POST[\"page\"] : 1;\n\t\t$page = (($page >= 1)&&($page <= $maxPage)) ? $page : 1;\n\t\t$_POST[$modelName.'SearchForm'] = $fromPage;\n\t\t$this->render('show_list', array(\n\t\t\t'objects' => array_slice($searched['objects'],($page - 1) * $pageSize, $pageSize),\n\t\t\t'modelName' => $modelName,\n\t\t\t'filterForm' => $modelName::model() -> giveFilterForm($fromPage),\n\t\t\t'fromPage' => $fromPage,\n\t\t\t'description' => $searched['description'],\n\t\t\t'specialities' => Filters::model() -> giveSpecialities(),\n\t\t\t'page' => $page,\n\t\t\t'maxPage' => $maxPage,\n\t\t\t'total' => count($searched['objects'])\n\t\t));\n\t\t\n\t}", "public function search_through(Request $request)\n {\n $reports = Payment::query();\n\n if (!empty($request->query())) {\n foreach ($request->query() as $key => $value) {\n if ($key == 'date') {\n $reports->whereDate('created_at', '>=', $value);\n } else {\n $reports->where($key, $value);\n }\n }\n }\n\n return $reports->get();\n }", "public function models($query, array $options = [])\n {\n $hits = $this->run($query);\n list($models, $totalCount) = $this->search->config()->models($hits, $options);\n // Remember total number of results.\n $this->setCachedCount($query, $totalCount);\n\n return Collection::make($models);\n }", "public function index()\n {\n $this->repository->pushCriteria(app('Prettus\\Repository\\Criteria\\RequestCriteria'));\n return $this->repository->all();\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n \n $criteria->with=array('c','b');\n\t\t$criteria->compare('pid',$this->pid,true);\n\t\t$criteria->compare('t.cid',$this->cid,true);\n\t\t$criteria->compare('t.bid',$this->bid,true);\n\n $criteria->compare('c.classify_name',$this->classify,true);\n\t\t$criteria->compare('b.brand_name',$this->brand,true);\n \n $criteria->addCondition('model LIKE :i and model REGEXP :j');\n $criteria->params[':i'] = \"%\".$this->index_search.\"%\";\n $criteria->params[':j'] = \"^\".$this->index_search;\n\n \n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('package',$this->package,true);\n\t\t$criteria->compare('RoHS',$this->RoHS,true);\n\t\t$criteria->compare('datecode',$this->datecode,true);\n\t\t$criteria->compare('quantity',$this->quantity);\n\t\t$criteria->compare('direction',$this->direction,true);\n $criteria->compare('image_url',$this->image_url,true);\n\t\t$criteria->compare('create_time',$this->create_time,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function queryset(){\n return $this->_get_queryset();\n }", "public function index(Request $request)\n {\n $keyword = $request->get('search');\n $perPage = $request->get('limit');\n $perPage = empty($perPage) ? 25 : $perPage;\n\n if (!empty($keyword)) {\n $filters = Filter::where('sl_gender', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_min_price', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_max_price', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_color', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_occasion', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_style', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_age', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_min_price', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_max_price', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_date_from', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_date_to', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_city_id', 'LIKE', \"%$keyword%\")\n ->orWhere('user_id', 'LIKE', \"%$keyword%\")\n ->paginate($perPage);\n } else {\n $filters = Filter::paginate($perPage);\n }\n\n return $filters;\n }", "public function getList(\\Magento\\Framework\\Api\\SearchCriteriaInterface $searchCriteria);", "public function getList(\\Magento\\Framework\\Api\\SearchCriteriaInterface $searchCriteria);", "public function getList(\\Magento\\Framework\\Api\\SearchCriteriaInterface $searchCriteria);", "public function getSearchCriterias()\n {\n return $this->_searchCriterias;\n }", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('entity_id', $this->entity_id);\n $criteria->compare('dbname', $this->dbname, true);\n $criteria->compare('isfiltered', $this->isfiltered);\n $criteria->compare('filtertype', $this->filtertype);\n $criteria->compare('alias', $this->alias, true);\n $criteria->compare('enabled', $this->enabled);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => false,\n ));\n }", "private function getSearchConditions()\n {\n $searchConditions = [];\n\n $userIds = $this->request->get('ids') ?? [];\n if ($userIds) {\n $searchConditions['id'] = $userIds;\n }\n\n $email = $this->request->get('email') ?? '';\n if ($email) {\n $searchConditions['email'] = $email;\n }\n\n return $searchConditions;\n }", "public function findAllAction();", "public function search(Request $request)\n {\n if(!$request->has('query')) {\n return response()->json(['message' => 'Please type a keyword.']);\n }\n\n $userTenant = Auth::userTenant();\n $user = Auth::user();\n\n $searchableModelNameSpace = 'App\\\\Models\\\\';\n $result = [];\n // Loop through the searchable models.\n foreach (config('scout.searchableModels') as $model) {\n $modelClass = $searchableModelNameSpace.$model;\n $modelService = app($model.'Ser');\n\n if($model == 'Task') {\n $allowedModels = $modelService->searchForUserTenant($userTenant, $request->get('query'))->get();\n } else {\n $foundModels = $modelClass::search($request->get('query'))->get();\n if ($model === 'Comment') {\n $foundModels->where('groupId', '!=', null)->toArray();\n }\n $policy = app()->make('App\\Policies\\V2\\\\' . $model . 'Policy');\n $allowedModels = $foundModels->filter(function(BaseModel $foundModel) use($user, $policy) {\n return $policy->getAccess($user, $foundModel);\n });\n }\n\n $result[Str::lower($model) . 's'] = $allowedModels;\n }\n\n $responseData = ['message' => 'Keyword(s) matched!', 'results' => $result, 'pagination' => ['more' => false]];\n $responseHeader = Response::HTTP_OK;\n if (!count($result)) {\n $responseData = ['message' => 'No results found, please try with different keywords.'];\n $responseHeader = Response::HTTP_NOT_FOUND;\n }\n\n return response()->json($responseData, $responseHeader);\n }", "function GetFilterList() {\n\t\tglobal $UserProfile;\n\n\t\t// Initialize\n\t\t$sFilterList = \"\";\n\t\t$sSavedFilterList = \"\";\n\n\t\t// Load server side filters\n\t\tif (EW_SEARCH_FILTER_OPTION == \"Server\" && isset($UserProfile))\n\t\t\t$sSavedFilterList = $UserProfile->GetSearchFilters(CurrentUserName(), \"fsolicitudlistsrch\");\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id->AdvancedSearch->ToJson(), \",\"); // Field id\n\t\t$sFilterList = ew_Concat($sFilterList, $this->nombre_contacto->AdvancedSearch->ToJson(), \",\"); // Field nombre_contacto\n\t\t$sFilterList = ew_Concat($sFilterList, $this->name->AdvancedSearch->ToJson(), \",\"); // Field name\n\t\t$sFilterList = ew_Concat($sFilterList, $this->lastname->AdvancedSearch->ToJson(), \",\"); // Field lastname\n\t\t$sFilterList = ew_Concat($sFilterList, $this->_email->AdvancedSearch->ToJson(), \",\"); // Field email\n\t\t$sFilterList = ew_Concat($sFilterList, $this->address->AdvancedSearch->ToJson(), \",\"); // Field address\n\t\t$sFilterList = ew_Concat($sFilterList, $this->phone->AdvancedSearch->ToJson(), \",\"); // Field phone\n\t\t$sFilterList = ew_Concat($sFilterList, $this->cell->AdvancedSearch->ToJson(), \",\"); // Field cell\n\t\t$sFilterList = ew_Concat($sFilterList, $this->created_at->AdvancedSearch->ToJson(), \",\"); // Field created_at\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_sucursal->AdvancedSearch->ToJson(), \",\"); // Field id_sucursal\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipoinmueble->AdvancedSearch->ToJson(), \",\"); // Field tipoinmueble\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_ciudad_inmueble->AdvancedSearch->ToJson(), \",\"); // Field id_ciudad_inmueble\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_provincia_inmueble->AdvancedSearch->ToJson(), \",\"); // Field id_provincia_inmueble\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipovehiculo->AdvancedSearch->ToJson(), \",\"); // Field tipovehiculo\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_ciudad_vehiculo->AdvancedSearch->ToJson(), \",\"); // Field id_ciudad_vehiculo\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_provincia_vehiculo->AdvancedSearch->ToJson(), \",\"); // Field id_provincia_vehiculo\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipomaquinaria->AdvancedSearch->ToJson(), \",\"); // Field tipomaquinaria\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_ciudad_maquinaria->AdvancedSearch->ToJson(), \",\"); // Field id_ciudad_maquinaria\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_provincia_maquinaria->AdvancedSearch->ToJson(), \",\"); // Field id_provincia_maquinaria\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipomercaderia->AdvancedSearch->ToJson(), \",\"); // Field tipomercaderia\n\t\t$sFilterList = ew_Concat($sFilterList, $this->documento_mercaderia->AdvancedSearch->ToJson(), \",\"); // Field documento_mercaderia\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipoespecial->AdvancedSearch->ToJson(), \",\"); // Field tipoespecial\n\t\t$sFilterList = ew_Concat($sFilterList, $this->email_contacto->AdvancedSearch->ToJson(), \",\"); // Field email_contacto\n\t\tif ($this->BasicSearch->Keyword <> \"\") {\n\t\t\t$sWrk = \"\\\"\" . EW_TABLE_BASIC_SEARCH . \"\\\":\\\"\" . ew_JsEncode2($this->BasicSearch->Keyword) . \"\\\",\\\"\" . EW_TABLE_BASIC_SEARCH_TYPE . \"\\\":\\\"\" . ew_JsEncode2($this->BasicSearch->Type) . \"\\\"\";\n\t\t\t$sFilterList = ew_Concat($sFilterList, $sWrk, \",\");\n\t\t}\n\t\t$sFilterList = preg_replace('/,$/', \"\", $sFilterList);\n\n\t\t// Return filter list in json\n\t\tif ($sFilterList <> \"\")\n\t\t\t$sFilterList = \"\\\"data\\\":{\" . $sFilterList . \"}\";\n\t\tif ($sSavedFilterList <> \"\") {\n\t\t\tif ($sFilterList <> \"\")\n\t\t\t\t$sFilterList .= \",\";\n\t\t\t$sFilterList .= \"\\\"filters\\\":\" . $sSavedFilterList;\n\t\t}\n\t\treturn ($sFilterList <> \"\") ? \"{\" . $sFilterList . \"}\" : \"null\";\n\t}", "public function getAndFilter() {\n\t\treturn $this->db->getAndFilter();\n\t}" ]
[ "0.6744886", "0.6744886", "0.660744", "0.6478935", "0.63809466", "0.634619", "0.6310661", "0.63017946", "0.62542254", "0.6251588", "0.6251588", "0.6110578", "0.60789883", "0.6072824", "0.6045855", "0.60337853", "0.6033558", "0.60152847", "0.5982737", "0.5980334", "0.5979643", "0.59705067", "0.59310067", "0.59274197", "0.5921588", "0.58922106", "0.5888649", "0.5850717", "0.5848848", "0.58265543", "0.58166176", "0.5813406", "0.5808671", "0.5791005", "0.57769156", "0.5768634", "0.57644945", "0.57629555", "0.5752514", "0.5741027", "0.573719", "0.5728591", "0.5722794", "0.5722046", "0.57219696", "0.57207656", "0.5718825", "0.57142407", "0.5711659", "0.5705662", "0.5694775", "0.5681068", "0.5670744", "0.5670455", "0.5670455", "0.5670455", "0.56700355", "0.5669091", "0.56674314", "0.5665479", "0.56555426", "0.5650441", "0.56491435", "0.5641216", "0.56337774", "0.5632674", "0.56311625", "0.5622468", "0.5617358", "0.56110185", "0.56096834", "0.5594402", "0.55776775", "0.55723196", "0.55556023", "0.555058", "0.5549535", "0.5547251", "0.5546426", "0.5534472", "0.55335116", "0.5532724", "0.5532639", "0.55260795", "0.5518454", "0.55178773", "0.5515939", "0.55085504", "0.55058104", "0.5500244", "0.5498356", "0.54954916", "0.54954916", "0.54954916", "0.54944354", "0.549276", "0.5492497", "0.5491262", "0.5489033", "0.5488128", "0.5485355" ]
0.0
-1
Display a listing of the resource.
public function index() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { $module = Module::all(); $section = SectionTraining::find($id); if (empty($section)) { return view('404'); } $type = SectionTrainingType::find($section->id_type); //get all section training $all_section = SectionTraining::where('id_training', $section->id_training)->get(); foreach ($all_section as $key => $value) { $value['type'] = SectionTrainingType::find($value->id_type); } //check user jika pernah masuk training ini $user = Auth::user()->id; $check_user = UserTest::where('id_user',$user)->where('id_training',$section->id_training)->first(); $pernah_test = false; if(empty($check_user) or empty($check_user->id_post_test) or $type->id ==2){ if ($type->id == 1) { $test = Test::where('id_section_training',$section->id)->first(); $user_training = new UserTest; $user_training->id_training = $section->id_training; $user_training->id_user = $user; $user_training->id_pre_test = $test->id; $user_training->save(); $questions = null; if ($test == null) { $questions = null; }else{ $questions = Question::where('id_test',$test->id)->get(); foreach ($questions as $key => $value) { $opsi = OpsiJawaban::where('id_question',$value->id)->get(); $value['opsi'] = $opsi; } if (!empty($check_user)) { if ($check_user->close_pre_test == 1) { $pernah_test = true; } } } $next_section = SectionTraining::where('id_training',$section->id_training)->where('id_type',2)->first(); return view('test-quiz') ->with('section',$section) ->with('type',$type) ->with('test',$test) ->with('module',$module) ->with('questions',$questions) ->with('next_section',$next_section) ->with('all_section',$all_section) ->with('pernah_test',$pernah_test); }elseif($type->id == 2){ $module = Module::all(); $content = ContentLearning::where('id_section',$id)->get(); $section = SectionTraining::find($id); $training = Training::find($section->id_training); $next_section = SectionTraining::where('id_training',$section->id_training)->where('id_type',$type->id+1)->first(); //update count $check_user->count += 1; $check_user->save(); if (empty($check_user->id_post_test)) { return view('content-learning') ->with('module',$module) ->with('content',$content) ->with('training',$training) ->with('next_section',$next_section) ->with('all_section',$all_section); }else{ return view('content-learning') ->with('module',$module) ->with('content',$content) ->with('training',$training) ->with('next_section',$next_section) ->with('logout',true) ->with('all_section',$all_section); } }else{ $test = Test::where('id_section_training',$section->id)->first(); $questions = Question::where('id_test',$test->id)->get(); foreach ($questions as $key => $value) { $opsi = OpsiJawaban::where('id_question',$value->id)->get(); $value['opsi'] = $opsi; } return view('test-quiz') ->with('section',$section) ->with('type',$type) ->with('test',$test) ->with('module',$module) ->with('questions',$questions) ->with('all_section',$all_section) ->with('pernah_test',$pernah_test); } }else{ $module = Module::all(); $training = Training::find($section->id_training); $next_section = SectionTraining::where('id_training',$section->id_training)->where('id_type',2)->first(); return view('test-result')->with('module',$module)->with('training',$training)->with('skor_post_test',$check_user->post_test_score)->with('skor_pre_test',$check_user->pre_test_score)->with('next_section', $next_section)->with('all_section',$all_section);; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit(SectionTraining $sectionTraining) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, SectionTraining $sectionTraining) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy(SectionTraining $sectionTraining) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Listen for messages published to channels matching the given patterns
public function psubscribe($patterns);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function subscribe($channels);", "public function onMessages($pattern, $callback)\n {\n $handler = new EventListener($pattern, $callback);\n $this->dispatcher->addListener('message.channel', array($handler, 'testAndExecute'));\n $this->dispatcher->addListener('message.private', array($handler, 'testAndExecute'));\n }", "public function onChannel($pattern, $callback)\n {\n $handler = new EventListener($pattern, $callback);\n $this->dispatcher->addListener('message.channel', array($handler, 'testAndExecute'));\n }", "public function listen(): void\n {\n $receive = function () {\n each($this->receiveMessages(), $this->parseAndConsumeMessage());\n };\n\n $this->settings->beforeReceive($receive);\n }", "public function listen()\n {\n $this->openWorker();\n while (!Signal::isExit()) {\n if (($payload = $this->pop(3)) !== null) {\n list($id, $message) = explode(':', $payload, 2);\n $this->handleMessage($message);\n }\n }\n $this->closeWorker();\n }", "private function registerChannels(): void\n {\n if (config('messenger.routing.channels.enabled')) {\n $this->app->make(BroadcastManager::class)->routes($this->channelRouteConfiguration());\n\n $broadcaster = $this->app->make(Broadcaster::class);\n\n $broadcaster->channel('messenger.thread.{thread}', ThreadChannel::class);\n $broadcaster->channel('messenger.call.{call}.thread.{thread}', CallChannel::class);\n $broadcaster->channel('messenger.{alias}.{id}', ProviderChannel::class);\n }\n }", "public function channels()\n {\n $this->send(['command' => 'channels', 'seq'=>$this->getSequence()]);\n }", "public function onChannel($channel);", "public function listen()\n {\n $this->open();\n $callback = function(AMQPMessage $message) {\n $job = $this->unserialize($message->body);\n if ($this->getQueue()->run($job)) {\n $message->delivery_info['channel']->basic_ack($message->delivery_info['delivery_tag']);\n }\n };\n $this->_channel->basic_qos(null, 1, null);\n $this->_channel->basic_consume($this->queueName, '', false, false, false, false, $callback);\n while(count($this->_channel->callbacks)) {\n $this->_channel->wait();\n }\n }", "public function listen();", "public static function listen() {\n $projectId = \"sunday-1601040613995\";\n\n # Instantiates a client\n $pubsub = new PubSubClient([\n 'projectId' => $projectId\n ]);\n\n # The name for the new topic\n $topicName = 'gmail';\n\n # Creates the new topic\n $topic = $pubsub->createTopic($topicName);\n\n echo 'Topic ' . $topic->name() . ' created.';\n }", "protected function listen()\n {\n do {\n $data = fgets($this->socket, 512);\n if (!empty($data)) {\n $request = $this->receive($data);\n $cmd = strtolower($request->getCommand());\n\n if ($cmd === 'privmsg') {\n $event_name = 'message.' . ($request->isPrivateMessage() ? 'private' : 'channel');\n } else {\n $event_name = 'server.' . $cmd;\n }\n\n // Skip processing if the incoming message is from the bot\n if ($request->getSendingUser() === $this->config['nick']) {\n continue;\n }\n\n $event = new Event($request);\n $this->dispatcher->dispatch($event_name, $event);\n $responses = $event->getResponses();\n\n if (!empty($responses)) {\n $this->send($responses);\n }\n }\n } while (!feof($this->socket));\n }", "public function broadcastOn()\n {\n return ['my-channel'];\n }", "public function subscribes();", "public function listen()\n {\n $this->log->addInfo('Begin listen routine');\n \n $connection = new AMQPConnection('localhost', 5672, 'guest', 'guest');\n $channel = $connection->channel();\n \n $channel->queue_declare(\n 'invoice_queue', #queue\n false, #passive\n true, #durable, make sure that RabbitMQ will never lose our queue if a crash occurs\n false, #exclusive - queues may only be accessed by the current connection\n false #auto delete - the queue is deleted when all consumers have finished using it\n );\n \n /**\n * don't dispatch a new message to a worker until it has processed and \n * acknowledged the previous one. Instead, it will dispatch it to the \n * next worker that is not still busy.\n */\n $channel->basic_qos(\n null, #prefetch size - prefetch window size in octets, null meaning \"no specific limit\"\n 1, #prefetch count - prefetch window in terms of whole messages\n null #global - global=null to mean that the QoS settings should apply per-consumer, global=true to mean that the QoS settings should apply per-channel\n );\n \n /**\n * indicate interest in consuming messages from a particular queue. When they do \n * so, we say that they register a consumer or, simply put, subscribe to a queue.\n * Each consumer (subscription) has an identifier called a consumer tag\n */ \n $channel->basic_consume(\n 'invoice_queue', #queue\n '', #consumer tag - Identifier for the consumer, valid within the current channel. just string\n false, #no local - TRUE: the server will not send messages to the connection that published them\n false, #no ack, false - acks turned on, true - off. send a proper acknowledgment from the worker, once we're done with a task\n false, #exclusive - queues may only be accessed by the current connection\n false, #no wait - TRUE: the server will not respond to the method. The client should not wait for a reply method\n array($this, 'process') #callback\n );\n \n $this->log->addInfo('Consuming from queue');\n \n while(count($channel->callbacks)) {\n $this->log->addInfo('Waiting for incoming messages');\n $channel->wait();\n }\n \n $channel->close();\n $connection->close();\n }", "public function listen($msg, array $tags)\n {\n $prefix = '';\n if ($tags) {\n $prefix = implode('.', $tags) . ': ';\n }\n echo $prefix . $msg . $this->cr;\n }", "public function psubscribe($channels, Closure $callback)\n {\n $this->client->psubscribe((array) $channels, function ($redis, $pattern, $channel, $message) use ($callback) {\n $callback($message, $channel);\n });\n }", "public function listen()\n\t{\n\t\t$uri = $_REQUEST['uri'] ?? '';\n\t\t$uri = trim($uri, '/\\^$');\n\t\t$replacementValues = array();\n\n\t\t// List through the stored URI's\n\t\tforeach ($this->urls as $step => $url)\n\t\t{\n\t\t\t// See if there is a match\n\t\t\tif (preg_match(\"#^$url$#\", $uri))\n\t\t\t{\n\t\t\t\t// Replace the values\n\t\t\t\t$realUri = explode('/', $uri);\n\t\t\t\t$fakeUri = explode('/', $url);\n\n\t\t\t\t// Gather the .+ values with the real values in the URI\n\t\t\t\tforeach ($fakeUri as $key => $value) {\n\t\t\t\t\tif ($value == '.+')\t$replacementValues[] = $realUri[$key];\n\t\t\t\t}\n\n\t\t\t\t// Pass an array for arguments\n\t\t\t\tcall_user_func_array($this->functions[$step], $replacementValues);\n\t\t\t\texit;\n\t\t\t}\n\n\t\t} // End of Loop\n\n\t}", "public function subscribe();", "public function getChannels();", "public function handle()\n {\n \n while (true) {\n \n $loop = ReactEventLoopFactory::create();\n\n $client = new SlackRealTimeClient($loop);\n $client->setToken(config('services.slack.token'));\n\n // disconnect after first message\n $client->on('message', function ($data) use ($client) {\n //echo \"Someone typed a message: \".$data['text'].\"\\n\";\n //print_r($data);\n //$client->disconnect();\n \n if($data['type'] == 'message'){\n \n if(!isset($data['text'])) return;\n if(isset($data['username']) && $data['username'] == 'bot') return;\n\n print_r($data);\n\n if(substr($data['channel'], 0, 1) == 'D'){\n //If it's a DM, treat it as a search query\n echo \"Direct Message: \";\n print_r($data);\n }elseif(!isset($data['user'])){\n $this->error('No valid user. Previous event not saved');\n Log::debug('No valid user. Previous event not saved');\n }else{\n //Insert new message to DB\n $message = new Messages;\n $message->message = $data['text'];\n $message->user = $data['user'];\n $message->channel = $data['channel'];\n $message->ts = convert_timestamp($data['ts']);\n $message->save();\n\n $message->addToIndex(); //add to ES Index\n }\n\n\n }//END IF DATA TYPE CHECK\n $client->disconnect();\n\n });\n\n $client->connect()->then(function () {\n echo \"Connected!\\n\";\n });\n\n $loop->run();\n\n }//END WHILE INF\n }", "public function testChannelsReplies()\n {\n }", "public function Subscribe() {\n\t\t// Process pending messages if any\n\t\t$this->ProcessPendingMessages();\n\t\t// Subscribe\n\t\t$this->GetSubsConn()->subscribe(\n\t\t\t[$this->GetChannel()],\n\t\t\t[$this, 'SubscribeCallback']\n\t\t);\n\t}", "function ts3client_requestChannelSubscribeAll($serverConnectionHandlerID) {}", "public function startListening();", "public function broadcastOn()\n {\n// return new PrivateChannel('news-action');\n// return ['news-action'];\n return new Channel('news-action.');\n }", "public function broadcastOn()\n {\n // return new PrivateChannel('channel-name');\n return new Channel('messages');\n }", "public function channels(): ChannelsService;", "public function onFind(string $pattern, callable $listener);", "private function dispatchNotifications() {\n $this->channels->each(function($channel) {\n $notifiable = new AnonymousNotifiable();\n $notifiable->route($channel->type, $channel->endpoint);\n DispatchNotification::dispatch($notifiable, $this->notification);\n });\n }", "public function subscribe($events)\n {\n foreach ($this->events as $event => $action) {\n $events->listen($event, BadgeSubscriber::class . '@' . $action);\n }\n }", "public function listen(): void\n {\n $this->logger->debug('Start listening to the queue.');\n $handler = function (MessageInterface $message) {\n $this->worker->process($message, $this);\n };\n\n $this->driver->subscribe($handler);\n $this->logger->debug('Finish listening to the queue.');\n }", "public function listen() {\n $this->source->listen($this->id);\n }", "public function broadcastOn()\n {\n return ['laravue-channel'];\n }", "public function subscribe($events)\n {\n $events->listen(\n 'App\\Events\\ProtobufTCPEvent',\n 'App\\Listeners\\ProtobufTCPSubscribe@onMessage'\n );\n }", "public function subscribe($channels, Closure $callback)\n {\n $this->client->subscribe((array) $channels, function ($redis, $channel, $message) use ($callback) {\n $callback($message, $channel);\n });\n }", "public function broadcastOn()\n {\n return ['whatcanido-channel'];\n }", "protected function processChannelMessages()\n\t{\n\t\tif (preg_match(\n\t\t\t'/^(NEW|UPD|NUK): \\[DT: (?P<time>.+?)\\]\\s?\\[TT: (?P<title>.+?)\\]\\s?\\[SC: (?P<source>.+?)\\]\\s?\\[CT: (?P<category>.+?)\\]\\s?\\[RQ: (?P<req>.+?)\\]' .\n\t\t\t'\\s?\\[SZ: (?P<size>.+?)\\]\\s?\\[FL: (?P<files>.+?)\\]\\s?(\\[FN: (?P<filename>.+?)\\]\\s?)?(\\[(?P<nuked>(UN|MOD|RE|OLD)?NUKED?): (?P<reason>.+?)\\])?$/i',\n\t\t\t$this->_channelData['message'], $matches)) {\n\n\t\t\tif (isset($this->_ignoredChannels[$matches['source']]) && $this->_ignoredChannels[$matches['source']] === true) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ($this->_categoryIgnoreRegex !== false && preg_match((string)$this->_categoryIgnoreRegex, $matches['category'])) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ($this->_titleIgnoreRegex !== false && preg_match((string)$this->_titleIgnoreRegex, $matches['title'])) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$this->_curPre['predate'] = $this->_pdo->from_unixtime(strtotime($matches['time'] . ' UTC'));\n\t\t\t$this->_curPre['title'] = $matches['title'];\n\t\t\t$this->_curPre['source'] = $matches['source'];\n\t\t\tif ($matches['category'] !== 'N/A') {\n\t\t\t\t$this->_curPre['category'] = $matches['category'];\n\t\t\t}\n\t\t\tif ($matches['req'] !== 'N/A' && preg_match('/^(?P<req>\\d+):(?P<group>.+)$/i', $matches['req'], $matches2)) {\n\t\t\t\t$this->_curPre['reqid'] = $matches2['req'];\n\t\t\t\t$this->_curPre['group_id'] = $this->_getGroupID($matches2['group']);\n\t\t\t}\n\t\t\tif ($matches['size'] !== 'N/A') {\n\t\t\t\t$this->_curPre['size'] = $matches['size'];\n\t\t\t}\n\t\t\tif ($matches['files'] !== 'N/A') {\n\t\t\t\t$this->_curPre['files'] = substr($matches['files'], 0, 50);\n\t\t\t}\n\n\t\t\tif (isset($matches['filename']) && $matches['filename'] !== 'N/A') {\n\t\t\t\t$this->_curPre['filename'] = $matches['filename'];\n\t\t\t}\n\n\t\t\tif (isset($matches['nuked'])) {\n\t\t\t\tswitch ($matches['nuked']) {\n\t\t\t\t\tcase 'NUKED':\n\t\t\t\t\t\t$this->_curPre['nuked'] = \\PreDb::PRE_NUKED;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'UNNUKED':\n\t\t\t\t\t\t$this->_curPre['nuked'] = \\PreDb::PRE_UNNUKED;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'MODNUKED':\n\t\t\t\t\t\t$this->_curPre['nuked'] = \\PreDb::PRE_MODNUKE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'RENUKED':\n\t\t\t\t\t\t$this->_curPre['nuked'] = \\PreDb::PRE_RENUKED;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'OLDNUKE':\n\t\t\t\t\t\t$this->_curPre['nuked'] = \\PreDb::PRE_OLDNUKE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$this->_curPre['reason'] = (isset($matches['reason']) ? substr($matches['reason'], 0, 255) : '');\n\t\t\t}\n\t\t\t$this->_checkForDupe();\n\t\t}\n\t}", "public function broadcastOn()\n {\n return [\n $this->channel\n ];\n }", "public function broadcastOn()\n {\n return [\n $this->channel\n ];\n }", "protected function listen()\n {\n // Set time limit to indefinite execution\n set_time_limit (0);\n\n $this->socket = socket_create(\n AF_INET,\n SOCK_DGRAM,\n SOL_UDP\n );\n\n if (!is_resource($this->socket))\n {\n $this->logger->log(\"Failed to create a socket for the discovery server. The reason was: \" .\n socket_strerror(socket_last_error()));\n }\n\n if (!@socket_bind(\n $this->socket,\n $this->config->getSetting('discovery-address'),\n $this->config->getSetting('discovery-port')))\n {\n $this->logger->log(\"Failed to bind to socket while initialising the discovery server.\");\n }\n\n // enter an infinite loop, waiting for data\n $data = '';\n while (true)\n {\n if (@socket_recv($this->socket, $data, 9999, MSG_WAITALL))\n {\n $this->logger->log(\"Discovery server received the following: $data\");\n\n $this->handleMessage($data);\n }\n }\n }", "public function publish($channel, $message);", "public function subscribe($events)\n {\n $events->listen('Illuminate\\Mail\\Events\\MessageSending', self::class.'@onSending');\n }", "public function subscribe(): void\n {\n foreach (static::$eventHandlerMap as $eventName => $handler) {\n $this->events->listen($eventName, [$this, $handler]);\n }\n }", "public function broadcastOn() {\n return [\n new Channel('messages.' . $this->userReceiver->id . '.' . $this->currentUser->email),\n new Channel('messages.' . $this->currentUser->id . '.' . $this->userReceiver->email),\n ];\n }", "public function listen() {\n add_filter( \"the_content\", array($this, \"theContent\"));\n add_filter( \"the_title\", array($this, \"theTitle\"));\n }", "public function onChannels(): ?array\n {\n return null;\n }", "public function listenTo($file);", "protected function _subscribeToEngineEvents()\n {\n $controller = $this->getController();\n \n // Start listen to SDP signal\n $sdpNotifyFilter = Streamwide_Engine_NotifyFilter_Factory::factory(\n Streamwide_Engine_NotifyFilter_Factory::T_EVT_SIG_PARAM_REMOTE,\n Streamwide_Engine_NotifyFilter_Factory::FILTER_EQUAL_TO,\n $this->_leftCallLeg->getName()\n );\n $controller->addEventListener(\n Streamwide_Engine_Events_Event::SDP,\n array(\n 'callback' => array( $this, 'onSignalReceived' ),\n 'options' => array(\n 'autoRemove' => 'before',\n 'notifyFilter' => $sdpNotifyFilter\n )\n )\n );\n // End listen to SDP signal\n \n // Start listen to CHILD signal\n $childNotifyFilter = Streamwide_Engine_NotifyFilter_Factory::factory(\n Streamwide_Engine_NotifyFilter_Factory::T_EVT_SIG_PARAM_REMOTE,\n Streamwide_Engine_NotifyFilter_Factory::FILTER_IN_ARRAY,\n array( array( $this->_leftCallLeg->getName(), $this->_rightCallLeg->getName() ) )\n );\n $controller->addEventListener(\n Streamwide_Engine_Events_Event::CHILD,\n array(\n 'callback' => array( $this, 'onSignalReceived' ),\n 'options' => array(\n 'autoRemove' => 'before',\n 'notifyFilter' => $childNotifyFilter\n )\n )\n );\n // End listen to CHILD signal\n \n // Start listen to OKMOVED signal\n $okMovedNotifyFilter = Streamwide_Engine_NotifyFilter_Factory::factory(\n Streamwide_Engine_NotifyFilter_Factory::T_EVT_SIG_PARAM_REMOTE,\n Streamwide_Engine_NotifyFilter_Factory::FILTER_IN_ARRAY,\n array( array( $this->_leftCallLeg->getName(), $this->_rightCallLeg->getName() ) )\n );\n $controller->addEventListener(\n Streamwide_Engine_Events_Event::OKMOVED,\n array(\n 'callback' => array( $this, 'onSignalReceived' ),\n 'options' => array( 'notifyFilter' => $okMovedNotifyFilter )\n )\n );\n // End listen to OKMOVED signal\n \n // Start listen to MOVED signal\n $movedNotifyFilter = Streamwide_Engine_NotifyFilter_Factory::factory(\n Streamwide_Engine_NotifyFilter_Factory::T_EVT_SIG_PARAM_REMOTE,\n Streamwide_Engine_NotifyFilter_Factory::FILTER_EQUAL_TO,\n $this->_rightCallLeg->getName()\n );\n $controller->addEventListener(\n Streamwide_Engine_Events_Event::MOVED,\n array(\n 'callback' => array( $this, 'onSignalReceived' ),\n 'options' => array( 'notifyFilter' => $movedNotifyFilter )\n )\n );\n // End listen to MOVED signal\n \n // Start listen to FAILMOVED signal\n $failMovedNotifyFilter = Streamwide_Engine_NotifyFilter_Factory::factory(\n Streamwide_Engine_NotifyFilter_Factory::T_EVT_SIG_PARAM_REMOTE,\n Streamwide_Engine_NotifyFilter_Factory::FILTER_IN_ARRAY,\n array( array( $this->_leftCallLeg->getName(), $this->_rightCallLeg->getName() ) )\n );\n $controller->addEventListener(\n Streamwide_Engine_Events_Event::FAILMOVED,\n array(\n 'callback' => array( $this, 'onSignalReceived' ),\n 'options' => array(\n 'autoRemove' => 'before',\n 'notifyFilter' => $failMovedNotifyFilter\n )\n )\n );\n // End listen to FAILMOVED signal\n }", "public function broadcastOn()\n {\n //return new PrivateChannel('channel-name');\n }", "public function broadcastOn()\n {\n //return new PrivateChannel('channel-name');\n }", "public function broadcastOn()\n {\n //return new PrivateChannel('channel-name');\n }", "public function broadcastOn()\n {\n //return new PrivateChannel('channel-name');\n }", "public function listen(Event\\Trigger $channel)\n {\n // get listening methods\n $events = (array)$this->register();\n\n // bind to subject\n foreach($events as $event => $method) {\n $channel->on($event, [$this, $method]);\n }\n }", "public function broadcastOn()\n {\n// return new PrivateChannel('channel-name');\n }", "public function broadcastOn()\n {\n// return new PrivateChannel('channel-name');\n }", "public function testChannelsSetTopic()\n {\n }", "public function broadcastOn()\n {\n return new PrivateChannel('messagelive');\n }", "public function listen(): bool;", "public function broadcastOn()\n {\n return (new PrivateChannel('editor-notify'));\n }", "public function broadcastOn() {\n// return new PrivateChannel('channel-name');\n }", "public function testChannelsJoin()\n {\n }", "public function broadcastOn()\n {\n return ['channel-status'];\n }", "public function listen($args, $assoc_args = array())\n {\n global $wp_queue;\n\n $worker = new WP_Worker($wp_queue);\n\n WP_CLI::log('Listening for queue jobs...');\n\n while (true) {\n if ($worker->should_run()) {\n if ($worker->process_next_job()) {\n WP_CLI::success('Processed: ' . $worker->get_job_name());\n sleep(1);\n }\n } else {\n sleep(5);\n }\n }\n }", "public function onPrivateMessage($pattern, $callback)\n {\n $handler = new EventListener($pattern, $callback);\n $this->dispatcher->addListener('message.private', array($handler, 'testAndExecute'));\n }", "public function channel($channel);", "public function listen(Message $message, Command $command);", "public function get_channels()\n {\n }", "public function channel()\n {\n }", "public function generateChannel(){\n\t\t$tempArray = array();\n\t\tpreg_match('/\\+(.*?)@/', $this->recipient, $tempArray);\n\t\t$this->channel = $tempArray[1];\n\t}", "public function broadcastOn()\n {\n return [config('messenger.redis_channel', 'notification')];\n }", "public function testChannelsList()\n {\n }", "public function broadcast(array $channels, $event, array $payload = [])\n {\n\t\tarray_map(function($channel) use (&$event, &$payload){\n\t\t\t$this->larasopp->trigger($channel, $event, $payload);\n\t\t},$channels);\n }", "private function validate_channels($channels)\n {\n if (count($channels) > 100) {\n throw new SocketIoException('An event can be triggered on a maximum of 100 channels in a single call.');\n }\n\n foreach ($channels as $channel) {\n $this->validate_channel($channel);\n }\n }", "public function subscribeOn(): array\n {\n }", "public function subscribe($events)\n {\n $events->listen(\n 'Coyote\\Events\\TopicSaved',\n 'Coyote\\Listeners\\TopicListener@onTopicSave'\n );\n\n $events->listen(\n 'Coyote\\Events\\TopicMoved',\n 'Coyote\\Listeners\\TopicListener@onTopicMove'\n );\n\n $events->listen(\n 'Coyote\\Events\\TopicDeleted',\n 'Coyote\\Listeners\\TopicListener@onTopicDelete'\n );\n }", "public function broadcastOn()\n {\n // Have no idea about this\n // return new PrivateChannel('channel-name');\n }", "public function channels()\n {\n return $this->send('channels');\n }", "public function broadcastOn()\n {\n return new Channel('notifications');\n }", "function hook_message_subscribe_get_subscribers_alter(&$uids, $values) {\n\n}", "function wise_chat_endpoint_messages() {\n\t$wiseChatEndpoints = WiseChatContainer::get('endpoints/WiseChatEndpoints');\n\t$wiseChatEndpoints->messagesEndpoint();\n}", "public function listener()\n {\n /** @var \\Illuminate\\Redis\\Connections\\PhpRedisConnection|\\Illuminate\\Redis\\Connections\\PredisConnection $connection */\n $connection = Redis::connection($this->connection());\n\n register_shutdown_function(function () use ($connection) {\n $connection->disconnect();\n abort(200);\n });\n\n return response()->stream(function () use ($connection) {\n\n // Send the message with a retry timer\n $this->message()->retry($this->timeRetry())->send();\n\n // If the Last-Event-Id header is set, restore the connection with the last message id.\n if (request()->hasHeader('Last-Event-Id')) {\n $this->restore(request()->header('Last-Event-Id'));\n }\n\n // Listen for new messages\n $connection->subscribe([$this->channel()], fn (string $message) => $this->handler($message));\n\n }, Response::HTTP_OK, $this->headers());\n }", "public function getSubscribedEvents();", "public static function getSubscribedEvents();", "public static function getSubscribedEvents();", "public function listen() {\n\t\t$fields = wp_parse_args( $_POST, array(\n\t\t\t'check' => '',\n\t\t\t'log-level' => '',\n\t\t\t'log-engine' => '',\n\t\t) );\n\n\t\tforeach ( $fields as &$single_field ) {\n\t\t\t$single_field = sanitize_text_field( $single_field );\n\t\t}\n\n\t\tif ( ! wp_verify_nonce( $fields['check'], 'logging-controls' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * Fires before log settings are committed.\n\t\t *\n\t\t * This will not happen unless a nonce check has already passed.\n\t\t */\n\t\tdo_action( 'tribe_common_update_log_settings' );\n\n\t\t$this->update_logging_level( $fields['log-level'] );\n\t\t$this->update_logging_engine( $fields['log-engine'] );\n\n\t\t/**\n\t\t * Fires immediately after log settings have been committed.\n\t\t */\n\t\tdo_action( 'tribe_common_updated_log_settings' );\n\n\t\t$data = array(\n\t\t\t'logs' => $this->get_available_logs(),\n\t\t);\n\n\t\tif ( ! empty( $fields['log-view'] ) ) {\n\t\t\t$data['entries'] = $this->get_log_entries( $fields['log-view'] );\n\t\t}\n\n\t\twp_send_json_success( $data );\n\t}", "public function collectSubscribers();", "private function controller() {\n\n\t\t# While connected, manage the input\n\t\twhile(!feof($this->socket)) {\n\t\t\t# Read inbound connection into $this->inbound\n\t\t\t$this->getTransmission();\n\n\t\t\t# Detect MOTD (message number 376 or 422)\n\t\t\tif(strpos($this->inbound, $this->config['server'].\" 376\") || strpos($this->inbound, $this->config['server'].\" 422\")) {\n\t\t\t\t# Join channel then...\n\t\t\t\t$this->sendCommand(\"JOIN \".$this->config['destinationChannel']);\n\t\t\t\t$this->log(\"[INIT]: Joined destination channel\");\n }\n\t\t\t# If successfully joined the channel, mark bot as ready (names list message id 353)\n\t\t\tif(strpos($this->inbound, $this->config['server'].\" 353\")) {\n\t\t\t\t$this->ready = true;\n\t\t\t\t$this->log(\"[INIT]: Ready for commands!\");\n }\n\n\t\t\tif($this->ready) {\n\t\t\t\t# Parse the inbound message and scan for a command\n\t\t\t\t$this->parseMessage();\n\n # See if this command can be found in the command list\n # Command list is established by the loaded modules\n\t\t\t\tif(strlen($this->lastMessage['command']) > 0) {\n\t\t\t\t\tforeach($this->modules as $moduleName => $moduleObj) {\n\t\t\t\t\t\tif($moduleObj->findCommand($this->lastMessage['command'])) {\n # Launch command\n\t\t\t\t\t\t\t$this->log(\" -> Found command '\".$this->lastMessage['command'].\"' in module '\".$moduleName.\"' called by user: '\".$this->lastMessage['nickname'].\"'\");\n\t\t\t\t\t\t\t$reply = $this->modules[$moduleName]->launch($this->lastMessage['command'], $this->lastMessage);\n\t\t\t\t\t\t\tif(strlen($reply) > 0) {\n\t\t\t\t\t\t\t\t$this->sendMessage($reply);\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\n # If not, scan chatter for relevant calls to the bot\n if(strlen($this->lastMessage['chatter']) > 0) {\n foreach($this->modules as $moduleName => $moduleObj) {\n if($trigger = $moduleObj->findTrigger($this->lastMessage['chatter'])) {\n # Found a trigger for a command, fire it off\n # First, strip out chatter into command and args\n $triggered_command = $moduleObj->getCommandByTrigger($trigger);\n $this->lastMessage['command'] = $triggered_command;\n $chatter = $this->lastMessage['chatter'];\n $this->lastMessage['chatter'] = '';\n $this->lastMessage['args'] = rtrim(ltrim($chatter,$trigger),\"\\n\\r\");\n # Launch command\n $this->log(\" -> Found command '\".$this->lastMessage['command'].\"' in module '\".$moduleName.\"' by trigger '\".$trigger.\"' called by user: '\".$this->lastMessage['nickname'].\"'\");\n $reply = $this->modules[$moduleName]->launch($this->lastMessage['command'], $this->lastMessage);\n if(strlen($reply) > 0) {\n $this->sendMessage($reply);\n }\n }\n }\n }\n\t\t\t}\n\n\t\t\t# If server has sent PING command, handle\n if(substr($this->inbound, 0, 6) == \"PING :\") {\n\t\t\t\t# Reply with PONG for keepalive\n\t\t\t\t$this->sendCommand(\"PONG :\".substr($this->inbound, 6));\n }\n \n $this->lastMessage = null;\n $this->inbound = null;\n\t\t}\n\t}", "public function subscribe($events)\n {\n $events->listen(\n MicroblogSaved::class,\n 'Coyote\\Listeners\\MicroblogListener@onMicroblogSave'\n );\n\n $events->listen(\n MicroblogDeleted::class,\n 'Coyote\\Listeners\\MicroblogListener@onMicroblogDelete'\n );\n }", "public function subscribe($events)\n\t{\n\t\t\n\t\t$events->listen(\n\t\t\t\t\\App\\Events\\Backend\\Plugins\\PluginCreated::class,\n\t\t\t\t'App\\Listeners\\Backend\\Plugins\\PluginEventListener@onCreated'\n\t\t\t\t);\n\t\t\n\t\t$events->listen(\n\t\t\t\t\\App\\Events\\Backend\\Plugins\\PluginUpdated::class,\n\t\t\t\t'App\\Listeners\\Backend\\Plugins\\PluginEventListener@onUpdated'\n\t\t\t\t);\n\t\t\n\t\t$events->listen(\n\t\t\t\t\\App\\Events\\Backend\\Plugins\\PluginDeleted::class,\n\t\t\t\t'App\\Listeners\\Backend\\Plugins\\PluginEventListener@onDeleted'\n\t\t\t\t);\n\t\t\n\t\t$events->listen(\n\t\t\t\t\\App\\Events\\Backend\\Plugins\\PluginRestored::class,\n\t\t\t\t'App\\Listeners\\Backend\\Plugins\\PluginEventListener@onRestored'\n\t\t\t\t);\n\t\t\n\t\t$events->listen(\n\t\t\t\t\\App\\Events\\Backend\\Plugins\\PluginPermanentlyDeleted::class,\n\t\t\t\t'App\\Listeners\\Backend\\Plugins\\PluginEventListener@onPermanentlyDeleted'\n\t\t\t\t);\n\t\n\t\t$events->listen(\n\t\t\t\t\\App\\Events\\Backend\\Plugins\\PluginDeactivated::class,\n\t\t\t\t'App\\Listeners\\Backend\\Plugins\\PluginEventListener@onDeactivated'\n\t\t\t\t);\n\t\t\n\t\t$events->listen(\n\t\t\t\t\\App\\Events\\Backend\\Plugins\\PluginReactivated::class,\n\t\t\t\t'App\\Listeners\\Backend\\Plugins\\PluginEventListener@onReactivated'\n\t\t\t\t);\n\t}", "public function subscribe($events)\n {\n $events->listen('mailActivateAccount', 'App\\Listeners\\MailEventHandler@mailActivateAccount');\n $events->listen('mailActivatedAccount', 'App\\Listeners\\MailEventHandler@mailActivatedAccount');\n $events->listen('mailPasswordReminder', 'App\\Listeners\\MailEventHandler@mailPasswordReminder');\n }", "public function publishBatch($channel, array $messages)\n {\n foreach ($messages as $message) {\n $this->publish($channel, $message);\n }\n }", "public function subscribe(): void;", "public function listen($queueName);", "public function subscribe($keys)\n {\n return $this->send(['command'=>'subscribe', 'key'=>$keys, 'seq'=>$this->getSequence()]);\n }", "public function broadcastOn()\n {\n return new Channel('test');\n }", "public function broadcastOn()\n {\n return new Channel('my-channel');\n }", "public function broadcastOn() {\n return ['convertVideoAction'];\n }", "protected function setSwooleServerListeners()\n {\n foreach ($this->events as $event) {\n $listener = Str::camel(\"on_$event\");\n $callback = method_exists($this, $listener) ? [$this, $listener] : function () use ($event) {\n $this->triggerEvent($event, func_get_args());\n };\n\n $this->getServer()->on($event, $callback);\n }\n }", "public function eventsAction()\n {\n $callback = function ($msg) {\n //check the db before running anything\n if (!$this->isDbConnected('db')) {\n return ;\n }\n\n if ($this->di->has('dblocal')) {\n if (!$this->isDbConnected('dblocal')) {\n return ;\n }\n }\n\n //we get the data from our event trigger and unserialize\n $event = unserialize($msg->body);\n\n //overwrite the user who is running this process\n if (isset($event['userData']) && $event['userData'] instanceof Users) {\n $this->di->setShared('userData', $event['userData']);\n }\n\n //lets fire the event\n $this->events->fire($event['event'], $event['source'], $event['data']);\n\n $this->log->info(\n \"Notification ({$event['event']}) - Process ID \" . $msg->delivery_info['consumer_tag']\n );\n };\n\n Queue::process(QUEUE::EVENTS, $callback);\n }" ]
[ "0.6603072", "0.6598305", "0.6223854", "0.5995287", "0.5936532", "0.5929271", "0.5835901", "0.5808263", "0.5756815", "0.57367975", "0.5640888", "0.55981904", "0.5529045", "0.55226", "0.5451146", "0.5287195", "0.5271889", "0.5268541", "0.5225792", "0.51986676", "0.5179029", "0.5162615", "0.5155458", "0.51520425", "0.51338005", "0.50991267", "0.5081845", "0.50643915", "0.50166196", "0.49951726", "0.49946886", "0.49921736", "0.4958743", "0.494782", "0.49371105", "0.49348325", "0.4921596", "0.49061003", "0.48875695", "0.48875695", "0.48717895", "0.48705754", "0.48330635", "0.48018783", "0.47891814", "0.47826305", "0.47809625", "0.47785172", "0.47780728", "0.47705632", "0.47705632", "0.47705632", "0.47705632", "0.4766584", "0.47630733", "0.47630733", "0.47584757", "0.47547933", "0.47546116", "0.47495323", "0.4746613", "0.47399154", "0.47304127", "0.47236216", "0.47146928", "0.47061983", "0.46903312", "0.46897218", "0.4688187", "0.4687568", "0.4684151", "0.46741134", "0.46739402", "0.46706614", "0.46612376", "0.4644993", "0.46449825", "0.46103892", "0.46052542", "0.45995408", "0.459613", "0.4596123", "0.4595468", "0.45936695", "0.45936695", "0.45924297", "0.4590475", "0.45840016", "0.45828247", "0.45812058", "0.45806202", "0.45789734", "0.45734492", "0.4572474", "0.4570342", "0.45605737", "0.45248553", "0.4516562", "0.4515002", "0.45098302" ]
0.66774696
0
Post a message to a channel
public function publish($channel, $message);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sendChannelMessage($message)\n\t{\n\t\t$this->sendMessage($this->channel, $message);\n\t}", "public function publish($channel, $message)\n {\n $this->client->publish($channel, Serialization::serializeMessage($message));\n }", "public static function postMessage\n\t(\n\t\t$channelID\t\t// <int> The channel ID to post a message to.\n\t,\t$uniID\t\t\t// <int> The UniID posting a message.\n\t,\t$message\t\t// <str> The message being posted to the chat.\n\t)\t\t\t\t\t// RETURNS <bool> TRUE on success, FALSE on failure.\n\t\n\t// AppChat::postMessage($channelID, $uniID, $message);\n\t{\n\t\treturn Database::query(\"REPLACE INTO chat_messages (channel_id, date_posted, uni_id, message) VALUES (?, ?, ?, ?)\", array($channelID, microtime(true), $uniID, $message));\n\t}", "private function DiscordPostMsg($channel_id, $message = null, $embed = null)\n {\n $data = array();\n if ($message) $data['content'] = $message;\n if ($embed) $data['embed'] = $embed;\n $request = $this->request(\"channels/{$channel_id}/messages\",\n json_encode($data),\n \"discord\",\n null,\n false, [\n \"Authorization: Bot {$this->config->discord->bot->token}\",\n \"Content-Type: application/json\"\n ]);\n return ($request['code'] == 200 ? $request['response'] : false);\n }", "public function sendMessage($message, $channel){\n $this->bot->api->init_curl_with_header(\n \"channels/{$channel->id}/messages\",\n \"{\\\"content\\\":\\\"{$message}\\\"}\");\n }", "public function sendMessage($message)\n\t{\n\t\tglobal $log;\n\n\t\tif (!empty($this->channel)) {\n\t\t\t$log->print(date('H:i:s', time()));\n\t\t\t$log->println(' > ' . $message, COLOR_BOT_MESSAGE);\n\t\t\t$this->send('PRIVMSG #' . $this->channel . ' : ' . $message);\n\t\t} else\n\t\t\techo '[ERROR] No channel were joined' . PHP_EOL;\n\t}", "public function postMessage($name, $message, $color) {\n\t\t// real_escape_string prevents hacking of the database\n\t\t$name = $this -> mysqli -> real_escape_string($name);\n\t\t$message = $this -> mysqli -> real_escape_string($message);\n\t\t$color = $this -> mysqli -> real_escape_string($color);\n\n\t\t// sends message to the database\n\t\t$query = 'INSERT INTO chat(posted_on, user_name, message, color) ' . 'VALUES (NOW(), \"' . $name . '\" , \"' . $message . '\",\"' . $color . '\")';\n\t\t$result = $this -> mysqli -> query($query);\n\t}", "public function push($message);", "function postNewMessage($user_id, $thread_id, $message)\n\t\t{\n\t\t\t$query=sqlite_exec($this->connection, \"INSERT INTO message(thread_id, user_id, message, date) VALUES($thread_id, $user_id, $message, NOW())\");\n\t\t}", "public function send($message);", "public function send($message);", "public function send($message);", "public function send($message);", "public function postAction() {\n\t\t$this->sendMessage();\n\t}", "function ts3client_requestSendChannelTextMsg($serverConnectionHandlerID, $message, $targetChannelID) {}", "public function send_msg($message)\r\n\t{\r\n\t\t$this->server->send_msg($this->channel, $message);\r\n\t}", "private function _message($message)\n {\n if ($this->_data->channel)\n {\n $this->_irc->message(SMARTIRC_TYPE_CHANNEL, $this->_data->channel, $message);\n }\n else {\n $this->_privmessage($message, $this->_data->nick);\n }\n\n \n }", "public function post($msg) {\r\n\t\tif (isset ( $_GET ['oauth_token'] )) {\r\n\t\t\t/* exchange the request token for access token */\r\n\t\t\t$key = $_COOKIE ['key'];\r\n\t\t\t$secret = $_COOKIE ['secret'];\r\n\t\t\t$result = $this->client->getAccessToken ( $key, $secret );\r\n\t\t\t$key = $result [\"oauth_token\"];\r\n\t\t\t$secret = $result [\"oauth_token_secret\"];\r\n\t\t\tif ($key) {\r\n\t\t\t\t\r\n\t\t\t\t/* access success, let's say something. */\r\n\t\t\t\t$this->client->programmaticLogin ( $key, $secret );\r\n\t\t\t\t//echo 'logged in.';\r\n\t\t\t\t$entry = new Zend_Gdata_Douban_BroadcastingEntry();\r\n\t\t\t\t$content = new Zend_Gdata_App_Extension_Content($msg);\r\n\t\t\t\t$entry->setContent ( $content );\r\n\t\t\t\t$entry = $this->client->addBroadcasting ( \"saying\", $entry );\r\n\t\t\t\t//echo '<br/>you just posted: ' . $entry->getContent ()->getText ();\r\n\t\t\t} else {\r\n\t\t\t\techo 'Oops, get access token failed';\r\n\t\t\t}\r\n\t\t} \r\n\r\n\t}", "public function postMessage(MessageRequest $form)\n {\n $response = ['done' => false];\n\n if (\\Auth::check()) {\n $mute = $this->mutes->getByUserActive(\\Auth::user()->id);\n\n if (!empty($mute)) {\n // The user is muted, return an error\n $response['error'] = -2;\n } else {\n $status = Chat::STATUS_VISIBLE;\n $contents = $form->contents;\n if (\\Auth::user()->isStaff()) {\n // The user is a staff member, enable commands\n if (\\String::startsWith('/pin ', $contents)) {\n $contents = \\String::replaceFirst('/pin ', $contents);\n $status = Chat::STATUS_PINNED;\n } elseif (\\String::startsWith('/hide ', $contents)) {\n $contents = \\String::replaceFirst('/hide ', $contents);\n $status = Chat::STATUS_INVISIBLE;\n } elseif (\\String::startsWith('/hid ', $contents)) {\n $contents = \\String::replaceFirst('/hid ', $contents);\n $status = Chat::STATUS_INVISIBLE;\n } elseif (\\String::startsWith('/pinhid ', $contents)) {\n $contents = \\String::replaceFirst('/pinhid ', $contents);\n $status = Chat::STATUS_PINNED_INVISIBLE;\n } elseif (\\String::startsWith('/hidpin ', $contents)) {\n $contents = \\String::replaceFirst('/hidpin ', $contents);\n $status = Chat::STATUS_PINNED_INVISIBLE;\n }\n }\n\n // Parse the contents into Markdown\n $contentsParsed = with(new \\Parsedown)->text($contents);\n\n // Filter out words that are censored\n $filters = $this->filters->getAll();\n foreach ($filters as $filter) {\n $asterisks = str_repeat('*', strlen($filter->text));\n $contentsParsed = str_ireplace($filter->text, $asterisks, $contentsParsed);\n }\n\n with(new Chat)->saveNew(\\Auth::user()->id, $form->contents, $contentsParsed, $status, $this->channels->getByNameTrim($form->channel)->id);\n $channel = $this->channels->getByNameTrim($form->channel);\n $channel->messages = $channel->messages + 1;\n $channel->save();\n\n $response['done'] = true;\n }\n } else {\n // The user is not logged in\n $response['error'] = -1;\n }\n\n return json_encode($response);\n }", "public function sendMessage()\n {\n $userId = auth()->user()->id;\n\n // Save the message\n Message::create([\n 'room_id' => $this->roomId,\n 'user_id' => $userId,\n 'message' => $this->message,\n ]);\n\n // Remove the value of the message after saving\n $this->message = \"\";\n\n // Prompt the server that we sent a message\n $this->dispatchBrowserEvent('chat-send-message', [\n 'room_id' => $this->roomId,\n 'user_id' => $userId,\n ]);\n }", "public function sendMessage($message) {\n\t\t$this->sendCommand(\"PRIVMSG \".$this->config['destinationChannel'].\" :\".$message);\n\t}", "public function sendMessage(BotMessage $message): void;", "public abstract function send(Hermes_Message_Data $message);", "public function sendMessage($user_id, $message)\n {\n $this->_Database->query(\"INSERT INTO chat (chat_id, user_id, message, time_posted) VALUES ('', :user_id, :message, CURRENT_TIMESTAMP)\", array(':user_id' => $user_id, ':message' => $message));\n }", "public function send($message)\n {\n }", "function postMessage($message)\n {\n require('../config.php');\n $connection = mysqli_connect($bdd_host, $bdd_user, $bdd_password, $bdd_database, $bdd_port);\n if (!$connection) {\n return false;\n }\n $text = $message['text'];\n $username = $message['user'];\n $date = $message['date'];\n $userId = retrieveUserId($username, $connection);\n\n $query = \"INSERT INTO message (text, date, user_id)\n VALUES('$text', '$date', $userId)\";\n $result = mysqli_query($connection, $query);\n if (!$result) {\n mysqli_close($connection);\n return false;\n }\n userSentMessage($userId, $connection);\n mysqli_close($connection);\n return true;\n }", "public function testCreateMessage()\n {\n $config = new Configuration();\n// $config->setHost(\"http://127.0.0.1:8080\");\n $apiInstance = new DaDaPushMessageApi(\n // If you want use custom http client, pass your client which implements `GuzzleHttp\\ClientInterface`.\n // This is optional, `GuzzleHttp\\Client` will be used as default.\n new \\GuzzleHttp\\Client(),\n $config\n );\n\n $actions = [\n new Action($data = array(\"name\" => \"view\", \"url\" => \"https://www.dadapush.com/\", \"type\" => \"link\"))\n ];\n\n $body = new MessagePushRequest($data = array(\"title\" => \"Good News!\",\n \"content\" => \"Good News! DaDaPush releasing new version\",\n \"need_push\" => true,\n \"actions\" => $actions\n ));\n\n $channel_token = 'ctb3lwO6AeiZOwqZgp8BE8980FdNgp0cp6MCf';\n\n $result = $apiInstance->createMessage($body, $channel_token);\n print_r($result);\n self::assertTrue($result->getCode()==0);\n }", "public function message($channel, $text, $options = [])\n {\n return $this->method('postMessage', array_merge(compact('channel', 'text'), ['as_user' => ! isset($options['username'])], $options));\n }", "private function send(): void\n {\n $data = [\n 'code' => $this->status,\n 'message' => $this->message,\n 'datetime' => Carbon::now()\n ];\n\n $config = config(\"tebot.$this->channelConfig\");\n\n $data['title'] = $this->title . ' ' . $config['name'];\n\n if (!empty($this->detail)) $data['detail'] = json_encode($this->detail);\n\n Http::withHeaders(['x-api-key' => $config['key']])->post($config['url'] . '/api/message', $data);\n }", "function sendSlackMessage()\n\t{\n\t\t$attachment = array(\n\t\t\tarray(\n\t\t\t\t'fallback' => $this->slack_message,\n\t\t\t\t'pretext' => $this->pretext,\n\t\t\t\t'text' => $this->slack_message,\n\t\t\t\t'title' => $this->title\n\t\t\t)\n\t\t);\n\n\t\t//Set up slack message payload\n\t\t$payload = array();\n\t\t$payload['username'] = \"MetroBot\";\n\t\t$payload['icon_emoji'] = \":train:\";\n\t\t$payload['channel'] = $this->getRecipient();\n\t\t$payload['attachments'] = $attachment;\n\t\t$message = $this->slack->post('', ['body' => json_encode($payload)]);\n\t}", "function store($channelId, Thread $thread, CreatePostRequest $form){\n\n\t\t// #54 remove all codes to $form CreatePostForm\n\t\t\n\t\t// if(Gate::denies('create', new Reply)){\n\t\t// \treturn response(\n\t\t// \t\t'Та дахин дахин нийтлэл оруулж байна, Түр хүлээнэ үү! :)', 429);\n\t\t// } \n\t\t// request()->validate(['body' => 'required|spamfree']);\n\t\t\n\t\treturn $thread->addReply([\t\n\t\t\t'body' => request('body'), \t\t\t\t\n\t\t\t'user_id' => auth()->id()\t\t\t\n\t\t])->load('owner');\n\n\t}", "function doAction(\r\n\r\n\tMessage $message, \r\n\tAdapter $adapter, \r\n\tCurlMessanger $curlMessanger, \r\n\tArray $args\r\n\r\n\t) {\r\n\t\t$message->setMessage \t ( $args['message'] );\r\n\t\t$message->setNickName \t ( $args['nickName'] );\r\n\t\t$message->setChannel \t ( $args['channel'] );\r\n\r\n\t\t$adapter->setCurlUrl \t ( $args['curlUrl'] );\r\n\t\t$adapter->setCurlToken ( $args['curlToken']);\r\n\r\n\t\t//Another parametrs should be set! Depends on what api we use!\r\n\r\n\t\t$adapter->setCurlMessanger( $curlMessanger, $message );\r\n\r\n\t\t$message->setAdapter ( $adapter );\r\n\r\n\t\t$message->getAdapter ()\r\n\t\t\t\t->getCurlMessanger()\r\n\t\t\t\t->saySomething ();\r\n\t}", "public function send(Message $message)\n {\n $client = $this->getHttpClient();\n\n $url = $this->api_endpoint . $this->token;\n\n $client->post($url, array('json' => $this->buildMessage($message)));\n }", "public function send(WorkItem $message);", "protected function sendMessage($message, $channel_id = null)\n {\n if ($channel_id == null) {\n $channel_id = $this->channel_id;\n }\n\n $response = array(\n 'id' => $this->getMsgId(),\n 'type' => 'message',\n 'channel' => $channel_id,\n 'text' => $message,\n );\n\n $this->websocket->send(json_encode($response));\n }", "public function post_message($access_token, SocialMessage $message, $access_token_secret = '');", "public function onChannel($channel);", "public function handle(PostMessage $command)\n {\n $actor = $command->actor;\n $attributes = $command->data['attributes'];\n $ip_address = $command->ip_address;\n\n $content = $attributes['message'];\n $chat_id = $attributes['chat_id'];\n\n $chat = $this->chats->findOrFail($chat_id, $actor);\n\n $this->assertCan(\n $actor,\n 'pushedx-chat.permissions.chat'\n );\n\n $this->floodgate->assertNotFlooding($actor, $chat);\n\n $message = Message::build(\n $content,\n $actor->id,\n Carbon::now(),\n $chat->id,\n $ip_address\n );\n\n $this->validator->assertValid($message->getDirty());\n\n $message->save();\n $message->event = 'message.post';\n\n return $message;\n }", "function channelCreate(ChannelInterface $channel);", "public function reply_post() {\n\t\t$data['uid'] = $this->input->get('uid');\n\t\t$data['_id'] = $this->input->get('_id');\n\t\t$data['text'] = $this->input->get('text');\n\t\t$data['ts'] = now();\n\t\t\n\t\t$this->Messages_model->reply($data);\n\t}", "public function writeMessage($message);", "function notifyOnSlack($message)\n{\n $notifyToChannel = array(\n 'channel' => SLACK_CHANNEL,\n 'text' => $message\n );\n $payload = \"payload=\" . json_encode($notifyToChannel);\n \n $ch = curl_init();\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_URL, SLACK_WEBHOOK_URL);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);\n curl_exec($ch);\n curl_close($ch);\n}", "function joinChannel($channel, $entry_message = null)\n\t{\n\t\t$this->sendMessageToServer(\"JOIN $channel\");\n\t\t$this->channel = $channel;\n\t\tif($entry_message != null) $this->sendChannelMessage($entry_message);\n\t}", "function tell_rosbot($msg, $channel)\n{\n $data = array\n (\n \"msg\" => ($msg)\n );\n $data_string = json_encode($data);\n\n $url = 'http://localhost:8080/hubot/automessage/' . $channel;\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $result = curl_exec($ch);\n return ($result == 'OK');\n}", "public function send()\n\t{\n\t\t$message = $this->message ?: ucwords($this->getSystemUser()).' ran the ['.$this->task.'] task.';\n\n\t\t$payload = ['text' => $message, 'channel' => $this->channel];\n\n Request::post(\"https://{$this->team}.slack.com/services/hooks/incoming-webhook?token={$this->token}\")->sendsJson()->body($payload)->send();\n\t}", "public static function send_message($message){\n\t\tglobal $DB;\n\t\tif(!is_object($message)){\n\t\t\t$message = $DB->get_record('certif_messages_log', ['id' => $message]);\n\t\t}\n\t\tif($message){\n\t\t\t$user = $DB->get_record('user', ['id' => $message->userid]);\n\t\t\t$contact = \\core_user::get_support_user();\n\t\t\tif(!$user){\n\t\t\t\t$user = clone $contact;\n\t\t\t\t$user->email = $message->email;\n\t\t\t\t$user->firstname = '';\n\t\t\t\t$user->lastname = '';\n\t\t\t}\n\n\t\t\t$message->body = nl2br($message->body);\n\t\t\temail_to_user($user, $contact, $message->subject, strip_tags($message->body), $message->body);\n\n\t\t\t$message->timesent = time();\n\t\t\t$DB->update_record('certif_messages_log', $message);\n\t\t}\n\t}", "public function channel($channel);", "public static function sendMessage($message) {\n $context = new \\ZMQContext();\n $socket = $context->getSocket(\\ZMQ::SOCKET_PUSH, 'my pusher');\n $socket->connect(\"tcp://localhost:5555\");\n $socket->send($message);\n }", "public function store(Request $request, $channel)\n {\n $message = $request->all();\n\n $muid = $message['muid'];\n\n $message_arr = array(\n 'title' => $message['title'],\n 'body' => $message['body']\n );\n\n if ($muid != '') {\n\n $row_arr = array(\n 'channel' => $channel,\n 'muid' => $muid\n );\n DB::table('messages')\n ->where([\n array('channel','=', $channel),\n array('muid', '=', $muid)\n ])\n ->update($message_arr);\n\n $message_arr = array_merge($message_arr, $row_arr, array('action' => 'update'));\n } else {\n\n $message_arr_add = array(\n 'channel' => $channel,\n 'muid' => uniqid(),\n 'time' => time()\n );\n $message_arr = array_merge($message_arr, $message_arr_add);\n\n DB::table('messages')\n ->insert($message_arr);\n\n $message_arr = array_merge($message_arr, array('action' => 'add'));\n }\n\n $message = json_encode($message_arr);\n event(new FanoutEvent($channel, $message));\n\n return array('status' => 'ok', 'message' => $message);\n }", "function send($message) {\n\t$message = $message['attachments'][0];\n\t$content = '<a href=\"' . htmlspecialchars($message['title_link'], ENT_QUOTES) . '\">' . $message['title'] . '</a>: ' . $message['fallback'];\n\n\t$data = createMessagePayload($content);\n\n\t$result = Request::sendMessage($data);\n}", "function slack_message($message, $icon = \":phone:\")\n\t{\n\t\t$data = \"payload=\" . json_encode(array(\n\t\t\t\t\"channel\" => \"#\".$GLOBALS['slack_channel'],\n\t\t\t\t\"text\" => $message,\n\t\t\t\t\"icon_emoji\" => $icon\n\t\t\t));\n\t\n\t\t$ch = curl_init($GLOBALS['hook_url']);\n\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t$result = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\treturn $result;\n\t}", "public function publish($channel, $data, $debug = false)\n {\n return $this->trigger('publish', array(\"channel\" => $channel, \"data\" => $data), $debug);\n }", "public function sendEvent(string $topic, $message): void;", "public function postMessage(SlackHttpPayloadServicePostMessage $message) {\n return $this->decodeRequest($this->slackHttpService->requestWithArguments($this->mainApi . '.' . 'postMessage', $message->getPayload()));\n }", "public function publish(Message $message) : Promise;", "public function writeMessage ()\n {\n $authObject = new Authenticate();\n $authObject->validateWriteMessage($_GET[\"controller\"]);\n \n $body = $_POST[\"body\"];\n $subject = $_POST[\"subject\"];\n \n $sentto = $_POST[\"sentto\"];\n \n $this->createUser();\n \n if (($this->_objUser->messageSend($body, $subject, $sentto)) == false) {\n $this->setCustomMessage(\"ErrorMessage\", \"Problem in sending message\");\n } else {\n $this->setCustomMessage(\"SuccessMessage\", \"Message sent successfully\");\n }\n }", "function artmo_send_private_message($to, $from, $message){\n if ($from==$to) return;\n // Create conversation and add message\n $_POST['content'] = $message;\n $conversation_id = UM()->Messaging_API()->api()->create_conversation( $to, $from );;\n $_POST['content'] = \"\";\n do_action('um_after_new_message', $to, $from, $conversation_id );\n}", "public static function slackNotification(string $msg, string $channel = 'C5S9LV83S')\n {\n $curl = curl_init();\n curl_setopt_array($curl,\n [\n CURLOPT_RETURNTRANSFER => 1,\n CURLOPT_URL => 'https://slack.com/api/chat.postMessage',\n CURLOPT_POSTFIELDS => [\n 'token' => 'xoxb-101555870051-rw3ZFZk34E8fzDaon5jhfjVc',\n 'channel' => $channel,\n 'text' => $msg,\n 'parse' => 'full',\n 'username' => 'maxliving-bot'\n ]\n ]\n );\n curl_exec($curl);\n curl_close($curl);\n }", "public function write($message);", "public function sendMessage(ShortMessageContract $message);", "public function sendChannelMessage(string $token, string $message)\n {\n $response = $this->client->request('POST', 'channel/send', [\n 'headers' => [\n 'Authorization' => 'Bearer '.$token,\n ],\n 'form_params' => [\n 'message' => $message,\n ],\n ])->getBody();\n\n return json_decode($response->getContents(), true);\n }", "public function store(Channel $channel)\n {\n $this->authorize('create', [Message::class, $channel]);\n\n request()->validate([\n 'text' => 'required',\n ]);\n\n $message = auth()->user()->messages()->create([\n 'channel_id' => $channel->id,\n 'text' => request('text')\n ]);\n\n broadcast(new MessageSent($channel, $message))->toOthers();\n\n return $message;\n }", "public abstract function sendMessage();", "public function postNewPushOnParse(){\n\t\t$this->generateChannel();\n\t\t$ch = curl_init();\n\t\t$headers = array( \"X-Parse-Application-Id: $this->PARSEAPPID\",\n \"X-Parse-REST-API-Key: $this->PARSEAPIKEY\",\n \"Content-Type: application/json\");\n $url = \"https://api.parse.com/1/classes/\" . $this->STORAGECLASS;\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array(\"sender\" => $this->sender, \"message\" => $this->push, \"channel\" => $this->channel, \"sent\" => 0)));\n\t\t$result = curl_exec($ch);\n\t\tcurl_close($ch);\n \t\treturn $result;\n\t}", "function commentOnSlack($text, $slack_token, $recipient) {\n $post_string = json_encode([\n 'text' => $text,\n 'channel' => $recipient,\n 'username' => 'ICBot',\n 'icon_emoji' => ':circleci:',\n ]);\n\n $ch = curl_init(); \n curl_setopt($ch,CURLOPT_URL,\"https://slack.com/api/chat.postMessage\");\n curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_HTTPHEADER, [\n 'Content-Type: application/json',\n \"Authorization: Bearer $slack_token\"\n ]);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post_string);\n\n $output=json_decode(curl_exec($ch), TRUE);\n curl_close($ch);\n return $output;\n}", "public function sendMessage($queueId, $message, $options = null);", "private function notify_log($message)\n {\n global $edd_options;\n\n if (isset($edd_options['edd_jeeb_webhookDebugUrl'])) {\n $post = json_encode($message);\n $ch = curl_init($edd_options['edd_jeeb_webhookDebugUrl']);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json',\n ));\n\n curl_exec($ch);\n }\n }", "public function store($channelId, Thread $thread, CreatePostRequest $request)\n {\n return $thread->addReply([\n 'user_id' => Auth::user()->id,\n 'body' => request('body'),\n ])->load('owner');\n }", "public function postMessage(Request $request)\n {\n info($request->all());\n if(!empty($request->post('event')) && !empty($request->post('event')['text']) && empty($request->post('event')['bot_id'])) {\n\t $event = $request->post('event');\t\n\t $channel = $event['channel'];\n\t $question = $event['text'];\n\t $user = $event['user'];\n dispatch(new PostMessageJob($this->botService, $question, $channel, $user));\n die(json_encode(array('status' => 200, 'message' => 'OK')));\n }\n\n return null;\n }", "public function message($message, $channelName = null, $icon = null)\n {\n // Get the channel ID for the specified channel name\n $channelId = $this->getChannelId($channelName);\n\n // If the channel ID is null, throw an exception\n if ($channelId === null) {\n throw new \\Exception('Channel not found.');\n }\n\n // Did we get an icon or do we use the default?\n $icon = ($icon == null) ? $this->defaultIcon : $icon;\n\n $params = [\n 'channel' => $channelId,\n 'text' => $message,\n ];\n \n // Determine if the icon is an emoji or URL and set the appropriate parameter\n if ( ! empty($icon) ) {\n if (preg_match('/^:.+:$/', $icon)) {\n $iconParam = ['icon_emoji' => $icon];\n $this->debug(\"Using emoji {$icon}\");\n } else {\n $iconParam = ['icon_url' => $icon];\n $this->debug(\"Using url {$icon}\");\n }\n $params = array_merge($params, $iconParam);\n }\n $this->debug(\"params \" . json_encode($params));\n try {\n $response = $this->client->request('POST', 'chat.postMessage', [\n 'headers' => [\n 'Authorization' => 'Bearer ' . $this->slackToken,\n 'Content-Type' => 'application/json',\n ],\n 'json' => $params,\n ]);\n\n $responseBody = json_decode($response->getBody(), true);\n if ($responseBody['ok']) {\n return true;\n } else {\n throw new \\Exception($responseBody['error']);\n }\n } catch (GuzzleException $e) {\n throw new \\Exception($e->getMessage());\n }\n }", "public static function send(Message $message, $url = null)\n {\n $payload = $message->toJson();\n // We will retry for errors that we consider transient.\n // Full error list: https://curl.se/libcurl/c/libcurl-errors.html\n $transient_errors = [\n CURLE_OPERATION_TIMEDOUT,\n CURLE_COULDNT_RESOLVE_HOST,\n CURLE_COULDNT_CONNECT,\n CURLE_HTTP_RETURNED_ERROR,\n ];\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url ?? ($_ENV['SLACK_URL'] ?? ''));\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_TIMEOUT, 5);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));\n curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);\n\n for ($try = 1;;) {\n $result = curl_exec($ch);\n $error = curl_errno($ch);\n // Check that curl was successful.\n if ($error == CURLE_OK) {\n // Check that Slack accepted the post.\n if ($result != 'ok') {\n echo \"\\nERROR: Slack reported: '$result'\\n\";\n }\n break;\n }\n $error_string = curl_strerror($error);\n echo \"Slack post failed with cURL error ($error): $error_string - \";\n if (!in_array($error, $transient_errors) || $try++ > self::MAX_RETRIES) {\n echo \"Giving up.\\n\";\n break;\n }\n\n echo \"Retrying in {${self::RETRY_INTERVAL}} seconds...\\n\";\n sleep(self::RETRY_INTERVAL);\n }\n\n curl_close($ch);\n }", "public function channel()\n {\n }", "function sendDirectMessage($settings, $name, $message)\r\n{\r\n$url = 'https://api.twitter.com/1.1/direct_messages/new.json';\r\n$requestMethod = 'POST';\r\n$postfields = array(\r\n 'screen_name' => $name,\r\n 'text' => $message,\r\n);\r\n\r\n$twitter = new TwitterAPIExchange($settings);\r\n $twitter->buildOauth($url, $requestMethod)\r\n ->setPostfields($postfields)\r\n ->performRequest();\r\n}", "public function store($channelId, Thread $thread, CreatePostForm $form)\n {\n if ($reply = $form->persist($thread)) {\n return response([\n 'success' => 'Your reply has been left.',\n 'reply' => $reply->load('user')\n ]);\n }\n }", "public function write(string $message);", "public function publish(Channel $channel)\n {\n return Notification::send($channel->user, new ChannelNotifyer($channel, 'publish'));;\n }", "public function message(string $msg, array $params = []): void\r\n {\r\n $sendMessage = new AMQPMessage($msg, $params);\r\n $this->channel->basic_publish($sendMessage, '', $this->queue);\r\n }", "function sendMessage($chat_id, $text, $markdown = true, $disable_preview = true) {\n // This array will hold our parameters.\n $data = [];\n\n $data['chat_id'] = $chat_id;\n $data['text'] = $text;\n\n if ( $markdown ) {\n $data['parse_mode'] = \"Markdown\";\n }\n\n if ( $disable_preview ) {\n $data['disable_web_page_preview'] = \"true\";\n }\n\n apiRequest('sendMessage', $data);\n }", "public function sendMessage(Message $message)\n\t{\n\t\t$request = $this->getHttp()->post(static::URL.'note', null, $this->buildMessagePayload($message));\n\n\t\treturn $this->sendPlain($request);\n\t}", "public function sendPost(){\n\t\t\t// record the post in the database\n\t\t\t\n\t\t}", "private function sendMessage()\n {\n try\n {\n $request = $_POST;\n\n $uid = userid();\n\n if (!$uid)\n throw_error_msg( lang(\"you_not_logged_in\") ) ;\n\n if( !isset($request['username']) || $request['username']==\"\" )\n throw_error_msg(\"username not provided\");\n\n if( !isset($request['subject']) || $request['subject']==\"\" )\n throw_error_msg(\"subject not provided\");\n\n if( !isset($request['content']) || $request['content']==\"\" )\n throw_error_msg(\"content not provided\");\n\n $array['is_pm'] = true;\n $array['from'] = $uid;\n $array['to'] = $request['username'];\n $array['subj'] = mysql_clean($request['subject']);\n $array['content'] = mysql_clean($request['content']);\n\n global $cbpm;\n $rs = $cbpm->send_pm($array);\n\n if( error() )\n {\n throw_error_msg(error('single')); \n }\n\n if( msg() )\n {\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => \"message sent successfully\", \"data\" => array());\n $this->response($this->json($data));\n } \n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n } \n\n }", "public function send(Message $message, Connection $connection);", "public function handleSendMessage() {\n\t\t$json = file_get_contents(\"php://input\"); //vytánutí všech dat z POST požadavku - data ve formátu JSON\n\t\t$data = Json::decode($json); //prijata zprava dekodovana z JSONu\n\t\t$user = $this->getPresenter()->getUser();\n\t\t$addMessage = $this->addMessage($data, $user);\n\t\tif (!empty($addMessage)) {\n\t\t\t$this->sendRefreshResponse($data->lastid);\n\t\t}\n\t}", "public function handlePushChannel($push_text)\n {\n $message = $this->getUpdate()->message;\n if (is_null($message)) {\n return;\n }\n\n if (empty($push_text)) {\n $this->replyWithMessage(\n 'Текст для рассылки потерялся. Начните заново /push'\n );\n\n return;\n }\n\n $channel_name = $this->getUpdate()->message->text;\n if (empty($channel_name)) {\n $this->replyWithMessage(\n 'Название канала рассылки пустое. Начните заново /push'\n );\n\n return;\n } elseif (self::BTN_CANCEL == $channel_name) {\n $this->replyWithMessage(\n 'Рассылка отменена.'\n );\n\n return;\n }\n\n $d = $this->getBus()\n ->getBot()\n ->getContainer()\n ->get('doctrine');\n $notifications = $d->getRepository('KaulaTelegramBundle:Notification')\n ->findAll();\n $channel_selected = null;\n /** @var \\Kaula\\TelegramBundle\\Entity\\Notification $notification_item */\n foreach ($notifications as $notification_item) {\n if ($channel_name == $notification_item->getTitle()) {\n $channel_selected = $notification_item;\n break;\n }\n }\n if (is_null($channel_selected)) {\n $this->replyWithMessage(\n 'Некорректное название канала рассылки. Выберите из списка ещё раз.',\n '',\n $this->getReplyKeyboardMarkup_Channels()\n );\n $this->getBus()\n ->getHooker()\n ->createHook(\n $this->getUpdate(),\n get_class($this),\n 'handlePushChannel',\n $push_text\n );\n\n return;\n }\n\n $this->replyWithMessage(\n sprintf(\n 'Подтвердите корректность указанной ниже информации.'.PHP_EOL.PHP_EOL.\n '<b>Канал:</b> %s (%s)'.PHP_EOL.'<b>Длина:</b> %d символов'.PHP_EOL.\n '<b>Текст:</b>',\n $channel_name,\n $channel_selected->getName(),\n mb_strlen($push_text)\n ),\n 'HTML'\n );\n $this->replyWithMessage(\n $push_text,\n 'HTML'\n );\n $this->replyWithMessage(\n 'Если всё правильно, напишите мне ЗАГЛАВНЫМИ БУКВАМИ текст «рассылку подтверждаю». Любой другой текст отменяет рассылку.'\n );\n\n $this->getBus()\n ->getHooker()\n ->createHook(\n $this->getUpdate(),\n get_class($this),\n 'handlePushFinalize',\n serialize(\n [\n 'push_text' => $push_text,\n 'notification' => $channel_selected->getName(),\n ]\n )\n );\n }", "protected function send($key, $value) {\n $options = [\n 'form_params' => [\n 'recipient' => [\n 'id' => $this->recipientId,\n ],\n $key => $value,\n ],\n ];\n\n if (!empty($this->tag)) {\n // Adding the tag to the body.\n $options['form_params']['tag'] = $this->tag;\n }\n\n return $this->guzzle()->post('https://graph.facebook.com/v6.0/me/messages?access_token=' . $this->accessToken, $options);\n }", "public function send(mixed $message): void;", "public function create()\n {\n //\n $this->message->sendMessage();\n }", "public function sendMessage(){\n\t\tuser_login_required();\n\n\t\t//First, check a conversation ID was specified\n\t\tif(!isset($_POST[\"conversationID\"]))\n\t\t\tRest_fatal_errror(400, \"Please specify a conversation ID !\");\n\n\t\t//Extract conversation ID\n\t\t$conversationID = toInt($_POST[\"conversationID\"]);\n\n\t\t//Check if the user belongs to the conversation\n\t\tif(!CS::get()->components->conversations->userBelongsTo(userID, $conversationID))\n\t\t\tRest_fatal_error(401, \"Specified user doesn't belongs to the conversation !\");\n\n\t\t//Check if information were specified about the new message or not\n\t\tif(!isset($_POST['message']))\n\t\t\tRest_fatal_error(401, \"New conversation messages must contain a message (can be empty if there is an image) !\");\n\t\t\n\t\t//Else extract informations\n\t\t$content = (string) (isset($_POST['message']) ? $_POST['message'] : \"\");\n\n\t\t//Check for image\n\t\t$image = \"\";\n\t\tif(check_post_file(\"image\")){\n\n\t\t\t//Save image and retrieve its URI\n\t\t\t$image = save_post_image(\"image\", userID, \"conversations\", 1200, 1200);\n\n\t\t}\n\n\t\t//Check message validity\n\t\tif(!check_string_before_insert($content) && $image == \"\")\n\t\t\tRest_fatal_error(401, \"Invalid message creation request !\");\n\n\t\t//Insert the new message\n\t\t$newMessage = new NewConversationMessage();\n\t\t$newMessage->set_userID(userID);\n\t\t$newMessage->set_conversationID($conversationID);\n\t\t$newMessage->set_message($content);\n\t\t$newMessage->set_image_path($image);\n\t\tif(!CS::get()->components->conversations->sendMessage($newMessage))\n\t\t\tRest_fatal_error(500, \"Couldn't send the message !\");\n\t\t\n\t\t//Success\n\t\treturn array(\"success\" => \"Conversation message with successfully added !\");\n\t}", "public function message($type, $message) {}", "public function handle(PostChat $command)\n {\n // check if the user can upload images, otherwise return\n $this->assertCan(\n $command->actor,\n 'pushedx.chat.post'\n );\n\n $msg = [\n 'actorId' => $command->actor->id,\n 'message' => $command->msg\n ];\n\n $id = FetchChatController::UpdateMessages($msg);\n $msg['id'] = $id;\n\n $pusher = $this->getPusher();\n $pusher->trigger('public', 'newChat', $msg);\n\n return $command->msg;\n }", "function SendTextMessage($answer, $sender, $accessToken, $input){\n\t$response = [\n\t 'recipient' => [ 'id' => $sender ],\n\t 'message' => [ 'text' => $answer ]\n\t];\n\n\t$ch = curl_init('https://graph.facebook.com/v3.3/me/messages?access_token='.$accessToken);\n\tcurl_setopt($ch, CURLOPT_POST, true);\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($response));\n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n\n\tif(!empty($input)){\n\t$result = curl_exec($ch);\n\t}\n\tcurl_close($ch);\n\t\n}", "public function createMessage($message, $channelId, $messageEmbed = \"\")\n {\n $json = new \\stdClass();\n\n $json->content = $message;\n $json->embed = $messageEmbed;\n\n return $this->curlRequest(\"{$this->discordURI}/channels/{$channelId}/messages\", \"POST\", json_encode($json), true);\n }", "public function sendMessage(){\n\n\n }", "function post_new_reply() {\n\tglobal $core, $document, $user, $boards, $threads, $posts, $db;\n\n\tif (!isset($_POST['thread_id']) || !isset($_POST['board_id']) || !isset($_POST['post_name']) || !isset($_POST['post_message'])) {\n\t\tfatal_error(\"Some or all of the information needed to post a new message are missing. Please try again\");\n\t}\n\n\t//Make fields safe\n\t$boardid = make_safe(\"int\",$_POST['board_id']);\n\t$threadid = make_safe(\"int\",$_POST['thread_id']);\n\t$postname = make_safe(\"text\",$_POST['post_name']);\n\t$postmessage = make_safe(\"text\",$_POST['post_message']);\n\n\t//Sanity check fields\n\tif (strlen($postname) < 2 || strlen($postmessage) < 10) { \n\t\tfatal_error(\"Your message title or message text is too short. Please try again\");\n\t}\n\tif (!$boards->get_board($boardid)) {\n\t\tfatal_error(\"Invalid board specified. Please try again\");\n\t} \n\tif (!$threads->get_thread($threadid)) {\n\t\tfatal_error(\"Invalid thread specified. Please try again\");\n\t}\n\n\t//Now post the message\n\t$posts->new_post($user->get(\"user_id\"),$boardid,$threadid,$postname,$postmessage);\n\n\t//Now go back to the forum\n\t$core->do_redirect(\"forumdisplay.php?f=$boardid\");\t\t\n}", "function addreaction($timestamp, $channel, $reaction) {\n\n\n // let's add a reaction to the message.\n $method = \"reactions.add\";\n $payload = array(\n 'timestamp' => $timestamp,\n 'channel' => $channel,\n 'name' => $reaction,\n );\n\n\n\n $this->apicall($method, $payload);\n\n\n\n }", "public function test($message, $channel, $prefix = 'Testing: ')\n {\n $payload = new ChatPostMessagePayload();\n $payload->setText(sprintf('%s %s', $prefix, $message));\n $payload->setChannel($channel);\n $payload->setIconEmoji(':grey_question:');\n\n return $payload;\n }", "public function message($message);", "public function publish($message, AbstractQueue $queue) \n {\n $queue->addMessage($message);\n }", "public function addMessage($message);", "public function create_post() {\n\t\t$data['uid'] = $this->input->get('uid');\n\t\t$data['to'] = $this->input->get('to');\n\t\t$data['text'] = $this->input->get('text');\n\t\t$data['ts'] = now();\n\n\t\t$this->Messages_model->create($data);\n\t}" ]
[ "0.72506166", "0.6929759", "0.67685205", "0.67106724", "0.6568419", "0.6501193", "0.6263474", "0.6206428", "0.6159041", "0.6158004", "0.6158004", "0.6158004", "0.6158004", "0.61542904", "0.6151222", "0.6078997", "0.6069342", "0.6042062", "0.6039", "0.6012285", "0.59338844", "0.59229535", "0.58947396", "0.5886175", "0.5866327", "0.5858797", "0.58090824", "0.5796092", "0.5769912", "0.5759675", "0.5752887", "0.57429874", "0.5728173", "0.572768", "0.57182276", "0.5693127", "0.567328", "0.5668593", "0.5644899", "0.56174016", "0.5613104", "0.5598403", "0.55970114", "0.5593455", "0.55671924", "0.5564771", "0.5552376", "0.554591", "0.5539499", "0.5524655", "0.55199647", "0.5509789", "0.5508829", "0.5508436", "0.5504605", "0.54984057", "0.5486747", "0.5478409", "0.5475509", "0.54739296", "0.54727626", "0.54721934", "0.5465437", "0.54554677", "0.5454954", "0.54544806", "0.5453079", "0.5430534", "0.5423104", "0.5422139", "0.542186", "0.5421063", "0.54123163", "0.5411115", "0.5410652", "0.54023945", "0.53977436", "0.5395182", "0.5390097", "0.5388087", "0.5382689", "0.538132", "0.5374853", "0.5370806", "0.536983", "0.5368304", "0.53667337", "0.53627306", "0.53613275", "0.534353", "0.5340215", "0.53324664", "0.53286064", "0.5316644", "0.5305542", "0.53005034", "0.52941746", "0.5292693", "0.52831066", "0.5277538" ]
0.76314
0
Stop listening for messages posted to channels matching the given patterns
public function punsubscribe($pattern=null);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function StopMonitor($channel);", "protected function _unsubscribeFromEngineEvents()\n {\n $events = array(\n Streamwide_Engine_Events_Event::SDP,\n Streamwide_Engine_Events_Event::CHILD,\n Streamwide_Engine_Events_Event::OKMOVED,\n Streamwide_Engine_Events_Event::MOVED,\n Streamwide_Engine_Events_Event::FAILMOVED\n );\n \n $controller = $this->getController();\n foreach ( $events as $event ) {\n $controller->removeEventListener( $event, array( 'callback' => array( $this, 'onSignalReceived' ) ) );\n }\n }", "function typingStop(TextChannelInterface $channel, User $user);", "public function unsubscribe($channel=null);", "public function stopListeningForEvents()\n\t\t{\n\n\t\t\t// Initialize the crontab manager if this has not been done before\n\t\t\tif(is_null($this->CronManager)) $this->CronManager = new ssh2_crontab_manager();\n\n\t\t\t// Stop cronjob to call $this-->captureSongHistory()\n\t\t\t$this->CronManager->remove_cronjob(\"checkTimeEventExecutionNeeds\");\n\n\t\t\t// Write status to the config\n\t\t\t$this->data['config']['mod_time__checkTimeEventExecutionNeedsCron'] = \"disabled\";\n\t\t\t$this->writeConfFile($this->data['config'], true);\n\n\t\t}", "protected function _stop_listening(){\r\n\t\t\trestore_error_handler();\r\n\t\t\trestore_exception_handler();\r\n\t\t\terror_reporting();\r\n\t\t\tini_set('display_errors', true);\r\n\t\t}", "public function testQuestionSharev1questionstopChannels()\n {\n\n }", "public function stopAllCoroutineConsumer(): void\n {\n if (! empty($this->startedTopicIdArr)) {\n foreach ($this->startedTopicIdArr as $consumerId) {\n $this->stopConsumer($consumerId, 1);\n }\n }\n }", "public function __destruct() {\n\t\tif($this->_listeningenabled)\n\t\t\t$this->unlisten();\n\t}", "public function testChannelsLeave()\n {\n }", "public function stop() {}", "function ts3client_requestChannelUnsubscribeAll($serverConnectionHandlerID) {}", "abstract public function stop();", "public function unsubscribeThreads($userid, $threads = false);", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop() {\n\t\tforeach ( $this->connections as $id => $conn ) {\n\t\t\tif ($this->connections [$id]->isAlive ())\n\t\t\t\t$this->connections [$id]->stop ();\n\t\t}\n\t\t$this->active = null;\n\t}", "private function serveStop()\n {\n foreach ($this->pid as $pid) {\n $command = \"kill -9 {$pid} > /dev/null 2> /dev/null &\";\n @exec($command, $output);\n }\n }", "abstract public function stopInstances(IdFilter $instances);", "public function onStop();", "function stopCatchingMessages($message_type, $unique_ids)\n {\n if (!is_int($message_type) && !is_string($message_type)) {\n return PEAR_ErrorStack::staticPush(\n 'PHP_Parser_MsgServer',\n PHP_PARSER_MSGSERVER_ERR_INVALID_INPUT,\n 'exception',\n array(\n 'param' => '$message_type',\n 'type1' => 'string|integer',\n 'type2' => gettype($message_type)));\n }\n if (!isset($this->_reg_store[$message_type])) {\n PEAR_ErrorStack::staticPush(\n 'PHP_Parser_MsgServer',\n PHP_PARSER_MSGSERVER_ERR_NO_LISTENERS,\n 'notice',\n array('type' => $message_type));\n return true;\n }\n if (!is_array($unique_ids)) {\n return PEAR_ErrorStack::staticPush(\n 'PHP_Parser_MsgServer',\n PHP_PARSER_MSGSERVER_ERR_INVALID_INPUT,\n 'exception',\n array(\n 'param' => '$unique_ids',\n 'type1' => 'array',\n 'type2' => gettype($unique_ids)));\n }\n foreach($unique_ids as $id) {\n if (!is_int($id) && !is_string($id)) {\n return PEAR_ErrorStack::staticPush(\n 'PHP_Parser_MsgServer',\n PHP_PARSER_MSGSERVER_ERR_BAD_UNIQUE_ID,\n 'exception',\n array('type' => gettype($id)));\n }\n if (!isset($this->_reg_store[$message_type][$id])) {\n PEAR_ErrorStack::staticPush(\n 'PHP_Parser_MsgServer',\n PHP_PARSER_MSGSERVER_ERR_NOT_LISTENING,\n 'notice',\n array('listener' => $id, 'message' => $message_type));\n }\n unset($this->_reg_store[$message_type][$id]);\n }\n if (!count($this->_reg_store[$message_type])) {\n unset($this->_reg_store[$message_type]);\n }\n return true;\n }", "public function removeSubscribes();", "public function stop()\n {/*{{{*/\n $this->_loop = false;\n }", "public function stop()\n {\n $this->loop->stop();\n }", "function ts3client_stopConnection($serverConnectionHandlerID, $quitMessage) {}", "public function unsubscribe(): void;", "public function listen()\n {\n $this->openWorker();\n while (!Signal::isExit()) {\n if (($payload = $this->pop(3)) !== null) {\n list($id, $message) = explode(':', $payload, 2);\n $this->handleMessage($message);\n }\n }\n $this->closeWorker();\n }", "public function discard()\n {\n $this->channel->basic_reject(\n $this->tag(),\n false\n );\n }", "public function broadcastOn()\n {\n return new Channel('cancel');\n }", "public function unSubscribe()\n {\n }", "public function stopsConversation(IncomingMessage $message)\n {\n //\n }", "public function reject(array $messages);", "private function stopServer() {\n\t\t$this->socketSend('shutdown');\n\t\tforeach($this->pipes as $pipe) {\n\t\t\tfclose($pipe);\n\t\t}\n\t\tproc_close($this->server);\n\t}", "public function __destruct() {\n foreach ($this->_messages as $key => $message) {\n unset($this->_messages[$key]);\n $message->close();\n }\n\n $this->_stream->stop();\n }", "public function stop(): static\n {\n if ($this->listening) {\n $this->breakLoop = true;\n }\n\n return $this;\n }", "public function stop(): void;", "public function stop(): void;", "public function stop(): void;", "public function stop(): void;", "public function stop(): void;", "protected function stopSignalHandlers(): void\n {\n if (!$this->hasPcntl) {\n return;\n }\n\n foreach (array_keys($this->signalMap ?? []) as $number) {\n pcntl_signal((int)$number, \\SIG_IGN);\n }\n }", "public function stop(): bool {}", "function stopCatchingMessage($message_type)\n {\n if (!is_int($message_type) && !is_string($message_type)) {\n return PEAR_ErrorStack::staticPush(\n 'PHP_Parser_MsgServer',\n PHP_PARSER_MSGSERVER_ERR_INVALID_INPUT,\n 'exception',\n array(\n 'param' => '$messagetype',\n 'type1' => 'string|integer',\n 'type2' => gettype($message_type)));\n }\n if (!isset($this->_reg_store[$message_type])) {\n PEAR_ErrorStack::staticPush(\n 'PHP_Parser_MsgServer',\n PHP_PARSER_MSGSERVER_ERR_NO_LISTENERS,\n 'notice',\n array('type' => $message_type));\n }\n unset($this->_reg_store[$message_type]);\n return true;\n }", "public function psubscribe($patterns);", "public function onMessages($pattern, $callback)\n {\n $handler = new EventListener($pattern, $callback);\n $this->dispatcher->addListener('message.channel', array($handler, 'testAndExecute'));\n $this->dispatcher->addListener('message.private', array($handler, 'testAndExecute'));\n }", "private function unsubscribe()\n {\n $this->botman->hears('unsubscribe', function(BotMan $bot) {\n $userId = $bot->getUser()->getId();\n Subscriber::where('telegram_user_id', $userId)->delete();\n $bot->reply('You have just unsubscribed from our updates!');\n });\n }", "public function reject()\n {\n $this->channel->basic_reject(\n $this->tag(),\n true\n );\n }", "public function dispatchLoopShutdown()\n {\n //...\n }", "public function stop() {\n\t\t$this->invoke(\"stop\");\n\t}", "public function unregister() {\n // Normally, there are definitely wrappers set for the ALL filter. However,\n // in some cases involving many container rebuilds (e.g. BrowserTestBase),\n // $this->wrappers may be empty although wrappers are still registered\n // globally. Thus an isset() check is needed before iterating.\n if (isset($this->wrappers[StreamWrapperInterface::ALL])) {\n foreach (array_keys($this->wrappers[StreamWrapperInterface::ALL]) as $scheme) {\n stream_wrapper_unregister($scheme);\n }\n }\n }", "public function stop($id);", "public static function clearQueue($type = null) {\n $types = func_get_args();\n if($types) {\n $msgs = PitSession::get('PitFlash', 'messages', array());\n foreach($msgs as $key => $msg) {\n if(in_array($msg->type, $types)) {\n unset($msgs[$key]);\n }\n }\n PitSession::set('PitFlash', 'messages', $msgs);\n } else {\n PitSession::set('PitFlash', 'messages', array());\n }\n }", "public function dispatchLoopShutdown()\n {\n\n }", "function unregister_block_pattern($pattern_name)\n {\n }", "function stop();", "function stop() {\n return getReactor()->stop();\n}", "public static function offAll()\n {\n self::$_events = [];\n self::$_eventWildcards = [];\n }", "public function remove_frameless_preview_messenger_channel()\n {\n }", "public static function stopAll () {\n\t\tforeach (self::$timeArray as $label => $value)\n\t\t\tself::stop ($label);\n\t}", "public function stop(): EventInterface;", "public function stopRinging() {\n\t\treturn $this->getRinger()->stop();\n\t}", "public function stop()\n {\n }", "public function stop()\n {\n $this->defaultMode === self::MODE_REPLACE ? $this->replace() : $this->append();\n }", "protected function _unsubscribeFromEngineEvents()\n {\n $controller = $this->getController();\n $controller->removeEventListener(\n Streamwide_Engine_Events_Event::ENDOFFAX,\n array( 'callback' => array( $this, 'onEndOfFax' ) )\n );\n $controller->removeEventListener(\n Streamwide_Engine_Events_Event::FAXPAGE,\n array( 'callback' => array( $this, 'onFaxPage' ) )\n );\n }", "public function stopSpeaking()\n {\n return $this->proxyToInterface()->stopSpeaking(\n $this->id);\n }", "public function onClose(ConnectionInterface $conn) {\n foreach ($this->subscribedTopics as $topic) {\n if (preg_match('/user_(\\d+)_watch_wait/', $topic->getId(), $matches)) {\n if (($userId = $matches[1])) {\n // Add active agents to the wait stack\n $connectionId = $conn->WAMP->sessionId;\n $memcache = new \\Memcache();\n $memcache->connect('localhost', 11211) or die(\"Could not connect\");\n $activeUserArr = $memcache->get(self::MEMCACHE_WATCH_WAIT_LIST);\n $activeUserArr = $this->checkSessions($activeUserArr); // Check sessions statuses\n if (!isset($activeUserArr) || !is_array($activeUserArr))\n $activeUserArr = [];\n if (isset($activeUserArr[$userId]) && is_array($activeUserArr[$userId]) && ($connectionKey = array_search($connectionId, $activeUserArr[$userId])) !== false) {\n if (isset($activeUserArr[$userId][$connectionKey]))\n unset($activeUserArr[$userId][$connectionKey]);\n if (count($activeUserArr[$userId]) === 0)\n unset($activeUserArr[$userId]);\n }\n $memcache->set(self::MEMCACHE_WATCH_WAIT_LIST, $activeUserArr);\n return;\n }\n }\n }\n // Remove from connections list \n unset($this->connections[$conn->WAMP->sessionId]);\n }", "public function stop( $args, $assoc_args ) {\n\t\t$this->site_docker_compose_execute( $args[0], 'stop', $args, $assoc_args);\n\t}", "public function stop()\n {\n }", "static function shutdown()\n\t{\n\t\tif (!empty(self::$channel))\n\t\t{\n\t\t\tself::$channel->close();\n\t\t\tself::$channel = null;\n\t\t}\n\n\t\tif (!empty(self::$connection))\n\t\t{\n\t\t\tself::$connection->close();\n\t\t\tself::$connection = null;\n\t\t}\n\t}", "public function onChannels(): ?array\n {\n return null;\n }", "public static function stop()\n {\n }", "public static function cancellingCallback($params) {\n\t\t$params[Filesystem::signal_param_run] = false;\n\t}", "public function stop()\n {\n // nop\n }", "public function stopCycle(int $code = 0, string $reason = \"\");", "private function handleStop(): void\n {\n for ($i = 0; $i < count($this->drivers); $i++) {\n for ($j = $i + 1; $j < count($this->drivers); $j++) {\n if ($this->drivers[$i]->getCurrentStop() === $this->drivers[$j]->getCurrentStop()) {\n $this->exchangeGossips($this->drivers[$i], $this->drivers[$j]);\n }\n }\n }\n }", "public function stop()\r\n {\r\n\r\n }", "public function stopping($callback)\n {\n $this->app['events']->listen('custom.queue.stopping', $callback);\n }", "public function stopEngine(int $code = 0, string $reason = \"\");", "private static function onStopautodjCommand(Bot $bot, $channel, $parameters, $userLevel) {\r\n if (RadioTracker::getAutoDJState() == false)\r\n return CommandHelper::infoMessage($bot, $channel, 'The autoDJ is not streaming. Ask the current DJ to stop streaming.');\r\n\r\n $bot->send('PRIVMSG LVP_Radio :!autodj-force');\r\n\r\n return true;\r\n }", "public function off($name)\n {\n foreach ($this->events as $key => $events) {\n if (preg_match(\"/^$name$|$name\\.)/\", $key)) {\n unset($this->events[$key]);\n }\n }\n }", "public function stop()\n {\n\n }", "public function unregister($pattern_name)\n {\n }", "public function testRejectDropStopWithError() {\n $count = 5;\n $this->produceMessages($count, \"test.ten\", \"Message is here!\");\n $output = $this->consumeMessages(\"test_ten\", $count);\n $this->assertTrue($this->has($output, \"Message is here!\"), $this->debug($output));\n\n $output = $this->consumeMessages(\"test_dlx\", $count);\n $this->assertNotFalse(strpos($output, \"Somethings wrong! Consuming has stopped! Here is why!?\"));\n $this->assertEquals(1, substr_count($output, \"Somethings wrong! Consuming has stopped! Here is why!?\"));\n }", "public function handle()\n {\n \n while (true) {\n \n $loop = ReactEventLoopFactory::create();\n\n $client = new SlackRealTimeClient($loop);\n $client->setToken(config('services.slack.token'));\n\n // disconnect after first message\n $client->on('message', function ($data) use ($client) {\n //echo \"Someone typed a message: \".$data['text'].\"\\n\";\n //print_r($data);\n //$client->disconnect();\n \n if($data['type'] == 'message'){\n \n if(!isset($data['text'])) return;\n if(isset($data['username']) && $data['username'] == 'bot') return;\n\n print_r($data);\n\n if(substr($data['channel'], 0, 1) == 'D'){\n //If it's a DM, treat it as a search query\n echo \"Direct Message: \";\n print_r($data);\n }elseif(!isset($data['user'])){\n $this->error('No valid user. Previous event not saved');\n Log::debug('No valid user. Previous event not saved');\n }else{\n //Insert new message to DB\n $message = new Messages;\n $message->message = $data['text'];\n $message->user = $data['user'];\n $message->channel = $data['channel'];\n $message->ts = convert_timestamp($data['ts']);\n $message->save();\n\n $message->addToIndex(); //add to ES Index\n }\n\n\n }//END IF DATA TYPE CHECK\n $client->disconnect();\n\n });\n\n $client->connect()->then(function () {\n echo \"Connected!\\n\";\n });\n\n $loop->run();\n\n }//END WHILE INF\n }", "public function stop()\n {\n // TODO: Implement stop() method.\n }", "protected function broadcastWithoutChannel(string $data, ?array $listeners = null): void\n {\n foreach ($this->server->connections as $fd) {\n $isOnlyListeningOtherActions = null === $listeners\n && $this->isListeningAnyAction($fd);\n $isNotListeningThisAction = null !== $listeners\n && !in_array($fd, $listeners);\n $isConnectedToAnyChannel = $this->isConnectedToAnyChannel($fd);\n\n if (\n !$this->server->isEstablished($fd)\n || $fd === $this->getFd()\n || $isConnectedToAnyChannel\n || (\n // if listening any action, let's analyze\n $this->isListeningAnyAction($fd)\n && ($isNotListeningThisAction\n || $isOnlyListeningOtherActions)\n )\n ) {\n continue;\n }\n\n $this->push($fd, $data);\n }\n }", "public static function stopMinkSessions() {\n self::$mink->stopSessions();\n self::$mink = null;\n }", "public static function stopMinkSessions() {\n self::$mink->stopSessions();\n self::$mink = null;\n }", "public function stopEngine()\n {\n }", "public function destroy()\n {\n $this->stop();\n $this->setupListeners();\n }", "public function stop()\n {\n // Put your code here;\n }", "private function ProcessPendingMessages() {\n\t\twhile($message = $this->GetRedisConn()->rPop($this->GetChannel())) {\n\t\t\t$this->ProcessMessage($message);\n\t\t}\n\t}", "protected function stopped()\n {\n $this->redis->zrem(Queue::redisKey($this->queue, 'running'), $this->payload);\n\n Stats::decr('running', 1);\n Stats::decr('running', 1, Queue::redisKey($this->queue, 'stats'));\n }", "public function isStopped();" ]
[ "0.5591928", "0.5558591", "0.55549693", "0.5441828", "0.53534156", "0.52919394", "0.5205901", "0.51930517", "0.5192115", "0.5141517", "0.5098255", "0.509097", "0.5070279", "0.50608474", "0.5051522", "0.5051522", "0.5051522", "0.5051522", "0.5051522", "0.5051522", "0.5051522", "0.5051522", "0.50270903", "0.50212777", "0.50152946", "0.493112", "0.49296737", "0.490108", "0.4887961", "0.48841494", "0.48763418", "0.48695886", "0.48631963", "0.48489186", "0.4839516", "0.48342127", "0.4821043", "0.47629458", "0.47613811", "0.47478682", "0.47373414", "0.47369868", "0.47369868", "0.47369868", "0.47369868", "0.47369868", "0.47353756", "0.46986118", "0.4691336", "0.46770918", "0.46661124", "0.46615326", "0.46220988", "0.4607355", "0.46067613", "0.45920408", "0.4588152", "0.4573809", "0.4561297", "0.45513356", "0.45474473", "0.45384467", "0.45267597", "0.4522505", "0.45100674", "0.45091894", "0.4508024", "0.450767", "0.4504955", "0.45010504", "0.4493835", "0.44844767", "0.44824743", "0.44808504", "0.44785511", "0.447641", "0.44759807", "0.44725913", "0.4470975", "0.44638154", "0.44620523", "0.44500175", "0.44498128", "0.44410044", "0.44407344", "0.4440505", "0.44356436", "0.44265994", "0.44210166", "0.4413752", "0.4411358", "0.43989444", "0.43859544", "0.43859544", "0.43819317", "0.43791652", "0.43749568", "0.43643045", "0.43506026", "0.43402046" ]
0.60854775
0
Listen for messages published to the given channels
public function subscribe($channels);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function onChannel($channel);", "public function channels()\n {\n $this->send(['command' => 'channels', 'seq'=>$this->getSequence()]);\n }", "private function registerChannels(): void\n {\n if (config('messenger.routing.channels.enabled')) {\n $this->app->make(BroadcastManager::class)->routes($this->channelRouteConfiguration());\n\n $broadcaster = $this->app->make(Broadcaster::class);\n\n $broadcaster->channel('messenger.thread.{thread}', ThreadChannel::class);\n $broadcaster->channel('messenger.call.{call}.thread.{thread}', CallChannel::class);\n $broadcaster->channel('messenger.{alias}.{id}', ProviderChannel::class);\n }\n }", "public function subscribe($channels, Closure $callback)\n {\n $this->client->subscribe((array) $channels, function ($redis, $channel, $message) use ($callback) {\n $callback($message, $channel);\n });\n }", "public static function listen() {\n $projectId = \"sunday-1601040613995\";\n\n # Instantiates a client\n $pubsub = new PubSubClient([\n 'projectId' => $projectId\n ]);\n\n # The name for the new topic\n $topicName = 'gmail';\n\n # Creates the new topic\n $topic = $pubsub->createTopic($topicName);\n\n echo 'Topic ' . $topic->name() . ' created.';\n }", "public function psubscribe($channels, Closure $callback)\n {\n $this->client->psubscribe((array) $channels, function ($redis, $pattern, $channel, $message) use ($callback) {\n $callback($message, $channel);\n });\n }", "public function channels(): ChannelsService;", "public function listen()\n {\n $this->open();\n $callback = function(AMQPMessage $message) {\n $job = $this->unserialize($message->body);\n if ($this->getQueue()->run($job)) {\n $message->delivery_info['channel']->basic_ack($message->delivery_info['delivery_tag']);\n }\n };\n $this->_channel->basic_qos(null, 1, null);\n $this->_channel->basic_consume($this->queueName, '', false, false, false, false, $callback);\n while(count($this->_channel->callbacks)) {\n $this->_channel->wait();\n }\n }", "public function getChannels();", "public function listen()\n {\n $this->openWorker();\n while (!Signal::isExit()) {\n if (($payload = $this->pop(3)) !== null) {\n list($id, $message) = explode(':', $payload, 2);\n $this->handleMessage($message);\n }\n }\n $this->closeWorker();\n }", "protected function listen()\n {\n do {\n $data = fgets($this->socket, 512);\n if (!empty($data)) {\n $request = $this->receive($data);\n $cmd = strtolower($request->getCommand());\n\n if ($cmd === 'privmsg') {\n $event_name = 'message.' . ($request->isPrivateMessage() ? 'private' : 'channel');\n } else {\n $event_name = 'server.' . $cmd;\n }\n\n // Skip processing if the incoming message is from the bot\n if ($request->getSendingUser() === $this->config['nick']) {\n continue;\n }\n\n $event = new Event($request);\n $this->dispatcher->dispatch($event_name, $event);\n $responses = $event->getResponses();\n\n if (!empty($responses)) {\n $this->send($responses);\n }\n }\n } while (!feof($this->socket));\n }", "public function listen(): void\n {\n $receive = function () {\n each($this->receiveMessages(), $this->parseAndConsumeMessage());\n };\n\n $this->settings->beforeReceive($receive);\n }", "public function publish($channel, $message);", "public function handle()\n {\n \n while (true) {\n \n $loop = ReactEventLoopFactory::create();\n\n $client = new SlackRealTimeClient($loop);\n $client->setToken(config('services.slack.token'));\n\n // disconnect after first message\n $client->on('message', function ($data) use ($client) {\n //echo \"Someone typed a message: \".$data['text'].\"\\n\";\n //print_r($data);\n //$client->disconnect();\n \n if($data['type'] == 'message'){\n \n if(!isset($data['text'])) return;\n if(isset($data['username']) && $data['username'] == 'bot') return;\n\n print_r($data);\n\n if(substr($data['channel'], 0, 1) == 'D'){\n //If it's a DM, treat it as a search query\n echo \"Direct Message: \";\n print_r($data);\n }elseif(!isset($data['user'])){\n $this->error('No valid user. Previous event not saved');\n Log::debug('No valid user. Previous event not saved');\n }else{\n //Insert new message to DB\n $message = new Messages;\n $message->message = $data['text'];\n $message->user = $data['user'];\n $message->channel = $data['channel'];\n $message->ts = convert_timestamp($data['ts']);\n $message->save();\n\n $message->addToIndex(); //add to ES Index\n }\n\n\n }//END IF DATA TYPE CHECK\n $client->disconnect();\n\n });\n\n $client->connect()->then(function () {\n echo \"Connected!\\n\";\n });\n\n $loop->run();\n\n }//END WHILE INF\n }", "public function broadcastOn()\n {\n return ['my-channel'];\n }", "public function listen(Event\\Trigger $channel)\n {\n // get listening methods\n $events = (array)$this->register();\n\n // bind to subject\n foreach($events as $event => $method) {\n $channel->on($event, [$this, $method]);\n }\n }", "public function listen()\n {\n $this->log->addInfo('Begin listen routine');\n \n $connection = new AMQPConnection('localhost', 5672, 'guest', 'guest');\n $channel = $connection->channel();\n \n $channel->queue_declare(\n 'invoice_queue', #queue\n false, #passive\n true, #durable, make sure that RabbitMQ will never lose our queue if a crash occurs\n false, #exclusive - queues may only be accessed by the current connection\n false #auto delete - the queue is deleted when all consumers have finished using it\n );\n \n /**\n * don't dispatch a new message to a worker until it has processed and \n * acknowledged the previous one. Instead, it will dispatch it to the \n * next worker that is not still busy.\n */\n $channel->basic_qos(\n null, #prefetch size - prefetch window size in octets, null meaning \"no specific limit\"\n 1, #prefetch count - prefetch window in terms of whole messages\n null #global - global=null to mean that the QoS settings should apply per-consumer, global=true to mean that the QoS settings should apply per-channel\n );\n \n /**\n * indicate interest in consuming messages from a particular queue. When they do \n * so, we say that they register a consumer or, simply put, subscribe to a queue.\n * Each consumer (subscription) has an identifier called a consumer tag\n */ \n $channel->basic_consume(\n 'invoice_queue', #queue\n '', #consumer tag - Identifier for the consumer, valid within the current channel. just string\n false, #no local - TRUE: the server will not send messages to the connection that published them\n false, #no ack, false - acks turned on, true - off. send a proper acknowledgment from the worker, once we're done with a task\n false, #exclusive - queues may only be accessed by the current connection\n false, #no wait - TRUE: the server will not respond to the method. The client should not wait for a reply method\n array($this, 'process') #callback\n );\n \n $this->log->addInfo('Consuming from queue');\n \n while(count($channel->callbacks)) {\n $this->log->addInfo('Waiting for incoming messages');\n $channel->wait();\n }\n \n $channel->close();\n $connection->close();\n }", "public function subscribe($events)\n {\n foreach ($this->events as $event => $action) {\n $events->listen($event, BadgeSubscriber::class . '@' . $action);\n }\n }", "public function broadcast(array $channels, $event, array $payload = [])\n {\n if (empty($channels)) {\n return;\n }\n\n $model = config('bref_laravel_broadcast.model');\n $clientCache = [];\n\n $model::query()\n ->whereIn('channel', $this->formatChannels($channels))\n ->get()\n ->each(\n static function ($listener) use (&$event, &$payload, &$clientCache) {\n $cacheKey = $listener->api_id . $listener->stage . $listener->region;\n\n $client = $clientCache[$cacheKey] = $clientCache[$cacheKey] ?? SimpleWebsocketClient::create(\n $listener->api_id,\n $listener->region,\n $listener->stage\n );\n\n $client->message(\n $listener->connection_id,\n json_encode(\n [\n 'channel' => $listener->channel,\n 'event' => $event,\n 'data' => $payload,\n ],\n JSON_THROW_ON_ERROR\n )\n );\n }\n );\n }", "public function listen();", "public function broadcast(array $channels, $event, array $payload = [])\n {\n\t\tarray_map(function($channel) use (&$event, &$payload){\n\t\t\t$this->larasopp->trigger($channel, $event, $payload);\n\t\t},$channels);\n }", "public function channels()\n {\n return $this->send('channels');\n }", "public function broadcastOn()\n {\n // return new PrivateChannel('channel-name');\n return new Channel('messages');\n }", "public function channel($channel);", "public function doList($channels = null)\n {\n $this->send('LIST', $channels);\n }", "public function subscribes();", "public function Subscribe() {\n\t\t// Process pending messages if any\n\t\t$this->ProcessPendingMessages();\n\t\t// Subscribe\n\t\t$this->GetSubsConn()->subscribe(\n\t\t\t[$this->GetChannel()],\n\t\t\t[$this, 'SubscribeCallback']\n\t\t);\n\t}", "public function index(Channel $channel)\n {\n return $this->getMessages($channel);\n }", "public function onMessages($pattern, $callback)\n {\n $handler = new EventListener($pattern, $callback);\n $this->dispatcher->addListener('message.channel', array($handler, 'testAndExecute'));\n $this->dispatcher->addListener('message.private', array($handler, 'testAndExecute'));\n }", "public function subscribe($events)\n {\n $events->listen(\n 'Coyote\\Events\\TopicSaved',\n 'Coyote\\Listeners\\TopicListener@onTopicSave'\n );\n\n $events->listen(\n 'Coyote\\Events\\TopicMoved',\n 'Coyote\\Listeners\\TopicListener@onTopicMove'\n );\n\n $events->listen(\n 'Coyote\\Events\\TopicDeleted',\n 'Coyote\\Listeners\\TopicListener@onTopicDelete'\n );\n }", "public function subscribe($events)\n {\n $events->listen('Illuminate\\Mail\\Events\\MessageSending', self::class.'@onSending');\n }", "public function onChannel($pattern, $callback)\n {\n $handler = new EventListener($pattern, $callback);\n $this->dispatcher->addListener('message.channel', array($handler, 'testAndExecute'));\n }", "private function dispatchNotifications() {\n $this->channels->each(function($channel) {\n $notifiable = new AnonymousNotifiable();\n $notifiable->route($channel->type, $channel->endpoint);\n DispatchNotification::dispatch($notifiable, $this->notification);\n });\n }", "public function getChannelStreams($channel) { \r\n return $this->makeRequest('get', \"/streams/{$channel}/\");\r\n }", "public function subscribe($channel, callable $handler)\n {\n $loop = $this->client->pubSubLoop();\n\n $loop->subscribe($channel);\n\n foreach ($loop as $message) {\n /** @var \\stdClass $message */\n if ($message->kind === 'message') {\n call_user_func($handler, Serialization::unserializeMessagePayload($message->payload));\n }\n }\n\n unset($loop);\n }", "public function subscribe($events)\n {\n $events->listen(\n 'App\\Events\\Poll\\Created',\n 'App\\Listeners\\PollEventSubscriber@onCreated'\n );\n $events->listen(\n 'App\\Events\\Poll\\Deleted',\n 'App\\Listeners\\PollEventSubscriber@onDeleted'\n );\n $events->listen(\n 'App\\Events\\Poll\\Results',\n 'App\\Listeners\\PollEventSubscriber@onResults'\n );\n }", "public function subscribe($events)\n {\n $events->listen(\n 'App\\Events\\ProtobufTCPEvent',\n 'App\\Listeners\\ProtobufTCPSubscribe@onMessage'\n );\n }", "public function psubscribe($patterns);", "function ts3client_requestChannelSubscribeAll($serverConnectionHandlerID) {}", "public function broadcastOn()\n {\n// return new PrivateChannel('news-action');\n// return ['news-action'];\n return new Channel('news-action.');\n }", "public function onChannels(): ?array\n {\n return null;\n }", "private function validate_channels($channels)\n {\n if (count($channels) > 100) {\n throw new SocketIoException('An event can be triggered on a maximum of 100 channels in a single call.');\n }\n\n foreach ($channels as $channel) {\n $this->validate_channel($channel);\n }\n }", "public function doNames($channels)\n {\n $this->send('NAMES', $channels);\n }", "public function subscribe($events)\n {\n $events->listen(\n MicroblogSaved::class,\n 'Coyote\\Listeners\\MicroblogListener@onMicroblogSave'\n );\n\n $events->listen(\n MicroblogDeleted::class,\n 'Coyote\\Listeners\\MicroblogListener@onMicroblogDelete'\n );\n }", "public function testChannelsReplies()\n {\n }", "public function listen(): void\n {\n $this->logger->debug('Start listening to the queue.');\n $handler = function (MessageInterface $message) {\n $this->worker->process($message, $this);\n };\n\n $this->driver->subscribe($handler);\n $this->logger->debug('Finish listening to the queue.');\n }", "public function subscribe($events)\n\t{\n\t\t\n\t\t$events->listen(\n\t\t\t\t\\App\\Events\\Backend\\Plugins\\PluginCreated::class,\n\t\t\t\t'App\\Listeners\\Backend\\Plugins\\PluginEventListener@onCreated'\n\t\t\t\t);\n\t\t\n\t\t$events->listen(\n\t\t\t\t\\App\\Events\\Backend\\Plugins\\PluginUpdated::class,\n\t\t\t\t'App\\Listeners\\Backend\\Plugins\\PluginEventListener@onUpdated'\n\t\t\t\t);\n\t\t\n\t\t$events->listen(\n\t\t\t\t\\App\\Events\\Backend\\Plugins\\PluginDeleted::class,\n\t\t\t\t'App\\Listeners\\Backend\\Plugins\\PluginEventListener@onDeleted'\n\t\t\t\t);\n\t\t\n\t\t$events->listen(\n\t\t\t\t\\App\\Events\\Backend\\Plugins\\PluginRestored::class,\n\t\t\t\t'App\\Listeners\\Backend\\Plugins\\PluginEventListener@onRestored'\n\t\t\t\t);\n\t\t\n\t\t$events->listen(\n\t\t\t\t\\App\\Events\\Backend\\Plugins\\PluginPermanentlyDeleted::class,\n\t\t\t\t'App\\Listeners\\Backend\\Plugins\\PluginEventListener@onPermanentlyDeleted'\n\t\t\t\t);\n\t\n\t\t$events->listen(\n\t\t\t\t\\App\\Events\\Backend\\Plugins\\PluginDeactivated::class,\n\t\t\t\t'App\\Listeners\\Backend\\Plugins\\PluginEventListener@onDeactivated'\n\t\t\t\t);\n\t\t\n\t\t$events->listen(\n\t\t\t\t\\App\\Events\\Backend\\Plugins\\PluginReactivated::class,\n\t\t\t\t'App\\Listeners\\Backend\\Plugins\\PluginEventListener@onReactivated'\n\t\t\t\t);\n\t}", "public function subscribe();", "public function get_channels()\n {\n }", "public function broadcastOn()\n {\n return new Channel('notifications');\n }", "public function subscribe($events)\n {\n $events->listen(\n MarkAsRead::class,\n 'App\\Listeners\\Frontend\\NotificationEventListener@markAsRead'\n );\n }", "public function broadcastOn()\n {\n return [\n $this->channel\n ];\n }", "public function broadcastOn()\n {\n return [\n $this->channel\n ];\n }", "public function setChannels($channels)\n {\n if (is_array($channels)) {\n $this->_currentChannels += $channels;\n }\n else {\n $this->_currentChannels[] = $channels;\n }\n }", "public function broadcastOn() {\n return [\n new Channel('messages.' . $this->userReceiver->id . '.' . $this->currentUser->email),\n new Channel('messages.' . $this->currentUser->id . '.' . $this->userReceiver->email),\n ];\n }", "public function subscribe($events)\n {\n $events->listen(\n 'Coyote\\Events\\WikiWasSaved',\n 'Coyote\\Listeners\\WikiListener@onWikiSave'\n );\n\n $events->listen(\n 'Coyote\\Events\\WikiWasDeleted',\n 'Coyote\\Listeners\\WikiListener@onWikiDelete'\n );\n }", "public function broadcastOn()\n {\n// return new PrivateChannel('channel-name');\n }", "public function broadcastOn()\n {\n// return new PrivateChannel('channel-name');\n }", "public function subscribe($events)\n {\n $events->listen(\n \\App\\Events\\Backend\\JobCategory\\JobCategoryCreated::class,\n 'App\\Listeners\\Backend\\JobCategory\\JobCategoryEventListener@onCreated'\n );\n\n $events->listen(\n \\App\\Events\\Backend\\JobCategory\\JobCategoryUpdated::class,\n 'App\\Listeners\\Backend\\JobCategory\\JobCategoryEventListener@onUpdated'\n );\n\n $events->listen(\n \\App\\Events\\Backend\\JobCategory\\JobCategoryDeleted::class,\n 'App\\Listeners\\Backend\\JobCategory\\JobCategoryEventListener@onDeleted'\n );\n }", "public function subscribe($events)\n {\n $events->listen(\n 'Coyote\\Events\\PostWasSaved',\n 'Coyote\\Listeners\\PostListener@onPostSave'\n );\n\n $events->listen(\n 'Coyote\\Events\\PostWasDeleted',\n 'Coyote\\Listeners\\PostListener@onPostDelete'\n );\n }", "public function broadcastOn() {\n// return new PrivateChannel('channel-name');\n }", "function getActiveChannels() {\n global $debug, $logdir, $logfile, $app;\n\n $channels = null;\n $model = $app->bootstrap->getModel('channels');\n\n $now = date(\"Y-m-d H:i:s\");\n $query = \"SELECT\"\n .\" ch.id,\"\n .\" ch.starttimestamp,\"\n .\" ch.endtimestamp,\"\n .\" ch.title,\"\n .\" ch.isliveevent,\"\n .\" lf.id AS locationid,\"\n .\" lf.name AS locationname,\"\n .\" lf.issecurestreamingforced,\"\n .\" lf.indexphotofilename,\"\n .\" lfs.id AS livefeedstreamid,\"\n .\" lfs.qualitytag AS streamname,\"\n .\" lfs.keycode AS streamid,\"\n .\" lfs.contentkeycode AS contentstreamid\"\n .\" FROM\"\n .\" channels AS ch,\"\n .\" livefeeds AS lf,\"\n .\" livefeed_streams AS lfs\"\n .\" WHERE\"\n .\" ch.starttimestamp <= '\" . $now . \"' AND\"\n .\" ch.endtimestamp >= '\" . $now . \"' AND\"\n .\" ch.id = lf.channelid AND\"\n .\" lf.id = lfs.livefeedid AND\"\n .\" lf.issecurestreamingforced = 0\"\n .\" ORDER BY\"\n .\" ch.id\";\n\n try {\n $rs_channels = $model->safeExecute($query);\n $channels = $rs_channels->GetArray();\n } catch (Exception $err) {\n $debug->log($logdir, $logfile, \"[ERROR] SQL query failed (\". $err->getTraceAsString() .\")\\nSQL QUERY:\\n'\". trim($query) .\"'\", false);\n return false;\n }\n\n // Check if any record returned\n if (count($channels) < 1) { return false; }\n\n return $channels;\n}", "public function broadcastOn()\n {\n //return new PrivateChannel('channel-name');\n }", "public function broadcastOn()\n {\n //return new PrivateChannel('channel-name');\n }", "public function broadcastOn()\n {\n //return new PrivateChannel('channel-name');\n }", "public function broadcastOn()\n {\n //return new PrivateChannel('channel-name');\n }", "public function subscribe($events) {\n /* Publication */\n //$events->listen('publication.save', 'PublicationObserver@onPublicationSave');\n// $events->listen('publication.addImage', 'PublicationObserver@onPublicationAddImage');\n// $events->listen('publication.deleteImage', 'PublicationObserver@onPublicationDeleteImage');\n $events->listen('publication.change', 'PublicationObserver@onPublicationChange');\n\n //$events->listen('user.logout', 'CacheHandler@onUserLogout');\n }", "public function broadcastOn()\n {\n return (new PrivateChannel('editor-notify'));\n }", "public function subscribe($events)\n {\n \t$events->listen(\n \t\t\\Config::get('detr.event_detr.event_sentmail_order'), \n \t\t'DeTrFunc\\EventDetrSendMailSubcriber@onSentOrderStatusMail'\n \t);\n\n $events->listen(\n \\Config::get('detr.event_detr.event_sentmail_notify_order'), \n 'DeTrFunc\\EventDetrSendMailSubcriber@onSentOrderNotifyMail'\n );\n }", "public static function subscribe($channel)\n {\n return parent::subscribe($channel);\n }", "public function listener()\n {\n /** @var \\Illuminate\\Redis\\Connections\\PhpRedisConnection|\\Illuminate\\Redis\\Connections\\PredisConnection $connection */\n $connection = Redis::connection($this->connection());\n\n register_shutdown_function(function () use ($connection) {\n $connection->disconnect();\n abort(200);\n });\n\n return response()->stream(function () use ($connection) {\n\n // Send the message with a retry timer\n $this->message()->retry($this->timeRetry())->send();\n\n // If the Last-Event-Id header is set, restore the connection with the last message id.\n if (request()->hasHeader('Last-Event-Id')) {\n $this->restore(request()->header('Last-Event-Id'));\n }\n\n // Listen for new messages\n $connection->subscribe([$this->channel()], fn (string $message) => $this->handler($message));\n\n }, Response::HTTP_OK, $this->headers());\n }", "public function listen($args, $assoc_args = array())\n {\n global $wp_queue;\n\n $worker = new WP_Worker($wp_queue);\n\n WP_CLI::log('Listening for queue jobs...');\n\n while (true) {\n if ($worker->should_run()) {\n if ($worker->process_next_job()) {\n WP_CLI::success('Processed: ' . $worker->get_job_name());\n sleep(1);\n }\n } else {\n sleep(5);\n }\n }\n }", "public function broadcastOn()\n {\n // Have no idea about this\n // return new PrivateChannel('channel-name');\n }", "public function subscribe($events)\n {\n $events->listen(\n 'App\\Events\\CreateCommsExecs',\n 'App\\Listeners\\CommsExecsEventSubscriber@onCreate'\n );\n\n $events->listen(\n 'App\\Events\\DeleteCommsExecs',\n 'App\\Listeners\\CommsExecsEventSubscriber@onDelete'\n );\n\n $events->listen(\n 'App\\Events\\UpdateCommsExecs',\n 'App\\Listeners\\CommsExecsEventSubscriber@onUpdate'\n );\n }", "public function broadcastOn()\n {\n return ['laravue-channel'];\n }", "public function subscribe($events)\n {\n $events->listen('mailActivateAccount', 'App\\Listeners\\MailEventHandler@mailActivateAccount');\n $events->listen('mailActivatedAccount', 'App\\Listeners\\MailEventHandler@mailActivatedAccount');\n $events->listen('mailPasswordReminder', 'App\\Listeners\\MailEventHandler@mailPasswordReminder');\n }", "public function sub($channels, $callback)\n {\n ! $this->_connection && $this->connect();\n return $this->_connection->sub($channels, $callback);\n }", "public function testComAdobeCqScreensImplHandlerChannelsUpdateHandler()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.adobe.cq.screens.impl.handler.ChannelsUpdateHandler';\n\n $crawler = $client->request('POST', $path);\n }", "public function subscribe($events)\n {\n $events->listen(\n \\App\\Events\\Backend\\ClassName\\ClassNameCreated::class,\n 'App\\Listeners\\Backend\\ClassName\\ClassNameEventListener@onCreated'\n );\n\n $events->listen(\n \\App\\Events\\Backend\\ClassName\\ClassNameDeleted::class,\n 'App\\Listeners\\Backend\\ClassName\\ClassNameEventListener@onDeleted'\n );\n\n $events->listen(\n \\App\\Events\\Backend\\ClassName\\ClassNameermanentlyDeleted::class,\n 'App\\Listeners\\Backend\\ClassName\\ClassNameEventListener@onermanentlyDeleted'\n );\n\n $events->listen(\n \\App\\Events\\Backend\\ClassName\\ClassNameRestored::class,\n 'App\\Listeners\\Backend\\ClassName\\ClassNameEventListener@onRestored'\n );\n\n $events->listen(\n \\App\\Events\\Backend\\ClassName\\ClassNameUpdated::class,\n 'App\\Listeners\\Backend\\ClassName\\ClassNameEventListener@onUpdated'\n );\n }", "public function broadcastOn()\n {\n return ['channel-status'];\n }", "public function broadcastOn()\n {\n return new Channel('my-channel');\n }", "public function subscribe($events)\n {\n $events->listen(\n \\App\\Listeners\\Backend\\GemSighting\\GemSightingCreated::class,\n 'App\\Listeners\\Backend\\GemSightingEventListener@onCreated'\n );\n\n $events->listen(\n \\App\\Listeners\\Backend\\GemSighting\\GemSightingUpdated::class,\n 'App\\Listeners\\Backend\\GemSightingEventListener@onUpdated'\n );\n\n $events->listen(\n \\App\\Listeners\\Backend\\GemSighting\\GemSightingDeleted::class,\n 'App\\Listeners\\Backend\\GemSightingEventListener@onDeleted'\n );\n }", "public function subscribe($events)\n {\n $events->listen('Swapbot\\Events\\CustomerAddedToSwap', 'Swapbot\\Handlers\\Events\\CustomerEmailHandler@customerAddedToSwap');\n $events->listen('Swapbot\\Events\\SwapWasConfirmed', 'Swapbot\\Handlers\\Events\\CustomerEmailHandler@swapWasConfirmed');\n $events->listen('Swapbot\\Events\\SwapWasCompleted', 'Swapbot\\Handlers\\Events\\CustomerEmailHandler@swapWasCompleted');\n $events->listen('Swapbot\\Events\\SwapWasPermanentlyErrored', 'Swapbot\\Handlers\\Events\\CustomerEmailHandler@swapWasPermanentlyErrored');\n }", "public function index()\n\t{\n $pusher = $this->pusher;\n $this->pusher->trigger('demoChannel', 'userNewMessage', ['message'=>'hello world']);\n\n if(Input::has('get')) {\n if(Input::get('get')=='channels') {\n return json_decode($this->pusher->get('/channels/demoChannel/users'));\n }\n }\n\t\treturn View::make('chats.index', compact('pusher'));\n\t}", "public function setChannels($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->channels = $arr;\n\n return $this;\n }", "public function subscribe($events)\n\t{\n\t\t$events->listen(\n\t\t\t\\App\\Events\\Frontend\\Scrum\\BacklogMeeting\\BacklogMeetingCreated::class,\n\t\t\t'App\\Listeners\\Frontend\\Scrum\\BacklogMeeting\\BacklogMeetingEventListener@onCreated'\n\t\t);\n\n\t\t$events->listen(\n\t\t\t\\App\\Events\\Frontend\\Scrum\\BacklogMeeting\\BacklogMeetingUpdated::class,\n\t\t\t'App\\Listeners\\Frontend\\Scrum\\BacklogMeeting\\BacklogMeetingEventListener@onUpdated'\n\t\t);\n\n\t\t$events->listen(\n\t\t\t\\App\\Events\\Frontend\\Scrum\\BacklogMeeting\\BacklogMeetingDeleted::class,\n\t\t\t'App\\Listeners\\Frontend\\Scrum\\BacklogMeeting\\BacklogMeetingEventListener@onDeleted'\n\t\t);\n\n\t\t$events->listen(\n\t\t\t\\App\\Events\\Frontend\\Scrum\\BacklogMeeting\\BacklogMeetingRestored::class,\n\t\t\t'App\\Listeners\\Frontend\\Scrum\\BacklogMeeting\\BacklogMeetingEventListener@onRestored'\n\t\t);\n\t}", "public function channel()\n {\n }", "public function searchChannelVideos($channel_id, $published_after = null);", "public function broadcastOn()\n {\n return new PrivateChannel('messagelive');\n }", "private function notifyChannelUsers($channelId)\n {\n $this->notifyBySocket($channelId);\n $this->notifyByEmail($channelId);\n }", "public function subscribe($keys)\n {\n return $this->send(['command'=>'subscribe', 'key'=>$keys, 'seq'=>$this->getSequence()]);\n }", "public function listen($msg, array $tags)\n {\n $prefix = '';\n if ($tags) {\n $prefix = implode('.', $tags) . ': ';\n }\n echo $prefix . $msg . $this->cr;\n }", "public function startListening();", "public function broadcastOn()\n {\n return ['whatcanido-channel'];\n }", "public function listenForEvents()\n {\n Event::listen(DummyEvent::class, DummyListener::class);\n\n event(new DummyEvent);\n }", "public function subscribe(): void\n {\n foreach (static::$eventHandlerMap as $eventName => $handler) {\n $this->events->listen($eventName, [$this, $handler]);\n }\n }", "public function testChannelsList()\n {\n }", "public function broadcastOn()\n {\n return new Channel('test');\n }", "public function listen() {\n $this->source->listen($this->id);\n }", "public function publishBatch($channel, array $messages)\n {\n foreach ($messages as $message) {\n $this->publish($channel, $message);\n }\n }" ]
[ "0.6428243", "0.62156457", "0.6096866", "0.59608436", "0.5826014", "0.5822264", "0.58021694", "0.5777791", "0.5774709", "0.57393026", "0.5632801", "0.5626479", "0.55955726", "0.5585272", "0.55755436", "0.55661076", "0.5557738", "0.54510784", "0.54392356", "0.54380584", "0.5417782", "0.5376802", "0.53723276", "0.5368945", "0.5368145", "0.5366676", "0.5349381", "0.5332333", "0.5279859", "0.5277758", "0.52650756", "0.5248783", "0.52374387", "0.52341306", "0.5225435", "0.52146477", "0.5210235", "0.5171417", "0.5171279", "0.51649714", "0.51631993", "0.5158417", "0.51217324", "0.51211095", "0.51058614", "0.51011735", "0.5099847", "0.50977224", "0.50969654", "0.5089767", "0.5077642", "0.5071455", "0.5071455", "0.506913", "0.50511247", "0.5046625", "0.5042805", "0.5042805", "0.5041074", "0.50255764", "0.50254554", "0.49982968", "0.49891114", "0.49891114", "0.49891114", "0.49891114", "0.4984773", "0.49680358", "0.49623162", "0.495957", "0.49466074", "0.49422872", "0.49379396", "0.49281588", "0.49257305", "0.4919331", "0.49180946", "0.49133423", "0.49118742", "0.49108708", "0.4902872", "0.49009278", "0.48984754", "0.4897321", "0.48928845", "0.48884648", "0.48825994", "0.4879919", "0.48718914", "0.48701954", "0.48545158", "0.48282328", "0.48252675", "0.48238632", "0.48229235", "0.48203513", "0.48168382", "0.48106402", "0.47989073", "0.47964275" ]
0.74562204
0
Stop listening for messages posted to the given channels
public function unsubscribe($channel=null);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function StopMonitor($channel);", "protected function _unsubscribeFromEngineEvents()\n {\n $events = array(\n Streamwide_Engine_Events_Event::SDP,\n Streamwide_Engine_Events_Event::CHILD,\n Streamwide_Engine_Events_Event::OKMOVED,\n Streamwide_Engine_Events_Event::MOVED,\n Streamwide_Engine_Events_Event::FAILMOVED\n );\n \n $controller = $this->getController();\n foreach ( $events as $event ) {\n $controller->removeEventListener( $event, array( 'callback' => array( $this, 'onSignalReceived' ) ) );\n }\n }", "function typingStop(TextChannelInterface $channel, User $user);", "public function stopListeningForEvents()\n\t\t{\n\n\t\t\t// Initialize the crontab manager if this has not been done before\n\t\t\tif(is_null($this->CronManager)) $this->CronManager = new ssh2_crontab_manager();\n\n\t\t\t// Stop cronjob to call $this-->captureSongHistory()\n\t\t\t$this->CronManager->remove_cronjob(\"checkTimeEventExecutionNeeds\");\n\n\t\t\t// Write status to the config\n\t\t\t$this->data['config']['mod_time__checkTimeEventExecutionNeedsCron'] = \"disabled\";\n\t\t\t$this->writeConfFile($this->data['config'], true);\n\n\t\t}", "public function unsubscribeThreads($userid, $threads = false);", "public function __destruct() {\n\t\tif($this->_listeningenabled)\n\t\t\t$this->unlisten();\n\t}", "function ts3client_requestChannelUnsubscribeAll($serverConnectionHandlerID) {}", "public function testChannelsLeave()\n {\n }", "public function testQuestionSharev1questionstopChannels()\n {\n\n }", "public function stop() {\n\t\tforeach ( $this->connections as $id => $conn ) {\n\t\t\tif ($this->connections [$id]->isAlive ())\n\t\t\t\t$this->connections [$id]->stop ();\n\t\t}\n\t\t$this->active = null;\n\t}", "public function unsubscribe(): void;", "public function stopAllCoroutineConsumer(): void\n {\n if (! empty($this->startedTopicIdArr)) {\n foreach ($this->startedTopicIdArr as $consumerId) {\n $this->stopConsumer($consumerId, 1);\n }\n }\n }", "public function stop() {}", "public function stopsConversation(IncomingMessage $message)\n {\n //\n }", "public function removeSubscribes();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function subscribe($channels);", "protected function _stop_listening(){\r\n\t\t\trestore_error_handler();\r\n\t\t\trestore_exception_handler();\r\n\t\t\terror_reporting();\r\n\t\t\tini_set('display_errors', true);\r\n\t\t}", "protected function _unsubscribeFromEngineEvents()\n {\n $controller = $this->getController();\n $controller->removeEventListener(\n Streamwide_Engine_Events_Event::ENDOFFAX,\n array( 'callback' => array( $this, 'onEndOfFax' ) )\n );\n $controller->removeEventListener(\n Streamwide_Engine_Events_Event::FAXPAGE,\n array( 'callback' => array( $this, 'onFaxPage' ) )\n );\n }", "private function unsubscribe()\n {\n $this->botman->hears('unsubscribe', function(BotMan $bot) {\n $userId = $bot->getUser()->getId();\n Subscriber::where('telegram_user_id', $userId)->delete();\n $bot->reply('You have just unsubscribed from our updates!');\n });\n }", "public function unSubscribe()\n {\n }", "public function broadcastOn()\n {\n return new Channel('cancel');\n }", "public function onChannels(): ?array\n {\n return null;\n }", "private function stopServer() {\n\t\t$this->socketSend('shutdown');\n\t\tforeach($this->pipes as $pipe) {\n\t\t\tfclose($pipe);\n\t\t}\n\t\tproc_close($this->server);\n\t}", "public function __destruct() {\n foreach ($this->_messages as $key => $message) {\n unset($this->_messages[$key]);\n $message->close();\n }\n\n $this->_stream->stop();\n }", "static function shutdown()\n\t{\n\t\tif (!empty(self::$channel))\n\t\t{\n\t\t\tself::$channel->close();\n\t\t\tself::$channel = null;\n\t\t}\n\n\t\tif (!empty(self::$connection))\n\t\t{\n\t\t\tself::$connection->close();\n\t\t\tself::$connection = null;\n\t\t}\n\t}", "public function stop()\n {\n $this->loop->stop();\n }", "public function remove_frameless_preview_messenger_channel()\n {\n }", "public function unsubscribe( $sChannel )\n\t{\n\t\t$this->initSubscriber();\n\n\t\tif ( $this->m_bHasEventLoop )\n\t\t{\n\t\t\t$this->m_cSubscriber->unsubscribe( $sChannel );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->m_cSubscriber->setSockOpt( \\ZMQ::SOCKOPT_UNSUBSCRIBE, $sChannel );\n\t\t}\n\t}", "function ts3client_stopConnection($serverConnectionHandlerID, $quitMessage) {}", "public function destroy($channel, Thread $thread)\n {\n $thread->unsubscribe();\n }", "public function channels()\n {\n $this->send(['command' => 'channels', 'seq'=>$this->getSequence()]);\n }", "public function unsubscribeThread(ThreadRepositoryInterface $thread): PodiumResponse;", "public function destroy()\n {\n $this->stop();\n $this->setupListeners();\n }", "public function onStop();", "abstract public function stop();", "protected function removeRecipient()\n\t{\n\t\t$arrChannels = $this->Input->post('channels');\n\t\t$arrChannels = array_intersect($arrChannels, $this->nl_channels); // see #3240\n\n\t\t// Check the selection\n\t\tif (!is_array($arrChannels) || count($arrChannels) < 1)\n\t\t{\n\t\t\t$_SESSION['UNSUBSCRIBE_ERROR'] = $GLOBALS['TL_LANG']['ERR']['noChannels'];\n\t\t\t$this->reload();\n\t\t}\n\n\t\t$arrSubscriptions = array();\n\t\t\n\t\t$email = \\Idna::encodeEmail($this->Input->post('email', true));\n\t\t\n\t\t$subscriber = new Subscriber($email);\n\n\t\t// Get active subscriptions\n\t\t$objSubscription = $this->Database->prepare(\"SELECT pid FROM tl_newsletter_recipients WHERE email=? AND active=1\")\n\t\t\t\t\t\t\t\t\t\t ->execute($email);\n\n\t\tif ($objSubscription->numRows)\n\t\t{\n\t\t\t$arrSubscriptions = $objSubscription->fetchEach('pid');\n\t\t}\n\n\t\t$arrRemove = array_intersect($arrChannels, $arrSubscriptions);\n\n\t\t// Return if there are no subscriptions to remove\n\t\tif (!is_array($arrRemove) || count($arrRemove) < 1)\n\t\t{\n\t\t\t$_SESSION['UNSUBSCRIBE_ERROR'] = $GLOBALS['TL_LANG']['ERR']['unsubscribed'];\n\t\t\t$this->reload();\n\t\t}\n\n\t\t// check for cleverreach support\n\t\t$objChannel = $this->Database->execute(\"SELECT id FROM tl_newsletter_channel WHERE cleverreach_active = 1 AND id IN(\" . implode(',', array_map('intval', $arrRemove)) . \")\");\n\n\t\t// TODO: multiple channel unsubscription\n\t\t$subscriber->getByChannel($arrRemove[0]);\n\n\t\t// Remove subscriptions\n\t\t$subscriber->remove($arrRemove);\n\t\t\n\t\t// optional Cleverreach Deletion\n\t\tif($objChannel->numRows > 0)\n\t\t{\n\t\t\t$subscriber->removeFromCR($objChannel->fetchEach('id'));\n\t\t}\n\n\t\t// Get channels\n\t\t$objChannels = $this->Database->execute(\"SELECT title FROM tl_newsletter_channel WHERE id IN(\" . implode(',', array_map('intval', $arrRemove)) . \")\");\n\t\t$arrChannels = $objChannels->fetchEach('title');\n\n\t\t// HOOK: post unsubscribe callback\n\t\tif (isset($GLOBALS['TL_HOOKS']['removeRecipient']) && is_array($GLOBALS['TL_HOOKS']['removeRecipient']))\n\t\t{\n\t\t\tforeach ($GLOBALS['TL_HOOKS']['removeRecipient'] as $callback)\n\t\t\t{\n\t\t\t\t$this->import($callback[0]);\n\t\t\t\t$this->{$callback[0]}->{$callback[1]}($varInput, $arrRemove);\n\t\t\t}\n\t\t}\n\n\t\tglobal $objPage;\n\n\t\t// Redirect to jumpTo page\n\t\tif (strlen($this->jumpTo) && $this->jumpTo != $objPage->id)\n\t\t{\n\t\t\t$objNextPage = $this->Database->prepare(\"SELECT id, alias FROM tl_page WHERE id=?\")\n\t\t\t\t\t\t\t\t\t\t ->limit(1)\n\t\t\t\t\t\t\t\t\t\t ->execute($this->jumpTo);\n\n\t\t\tif ($objNextPage->numRows)\n\t\t\t{\n\t\t\t\t$this->redirect($this->generateFrontendUrl($objNextPage->fetchAssoc()));\n\t\t\t}\n\t\t}\n\n\t\tif($subscriber->sendUnSubscribeMail($arrRemove))\n\t\t{\n\t\t\t$this->reload();\n\t\t}\n\t}", "public function channels(): ChannelsService;", "public function unregister() {\n // Normally, there are definitely wrappers set for the ALL filter. However,\n // in some cases involving many container rebuilds (e.g. BrowserTestBase),\n // $this->wrappers may be empty although wrappers are still registered\n // globally. Thus an isset() check is needed before iterating.\n if (isset($this->wrappers[StreamWrapperInterface::ALL])) {\n foreach (array_keys($this->wrappers[StreamWrapperInterface::ALL]) as $scheme) {\n stream_wrapper_unregister($scheme);\n }\n }\n }", "private function serveStop()\n {\n foreach ($this->pid as $pid) {\n $command = \"kill -9 {$pid} > /dev/null 2> /dev/null &\";\n @exec($command, $output);\n }\n }", "public function punsubscribe($pattern=null);", "public function dispatchLoopShutdown()\n {\n //...\n }", "public function stop()\n {/*{{{*/\n $this->_loop = false;\n }", "public function stopSpeaking()\n {\n return $this->proxyToInterface()->stopSpeaking(\n $this->id);\n }", "public function leave($channel)\n {\n return $this->method('leave', compact('channel'));\n }", "public function stop(): void;", "public function stop(): void;", "public function stop(): void;", "public function stop(): void;", "public function stop(): void;", "public function getChannels();", "public function close() {\n $this->channel()->close();\n }", "function channelDelete(ChannelInterface $channel);", "public function handle()\n {\n \n while (true) {\n \n $loop = ReactEventLoopFactory::create();\n\n $client = new SlackRealTimeClient($loop);\n $client->setToken(config('services.slack.token'));\n\n // disconnect after first message\n $client->on('message', function ($data) use ($client) {\n //echo \"Someone typed a message: \".$data['text'].\"\\n\";\n //print_r($data);\n //$client->disconnect();\n \n if($data['type'] == 'message'){\n \n if(!isset($data['text'])) return;\n if(isset($data['username']) && $data['username'] == 'bot') return;\n\n print_r($data);\n\n if(substr($data['channel'], 0, 1) == 'D'){\n //If it's a DM, treat it as a search query\n echo \"Direct Message: \";\n print_r($data);\n }elseif(!isset($data['user'])){\n $this->error('No valid user. Previous event not saved');\n Log::debug('No valid user. Previous event not saved');\n }else{\n //Insert new message to DB\n $message = new Messages;\n $message->message = $data['text'];\n $message->user = $data['user'];\n $message->channel = $data['channel'];\n $message->ts = convert_timestamp($data['ts']);\n $message->save();\n\n $message->addToIndex(); //add to ES Index\n }\n\n\n }//END IF DATA TYPE CHECK\n $client->disconnect();\n\n });\n\n $client->connect()->then(function () {\n echo \"Connected!\\n\";\n });\n\n $loop->run();\n\n }//END WHILE INF\n }", "protected function stopSignalHandlers(): void\n {\n if (!$this->hasPcntl) {\n return;\n }\n\n foreach (array_keys($this->signalMap ?? []) as $number) {\n pcntl_signal((int)$number, \\SIG_IGN);\n }\n }", "public static function stopMinkSessions() {\n self::$mink->stopSessions();\n self::$mink = null;\n }", "public static function stopMinkSessions() {\n self::$mink->stopSessions();\n self::$mink = null;\n }", "public function removeChannelInvites($channel_id)\n {\n $this->receivedInvites()->where('channel_id', $channel_id)->delete();\n }", "public function stop( $args, $assoc_args ) {\n\t\t$this->site_docker_compose_execute( $args[0], 'stop', $args, $assoc_args);\n\t}", "protected function stopped()\n {\n $this->redis->zrem(Queue::redisKey($this->queue, 'running'), $this->payload);\n\n Stats::decr('running', 1);\n Stats::decr('running', 1, Queue::redisKey($this->queue, 'stats'));\n }", "public function dispatchLoopShutdown()\n {\n\n }", "public function unSubscribe()\n {\n $this->disconnect();\n $this->queue = $this->currentEnvelope = null;\n }", "public function unsubscribe()\n {\n echo \"<br>\";\n echo \"Action: Cancelling Subscription !\";\n unset($this->plan);\n unset($this->server);\n unset($this->serverList);\n\n }", "public function onChannel($channel);", "public function stop() {\n\t\t$this->invoke(\"stop\");\n\t}", "public function onQuit()\n {\n $nick = trim($this->event->getNick());\n\n foreach ($this->store as $chan => $store) {\n if (isset($store[$nick])) {\n unset($this->store[$chan][$nick]);\n }\n }\n }", "public function endCommunication()\n {\n $this->provider->keepAuth = false;\n $this->provider->logout();\n }", "public function disable(int $events): bool {}", "public function listen()\n {\n $this->openWorker();\n while (!Signal::isExit()) {\n if (($payload = $this->pop(3)) !== null) {\n list($id, $message) = explode(':', $payload, 2);\n $this->handleMessage($message);\n }\n }\n $this->closeWorker();\n }", "public function leaveChat($datas = [])\r\n {\r\n return $this->telegram(\"leaveChat\", $datas);\r\n }", "public function stop(): EventInterface;", "private static function onStopautodjCommand(Bot $bot, $channel, $parameters, $userLevel) {\r\n if (RadioTracker::getAutoDJState() == false)\r\n return CommandHelper::infoMessage($bot, $channel, 'The autoDJ is not streaming. Ask the current DJ to stop streaming.');\r\n\r\n $bot->send('PRIVMSG LVP_Radio :!autodj-force');\r\n\r\n return true;\r\n }", "public function stopEngine()\n {\n }", "protected function removeRecipient()\n\t{\n\t\t$arrChannels = $this->Input->post('channels');\n\n\t\t// Check selection\n\t\tif (!is_array($arrChannels) || count($arrChannels) < 1)\n\t\t{\n\t\t\t$_SESSION['UNSUBSCRIBE_ERROR'] = $GLOBALS['TL_LANG']['ERR']['noChannels'];\n\t\t\t$this->reload();\n\t\t}\n\n\t\t// Validate e-mail address\n\t\tif (!preg_match('/^\\w+([!#\\$%&\\'\\*\\+\\-\\/=\\?^_`\\.\\{\\|\\}~]*\\w+)*@\\w+([_\\.-]*\\w+)*\\.[a-z]{2,6}$/i', $this->Input->post('email', true)))\n\t\t{\n\t\t\t$_SESSION['UNSUBSCRIBE_ERROR'] = $GLOBALS['TL_LANG']['ERR']['email'];\n\t\t\t$this->reload();\n\t\t}\n\n\t\t$arrSubscriptions = array();\n\n\t\t// Get active subscriptions\n\t\t$objSubscription = $this->Database->prepare(\"SELECT pid FROM tl_newsletter_recipients WHERE email=? AND active=?\")\n\t\t\t\t\t\t\t\t\t\t ->execute($this->Input->post('email', true), 1);\n\n\t\tif ($objSubscription->numRows)\n\t\t{\n\t\t\t$arrSubscriptions = $objSubscription->fetchEach('pid');\n\t\t}\n\n\t\t$arrRemove = array_intersect($arrChannels, $arrSubscriptions);\n\n\t\t// Return if there are no subscriptions to remove\n\t\tif (!is_array($arrRemove) || count($arrRemove) < 1)\n\t\t{\n\t\t\t$_SESSION['UNSUBSCRIBE_ERROR'] = $GLOBALS['TL_LANG']['ERR']['unsubscribed'];\n\t\t\t$this->reload();\n\t\t}\n\n\t\t// Remove subscriptions\n\t\t$this->Database->prepare(\"DELETE FROM tl_newsletter_recipients WHERE email=? AND pid IN(\" . implode(',', $arrRemove) . \")\")\n\t\t\t\t\t ->execute($this->Input->post('email', true));\n\t\t\t\t\t \n\t\t// Remove member\n\t\t$arrRetain = array_diff($arrSubscriptions, $arrChannels);\n\t\tif (count($arrRetain))\n\t\t{\n\t\t\t$this->Database->prepare(\"UPDATE tl_member SET newsletter=? WHERE email=?\")->execute(serialize($arrRetain), $this->Input->post('email'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Delete only if member groups match\n\t\t\t$this->Database->prepare(\"DELETE FROM tl_member WHERE email=? AND groups=?\")->execute($this->Input->post('email'), $this->reg_groups);\n\t\t}\n\n\t\t// Confirmation e-mail\n\t\t$objEmail = new Email();\n\n\t\t// Get channels\n\t\t$objChannel = $this->Database->execute(\"SELECT title FROM tl_newsletter_channel WHERE id IN(\" . implode(',', $arrChannels) . \")\");\n\t\t\n\t\t// HOOK: post unsubscribe callback\n\t\tif (isset($GLOBALS['TL_HOOKS']['removeRecipient']) && is_array($GLOBALS['TL_HOOKS']['removeRecipient']))\n\t\t{\n\t\t\tforeach ($GLOBALS['TL_HOOKS']['removeRecipient'] as $callback)\n\t\t\t{\n\t\t\t\t$this->import($callback[0]);\n\t\t\t\t$this->$callback[0]->$callback[1]($this->Input->post('email', true), $arrRemove, $objChannel->fetchEach('title'));\n\t\t\t}\n\t\t}\n\n\t\t$strText = str_replace('##domain##', $this->Environment->host, $this->nl_unsubscribe);\n\t\t$strText = str_replace(array('##channel##', '##channels##'), implode(\"\\n\", $objChannel->fetchEach('title')), $strText);\n\n\t\t$objEmail->from = $GLOBALS['TL_ADMIN_EMAIL'];\n\t\t$objEmail->subject = sprintf($GLOBALS['TL_LANG']['MSC']['nl_subject'], $this->Environment->host);\n\t\t$objEmail->text = $strText;\n\n\t\t$objEmail->sendTo($this->Input->post('email', true));\n\t\tglobal $objPage;\n\n\t\t// Redirect to jumpTo page\n\t\tif (strlen($this->jumpTo) && $this->jumpTo != $objPage->id)\n\t\t{\n\t\t\t$objNextPage = $this->Database->prepare(\"SELECT id, alias FROM tl_page WHERE id=?\")\n\t\t\t\t\t\t\t\t\t\t ->limit(1)\n\t\t\t\t\t\t\t\t\t\t ->execute($this->jumpTo);\n\n\t\t\tif ($objNextPage->numRows)\n\t\t\t{\n\t\t\t\t$this->redirect($this->generateFrontendUrl($objNextPage->fetchAssoc()));\n\t\t\t}\n\t\t}\n\n\t\t$_SESSION['UNSUBSCRIBE_CONFIRM'] = $GLOBALS['TL_LANG']['MSC']['nl_removed'];\n\t\t$this->reload();\n\t}", "public function stop(): bool {}", "public function stop()\n {\n }", "public function stop()\n {\n // Put your code here;\n }", "function stop() {\n return getReactor()->stop();\n}", "public function onClose(ConnectionInterface $conn) {\n foreach ($this->subscribedTopics as $topic) {\n if (preg_match('/user_(\\d+)_watch_wait/', $topic->getId(), $matches)) {\n if (($userId = $matches[1])) {\n // Add active agents to the wait stack\n $connectionId = $conn->WAMP->sessionId;\n $memcache = new \\Memcache();\n $memcache->connect('localhost', 11211) or die(\"Could not connect\");\n $activeUserArr = $memcache->get(self::MEMCACHE_WATCH_WAIT_LIST);\n $activeUserArr = $this->checkSessions($activeUserArr); // Check sessions statuses\n if (!isset($activeUserArr) || !is_array($activeUserArr))\n $activeUserArr = [];\n if (isset($activeUserArr[$userId]) && is_array($activeUserArr[$userId]) && ($connectionKey = array_search($connectionId, $activeUserArr[$userId])) !== false) {\n if (isset($activeUserArr[$userId][$connectionKey]))\n unset($activeUserArr[$userId][$connectionKey]);\n if (count($activeUserArr[$userId]) === 0)\n unset($activeUserArr[$userId]);\n }\n $memcache->set(self::MEMCACHE_WATCH_WAIT_LIST, $activeUserArr);\n return;\n }\n }\n }\n // Remove from connections list \n unset($this->connections[$conn->WAMP->sessionId]);\n }", "public function discard()\n {\n $this->channel->basic_reject(\n $this->tag(),\n false\n );\n }", "public function stop(): static\n {\n if ($this->listening) {\n $this->breakLoop = true;\n }\n\n return $this;\n }", "public function endCommunication()\n {\n $this->restAPI->keepAuth = false;\n $this->restAPI->logout();\n }", "public function stop()\n {\n }", "public function stop()\n {\n $this->conversation = null;\n $this->notes = null;\n $this->command = null;\n $this->state = null;\n\n if (file_exists(APP_DIR . '/var/' . $this->id)) {\n unlink(APP_DIR . '/var/' . $this->id);\n }\n\n return true;\n }", "public function unsubscribe($commandName, CommandHandlerInterface $handler);", "public function stop()\r\n {\r\n\r\n }", "public function stopRinging() {\n\t\treturn $this->getRinger()->stop();\n\t}", "private function registerChannels(): void\n {\n if (config('messenger.routing.channels.enabled')) {\n $this->app->make(BroadcastManager::class)->routes($this->channelRouteConfiguration());\n\n $broadcaster = $this->app->make(Broadcaster::class);\n\n $broadcaster->channel('messenger.thread.{thread}', ThreadChannel::class);\n $broadcaster->channel('messenger.call.{call}.thread.{thread}', CallChannel::class);\n $broadcaster->channel('messenger.{alias}.{id}', ProviderChannel::class);\n }\n }", "function stop();", "abstract public function stopInstances(IdFilter $instances);", "public function stop()\n {\n\n }", "private function close() {\n\t\t$this->socketManager->removeSocketNotifier($this->notifier);\n\t\t$this->notifier = null;\n\t\tfclose($this->stream);\n\t}", "public function clearListeners()\n {\n $this->listeners = array();\n }" ]
[ "0.63967526", "0.5975111", "0.54820204", "0.5443188", "0.53814906", "0.53706807", "0.5349647", "0.53451824", "0.53378856", "0.5265868", "0.5234524", "0.51767695", "0.51397187", "0.5113883", "0.511321", "0.51054", "0.51054", "0.51054", "0.51054", "0.51054", "0.51054", "0.51054", "0.51054", "0.51004434", "0.50850207", "0.506946", "0.50591683", "0.50516677", "0.505103", "0.50258136", "0.49722546", "0.4953194", "0.49346054", "0.4919505", "0.4911716", "0.49060506", "0.49042025", "0.4897074", "0.4889741", "0.48791444", "0.48710594", "0.48469746", "0.48462445", "0.4830437", "0.48248288", "0.48149544", "0.4781241", "0.47621876", "0.47587445", "0.47532752", "0.4738611", "0.4729307", "0.47266456", "0.47266456", "0.47266456", "0.47266456", "0.47266456", "0.47238237", "0.47049537", "0.47040924", "0.46939462", "0.46914986", "0.46906433", "0.46906433", "0.4689934", "0.46783978", "0.467286", "0.4665279", "0.4659254", "0.4643348", "0.46360046", "0.4635979", "0.4631605", "0.46283716", "0.46274203", "0.46219745", "0.46170732", "0.46150112", "0.46119013", "0.46014154", "0.4600762", "0.45968622", "0.45933226", "0.45930073", "0.45829308", "0.45815995", "0.45750546", "0.45677656", "0.4560294", "0.45579726", "0.4556285", "0.45480072", "0.4547466", "0.4547249", "0.4544477", "0.45285594", "0.451311", "0.4512364", "0.4512186", "0.45073405" ]
0.64322376
0
for inserting data into the reserver table
function insert_to_reserver() { $servername="localhost"; $user_name="root"; $password=""; $dbname="project_menu"; $first_name=$_POST['firstname']; $first_name=ucfirst($first_name); $last_name=$_POST['lastname']; $last_name=ucfirst($last_name); $user_email=$_POST['email']; $phone_number=$_POST['tel']; $conn= new mysqli($servername,$user_name,$password,$dbname); if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } $sql = "INSERT INTO `reserver`(`first_name`, `last_name`, `email`, `phone`) VALUES ('$first_name','$last_name','$user_email','$phone_number')"; if ($conn->query($sql) === TRUE) { $last_id = $conn->insert_id; insert_to_reservation($last_id); } else { echo' <div class="container"> <div class="alert alert-danger alert-dismissible fade show"> <p> error: '. $sql . '"<br>" '. $conn->error.' </p> <strong>failed!!</strong>failed to store reserver info <P> <button type="button" onclick="window.history.back();"class="btn btn-primary align-self-center my-3" data-dismiss="alert">OK</button></P> </div> </div>'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function insert($cbtRekapNilai);", "public function run() {\n DB::table('clients')->insert([\n 'regimen_id' => 1,\n 'person_id' => 1,\n 'city_id' => 1,\n 'department_id' => 1,\n 'status_id' => 1,\n 'document_id' => 1,\n 'document' => \"2343234\",\n 'verification' => 1,\n 'address' => \"testing addres\",\n 'mobil' => \"2343243\",\n 'business_name' => \"Alhemmar\",\n 'insert_id' => 1,\n 'executive_id' => 2,\n ]);\n }", "public function insertRequestToDb()\n\t\t{\n\t\t\t$this->columnsInfo->data_seek(0);\n\t\t\t$columns = \"\";\n\t\t\t$values = \"\";\n\t\t\twhile($rowColumn = $this->columnsInfo->fetch_assoc())//$info->fetch_row\n\t\t\t{\n\t\t\t\tif($rowColumn[\"EXTRA\"] == \"auto_increment\")\n\t\t\t\t\tcontinue;\n\t\t\t\t$columns = $columns.\", \".$rowColumn[\"COLUMN_NAME\"];\n\t\t\t\t$val = \"\";\n\t\t\t\tif($rowColumn[\"COLUMN_NAME\"] == \"sid_a\")\n\t\t\t\t\t$val = $_SESSION[\"sid\"];\n\t\t\t\telse if($rowColumn[\"COLUMN_NAME\"] == \"date_a\")\n\t\t\t\t\t$val = \"now()\";\n\t\t\t\telse $val = $this->insertColumnValue($_REQUEST[$rowColumn[\"COLUMN_NAME\"]], $rowColumn[\"IS_NULLABLE\"], $rowColumn[\"DATA_TYPE\"], $rowColumn[\"CHARACTER_MAXIMUM_LENGTH\"]);\n\t\t\t\t$values = \"$values, $val\";\n\t\t\t}\n\t\t\t$columns = substr($columns, 2, strlen($columns));\n\t\t\t$values = substr($values, 2, strlen($values));\n\n\t\t\t$query = \"INSERT INTO $this->table ($columns) values($values);\";\n\t\t\t$GLOBALS[\"db\"]->query($query);\n\t\t\t//$info->free();\n\t\t}", "protected function _insert()\n\t{\n\t\t$this->date_added = \\Core\\Date::getInstance(null,\\Core\\Date::SQL_FULL, true)->toString();\n\t\t$this->date_modified = $this->date_added;\n\t\t$this->last_online = $this->date_modified;\n\t\t$this->activity_open = $this->date_modified;\n\t\t$this->language_id = \\Core\\Base\\Action::getModule('Language')->getLanguageId();\n\t}", "public function run()\n {\n DB::table('client')->insert([\n 'nama_client' => 'ardi',\n 'tempat_lahir' => 'Bandung',\n 'tanggal_lahir' => '2005-1-11',\n 'jenis_kelamin' => 'L',\n 'alamat' => 'Jalan Babakan',\n 'no_ktp' => '2343232',\n 'no_hp' => '0898398',\n 'email' => '[email protected]',\n 'ket' => 'coba',\n 'crated_by' => '2'\n ]);\n \n }", "protected function _insert()\n {\n \n }", "protected function _insert()\n {\n \n }", "protected function _insert()\n\t{\n\t}", "function insert() {\n\t \n\t \t$sql = \"INSERT INTO evs_database.evs_group (gru_id, gru_name, gru_head_dept,gru_company_id)\n\t \tVALUES(?, ?, ?,?)\";\n\t\t \n\t \t$this->db->query($sql, array($this->gru_id, $this->gru_name, $this->gru_head_dept ,$this->gru_company_id));\n\t }", "function insert($conn,$table,$data)\n {\n }", "private function insert()\n {\n $this->query = $this->pdo->prepare(\n 'INSERT INTO ' . $this->table . ' (' .\n implode(', ', array_keys($this->data)) .\n ' ) VALUES (:' .\n implode(', :', array_keys($this->data)) .\n ')'\n );\n }", "function insert() {\n\t \t \n\t \t$sql = \"INSERT INTO evs_database.evs_identification (idf_identification_detail_en, idf_identification_detail_th, idf_pos_id, idf_ctg_id)\n\t \t\t\tVALUES(?, ?, ?, ?)\";\n\t\t \n\t \t$this->db->query($sql, array($this->idf_identification_detail_en, $this->idf_identification_detail_th, $this->idf_pos_id, $this->idf_ctg_id));\n\t\n\t }", "function insert() {\n\t\t$sql = \"INSERT INTO \".$this->hr_db.\".hr_amphur (amph_name, amph_name_en, amph_pv_id, amph_active)\n\t\t\t\tVALUES(?, ?, ?, ?)\";\n\t\t$this->hr->query($sql, array( $this->amph_name, $this->amph_name_en, $this->amph_pv_id, $this->amph_active));\n\t\t$this->last_insert_id = $this->hr->insert_id();\n\t}", "public function insert($data);", "function insert() {\n\t\t$sql = \"INSERT INTO cost_detail (cd_fr_id, cd_seq, cd_start_time, cd_end_time, cd_hour, cd_minute, cd_cost, cd_update, cd_user_update)\n\t\t\t\tVALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)\";\n\t\t$this->ffm->query($sql, array($this->cd_fr_id, $this->cd_seq, $this->cd_start_time, $this->cd_end_time, $this->cd_hour, $this->cd_minute, $this->cd_cost, $this->cd_update, $this->cd_user_update));\n\t\t$this->last_insert_id = $this->ffm->insert_id();\n\t}", "public function insert_data_reservasi($data)\n\t {\n\t\t$this->db->insert('tbb_reservasi', $data); \n\t }", "protected function saveInsert()\n {\n }", "public function insert($data){\n\t\t\t$this->name=trim($data['name']);\n\t\t\t$this->rfid=trim($data['rfid']);\n\t\t\t$this->created_at=date('Y/m/d H:i:s');\n\t\t\ttry {\n\t\t\t\t$connect = Database::connect();\n\t\t\t\t$query='INSERT INTO vehicles (name, rfid, created_at) VALUES (:name, :rfid, :created_at)';\n\t\t\t\t$statement = $connect->prepare($query);\n\t\t\t\t$statement->bindValue(':name', $this->name);\n\t\t\t\t$statement->bindValue(':rfid', $this->rfid);\n\t\t $statement->bindValue(':created_at', $this->created_at);\n\t\t return $statement->execute();\n\t\t\t} catch (\\Exception $e) {\n\t\t\t\techo $e;\n\t\t\t}\n\t\t}", "public function insert() {\r\n\r\n\t\ttry {\r\n\t\t\tglobal $ks_db;\r\n\t\t\tglobal $ks_log;\r\n\r\n\t\t\t$ks_db->beginTransaction ();\r\n\t\t\t\r\n\t\t\t$arrBindings = array ();\r\n\t\t\t$insertCols = '';\r\n\t\t\t$insertVals = '';\r\n\t\t\t\r\n\t\t\tif (isset ( $this->userid )) {\r\n\t\t\t\t$insertCols .= \"lp_userid, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->userid;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->random )) {\r\n\t\t\t\t$insertCols .= \"lp_random, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->random;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->deadline )) {\r\n\t\t\t\t$insertCols .= \"lp_deadline, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->deadline;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//remove trailing commas\r\n\t\t\t$insertCols = preg_replace(\"/, $/\", \"\", $insertCols);\r\n\t\t\t$insertVals = preg_replace(\"/, $/\", \"\", $insertVals);\r\n\t\t\t\r\n\t\t\t$sql = \"INSERT INTO $this->sqlTable ($insertCols)\";\r\n\t\t\t$sql .= \" VALUES ($insertVals)\";\r\n\t\t\t\r\n\t\t\t$ks_db->query ( $sql, $arrBindings );\r\n\r\n\t\t\t//set the id property\r\n\t\t\t$this->id = $ks_db->lastInsertId();\r\n\t\t\t\r\n\t\t\t$ks_db->commit ();\r\n\t\t\t\r\n\t\t} catch(Exception $e) {\r\n\t\t\t$ks_db->rollBack ();\r\n\t\t\t$ks_log->info ( 'Fatal Error: ' . __CLASS__ . '::' . __METHOD__ . '. ' . $e->getMessage () );\r\n\t\t\t$ks_log->info ( '<br>SQL Statement: ' . $sql);\r\n\t\t\techo \"Fatal Error: \" . __CLASS__ . '::' . __METHOD__ . '. ' . $e->getMessage ();\r\n\t\t\techo \"SQL Statement: \" . $sql;\r\n\t\t}\r\n\t}", "public function insert() {\n $this->observer->idchangemoney = $this->connection->insert(\"ren_change_money\", array(\n \"`change`\" => $this->observer->change,\n \"`year`\" => $this->observer->year,\n \"`idmoney`\" => $this->observer->money->idmoney\n ), $this->user->iduser);\n }", "protected function _postInsert()\n\t{\n\t}", "public function insert($loyPrg);", "public function insert($data)\r\n {\r\n \r\n }", "function insert() {\n\t\t$sql = \"INSERT INTO lessons\n\t\t\t\tVALUES (?, ?, ?, ?, ?)\";\n\t\t\n\t\t$this->db->query($sql, array($this->lessons_id, $this->name, $this->date, $this->active, $this->rank));\n\t\t$this->last_insert_id = $this->db->insert_id();\t\t\n\t\t\n\t}", "public function insert(){\n\t\t$sql = new Sql();\n\t\t$results = $sql->select(\"CALL sp_insert_usuario(:LOGIN, :PASS)\", array(\n\t\t\t':LOGIN'=>$this->getDeslogin(),\n\t\t\t':PASS'=>$this->getDessenha()\n\t\t));\n\n\t\tif (isset($results[0])) {\n\t\t\t\n\t\t\t$this->setData($results[0]);\n\n\t\t}\n\t}", "protected function insert()\n\t{\n\t\t$this->autofill();\n\n\t\tparent::insert();\n\n\t}", "function insert() {\n\t \t$sql = \"INSERT INTO evs_database.evs_key_component (kcp_key_component_detail_en, kcp_key_component_detail_th, kcp_cpn_id)\n\t \t\t\tVALUES(?, ?, ?)\";\n\t\t \n\t \t$this->db->query($sql, array($this->kcp_key_component_detail_en, $this->kcp_key_component_detail_th, $this->kcp_cpn_id));\n\t\n\t }", "function inserir() {\n\t\t$this->sql = mysql_query(\"INSERT INTO suporte (user_cad, data_cad, id_regiao, exibicao, tipo, prioridade, assunto, mensagem, arquivo, status, status_reg,suporte_pagina)\n\t\t\t\t\t VALUES\t('$this->id_user_cad ','$this->data_cad','$this->id_regiao', '$this->exibicao', '$this->tipo','$this->prioridade', '$this->assunto', '$this->menssagem', '$this->tipo_arquivo','1','1','$this->pagina');\") or die(mysql_error());\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\n\t\t}", "public function insert() {\n \n }", "public function insert_into_table(){\n // VALUES ('$this->item_id', '$this->user_id', '$this->project_id', '$this->user2_id', '$this->post_id', '$this->type', '$this->activity', '$this->date_time')\";\n $query = \"INSERT INTO $this->table_name (item_id, user_id, project_id, user2_id, post_id, post_type, date_time) \n VALUES ('$this->item_id', '$this->user_id', '$this->project_id', '$this->user2_id', '$this->post_id', '$this->type', '$this->date_time')\";\n $result = mysql_query($query);\n\n $err = mysql_error();\n if($err){\n $file = 'errors.txt';\n file_put_contents($file, $err, FILE_APPEND | LOCK_EX);\n }\n }", "protected function _insert()\n {\n \t$metadata = $this->_table->info(Zend_Db_Table_Abstract::METADATA);\n \t\n \tif(isset($metadata['created_at']))\n\t\t\t$this->_data['created_at'] = new Zend_Date ();\n \tif(isset($metadata['updated_at']))\n\t\t\t$this->_data['updated_at'] = new Zend_Date ();\n }", "final public function save() {\n\t\t$table_id = $this::TABLE_ID;\n\t\tif (strlen ( $this->$table_id ) != 0) {\n\t\t\treturn $this->update ();\n\t\t}\n\t\t\n\t\tif ($this::USR_CREATE_ID != 'undefined') {\n\t\t\t$usrid = PwConnexion::getInstance ()->getUserId ();\n\t\t\t$colUsrId = $this::USR_CREATE_ID;\n\t\t\t$this->$colUsrId = $usrid;\n\t\t}\n\t\t\n\t\tif ($this::USR_CREATE_DATE != 'undefined') {\n\t\t\t$objDateTime = new DateTime ( 'NOW' );\n\t\t\t$colUsrDat = $this::USR_CREATE_DATE;\n\t\t\t$usrid = PwConnexion::getInstance ()->getUserId ();\n\t\t\t$this->$colUsrDat = $objDateTime->format ( \"Y-m-d H:i:s\" );\n\t\t}\n\t\t\n\t\t$this->$table_id = \"\";\n\t\t\n\t\t$row = $this->getSqlRow ();\n\t\t$k = 0;\n\t\t$filds = \"\";\n\t\tforeach ( $row as $key => $value ) {\n\t\t\tif ($k == 0)\n\t\t\t\t$sep = \" \";\n\t\t\telse\n\t\t\t\t$sep = \",\";\n\t\t\t$filds = $filds . $sep . $key;\n\t\t\t$k = 1;\n\t\t}\n\t\t$k = 0;\n\t\t$values = \"\";\n\t\tforeach ( $row as $key => $value ) {\n\t\t\tif ($k == 0)\n\t\t\t\t$sep = \" \";\n\t\t\telse\n\t\t\t\t$sep = \",\";\n\t\t\t$values = $values . $sep . \"'\" . $value . \"'\";\n\t\t\t$k = 1;\n\t\t}\n\t\t$cmd = \"insert into \" . $this::TABLE_NAME . \"(\" . $filds . \")values(\" . $values . \");\";\n\t\t$rid = \"\";\n\t\ttry {\n\t\t\t$stmt = PwPDO::getInstance ( PwPDO::DB_0 )->prepare ( $cmd );\n\t\t\t$stmt->execute ();\n\t\t\t$rid = PwPDO::getInstance ( PwPDO::DB_0 )->lastInsertId ();\n\t\t} catch ( Exception $e ) {\n\t\t\tPwDebug::debug ( $e->getMessage (), $cmd );\n\t\t\tPwDebug::debugInLogFile ( $e->getMessage () . \" \" . $cmd );\n\t\t\treturn 0;\n\t\t}\n\t\treturn PwPDO::getInstance ( PwPDO::DB_0 )->lastInsertId ();\n\t}", "public function insert() {\r\n\r\n\t\ttry {\r\n\t\t\tglobal $ks_db;\r\n\t\t\tglobal $ks_log;\r\n\r\n\t\t\t$ks_db->beginTransaction ();\r\n\r\n\t\t\t$arrBindings = array ();\r\n\t\t\t$insertCols = '';\r\n\t\t\t$insertVals = '';\r\n\t\t\t\t\r\n\t\t\tif (isset ( $this->title )) {\r\n\t\t\t\t$insertCols .= \"dsh_title, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->title;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->desc )) {\r\n\t\t\t\t$insertCols .= \"dsh_desc, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->desc;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->portlet )) {\r\n\t\t\t\t$insertCols .= \"dsh_portlet, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->portlet;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->hide )) {\r\n\t\t\t\t$insertCols .= \"dsh_hide, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->hide;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->createdBy )) {\r\n\t\t\t\t$insertCols .= \"dsh_created_by, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->createdBy;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->modifiedBy )) {\r\n\t\t\t\t$insertCols .= \"dsh_modified_by, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->modifiedBy;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->createdDate )) {\r\n\t\t\t\t$insertCols .= \"dsh_created_date, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->createdDate;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->modifiedDate )) {\r\n\t\t\t\t$insertCols .= \"dsh_modified_date, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->modifiedDate;\r\n\t\t\t}\r\n\r\n\t\t\t//remove trailing commas\r\n\t\t\t$insertCols = preg_replace(\"/, $/\", \"\", $insertCols);\r\n\t\t\t$insertVals = preg_replace(\"/, $/\", \"\", $insertVals);\r\n\r\n\t\t\t$sql = \"INSERT INTO $this->sqlTable ($insertCols)\";\r\n\t\t\t$sql .= \" VALUES ($insertVals)\";\r\n\r\n\t\t\t$ks_db->query ( $sql, $arrBindings );\r\n\r\n\t\t\t//set the auto-increment property, only if the primary column is auto-increment\r\n\t\t\t$this->id = $ks_db->lastInsertId();\r\n\r\n\t\t\t$ks_db->commit ();\r\n\r\n\t\t} catch(Exception $e) {\r\n\t\t\t$ks_db->rollBack ();\r\n\t\t\t$ks_log->info ( 'Fatal Error: ' . __METHOD__ . '. ' . $e->getMessage () );\r\n\t\t\t$ks_log->info ( '<br>SQL Statement: ' . $sql);\r\n\t\t\techo \"Fatal Error: \" . __METHOD__ . '. ' . $e->getMessage ();\r\n\t\t\techo \"SQL Statement: \" . $sql;\r\n\t\t}\r\n\t}", "function insert_table_r( $insert_data, $table ){\t\n\t\treturn $this->db->insert($table, $insert_data);\n\t}", "public function run() {\n\t\t\\DB::statement(\" INSERT INTO efectores.tipo_efector(id_tipo_efector,sigla,descripcion)\n(\n\tSELECT *\n\tFROM dblink('dbname=sirge host=192.6.0.118 user=postgres password=PN2012\\$',\n\t 'SELECT id_tipo_efector,sigla,descripcion\n\t\t FROM efectores.tipo_efector')\n\t AS migracion(id_tipo_efector integer,\n sigla character varying(4),\n descripcion character varying(50))\n);\");\n\t}", "public function input_data($data,$table){\n\t\t$this->db->insert($table,$data);\n\t}", "function insert() {\n\t\t$sql = \"INSERT INTO \".$this->hr_db.\".hr_person_detail (psd_ps_id, psd_dp_id, psd_tax_no, psd_id_card_no, psd_passport_no, psd_picture, psd_blood_id, psd_reli_id, psd_nation_id, psd_race_id, psd_psst_id, psd_birthdate, psd_birth_pv_id, psd_gd_id, psd_account_no, psd_ba_id, psd_facebook, psd_twitter, psd_website, psd_email, psd_cellphone, psd_phone, psd_ex_phone, psd_work_phone, psd_lodge_id, psd_lodge_no, psd_lodge_phone, psd_addcur_no, psd_addcur_pv_id, psd_addcur_amph_id, psd_addcur_dist_id, psd_addcur_zipcode, psd_addhome_no, psd_addhome_pv_id, psd_addhome_amph_id, psd_addhome_dist_id, psd_addhome_zipcode)\n\t\t\t\tVALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\";\n\t\t$this->hr->query($sql, array($this->psd_ps_id, $this->psd_dp_id, $this->psd_tax_no, $this->psd_id_card_no, $this->psd_passport_no, $this->psd_picture, $this->psd_blood_id, $this->psd_reli_id, $this->psd_nation_id, $this->psd_race_id, $this->psd_psst_id, $this->psd_birthdate, $this->psd_birth_pv_id, $this->psd_gd_id, $this->psd_account_no, $this->psd_ba_id, $this->psd_facebook, $this->psd_twitter, $this->psd_website, $this->psd_email, $this->psd_cellphone, $this->psd_phone, $this->psd_ex_phone, $this->psd_work_phone, $this->psd_lodge_id, $this->psd_lodge_no, $this->psd_lodge_phone, $this->psd_addcur_no, $this->psd_addcur_pv_id, $this->psd_addcur_amph_id, $this->psd_addcur_dist_id, $this->psd_addcur_zipcode, $this->psd_addhome_no, $this->psd_addhome_pv_id, $this->psd_addhome_amph_id, $this->psd_addhome_dist_id, $this->psd_addhome_zipcode));\n\t\t$this->last_insert_id = $this->hr->insert_id();\n\t}", "function insert() {\n\t\t$sql = \"INSERT INTO umgroup (GpID, GpNameT, GpNameE, GpDesc, GpStID)\n\t\t\t\tVALUES(?, ?, ?, ?, ?)\";\n\t\t\n\t\t \n\t\t$this->ums->query($sql, array($this->GpID, $this->GpNameT, $this->GpNameE, $this->GpDesc, $this->GpStID));\n\t\t$this->last_insert_id = $this->ums->insert_id();\n\t\t$this->last_insert_GpNameT = $this->GpNameT;\n\t\t//echo $this->last_insert_GpNameT;\n\t}", "private function addData ()\n {\n foreach ($this->data as $key=>$value)\n {\n $keys[] = $key;\n $values[] = $value;\n \n }\n $cols = implode($keys, \",\");\n $dataValues = \"'\".implode($values, \"','\").\"'\";\n $query = \"INSERT INTO `$this->tablename`($cols)VALUES($dataValues);\";\n \n $conn = $this->DB->conn;\n \n $sql = $conn->query($query);\n \n if($sql == TRUE) return TRUE;\n else \n {\n \n throw new Exception(\"Error : Data Not inserted to database :( \".$conn->error);\n \n }\n \n }", "public function insert()\n {\n $sql = new Sql();\n $result = $sql->select(\"CALL sp_usuario_insert(:LOGIN, :PASSWORD)\", array(\n \":LOGIN\"=>$this->getDeslogin(),\n \":PASSWORD\"=>$this->getDessenha()\n ));\n\n if(count($result) > 0){\n $row = $result[0];\n $this->setIdusuario($row['idusuario']);\n $this->setDeslogin($row['deslogin']);\n $this->setDessenha($row['dessenha']);\n $this->setDataCadastro(new DateTime($row['dataCadastro']));\n }\n }", "function insert() {\n\t\t$solic = json_decode($_POST['DATA']);\n\t\t$service = new CompraService();\n\t\tif($service->insert($solic))\n\t\t\thttp_response_code();\n\t\telse\n\t\t\thttp_response_code(500);\n\t}", "public function insert($gunBbl);", "public function add() \n { // metodo add, complementar\n $str = \"insert into \".self::$tablename.\"(nitHotel, idCiudad, nomHotel, dirHotel, telHotel1, telHotel2, correoHotel, tipoHotel, Administrador, idRedes, aforo, tipoHabitaciones, status)\";\n $str.= \" values ('$this->nitHotel', $this->idCiudad, '$this->nomHotel', '$this->dirHotel', '$this->telHotel1', '$this->telHotel2', '$this->correoHotel', $this->tipoHotel, '$this->Administrador', $this->idRedes, $this->aforo, $this->tipoHabitaciones, $this->status);\";\n }", "public function insert($tblUpdate);", "public function store()\n {\n $this->link = mysqli_connect(DBSERVER, DBUSER, DBPASS, DBNAME);\n foreach ($this->dataArray as $item)\n {\n //break up X-MRID field and convert array vals to integer\n $msgInfo = array_map('intval', explode('.',$item[23]));\n $deliv = strtotime($item[1]);\n $queued = strtotime($item[2]);\n if(isset($msgInfo[1]))\n {\n mysqli_query($this->link, \"INSERT INTO bounces (delivered, queued, recipient, dsnstatus, bouncereason, acctid, contactid, msgid, seqid) VALUES ('$deliv','$queued','$item[4]','$item[7]','$item[8]','$msgInfo[1]','$msgInfo[2]','$msgInfo[4]','$msgInfo[5]')\");\n }\n }\n }", "function insert ($conn , $table , $fields , $values) {\n\n\t\t$fields = implode(\",\", $fields) ;\n\t\t$values = implode(\"','\", $values) ;\n\n\t\t// insert querry\n\t\t$sql=\"INSERT INTO $table (id, $fields) VALUES ('', '$values')\" ;\n\t\t$result =mysql_query($sql ,$conn ) ;\n\n\n\t\tif (mysql_affected_rows()>0) {\n\t\t\treturn TRUE ;\n\n\t\t}\n\n\t\telse {\n\t\t\tdie(\"Error : \".mysql_error()) ;\n\t\t}\n\t}", "public function insert() {\n $conexion = StorianDB::connectDB();\n $insercion = \"INSERT INTO cuento (titulo, contenido, autor) VALUES (\\\"\".$this->titulo.\"\\\", \\\"\".$this->contenido.\"\\\", \\\"\".$this->autor.\"\\\")\";\n $conexion->exec($insercion);\n }", "public function run()\n {\n DB::table('t_tipousuario')->insert(\n \t['tusu_desc' => 'MP',],\n \t['tusu_desc' => 'UC',],\n \t['tusu_desc' => 'JD',],\n );\n }", "public function Do_insert_Example1(){\n\n\t}", "public function index_post()\n {\n $input = $this->input->post();\n $this->write_db->insert($_table,$input);\n \n $this->response(['Item created successfully.'], REST_Controller::HTTP_OK);\n }", "function post_log_ecoupon($tableName,$data) {\n $this->db->insert($tableName, $data);\n }", "public function run()\n {\n DB::table(\"brokers\")->insert([\n \n [\n \"name\"=> \"broker 1\",\n \"mobile_no\" => \"12345656\",\n \"person_id\"=>\"2\"\n ],\n [\n \"name\"=> \"broker 2\",\n \"mobile_no\"=>\"9876876\",\n \"person_id\"=>\"1\"\n ]\n \n ]);\n }", "protected function insert()\n\t{\n\t\t$query = $this->connection->prepare\n\t\t(\"\n\t\t\tinsert into\n\t\t\t\tBooth (BoothNum)\n\t\t\t\tvalues (?)\n\t\t\");\n\n\t\t$query->execute(array_values($this->fields));\n\n\t}", "protected function fijarSentenciaInsert(){}", "public function insert()\n {\n \n }", "abstract public function insert();", "public function run()\n {\n DB::table('studentts')->Insert([\n 'name' =>'Rahim',\n 'roll'=>122,\n 'phone_no'=>12345689,\n ]);\n }", "public function insert(){\n\t\tif(!mysql_query(\"INSERT INTO $this->tabla (nombre) VALUES ('$this->nombre')\")){\n\t\t\tthrow new Exception('Error insertando renglón');\n\t\t}\n\t}", "public function insert(){\n\n global $db;\n\n /** Insert sql query */\n $sql = \"INSERT INTO tbl_calculator (num1, num2, oper, answer)\n VALUES (\" . $this->num1 .\", \" . $this->num2 . \", '\" .$this->oper. \"', \" .$this->answer. \" )\";\n\n /** insert result maintain in log file */ \n error_log($sql);\n\n if ($db->query($sql) === TRUE) {\n error_log(\"New record created successfully\");\n } else {\n error_log(\"Error: \" . $sql . \"<br>\" . $db->error);\n }\n return;\n }", "public function insertDatabase();", "public function run()\n {\n DB::table('tbluspl')->insert([\n 'tblplancdgo' => 3,\n 'tblusrocdgo' => 2,\n 'tblusplflag' => 'A',\n 'tblusplfech' => '2021-09-07'\n ]);\n }", "public function insert_in_table(array $post) {\n\n $return = null;\n $k_res ='';\n $values = '';\n // store schema in variable $res\n $res = $this->get_schema();\n // shell $res and store in variable $values\n foreach ($res as $key => $val){\n $k_res .= $val[0].\",\";\n }\n\n // remove the last charcter in $keys\n $k_res = substr($k_res, 0, -1);\n // convert $k_res to array\n $exp_res = explode(\",\", $k_res);\n // chekc the diffirent\n $result = array_diff($exp_res, $post);\n\n for ($i= 0; $i < count($result); $i ++){\n\n if($res[$i][5] == 'auto_increment'){\n\n $values .= \"DEFAULT, \";\n }else if(isset($post[$result[$i]]) and $post[$result[$i]] == null){\n\n $values .= \"NULL,\";\n }else if(!isset($post[$result[$i]])){\n\n $values .= \"NULL,\";\n }else if($post[$result[$i]] == 'now'){\n\n $values .= \"NOW(),\";\n }else if($post[$result[$i]] == \"FALSE\"){\n\n $values .= \"FALSE,\";\n }else if($post[$result[$i]] == \"LAST_INSERT_ID\"){\n\n $values .= \"LAST_INSERT_ID(),\";\n }else if($post[$result[$i]] == \"TRUE\"){\n\n $values .= \"TRUE,\";\n }else if($result[$i] == 'date'){\n \n\n $values .= \"'\".strtotime($post[$result[$i]]).\"',\";\n \n\n }else if($result[$i] == 'password'){\n // check password with Tools\n $password = services\\Tools::check_password($post[$result[$i]]);\n if ($password != false){\n $values .= \"'\".$password.\"',\";\n }else {\n\n $return = \"Invalid Password\";\n }\n\n }else if($result[$i] == 'mail'){\n\n // check mail with Tools\n $mail = services\\Tools::check_mail($post[$result[$i]]);\n\n if ($mail != false){\n $values .= \"'\".$post[$result[$i]].\"',\";\n }else {\n\n $return = \"Invalid mail\";\n }\n\n }else if(strpos($post[$result[$i]], \",\") !== false){\n\n $vergule = str_replace(\",\", \"ù\", $post[$result[$i]]);\n $values .= \"'\".$vergule.\"',\";\n }else {\n\n $values .= \"'\".addslashes(htmlentities(trim($post[$result[$i]]))).\"',\";\n }\n }\n\n\n $values = substr($values, 0, -1);\n\n if(strpos($values, \"ù\") !== false){\n\n $values= str_replace(\"ù\", \",\", $values);\n }\n\n if($return == null){\n\n $sql = \"INSERT INTO \".$this->_table.\"(\".$k_res.\") VALUES(\".$values.\")\";\n\n //echo $sql; die();\n \n $res = $this->_pdo->exec($sql)or var_dump($this->_pdo->errorInfo());\n\n return $return;\n }else {\n\n return $return;\n }\n }", "public function insert()\n {\n }", "public function insert()\n {\n }", "public function insertMutile()\n\t{\n\t\t$this -> error();\n\t\tif(!is_array($this -> arrNewData) or count($this -> arrNewData) == 0)\n\t\tthrow new SystemException('Không tồn tại mảng dữ liệu để insert');\n\t\t$dbName = $this -> databaseName;\n\t\t$lasId = $dbName() -> insertMulti($this -> tableName, $this -> arrNewData);\n\t\treturn $lasId;\n\t}", "public function simpan_data_res($tabel, $data)\n {\n \t$this->db->insert($tabel, $data);\n }", "function Add($table,$values,$rediract){\n\t\t$insert = \"insert into $table values(Null,$values)\";\n\t\t$run = $this->connect->query($insert);\n\t\t\n\t\t\n\t\tif($run){\n\t\t\techo \"<script>location.href='$rediract=Added-Successfully';</script>\";\n\t\t}else {\n\t\t\techo \"<script>location.href='$rediract=Added-Error';</script>\";\n\t\t} // else close\n\t\t\n\t}", "public function insert(ParecerTrabalho $ParecerTrabalho) {\r\n $sql = \"INSERT INTO $this->table\"\r\n . \" (fk_revisor, datahora, status, fk_trabalho, seq,\"\r\n . \" status_introducao, status_objetivos,\"\r\n . \" status_metodologia, status_resultados, observacoes, observacoes_internas,\"\r\n . \" obs_introducao, obs_objetivos, obs_metodologia, obs_resultados) \"\r\n . \"VALUES\"\r\n . \" (:fkRevisor, :datahora, :status, :fkTrabalho, :seq,\"\r\n . \" :statusIntroducao, :statusObjetivos,\"\r\n . \" :statusMetodologia, :statusResultados, :observacoes, :observacoesInternas,\"\r\n . \" :obsIntroducao, :obsObjetivos, :obsMetodologia, :obsResultados)\";\r\n\r\n\r\n\r\n\r\n $fkRevisor = $ParecerTrabalho->getFkRevisor();\r\n $datahora = $ParecerTrabalho->getDatahora();\r\n $status = $ParecerTrabalho->getStatus();\r\n $fkTrabalho = $ParecerTrabalho->getFkTrabalho();\r\n $seq = $ParecerTrabalho->getSeq();\r\n $statusIntroducao = $ParecerTrabalho->getStatusIntroducao();\r\n $statusObjetivos = $ParecerTrabalho->getStatusObjetivos();\r\n $statusMetodologia = $ParecerTrabalho->getStatusMetodologia();\r\n $statusResultados = $ParecerTrabalho->getStatusResultados();\r\n $observacoes = $ParecerTrabalho->getObservacoes();\r\n $observacoesInternas = $ParecerTrabalho->getObservacoesInternas();\r\n $obsIntroducao = $ParecerTrabalho->getObsIntroducao();\r\n $obsObjetivos = $ParecerTrabalho->getObsObjetivos();\r\n $obsMetodologia = $ParecerTrabalho->getObsMetodologia();\r\n $obsResultados = $ParecerTrabalho->getObsResultados();\r\n\r\n $stmt = ConnectionFactory::prepare($sql);\r\n\r\n $stmt->bindParam(':fkRevisor', $fkRevisor);\r\n $stmt->bindParam(':datahora', $datahora);\r\n $stmt->bindParam(':status', $status);\r\n $stmt->bindParam(':fkTrabalho', $fkTrabalho);\r\n $stmt->bindParam(':seq', $seq);\r\n $stmt->bindParam(':statusIntroducao', $statusIntroducao);\r\n $stmt->bindParam(':statusObjetivos', $statusObjetivos);\r\n $stmt->bindParam(':statusMetodologia', $statusMetodologia);\r\n $stmt->bindParam(':statusResultados', $statusResultados);\r\n $stmt->bindParam(':observacoes', $observacoes);\r\n $stmt->bindParam(':observacoesInternas', $observacoesInternas);\r\n $stmt->bindParam(':obsIntroducao', $obsIntroducao);\r\n $stmt->bindParam(':obsObjetivos', $obsObjetivos);\r\n $stmt->bindParam(':obsMetodologia', $obsMetodologia);\r\n $stmt->bindParam(':obsResultados', $obsResultados);\r\n return $stmt->execute();\r\n }", "public function run()\n {\n //\n DB::table('Reservation')->insert([\n 'resSerial' => 1,\n 'periodSerial' => 1,\n 'isWeekday' => true,\n 'location' => 'Taipei',\n 'isOn' => true,\n 'date' => '2017-07-25',\n 'endDate' => '2017-07-26',\n 'remark' => 'Nothing',\n 'categorySerial' => 2\n ]);\n \n DB::table('DoctorAndReservation')->insert([\n 'resSerial' => 1,\n 'doctorID' => 1\n ]);\n }", "public function run()\n {\n $data =\t[\n \t['hotel_id' => 1,'room_id'=> 1],\n ];\n DB::table('hotel_rooms')->insert($data);\n }", "function insertData($table, $data){\n\t\t\n\t\tvalidate();\n\n\t\t$values = $cols = \"\";\n\n\t\tforeach ($data as $key => $value) {\n\t\t\t$cols .= \" \" . $key . \",\";\n\t\t\t$values .= \" \" . $value . \",\";\n\t\t}\n\n\t\t$cols = substr($cols, 0, strlen($cols) - 1);\n\t\t$values = substr($values, 0, strlen($values) - 1);\n\n\t\t$query = \"INSERT INTO $table ($cols) VALUES ($values)\";\n\n\t\t\n\t\ttry {\n\n\t\t\t$pdo = db_init();\n\n\t\t\t$pdo->exec($query);\n\n\t\t\treturn 1;\n\t\t} catch (PDOException $e) {\n\t\t\tlogging($_SERVER['PHP_SELF'] . \", 112, Error Insert Data:\". $e->getMessage() .\" ,\" . date(\"Y-m-d\") . \" \" . date(\"h:i:sa\"));\n\t\t\treturn;\n\t\t}\n\n\t}", "public abstract function insert();", "public function insert()\n {\n if(empty($this->attributes)){\n return;\n }\n if ($this->isAutoInc) {\n $columlList = \" (\";\n $valuelList = \" (\";\n foreach ($this->attributes as $column => $value) {\n $columlList .= $column . \", \";\n $valuelList .= \":\".$column . \", \";\n }\n $columlList = str_last_replace(\", \", \")\", $columlList);\n $valuelList = str_last_replace(\", \", \")\", $valuelList);\n $sqlQuery = \"INSERT INTO \" . $this->table . $columlList . \" VALUES\" . $valuelList;\n\n Db::instance()->execute($sqlQuery,$this->attributes);\n #println($sqlQuery, \"blue\");\n }\n }", "public function run()\n {\n //\n DB::table('qr')\n ->insert([\n 'value' =>'asdjasds',\n 'date_created'=> '2007-07-04'\n ]);\n }", "public static function add($entreprise){\n $con=new connexion();\n $resultat=$con->executeactualisation(\"insert into tblentreprise (id_entreprise,admin_id,nom,logo,ville_id,adresse_complete,etat,date_ajout,date_modifier)\n values('\" . $entreprise->ident . \"','\" . $entreprise->adminid . \"','\" . $entreprise->nom . \"','\" . $entreprise->logo . \"','\" . $entreprise->villeid . \"','\" . $entreprise->adressecomp . \"',1,NOW(),NOW())\");\n $con->closeconnexion();\n\n }", "private function _insert($data){\n \t\n \tif(isset($data['date_established'] )){\n \t\t$data['date_established'] = Application_Core_Utilities::ukDateToMysql($data['date_established']);\n \t}\n \t\n if($lastId = $this->insert($data)){\n return $lastId;\n }else{\n // Error\n Application_Core_Logger::log(\"Could not insert into table {$this->_name}\", 'Error');\n return false;\n } \t\n }", "public function insert($tables,$data){\n $this->db->insert($tables,$data);\n }", "public function insert($tables,$data){\n $this->db->insert($tables,$data);\n }", "public function insert($tables,$data){\n $this->db->insert($tables,$data);\n }", "public function run()\n {\n DB::table('enregistrement_sieges')->insert([\n 'num_enregistrement'=>2,\n 'num_siege'=>1,\n // 'id_siege' =>1,\n \n ]); \n\n\n\n \n }", "function insert($table,$data){\n\t\t$j=0;\n\t\t$c=count($data);\n\t\tforeach($data as $key=>$value){\n\t\t\t$j++;\n\t\t\tif($c==$j){\n\t\t\t\t$line_1.='`'.$key.'`';\n\t\t\t\t$line_2.=\"'\".rce_remove_quotes(mysql_real_escape_string($value)).\"'\";\n\t\t\t} else {\n\t\t\t\t$line_1.='`'.$key.'`, ';\n\t\t\t\t$line_2.=\"'\".rce_remove_quotes(mysql_real_escape_string($value)).\"', \";\n\t\t\t}\n\t\t}\n\t\t$r=mysql_query(\"\n\t\t\tINSERT INTO `$table`\n\t\t\t(\".$line_1.\") VALUES\n\t\t\t(\".$line_2.\")\n\t\t\");\n\t\treturn $r;\n\t}", "function insertarClientereferentes($refclientes,$refreferentes) {\r\n$sql = \"insert into dbclientereferentes(idclientereferente,refclientes,refreferentes)\r\nvalues ('',\".$refclientes.\",\".$refreferentes.\")\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}", "private function insertStatement() {\n $altitude = empty($_POST['alt']) ? null : $_POST['alt'];\n $latitude = empty($_POST['lat']) ? null : $_POST['lat'];\n $longitude = empty($_POST['lon']) ? null : $_POST['lon'];\n\n $date_fallback = empty($_SERVER[\"REQUEST_TIME\"]) ? time() : $_SERVER[\"REQUEST_TIME\"];\n\n $date = empty($_POST['date']) ? $date_fallback : $_POST['date'];\n\n\n $status_table = TABLE_PREFIX.\"status\";\n $insert_stmt = $this->db_connection->prepare(\"INSERT INTO \"\n\t\t\t\t\t\t . $status_table\n\t\t\t\t\t\t . \" (message,ip,date,lon,lat,alt) VALUES (?,?,?,?,?,?)\");\n\n $insert_stmt->bind_param(\"ssiddd\",\n\t\t\t $_POST[\"message\"], \n\t\t\t $_SERVER['REMOTE_ADDR'], \n\t\t\t $date,\n\t\t\t $longitude,\n\t\t\t $latitude,\n\t\t\t $altitude );\n $insert_stmt->execute();\n\n $rows_inserted = $insert_stmt->affected_rows;\n\n if ( $rows_inserted ) {\n $this->log($rows_inserted.\" rows inserted\");\n return true;\n }\n else{\n $this->log(\"Insert error, 0 rows inserted\");\n return false;\n }\n \n }", "public function insert_data( $data,$table)\n {\n \n $this->db->insert('sewa',$data);\n \n }", "public function insertData($table, $data){// method inserData body start\n\t\t$fields \t\t\t= array_keys( $data );\n\t\t//$values \t\t\t= array_map( \"mysql_real_escape_string\", array_values( $data ) );\n\t\t$values \t\t\t= array_values( $data );\n\t\t$query \t\t\t\t= \"INSERT INTO $table(\".implode(\",\",$fields).\") VALUES ('\".implode(\"','\", $values ).\"');\";\n\t\t$execute \t\t\t= $this->query($query);\n\t\t\n\t}", "private function insertNew() {\n $sth=NULL;\n $array=array();\n $query=\"INSERT INTO table_spectacles (libelle) VALUES (?)\";\n $sth=$this->dbh->prepare($query);\n $array=array($this->libelle);\n $sth->execute($array);\n $this->message=\"\\\"\".$this->getLibelle().\"\\\" enregistré !\";\n $this->blank();\n $this->test=1;\n }", "function insert($sql){\n\n\t\tglobal $way;\n\t\t$way -> query($sql);\n\n\t}", "public function run()\n {\n DB::table('entrevistas')->insert([\n [ \n 'presentacion' => 'excelente', \n 'inteligencia' => 'excelente', \n 'formacion' => 'excelente', \n 'experiencia' => 'excelente', \n 'facilidad_expresion' => 'excelente', \n 'habilidad' => 'excelente', \n 'otros' => 'excelente',\n 'observaciones' => 'Persona apta para el cargo',\n 'aspirante_id' => 5\n ]\n \n ]);\n\n }", "function insert_record()\n\t{\n\t $dbname=$this->dbname;\n\t $DB1=$this->__connect($dbname,$this->table_name);\n $fields_data=$this->__list_fields_data($dbname,$this->table_name);\n // echo_array($fields_data);\n $index=$this->_get_primary($fields_data);\n //echo $index;\n //echo_array($_POST);\n \n \n //since we are coming from a form there\n //are $_POST values\n foreach ($fields_data->name as $key=>$value)\n {\n $data[$value['name']]=$_POST[$value['name']];\n }\n\n //needs checking if a FOREIGN FIELD\n //insert into database \n $this->db->insert($this->table_name, $data);\n\n $keys=(array_keys($data));\n $values=(array_values($data));\n\n //prepare some data for the form controls\n //in this case the Tdataset control\n \n $i=0;\n $num_fields=count($keys);\n for ($i=0;$i<$num_fields;$i++){\n $this->table->add_row($keys[$i],$values[$i]);\n }\n $this->table->set_heading('field','Value');\n $this->table->set_caption('Insert');\n $this->table->set_template($this->tmpl);\n $s=$this->table->generate();\n $s.='<a href=\"http://localhost/CodeIgniter/admin/dbutil/browse/'.$dbname.'/'.$this->table_name.'\">Click to Edit More</a>';\n return $s;\n\t}", "public function insert($cbtSoalSiswa);", "function insertData($INmodel,$INmanu,$INversion,$INprice)\n\t{\n\t\t//Get data for SQL\n\t\t$lines = file('/home/int322_161a19/secret/topsecret');\n\t\t$j=0;\n\t\t$host = trim($lines[$j++]);\n\t\t$user = trim($lines[$j++]);\n\t\t$pass = trim($lines[$j++]);\n\t\t$dbnm = trim($lines[$j++]);\n\n\t\t//Establish connection\n\t\t$conn = mysqli_connect($host,$user,$pass,$dbnm) or die('Error connecting to database: ' . mysqli_error($conn));\n\n\t\t//Execute command and make sure it worked\n\t\t$sqlCmd = 'INSERT INTO phones SET model=\"' . trim($INmodel) . '\",manu=\"' . trim($INmanu) . '\",version=\"' . trim($INversion) . '\",price=' . trim($INprice);\n\t\t//echo $sqlCmd . \"<br>\";\n\t\tmysqli_query($conn,$sqlCmd) or die('Error2: ' . mysqli_error($conn));\n\n\t\t//Close connection\n\t\tmysqli_close($conn);\n\t}", "public function run()\n {\n DB::table('entreprise')->insert([\n 'telephone' => '+41796493240',\n 'telephone_format' => '+41 79 649 32 40',\n 'email' => '[email protected]',\n 'site_web' => 'http://redcloud.com',\n 'adresse' => 'Avenue de Châtelaine 95B 1219 Châtelaine',\n 'adresse_latitude' => '46.210924679116914',\n 'adresse_longitude' => '6.108729515582613',\n ]);\n }", "public function insert() {\n\t$stmt = $this->_database->prepare('INSERT INTO planetterrains (planetid, terrainid, x, y) VALUES (?, ?, ?, ?)');\n\t$stmt->bind_param('iiii', $this->planetid, $this->terrainid, $this->x, $this->y);\n\t$stmt->execute();\n\t$this->refid = $this->_database->insert_id;\n\tif (\\is_array($this->deposit) && \\count($this->deposit) > 0) {\n\t $this->deposit[$this->refid]->terrainid = $this->refid;\n\t $this->deposit[$this->refid]->commit();\n\t}\n\telse if (!\\is_array($this->deposit)) {\n\t $this->deposit->terrainid = $this->refid;\n\t $this->deposit->commit();\n\t}\n }", "protected function insertRow()\n { \n $assignedValues = $this->getAssignedValues();\n\n $columns = implode(', ', $assignedValues['columns']);\n $values = '\\''.implode('\\', \\'', $assignedValues['values']).'\\'';\n\n $tableName = $this->getTableName($this->className);\n\n $connection = Connection::connect();\n\n $insert = $connection->prepare('insert into '.$tableName.'('.$columns.') values ('.$values.')');\n var_dump($insert);\n if ($insert->execute()) { \n return 'Row inserted successfully'; \n } else { \n var_dump($insert->errorInfo()); \n } \n }", "function input_data($data,$table){\n\t\t$this->db->insert($table,$data);//menginputkan data ke database dengan function input_data\n }", "function insert() {\n\t\t$insert = \"INSERT INTO servicios(nombre_servicio, estado_servicio, descripcion, trabajador_id, fecha_creacion,fecha_modificacion , cliente_id, sucursal_id) VALUES(\n\t\t\t\t\n\t\t\t\t'\".$this->nombre_servicio.\"',\n\t\t\t\t'\".$this->estado_servicio.\"',\n\t\t\t\t'\".$this->descripcion.\"',\n\t\t\t\t'\".$this->trabajador_id.\"',\n\t\t\t\t'\".$this->fecha_creacion.\"',\n\t\t\t\t'\".$this->fecha_modificacion.\"',\n\t\t\t\t'\".$this->cliente_id.\"',\n\t\t\t\t'\".$this->sucursal_id.\"');\";\n\t\t\n\t\treturn $insert;\n\t\n\t}", "public function run()\n {\n DB::table('kamar_operasi')->insert(array(\n array('no_kamar'=>'Operasi-001'),\n array('no_kamar'=>'Operasi-002')\n ));\n }", "public function insert() {\n\t\t$this->insert_user();\n\t}", "public function insert() {\n $this->data['creation_datetime']=date('Y-m-d H:i:s');\n $this->data['last_login_datetime']=date('Y-m-d H:i:s');\n if (array_key_exists('expiresIn', $this->rawData) && $this->rawData['expiresIn'] != '') {\n $this->data['expires_datetime']=date('Y-m-d H:i:s', time()+$this->rawData['expiresIn']); \n }\n parent::insert();\n }", "public function insert(){\n $bd = Database::getInstance();\n $bd->query(\"INSERT INTO canciones(artista, ncancion, idGen, album) VALUES (:art, :nca, :gen, :alb);\",\n [\":art\"=>$this->artista,\n \":gen\"=>$this->idGen,\n \":alb\"=>$this->album,\n \":nca\"=>$this->ncancion]);\n }" ]
[ "0.68720526", "0.67463297", "0.666738", "0.66516954", "0.6616517", "0.6610559", "0.6610559", "0.66015697", "0.65938115", "0.6592126", "0.6583289", "0.6551124", "0.6535201", "0.6532391", "0.651624", "0.6515524", "0.64794433", "0.6460832", "0.64591444", "0.64588803", "0.6455881", "0.64547664", "0.64409417", "0.6378811", "0.6377762", "0.63674", "0.63660854", "0.633377", "0.6325377", "0.63194275", "0.6308393", "0.63079476", "0.62976867", "0.62850666", "0.62802637", "0.62660307", "0.6257927", "0.62574506", "0.62521654", "0.624082", "0.6238237", "0.62269443", "0.6226249", "0.6218531", "0.6204665", "0.6201566", "0.6201299", "0.6199727", "0.61973405", "0.6195813", "0.6194238", "0.61887395", "0.61876446", "0.61850554", "0.6180635", "0.61777693", "0.61774087", "0.61746037", "0.6174505", "0.61743885", "0.6172525", "0.6170321", "0.61669976", "0.61669976", "0.61651486", "0.61479723", "0.61457247", "0.61398673", "0.6138624", "0.61352783", "0.6129811", "0.61283803", "0.6122197", "0.6113932", "0.6108004", "0.6106779", "0.61031413", "0.61031413", "0.61031413", "0.61002636", "0.60972977", "0.60915524", "0.6083065", "0.6081767", "0.6075855", "0.6071242", "0.60680026", "0.60648465", "0.60642594", "0.6062478", "0.60605836", "0.6059061", "0.605128", "0.6044672", "0.60361934", "0.6035406", "0.6032664", "0.60312504", "0.6029299", "0.6025768" ]
0.61033493
76
Generate a random number using a randomly generated seed.
public function generateRandomNumber(int $min = 1, int $max = 1000): int { $seed = mt_rand(); mt_srand($seed); $randomNumbers = array(); for ($i = 0; $i < 10; $i++) { $randomNumbers[] = mt_rand($min, $max); } $selectedNumberIndex = array_rand($randomNumbers); return $randomNumbers[$selectedNumberIndex]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function seedRand() {\r\n\t\tsrand((int)((($m=microtime(true))-((int)$m))*pow(10,(int)log10(PHP_INT_MAX)))); \r\n\t}", "function generate($generator, $seed = 10) {\n mt_srand($seed);\n return Eris\\Sample::of($generator, 'mt_rand')->repeat(1)->collected()[0];\n}", "public function seed($seed = null)\n { \n if($seed === null) {\n $seed = 0;\n }\n \n return $this->seed = abs(intval($seed)) % 9999999 + 1; \n }", "public function seedRandomGenerator($seed = null);", "public static function getRandomNumber() {\n return rand(10, 10000000);\n }", "function make_seed()\n{\n\tlist($usec, $sec) = explode(' ', microtime());\n\treturn (float) $sec + ((float) $usec * 100000);\n}", "function getRandomNumber() {\n return rand(0, 0x7fffffff);\n }", "function make_seed() {\n // explode microtime to 2 value\n list($usec, $sec) = explode(\" \",microtime());\n return (float)$usec * 100000 + (float)$sec;\n}", "public function compileRandom($seed): string\n {\n return 'RANDOM()';\n }", "function rand_num() {\n\t\t\t\t\n\t\t\t\t$r = rand(1000000, 9999999);\n\t\t\t\treturn $r;\n\t\t\t\n\t\t\t}", "public static function makeSeed()\n\t{\n\t\tlist( $usec, $sec ) = explode( ' ', microtime() );\n\t\treturn (float)$sec + ( (float)$usec * 100000 );\n\t}", "function generateRandomNumber() {\n return chr(mt_rand(48, 57));\n }", "private function makeSeed()\r\n {\r\n list($usec, $sec) = explode(' ', microtime());\r\n return (float) $sec + ((float) $usec * 100000);\r\n }", "private function makeSeed() {\r\n\t\t\tlist($usec, $sec) = explode(' ', microtime());\r\n\t\t\treturn (float) $sec + ((float) $usec * 100000);\r\n\t\t}", "private function getSeed()\n {\n if (!isset($this->seed)) {\n $this->seed = substr(md5(microtime()), 0, 5);\n }\n return $this->seed;\n }", "function SM_randomint($max) {\n static $startseed = 0; \n if (!$startseed) {\n $startseed = (double)microtime()*getrandmax(); \n srand($startseed); \n }\n return(rand()%$max); \n}", "function dss_rand()\n{\n\tglobal $db, $board_config, $dss_seeded;\n\n\t$val = $board_config['rand_seed'] . microtime();\n\t$val = md5($val);\n\t$board_config['rand_seed'] = md5($board_config['rand_seed'] . $val . 'a');\n \n\tif($dss_seeded !== true)\n\t{\n\t\t$sql = \"UPDATE \" . CONFIG_TABLE . \" SET\n\t\t\tconfig_value = '\" . $board_config['rand_seed'] . \"'\n\t\t\tWHERE config_name = 'rand_seed'\";\n\t\t\n\t\tif( !$db->sql_query($sql) )\n\t\t{\n\t\t\tmessage_die(GENERAL_ERROR, \"Unable to reseed PRNG\", \"\", __LINE__, __FILE__, $sql);\n\t\t}\n\n\t\t$dss_seeded = true;\n\t}\n\n\treturn substr($val, 4, 16);\n}", "public function random(): int\n {\n return rand(1, 100);\n }", "function sample($generator, $times, $seed = 10) {\n mt_srand($seed);\n return Eris\\Sample::of($generator, 'mt_rand')->repeat($times)->collected();\n}", "function generate_random_number($start, $end, $flag){\r\n\tglobal $g_var;\r\n\tsrand((double)microtime()*1000000);\r\n\t$random = (rand($start,$end));\r\n\t\r\n\treturn $random;\r\n}", "function generateId($seed = '')\n {\n return Util::uriB64Encode(pack('H*', sha1(uniqid(mt_rand(), true) . $seed . (isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : ''))));\n }", "public static function getRandomValue()\n {\n preg_match('/0.([0-9]+) ([0-9]+)/', microtime(), $regs);\n return $regs[2].$regs[1].sprintf('%03d', rand(0, 999));\n }", "public static function generateID()\n {\n return mt_rand();\n }", "public static function random () {\n\t\treturn mt_rand() / mt_getrandmax();\n\t}", "public function getRandomInt()\n {\n return random_int(0, 1);\n }", "private function fetchSeed(): int\n {\n $seed = \\getenv('PHPUNIT_SEED');\n\n if (!$seed) {\n try {\n $seed = \\random_int(1, 9999);\n } catch (\\Exception $e) {\n $seed = 1;\n }\n }\n\n return (int)$seed;\n }", "public function getSeed();", "function random(){\n $randomnummer = rand(1,6);\n return $randomnummer;\n}", "function randomId(): int\n{\n // Don't ask why I chose this number.\n return random_int(0, 4294967295);\n}", "function gen_rand_id()\n\t{\n\t\treturn ( time() + rand( rand(10000,50000), rand(50000,99000) ) );\n\t}", "function generateNumber()\n {\n \t/*\n $random_number = 0;\n $digits = 0;\n \n while($digits < $digits_quantity)\n {\n $rand_max .= \"9\";\n $digits++;\n }\n \n mt_srand((double) microtime() * 1000000); \n $random_number = mt_rand($zero, intval($rand_max));\n \n if($string)\n {\n if(strlen(strval($random_number)) < $digits_quantity)\n {\n $zeros_quantity = $digits_quantity - strlen(strval($random_number));\n $digits = 0;\n while($digits < $zeros_quantity)\n {\n $str_zeros .= \"0\";\n $digits++;\n }\n $random_number = $str_zeros . $random_number;\n }\n }\n return '7'.$random_number;\n */\n \t//$random_number = intval( \"0\" . rand(1,9) . rand(0,9) . rand(0,9) . rand(0,9) . rand(0,9) );\n \t//$n=5;\n \t//$random_number = rand(0, pow(10, $n));\n \t$lenth=5;\n\t $aZ09 = array_merge(range('A', 'Z'), range('a', 'z'),range(0, 9));\n\t $random_number ='';\n\t for($c=0;$c < $lenth;$c++) {\n\t $random_number .= $aZ09[mt_rand(0,count($aZ09)-1)];\n\t }\n \n\t\treturn $random_number;\n }", "public function userSeedRuin()\n {\n return $this->randInt(9);\n }", "public function random();", "public function randomize()\n {\n return mt_rand(1, $this->maxnumber());\n }", "private static function getRandomNumber()\n {\n if (defined('PHP_WINDOWS_VERSION_BUILD') && version_compare(PHP_VERSION, '5.3.4', '<')) {\n $useOpenSsl = false;\n } elseif (!function_exists('openssl_random_pseudo_bytes')) {\n $useOpenSsl = false;\n } else {\n $useOpenSsl = true;\n }\n\n $nbBytes = 32;\n\n if ($useOpenSsl) {\n $bytes = openssl_random_pseudo_bytes($nbBytes, $strong);\n\n if (false !== $bytes && true === $strong) {\n return $bytes;\n }\n }\n\n return hash('sha256', uniqid(mt_rand(), true), true);\n }", "public function getRandomSeed($length = 0)\n {\n $length = $length ?: $this->rand_length;\n srand((double)microtime() * 1000000);\n $result = \"\";\n while (strlen($result) < $length) {\n $result = $result . $this->dec2base(rand());\n }\n $result = substr($result, 0, $length);\n //echo $this->base2dec($result).\"\\n\\n\";\n\n return $result;\n }", "public function seed();", "function ran()\r\n\t{\r\n\t\tsrand((double)microtime()*1000000^getmypid());\r\n\t}", "private static function getRandomReferenceNumber()\n {\n return sprintf('%02X', mt_rand(0, 0xFF));\n }", "private static function genKey($seed=null) {\r\n\t\tself::seedRand();\r\n\t\t\r\n\t\t$randomness = get_loaded_extensions(); // get an array of the loaded extentions\r\n\t\t$randomness[] = php_uname(); // Get the UNAME of this php install\r\n\t\t$randomness[] = memory_get_usage(); // get the mem usage\r\n\t\t$randomness = implode(rand(), $randomness); // Implode the array with a random integer\r\n\t\t\r\n\t\t$random_key = (!is_null($seed)?hash_hmac('sha256', $randomness, $seed):hash('sha256', $randomness)); // Make a realy, highly entropic key\r\n\t\t\r\n\t\t$seq_key = mcrypt_encrypt( // Generate the Sequance key\r\n\t\t\tself::cpy_aes256, // Using RIJNDAEL_256\r\n\t\t\tsubstr($random_key, 0, mcrypt_get_key_size(self::cpy_aes256, self::mod_ecb)), // Trim the key to fit\r\n\t\t\tmicrotime(), // Feed in microtime()\r\n\t\t\tself::mod_ecb, // Useing ECB mode\r\n\t\t\tself::genNullIV(self::cpy_aes256, self::mod_ecb) // Give it a null IV\r\n\t\t);\r\n\t\t\r\n\t\treturn bin2hex($seq_key); // convert the binary expression to hexidecimal and then return it\r\n\t}", "function generateRandID(){\n \t\treturn md5(generateRandStr(16));\n \t\t}", "public function generateCodigo()\n {\n $this->codigo = random_int(1000000,9999999);\n }", "public static function generateSellInValue(): int\n {\n return rand(self::DEADLINE, 99);\n }", "function random_numbers($ms) {\n\t\t\t\t\n\t\t\t\t$n = rand(0, $ms);\n\t\t\t\t\n\t\t\t\treturn $n;\n\t\t\t\t\n\t\t\t}", "private function frand()\n {\n return 0.0001 * mt_rand(0, 9999);\n }", "function crypt_random($min = 0, $max = 0x7FFFFFFF)\r\n{\r\n if ($min == $max) {\r\n return $min;\r\n }\r\n\r\n // see http://en.wikipedia.org/wiki//dev/random\r\n static $urandom = true;\r\n if ($urandom === true) {\r\n // Warning's will be output unles the error suppression operator is used. Errors such as\r\n // \"open_basedir restriction in effect\", \"Permission denied\", \"No such file or directory\", etc.\r\n $urandom = @fopen('/dev/urandom', 'rb');\r\n }\r\n if (!is_bool($urandom)) {\r\n extract(unpack('Nrandom', fread($urandom, 4)));\r\n\r\n // say $min = 0 and $max = 3. if we didn't do abs() then we could have stuff like this:\r\n // -4 % 3 + 0 = -1, even though -1 < $min\r\n return abs($random) % ($max - $min) + $min;\r\n }\r\n\r\n /* Prior to PHP 4.2.0, mt_srand() had to be called before mt_rand() could be called.\r\n Prior to PHP 5.2.6, mt_rand()'s automatic seeding was subpar, as elaborated here:\r\n\r\n http://www.suspekt.org/2008/08/17/mt_srand-and-not-so-random-numbers/\r\n\r\n The seeding routine is pretty much ripped from PHP's own internal GENERATE_SEED() macro:\r\n\r\n http://svn.php.net/viewvc/php/php-src/branches/PHP_5_3_2/ext/standard/php_rand.h?view=markup */\r\n if (version_compare(PHP_VERSION, '5.2.5', '<=')) {\r\n static $seeded;\r\n if (!isset($seeded)) {\r\n $seeded = true;\r\n mt_srand(fmod(time() * getmypid(), 0x7FFFFFFF) ^ fmod(1000000 * lcg_value(), 0x7FFFFFFF));\r\n }\r\n }\r\n\r\n static $crypto;\r\n\r\n // The CSPRNG's Yarrow and Fortuna periodically reseed. This function can be reseeded by hitting F5\r\n // in the browser and reloading the page.\r\n\r\n if (!isset($crypto)) {\r\n $key = $iv = '';\r\n for ($i = 0; $i < 8; $i++) {\r\n $key.= pack('n', mt_rand(0, 0xFFFF));\r\n $iv .= pack('n', mt_rand(0, 0xFFFF));\r\n }\r\n switch (true) {\r\n case class_exists('Crypt_AES'):\r\n $crypto = new Crypt_AES(CRYPT_AES_MODE_CTR);\r\n break;\r\n case class_exists('Crypt_TripleDES'):\r\n $crypto = new Crypt_TripleDES(CRYPT_DES_MODE_CTR);\r\n break;\r\n case class_exists('Crypt_DES'):\r\n $crypto = new Crypt_DES(CRYPT_DES_MODE_CTR);\r\n break;\r\n case class_exists('Crypt_RC4'):\r\n $crypto = new Crypt_RC4();\r\n break;\r\n default:\r\n extract(unpack('Nrandom', pack('H*', sha1(mt_rand(0, 0x7FFFFFFF)))));\r\n return abs($random) % ($max - $min) + $min;\r\n }\r\n $crypto->setKey($key);\r\n $crypto->setIV($iv);\r\n $crypto->enableContinuousBuffer();\r\n }\r\n\r\n extract(unpack('Nrandom', $crypto->encrypt(\"\\0\\0\\0\\0\")));\r\n return abs($random) % ($max - $min) + $min;\r\n}", "private function getSequence() {\n srand(time());\n return rand(1, 1000);\n }", "protected function generate()\n {\n\t\t$this->value = md5(uniqid(rand(), true));\n }", "protected static function number ()\n {\n $range = static::getRange();\n\n $number = $range[mt_rand(0, count($range) - 1)];\n\n return $number;\n }", "function generateRandID(){\r\n \t\treturn md5(generateRandStr(16));\r\n \t\t}", "private function genCode()\r\n\t{\r\n\t\t$digits = 10;\r\n\t\treturn rand(pow(10, $digits-1), pow(10, $digits)-1);\r\n\t}", "public function random(?int $number = null): self;", "public static function random()\n {\n return '#' . str_pad(dechex(mt_rand(0, 0xFFFFFF)), 6, '0', STR_PAD_LEFT);\n }", "protected function generateRandomId(){\n return Keygen::numeric(7)->prefix(mt_rand(1, 9))->generate(true);\n}", "protected function seed()\n {\n return date('c');\n }", "public function findRandom();", "function generateRandomPostcode() {\n return sprintf(\"%06d\", rand(0, 999999));\n}", "private static function genRandomKey($seed=null) {\r\n\t\t$keys = array(); // array of keys that will be picked\r\n\t\t$len = 0; // the legnth of the key\r\n\t\t$final = ''; // The final string that will be assembilled\r\n\t\t\r\n\t\tfor ($i=0; $i<10; ++$i) // Loop through and assign 10 keys\r\n\t\t\t$keys[$i] = self::genKey($seed);\r\n\t\t\r\n\t\t$len = strlen($keys[0]); // Determine the legnth of the key\r\n\t\t\r\n\t\tfor ($i=0; $i<$len; ++$i) // Loop through the keys\r\n\t\t\t$final .= $keys[rand(0, 9)][$i]; // Select a charictor from a random key and append it to the return string\r\n\t\t\r\n\t\treturn $final; // Return it\r\n\t}", "public function generateRandID() {\n return md5($this->generateRandStr(16));\n }", "function GenerateKey() {\n // deterministic; see base.js.\n return rand();\n}", "function generate_mailkey(){\r\n $rseed=date(\"U\")%1000000;\r\n srand($rseed);\r\n $mailkey=md5(rand(10000,10000000));\r\n return $mailkey;\r\n}", "function randomise() {\n list($usec, $sec) = explode(' ', microtime());\n return (float) $sec + ((float) $usec * 100000);\n}", "protected function getID()\n {\n return rand();\n }", "function randomNum($length){\n $rangeMin = pow(36, $length-1);\n $rangeMax = pow(36, $length)-1;\n $base10Rand = mt_rand($rangeMin, $rangeMax);\n $newRand = base_convert($base10Rand, 10, 36);\n return $newRand;\n}", "private function getRandomCartNumber()\n\t{\n\t\t$number = md5(uniqid(mt_rand(), true));\n\n\t\t$order = craft()->commerce_orders->getOrderByNumber($number);\n\t\t// Make sure not duplicate number\n\t\tif ($order)\n\t\t{\n\t\t\treturn $this->getRandomCartNumber();\n\t\t}\n\n\t\treturn $number;\n\t}", "function generate_code( $digits_needed=8 ){\n\t$random_number=''; // set up a blank string\n\t$count=0;\n\twhile ( $count < $digits_needed ) {\n\t\t$random_digit = mt_rand(0, 9);\n\t\t$random_number .= $random_digit;\n\t\t$count++;\n\t}\n\treturn $random_number;\n}", "function randUntil(Num &$n) { # :: (Num, Num) -> Int\n return new Num\\Int(rand($this->value, $$n->value));\n }", "public function seed()\n {\n return $this->seed;\n }", "function random( $min = 0, $max = 0 ) {\n\tglobal $rnd_value;\n\n\t// Reset $rnd_value after 14 uses\n\t// 32(md5) + 40(sha1) + 40(sha1) / 8 = 14 random numbers from $rnd_value\n\tif ( strlen($rnd_value) < 8 ) {\n\t\tstatic $seed = 'jimmy';\n\t\t$rnd_value = md5( uniqid(microtime() . mt_rand(), true ) . $seed );\n\t\t$rnd_value .= sha1($rnd_value);\n\t\t$rnd_value .= sha1($rnd_value . $seed);\n\t\t$seed = md5($seed . $rnd_value);\n\t}\n\n\t// Take the first 8 digits for our value\n\t$value = substr($rnd_value, 0, 8);\n\n\t// Strip the first eight, leaving the remainder for the next call to wp_rand().\n\t$rnd_value = substr($rnd_value, 8);\n\n\t$value = abs(hexdec($value));\n\n\t// Reduce the value to be within the min - max range\n\t// 4294967295 = 0xffffffff = max random number\n\tif ( $max != 0 )\n\t\t$value = $min + (($max - $min + 1) * ($value / (4294967295 + 1)));\n\n\treturn abs(intval($value));\n}", "function random($max) {\r\n\t// create random number between 0 and $max\r\n\tsrand((double)microtime() * 1000000);\r\n\t$r = round(rand(0, $max));\r\n\tif ($r!=0) $r=$r-1;\r\n\treturn $r;\r\n}", "public function createRandInt(){\n\n $new = '';\n srand((double)microtime() * 1000000);\n $char_list = \"1234567890\";\n\n for ($i = 0; $i < 8; $i++) {\n\n $new .= substr($char_list, (rand() % (strlen($char_list))), 1);\n\n }\n\n return $new;\n\n }", "public static function random() { return Secrets::random(); }", "function randomise() {\n\n list($usec, $sec) = explode(' ', microtime());\n\n return (float) $sec + ((float) $usec * 100000);\n\n}", "function randNumber($len=6,$start=false,$end=false) {\n\n mt_srand ((double) microtime() * 1000000);\n $start=(!$len && $start)?$start:str_pad(1,$len,\"0\",STR_PAD_RIGHT);\n $end=(!$len && $end)?$end:str_pad(9,$len,\"9\",STR_PAD_RIGHT);\n \n return mt_rand($start,$end);\n }", "public function getRandomID() \n\t{\n\t\treturn $this->random_id;\n\t}", "function generateRandID(){\n\t\t$userid = $this->getPasswordSalt();\n\t\treturn hash('sha256',$userid);\n\t}", "function random(int|float $min = null, int|float $max = null, int $precision = null): int|float\n{\n return Numbers::random($min, $max, $precision);\n}", "public function createRandomMultiplier(): BigInteger\n {\n return BigInteger::random(256);\n }", "public function getSeed() {\n\t\treturn $this->seed;\n\t}", "public function generateEntropy() {\n\t\tif (function_exists('random_bytes')) {\n\t\t\treturn bin2hex(random_bytes(32));\n\t\t}\n\n\t\t$isWin = preg_match('/WIN/', PHP_OS);\n\n\t\t// TODO Fails with \"Could not gather sufficient random data\" on IIS, temporarily disabled on windows\n\t\tif(!$isWin) {\n\t\t\tif(function_exists('mcrypt_create_iv')) {\n\t\t\t\t$e = mcrypt_create_iv(64, MCRYPT_DEV_URANDOM);\n\t\t\t\tif($e !== false) return $e;\n\t\t\t}\n\t\t}\n\n\t\t// Fall back to SSL methods - may slow down execution by a few ms\n\t\tif (function_exists('openssl_random_pseudo_bytes')) {\n\t\t\t$e = openssl_random_pseudo_bytes(64, $strong);\n\t\t\t// Only return if strong algorithm was used\n\t\t\tif($strong) return $e;\n\t\t}\n\n\t\t// Read from the unix random number generator\n\t\tif(!$isWin && !ini_get('open_basedir') && is_readable('/dev/urandom') && ($h = fopen('/dev/urandom', 'rb'))) {\n\t\t\t$e = fread($h, 64);\n\t\t\tfclose($h);\n\t\t\treturn $e;\n\t\t}\n\n\t\t// Warning: Both methods below are considered weak\n\n\t\t// try to read from the windows RNG\n\t\tif($isWin && class_exists('COM')) {\n\t\t\ttry {\n\t\t\t\t$comObj = new COM('CAPICOM.Utilities.1');\n\n\t\t\t\tif(is_callable(array($comObj,'GetRandom'))) {\n\t\t\t\t\treturn base64_decode($comObj->GetRandom(64, 0));\n\t\t\t\t}\n\t\t\t} catch (Exception $ex) {\n\t\t\t}\n\t\t}\n\n\t\t// Fallback to good old mt_rand()\n\t\treturn uniqid(mt_rand(), true);\n\t}", "function gener_random($length){\r\n\r\n\tsrand((double)microtime()*1000000 );\r\n\t\r\n\t$random_id = \"\";\r\n\t\r\n\t$char_list = \"abcdefghijklmnopqrstuvwxyz\";\r\n\t\r\n\tfor($i = 0; $i < $length; $i++) {\r\n\t\t$random_id .= substr($char_list,(rand()%(strlen($char_list))), 1);\r\n\t}\r\n\t\r\n\treturn $random_id;\r\n}", "function randomx($mode = 0, $leng = '3~5', $rndkey = -1)\n{\n // $seeds = $mode == 0 ? range('a', 'z') : range(0, 9);\n $range_a = range('a', 'z');\n $range_b = range('A', 'Z');\n $range_c = range(0, 9);\n switch ($mode) {\n case 0:\n $seeds = $range_a;\n break;\n case 1:\n $seeds = $range_c;\n break;\n case 2:\n $seeds = array_merge($range_a, $range_c);\n break;\n case 3:\n $seeds = array_merge($range_a, $range_b);\n break;\n case 4:\n $seeds = $range_b;\n break;\n case 5:\n $seeds = array_merge($range_a, $range_b, $range_c);\n break;\n }\n // if ($rndkey != -1) {\n // mt_srand($rndkey);\n // }\n $parselen = explode('~', $leng);\n if (count($parselen) == 1) {\n $leng = (int) $leng;\n } else {\n $leng = mt_rand((int) $parselen[0], (int) $parselen[1]);\n }\n $x = '';\n // if ($mode != 1) {\n // // ext char out of $charlist\n // global $charlist;\n // foreach ($seeds as $s_k => $s_v) {\n // if (strpos($charlist, $s_v) !== false) {\n // unset($seeds[$s_k]);\n // }\n // }\n // $seeds = array_values($seeds);\n // }\n shuffle($seeds);\n // $seedlen = count($seeds) - 1;\n // for ($k = $seedlen; $k > 0; $k--){\n // $j = mt_rand(0, $k);\n // $tmpseed = $seeds[$k];\n // $seeds[$k] = $seeds[$j];\n // $seeds[$j] = $tmpseed;\n // }\n // print_r($seeds);die;\n // for ($i=0; $i < $leng; $i++) {\n // // if ($rndkey != -1) {\n // // mt_srand($rndkey+$i);\n // // }\n // // $x .= $seeds[mt_rand(0, $seedlen)];\n // if (!isset($seeds[$i])) {\n // break;\n // }\n // $x .= $seeds[$i];\n // }\n $x = substr(implode('', $seeds), 0, $leng);\n // mt_srand();\n // if (in_array($mode, array(2, 5))) {\n // $x = substr($x, 0, strlen($x) - 1) . $range_a[array_rand($range_a)];\n // }\n return $x;\n}", "protected function randomIndex() {\n return mt_rand(1, 10);\n }", "protected function fetchDCRoll(): int {\n return rand(1, 1000);\n }", "public static function generateRandomPassword ()\n {\n return rand(10000, 99999);\n }", "private function genSalt()\n {\n \treturn md5(time() + rand());\n }", "public static function generateRandomSalt()\n {\n $seed = uniqid(mt_rand(), true);\n $salt = base64_encode($seed);\n $salt = str_replace('+', '.', $salt);\n return substr($salt, 0, self::$saltLength);\n }", "final public static function random()\n {\n $hex = self::generateHexTimestamp() . self::generateHexRandomBytes();\n \n return new static(Hex::fromString($hex));\n }", "function generateResetCode($numberOfDigits) { // Generate reset code based on how many digits you want it to be\n\n $resetCode = '';\n $count = 0;\n\n while ($count < $numberOfDigits) {\n\n $nextDigit = mt_rand(0, 9);\n\n $resetCode .= $nextDigit;\n $count++;\n }\n\n return $resetCode;\n}", "function GenerateNumber($name) {\r\n // Create random number using rand() php function and concatenate it with $name.\r\n return $name . ' ' . rand(6, 15);\r\n}", "public function Random()\n {\n return parent::Random();\n }", "public static function generateRandomSalt() {\n\t\t// Salt seed\n\t\t$seed = uniqid(mt_rand(), true);\n \n\t\t// Generate salt\n\t\t$salt = base64_encode($seed);\n\t\t$salt = str_replace('+', '.', $salt);\n \n\t\treturn substr($salt, 0, self::$_saltLength);\n\t}", "public function getRseed()\n {\n return $this->get(self::_RSEED);\n }", "public function getRseed()\n {\n return $this->get(self::_RSEED);\n }", "public function getRseed()\n {\n return $this->get(self::_RSEED);\n }", "public function getRseed()\n {\n return $this->get(self::_RSEED);\n }", "public function getRseed()\n {\n return $this->get(self::_RSEED);\n }", "public function getRseed()\n {\n return $this->get(self::_RSEED);\n }", "public function randInt32() {\n return $this->_rng->int32();\n }", "protected static function generatePin()\n\t{\n\t\t$pool = '0123456789';\n\t\treturn substr(str_shuffle(str_repeat($pool, 5)), 0, 4);\n\t}", "static public function generate()\n {\n return base64_encode(microtime().uniqid().rand());\n }" ]
[ "0.79664123", "0.7526282", "0.7471535", "0.7382861", "0.72653615", "0.71674764", "0.71189874", "0.7009151", "0.6936591", "0.68587536", "0.67708683", "0.67642426", "0.6718305", "0.6675736", "0.6673819", "0.66480196", "0.6635078", "0.6626012", "0.65913886", "0.6549282", "0.65347224", "0.64433366", "0.64308965", "0.6364678", "0.63639265", "0.62992483", "0.6297895", "0.62398005", "0.6218609", "0.6181472", "0.61707634", "0.61695504", "0.615594", "0.61305916", "0.6094286", "0.6067429", "0.60492676", "0.604464", "0.6011696", "0.59887344", "0.5971002", "0.59487194", "0.59338015", "0.59333646", "0.5918968", "0.59179735", "0.59123695", "0.5882834", "0.5859383", "0.5844891", "0.58315784", "0.5831391", "0.5811917", "0.57993454", "0.5798638", "0.5768975", "0.57629234", "0.5760755", "0.5739306", "0.57324266", "0.5729616", "0.5726162", "0.5715688", "0.56958663", "0.5687809", "0.5664296", "0.56618613", "0.56611645", "0.56593835", "0.5652562", "0.5642299", "0.56383103", "0.5636859", "0.56249106", "0.5609819", "0.56063175", "0.56055015", "0.5601521", "0.5598155", "0.55947995", "0.55857676", "0.5582549", "0.5581391", "0.5563505", "0.55612683", "0.55610573", "0.55582696", "0.5547271", "0.5545947", "0.5545609", "0.552917", "0.5516591", "0.5509998", "0.55086213", "0.55086213", "0.55086213", "0.55086213", "0.55086213", "0.55037236", "0.55010545", "0.54978245" ]
0.0
-1
primero obtener el id de la comprobacion y el nombre
public function getPrueba($idTitulo) { if (!$test = $this->Comprobacion_model->getComprobacion(array('Titulo' => $idTitulo))) { return array(array(), 'descr' => ''); } else { // si existe obtener preguntas $preguntas = array(); $preg = $this->Comprobacion_model->getPreguntas(array('Comprobacion' => $test->Titulo)); if ($preg) { foreach ($preg as $pregunta) { //$respuestas = array(); // averiguar sus respuestas switch ($pregunta['Tipo_Pregunta']) { case 1: // vf $row = $this->Comprobacion_model->getRespuestaVF(array('Pregunta' => $pregunta['Id_Pregunta'], 'Comprobacion' => $test->Titulo)); $respuesta = array( array( "id_res" => $row->Id_VF, "answer" => $row->Respuesta ) ); break; case 2: // larga $respuesta = array(); break; case 3: // corta $respuesta = array(); $row = $this->Comprobacion_model->getRespuestaCORTA(array('Pregunta' => $pregunta['Id_Pregunta'], 'Comprobacion' => $test->Titulo)); if ($row) foreach ($row as $res) { $tmp = array( "id_res" => $res['Id_RShort'], "answer" => $res['Respuesta'] ); $respuesta[] = $tmp; } break; case 4: // multiple $respuesta = array(); $row = $this->Comprobacion_model->getRespuestaMULTIPLE(array('Pregunta' => $pregunta['Id_Pregunta'], 'Comprobacion' => $test->Titulo)); foreach ($row as $res) { $tmp = array( "id_res" => $res['Id_RMultiple'], "answer" => $res['Respuesta'], "correcta" => $res['Booleano'] ); $respuesta[] = $tmp; } break; case 5: // sopita $respuesta = array(); $row = $this->Comprobacion_model->getRespuestaSOPA(array('Pregunta' => $pregunta['Id_Pregunta'], 'Comprobacion' => $test->Titulo)); if ($row) foreach ($row as $res) { $tmp = array( "id_res" => $res['Id_Palabra'], "answer" => $res['Respuesta'], "correcta" => "1" ); $respuesta[] = $tmp; } break; case 6: // crucigrama $respuesta = array(); $row = $this->Comprobacion_model->getRespuestaSOPA(array('Pregunta' => $pregunta['Id_Pregunta'], 'Comprobacion' => $test->Titulo)); if ($row) foreach ($row as $res) { $tmp = array( "id_res" => $res['Id_Palabra'], "answer" => $res['Respuesta'], "descripcion" => $res['Descripcion'] ); $respuesta[] = $tmp; } break; } $preguntas[] = array( 'id' => $pregunta['Id_Pregunta'], 'Pregunta' => $pregunta['Pregunta'], 'tipo' => $pregunta['Tipo_Pregunta'], 'answer' => $respuesta, ); } } //var_dump('<br><br><br><br><br><br><br><br>'.json_encode($preguntas)); //var_dump('<br><br>Descripcion prueba:' . json_encode($test)); return array($preguntas, 'test' => $test); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIdCompra()\r\n {\r\n return $this->idCompra;\r\n }", "public function ComprasPorId()\n{\n\tself::SetNames();\n\t$sql = \" SELECT * FROM (compras INNER JOIN proveedores ON compras.codproveedor = proveedores.codproveedor) INNER JOIN usuarios ON compras.codigo = usuarios.codigo LEFT JOIN mediospagos ON compras.formacompra = mediospagos.codmediopago WHERE compras.codcompra = ?\";\t\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codcompra\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function getIdOrdenCompra() {\n return $this->id_orden_compra;\n }", "function getId_carrera(){\n\t\treturn $this->id_carrera;\n\t}", "function nombrecampo($numcampo){return mysqli_field_name($this->Consulta_ID, $numcampo);}", "function getNom($id) {\r\n\r\n\t\tglobal $db;\r\n\r\n\t\t$statement = $db->prepare('SELECT PRENOM,NOM FROM UTILISATEURS WHERE ID_UTILISATEUR = ?');\r\n\t\t$statement->execute(array($id));\r\n\t\t$account = $statement->fetch();\r\n\t\techo $account['PRENOM'] .' '.$account['NOM'];\r\n\t}", "public function getIdComentario()\n {\n return $this->id_comentario;\n }", "function getId_nom()\n {\n if (!isset($this->iid_nom) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->iid_nom;\n }", "function getId_nom()\n {\n if (!isset($this->iid_nom) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->iid_nom;\n }", "public function getIdContrato()\n {\n return $this->id_contrato;\n }", "public function buscarID()\n {\n $sentencia = \"SELECT id, cl FROM tsreportebocadetubo ORDER BY id DESC LIMIT 1\";\n try {\n $stm = $this->db->prepare($sentencia);\n $stm->execute();\n $registros = $stm->fetchAll(PDO::FETCH_OBJ);\n foreach ($registros as $r) {\n $id = $r->id;\n }\n return $id;\n } catch (Exception $e) {\n echo $e->getMessage();\n }\n }", "public function getContrato_id() {\n return $this->contrato_id;\n }", "function nombrecampo($numcampo) {\r\n\r\n return mysql_field_name($this->Consulta_ID, $numcampo);\r\n\r\n}", "function NameCatalogo($id)\n {\n $role = Catalogo::select('nombres')->where('id',$id)->first();\n return $role->nombres;\n }", "public function nombremodulos($id_sucursal,$modulos_id) {\n $encontro=false;\n $nombre=\"\";\n $db = DbBase::rawConnect();\n $result = $db->query(\"SELECT usuario,numero_modulo,modulo_id_sucursal FROM sincturnos WHERE sucursal_id='$id_sucursal' AND modulo_id_sucursal='$modulos_id'\");\n while($row = $db->fetchArray($result)) {\n if ($encontro==false)\n $nombre=\"M-\".$row['usuario'];\n break;\n }\n return $nombre;\n }", "function obtenirIdNomGroupesAHeberger ($connexion) {\r\n\r\n $req = \"SELECT id, nom FROM Groupe WHERE hebergement='O' ORDER BY id\";\r\n $stmt = $connexion -> prepare ($req);\r\n $stmt -> execute ();\r\n return $stmt;\r\n\r\n }", "public function nombreAsocId($nombre){\n $todosLosUsuarios = $this->buscarUsuarios();\n $datosDeUsuario = [];\n $idDelUsuario='';\n foreach ($todosLosUsuarios as $usuario) {\n if($usuario['nombre'] == $nombre){\n $datosDeUsuario[] = $usuario;\n }\n }\n foreach ($datosDeUsuario as $dato) {\n $idDelUsuario = $dato['id'];\n }\n\n return $idDelUsuario;\n }", "public function getIdByNameEspecialidad($name){//FUNCION PARA VERIFICAR LA EXISTENCIA DE UN CORREO EN TABLA MEDICO\n $objT=new especialidadDAO();\n $resul=$objT->readall();\n $act=0;\n for($i=0;$i<count($resul);$i++){\n if(strtoupper($resul[$i]['nombre']) == strtoupper($name)){\n $act=$resul[$i]['id_especialidad'];\n }\n }\n return $act; \n }", "public function obtener_nombre()\n {\n echo \" el nombre es del alumno es: \" .$this -> nombre; \n }", "function Obtener_Nombre_ComprobanteVenta($prm){\n $Obj=new mysqlhelper;\n $result= $Obj->consulta(\"SELECT Concat(co.sgo_vch_serie,'-',co.sgo_vch_numero) as sgo_vch_nrofacturaventa FROM tbl_sgo_comprobanteventa co WHERE co.sgo_int_comprobanteventa=\" . $prm);\n while ($row = mysqli_fetch_array($result))\n {\n return $row[\"sgo_vch_nrofacturaventa\"];\n }\n return \"\";\n }", "public function getNombreCompleto() {\n\t\treturn $this->txt_username . ' ' . $this->txt_apellido_paterno . ' ' . $this->txt_apellido_materno;\n\t}", "protected function getIdField()\n {\n return self::OBJ_NAME;\n }", "protected function getIdField()\n {\n return self::OBJ_NAME;\n }", "function getCompteUSer($ID){\n if (intval($ID)) {\n $data = getCompteID($ID);\n require('modification.php');\n //require('Liste-Compte.php');\n }\n else{\n throw new Exception(\"l'ID doit etre un Entier\");\n \n }\n }", "function getporNombre($nombre) {\r\n //devuelve el objeto entero\r\n $parametros = array();\r\n $parametros[\"nombre\"] = $nombre;\r\n $this->bd->select($this->tabla, \"*\", \"nombre =:nombre\", $parametros);\r\n $fila = $this->bd->getRow();\r\n $mecanico = new Mecanico();\r\n $mecanico->set($fila);\r\n return $mecanico;\r\n }", "function obtenirNomGroupe ($connexion, $id) {\r\n\r\n $req = \"SELECT nom FROM Groupe WHERE id=?\";\r\n $stmt = $connexion -> prepare ($req);\r\n $stmt -> execute (array ($id));\r\n return $stmt -> fetchColumn ();\r\n\r\n }", "public function getComentario($id){\n $query = $this->db->prepare('SELECT c.contenido, c.id_user, c.id_pelicula, c.puntuacion, u.nombre FROM comentario c INNER JOIN user u ON c.id_user=u.id_user AND id_comentario=?');\n $query->execute(array($id));\n return $query->fetch(PDO::FETCH_OBJ);\n }", "public function get_compte(){retrun($id_local_compte); }", "function compledom($calleno,$col,$del,$ciudad,$estado,$cp){\n\t\t\t$completo = $calleno.\" \".$col.\" \".$del.\" c.p.\".$cp.\" \".$ciudad.\", \".$estado;\n\t\t\treturn $completo;\n\t\t\t\n\t\t}", "public function getNomComplet()\n {\n return $this->getPrenomContact() . ' ' . $this->getNomContact();\n }", "function getChevalById(){\n\n\n\t\t$query = \"SELECT * from \". $this->table_name . \" WHERE id = ? \";\n\t\t$stmt = $this->conn->prepare( $query );\n\n\t\t// affecte la valeur de l id au paramètre de la requete\n\t\t$stmt->bindParam(1, $this->id);\n\n\t\t// execute la requete\n\t\t$stmt->execute();\n\n\t\t// recupere la ligne\n\t\t$row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n // valorise les proprietes de cheval\n\t\t$this->id = $row['id'];\n\t\t$this->nom = $row['nom'];\n\t\t$this->sexe = $row['sexe'];\n\t\t$this->prixDepart = $row['prixDepart'];\n\n\t}", "public function GetIdObsAluno()\n\t{\n\t\treturn $this->_phreezer->GetManyToOne($this, \"observacoes_ibfk_1\");\n\t}", "function getDatosId_activ()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'id_activ'));\n $oDatosCampo->setEtiqueta(_(\"id_activ\"));\n return $oDatosCampo;\n }", "function buscarPorId($id) {\r\n \r\n }", "public function getBuscaNombre(){\n $sql = \"SELECT count(id) AS PlanesName\n FROM \". $this->db_table .\"\n WHERE PlanesName = ? AND id <> ? \";\n\n $stmt = $this->conn->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL));\n\n $stmt->bindParam(1, $this->PlanesName, PDO::PARAM_STR);\n\t\t\t$stmt->bindParam(2, $this->id, PDO::PARAM_INT);\n\n $stmt->execute();\n\n $dataRow = $stmt->fetch(PDO::FETCH_ASSOC);\n \n $this->PlanesName = $dataRow['PlanesName'];\n }", "function getTituloCombo($tabelaProcura){\n # Abre arquivo xml para navegacao\n $aBanco = simplexml_load_string($this->xml);\n $retorno = $pk = '';\n # Varre a estrutura das tabelas\n foreach($aBanco as $aTabela){\n # Recupera o nome da tabela e gera o nome da classe\n if($tabelaProcura != $aTabela['NOME']) \n continue;\n\n # Varre a estrutura dos campos da tabela em questao\n foreach($aTabela as $oCampo){ \n //print \"@@{$oCampo->NOME}\\n\";\n //print_r($aTabela); exit;\n # Se o campo for chave, nao sera usado\n if($oCampo->CHAVE == 1){\n $pk = $oCampo->NOME;\n \n if((String)$oCampo->FKTABELA == ''){\n continue;\n }\n }\n\n # Se o campo for do tipo numerico, nao sera usado, nao sera usado\n if(!preg_match(\"#varchar#is\", (String)$oCampo->TIPO)) continue;\n \n # Se o campo tiver nomenclatura que nao remeta a nome/descricao sera eliminado \n if(preg_match(\"#(?:nome|descricao)#is\", (String)$oCampo->NOME)){\n $retorno = (String)$oCampo->NOME;\n break;\n }\n \n # Se o campo tiver nomenclatura que nao remeta a nome/descricao sera eliminado \n if(preg_match(\"#(?:usuario|login|nome_?(?:pessoa|cliente|servidor)|descricao|titulo|nm_(?:pessoa|cliente|servidor|estado_?civil|lotacao|credenciado)|desc_)#is\", (String)$oCampo->NOME)){\n $retorno = (String)$oCampo->NOME;\n break;\n }\n \n # Recupera valores a serem substituidos no modelo\n \n }\n break;\n }\n if($retorno == '')\n $retorno = $pk;\n return (string)$retorno;\n }", "static public function mdlObtenerUltimoId() {\r\n\r\n $sql = \"SELECT * FROM compras ORDER BY id DESC Limit 1\";\r\n\r\n $stmt = Conexion::conectar()->prepare($sql);\r\n\r\n $stmt -> execute();\r\n\r\n return $stmt -> fetch();\r\n\r\n }", "public function getId()\n {\n \treturn $this->id_actadocumentacion;\n }", "function buildername($id)\n{\n\t$buildername=mysql_fetch_array(mysql_query(\"select company_name from manage_property_builder where p_bid='$id'\"));\n\treturn $buildername['company_name'];\n\t}", "public function getId(): string\n {\n return $this->name;\n }", "public function CajerosPorId()\n\t{\n\t\tself::SetNames();\n\t\t$sql = \" select * from cajas INNER JOIN usuarios ON cajas.codigo = usuarios.codigo WHERE cajas.codcaja = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($_GET[\"codcaja\"]) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\n\t\t{\n\t\t\techo \"\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t\t{\n\t\t\t\t\t$this->p[] = $row;\n\t\t\t\t}\n\t\t\t\treturn $this->p;\n\t\t\t\t$this->dbh=null;\n\t\t\t}\n\t\t}", "function fmodulo(){\n\t\t$this->sentencia=\"SELECT modulo_id,modulo_nombre FROM modulo ORDER BY modulo_orden ASC\";\n\t\t$this->fsentencia();\n\t\t$this->modulo=$this->resultado;\n\t}", "function obtener_mensajero($idMensajero)\n{\n $VfuncionarioDc = new VfuncionarioDc($idMensajero);\n $nombreMensajero = \"{$VfuncionarioDc->nombres} {$VfuncionarioDc->apellidos}\";\n return $nombreMensajero;\n}", "function getDatosId_preceptor()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'id_preceptor'));\n $oDatosCampo->setEtiqueta(_(\"nombre preceptor\"));\n return $oDatosCampo;\n }", "function mostrar_operador(){\n\t\t\t$id=$_GET['id'];\n\t\t\t$sql=\"SELECT * FROM operador WHERE id_op='$id'\";\n\t\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\t\t$resultado = mysql_fetch_array($consulta);\n\t\t\t$this->id=$id;\n\t\t\t$this->nombre=$resultado['nombre_op'];\n\t\t\t$this->apellido=$resultado['apellido_op'];\n\t\t\t$this->cedula=$resultado['cedula_op'];\n\t\t\t$this->correo=$resultado['correo_op'];\n\t\t\t$this->cantidad=$resultado['cantidad_op'];\n\t\t\t$this->fecha=$resultado['fecha_op'];\t\t\n}", "protected function cargaIdUbicacion() {\n $dao = new PGDAO();\n $strSql = $this->COLECCIONMAPEOUBICA . $this->propiedad->getId_ubica();\n $arrayDatos = $this->leeDBArray($dao->execSql($strSql));\n $id = $arrayDatos[0]['zpubica'];\n return $id;\n }", "public function obteterDatos($id_OrdenCompra){\n\t\t\techo '---'.$id_OrdenCompra.'---';\n\t\t\t$conexion = $this->conn;\n\t\t\t$sth = $conexion->prepare('SELECT id_OrdenCompra, nombre_OrdenCompra as nombre, fecha_registro ,prop.tipo_procedencia , rfc, telefono , email , direccion , tipop.tipo , nickname , password , url_image from '.$this->nombreTabla.' OrdenCompra , procendias_OrdenCompra prop, tipos tipop where estado = 1 and OrdenCompra.id_tipo_procedencia= prop.id_tipo_procedencia and OrdenCompra.id_tipo = tipop.id_tipo and id_OrdenCompra = :id_OrdenCompra', array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY));\t\n\t\t\t$sth->bindParam(':id_OrdenCompra', $id_OrdenCompra, PDO::PARAM_INT );\n\t\t\t$sth->execute();\n\t\t\t$row = $sth->fetch(PDO::FETCH_ASSOC);\n\t\t\treturn $row;\n\t\t}", "public function obtenerNombre() {\n return $this->nombreModelo;\n }", "public function ultimoID()\n {\n $sentencia = \"SELECT id, clNumReporte FROM tsreportebocadetubo ORDER BY id DESC LIMIT 1\";\n try {\n $stm = $this->db->prepare($sentencia);\n $stm->execute();\n $registros = $stm->fetchAll(PDO::FETCH_OBJ);\n\n return $registros;\n } catch (Exception $e) {\n echo $e->getMessage();\n }\n }", "public function get_usuario_por_id_compras($id_usuario)\n {\n\n\n $conectar = parent::conexion();\n parent::set_names();\n\n\n $sql = \"select u.id_usuario,c.id_usuario\n \n from usuarios u \n \n INNER JOIN compras c ON u.id_usuario=c.id_usuario\n\n\n where u.id_usuario=?\n\n \";\n\n $sql = $conectar->prepare($sql);\n $sql->bindValue(1, $id_usuario);\n $sql->execute();\n\n return $resultado = $sql->fetchAll(PDO::FETCH_ASSOC);\n }", "public function getId_Boisson()\n{\nreturn $this->Id_Boisson;\n}", "private function getName ()\n\t\t{\t\n\t\t\t$dbs = new DB ( $this->config['database'] );\n\t\t\t$search = $dbs->query(\"SELECT * FROM tbl_vpn_org WHERE org_id = \" . trim($this->c) );\n\t\t\tif ( count($search) ) {\n\t\t\t\t// Convert result to human code \n\t\t\t\t$this->result['data']['id'] = $search[0]['org_id'];\n\t\t\t\t$this->result['data']['name'] = $search[0]['org_name'];\n\t\t\t\t$this->result['data']['description'] = $search[0]['org_desc'];\n\t\t\t} else \n\t\t\t\t$this->result['data']['result'] = \"Not found\";\n\t\t\n\t\t\t$dbs->CloseConnection ();\t\n\t\t\treturn;\n\t\t}", "public function CajaPorId()\n{\n\tself::SetNames();\n\t$sql = \" select * from cajas LEFT JOIN usuarios ON cajas.codigo = usuarios.codigo WHERE cajas.codcaja = ?\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codcaja\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function getComunaOrigen()\n {\n return $this->comunaOrigen;\n }", "public static function ConsultarTemporalCid() {\r\n $db = new Conexion();\r\n\t\t$sql = $db->query(\"select MAX(idcompra) as id from compra;\");\r\n\t\t$dato3 = $db->recorrer($sql);\r\n return $dato3[0];\r\n }", "function getTitulo() {\n\t\treturn $this->id;\n\t}", "function getTitulo() {\n\t\treturn $this->id;\n\t}", "function getTitulo() {\n\t\treturn $this->id;\n\t}", "function carac_titre2id($titre) {\n $sql = \"SELECT * FROM caracteristique AS carac, caracteristiquedesc AS caracdesc WHERE caracdesc.caracteristique = carac.id AND caracdesc.titre ='\".$titre.\"'\";\n\t $resultat = mysql_query($sql);\n if($resultat) {\n $match=mysql_fetch_assoc($resultat);\n }\n //mysql_freeresult($resultat);\n // retourner id,parent ou FALSE si erreur\n return ($resultat) ? array('id'=>$match['id']) : FALSE;\n }", "public function idinformacion(){\n\t\treturn $this->_idinformacion;\n\t}", "function obtenirIdNomEtablissements ($connexion) {\r\n\r\n $req = \"SELECT id, nom FROM Etablissement ORDER BY id\";\r\n $stmt = $connexion -> prepare ($req);\r\n $stmt -> execute ();\r\n return $stmt;\r\n\r\n }", "public function conseguirId (){\n $query = $this->db->query (\"SELECT * FROM acceso WHERE id_acceso = '{$this->id_acceso}'\");\n if ($query->num_rows === 1)\n {\n $this->datos= $query->fetch_assoc();\n \n }\n return $this->datos;\n }", "public function buscaNombre($id){\n if($id==null)\n return '';\n $model=$this->model()->findByPk($id);\n if($model!=null){\n return trim($model->nombre);\n }else\n return '';\n\n }", "function nombreEmpresa($usuario){\n $db = obtenerBaseDeDatos();\n $sentencia = $db->prepare(\"SELECT * FROM proveedores WHERE id = ?\");\n $sentencia->execute([$usuario]);\n return $sentencia->fetchObject();\n }", "function nombre_cliente($id)\n{\n\tglobal $con;\n\t$sql=\"Select Nombre from clientes where id like $id\";\n\t$consulta = @mysql_query($sql,$con);\n\t$resultado = @mysql_fetch_array($consulta);\n\treturn $resultado['Nombre'];\n}", "function buscar_id($id_autor){\n\t\tinclude 'data_bd.inc';\n\t\tinclude 'databaseClass.php';\n\t\t//creo mi cadena de conexion\n\t\t$conexion = new DB($host, $user, $pass, $bd);\n\t\t//Creo mi conexión\n\t\t$status = $conexion->conectar();\n\t\t//En caso de que devuelva una falla\n\t\tif($status === FALSE){\n\t\t\tdie('No se pudo conectar');\n\t\t}\n\t\t//Creo mi query\n\t\t$consulta = \"SELECT\n\t\t\t\t*\n\t\t\t\tFROM\n\t\t\t\tautor\n\t\t\t\tWHERE id_autor='$id_autor'\";\n\t\t//Ejecuto la consulta\n\t\t$resultado = $conexion -> ejecutarConsulta($consulta);\n\t\t//Si fue una falla\n\t\tif($conexion === FALSE){\n\t\t\t$conexion -> cerrar();\t\n\t\t\treturn FALSE;\n\t\t}\n\t\t//Cierro la conexion\n\t\t$conexion -> cerrar();\n\t\tif($resultado == TRUE)\n\t\t{\n\t\t\trequire('autorClass.php');\n\t\t\t$autor = new Autor($resultado[0]['id_autor'], $resultado[0]['nombre_autor']);\n\t\t\t//Regreso los productos\n\t\t\treturn $autor;\n\t\t}\n\t\telse {\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t}", "public function getIdProduto()\n\t\t{\n\t\t\treturn $this -> idproduto;\n\t\t}", "function getId();", "public function get_id();", "public function get_id();", "function getComuna($id){\n\t$db = DbConfig::getConnection();\n\t$comunas = getComunas($db);\n\t$db->close();\n\treturn $comunas[$id];\n}", "function voirCommandeId($id){\n\t$conditions = array();\n\tarray_push($conditions, array('nameChamps'=>'idCommande','type'=>'=','name'=>'idCommande','value'=>$id));\n\t$req = new myQueryClass('commande',$conditions);\n\t$r = $req->myQuerySelect();\n\tif(count($r)== 1){\n\t\treturn $r[0];\n\t}else{\n\t\treturn false;\n\t}\n}", "function ColegioPersonal($id)\n {\n if (isset($id)) {\n $colegio = Colegio::where('id',$id)->pluck('nombre','id')->toarray();\n } else {\n $colegio=[];\n }\n return $colegio;\n }", "public function getIdPersonaje()\n {\n return $this->idPersonaje;\n }", "public function getClivres_id($clivres_id=null)\n {\n if ($clivres_id != null && is_array($this->livres) && count($this->livres)!=0) {\n $table_name = strtolower(get_class($this));\n $query = \"SELECT * FROM $table_name WHERE clivres_id = ?\";\n $req = Manager::bdd()->prepare($query);\n $req->execute([$clivres_id]);\n $data = \"\";\n if ($data = $req->fetchAll(PDO::FETCH_ASSOC)) {\n$d=$data[0];\n$this->setId($d['id']);\n$this->setTitre($d['titre']);\n$this->setDescription($d['description']);\n$this->setDate($d['date']);\n$this->setClivres_id($d['clivres_id']);\n$this->setAuteur($d['auteur']);\n$this->setPhoto($d['photo']);\n$this->setChemin($d['chemin']);\n$this->livres =$data; \n return $this;\n }\n \n } else {\n return $this->clivres_id;\n }\n \n }", "public function getNomeConsorcio( $id )\n\t{\n\t\treturn $this->getRepository()->getNomeConsorcio( $id );\n\t}", "public function DetallesComprasPorId()\n\t{\n\t\tif(base64_decode($_GET['tipoentrada'])==\"PRODUCTO\"){\n\n\t\t\tself::SetNames();\n\t\t\t$sql = \" SELECT * FROM detallecompras LEFT JOIN categorias ON detallecompras.categoria = categorias.codcategoria LEFT JOIN productos ON detallecompras.codproducto = productos.codproducto WHERE detallecompras.coddetallecompra = ?\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->execute( array(base64_decode($_GET[\"coddetallecompra\"])) );\n\t\t\t$num = $stmt->rowCount();\n\t\t\tif($num==0)\n\t\t\t{\n\t\t\t\techo \"\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t\t{\n\t\t\t\t\t$this->p[] = $row;\n\t\t\t\t}\n\t\t\t\treturn $this->p;\n\t\t\t\t$this->dbh=null;\n\t\t\t}\n\t\t} else {\n\n\t\t\t$sql = \" SELECT * FROM detallecompras LEFT JOIN ingredientes ON detallecompras.codproducto = ingredientes.codingrediente WHERE detallecompras.coddetallecompra = ?\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->execute( array(base64_decode($_GET[\"coddetallecompra\"])) );\n\t\t\t$num = $stmt->rowCount();\n\t\t\tif($num==0)\n\t\t\t{\n\t\t\t\techo \"\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t\t{\n\t\t\t\t\t$this->p[] = $row;\n\t\t\t\t}\n\t\t\t\treturn $this->p;\n\t\t\t\t$this->dbh=null;\n\t\t\t}\n\n\t\t}\n\t}", "function consultar_comprobante_cabecera($id) {\n $sql = \"SELECT\n\t\t prosic_comprobante.id_comprobante\n\t\t , prosic_comprobante.codigo_comprobante\n\t\t , prosic_comprobante.emision_comprobante\n\t\t , prosic_comprobante.afecto_comprobante\n\t\t , prosic_comprobante.inafecto_comprobante\n\t\t , prosic_comprobante.total_comprobante\n\t\t , prosic_comprobante.igv_comprobante\n\t\t , prosic_comprobante.isc_comprobante \n\t\t , prosic_comprobante.tipo_cambio_comprobante\n\t\t , prosic_comprobante.id_anexo\n\t\t , prosic_comprobante.id_tipo_comprobante\n\t\t , prosic_comprobante.nro_comprobante\n , prosic_comprobante.serie_comprobante\n\t\t , prosic_subdiario.id_subdiario\n\t\t , prosic_subdiario.codigo_subdiario\n\t\t , prosic_subdiario.nombre_subdiario\n\t\t , prosic_moneda.id_moneda\n\t\t , prosic_moneda.nombre_moneda\n\t\t , prosic_moneda.codigo_moneda\n\t\t , prosic_anio.nombre_anio\n\t\t , prosic_mes.nombre_mes\n , prosic_anio.id_anio\n\t\t , prosic_mes.id_mes\n\t\t , prosic_anexo.codigo_anexo\n\t\t , prosic_anexo.descripcion_anexo\n\t\t , prosic_tipo_comprobante.codigo_tipo_comprobante\n\t\t , prosic_tipo_comprobante.nombre_tipo_comprobante\n\t\t , prosic_comprobante.id_plan_contable\n\t\t , prosic_plan_contable.cuenta_plan_contable\n\t\t , prosic_comprobante.cuenta_costo \n\t\t , prosic_comprobante.cargo_abono\t\t \n\t\t , prosic_comprobante.cuenta_banco\n\t\t , prosic_comprobante.c_a_cuenta_banco \n\t\t , prosic_comprobante.detalle_comprobante\n\t\t\t, prosic_banco.id_banco\n\t\t\t, prosic_comprobante.id_medio_pago\n\t\tFROM prosic_comprobante\n\t INNER JOIN prosic_mes\t\t ON (prosic_comprobante.id_mes = prosic_mes.id_mes)\n\t INNER JOIN prosic_anio\t\t ON (prosic_comprobante.id_anio = prosic_anio.id_anio)\n\t INNER JOIN prosic_subdiario\t ON (prosic_comprobante.id_subdiario = prosic_subdiario.id_subdiario)\n\t INNER JOIN prosic_moneda\t ON (prosic_comprobante.id_moneda = prosic_moneda.id_moneda)\n\t INNER JOIN prosic_anexo\t\t ON (prosic_comprobante.id_anexo = prosic_anexo.id_anexo)\n\t INNER JOIN prosic_tipo_comprobante ON (prosic_comprobante.id_tipo_comprobante = prosic_tipo_comprobante.id_tipo_comprobante)\n\t LEFT JOIN prosic_plan_contable ON (prosic_comprobante.id_plan_contable = prosic_plan_contable.id_plan_contable)\n\t\tLEFT JOIN prosic_banco ON (prosic_comprobante.cuenta_banco = prosic_banco.id_plan_contable)\n\t\t WHERE prosic_comprobante.id_comprobante=\" . $id . \"\";\n\n\t\t$result = $this->Consulta_Mysql($sql);\n $row = @mysql_fetch_assoc($result);\n\n $this->valor_afecto = $row['afecto_comprobante'];\n $this->valor_inafecto = $row['inafecto_comprobante'];\n $this->valor_isc = $row['isc_comprobante'];\n $this->valor_igv = $row['igv_comprobante'];\n $this->valor_total = $row['total_comprobante'];\n $this->subdiario = $row['id_subdiario'];\n $this->tipo_cambio = $row['tipo_cambio_comprobante'];\n $this->moneda = $row['id_moneda'];\n $this->codigo_moneda = $row['codigo_moneda'];\n\n if ($row['id_subdiario'] == 3 || $row['id_subdiario'] == 10) {\n $this->cuenta_costo = $row['cuenta_costo'];\n $row_costo = $this->buscar_cuenta_por_id($row['cuenta_costo']);\n $this->nombre_cuenta_costo = $row_costo[0];\n } elseif ($row['id_subdiario'] == 2) {\n $this->cuenta_costo = 0;\n $this->nombre_cuenta_costo = \"\";\n }\n $this->id_comprobante = $row['id_comprobante'];\n $this->id_anexo = $row['id_anexo'];\n $this->codigo_anexo = $row['codigo_anexo'];\n $this->id_tipo_comprobante = $row['id_tipo_comprobante'];\n $this->codigo_tipo_comprobante = $row['codigo_tipo_comprobante'];\n $this->nro_comprobante = $row['nro_comprobante'];\n $this->emision_comprobante = $row['emision_comprobante'];\n $this->detalle_comprobante = $row['detalle_comprobante'];\n $this->serie_comprobante = $row['serie_comprobante'];\n\n $l_afecto = 0; \n $l_inafecto = 0;\n $l_isc = 0;\n $l_igv = 0;\n\n if(is_null($row['afecto_comprobante']))$l_afecto = 1;\n if(is_null($row['inafecto_comprobante']))$l_inafecto = 1;\n if(is_null($row['isc_comprobante']))$l_isc = 1;\n if(is_null($row['igv_comprobante']))$l_igv = 1;\n\n if($row['afecto_comprobante']==0.00)$l_afecto = 1;\n if($row['inafecto_comprobante']==0.00)$l_inafecto = 1;\n if($row['isc_comprobante']==0.00)$l_isc = 1;\n if($row['igv_comprobante']==\"0.00\")$l_igv = 1;\n\n if ($row['id_subdiario'] == 2) {//Subdiario de Ventas\n if ($l_isc == 0) {\n //cargar isc\n $result = $this->buscar_cuenta_por_codigo(\"40105\");\n $row_cuenta = @mysql_fetch_array($result);\n $id_cuenta = $row_cuenta[0];\n $codigo_cuenta = \"40105\";\n $tipo = \"A\";\n $monto = $row['isc_comprobante'];\n $this->arreglo_isc = $this->cargar_sub_cuenta($id_cuenta, $codigo_cuenta, $tipo, $monto);\n }\n if ($l_igv == 0) {\n //cargar igv\n $codigo_cuenta = $this->consulta_cuenta_prosic_automatico(1);\n $result = $this->buscar_cuenta_por_codigo($codigo_cuenta);\n $row_cuenta = mysql_fetch_array($result);\n $id_cuenta = $row_cuenta[0];\n $tipo = \"A\";\n $monto = $row['igv_comprobante'];\n $this->arreglo_igv = $this->cargar_sub_cuenta($id_cuenta, $codigo_cuenta, $tipo, $monto);\n }\n if ($l_inafecto == 0) {\n //cargar inafecto\n $id_cuenta = $row['id_plan_contable'];\n $codigo_cuenta = $row['cuenta_plan_contable'];\n $tipo = \"A\";\n $monto = $row['inafecto_comprobante'];\n $this->arreglo_inafecto = $this->cargar_sub_cuenta($id_cuenta, $codigo_cuenta, $tipo, $monto);\n }\n if ($l_afecto == 0) {\n $this->arreglo_afecto = $this->cargar_sub_cuenta($row['id_plan_contable'], $row['cuenta_plan_contable'], \"A\", $row['afecto_comprobante']);\n }\n //cargando el Total\n\t\t\tif($row['id_moneda']==1){\n $codigo_cuenta = $this->consulta_cuenta_prosic_automatico(2);\n\t\t\t}else{\n $codigo_cuenta = $this->consulta_cuenta_prosic_automatico(3);\n\t\t\t}\n $result = $this->buscar_cuenta_por_codigo($codigo_cuenta);\n $row_cuenta = mysql_fetch_array($result);\n $id_cuenta = $row_cuenta[0];\n $tipo = \"C\";\n $monto = $row['total_comprobante'];\n $this->arreglo_total = $this->cargar_sub_cuenta($id_cuenta, $codigo_cuenta, $tipo, $monto);\n } elseif ($row['id_subdiario'] == 3) {//Subdiario de Compras\n if ($l_isc == 0) {\n //cargar isc\n $result = $this->buscar_cuenta_por_codigo(\"40105\");\n $row_cuenta = mysql_fetch_array($result);\n $id_cuenta = $row_cuenta[0];\n $codigo_cuenta = \"40105\";\n $tipo = \"C\";\n $monto = $row['isc_comprobante'];\n $this->arreglo_isc = $this->cargar_sub_cuenta($id_cuenta, $codigo_cuenta, $tipo, $monto);\n }\n if ($l_igv == 0) {\n //cargar igv\n $codigo_cuenta = $this->consulta_cuenta_prosic_automatico(1);\n $result = $this->buscar_cuenta_por_codigo($codigo_cuenta);\n $row_cuenta = mysql_fetch_array($result);\n $id_cuenta = $row_cuenta[0];\n $tipo = \"C\";\n $monto = $row['igv_comprobante'];\n $this->arreglo_igv = $this->cargar_sub_cuenta($id_cuenta, $codigo_cuenta, $tipo, $monto);\n }\n if ($l_inafecto == 0) {\n //cargar inafecto\n $id_cuenta = $row['id_plan_contable'];\n $codigo_cuenta = $row['cuenta_plan_contable'];\n $tipo = \"C\";\n $monto = $row['inafecto_comprobante'];\n $this->arreglo_inafecto = $this->cargar_sub_cuenta($id_cuenta, $codigo_cuenta, $tipo, $monto);\n }\n if ($l_afecto == 0) {\n $this->arreglo_afecto = $this->cargar_sub_cuenta($row['id_plan_contable'], $row['cuenta_plan_contable'], \"C\", $row['afecto_comprobante']);\n }\n //cargando el Total\n\t\t\tif($row['id_moneda']==1){\n $codigo_cuenta = $this->consulta_cuenta_prosic_automatico(4);\n\t\t\t}else{\n $codigo_cuenta = $this->consulta_cuenta_prosic_automatico(5);\n\t\t\t}\n $result = $this->buscar_cuenta_por_codigo($codigo_cuenta);\n $row_cuenta = mysql_fetch_array($result);\n $id_cuenta = $row_cuenta[0];\n $tipo = \"A\";\n $monto = $row['total_comprobante'];\n $this->arreglo_total = $this->cargar_sub_cuenta($id_cuenta, $codigo_cuenta, $tipo, $monto);\n }## FIN DEL ELSE IF SUBDIARIO 3\n elseif ($row['id_subdiario'] == 8) {//Subdiario de BANCOS\n ##CARGADO LA CUENTA DE BANCOS\n $row_cuenta = $this->buscar_cuenta_por_id($row['cuenta_banco']);\n $id_cuenta = $row['cuenta_banco'];\n $codigo_cuenta = $row_cuenta[0];\n $tipo = $row['c_a_cuenta_banco'];\n $monto = $row['total_comprobante'];\n $this->arreglo_banco = $this->cargar_sub_cuenta($id_cuenta, $codigo_cuenta, $tipo, $monto);\n\n ##CARGADO LA CUENTA DE INGRESO EGRESOS\n $id_cuenta = $row['id_plan_contable'];\n $codigo_cuenta = $row['cuenta_plan_contable'];\n $tipo = $row['cargo_abono'];\n $monto = $row['total_comprobante'];\n $this->arreglo_ingreso_egreso = $this->cargar_sub_cuenta($id_cuenta, $codigo_cuenta, $tipo, $monto);\n }\n\n return $row;\n }", "protected function idNameSong($nombreCancion)\n {\n $lista = Model_Cancion::find('all', array\n (\n 'where' => array\n (\n array('nombre'=>$nombreCancion) \n )\n ));\n if(!empty($lista))\n {\n $id=0;\n foreach ($lista as $key => $value)\n {\n $id = $lista[$key]->id;\n }\n return $id; \n }\n }", "function nom_auteur($id){\n\t\t$requete = 'SELECT nom, prenom FROM identifiant WHERE id=\"'.$id.'\"';\n\t\t$donnee = connexion( $requete);\n\t\t$ligne = mysql_fetch_assoc($donnee);\n\t\treturn $ligne['prenom'].' '.$ligne['nom'];\n\t}", "public function getId() ;", "public function nomeCliente($id){\n\t\treturn $this->Cliente->find('first', array(\n\t\t\t'fields' => array('Cliente.Nome'),\n\t\t\t'conditions' => array('Cliente.removed'=>'N', 'Cliente.id'=>$id)\n\t\t));\n\t}", "function getNombre(){\t\treturn $this->mNombre;\t}", "function cita_biblica($objeto)\n{\n return $objeto->libro->nombre . ' ' . $objeto->numero_capitulo . ': ' . $objeto->numero_versiculo;\n}", "function getId_Producto(){\r\n\t\treturn $this->nId_Producto;\r\n\t}", "public function obtener_colectivo();", "public function getId() {\n return $this->datosprop->getId_prop_carac();\n }", "public function getProveedorName($id)\n {\n //Extraer el proveedor del articulo proveedor\n $articuloProveedorProvider = new CActiveDataProvider('ARTICULOPROVEEDOR', array(\n 'criteria' => array(\n 'condition' => 'id='.$id,\n ) ,\n 'pagination'=>array(\n 'pageSize'=>2000,\n ),\n ));\n //Extraer el proveedor del articulo proveedor\n $dProvider = $articuloProveedorProvider->getData();\n $proveedoresProvider = new CActiveDataProvider('PROVEEDORES', array(\n 'criteria' => array(\n 'condition' => 'id='.$dProvider[0]['idProveedor'],\n ) ,\n 'pagination'=>array(\n 'pageSize'=>2000,\n ),\n ));\n //retornar el valor\n $return = $proveedoresProvider->getData();\n return $return[0]['Nombre'];\n }", "public function GruporModelo()\n\t\t{\n\t\t\t$id = \"\";\n\t\t\t$numero = \"\";\n\t\t\t$franja = \"\";\n\t\t}", "function getId(){ return $this->toString(); }", "function getCompte($id) {\n\t\t$selectPrepa = self::$bdd -> prepare(\"SELECT * FROM utilisateur WHERE id = '$id'\");\n\t\t$selectPrepa -> execute();\n\t\t$result = $selectPrepa -> fetch();\n\t\treturn $result;\n\t}", "public function getIdentificacao();", "public function AbonosCreditosId() \n{\n\tself::SetNames();\n\t$sql = \" SELECT clientes.codcliente, clientes.cedcliente, clientes.nomcliente, ventas.idventa, ventas.codventa, ventas.totalpago, ventas.statusventa, abonoscreditos.codventa as codigo, abonoscreditos.fechaabono, SUM(montoabono) AS abonototal FROM (clientes INNER JOIN ventas ON clientes.codcliente = ventas.codcliente) LEFT JOIN abonoscreditos ON ventas.codventa = abonoscreditos.codventa WHERE abonoscreditos.codabono = ? AND clientes.cedcliente = ? AND ventas.codventa = ? AND ventas.tipopagove ='CREDITO'\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindValue(1, trim(base64_decode($_GET['codabono'])));\n\t$stmt->bindValue(2, trim(base64_decode($_GET['cedcliente'])));\n\t$stmt->bindValue(3, trim(base64_decode($_GET['codventa'])));\n\t$stmt->execute();\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function getIdDetail()\n {\n \treturn \"AVD-03-\". date(\"Y\") . sprintf('%05d', $this->id_actadocumentacion);\n }", "public function getID();", "public function getID();", "public function getID();", "public function ArqueoCajaPorId()\n{\n\tself::SetNames();\n\t$sql = \" select * FROM arqueocaja INNER JOIN cajas ON arqueocaja.codcaja = cajas.codcaja LEFT JOIN usuarios ON cajas.codigo = usuarios.codigo where arqueocaja.codarqueo = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codarqueo\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function getListeName()\n\t{\n\t\treturn substr($this->getLogicalId(), strpos($this->getLogicalId(),\"_\")+2, 1).\" - \".parent::getName();\n\t}", "function getNomPhotoEtId($id) {\n\t\t$selectPrepa = self::$bdd -> prepare(\"SELECT nom, photoProfil, id FROM utilisateur WHERE id = '$id'\");\n\t\t$selectPrepa -> execute();\n\t\t$result = $selectPrepa -> fetch();\n\t\treturn $result;\n\t}", "public function nombre_filtro($id){\n\t\treturn Filtro::where('id', $id)->select('nombre')->get();\n\t}" ]
[ "0.67815936", "0.6753972", "0.65811837", "0.6510901", "0.6416909", "0.6377886", "0.63773626", "0.6372287", "0.6372287", "0.6279062", "0.62722045", "0.6243813", "0.62404037", "0.62262344", "0.61912495", "0.61877495", "0.61528486", "0.61428154", "0.6126314", "0.6125697", "0.6116076", "0.6103542", "0.6103542", "0.60938656", "0.6088855", "0.60824865", "0.60066026", "0.60024804", "0.5978916", "0.5971569", "0.5920273", "0.5917916", "0.5896504", "0.58889335", "0.587861", "0.58742225", "0.5859639", "0.58551204", "0.5831325", "0.5831207", "0.5830486", "0.5811741", "0.57953036", "0.5794972", "0.57898664", "0.5789198", "0.578768", "0.5782203", "0.57606226", "0.57558835", "0.57546806", "0.5753682", "0.57517856", "0.57507974", "0.57503086", "0.5740674", "0.5740674", "0.5740674", "0.5735778", "0.5735687", "0.57318276", "0.57305074", "0.57302785", "0.5729035", "0.57277614", "0.57272524", "0.5725615", "0.57252496", "0.57243836", "0.57243836", "0.5723672", "0.57221484", "0.5714615", "0.571006", "0.5706949", "0.5706723", "0.5706387", "0.5705545", "0.5695939", "0.5695288", "0.5694117", "0.56931496", "0.5692878", "0.5692779", "0.5689259", "0.5688664", "0.5687888", "0.568405", "0.56741863", "0.5673668", "0.5672646", "0.5668992", "0.5668915", "0.5663506", "0.5659866", "0.5659866", "0.5659866", "0.56492764", "0.5648935", "0.56479543", "0.5647909" ]
0.0
-1
Display a listing of the resource.
public function index() { return view( 'admin.home' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { return view('image.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $data = $this->imageService->createImage($request, null); return response()->json(['data' => $data]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { $images = $this->imageService->getImageById($id); $link = json_decode($images->link); $images->link = $link; return view('image.edit', compact('images')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { $this->imageService->updateImage($id,$request); $image = $this->imageService->getImageById($id); return response()->json(['link' => $image->link ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { $this->imageService->deleteImages($id); return response()->json(['data' => 'complate']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Define custom actions here Logging in as an Admin
public function loginAsAdmin() { $I = $this; $I->amOnPage('/admin'); $I->see('Sign In'); $I->fillField('email', '[email protected]'); $I->fillField('password', 'admin123'); $I->dontSee('The "Email" field is required.'); $I->dontSee('The "Password" field is required.'); $I->click('Sign In'); $I->see('Dashboard', '//h1'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function admin_action() {\n\t}", "public function admin_action() {\n\t}", "private function actions() {\n\n $this->prefix = CUSTOM_LOGIN_OPTION;\n\n register_activation_hook( CUSTOM_LOGIN_FILE, array( $this, 'activate' ) );\n\n add_action( 'login_head', array( $this, 'cl_version_in_header' ), 1 );\n add_action( 'wp_head', array( $this, 'cl_version_in_header' ) );\n add_action( 'admin_menu', array( $this, 'admin_menu' ), 9 );\n add_action( 'admin_init', array( $this, 'load_settings' ), 8 );\n add_action( $this->prefix . '_after_sanitize_options', array( $this, 'delete_transients' ), 8 );\n\n add_action( 'admin_notices', array( $this, 'show_notifications' ) );\n add_action( 'admin_init', array( $this, 'notification_ignore' ) );\n\n do_action( $this->prefix . '_actions' );\n }", "public function showAdminAction()\n {\n header (\"location: admin.php?route=adminAccueil\");\n }", "function action_admin(&$handler)\n {\n // Access control\n if (!$this->allowed(\"any_project\"))\n {\n $user = getUser();\n $this->addFilter(\"project.coordinator=\".$user[\"id\"]);\n }\n return $handler->action_admin();\n }", "function AdminLogin() {\r\n\t\t$this->DB();\r\n\t}", "public function admin()\n {\n if ($this->loggedIn()) {\n $data['flights'] = $this->modalPage->getFlights();\n $data['name'] = $_SESSION['user_name'];\n $data['title'] = 'dashboard ' . $_SESSION['user_name'];\n $this->view(\"dashboard/\" . $_SESSION['user_role'], $data);\n\n } else {\n redirect('users/login');\n }\n\n }", "function Admin_authetic(){\n\t\t\t\n\t\tif(!$_SESSION['adminid']) {\n\t\t\t$this->redirectUrl(\"login.php\");\n\t\t}\n\t}", "public function register_admin_page_and_actions() {\n\t\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tadd_action( 'woocommerce_order_action_omise_charge_capture', array( Omise_Hooks::get_instance(), 'charge_capture' ) );\n\t\t\tadd_action( 'admin_post_omise_create_transfer', array( $this, 'create_transfer' ) );\n\t\t\tadd_action( 'admin_post_nopriv_omise_create_transfer', array( $this, 'no_op' ) );\n\t\t\tadd_action( 'admin_menu', array( $this, 'add_dashboard_omise_menu' ) );\n\t\t}", "public function login()\n {\n //login in your member using the logic in the perent class.\n $message = parent::login();\n\n //add some administrator-spcific logic\n return $message . ' ... log this action in an administrator\\'s table';\n\n }", "function admin_index()\n {\n if(!$this->Session->check('Admin'))\n {\n $this->redirect('/admin/login');\n }\n\n\n }", "public static function adminLoggedIn(){\n //Hvis en bruker ikke er logget inn eller han ikke er admin, vil han bli sent til login.php\n if (!isset($_SESSION['user']) || !$_SESSION['user']->isAdmin()) {\n //Lagrer siden brukeren er på nå slik at han kan bli redirigert hit etter han har logget inn\n $alert = new Alert(Alert::ERROR, \"Du er nødt til å være administrator for å se den siden. Du er ikke administrator.\");\n $alert->displayOnIndex();\n\n }\n }", "function applicants_admin_actions() {\n //add_menu_page(\"Applicants\", \"Applicants\", 5, \"Applicants\", \"applicants_admin\");\n\tadd_menu_page( 'Applicants', 'Applicants', 'manage_options', 'applicants', 'applicants_admin', '', 27 );\n}", "public function requireAdmin(){\n if( ! Authentifiacation::isAdmin()){\n Authentifiacation::rememberRequestedPage();\n Flash::addMessage('You need to have admin status to access this page', Flash::INFO);\n self::redirect('/login/new');\n }\n }", "protected function admin_page_action() {\n\n\t\tif ( $this->is_admin_request_for_users_forget() ) {\n\t\t\t$this->users_forget();\n\t\t}\n\n\t\tif ( $this->is_admin_request_for_users_send_email() ) {\n\t\t\t$this->users_send_email();\n\t\t}\n\n\t\tif ( $this->is_admin_request_for_users_remove() ) {\n\t\t\t$this->users_remove_from_list();\n\t\t}\n\n\t\t/* Default settings page */\n\t\t$this->add_view_option( 'data', $this->get_all_requested_users_data( $confirmed_only = true ) );\n\n\t}", "static function adminGateKeeper() {\n if (!loggedIn() || !adminLoggedIn()) {\n new SystemMessage(translate(\"system_message:not_allowed_to_view\"));\n forward(\"home\");\n }\n }", "public function adminOnly();", "public function adminOnly();", "function adminLogin()\n {\n require('view/frontend/adminLoginView.php');\n }", "public function admin()\n {\n redirect(admin_url('authentication'));\n }", "public function indexAction(): void\n {\n echo 'User admin index';\n }", "public function indexAction()\r\n {\r\n echo 'User admin index';\r\n }", "public function admin() {\n\t\tinclude_once(\"paywithafacebookpost_admin.php\");\n\t}", "function admin()\n{\n global $app;\n\n $app->render('admin.html', [\n 'page' => mkPage(getMessageString('admin'), 0, 1),\n 'isadmin' => is_admin()]);\n}", "protected function executeAdminCommand() {}", "protected function executeAdminCommand() {}", "protected function executeAdminCommand() {}", "public function admin() {\n // Check the arguments\n $args = func_get_args();\n\n if (count($args) == 1) {\n if ($this->isPHPScript($args[0])) {\n $this->_adminPanel = array('script' => $args[0]);\n } else {\n $this->_adminPanel = $args[0];\n }\n } elseif (count($args) == 2) {\n // @TODO\n }\n // Implemented by extended classes\n }", "public function admin_init() {}", "function admin_member() {\n\n\t\t}", "private function action_adminAccount()\n\t{\n\t\tglobal $txt, $db_type, $db_connection, $databases, $incontext, $db_prefix, $db_passwd, $webmaster_email;\n\t\tglobal $db_persist, $db_server, $db_user, $db_port;\n\t\tglobal $db_type, $db_name, $mysql_set_mode;\n\n\t\t$incontext['sub_template'] = 'admin_account';\n\t\t$incontext['page_title'] = $txt['user_settings'];\n\t\t$incontext['continue'] = 1;\n\n\t\t// Need this to check whether we need the database password.\n\t\trequire(TMP_BOARDDIR . '/Settings.php');\n\t\tif (!defined('ELK'))\n\t\t{\n\t\t\tdefine('ELK', 1);\n\t\t}\n\t\tdefinePaths();\n\n\t\t// These files may be or may not be already included, better safe than sorry for now\n\t\trequire_once(SOURCEDIR . '/Subs.php');\n\n\t\t$db = load_database();\n\n\t\tif (!isset($_POST['username']))\n\t\t{\n\t\t\t$_POST['username'] = '';\n\t\t}\n\n\t\tif (!isset($_POST['email']))\n\t\t{\n\t\t\t$_POST['email'] = '';\n\t\t}\n\n\t\t$incontext['username'] = htmlspecialchars(stripslashes($_POST['username']), ENT_COMPAT, 'UTF-8');\n\t\t$incontext['email'] = htmlspecialchars(stripslashes($_POST['email']), ENT_COMPAT, 'UTF-8');\n\t\t$incontext['require_db_confirm'] = empty($db_type) || !empty($databases[$db_type]['require_db_confirm']);\n\n\t\t// Only allow create an admin account if they don't have one already.\n\t\t$db->skip_next_error();\n\t\t$request = $db->query('', '\n\t\t\tSELECT \n\t\t\t\tid_member\n\t\t\tFROM {db_prefix}members\n\t\t\tWHERE id_group = {int:admin_group} \n\t\t\t\tOR FIND_IN_SET({int:admin_group}, additional_groups) != 0\n\t\t\tLIMIT 1',\n\t\t\tarray(\n\t\t\t\t'admin_group' => 1,\n\t\t\t)\n\t\t);\n\t\t// Skip the step if an admin already exists\n\t\tif ($request->num_rows() != 0)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t$request->free_result();\n\n\t\t// Trying to create an account?\n\t\tif (isset($_POST['password1']) && !empty($_POST['contbutt']))\n\t\t{\n\t\t\t// Wrong password?\n\t\t\tif ($incontext['require_db_confirm'] && $_POST['password3'] != $db_passwd)\n\t\t\t{\n\t\t\t\t$incontext['error'] = $txt['error_db_connect'];\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Not matching passwords?\n\t\t\tif ($_POST['password1'] != $_POST['password2'])\n\t\t\t{\n\t\t\t\t$incontext['error'] = $txt['error_user_settings_again_match'];\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// No password?\n\t\t\tif (strlen($_POST['password1']) < 4)\n\t\t\t{\n\t\t\t\t$incontext['error'] = $txt['error_user_settings_no_password'];\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (!file_exists(SOURCEDIR . '/Subs.php'))\n\t\t\t{\n\t\t\t\t$incontext['error'] = $txt['error_subs_missing'];\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Update the main contact email?\n\t\t\tif (!empty($_POST['email']) && (empty($webmaster_email) || $webmaster_email == '[email protected]'))\n\t\t\t{\n\t\t\t\tupdateSettingsFile(array('webmaster_email' => $_POST['email']));\n\t\t\t}\n\n\t\t\t// Work out whether we're going to have dodgy characters and remove them.\n\t\t\t$invalid_characters = preg_match('~[<>&\"\\'=\\\\\\]~', $_POST['username']) != 0;\n\t\t\t$_POST['username'] = preg_replace('~[<>&\"\\'=\\\\\\]~', '', $_POST['username']);\n\n\t\t\t$db->skip_next_error();\n\t\t\t$result = $db->query('', '\n\t\t\t\tSELECT \n\t\t\t\t\tid_member, password_salt\n\t\t\t\tFROM {db_prefix}members\n\t\t\t\tWHERE member_name = {string:username} \n\t\t\t\t\tOR email_address = {string:email}\n\t\t\t\tLIMIT 1',\n\t\t\t\tarray(\n\t\t\t\t\t'username' => stripslashes($_POST['username']),\n\t\t\t\t\t'email' => stripslashes($_POST['email']),\n\t\t\t\t)\n\t\t\t);\n\t\t\tif ($result->num_rows() != 0)\n\t\t\t{\n\t\t\t\tlist ($incontext['member_id'], $incontext['member_salt']) = $result->fetch_row();\n\t\t\t\t$result->free_result();\n\n\t\t\t\t$incontext['account_existed'] = $txt['error_user_settings_taken'];\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif (trim($_POST['username']) === '' || strlen($_POST['username']) > 25)\n\t\t\t{\n\t\t\t\t// Try the previous step again.\n\t\t\t\t$incontext['error'] = $_POST['username'] == '' ? $txt['error_username_left_empty'] : $txt['error_username_too_long'];\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($invalid_characters || $_POST['username'] == '_' || $_POST['username'] == '|' || strpos($_POST['username'], '[code') !== false || strpos($_POST['username'], '[/code') !== false)\n\t\t\t{\n\t\t\t\t// Try the previous step again.\n\t\t\t\t$incontext['error'] = $txt['error_invalid_characters_username'];\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (empty($_POST['email']) || !filter_var(stripslashes($_POST['email']), FILTER_VALIDATE_EMAIL) || strlen(stripslashes($_POST['email'])) > 255)\n\t\t\t{\n\t\t\t\t// One step back, this time fill out a proper email address.\n\t\t\t\t$incontext['error'] = sprintf($txt['error_valid_email_needed'], $_POST['username']);\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// All clear, lets add an admin\n\t\t\trequire_once(SUBSDIR . '/Auth.subs.php');\n\n\t\t\t$incontext['member_salt'] = substr(base64_encode(sha1(mt_rand() . microtime(), true)), 0, 16);\n\n\t\t\t// Format the username properly.\n\t\t\t$_POST['username'] = preg_replace('~[\\t\\n\\r\\x0B\\0\\xA0]+~', ' ', $_POST['username']);\n\t\t\t$ip = isset($_SERVER['REMOTE_ADDR']) ? substr($_SERVER['REMOTE_ADDR'], 0, 255) : '';\n\n\t\t\t// Get a security hash for this combination\n\t\t\t$password = stripslashes($_POST['password1']);\n\t\t\t$incontext['passwd'] = validateLoginPassword($password, '', $_POST['username'], true);\n\n\t\t\t$request = $db->insert('',\n\t\t\t\t$db_prefix . 'members',\n\t\t\t\tarray(\n\t\t\t\t\t'member_name' => 'string-25', 'real_name' => 'string-25', 'passwd' => 'string', 'email_address' => 'string',\n\t\t\t\t\t'id_group' => 'int', 'posts' => 'int', 'date_registered' => 'int', 'hide_email' => 'int',\n\t\t\t\t\t'password_salt' => 'string', 'lngfile' => 'string', 'avatar' => 'string',\n\t\t\t\t\t'member_ip' => 'string', 'member_ip2' => 'string', 'buddy_list' => 'string', 'pm_ignore_list' => 'string',\n\t\t\t\t\t'message_labels' => 'string', 'website_title' => 'string', 'website_url' => 'string',\n\t\t\t\t\t'signature' => 'string', 'usertitle' => 'string', 'secret_question' => 'string',\n\t\t\t\t\t'additional_groups' => 'string', 'ignore_boards' => 'string',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\tstripslashes($_POST['username']), stripslashes($_POST['username']), $incontext['passwd'], stripslashes($_POST['email']),\n\t\t\t\t\t1, 0, time(), 0,\n\t\t\t\t\t$incontext['member_salt'], '', '',\n\t\t\t\t\t$ip, $ip, '', '',\n\t\t\t\t\t'', '', '',\n\t\t\t\t\t'', '', '',\n\t\t\t\t\t'', '',\n\t\t\t\t),\n\t\t\t\tarray('id_member')\n\t\t\t);\n\n\t\t\t// Awww, crud!\n\t\t\tif ($request->hasResults() === false)\n\t\t\t{\n\t\t\t\t$incontext['error'] = $txt['error_user_settings_query'] . '<br />\n\t\t\t\t<div style=\"margin: 2ex;\">' . nl2br(htmlspecialchars($db->last_error($db_connection), ENT_COMPAT, 'UTF-8')) . '</div>';\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$incontext['member_id'] = $db->insert_id(\"{$db_prefix}members\", 'id_member');\n\n\t\t\t// If we're here we're good.\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "function check_admin() {\n\t\t// check session exists\n\t\tif(!$this->Session->check('Admin')) {\n\t\t\t$this->Session->setFlash(__('ERROR: You must be logged in for that action.', true));\n\t\t\t$this->redirect(array('controller'=>'contenders', 'action'=>'index', 'admin'=>false));\n\t\t}\n\t}", "public function indexAction()\n\t{\t\t\n\t\tif(!authorization::areWeLoggedIn())\n\t\t{\n\t\t\t//we do it this way so that certain applicatiob classes can override the super Login action\n\t\t\tglobalRegistry::getInstance()->setRegistryValue('event','login_application_grabs_control','true');\n\t\t\t$this->doLogin();\n\t\t}\n\t\t\n\t\t\n\t\t\t\t\n\t}", "public function admin_page()\n {\n }", "public function admin_page()\n {\n }", "protected function startup()\n\t{\n\t\tparent::startup();\n\n\t\tif (!$this->getUser()->isAllowed($this->getName(), $this->getAction())) {\n\t\t\t$this->flashMessage('Daná sekcia alebo akcia je dostupná len po prihlásení.\n\t\t\t\tAk ste prihlásený požiadajte administrátora o pridelenie\n\t\t\t\toprávnení pre túto sekciu.');\n\n\t\t\tif ($this->loginPresenter) {\n\t\t\t\t$this->redirect('Administration:default');\n\t\t\t}\n\t\t}\n\t}", "public function admin() {\n\n\t\t\tif ( ! is_admin() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\trequire_once $this->includes_path() . 'admin/class-cyprus-admin.php';\n\t\t}", "function mod_core_admin() {\n\t\tglobal $NeptuneCore;\n\t\tglobal $NeptuneSQL;\n\t\tglobal $NeptuneAdmin;\n\t\t\n\t\tif (!isset($NeptuneCore)) {\n\t\t\t$NeptuneCore = new NeptuneCore();\n\t\t}\t\n\t\tif (!isset($NeptuneSQL)) {\n\t\t\t$NeptuneSQL = new NeptuneSQL();\n\t\t}\t\n\t\tif (!isset($NeptuneAdmin)) {\n\t\t\t$NeptuneAdmin = new NeptuneAdmin();\n\t\t}\t\n\t\t\n\t\t\n\t\tif (neptune_get_permissions() >= 3) {\n\t\t\t$query = $NeptuneCore->var_get(\"system\",\"query\");\n\t\t\tif (@isset($query[1]) && @isset($query[2])) {\n\t\t\t\t$AdminFunction = \"acp_\" . $query[1] . \"_\" . $query[2];\n\t\t\t\t\n\t\t\t\t$AdminFunction();\n\t\t\t} else {\n\t\t\t\t$NeptuneAdmin->run();\n\t\t\t}\n\t\t} else {\n\t\t\t$NeptuneCore->title($NeptuneCore->var_get(\"locale\",\"accessdenied\"));\n\t\t\t$NeptuneCore->neptune_echo(\"<p>\" . $NeptuneCore->var_get(\"locale\",\"nopermission\") . \"</p>\");\n\t\t\t\n\t\t\theader(\"HTTP/1.1 403 Forbidden\");\n\t\t}\n\t}", "public function checkAdmin();", "public function GetAdmin ();", "public function addadminAction()\n {\n $this->doNotRender();\n\n $email = $this->getParam('email');\n $user = \\Entity\\User::getOrCreate($email);\n\n $user->stations->add($this->station);\n $user->save();\n\n \\App\\Messenger::send(array(\n 'to' => $user->email,\n 'subject' => 'Access Granted to Station Center',\n 'template' => 'newperms',\n 'vars' => array(\n 'areas' => array('Station Center: '.$this->station->name),\n ),\n ));\n\n $this->redirectFromHere(array('action' => 'index', 'id' => NULL, 'email' => NULL));\n }", "function admin_login() {\n\t\t$this->layout = \"admin\";\n\t\t\n\t}", "function admin_login() {\n\t\t$this->layout = \"admin\";\n\t\t\n\t}", "public function actionLogin()\n\t{\n\t\tif ($this->getUser()->isLoggedIn())\n\t\t\t$this->redirect('Administration:default');\n\t}", "protected function ensureAdminRoleIfRequested() {}", "public function actionDummyAdminLogin()\n\t{\n\t\t$identity = new DummyUserIdentity(1);\n\n\t\tif ($identity->authenticate())\n\t\t\tYii::app()->user->login($identity);\n\n\t\t$this->redirect(array('home/index'));\n\t}", "function anuncios_admin() {\n\t\tinclude('anuncios_admin.php');\n\t}", "public function admin()\n {\n $this->template_admin->displayad('admin');\n }", "public function adminAction()\n {\n //$this->cryptCollabs();\n return $this->render('PPEGSBBundle:Default:admin.html.twig');\n }", "public function isAdmin() {}", "public function actionLogin() {\n \n }", "public function actionAdmin()\n\t{\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t$this->layout = 'admin';\n\n\t\t$this->render('admin');\n\t}", "protected function isAdminUser() {}", "public function add_actions() {\n\t\tif ( is_admin() ) {\n\n\t\t\t// Add the menu screen for inserting license information\n\t\t\tadd_action( 'admin_init', \t\tarray( $this, 'register_license_settings' ) );\n\t\t\tadd_action( 'admin_init', \t\tarray( $this, 'activate_license' ) );\n\t\t\tadd_action( 'admin_init', \t\tarray( $this, 'deactivate_license' ) );\n\t\t\tadd_action( 'admin_notices', \tarray( $this, 'admin_notices' ) );\n\t\t\tadd_action( 'eael_licensing', [ $this, 'render_licenses_page' ] );\n\n\t\t}\n\t}", "public function relatorio4(){\n $this->isAdmin();\n }", "public function adminmenu()\n {\n\n $vue = new ViewAdmin(\"Administration\");\n $vue->generer(array());\n }", "public static function adminPage(){\n\t\tif(!self::isAdmin()){\n\t\t\theader(\"Location: index.php\");\n\t\t\texit;\n\t\t}\n\t}", "public function isAdmin();", "function index() {\n\t\tif($this->Session->check('Auth.Adminuser')){\n\t\t\t$this->redirect(array('controller'=>'roles','action' => \"home\"));\n\t\t}\n\t\telse {\n\t\t\t$this->Session->setFlash(__d('adminuser','You are not authorized to access this location.',true));\n\t\t\t$this->redirect(array('controller'=>'roles','action' => \"login\"));\n\t\t}\n\t}", "public function administration()\n {\n\n if (!empty($_SESSION) && $_SESSION['login'] == 'admin') {\n\n if (isset($_GET['deconnexion'])) {\n\n session_destroy();\n header('Location: .');\n exit();\n } elseif (isset($_GET['Appli'])) {\n $this->ctrlAdminAppli->adminappli();\n } elseif (isset($_GET['Data'])) {\n\n $this->ctrlAdminData->admindata();\n } else {\n\n $this->ctrlAdminmenu->adminmenu();\n }\n } else {\n $this->ctrlConnexion->connexion();\n }\n }", "public function actionIndex() {\n \n $this->redirect('admin');\n \n\t}", "public function indexAction()\n {\n $this->view->title = 'Li-No | Admin Index';\n $this->_forward('login', 'auth');\n }", "public function loginAdminAction(){\n if(!empty($_POST)){\n $user = new User();\n if(!$user->login(true)){\n $_SESSION['error'] = 'Login/Passwort ist falsch';\n }\n if(User::isAdmin()){\n redirect(ADMIN);\n }else{\n redirect();\n }\n }\n $this->layout = 'login';\n }", "public function checkLoginAdmin() {\n $this->login = User::loginAdmin();\n $type = UserType::read($this->login->get('idUserType'));\n if ($type->get('managesPermissions')!='1') {\n $permissionsCheck = array('listAdmin'=>'permissionListAdmin',\n 'insertView'=>'permissionInsert',\n 'insert'=>'permissionInsert',\n 'insertCheck'=>'permissionInsert',\n 'modifyView'=>'permissionModify',\n 'modifyViewNested'=>'permissionModify',\n 'modify'=>'permissionModify',\n 'multiple-activate'=>'permissionModify',\n 'sortSave'=>'permissionModify',\n 'delete'=>'permissionDelete',\n 'multiple-delete'=>'permissionDelete');\n $permissionCheck = $permissionsCheck[$this->action];\n $permission = Permission::readFirst(array('where'=>'objectName=\"'.$this->type.'\" AND idUserType=\"'.$type->id().'\" AND '.$permissionCheck.'=\"1\"'));\n if ($permission->id()=='') {\n if ($this->mode == 'ajax') {\n return __('permissionsDeny');\n } else { \n header('Location: '.url('NavigationAdmin/permissions', true));\n exit();\n }\n }\n }\n }", "public function actionAdmin()\n {\n if (User::findOne(['email' => '[email protected]'])) {\n echo \"Руководитель уже существует\\n\";\n\n return ExitCode::USAGE;\n }\n\n $user = new User();\n $user->email = '[email protected]';\n $user->full_name = 'Тестовый Руководитель';\n $user->is_admin = 1;\n $user->password = Yii::$app->security->generatePasswordHash('test');\n $user->save();\n echo \"Руководитель создан\\n\";\n\n return ExitCode::OK;\n }", "public function login_page()\n\t{\n\t\t$this->redirect( EagleAdminRoute::get_login_route() );\n\t}", "function admin()\n{\n # clear the user session by default upon reaching this page\n clearUserSession();\n\n header('Location: ./adminLogin');\n exit;\n}", "public function adminMethod(){\n return 'ok';\n }", "public function actionIndex()\n {\n $authManager = \\Yii::$app->authManager;\n $adminRole = $authManager->createRole(\"admin\");\n $authManager->add($adminRole);\n $adminUser = new AccountUser();\n $adminUser->username = \"admin\";\n $adminUser->password = \"pf3Zt49nsgoPFbr\";\n $adminUser->authKey= uniqid();\n $adminUser->accessToken = uniqid();\n if ($adminUser->save()) {\n $authManager->assign($adminRole, $adminUser->id);\n /*assign the role */\n }\n }", "public function action_index()\n\t{\n\t\tglobal $context, $modSettings;\n\n\t\t// Make sure the administrator has a valid session...\n\t\tvalidateSession();\n\n\t\t// Load the language and templates....\n\t\tTxt::load('Admin');\n\t\ttheme()->getTemplates()->load('Admin');\n\t\tloadCSSFile('admin.css');\n\t\tloadJavascriptFile('admin.js', array(), 'admin_script');\n\n\t\t// The Admin functions require Jquery UI ....\n\t\t$modSettings['jquery_include_ui'] = true;\n\n\t\t// No indexing evil stuff.\n\t\t$context['robot_no_index'] = true;\n\n\t\t// Need these to do much\n\t\trequire_once(SUBSDIR . '/Admin.subs.php');\n\n\t\t// Actually create the menu!\n\t\t$admin_include_data = $this->loadMenu();\n\t\t$this->buildLinktree($admin_include_data);\n\n\t\tcallMenu($admin_include_data);\n\t}", "public function index()\n {\n if ($this->session->userdata('admin_login') != 1)\n redirect(base_url() . 'login', 'refresh');\n }", "public function admin_menu() {\n\n $capability = CL_Common::get_option( 'capability', 'general', 'manage_options' );\n\n $this->menu_page = add_options_page(\n __( 'Custom Login Settings', CUSTOM_LOGIN_DIRNAME ),\n __( 'Custom Login', CUSTOM_LOGIN_DIRNAME ),\n $capability,\n CUSTOM_LOGIN_DIRNAME,\n array( $this, 'settings_page' )\n );\n }", "public function isAdmin()\n {\n }", "public function actionAdmin()\n\t{ \n\t\t$this->render('review_admin');\n\t}", "public function SystemAdministratorAction()\n {\n $this->requireRoleOrRedirect('SystemAdministrator');\n $this->view->setLayout('application');\n $this->view->userProfile = (new \\Apprecie\\Library\\Security\\Authentication())->getAuthenticatedUser(\n )->getUserProfile();\n }", "public function admin_init(){\n\n\t}", "public static function requireAdmin()\n {\n if(!SessionHelper::isAdmin()){\n header('location: ' . (string)getenv('URL') . '/');\n }\n }", "public function controlActions(){\n // Check if the tables are created.\n $this->mode = 'admin';\n $this->object = new $this->type();\n $this->titlePage = __((string)$this->object->info->info->form->title);\n $this->layout = (string)$this->object->info->info->form->layout;\n $this->menuInside = $this->menuInside();\n $ui = new NavigationAdmin_Ui($this);\n switch ($this->action) {\n default:\n header('Location: '.url($this->type.'/listAdmin', true));\n exit();\n break;\n case 'listAdmin':\n /**\n * This is the main action for the BackEnd. If we are in DEBUG mode\n * it will create the table automatically.\n */\n $this->checkLoginAdmin();\n $this->content = $this->listAdmin();\n return $ui->render();\n break;\n case 'insertView':\n /**\n * This is the action that shows the form to insert a record in the BackEnd.\n */\n $this->checkLoginAdmin();\n $this->content = $this->insertView();\n return $ui->render();\n break;\n case 'insert':\n /**\n * This is the action that inserts a record in the BackEnd.\n * If the insertion is successful it shows a form to check the record,\n * if not it creates a form with the errors to correct.\n */\n $this->checkLoginAdmin();\n $insert = $this->insert();\n if ($insert['success']=='1') {\n header('Location: '.url($this->type.'/insertCheck/'.$insert['id'], true));\n exit();\n } else {\n $this->messageError = __('errorsForm');\n $this->content = $insert['html'];\n return $ui->render();\n }\n break;\n case 'modifyView':\n case 'modifyViewCheck':\n case 'insertCheck':\n /**\n * This is the action that shows the form to check a record insertion.\n */\n $this->checkLoginAdmin();\n $this->message = ($this->action=='insertCheck' || $this->action=='modifyViewCheck') ? __('savedForm') : '';\n $this->content = $this->modifyView();\n return $ui->render();\n break;\n case 'modifyViewNested':\n /**\n * This is the action that shows the form to modify a record.\n */\n $this->checkLoginAdmin();\n $this->object = $this->object->readObject($this->id);\n $uiObjectName = $this->type.'_Ui';\n $uiObject = new $uiObjectName($this->object);\n $values = array_merge($this->object->valuesArray(), $this->values);\n $this->content = $uiObject->renderForm(array_merge(\n array('values'=>$values,\n 'action'=>url($this->type.'/modifyNested', true),\n 'class'=>'formAdmin formAdminModify',\n 'nested'=>true),\n array()));\n return $ui->render();\n break;\n case 'modify':\n case 'modifyNested':\n /**\n * This is the action that updates a record when updating it.\n */\n $this->checkLoginAdmin();\n $nested = ($this->action == 'modifyNested') ? true : false;\n $modify = $this->modify($nested);\n if ($modify['success']=='1') {\n if (isset($this->values['submit-saveCheck'])) {\n header('Location: '.url($this->type.'/modifyViewCheck/'.$modify['id'], true));\n } else {\n header('Location: '.url($this->type.'/listAdmin', true));\n }\n exit();\n } else {\n $this->messageError = __('errorsForm');\n $this->content = $modify['html'];\n return $ui->render();\n }\n break;\n case 'delete':\n /**\n * This is the action that deletes a record.\n */\n $this->checkLoginAdmin();\n if ($this->id != '') {\n $type = new $this->type();\n $object = $type->readObject($this->id);\n $object->delete();\n }\n header('Location: '.url($this->type.'/listAdmin', true));\n exit();\n break;\n case 'sortSave':\n /**\n * This is the action that saves the order of a list of records.\n * It is used when sorting using the BackEnd.\n */\n $this->checkLoginAdmin();\n $this->mode = 'ajax';\n $object = new $this->type();\n $newOrder = (isset($this->values['newOrder'])) ? $this->values['newOrder'] : array();\n $object->updateOrder($newOrder);\n break;\n case 'sortList':\n /**\n * This is the action that changes the order of the list.\n */\n $this->checkLoginAdmin();\n $object = new $this->type();\n $info = explode('_', $this->id);\n if (isset($info[1]) && $object->attributeInfo($info[1])!='') {\n $orderType = ($info[0]=='asc') ? 'asc' : 'des';\n Session::set('ord_'.$this->type, $orderType.'_'.$info[1]);\n }\n header('Location: '.url($this->type, true));\n exit();\n break;\n case 'addSimple':\n /**\n * This is the action that adds a simple record.\n */\n $this->checkLoginAdmin();\n $this->mode = 'ajax';\n $formObject = $this->type.'_Form';\n $form = new $formObject();\n return $form->createFormFieldMultiple();\n break;\n case 'multiple-delete':\n /**\n * This is the action that deletes multiple records at once.\n */\n $this->checkLoginAdmin();\n $this->mode = 'ajax';\n if (isset($this->values['list-ids'])) {\n $type = new $this->type();\n foreach ($this->values['list-ids'] as $id) {\n $object = $type->readObject($id);\n $object->delete();\n }\n }\n break;\n case 'multiple-activate':\n case 'multiple-deactivate':\n /**\n * This is the action that activates or deactivates multiple records at once.\n * It just works on records that have an attribute named \"active\",\n */\n $this->checkLoginAdmin();\n $this->mode = 'ajax';\n if (isset($this->values['list-ids'])) {\n $primary = (string)$this->object->info->info->sql->primary;\n $where = '';\n foreach ($this->values['list-ids'] as $id) {\n $where .= $primary.'=\"'.$id.'\" OR ';\n }\n $where = substr($where, 0, -4);\n $active = ($this->action == 'multiple-activate') ? '1' : '0';\n $query = 'UPDATE '.Db::prefixTable($this->type).' SET active=\"'.$active.'\" WHERE '.$where;\n Db::execute($query);\n }\n break;\n case 'autocomplete':\n /**\n * This is the action that returns a json string with the records that match a search string.\n * It is used for the autocomplete text input.\n */\n $this->mode = 'json';\n $autocomplete = (isset($_GET['term'])) ? $_GET['term'] : '';\n if ($autocomplete!='') {\n $where = '';\n $concat = '';\n $items = explode('_', $this->id);\n foreach ($items as $itemIns) {\n $item = $this->object->attributeInfo($itemIns);\n $name = (string)$item->name;\n if (is_object($item) && $name!='') {\n $concat .= $name.',\" \",';\n $where .= $name.' LIKE \"%'.$autocomplete.'%\" OR ';\n }\n }\n $where = substr($where, 0, -4);\n $concat = 'CONCAT('.substr($concat, 0, -5).')';\n if ($where!='') {\n $query = 'SELECT '.(string)$this->object->info->info->sql->primary.' as idItem, \n '.$concat.' as infoItem\n FROM '.Db::prefixTable($this->type).'\n WHERE '.$where.'\n ORDER BY '.$name.' LIMIT 20';\n $results = array();\n $resultsAll = Db::returnAll($query);\n foreach ($resultsAll as $result) {\n $resultsIns = array();\n $resultsIns['id'] = $result['idItem'];\n $resultsIns['value'] = $result['infoItem'];\n $resultsIns['label'] = $result['infoItem'];\n array_push($results, $resultsIns);\n }\n return json_encode($results); \n }\n }\n break;\n case 'search':\n /**\n * This is the action that does the default \"search\" on a content object.\n */\n $this->checkLoginAdmin();\n if ($this->id != '') {\n $this->content = $this->listAdmin();\n return $ui->render();\n } else {\n if (isset($this->values['search']) && $this->values['search']!='') {\n $searchString = urlencode(html_entity_decode($this->values['search']));\n header('Location: '.url($this->type.'/search/'.$searchString, true));\n } else {\n header('Location: '.url($this->type.'/listAdmin', true));\n } \n }\n break;\n case 'export-json':\n /**\n * This is the action that exports the complete list of objects in JSON format.\n */\n $this->mode = 'ajax';\n $query = 'SELECT * FROM '.Db::prefixTable($this->type);\n $items = Db::returnAll($query);\n $file = $this->type.'.json';\n $options = array('content'=>json_encode($items), 'contentType'=>'application/json');\n File::download($file, $options);\n return '';\n break;\n }\n }", "function ad_restr()\n\t{\n\t\tif (!$this->is_admin_logged_in())\n\t\t\tredirect(base_url('admin/login'));\n\t}", "private function admin_hooks() {\n\t\t\n\t\t// Actions\n\t\t// Load Nav injection\n\t\t$this->add_action ('admin_menu', $this->nav, 'plugin_menu' );\n\t\t\n\t\t// Load Dashboard widget\n\t\t$this->add_action ('wp_dashboard_setup', $this->admin, 'dashboard');\n\t\t\n\t\t// Load Edit Post additions\n\t\t// $this->add_action ('add_meta_boxes', $this->admin, 'post_edit' );\n\n\t\t// Load social toggles on submitbox, if the setting is available\n\t\t// if (get_option('smmp_view_submitbox'))\n\t\t//\t$this->add_action ('post_submitbox_misc_actions', $this->admin, 'admin_post_submitbox' );\n\t\t\n\t\t// On post update/save\n\t\t// $this->add_action ('save_post', $this->admin, 'admin_post_submitbox_submit');\n\t\t\n\t\t\n\t\t// Load Expired Account notice\n\t\t/*try {$this->admin->validate_accounts (); }\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$this->add_action ('admin_notices', $this->admin, 'notice_accounts' );\n\t\t}*/\n\t\t\n\t\t// Filters\n\t\t// Prevent inner links for flow-drive images\n\t\t$this->add_action ('image_downsize', $this->admin, 'filter_image_downsize', 10, 3);\n\t}", "private function authorizeAdmins() {\n\n $authorizedRoleIds = Configure::read('acl.role.access_plugin_role_ids');\n $authorizedUserIds = Configure::read('acl.role.access_plugin_user_ids');\n\n $modelRoleFk = $this->_getRoleForeignKeyName();\n\n if (in_array($this->Auth->user($modelRoleFk), $authorizedRoleIds) || in_array(\n $this->Auth->user($this->getUserPrimaryKeyName()),\n $authorizedUserIds)) {\n // Allow all actions. CakePHP 2.0\n $this->Auth->allow('*');\n\n // Allow all actions. CakePHP 2.1\n $this->Auth->allow();\n }\n }", "public function beforeFilter() {\n parent::beforeFilter();\n\n if ($this->Auth->user('role') == 'admin') {\n \t$this->Auth->allow('index', 'add', 'edit', 'delete', 'logout');\t\n }\n elseif ($this->Auth->user('role') == 'user') {\n \t$this->Auth->allow('add', 'logout');\t\n }\n }", "public function run()\n {\n $editAdmin = new Permission();\n $editAdmin->name = 'edit-admin';\n $editAdmin->display_name = 'Edit admin';\n $editAdmin->description = 'create\\delete\\edit admin';\n $editAdmin->save();\n }", "public function connexionSuperAdminLogin(){\n }", "function checkPermissionAdmin() \n\t{\n\t \n\t if(!isset($_SESSION['admin']['id']))\n\t {\n $this->Session->setFlash('Please sign in to view this page.');\n \t//$this->flash(__('Session Expired!!', true), array('controller'=>'admins','action'=>'adminLogin'));\n\t\t $this->redirect(array('controller'=>'admins','action'=>'login'), null, true);\n\t }\n\t}", "public function admin_dashboard() {\n $userData = $this->Auth->user();\n $role = $userData['role'];\n if ($role == \"admin\") {\n $this->loadModel('Post');\n $this->loadModel('Event');\n $this->loadModel('Massege');\n $datalist = $this->User->userList();\n $eventlist = $this->Event->eventList();\n $postlist = $this->Post->postList();\n $massege = $this->Massege->massegesList();\n $datacount = count($datalist);\n $eventcount = count($eventlist);\n $postcount = count($postlist);\n $this->set('users', $datalist);\n $this->set('user', $datacount);\n $this->set('event', $eventcount);\n $this->set('post', $postcount);\n $this->set('massege', $massege);\n $this->render('/Users/dashboard');\n } else {\n $this->redirect(array('controller' => 'users', 'action' => 'admin_logout'));\n }\n }", "public function loginCheckAction()\n {\n }", "public function IsAdmin ();", "protected function initialize(){\n\t\tif (!$this->session->has(\"admin_name\")){\n\t\t\t$this->dispatcher->forward(array(\n\t\t\t\"controller\" => \"login\",\n\t\t\t\"action\" => \"login\",\t\t\t\n\t\t\t)\n\t\t);\n\t\t}\n\t}", "function xanthia_admin_main()\n{\n\t/** Security check - important to do this as early as possible to avoid\n\t* potential security holes or just too much wasted processing. For the\n\t* main function we want to check that the user has at least edit privilege\n\t* for some item within this component, or else they won't be able to do\n\t* anything and so we refuse access altogether. The lowest level of access\n\t* for administration depends on the particular module, but it is generally\n\t* either 'edit' or 'delete'\n\t*/\n if (!pnSecAuthAction(0, 'Xanthia::', '::', ACCESS_EDIT)) {\n return pnVarPrepHTMLDisplay(_MODULENOAUTH);\n }\n // Load user API\n\tif (!pnModAPILoad('Xanthia','user')) {\t \n pnSessionSetVar('errormsg', pnVarPrepHTMLDisplay(_XA_APILOADFAILED));\n pnRedirect(pnModURL('Xanthia', 'admin', 'view'));\n return true;\n\t}\n // Return the Admin View Function\n\t//return xanthia_adminmenu();\n\treturn xanthia_admin_view();\n}", "public function beforeFilter()\n {\n parent::beforeFilter();\n $this->Auth->allow('admin_index');\n\n }", "public function displayAdminPanel() {}", "public function loginCheckAction()\n {\n\n }", "public function authSiteAdmin(){\n\n\t\t$token = Input::get('token');\n\t\t$tokenExists = TokenModel::where('token = ?', $token)\n\t\t\t\t\t\t\t\t\t->all();\n\t\t//invalid token used/no access token provided\n\t\tif (!$tokenExists->num_rows()) {\t\t \n\t\t\theader('HTTP/1.0 403 Forbidden');\n\t\t\tdie('Login required!1');\n\t\t}\n\t\t//check for expired token\n\t\telseif ($tokenExists->result_array()[0]['logout'] === true) {\n\t\t\theader('HTTP/1.0 403 Forbidden');\n\t\t\tdie('Login required!2');\n\t\t}\n\t\t//unathorized user access to admin controller\n\t\telseif ($tokenExists->result_array()[0]['user_role'] != 1 ) {\n\t\t\theader('HTTP/1.0 401 Unauthorized'); \n\t\t\tdie('Restricted access!');\n\t\t}\n\t\telse {\n\t\t\t//check for expired timestamp\n\t\t\t$token = $tokenExists->result_array()[0];\n\t\t\t$timestamp = strtotime($token['date_modified'] OR $token['date_created']);\n\n\t\t\tif (($timestamp + $token['duration']) > time()) {\n\t\t\t\theader('HTTP/1.0 403 Forbidden');\n\t\t\t\tdie('Login required!3');\n\t\t\t}\n\n\t\t\t//extend token lifespan\n\t\t\tTokenModel::where('id = ?', $token['id'])\n\t\t\t\t\t\t->save(array(\n\t\t\t\t\t\t\t'duration' => 3600\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t}\n\n\t}", "public function index()\n\t{\n\t\tif($this->session->userdata('admin_login') == 1)redirect(base_url().'index.php/admin/dashboard' , 'refresh');\n\t\telse redirect(base_url().'index.php/admin/login' , 'refresh');\n\t}", "protected function adminAction()\n {\n $this->requestCallback();\n\n $url = \\add_query_arg(\n [self::NOTICE => 1],\n \\remove_query_arg(\n [RestDispatch::QUERY_CACHE_DELETE, RestDispatch::QUERY_CACHE_REFRESH],\n \\wp_get_referer()\n )\n );\n \\wp_safe_redirect($url);\n exit;\n }", "public function admin_setup()\n\t{\n\t\t\n\t}", "public function action_admin_login($smarty, $smartyLoader, $request)\r\n {\r\n if($request['method'] == 'post')\r\n {\r\n $this->login($request, \"/\".Config::get('location', 'location', 'admin'));\r\n }\r\n }", "static function admin_init ()\n {\n add_menu_page(\n __x('People', 'admin menu page title'),\n __x('People', 'admin menu title'),\n 'read',\n 'epfl-people',\n null, // Render callback\n 'dashicons-calendar', // Icon type\n 70 // Position\n );\n }", "function admin()\n\t{\t\t\n\t\tif ($this->tank_auth->is_logged_in()) {\t\t\t\t\t\t\t\t\t// logged in\n\t\t\tredirect('');\n\t\t\n\t\t} else {\t\n\t\t$this->form_validation->set_rules('login_admin', 'Login', 'trim|required|xss_clean');\n\t\t$this->form_validation->set_rules('h-password_admin', 'Password', 'trim|required|xss_clean');\t\t\n\t\t/*if ($this->config->item('login_count_attempts', 'tank_auth') AND\n\t\t\t\t($login = $this->input->post('login_admin'))) {\n\t\t\t$login = $this->security->xss_clean($login);\n\t\t} else {*/\n\t\t\t$login = '';\n\t\t//}\n\t\t// Get login for counting attempts to login\n\t\t$data['use_recaptcha'] = $this->config->item('use_recaptcha', 'tank_auth');\n\t\t/*if ($this->tank_auth->is_max_login_attempts_exceeded($login)) {\n\t\t\tif ($data['use_recaptcha'])\n\t\t\t\t$this->form_validation->set_rules('recaptcha_response_field', 'Confirmation Code', 'trim|xss_clean|required|callback__check_recaptcha');\n\t\t\telse\n\t\t\t\t$this->form_validation->set_rules('captcha', 'Confirmation Code', 'trim|xss_clean|required|callback__check_captcha');\n\t\t}*/\n\t\t$data['errors'] = array();\n\t\n\t\tif ($this->form_validation->run()) {\t\t\t\t\t\t\t\t// validation ok\t\n\t\t\n\t\t\tif ($this->tank_auth->login_admin(\n\t\t\t\t\t$this->form_validation->set_value('login_admin'),\n\t\t\t\t\t$this->form_validation->set_value('h-password_admin')\t\t\t\t\t\n\t\t\t\t\t)) {\t\t// success\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tif($this->form_validation->set_value('login_admin') == \"admin\") {\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tredirect('/admin/main');\n\t\t\t\t} elseif($this->form_validation->set_value('login_admin') == \"service\") {\n\t\t\t\t\tredirect('admin/main_service');\n\t\t\t\t} elseif($this->form_validation->set_value('login_admin') == \"number\") {\n\t\t\t\t\tredirect('admin/main_number');\n\t\t\t\t} elseif($this->form_validation->set_value('login_admin') == \"report\") {\n\t\t\t\t\tredirect('admin/main_report');\n\t\t\t\t} elseif($this->form_validation->set_value('login_admin') == \"enkhamgalan\") {\n\t\t\t\t\tredirect('admin/main_sms');\n\t\t\t\t} elseif($this->form_validation->set_value('login_admin') == \"polls\") {\n\t\t\t\t\tredirect('admin/main_poll');\n\t\t\t\t}\n\t\t\t\tredirect('admin/main');\t\n\t\t\t} else {\n\t\t\t\t$errors = $this->tank_auth->get_error_message();\n\t\t\t\tforeach ($errors as $k => $v)\t$data['errors'][$k] = $this->lang->line($v);\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t$data['show_captcha'] = FALSE;\n\t\t/*if ($this->tank_auth->is_max_login_attempts_exceeded($login)) {\n\t\t\t$data['show_captcha'] = TRUE;\n\t\t\tif ($data['use_recaptcha']) {\n\t\t\t\t$data['recaptcha_html'] = $this->_create_recaptcha();\n\t\t\t} else {\n\t\t\t\t$data['captcha_html'] = $this->_create_captcha();\n\t\t\t}\n\t\t}*/\n\t\t$data['title'] = \"Админ хэсгийн удирдлага\";\n\t\t\n\t\t$this->load->view('admin/admin_branch', $data);\t\t\n\t\t}\n\t}" ]
[ "0.74784833", "0.74784833", "0.7398926", "0.71068454", "0.7002383", "0.697422", "0.6952154", "0.6948259", "0.688856", "0.6834993", "0.68231755", "0.6816539", "0.67888814", "0.6762104", "0.674781", "0.6708848", "0.67025197", "0.67025197", "0.6699145", "0.66877", "0.6664615", "0.6662441", "0.6648819", "0.66487145", "0.6642471", "0.6642471", "0.6642471", "0.66280466", "0.66202706", "0.66059923", "0.65813655", "0.6575529", "0.6573318", "0.6568762", "0.6568762", "0.65639514", "0.65509605", "0.6539136", "0.6533487", "0.6529662", "0.652654", "0.6519914", "0.6519914", "0.65189195", "0.65170383", "0.6514405", "0.6505965", "0.6498104", "0.64922315", "0.6485889", "0.6440898", "0.64393073", "0.6438755", "0.64340264", "0.64335597", "0.64295876", "0.64250916", "0.6421376", "0.6417056", "0.64018345", "0.6396961", "0.6383527", "0.6378114", "0.6373176", "0.63622487", "0.6361326", "0.63610786", "0.6354217", "0.6351538", "0.6351031", "0.63487864", "0.6340097", "0.6339632", "0.6334833", "0.63323617", "0.63232374", "0.6323187", "0.63221794", "0.6318383", "0.6311065", "0.63028276", "0.63020766", "0.6297202", "0.629127", "0.6290769", "0.6275991", "0.6271925", "0.6270241", "0.6267596", "0.62661535", "0.6264462", "0.6261231", "0.62593997", "0.6255504", "0.6254277", "0.625217", "0.6250001", "0.62439775", "0.62416434", "0.62411016" ]
0.6258875
93
Validates a value. A validator class can implement this method to support data validation out of the context of a data model.
protected function validateValue($value) { $number = preg_replace('/[^0-9]/', '', $value); // strip non numeric characters if (empty($this->typeValue) || empty($this->_cards) || empty($this->_cards[$this->typeValue])) { return [$this->invalidTypeMessage, ['number' => $number]]; } if (!$this->validCard($number)) { return [$this->message, ['number' => $number]]; } if ($this->validateHolder && !$this->isValidHolder()) { return [$this->invalidHolderMessage, ['holder' => $this->holderValue, 'holder']]; } if ($this->validateExpiry && !$this->isValidExpiry()) { return [$this->invalidExpiryMessage, ['expiry' => $this->getExpiryDate()], ['expiryMonth', 'expiryYear']]; } if ($this->validateCVV && !$this->isValidCVV()) { return [$this->invalidCVVMessage, ['cvv' => $this->cvvValue], 'cvv']; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validateValue($value)\n {\n }", "abstract protected function validateValue($value);", "public static function validate($value);", "public static function Validate($value) { self::__Validate($value,self::Values(),__CLASS__); }", "public function validate($value);", "public function validate($value);", "protected abstract function doValidate($value);", "protected abstract function doValidate($value);", "public function validate(ValueContext $valueContext);", "abstract protected function isValidValue($value);", "abstract public function validate(\n $value\n ): bool;", "public function validate($value) {\n return TRUE;\n }", "abstract public function getIsValidValue($value);", "abstract public function validate($value, Result $result);", "public function validate() {\n if (!empty($this->value)) {\n parent::validate();\n }\n }", "public function validate($value) {\n\t\tif ($this->required && empty($value) && $value !== '0') {\n\t\t\tthrow new ValidationException(elgg_echo('validation:error:required'));\n\t\t}\n\n\t\tif (empty($value)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ($this->type === 'email') {\n\t\t\t$email = new EmailValidator();\n\t\t\t$email->validate($value);\n\t\t}\n\n\t\tif ($this->type === 'url') {\n\t\t\t$email = new UrlValidator();\n\t\t\t$email->validate($value);\n\t\t}\n\n\t\t$length = new LengthValidator($this->minlength, $this->maxlength);\n\t\t$length->validate($value);\n\n\t\t$number = new NumberValidator($this->min, $this->max);\n\t\t$number->validate($value);\n\t}", "public function validate() {\n if (!empty($this->value)) {\n parent::validate();\n }\n }", "public function validate() {\n if (!empty($this->value)) {\n parent::validate();\n }\n }", "public function validate($value)\n {\n return $this->doValidate($value);\n }", "public function validate( $value, $validator )\n {\n \n \n }", "public function isValid($value);", "public function isValid($value);", "abstract function validate(mixed $value) : bool;", "public function validate(){\r\n\t\t// make validation\r\n\t\t$res = Validator::validate( $this->value, $this->constraints );\r\n\t\tif ( !$res )\r\n\t\t\t$this->has_error = true;\r\n\r\n\t\treturn $res;\r\n\t}", "public function validate($value) {\n return $value == $this->filter($value) ? $value : Filter::ERR_INVALID;\n }", "public function validate ( $mValue )\n {\n return true;\n }", "public function validate(&$value){\n $required = (get::array_def($this->attributes, 'required', false) == 'required');\n $maxlength = get::array_def($this->attributes, 'maxlength', 0);\n $msglbl = get::array_def($this->attributes, 'msglbl', get::array_def($this->attributes, 'name', $this->getId()));\n \n if( $required && (!isset($value) || strlen(trim($value)) < 1) )\n return sprintf('\"%s\" is a required field.', $msglbl);\n \n if( $maxlength > 0 && strlen(trim($value)) > $maxlength )\n return sprintf('\"%s\" has to many characters - the max length is %s.', $msglbl, $maxlength);\n \n return true;\n }", "public function __invoke($value) {\n return $this->isValid($value);\n }", "function validate_value($valid, $value, $field, $input)\n {\n }", "function validate_value($valid, $value, $field, $input)\n {\n }", "function validate_value($valid, $value, $field, $input)\n {\n }", "function validate_value($valid, $value, $field, $input)\n {\n }", "public function validate(mixed $value): mixed\n {\n if ($this->boolean) {\n if (is_string($value)) {\n $value = Session::stringToBoolean($value);\n\n if ($value === null) {\n throw Exceptional::UnexpectedValue(\n 'Invalid boolean value found for argument: ' . $this->name\n );\n }\n }\n\n if ($value === true) {\n return true;\n } elseif (\n $value === false ||\n $value === null\n ) {\n return false;\n }\n\n return false;\n } else {\n if ($value === null) {\n if (!$this->optional) {\n throw Exceptional::UnexpectedValue(\n 'No value found for argument: ' . $this->name\n );\n } else {\n return $this->defaultValue;\n }\n }\n\n if (\n $this->pattern !== null &&\n !mb_ereg($this->pattern, Coercion::toString($value))\n ) {\n throw Exceptional::UnexpectedValue(\n 'Value does not match pattern for argument: ' . $this->name\n );\n }\n\n return $value;\n }\n }", "public function validateValue ( $value, $label )\n {\n $this->setInput(array(\n 'field' => $value\n ));\n\n return $this->validate('field', $label);\n\n }", "public function getIsValidValue($value)\r\n {\r\n return true;\r\n }", "public function isValid($value)\r\n {\r\n $response = parent::isValid($value);\r\n if (!$response)\r\n {\r\n $this->_messages =\r\n array(self::INVALID => \"El valor debe ser un número entero\");\r\n }\r\n return $response;\r\n }", "protected final function __validateValue($name, $value) {\n\t\tif(array_key_exists($name, $this->attributes)) {\n\t\t\t$datatype = $this->__getAttributeByName($name)->getType();\n\t\t}\n\t\t\n\t\t// check if the attribute is required\n\t\t$required = $this->__getAttributeByName($name)->isRequired();\n\n\t\t// if the value is empty and not required return a success\n\t\tif(!$required && (strlen($value) == 0)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// if the value is required and empty return a fault\n\t\tif($required && (strlen($value) == 0)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif($datatype == \"UNDEFINED\") {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// check if the value is valid for the attribute\n\t\treturn preg_match(WAT_OP_AttributeTypes::getRegex($datatype), $value);\n\t}", "private function validateValue($value)\n {\n if (is_null($value)) {\n throw new \\InvalidArgumentException(\"Value cannot be null\");\n }\n }", "public function validateValue(FieldDefinition $fieldDef, FieldTypeValue $value)\n {\n }", "public function validate($value)\n {\n if ($this->isOptional && is_null($value)) {\n return true;\n }\n\n if ($this->isArray) {\n return $this->validateArray($value);\n }\n\n if ($this->isFixedValues) {\n return $this->validateFixedValues($value);\n }\n\n return $this->validateValue($value);\n }", "public function testValueValid() {\n $config = [\n 'success' => 1,\n 'data' => 'example'\n ];\n $this->assertEmpty($this->getValidator()->validate($config));\n }", "public function validate($value, Constraint $constraint)\n {\n parent::validate($value, $constraint);\n }", "protected function validateType($value)\n {\n }", "function validate()\n\t{\n\t\t$result = true;\n\t\tif ($this->required && !$this->value) { $result = false; }\n\n\t\tif (!$result) { $this->error = '*'; }\n\n\t\treturn $result;\n\t}", "public function value(/*mixed*/ $value): self\n {\n $this->validatingValue = $value;\n return $this;\n }", "public function validation($value) {\n return $this->setProperty('validation', $value);\n }", "abstract public function isValid(mixed $value): bool;", "public function validateParameterValue($value) {\n switch ($this->getType()) {\n case self::TYPE_TEXT:\n return is_string($value) || is_numeric($value) || is_bool($value);\n case self::TYPE_NUMERIC:\n return is_numeric($value);\n case self::TYPE_BOOLEAN:\n return is_bool($value) || $value === 0 || $value === 1;\n case self::TYPE_DATE:\n return date_create_from_format(\"Y-m-d\", $value) ? true : false;\n case self::TYPE_DATE_TIME:\n return date_create_from_format(\"Y-m-d H:i:s\", $value) ? true : false;\n }\n }", "public function isValid($value)\r\n {\r\n return true;\r\n }", "protected function validate()\r\n\t{\r\n\t\tif (!$this->isFetched())\r\n\t\t{\r\n\t\t\treturn;\r\n }\r\n \r\n\t\tif ($this->validationInfo)\r\n\t\t{\r\n\t\t\t$this->validationInfo->validate($this->normalizedValue);\r\n\t\t}\r\n\t\t$this->isValid = true;\r\n\t}", "public function validate($value) {\n return preg_match($this->options[\"pattern\"], $value) ? $value : Filter::ERR_INVALID;\n }", "public function Validate($value)\n\t{\n\t\ttry \n\t\t{\n\t\t\t$value = IValidator::GetInstance()->Validate($this->label, $value, $this->rules);\n\t\t\tif(!$this->HasRule('skip'))\n\t\t\t{\n\t\t\t\t$this->value = $value;\n\t\t\t}\n\t\t}\n\t\tcatch(ArgumentException $e)\n\t\t{\n\t\t\t//trace($e);\n\t\t\t$this->errors[] = $e->getMessage();\n\t\t}\n\t\t\n\t\t$this->status = $this->errors==null ? self::StatusValid : self::StatusError;\n\t\treturn $this->status == self::StatusValid;\n\t}", "public function isValueValid($value) {\n\t\treturn $value instanceof Type\\PropertyValueType || $value instanceof DataType\\TextType || $value instanceof DataType\\URLType;\n\t}", "public function validate(BLW_PSP_EditableValueHolder $valueHolder, $value = null);", "function validate()\n {\n if ( $this->options['required'] && $this->value == '' )\n {\n $this->validationError = $this->label . ' is required!';\n fWarn::getInstance()->add('Validation failed for ' . $this->name . ', field is required.');\n return false;\n }\n if ( isset($this->regex) )\n {\n $return = preg_match($this->regex, $this->value);\n if ( !$return )\n $this->fDebug->add('Could not validate \"' . $this->value . '\" against \"' . $this->regex . '\"', 1);\n return $return;\n }\n return true;\n }", "public function evaluateIsValid()\n\t{\n\t\t$idPath=$this->getControlToValidate();\n\t\tif(strlen($idPath))\n\t\t{\n\t\t\t$control=$this->getTargetControl($idPath);\n\t\t\t$value=$control->getValidationPropertyValue();\n\t\t\tif(!strlen($value))\n\t\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn true;\n\n\t\tswitch($this->getValueType())\n\t\t{\n\t\t\tcase 'Integer':\n\t\t\t\treturn $this->isValidInteger($value);\n\t\t\tcase 'Float':\n\t\t\tcase 'Double':\n\t\t\t\treturn $this->isValidDouble($value);\n\t\t\tcase 'Currency':\n\t\t\t\treturn $this->isValidCurrency($value);\n\t\t\tcase 'Date':\n\t\t\t\treturn $this->isValidDate($value);\n\t\t\tdefault:\n\t\t\t\treturn $this->isValidString($value);\n\t\t}\n\t}", "protected function validate(&$value)\n {\n return $this;\n }", "abstract function validator();", "public function validate( $value )\n\t{\n\t\treturn $value < $this->max;\n\t}", "public function isValueValid($value) {\n\t\treturn $value instanceof Type\\PersonType;\n\t}", "public function validate($value)\n {\n\n $hasError = false;\n $results = array();\n foreach ($this->validators as $key => $validator) {\n if ($value != null) {\n $result = $validator->validate($value);\n $results[$key] = $result;\n if ($result->isValid() == false) {\n $hasError = true;\n }\n } else {\n if ($validator->isRequired() == true) {\n $hasError = true;\n }\n }\n }\n if ($hasError == false) {\n $result = $this->createResult(true, $this->messages['default']);\n } else {\n $result = $this->createResult(false, $this->messages['default']);\n }\n $result->setResults($results);\n\n return $result;\n\n }", "public function validate(): bool\n {\n return is_int($this->value);\n }", "public abstract function validation();", "abstract public function validateData();", "protected static function validateValue($value) {\n parent::validateValue($value);\n $key = static::getKey($value);\n if ($key === false) {\n throw new \\InvalidArgumentException('Invalid value');\n }\n }", "public function validate()\n {\n foreach ($this->rules() as $attribute => $rules) {\n $value = $this->{$attribute};\n foreach ($rules as $rule) {\n $ruleName = $rule;\n if (!is_string($ruleName)) {\n $ruleName = $rule[0];\n }\n if ($ruleName === self::RULE_REQUIRED && !$value) {\n $this->addErrorForRule($attribute, self::RULE_REQUIRED);\n }\n if ($ruleName === self::RULE_EMAIL && !filter_var($value, FILTER_VALIDATE_EMAIL)) {\n $this->addErrorForRule($attribute, self::RULE_EMAIL);\n }\n if ($ruleName === self::RULE_MIN && strlen($value) < $rule['min']) {\n $this->addErrorForRule($attribute, self::RULE_MIN, $rule);\n }\n if ($ruleName === self::RULE_MAX && strlen($value) > $rule['max']) {\n $this->addErrorForRule($attribute, self::RULE_MAX, $rule);\n }\n if ($ruleName === self::RULE_MATCH && $value !== $this->{$rule['match']}) {\n $rule['match'] = $this->getLabel($rule['match']);\n $this->addErrorForRule($attribute, self::RULE_MATCH, $rule);\n }\n if ($ruleName === self::RULE_UNIQUE) {\n $className = $rule['class'];\n $uniqueAttr = $rule['attribute'] ?? $attribute;\n $tableName = $className::tableName();\n $statement = Application::$app->db->prepare(\"SELECT * FROM $tableName WHERE $uniqueAttr = :attr\");\n $statement->bindValue(\":attr\", $value);\n $statement->execute();\n $record = $statement->fetchObject();\n if ($record) {\n $this->addErrorForRule($attribute, self::RULE_UNIQUE, ['field' => $this->getLabel($attribute)]);\n }\n }\n }\n }\n\n return empty($this->errors);\n }", "public function validate($value, Constraint $constraint)\n {\n // other constraints (NotBlank, NotNull, etc.) take care of that\n if (null === $value || '' === $value) {\n return;\n }\n\n if ($value->getReferralGuid() != null) {\n $referral = $this->referralService->findByGuid(new Guid($value->getReferralGuid()));\n\n if ($referral->getRecipient() instanceof ContactRecipient) {\n\n if ($value->getReferralRate() < 3) {\n $this->context->buildViolation($constraint->message)\n ->setCode(ScoreConstraint::IS_INVALID_SCORE)\n ->addViolation();\n }\n }\n }\n return;\n }", "protected function validate()\n {\n $errors = [];\n\n if ($this instanceof ObscureValueInterface) {\n $value = $this->getActualValue($this->getValue());\n } else {\n $value = $this->getValue();\n }\n\n if ($this->isRequired()) {\n if (is_array($value)) {\n $value = array_filter($value);\n\n if (empty($value)) {\n $errors[] = $this->translate('This field is required');\n }\n } else if (!strlen($value)) {\n $errors[] = $this->translate('This field is required');\n }\n }\n\n if (!empty($value)) {\n static $validator;\n\n if (null === $validator) {\n $validator = new Validator();\n }\n\n $violationList = $validator->validate($this, $value);\n\n $errors = array_merge($errors, $violationList->getErrors());\n }\n\n return $errors;\n }", "function isValid($value = null)\n {\n if(is_numeric($value)){\n return true;\n }\n\n $this->errorFound();\n\n return false;\n }", "protected function checkValue() {\n if($this->required) {\n if($this->regularExpression) {\n if(preg_match($this->regularExpression, $this->value)) {\n $returnValue = TRUE;\n } else {\n $returnValue = FALSE;\n $this->error = TRUE;\n }\n } elseif($this->callBack) {\n if(call_user_func($this->callBack, $this->value)) {\n $returnValue = TRUE;\n } else {\n $returnValue = FALSE;\n $this->error = TRUE;\n }\n } elseif(!(bool)$this->value) {\n $returnValue = FALSE;\n } else {\n $returnValue = TRUE;\n }\n } else {\n $returnValue = TRUE;\n }\n\n return $returnValue;\n }", "public function validate ($value): void\n {\n switch ($this -> sqlType) {\n case 'FLOAT':\n case 'DOUBLE':\n case 'DECIMAL':\n // Not implemented;\n break;\n\n default:\n $common = self::TYPES[$this -> sqlType];\n if (!$this -> size)\n $this -> size = $common;\n else $this -> size = min($this -> size, $common);\n $this -> getValidator()::apply('compare', (int) $value, - $this -> size);\n $this -> getValidator()::apply('compare', (int) $value, $this -> size - 1, FALSE);\n }\n }", "public static function validateValue()\n\t{\n\t\treturn array(\n\t\t\tnew Main\\Entity\\Validator\\Length(null, 255),\n\t\t);\n\t}", "public function validate(): bool\n {\n return !is_object($this->value) && !is_array($this->value) && strtotime($this->value);\n }", "public function validate(){\n\t\t// Loop through model's rules array.\n\t\tforeach($this->rules() as $field => $rules){\n\t\t\t// Take the value of field this rule is for.\n\t\t\t$value = $this->{$field};\n\t\t\t// Loop through all rules for this field.\n\t\t\tforeach($rules as $rule){\n\t\t\t\t$ruleType = $rule;\n\t\t\t\t// If the rule is an array, not string, read its type from first index.\n\t\t\t\tif(is_array($ruleType)){\n\t\t\t\t\t$ruleType = $ruleType[0];\n\t\t\t\t}\n\n\t\t\t\t// Rule: field is required.\n\t\t\t\tif($ruleType === 'required' && !$value){\n\t\t\t\t\t$this->addError($field, 'required', $rule);\n\t\t\t\t}\n\t\t\t\t// Rule: field value must validate as email.\n\t\t\t\telse if($ruleType === 'email' && !filter_var($value, FILTER_VALIDATE_EMAIL)){\n\t\t\t\t\t$this->addError($field, 'email', $rule);\n\t\t\t\t}\n\t\t\t\t// Rule: string length comparisons.\n\t\t\t\telse if($ruleType === 'length'){\n\t\t\t\t\t// String has rule for minimum length.\n\t\t\t\t\tif(array_key_exists('min', $rule) && $rule['min'] > strlen($value)){\n\t\t\t\t\t\t$this->addError($field, 'min', $rule);\n\t\t\t\t\t}\n\t\t\t\t\t// String has rule for maximum length.\n\t\t\t\t\tif(array_key_exists('max', $rule) && $rule['max'] < strlen($value)){\n\t\t\t\t\t\t$this->addError($field, 'max', $rule);\n\t\t\t\t\t}\n\t\t\t\t\t// String has rule for exact length.\n\t\t\t\t\tif(array_key_exists('equal', $rule) && $rule['equal'] != strlen ($value)){\n\t\t\t\t\t\t$this->addError($field, 'equal', $rule);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Rule: field value must match comparison field's value.\n\t\t\t\telse if($ruleType === 'compare' && $value != $this->{$rule['field']}){\n\t\t\t\t\t$this->addError($field, 'compare', $rule);\n\t\t\t\t}\n\t\t\t\t// Rule: number comparisons.\n\t\t\t\telse if($ruleType === 'numeric'){\n\t\t\t\t\t// Value must validate to an integer number.\n\t\t\t\t\tif(array_key_exists('integer', $rule) && $rule['integer'] && filter_var($value, FILTER_VALIDATE_INT) === FALSE){\n\t\t\t\t\t\t$this->addError($field, 'integer', $rule);\n\t\t\t\t\t}\n\t\t\t\t\t// Value must validate to float number.\n\t\t\t\t\telse if((!array_key_exists('integer', $rule) || (array_key_exists('integer', $rule) && !$rule['integer'])) && filter_var($value, FILTER_VALIDATE_FLOAT) === FALSE){\n\t\t\t\t\t\t$this->addError($field, 'numeric', $rule);\n\t\t\t\t\t}\n\t\t\t\t\t// Value must be at least a minimum number.\n\t\t\t\t\tif(array_key_exists('min', $rule) && $rule['min'] > floatval($value)){\n\t\t\t\t\t\t$this->addError($field, 'numericmin', $rule);\n\t\t\t\t\t}\n\t\t\t\t\t// Value cannot be larger than a maximum number.\n\t\t\t\t\tif(array_key_exists('max', $rule) && $rule['max'] < floatval($value)){\n\t\t\t\t\t\t$this->addError($field, 'numericmax', $rule);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Rule: unique database entry.\n\t\t\t\telse if($ruleType === 'unique'){\n\t\t\t\t\t// Check for match in database.\n\t\t\t\t\t$found = $this->findOne([\"$field\" => \"$value\"]);\n\t\t\t\t\tif($found){\n\t\t\t\t\t\t$this->addError($field, 'unique', $rule);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t// Rule: on action only.\n\t\t\t\telse if($ruleType === 'on'){\n\t\t\t\t\t// If field is used on create only and request is not for create, field is not used.\n\t\t\t\t\tif($rule['action'] === 'create' && !$this->isCreate()){\n\t\t\t\t\t\t$this->ignoreFields[] = $field;\n\t\t\t\t\t}\n\t\t\t\t\t// IF field is used on update only and request is not for update, field is not used.\n\t\t\t\t\telse if($rule['action'] === 'update' && !$this->isUpdate()){\n\t\t\t\t\t\t$this->ignoreFields[] = $field;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn empty($this->errors);\n\t}", "function isValid() {\n return $this->validator ? $this->validator->isValid($this->value) : true;\n }", "abstract protected function validate($data);", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "protected function _isValidValue($propertyName, $value)\n\t{\n\t\t// It handles things such as string length, data type and nullability constraints\n\t\tif (!parent::_isValidValue($propertyName, $value))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tif ($value === null)\n\t\t{\n\t\t\t// We have already done the low level check to see if the field is manditory, so if the value is still set to null, then it should be considered valid.\n\t\t\t// Although this doesn't take into account scenarios where a value can only be set to null, when some other value is set to a specific value.\n\t\t\t// Validation rules of that nature should be declared in the class' isValid() method\n\t\t\treturn true;\n\t\t}\n\n\t\tswitch ($propertyName)\n\t\t{\n\t\t\tcase 'firstName':\n\t\t\t\treturn DO_SalesValidation::isValidPersonFirstName($value);\n\t\t\t\tbreak;\n\n\t\t\tcase 'middleNames':\n\t\t\t\treturn DO_SalesValidation::isValidPersonMiddleName($value);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'lastName':\n\t\t\t\treturn DO_SalesValidation::isValidPersonLastName($value);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'positionTitle':\n\t\t\t\t// Check that the string is not empty and has no leading or trailing whitespace, and has no illegal chars\n\t\t\t\treturn (!DO_SalesValidation::isTrimmed($value) || $value === '' || DO_SalesValidation::hasIllegalChars($value, \"`~!@#\\$%^*=_+{}[]|\\\\;:\\\"<>?\\n\\r\\t\"))? false : true;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'username':\n\t\t\t\treturn DO_SalesValidation::isValidUsername($value);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'dateOfBirth':\n\t\t\t\t// Date of birth has to be in the past\n\t\t\t\treturn ($value <= date(\"Y-m-d\"));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t// No extra validation - assume is correct\n\t\t\t\treturn true;\n\t\t}\n\t}", "public function isValid($value, $context = null)\n {\n $fieldName = $this->getName();\n $auxiliaryFieldsNames = $this->getDayMonthYearFieldNames($fieldName);\n if (isset($context[$auxiliaryFieldsNames['day']]) && isset($context[$auxiliaryFieldsNames['month']]) \n && isset($context[$auxiliaryFieldsNames['year']]))\n {\n if ($context[$auxiliaryFieldsNames['year']] == '-' \n || $context[$auxiliaryFieldsNames['month']] == '-' \n || $context[$auxiliaryFieldsNames['day']] == '-')\n {\n $value = null;\n }\n else\n {\n $value = str_pad($context[$auxiliaryFieldsNames['year']], 4, '0', STR_PAD_LEFT) . '-'\n . str_pad($context[$auxiliaryFieldsNames['month']], 2, '0', STR_PAD_LEFT) . '-'\n . str_pad($context[$auxiliaryFieldsNames['day']], 2, '0', STR_PAD_LEFT);\n }\n \n $this->setValue($value);\n }\n \n return parent::isValid($value, $context);\n }", "protected function validate(int $value): void\n {\n }", "abstract public function validate();", "abstract public function validate();", "abstract public function validateData($data);", "protected function validateValueUsingRules($fieldValue)\n\t{\n\t\t$validationType = self::getArrayValue($this->validationRules, 'type');\n\t\t$this->errorMessage = self::getArrayValue($this->validationRules, 'error');\n\t\t$isValid = true;\n\t\t\n\t\t// Handle maximum and minimum length fields.\n\t\tswitch($validationType)\n\t\t{\n\t\t\t// Standard strings, where length is important.\n\t\t\tcase 'string':\n\t\t\tcase 'email':\t\n\t\t\tcase 'url':\n\t\t\t\t\n\t\t\t\t// 1st stage, are there enough characters?\n\t\t\t\t$minlen = 0;\n\t\t\t\tif (isset($this->validationRules['minlen'])) \n\t\t\t\t{\n\t\t\t\t\t$minlen = $this->validationRules['minlen'] + 0;\n\t\t\t\t\tif ($minlen > 0) {\n\t\t\t\t\t\t$isValid = strlen($fieldValue) >= $minlen;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// 2nd stage, are there too many characters?\n\t\t\t\t$maxlen = 0;\n\t\t\t\tif (isset($this->validationRules['maxlen']))\n\t\t\t\t{\n\t\t\t\t\t$maxlen = $this->validationRules['maxlen'] + 0;\n\t\t\t\t\tif ($maxlen > 0 && $isValid) {\n\t\t\t\t\t\t$isValid = strlen($fieldValue) <= $maxlen;\n\t\t\t\t\t}\t\t\n\t\t\t\t}\n\t\n\t\t\t\t// Length validation failed.\n\t\t\t\tif (!$isValid) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\t// Don't bother doing length for these fields, as they have a different\n\t\t\t// measure of what's valid based on their structure.\n\t\t\tcase 'telephone':\t\t\t\n\t\t\tcase 'postcode':\n\t\t\tcase 'number':\n\t\t\tcase 'decimal':\t\n\t\t\tcase 'count':\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Unknown validation type.\n\t\t\tdefault:\n\t\t\t\terror_log('validateValueUsingRules(): Unknown validation type.');\n\t\t\t\treturn false;\n\t\t\tbreak;\t\t\t\t\n\t\t\t\t\n\t\t}\n\t\t\n\t\t// More complex validation happens now.\n\t\tswitch($validationType)\n\t\t{\t\t\t\n\t\t\t// ### Lists - counting items\n\t\t\tcase 'count':\n\t\t\t\tif (isset($this->validationRules['max']))\n\t\t\t\t{\n\t\t\t\t\t$maxcount = $this->validationRules['max'] + 0;\n\t\t\t\t\t\n\t\t\t\t\t// Unlimited\n\t\t\t\t\tif ($maxcount == -1) {\n\t\t\t\t\t\t$isValid = true;\n\t\t\t\t\t} \n\t\t\t\t\t\n\t\t\t\t\t// 0 items\n\t\t\t\t\telse if ($maxcount == 0) { \n\t\t\t\t\t\tHL_debug_showArray($this->value);\n\t\t\t\t\t\t$isValid = (empty($this->value) || count($this->value) == 0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// 1 or more items\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (!empty($this->value) && is_array($this->value)) {\n\t\t\t\t\t\t\t$isValid = count($this->value) <= $maxcount; \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// ### Generic number\n\t\t\t/*\n\t\t\t \t'validate'\t=> array(\n\t\t\t\t\t'type'\t=> 'number',\n\t\t\t\t\t'max'\t=> 50,\n\t\t\t\t\t'min'\t=> 1,\n\t\t\t\t\t'error'\t=> 'Please choose a number between 1 and 50.'\n\t\t\t\t) \n\t\t\t */\t\t\t\n\t\t\tcase 'number':\n\t\t\t\t// 1st stage, is it a number\n\t\t\t\t$isValid = is_numeric($fieldValue);\n\t\t\t\t\n\t\t\t\t// 2nd stage, do we have any ranges?\n\t\t\t\tif ($isValid) \n\t\t\t\t{\n\t\t\t\t\t$fieldValue += 0; \n\t\t\t\t\t\n\t\t\t\t\t// Do we have a minimum value?\n\t\t\t\t\tif (isset($this->validationRules['min'])) {\n\t\t\t\t\t\t$isValid = $fieldValue >= $this->validationRules['min'];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Do we have a maximum value?\n\t\t\t\t\tif ($isValid && isset($this->validationRules['max'])) {\n\t\t\t\t\t\t$isValid = $fieldValue <= $this->validationRules['max'];\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\t// ### Special Numbers\n\t\t\t\n\t\t\t// Decimal\n\t\t\t/*\n\t\t\t \t'validate'\t=> array(\n\t\t\t\t\t'type'\t=> 'decimal',\n\t\t\t\t\t'max'\t=> 9999.99,\n\t\t\t\t\t'min'\t=> 0.01,\n\t\t\t\t\t'error'\t=> 'Please choose a starting price between 0.01 and 9999.99.'\n\t\t\t\t) \n\t\t\t */\n\t\t\tcase 'decimal':\n\t\t\t\t// 1st stage, is it a decimal number?\n\t\t\t\t$isValid = preg_match('/^[0-9]+(\\.[0-9]{1,2})?$/', $fieldValue);\n\t\t\t\t\n\t\t\t\t// 2nd stage, do we have any ranges?\n\t\t\t\tif ($isValid) \n\t\t\t\t{\n\t\t\t\t\t$fieldValue += 0; \n\t\t\t\t\t\n\t\t\t\t\t// Do we have a minimum value?\n\t\t\t\t\tif (isset($this->validationRules['min'])) {\n\t\t\t\t\t\t$isValid = $fieldValue >= $this->validationRules['min'];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Do we have a maximum value?\n\t\t\t\t\tif ($isValid && isset($this->validationRules['max'])) {\n\t\t\t\t\t\t$isValid = $fieldValue <= $this->validationRules['max'];\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\tbreak;\t\t\t\n\t\t\t\n\t\t\t// ### Generic string\n\t\t\t/*\n\t\t\t 'validate'\t \t=> array(\n\t\t\t\t\t'type'\t\t=> 'string',\n\t\t\t\t\t'maxlen'\t=> 100, \t\t\t\t\t\t// (optional) The maximum length of the string\n\t\t\t\t\t'minlen'\t=> 1,\t\t\t\t\t\t\t// (optional) The minimum length of the string\n\t\t\t\t\t'regexp'\t=> '/^[A-Za-z0-9\\'\\-\\ ]+$/',\t// (optional) A normal regular-expression of what's permitted in the string.\n\t\t\t\t\t'error'\t\t=> 'Explain what's valid.'\t\t// (optional) The error message if the string doesn't validate.\n\t\t\t\t)\t\n\t\t\t */\n\t\t\tcase 'string':\n\t\t\t\t// Validate against a regular expression\n\t\t\t\t$regexp = FormElement::getArrayValue($this->validationRules, 'regexp'); \t\t\t\t\n\t\t\t\tif ($regexp) {\n\t\t\t\t\t$isValid = preg_match($regexp, $fieldValue, $matches);\n\t\t\t\t}\t\t\t\t\n\t\t\tbreak;\n\t\t\t\n\t\t\t\n\t\t\t// ### Special strings\n\t\t\t\n\t\t\t// Valid Telephone Number (type = telephone)\n\t\t\tcase 'telephone':\n\t\t\t\t\t// Examples of valid numbers are: \n\t\t\t\t\t// 01234 123345\n\t\t\t\t\t// +44 12345 123455\n\t\t\t\t\t$nospaces = str_replace(' ', '', $fieldValue);\n\t\t\t\t\t$isValid = preg_match('/^\\+?([0-9]){9,14}$/', $nospaces);\t\n\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\n\t\t\t// Valid URLs (type = url)\t\t\n\t\t\tcase 'url':\n\t\t\t\t\t//$isValid = preg_match(\"/\\b(?:(?:https?|ftp):\\/\\/|www\\.)[-a-z0-9+&@#\\/%?=~_|!:,.;]*[-a-z0-9+&@#\\/%=~_|]/i\", $fieldValue);\t\n\t\t\t\t\t$isValid = preg_match(\"/(https?|ftp):\\/\\/(www\\.)?[-a-z0-9+&@#\\/%?=~_|!:,.;]*[-a-z0-9+&@#\\/%=~_|]/i\", $fieldValue);\n\t\t\t\tbreak;\t\t\n\t\t\t\t\n\t\t\t// Valid Email Addresses (type = email)\t\n\t\t\tcase 'email':\n\t\t\t\t\t$isValid = preg_match('/^[A-Za-z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}$/', $fieldValue);\t\n\t\t\t\tbreak;\t\t\n\n\t\t\t// Valid UK Postcode (type = postcode)\t\n\t\t\t/**\n \t\t\t\tValidates against these:\n \t\t\t\t\n\t\t\t\tA9 9AA \t\tM1 1AA \t\tB, E, G, L, M, N, S, W postcode areas\n\t\t\t\tA99 9AA \tM60 1NW\n\t\t\t\tAA9 9AA \tCR2 6XH \tAll postcode areas except B, E, G, L, M, N, S, W, WC\n\t\t\t\tAA99 9AA \tDN55 1PT\n\t\t\t\tA9A 9AA \tW1A 1HQ \tE1W, N1C, N1P, W1 postcode districts (high density areas where codes ran out)\n\t\t\t\tAA9A 9AA \tEC1A 1BB \tWC postcode area; EC1ŠEC4, NW1W, SE1P, SW1 postcode districts (high density areas where codes ran out\n\t\t\t */\t\t\t\n\t\t\tcase 'postcode':\n\t\t\t\t\t$isValid = preg_match('/^([A-Z]([0-9]{1,2}|[A-Z][0-9]{1,2}|[A-Z]?[0-9][A-Z]))\\ ([0-9][A-Z]{2})$/i', $fieldValue);\t\n\t\t\t\tbreak;\t\t\n\t\t}\n\t\t\n\t\treturn $isValid;\n\t}", "public function validate($value)\n {\n if (null === $value) return false;\n if (empty($value)) return false;\n return true;\n }", "public function validateValue()\n {\n return (preg_match('/' . $this->preference->value . '/', $this->value) == 1 ? true : false);\n }", "public function validate($value) {\n\t\t$isValid = false;\n\n\t\tif (is_scalar($value)) {\n\t\t\t$isValid = ($this->isValidCommonNotation($value)\n\t\t\t\t|| $this->isValidDotNotation($value)\n\t\t\t\t|| $this->isValidScientificNotation($value));\n\t\t}\n\n\t\tif (!$isValid) {\n\t\t\t$this->error($this->messageInvalid, $this->stringify($value));\n\t\t}\n\n\t\treturn $isValid;\n\t}", "public function isValid($value, $context = null)\n {\n $this->setValue($value);\n\n return true;\n }", "public function setValid($value)\n {\n return $this->set(self::VALID, $value);\n }", "public function validate(&$value){\n $args = func_get_args(); array_shift($args); $fields = $args[0];\n $name = $this->getName();\n if( in_array($name, fe_radio::$validated) ) return true;\n \n $msglbl = get::array_def($this->attributes, 'msglbl', get::array_def($this->attributes, 'name', $this->getId()));\n $required = false; $allowchange = false;\n $values = array();\n foreach($fields as $field){\n if( !($field instanceof fe_radio) || $field->getName() != $name ) continue;\n if( get::array_def($field->attributes, 'required', false) == 'required' )\n $required = true;\n if( get::array_def($this->attributes, 'allowchange', false, array(true, false)) )\n $allowchange = true;\n $values[] = get::array_def($field->attributes, 'value');\n }\n \n fe_radio::$validated[] = $name;\n \n if( $required && !isset($value) )\n return sprintf('\"%s\" is a required field.', $msglbl);\n \n if( !$allowchange && isset($value) && !in_array($value, $values) )\n return sprintf('\"%s\" is not a valid value for \"%s\" - please choose from the list.', $value, $msglbl);\n \n return true;\n }" ]
[ "0.8119479", "0.8036628", "0.79597354", "0.795174", "0.7938953", "0.7938953", "0.77009726", "0.77009726", "0.7565314", "0.74176645", "0.7394259", "0.7366575", "0.733058", "0.7272135", "0.7205143", "0.7202048", "0.7188197", "0.7188197", "0.7179817", "0.7142041", "0.7103777", "0.7103777", "0.7073966", "0.70324564", "0.70289254", "0.693743", "0.69250935", "0.6866993", "0.67881536", "0.67881536", "0.67881536", "0.67881536", "0.67773247", "0.6733935", "0.67244786", "0.6697234", "0.66307056", "0.66044563", "0.65831095", "0.65704334", "0.65541345", "0.6527084", "0.6526828", "0.652572", "0.6522158", "0.6519921", "0.6516912", "0.6501456", "0.6472021", "0.6471164", "0.6469116", "0.64605445", "0.64415365", "0.6438695", "0.6414046", "0.63935703", "0.63877374", "0.637004", "0.63639903", "0.6355935", "0.6339048", "0.6337652", "0.6330383", "0.63279426", "0.630131", "0.6300329", "0.6299141", "0.62983936", "0.62714976", "0.6270534", "0.6269398", "0.62364507", "0.6232487", "0.622285", "0.622272", "0.6220244", "0.621696", "0.621696", "0.621696", "0.621696", "0.621696", "0.621696", "0.621696", "0.621696", "0.621696", "0.621696", "0.621696", "0.621696", "0.6208246", "0.62021023", "0.62012184", "0.61860406", "0.61860406", "0.6181935", "0.61801934", "0.6172767", "0.61702085", "0.6165258", "0.6155387", "0.6144115", "0.6142969" ]
0.0
-1
Gets value based on attribute property or the value property
protected function parseValue($model, $prop, $default = null) { $value = "{$prop}Value"; if (isset($this->$value)) { return $this->$value; } $attribute = "{$prop}Attribute"; if (isset($this->$attribute) && isset($model->{$this->$attribute})) { return $model->{$this->$attribute}; } return $default; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getValueAttribute() {}", "public function get($attribute);", "public function getValue(string $attr)\n {\n $this->checkAttribute($attr);\n return $this->attributes[$attr];\n }", "public function __get($name)\n {\n $attribute = parent::__get($name);\n if ($name == 'values' && $attribute) {\n return $attribute[0]['value'];\n }\n return $attribute;\n }", "protected function getPropertyValue() {}", "public function get($attr = null);", "function get_atribute_by_attribute($attr_name,$attr_value,$exactly,$name_attr)\n {\n return $this->get_attribute_by_attribute($attr_name,$attr_value,$exactly,$name_attr);\n }", "public function getValue() {\n return $this->attributes['value'];\n }", "public function getAttributeValue() {\n return $this->attributeValue;\n }", "public function __GET($attr){\n\n\t\t return $this->$attr;\n\t\t}", "public function __get($name) {\n\t\tif ($this->hasAttribute($name))\n\t\t\treturn $this->_attributes[$name];\n\t\telse\n\t\t\treturn parent::__get($name);\n\t}", "private function getAttributeValue($attribute)\n {\n return array_key_exists($attribute, $this->data) ? $this->data[$attribute] : null;\n }", "public function __get($attribute)\n {\n if ( isset($this->attributes[$attribute]) ) return $this->attributes[$attribute];\n }", "public function get_attribute($key, $defaut = NULL);", "public function get($attributeName);", "public function __get($name)\n {\n if(isset($this->_attribs[$name]))\n return $this->_attribs[$name];\n return $this->_value->$name;\n }", "public abstract function getValue($value);", "function __get($name) {\n if(array_key_exists($name, $this->_prop)) return $this->_prop[$name];\n return $this->attr($name);\n }", "public function getAttributeValue($index = null);", "public function __get($attribute)\r\n {\r\n if ($attribute == 'tag') {\r\n return $this->attributes[0];\r\n }\r\n return array_key_exists($attribute, $this->attributes) ? $this->attributes[$attribute] : null;\r\n }", "function get_attr_value($pri, $name=null, $value=null) {\n static $defs;\t\t// default option value\n\n if ($name && is_array($pri) && isset($pri[$name])) return $pri[$name];\n if (!isset($defs)) {\n\t$defs = array('numeric'=>'[-+]?[0-9]+', 'tel'=>'\\+?[0-9][0-9-,]*[0-9]');\n\tforeach (explode('|', OPTION_NUM_ATTRS) as $key) {\n\t $defs[$key] = 0;\n\t}\n\t// override module config values\n\t$mydirname = basename(dirname(__FILE__));\n\tif (!empty($GLOBALS['xoopsModule']) &&\n\t $GLOBALS['xoopsModule']->getVar('dirname')==$mydirname) {\n\t $def_attr = $GLOBALS['xoopsModuleConfig']['def_attrs'];\n\t} else {\n\t $module_handler =& xoops_gethandler('module');\n\t $module =& $module_handler->getByDirname($mydirname);\n\t $config_handler =& xoops_gethandler('config');\n\t $configs =& $config_handler->getConfigsByCat(0, $module->getVar('mid'));\n\t $def_attr = $configs['def_attrs'];\n\t}\n\tforeach (unserialize_vars($def_attr) as $k => $v) {\n\t $defs[$k] = $v;\n\t}\n }\n if ($name == null && !is_null($pri)) {\n\t// override values\n\tif (!is_array($pri)) $pri = unserialize_vars($pri);\n\tforeach ($pri as $k => $v) {\n\t $defs[$k] = $v;\n\t}\n }\n if (isset($defs[$name])) return $defs[$name];\n return $value;\n}", "public function __get($name)\n\t{\n\t\tif(array_key_exists($name, $this->_attributes))\n\t\t\treturn $this->_attributes[$name];\n\t\telse\n\t\t\treturn parent::__get($name);\n\t}", "public function get( $value ) {\n return $this->$value;\n }", "public function __get($attribute)\n {\n return array_get($this->attributes, $attribute);\n }", "abstract protected function getValue();", "public function __get($value);", "public function get_attribute($field){\n\t\treturn $this->{$field};\n\t}", "public function __get($attribute)\r\n\t{\r\n\t\tif (isset($this->{\"_\".$attribute}))\r\n\t\t{\r\n\t\t\treturn $this->{\"_\".$attribute};\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public function __get($attribute)\n\t{\n\t\tif (isset($this->{\"_\".$attribute}))\n\t\t{\n\t\t\treturn $this->{\"_\".$attribute};\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public function __get($attribute) {\n return $this->getAttribute($attribute);\n }", "public function getValueAttribute($value)\n {\n return $value;\n }", "function getValue()\n {\n return $this->getAttribute(\"value\");\n }", "public function getPropertyValue($containingValue);", "function getAttributeValue($name) {\n if(array_key_exists($name, $this->_attributes)) {\n return $this->_attributes[$name];\n } else {\n return null;\n }\n }", "public function __get($attr)\n {\n if (isset($this->{$attr})) {\n return $this->{$attr};\n } elseif (method_exists($this, 'get'.camel_case($attr).'Attribute')) {\n $methodName = camel_case('get_'.$attr.'Attribute');\n\n return $this->$methodName();\n }\n }", "public function __get( string$attribute )\n\t{\n\t\t$getter= \"__get__$attribute\";\n\t\t\n\t\tif( is_callable( [ $this, $getter ] ) )\n\t\t\treturn $this->$getter();\n\t\telse\n\t\tif( get_parent_class( self::class ) && is_callable( [ $this, parent::__get, ] ) )\n\t\t\treturn parent::__get( $attribute );\n\t\telse\n\t\t\treturn null;\n\t}", "public function __get($attr)\n {\n return $this->get($attr);\n }", "public function getAttribute($name)\n\t{\n\t\tif(property_exists($this,$name))\n\t\t\treturn $this->$name;\n\t\telseif(isset($this->_attributes[$name])) {\n\t\t\treturn $this->_attributes[$name];\n\t\t}\n\t}", "public function __get($name)\n\t{\n\t\t// return custom field value\n\t\tif ($this->isCustomField($name)) {\n\t\t\treturn $this->getCustomFieldModel($name)->value;\n\t\t}\n\t\t\n\t\t// return model attribute\n\t\treturn $this->getAttribute($name);\n\t}", "public function get( $paramName ) {\n\n\t // Lazy load the ACF field value\n\t\tif (isset($this->$paramName) && is_a($this->$paramName, LazyACFLoader::class)) {\n\t\t\t$this->$paramName = $this->$paramName->getValue();\n\t\t}\n\n\t\t// Verify if getter method exist for this attribute and avoid calling it again if it's already the getter which have call this method\n\t\t$getter = 'get' . str_replace( ' ', '', ucwords( str_replace( '_', ' ', $paramName ) ) );\n\t\tif ( method_exists( $this, $getter ) && $getter != debug_backtrace()[1]['function']) {\n\t\t\treturn $this->$getter();\n\t\t}\n\n\t\t// Return attribute value default behaviour\n\t\treturn $this->$paramName;\n\n\t}", "public function __get($attr) {\n if ($this->isMeta($attr)) {\n return isset($this->meta()->$attr) ? $this->meta()->$attr : null;\n } else {\n return parent::__get($attr);\n }\n }", "function __get($property)\n {\n if($property == \"id\")\n {\n return $this->id;\n }\n else\n {\n return call_user_func_array(array($this, \"getAttribute\"), array($property));\n }\n }", "public function get($name) {\n\t\t// See if its in our base attribute\n\t\tif (array_key_exists($name, $this->attributes)) {\n\t\t\treturn $this->attributes[$name];\n\t\t}\n\n\t\t// No, so see if its in the private data store.\n\t\t$meta = $this->getPrivateSetting($name);\n\t\tif ($meta) {\n\t\t\treturn $meta;\n\t\t}\n\n\t\t// Can't find it, so return null\n\t\treturn null;\n\t}", "protected function getValue($attribute)\n {\n if (!array_key_exists($attribute, $this->data)) {\n return null;\n }\n\n return $this->data[$attribute];\n }", "public function get($attr) {\n return array_key_exists($attr, $this->_private_attributes) ? $this->_private_attributes[$attr] : null;\n }", "public function getAttribute($name) {\n\t\tif (isset ( $this->$name ))\treturn $this->$name;\n\t}", "public function getAttribute($name) {\n\t\tif (property_exists($this, $name))\n\t\t\treturn $this->$name;\n\t\telse if ($this->hasAttribute($name))\n\t\t\treturn $this->_attributes[$name];\n\t}", "public function getAttribute($attr, $return_if_null = NULL)\r\n\t{\r\n\t\tif ( ! isset($this->attr[$attr]))\r\n\t\t\treturn $return_if_null;\r\n\t\t\r\n\t\tif (isset($this->attr[$attr]) && strtolower($this->attr[$attr]) == 'true')\r\n\t\t\treturn TRUE;\r\n\t\t\r\n\t\treturn (isset($this->attr[$attr]) && strtolower($this->attr[$attr]) != 'false') ? $this->attr[$attr] : FALSE;\r\n\t}", "public function __get($name)\n {\n return $this->attributes[$name];\n }", "public function getAttribute(string $attribute): string;", "public function __get($name) {\n // attribute-reader value\n if(in_array($name, $this->_attrReaders)) {\n return $this->_get($name);\n }\n // call overloading for subclass\n if(method_exists($this, '_get')) {\n return $this->_get($name);\n }\n show_error(\"Unrecognized attribute '$name'\");\n }", "abstract public function getValue();", "abstract public function getValue();", "abstract public function getValue();", "function getAttributeValue( $userId, $attribId )\n\t{\n\t\t$success = false;\n\t\t$database = PhplistHelperPhplist::getDBO();\n\t\t$tablename_userattributes = PhplistHelperAttribute::getTableName_userattributes();\n\t\tPhplist::load( 'PhplistQuery', 'library.query' );\n\t\tJTable::addIncludePath( JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_phplist' . DS . 'tables' );\n\t\t\n\t\t$query = new PhplistQuery( );\n\t\t$query->select( \"value\" );\n\t\t$query->from( $tablename_userattributes . \" AS tbl\" );\t\t\n\t\t$query->where( 'tbl.userid = '.$userId );\n\t\t$query->where( 'tbl.attributeid = '.$attribId );\n\t\t\n\t\t$database->setQuery( ( string ) $query );\n\t\t$data = $database->loadObject();\n\t\t$success = $data->value;\n\t\treturn $success;\n\t}", "public function __get($name)\n {\n if ($name == 'value') {\n return $this->value;\n }\n }", "public function getAttributeValue($key)\n {\n $value = $this->getAttributeFromArray($key);\n\n // If the attribute has a get mutator, we will call that then return what\n // it returns as the value, which is useful for transforming values on\n // retrieval from the model to a form that is more useful for usage.\n if ($this->hasGetMutator($key)) {\n return $this->mutateAttribute($key, $value);\n }\n\n // decrypt value before casts\n if (in_array($key, $this->encryptable) && !is_null($value) && $value !== '') {\n $value = $this->decrypt($value);\n }\n\n // If the attribute exists within the cast array, we will convert it to\n // an appropriate native PHP type dependant upon the associated value\n // given with the key in the pair. Dayle made this comment line up.\n if ($this->hasCast($key)) {\n return $this->castAttribute($key, $value);\n }\n\n // If the attribute is listed as a date, we will convert it to a DateTime\n // instance on retrieval, which makes it quite convenient to work with\n // date fields without having to create a mutator for each property.\n if (in_array($key, $this->getDates()) &&\n ! is_null($value)) {\n return $this->asDateTime($value);\n }\n\n return $value;\n }", "function __get($attributeAskedFor) {\n echo \"Asked for \" . $attributeAskedFor . \"<br>\";\n return $this->$attributeAskedFor;\n }", "public static function getAttributeByValue($attribute, $value)\n {\n $constant = self::getConstantConfigByValue($value);\n if (isset($constant[$attribute])) {\n return $constant[$attribute];\n }\n return false;\n }", "public function get_attribute($name)\n {\n }", "public function getValue(){\n return $this->value2 ? $this->value2 : $this->value1;\n }", "public function get($atributo) {\r\n\t\t\treturn $this->$atributo;\r\n\t\t}", "public function __get($atrib){\n\t\treturn $this->$atrib;\n\t}", "public function read_attribute($attribute)\n\t\t{\n\t\t\tif(!isset($this->matchcode[$attribute]) )\n\t\t\t{\n\t\t\t\terror_log(__FILE__.' name '.$attribute.' not defined in matchcode array');die();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($this->matchcode[$attribute][1] == 'A' || $this->matchcode[$attribute][1] == 'R')\n\t\t\t\t{\n\t\t\t\t\t$var = $this->matchcode[$attribute][0];\n\t\t\t\t\treturn $this->$var;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\terror_log(__FILE__.' name '.$attribute.' not readable');die();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function get($attr) {\n if (!isset($this->attrs[$attr])) {\n return null;\n }\n return $this->attrs[$attr];\n }", "public function getViaTableAttributesValue();", "public function getValue(): mixed;", "public function getValue(): mixed;", "public function getIdentifyingAttribute();", "public function readAttribute($attribute) {}", "public function __get($key)\n {\n // is the requested keyiable in the fields array?\n if(isset($this->fields[$key]))\n {\n // if so, find out what it's database column name is\n $db_column_name = $this->fields[$key]['name'];\n // return $this->attributes->string1 (or text3, decimal5 etc.)\n if(isset($this->attributes[$db_column_name]))\n return $this->attributes[$db_column_name];\n \n // otherwise, check if its in the attributes as named (such as $this->id)\n }elseif(isset($this->attributes[$key])){\n return $this->attributes[$key];\n }\n\n return parent::__get($key);\n }", "public function __get($attribute)\n {\n if(property_exists($this, $attribute)) {\n return $this->{$attribute};\n }\n return null;\n }", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "final protected function f(string $k) {return df_config_field()->getAttribute($k);}", "private function _getValue($id, $attribs=NULL, $val=NULL)\n\t{\n\t\t//Get model first\n\t\t$aval = $this->getModel()->apath($id);\n\t\tif($aval !== NULL)\n\t\t\treturn $aval;\n\n\t\t//get attribs\n\t\tif(!empty($attribs['value']))\n\t\t\treturn $attribs['value'];\n\n\t\t//Return if checked\n\t\tif(!empty($attribs['checked']))\n\t\t\treturn $attribs['checked'];\n\n\t\treturn $val;\n\t}", "function get_attribute($attribute)\n\t{\n\t\t$attribute = $this->db->getAttribute(constant(\"PDO::\".$attribute.\"\"));\n\n\t\treturn $attribute;\n\t}", "public function __get($attr)\n\t{\n\t\t$functionName = \"get\".$attr;\n\t\treturn $this->$functionName();\n\t}", "private function returnValueOfAttribute($elem, $attr, $url_flag = FALSE) {\n $element = $this->getSession()->getPage()->find(\"css\", $elem);\n if (!$element) {\n throw new Exception('Expected element ' . $elem . ' not found on page.');\n }\n if (!$element->hasAttribute($attr)) {\n throw new Exception('Expected element ' . $elem . ' to have attribute ' . $attr . ', but it does not.');\n }\n\n $current_value = $element->getAttribute($attr);\n\n if ($url_flag) {\n $current_value = $this->locatePath($current_value);\n }\n\n return $current_value;\n }", "protected function getAttributeValue($attribute, $option) {\n if(empty($attribute) || empty($option)) {\n return;\n }\n\n if(isset($this->attributeValues[$attribute][$option])) {\n return $this->attributeValues[$attribute][$option];\n }\n\n $attribute_model\t= Mage::getModel('eav/entity_attribute');\n $attribute_table\t= Mage::getModel('eav/entity_attribute_source_table');\n\n $attribute_code\t\t= $attribute_model->getIdByCode('catalog_product', $attribute);\n $loadedAttribute\t= $attribute_model->load($attribute_code);\n\n $attribute_table->setAttribute($loadedAttribute);\n\n $optionValue = $attribute_table->getOptionText($option);\n\n if(!empty($optionValue)) {\n if (is_array($optionValue)) {\n $optionValue = implode(',', $optionValue);\n }\n\n $this->attributeValues[$attribute][$option] = $optionValue;\n return $optionValue;\n } else {\n return $option;\n }\n }", "public function __get($val) {\n\n return $this->$val;\n }", "public function getValue() {\n\t\t$db = Loader::db();\n\t\t$value = $db->GetOne('select value from atDefault where avID = ?', array($this->getAttributeValueID()));\n\t\t\n\t\t$jsonHelper = Loader::helper('json');\n\t\treturn $jsonHelper->decode($value);\n\t}" ]
[ "0.7627318", "0.7228712", "0.70294714", "0.69835484", "0.6854661", "0.67164105", "0.67056364", "0.6699993", "0.6664343", "0.66552806", "0.6640594", "0.6574664", "0.65449494", "0.6527604", "0.64734393", "0.6431795", "0.6425958", "0.64122677", "0.6411158", "0.6390295", "0.6384741", "0.6384249", "0.63826495", "0.63798565", "0.63698536", "0.6351868", "0.63443416", "0.6337147", "0.631974", "0.63177806", "0.6275723", "0.6274795", "0.6273559", "0.6258989", "0.62558216", "0.6242981", "0.6231323", "0.62241703", "0.62117255", "0.61908245", "0.61858535", "0.61785996", "0.61758083", "0.61722404", "0.6171932", "0.61666286", "0.61666185", "0.6161939", "0.6157121", "0.61476815", "0.6132411", "0.611439", "0.611439", "0.611439", "0.61064667", "0.61013985", "0.60867476", "0.6084903", "0.60841787", "0.6075486", "0.60704315", "0.60665244", "0.6061914", "0.60605466", "0.60577756", "0.6053595", "0.6049614", "0.6049614", "0.60230756", "0.60178137", "0.6015385", "0.60124797", "0.599805", "0.599805", "0.599805", "0.599805", "0.599805", "0.599805", "0.599805", "0.599805", "0.599805", "0.599805", "0.599805", "0.599805", "0.599805", "0.599805", "0.599805", "0.599805", "0.599805", "0.599805", "0.599805", "0.599805", "0.599805", "0.59973234", "0.5996953", "0.5995532", "0.59953874", "0.59947795", "0.5975064", "0.5969467", "0.59578764" ]
0.0
-1
Gets the property of a card
protected function getCardProp($prop) { if (isset($this->typeValue) && isset($this->_cards[$this->typeValue]) && isset($this->_cards[$this->typeValue][$prop])) { return $this->_cards[$this->typeValue][$prop]; } throw new InvalidValueException('No card type detected. One of "typeValue" or "typeAttribute" must be set with a valid value.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCard()\n {\n return $this->card;\n }", "public function getCard() {\n return $this->card;\n }", "public function get_card(){ return $this->_card;}", "public function card()\n {\n if ( ! $this->bean->card) $this->bean->card = R::dispense('card');\n return $this->bean->card;\n }", "public function getCard(): Model\\CardSetting\n {\n return $this->card;\n }", "public function getProperty();", "public function cardName()\n {\n return $this->bean->card()->name;\n }", "public function getCard(): ?string\n {\n return $this->card;\n }", "public function getProperty()\n {\n return \\tabs\\api\\property\\Property::getProperty(\n $this->getPropertyRef(),\n $this->getBrandCode()\n );\n }", "public function getProperty()\n {\n return \\tabs\\api\\property\\Property::getProperty(\n $this->getPropertyRef(),\n $this->getBrandCode()\n );\n }", "public function getProperty(): string;", "public function getIdCard()\n {\n return $this->id_card;\n }", "public function getPropertyDetails(){\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance ();\n return $objectManager->get ( 'Apptha\\Airhotels\\Model\\Attributes' );\n }", "public function getNameOnCard()\n {\n return $this->name_on_card;\n }", "public function getProperty() {\n return $this->property;\n }", "function prop($prop)\n {\n \treturn $this->get_property($prop);\n }", "public function getNameCard()\n {\n return $this->get(self::_NAME_CARD);\n }", "public function getCard(): ?bool\n {\n return $this->card;\n }", "public function get($property);", "public function getCard()\n {\n return $this->vaultHelper->getQuoteCard($this->getSubscription()->getQuote());\n }", "public function getCardanoSpecific()\n {\n return $this->cardano_specific;\n }", "public function get_background_card(){ return $this->_background_card;}", "public function getProperty($key);", "public function getCardnumber()\n {\n return $this->cardnumber;\n }", "public function getCidCard()\n {\n return $this->cid_card;\n }", "public function inCard()\n {\n return $this->inCard;\n }", "public function inCard()\n {\n return $this->inCard;\n }", "public function property($name) {\n return $this->properties[$name];\n }", "function _getProp($key)\n {\n return $this->_props[$key];\n }", "public function getp($property){\n if(property_exists($this, $property)){\n return $this->$property;\n }\n }", "protected function getPropertyValue() {}", "public function __get($prop) {}", "public function getCardholder()\n {\n return $this->cardholder;\n }", "public function getProp($prop){\n\t\tif($this->props)\n\t\t\treturn $this->props[$prop];\n\t}", "abstract public function getPropertyShort();", "public function getCardcode()\n {\n return $this->cardcode;\n }", "public function getProperty($name)\n {\n return $this->__get($name);\n }", "public function __get($prop)\r\n {\r\n return $this->$prop;\r\n }", "public function getCreditCard()\n {\n return $this->creditCard;\n }", "public function getCreditCard()\n\t{\n\t\treturn $this->credit_card;\n\t}", "public function getCardsn()\n {\n return $this->cardsn;\n }", "public function __get($name){\n return self::$Stripe->$name;\n }", "function get_card_info($file){\n $template_data = get_file_data( $file , array( 'Card' => 'Card' ) );\n if (!empty($template_data['Card'])) {\n return $template_data['Card'];\n }\n }", "public function getCards()\n {\n return $this->cards;\n }", "public function getCards()\n {\n return $this->cards;\n }", "public function getCards()\n {\n return $this->cards;\n }", "abstract protected function propertyGet($name);", "public function __get($prop){\n\t\treturn $this->$prop;\n\t}", "public function __get($prop)\r\n {\r\n return $this->wrappedObj->$prop;\r\n }", "public function getProperty($property = null);", "public function property($key) { }", "public function __get($prop)\n {\n return $this->assignee[$prop];\n }", "public function getResourceProperty()\r\n {\r\n return $this->_resourceProperty;\r\n }", "public function getCardAux() {\n\t\treturn $this->cardAux;\n\t}", "public function __get($property) {\n\t\tswitch($property) {\n\t\t\tcase 'num':\n\t\t\t\treturn $this->num;\n\n\t\t\tcase 'view':\n\t\t\t\treturn $this->view;\n\n\t\t\tcase 'rubric':\n\t\t\t\treturn $this->rubric;\n\n\t\t\tcase 'parts':\n\t\t\t\treturn $this->parts;\n\n\t\t\tdefault:\n\t\t\t\t$trace = debug_backtrace();\n\t\t\t\ttrigger_error(\n\t\t\t\t\t'Undefined property ' . $property .\n\t\t\t\t\t' in ' . $trace[0]['file'] .\n\t\t\t\t\t' on line ' . $trace[0]['line'],\n\t\t\t\t\tE_USER_NOTICE);\n\t\t\t\treturn null;\n\t\t}\n\t}", "public function getProperty(string $name) {\n $prop = $this->class->getProperty($name);\n\n if(!($public = $prop->isPublic())) $prop->setAccessible(true);\n\n $value = $prop->getValue($this->entity);\n\n if(!$public) $prop->setAccessible(false);\n\n return $value;\n }", "public function getProperty($propertyName);", "function __get($property)\n {\n if($property == \"id\")\n {\n return $this->id;\n }\n else\n {\n return call_user_func_array(array($this, \"getAttribute\"), array($property));\n }\n }", "public function getMatricule(){\n return $this->$Matricule;\n }", "public function __get($property)\n {\n switch ($property) {\n case 'name':\n return $this->name;\n break;\n \n case 'status':\n return $this->status;\n break;\n case 'id':\n return $this->id;\n break;\n }\n }", "function getProperty($what)\n {\n $that = null;\n if (isset($this->$what)) {\n $that = $this->$what;\n }\n return $that;\n }", "public function property($propertyIdent);", "public function get_postcard() {\n return Attachment::get( $this->get_postcard_id() ) ?: false;\n }", "function CardInfo(){\r\n }", "public function get($s){\n if(property_exists($this,$s)){\n return $this->$s;\n }else{\n return 'no such value';\n }\n }", "function getProperty($object, $name) {\r\n\r\n\t\t#return (getNestedProperty(bean, name));\r\n\r\n\t}", "public function getCards()\n {\n return $this->getXml()->getElementsByTagName('Cards')->item(0)->nodeValue;\n }", "public function __get($property) {}", "public function getPropertyShort()\n\t{\n\t\t$property_short = NULL;\n\t\t\n\t\tif ($this->winnerExists())\n\t\t{\n\t\t\t$property_short = $this->winner->getStateData()->campaign_name;\n\t\t}\n\t\t\n\t\treturn $property_short;\n\t}", "public function getBuyableDescription()\n {\n foreach (['name', 'title', 'dsecription'] as $key) {\n if (property_exists($this, $prop)) {\n return $this->$prop;\n }\n }\n\n return null;\n }", "public function __get($property){\n /*if(method_exists($this,'get'.ucfirst($property))){\n\n }*/\n return $this->$property;\n }", "public function getCardHand() {\n\t\treturn $this->cardHand;\n\t}", "public function getReferencedProperty(): string;", "public function getProperty($field);", "public function getCardCvv()\n\t{\n\t\treturn $this->type;\n\t}", "abstract protected function get_properties();", "public function getCAPMedico() {\n return $this->_CAP;\n }", "public function getCard(): bool {\n $result = $this->mysqli->query(\"SELECT * FROM cards WHERE id='{$this->id}'\");\n if($result->num_rows == 1) { # Card exists in database\n $card = $result->fetch_assoc();\n $this->cardNum = $card['card_num'];\n $this->name = $card['name'];\n $this->billingAddress = $card['billing_address'];\n $this->exp = $card['exp'];\n $this->securityCode = $card['security_code'];\n return true;\n } else { # Card doesn't exist yet\n return false;\n }\n }", "public function getProperty($key)\n\t{\n\t\tif(array_key_exists($key, $this->properties))\n\t\t{\n\t\t\treturn $this->properties[$key];\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public function __get($name)\n {\n // if the property is declared (automatically not public), we can take it\n if (property_exists($this, $name)) {\n return $this->$name;\n } else {\n // otherwise we indicate that we must go through the getter or attribute does not exist\n trigger_error(\"You are trying to read an existing protected or private attribute without going through its getter! (__get) or a non-existent attribute\", E_USER_NOTICE);\n }\n }", "function get_properties()\r\n {\r\n return $this->properties;\r\n }", "public function getProperty()\n\t{\n\t\treturn empty($this->property) ? strtolower($this->getName()) : $this->property;\n\t}", "public function getIdCardImg()\n {\n return $this->id_card_img;\n }", "public function __get($property) \n {\n return $this->$property;\n }", "public function __get($property) \n {\n return $this->$property;\n }", "public function __get($property) \n {\n return $this->$property;\n }", "public function __get($property) \n {\n return $this->$property;\n }", "public function __get($property) \n {\n return $this->$property;\n }", "public function getAccessibleProperty(string $class, string $property);", "public function __get($property) {\n\n if (property_exists($this, $property)){\n return $this->$property;\n }\n\n }", "function getPropertyName() ;", "public function __get($property){\n\n if(property_exists($this, $property)){\n return $this->$property;\n }\n }", "function get($key) \n {\n return $this->$key;\n \n }", "public function __get ($champ)\n\t{\n\t\tif (property_exists($this, $champ))\n\t\t\treturn $this->$champ;\n\t}", "public function getCardReference()\n {\n return $this->data->creditCard->token;\n }", "public function getCardAt($offset)\n {\n return $this->get(self::CARD, $offset);\n }", "public function __get ($champ)\n\t\t{\n\t\t\tif (property_exists($this, $champ))\n\t\t\t\treturn $this->$champ;\n\t\t}", "function __get($property)\n {\n return $this->value;\n }", "public function get($key)\n {\n $result = null;\n if(!isset($this->properties[$key]))system_error(\"'{$key}' property of '{$this->bean}' is not define\") ;\n (isset($this->data[$key])) ? $result = $this->data[$key] : $result = null;\n return $result;\n }", "public function billing_card_info_details() {\n\n $option = [\n 'projection' => [\n '_id' => 1,\n 'cardnumber' => 1,\n 'cvv' => 1,\n 'expiry_month' => 1,\n 'expiry_year' => 1,\n 'firstname' => 1,\n 'lastname' => 1,\n 'email'=>1,\n 'customer_id'=>1,\n 'address' => 1,\n 'city' => 1,\n 'state' => 1,\n 'country' => 1,\n 'postal_code' => 1,\n 'subscription_id'=>1,\n 'customer_id'=>1\n ]\n ];\n $result = $this->mongo_db->find(MDB_BILLING_REG_INFO, array('_id' => 1), $option);\n return (!empty($result)) ? $result : '';\n }" ]
[ "0.73587", "0.73505026", "0.70686716", "0.70159626", "0.6954674", "0.68009484", "0.64440936", "0.63217264", "0.63088053", "0.63088053", "0.6277236", "0.6250667", "0.6202886", "0.61676615", "0.61396456", "0.6135204", "0.61159253", "0.610888", "0.60791755", "0.60574245", "0.6054223", "0.60246676", "0.5993529", "0.5986247", "0.592636", "0.58976233", "0.58976233", "0.5891449", "0.5882181", "0.5839769", "0.57984984", "0.579566", "0.57915395", "0.5783033", "0.575292", "0.57399255", "0.573635", "0.57258403", "0.5722089", "0.5711134", "0.5709216", "0.5706833", "0.5701411", "0.5688075", "0.5688075", "0.5688075", "0.5666896", "0.56643623", "0.5656796", "0.56386447", "0.5606935", "0.5579837", "0.5572134", "0.5569496", "0.555807", "0.5557321", "0.55434597", "0.55412847", "0.5540266", "0.5537433", "0.5521096", "0.5512486", "0.5502818", "0.5502533", "0.55022305", "0.54991984", "0.54958594", "0.54851013", "0.5484318", "0.54799646", "0.54783785", "0.54699904", "0.54648113", "0.54627365", "0.5459244", "0.54534245", "0.5451103", "0.54423255", "0.5436829", "0.5433582", "0.5433143", "0.543128", "0.5430657", "0.5428457", "0.5428457", "0.5428457", "0.5428457", "0.5428457", "0.54257417", "0.54191583", "0.5418732", "0.54177916", "0.5399683", "0.53865033", "0.5386175", "0.5382145", "0.5380503", "0.5369395", "0.5368428", "0.5366118" ]
0.5876258
29
Initializes related attribute values
protected function initValues($model, $attribute) { $this->expiryMonthValue = $this->parseValue($model, 'expiryMonth', ''); $this->expiryYearValue = $this->parseValue($model, 'expiryYear', ''); $this->holderValue = $this->parseValue($model, 'holder'); $this->cvvValue = $this->parseValue($model, 'cvv'); $number = preg_replace('/[^0-9]/', '', $model->$attribute); // strip non numeric characters if ($this->autoDetectType && !isset($this->typeValue)) { $this->typeValue = $this->getCardType($number); if ($this->autoUpdateType && isset($this->typeAttribute)) { $model->{$this->typeAttribute} = $this->typeValue; } } if ($this->autoUpdateNumber) { $model->$attribute = $number; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function initAttribute();", "protected function initializeAttributes() {\n\t\tparent::initializeAttributes();\n\n\t\t$this->attributes['subtype'] = \"assignments\";\n\t}", "protected abstract function initializeAttributes(): array;", "protected function initializeAttributes() {\n\t\tparent::initializeAttributes();\n\n\t\t$this->attributes['subtype'] = 'procuralog';\n\t}", "function init()\n\t{\n\t\t$this->defineAttribute('value', false, true, COMPONENT_TYPE_BOOLEAN);\n\t\t$this->defineAttribute('connect', false, 0, COMPONENT_TYPE_INTEGER);\n\n\t\t// call the superclass for validate the attributes\n\t\tparent::init();\n\t}", "public function initialize()\n {\n $this->skipAttributes([\n \"question_id\",\n ]);\n\n $this->skipAttributesOnCreate([\n \"question_status\"\n ]);\n\n $this->skipAttributesOnUpdate([\n \"question_creation_time\"\n ]);\n\n $this->hasMany('question_id', 'QaApp\\Models\\Answer', 'question_id', array('alias' => 'Answers'));\n }", "protected function _construct()\n\n\t{\n\n\t\t$this->_init('eav_attribute', 'attribute_id');\n\n\t}", "function initialize () {\n //blank for implementing\n\t\n\t//go through the attributes see if any of them have a name propery\n }", "public function initialize()\n {\n $this->setSource('Customer');\n $this->hasMany(\"Number\", \"Arrears\", \"CustomerNumber\");\n $this->hasMany(\"Number\", \"Charge\", \"CustomerNumber\");\n\n $c = $this;\n $c->IsCut = 0;\n $c->ArrearsCount = 0;\n $c->CutCount = 0;\n $c->IsClean = 0;\n $c->IsControl = 0;\n $c->Money = 0;\n $c->IsRent = 0;\n $c->RenterPhone = \"\";\n\n $c->CanCut = 0;\n $c->IsSpecial = 0;\n $c->CutStyle=\"\";\n $c->PressCount = 0;\n }", "protected function defineAttributes()\n {\n $this->dbAttributes = (object) [\n 'safe' => [\n 'nombre',\n 'estado',\n 'pais_idpais'\n ],\n 'date' => []\n ];\n }", "protected function initData() {\n $name = $this->_dbLink->query(self::GET_ATTRIBUTE_ID);\n $this->attribute_id = $name->fetch_object()->attribute_id;\n\n //Starting root paths, usually only one, but some sites have several pathes, if they change per website (ie. runnering)\n $root_cats = $this->_dbLink->query(self::GET_ROOT_CATEGORIES);\n while($cat = $root_cats->fetch_object()) {\n $this->root_cats[] = $cat->path;\n }\n }", "function initialize()\n\t{\n\t\t$this->strType = strtoupper($this->dom->getAttribute(\"type\"));\n\t\t$this->strValues = $this->dom->getAttribute(\"values\");\n\t\t\n\t\t$this->prepare();\n\t}", "protected function defineAttributes()\n {\n $this->dbAttributes = (object) [\n 'safe' => [\n 'fk_documento',\n 'fk_funcionario',\n 'accion',\n 'fecha',\n 'descripcion',\n 'titulo'\n ],\n 'date' => ['fecha']\n ];\n }", "public function initUserAttributes()\n {\n }", "protected function initialize()\n {\n $this->data = new stdClass();\n $this->data->ownId = null;\n $this->data->amount = new stdClass();\n $this->data->amount->currency = self::AMOUNT_CURRENCY;\n $this->data->amount->subtotals = new stdClass();\n $this->data->items = [];\n $this->data->receivers = [];\n }", "function init()\n {\n $this->defineAttribute('data', true, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('stru', false, '', COMPONENT_TYPE_STRING);\n parent::init();\n }", "public function __construct()\n {\n $defaultAttributeSetId = \\Mage::getSingleton('eav/config')\n ->getEntityType(\\Mage_Catalog_Model_Product::ENTITY)\n ->getDefaultAttributeSetId();\n $set = \\Mage::getModel('eav/entity_attribute_set')->load(4);\n $gid = $set->getDefaultGroupId();\n\n $that = $this;\n $this->setDefaultParameters(array(\n 'type'=> 'text',\n 'input'=> 'text',\n 'label'=> 'Test Attribute',\n 'global'=> \\Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,\n 'is_required'=> '0',\n 'is_comparable'=> '0',\n 'is_searchable'=> '0',\n 'is_unique'=> '1',\n 'is_configurable'=> '1',\n 'user_defined'=> '1',\n 'attribute_code' => function() use($that) { return $that->nextValue('attribute_code', function($i){return 'attribute_fixture_code_' . $i; }); },\n 'frontend_label' => function() use($that) { return $that->nextValue('frontend_label', function($i){return 'Attribute Fixture ' . $i; }); },\n 'attribute_set_id' => $defaultAttributeSetId,\n 'attribute_group_id' => $gid\n ));\n }", "public function set_attributes()\n {\n $this->id = 0;\n $this->set_process();\n $this->set_decomposition();\n $this->set_technique();\n $this->set_applicability();\n $this->set_input();\n $this->set_output();\n $this->set_validation();\n $this->set_quality();\n $this->score = 0;\n $this->matchScore = 0;\n $this->misMatch = \"\";\n }", "protected function initializeValues(): void\n {\n foreach ($this->params as $name => $infos) {\n if (!$this->is_sub_object && isset($infos['subobject']) && $infos['subobject']) {\n if (isset($infos['multivalues']) && $infos['multivalues']) {\n $this->values[$name] = [];\n } else {\n $tmp = get_class($this);\n $parts = explode('\\\\', $tmp);\n array_pop($parts);\n $class_name = implode('\\\\', $parts) . '\\\\' . $infos['type'];\n $class_name = str_replace('Entity', 'Datatype', $class_name);\n if (!class_exists($class_name)) {\n $class_name = str_replace(['\\\\EU\\\\', '\\\\AP\\\\', '\\\\EA\\\\'], '\\\\AM\\\\', $class_name);\n }\n $this->values[$name] = new $class_name();\n }\n } else {\n $this->values[$name] = null;\n }\n }\n }", "public function __construct() {\r\n parent::__construct( 'attributes' );\r\n\r\n if ( isset( $this->attribute_id ) )\r\n $this->id = $this->attribute_id;\r\n }", "public function initialize()\n {\n $this->setSchema(\"animedb\");\n $this->setSource(\"episodes\");\n $this->hasMany('id', 'Videos', 'episode_id', ['alias' => 'Videos']);\n $this->belongsTo('anime_id', '\\Anime', 'id', ['alias' => 'Anime', 'reusable' => true]);\n $this->allowEmptyStringValues(['title', 'description']);\n $this->skipAttributes(['date']);\n }", "public function initialize()\n\t{\n\t\t$this->setSource('ucm_field_values');\n\t}", "public function init() {\n extract($this->data);\n\n //Default link\n if(!$href) {\n $this->data['href'] = \"\";\n }\n\n if($href) {\n $this->data['attributeList']['role'] = \"link\";\n }\n }", "public function __construct() {\n parent::__construct();\n //setting attribute types.\n settype($this->id, \"integer\");\n settype($this->name, \"string\");\n settype($this->question_type_id, \"integer\");\n }", "public function __construct() {\n parent::__construct(self::TABLE_NAME, self::ID, self::NAME);\n $this->_age_model_method = null;\n $this->_core_id = null;\n $this->_age_model_notes = array();\n $this->_contact_id = null;\n $this->_age_model_id_status = 0;\n }", "public function __construct(){\n if(count($this->fillable) == 0){\n foreach($this->attributes as $key => $attr){\n array_push($this->fillable, $key);\n }\n }\n }", "public function initialize()\n {\n $this->setSchema(\"dia_sin_iva\");\n $this->setSource(\"terceros_descuentos_sin_impuestos\");\n $this->belongsTo('cod_descuento_sin_impuesto', 'App\\Models\\DescuentosSinImpuestos', 'cod', ['alias' => 'DescuentosSinImpuestos']);\n $this->belongsTo('cod_producto', 'App\\Models\\Productos', 'cod', ['alias' => 'Productos']);\n }", "public function initialize() {\n\n // Relation to DasUsers\n $this->belongsTo('id', 'Aiden\\Models\\DasUsers', 'users_id', ['alias' => 'DasUsers']);\n\n // Relation to Phrases\n $this->hasMany('id', 'Aiden\\Models\\UsersPhrases', 'users_id', [\"alias\" => \"Phrases\"]);\n\n // Relation to Das\n $this->hasManyToMany('id', 'Aiden\\Models\\DasUsers', 'users_id', 'das_id', 'Aiden\\Models\\Das', 'id', ['alias' => 'Das']);\n\n // Relation to Councils\n $this->hasManyToMany('id', 'Aiden\\Models\\UsersCouncils', 'users_id', 'councils_id', 'Aiden\\Models\\Councils', 'id', ['alias' => 'Councils']);\n\n }", "public function init()\n {\n\n // initialize the prepared statements\n $this->eavAttributeSetStmt =\n $this->getConnection()->prepare($this->loadStatement(SqlStatementKeys::EAV_ATTRIBUTE_SET));\n $this->eavAttributeSetsByEntityTypeIdStmt =\n $this->getConnection()->prepare($this->loadStatement(SqlStatementKeys::EAV_ATTRIBUTE_SETS_BY_ENTITY_TYPE_ID));\n $this->eavAttributeSetByEntityTypeIdAndAttributeSetNameStmt =\n $this->getConnection()->prepare($this->loadStatement(SqlStatementKeys::EAV_ATTRIBUTE_SET_BY_ENTITY_TYPE_ID_AND_ATTRIBUTE_SET_NAME));\n $this->eavAttributeSetByEntityTypeCodeAndAttributeSetNameStmt =\n $this->getConnection()->prepare($this->loadStatement(SqlStatementKeys::EAV_ATTRIBUTE_SET_BY_ENTITY_TYPE_CODE_AND_ATTRIBUTE_SET_NAME));\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function initializeHasStepAttributes(): void\n {\n $this->casts[static::stepAttributesField()] = SchemalessAttributes::class;\n }", "public function initialize()\n {\n $this->hasMany('cd', 'ShouhinMrs', 'shu_souko_mr_cd', array('alias' => 'ShouhinMrs'));\n $this->hasMany('cd', 'ShiireMeisaiDts', 'souko_mr_cd', array('alias' => 'ShiireMeisaiDts'));\n $this->hasMany('cd', 'UriageMeisaiDts', 'souko_mr_cd', array('alias' => 'UriageMeisaiDts'));\n $this->belongsTo('tantou_mr_cd', 'TantouMrs', 'cd', array('alias' => 'TantouMrs'));\n }", "public function Initialize()\n\t\t{\n\t\t\t$this->intId = Person::IdDefault;\n\t\t\t$this->strFirstName = Person::FirstNameDefault;\n\t\t\t$this->strLastName = Person::LastNameDefault;\n\t\t}", "function SetInitialValues()\n\t{\n\t\t$this->id = -1;\n\t\t$this->title = '';\n\t\t$this->url = '';\n\t\t$this->user_id = -1;\n\t\t$this->timestamp = -1;\n\t}", "public function init()\n {\n if (!is_array($this->values)) {\n $this->values = [$this->values];\n }\n }", "public function initialize()\n {\n $this->belongsTo('id_actaconteo_persona', 'CobActaconteoPersonaExcusa', 'id_actaconteo_persona', array(\n 'reusable' => true\n ));\n $this->belongsTo('id_actaconteo_persona', 'CobActaconteoPersonaFacturacion', 'id_actaconteo_persona', array(\n 'reusable' => true\n ));\n $this->belongsTo('id_actaconteo', 'CobActaconteo', 'id_actaconteo', array(\n 'reusable' => true\n ));\n }", "protected function initializeAttributes() {\n\t\tparent::initializeAttributes();\n\n\t\t$this->attributes['subtype'] = \"widget\";\n\t}", "public function setAttributes();", "public function initialize()\n {\n parent::initialize();\n $this->setSchema(\"salesDB\");\n $this->setSource(\"product_category\");\n $this->hasMany('id', 'App\\Models\\Product', 'product_category_id', ['alias' => 'Product']);\n $this->belongsTo('user_updated', 'App\\Models\\User', 'id', ['alias' => 'UserUpdated']);\n $this->belongsTo('user_created', 'App\\Models\\User', 'id', ['alias' => 'UserCreated']);\n $this->belongsTo('client_id', 'App\\Models\\Client', 'id', ['alias' => 'Client']);\n $this->belongsTo('sync_status_id', 'App\\Models\\SyncStatus', 'id', ['alias' => 'SyncStatus']);\n }", "public function initialize()\n {\n $this->keepSnapshots(true);\n $this->addBehavior(new Blameable());\n $this->useDynamicUpdate(true);\n $this->hasMany(\"id\", \"models\\Formentrys\", \"form_id\", ['alias' => 'Entries']);\n $this->hasMany(\"id\", \"models\\Formfields\", \"form_id\", ['alias' => 'Formfields']);\n $this->belongsTo(\"user_id\", \"models\\Users\", \"id\", ['alias' => 'Users']);\n }", "public function initialize()\n {\n $this->setSchema(\"cubicfox\");\n $this->setSource(\"rates\");\n\n $this->hasManyToMany(\n \"id\",\n \"Users\",\n \"user_id\", \n \"product_id\",\n \"Products\",\n \"id\"\n );\n }", "public function initialize()\n {\n\t\t$this->belongsTo('sfafba_partner_id', 'SfAffiliationPartener', 'sfafpa_id', array('alias' => 'sf_affiliation_partener_partner_id'));\n\n parent::initialize();\n }", "public function init() {\n\t\t// use this method to initialize default values.\n\t}", "function initAsSpecimen() {\n $this->id = 0;\n\n $this->label = '';\n $this->datec = '';\n $this->fk_author = '';\n $this->tms = '';\n $this->fk_source = '';\n $this->sourcetype = '';\n $this->url = '';\n }", "public function initialize()\n {\n $this->hasMany('id_niveldinst', 'Cargaestudiantes', 'id_niveldinst', array('alias' => 'Cargaestudiantes'));\n $this->hasMany('id_niveldinst', 'Datosprofesiona', 'nive_instr', array('alias' => 'Datosprofesiona'));\n $this->hasMany('id_niveldinst', 'Cargaestudiantes', 'id_niveldinst', NULL);\n $this->hasMany('id_niveldinst', 'Datosprofesiona', 'nive_instr', NULL);\n }", "protected function _construct()\n\t{\n\t\t$this->_init('aurednik/cms_home_entity_attribute');\n\t}", "public function initialize()\n\t{\n\t\t$this->data = new stdClass();\n\t}", "public function init()\n {\n extract($this->data);\n\n //Set default values to items array\n $this->data['items'] = $this->fillItemsData($items);\n\n //Endpoint for async fetching\n if(isset($endpoint)) {\n $this->data['attributeList']['data-endpoint'] = $endpoint; \n }\n\n //Add unlist class\n $this->data['classList'][] = \"unlist\"; \n\n //Direction of nav\n if($direction) {\n $this->data['classList'][] = $this->getBaseClass() . \"--\" . $direction; \n }\n\n //Attributes\n $this->data['attributeList']['aria-orientation'] = $direction; \n }", "public function initialize()\n {\n $this->setSchema(\"phptest\");\n $this->setSource(\"rating\");\n\n // n-1 relation to Products\n $this->belongsTo('product_id', 'Models\\Products', 'id', ['alias' => 'product']);\n\n // n-1 relation to Users\n $this->belongsTo('user_id', 'Models\\Users', 'id', ['alias' => 'user']);\n }", "public function _initialize()\n {\n \tparent::_initialize();\n $this->pz\t = D('mru_jfb');\n $this->dp\t = D('Miye_dianpu');\n $this->order = D('Miye_order');\n \n }", "public function prepAttributesForUse()\n\t{\n\t\t$attributes = $this->defineAttributes();\n\t\t$attributes['dateUpdated'] = array('0' => AttributeType::DateTime, 'required' => true);\n\t\t$attributes['dateCreated'] = array('0' => AttributeType::DateTime, 'required' => true);\n\n\t\tforeach ($attributes as $name => $config)\n\t\t{\n\t\t\t$config = ModelHelper::normalizeAttributeConfig($config);\n\t\t\t$value = $this->getAttribute($name);\n\n\t\t\tswitch ($config['type'])\n\t\t\t{\n\t\t\t\tcase AttributeType::DateTime:\n\t\t\t\t{\n\t\t\t\t\tif ($value)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (DateTimeHelper::isValidTimeStamp($value))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$dateTime = new DateTime('@'.$value);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// TODO: MySQL specific.\n\t\t\t\t\t\t\t$dateTime = DateTime::createFromFormat(DateTime::MYSQL_DATETIME, $value);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$this->setAttribute($name, $dateTime);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase AttributeType::Mixed:\n\t\t\t\t{\n\t\t\t\t\tif (!empty($value) && is_string($value))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->setAttribute($name, JsonHelper::decode($value));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->setAttribute($name, array());\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function initialize(){\n $this->hasMany(\n \"category_id\", \n \"Multiple\\\\Frontend\\\\Models\\\\Products\", \n \"category\",\n array(\n \"reusable\" => true\n )\n );\n \n $this->hasManyToMany(\n \"category_id\", \n \"Multiple\\\\Frontend\\\\Models\\\\Products\", \n \"category\", \n \"vendor_id\", \n \"Multiple\\\\Frontend\\\\Models\\\\Vendor\", \n \"vendor_id\",\n array(\n \"reusable\" => true,\n \"alias\" => \"AliasVendorPro\"\n )\n );\n }", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function initialize()\n {\n parent::initialize();\n $this->belongsTo('users_id', Users::class, 'id', array('alias' => 'users'));\n $this->belongsTo('companies_id', Companies::class, 'id', array('alias' => 'company'));\n }", "public function initData()\n {\n $this->appliedNumberingData = array();\n $this->currHyperlink = null;\n }", "function initData() {\n\t\t$representative =& $this->getRepresentative();\n\n\t\tif ($representative) {\n\t\t\t$this->_data = array(\n\t\t\t\t'representativeId' => $representative->getId(),\n\t\t\t\t'role' => $representative->getRole(),\n\t\t\t\t'representativeIdType' => $representative->getRepresentativeIdType(),\n\t\t\t\t'representativeIdValue' => $representative->getRepresentativeIdValue(),\n\t\t\t\t'name' => $representative->getName(),\n\t\t\t\t'phone' => $representative->getPhone(),\n\t\t\t\t'fax' => $representative->getFax(),\n\t\t\t\t'email' => $representative->getEmail(),\n\t\t\t\t'url' =>$representative->getUrl(),\n\t\t\t\t'isSupplier' => $representative->getIsSupplier(),\n\t\t\t);\n\t\t}\n\t}", "public function initialize()\n {\n $this->setSchema(\"mus\");\n $this->setSource(\"sculpture\");\n $this->belongsTo(\n 'Art_Objects_id_no',\n 'ArtObjects',\n 'id_no'\n );\n }", "public function initialize()\n {\n $this->data = new stdClass();\n }", "protected function initUserAttributes()\n {\n return $this->api('people/~:(' . implode(',', $this->attributeNames) . ')', 'GET');\n }", "public function initialize()\n {\n $this->setSchema(\"nidara_private_school\");\n $this->setSource(\"account_status\");\n $this->belongsTo('users_id', '\\Users', 'id', ['alias' => 'Users']);\n $this->belongsTo('why_are_you_leaving_id', '\\WhyAreYouLeaving', 'id', ['alias' => 'WhyAreYouLeaving']);\n }", "public function initialize()\n {\n $this->belongsTo(\n 'users_id',\n Users::class,\n 'id',\n ['alias' => 'user']\n );\n\n $this->belongsTo(\n 'companies_id',\n Companies::class,\n 'id',\n ['alias' => 'company']\n );\n\n $this->setSource('users_associated_company');\n }", "public function initialize()\n {\n $this->hasMany('id', 'app\\common\\models\\base\\UserProfile', 'user_id', array('alias' => 'UserProfile'));\n $this->hasMany('id', 'app\\common\\models\\base\\UserRoles', 'user_id', array('alias' => 'UserRoles'));\n $this->belongsTo('type_id', 'app\\common\\models\\base\\UserType', 'id', array('alias' => 'UserType'));\n }", "public function initialize()\n {\n $this->hasMany('id', 'Movie', 'classification_id', array('alias' => 'Movie'));\n }", "public function __construct($data)\n {\n foreach ($this->attributes as $attribute) {\n $this->data[$attribute] = (array_key_exists($attribute, $data)) ? $data[$attribute] : NULL;\n }\n }", "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_item('');\n $this->setId_enc('');\n $this->setId_nom('');\n $this->setModo('');\n $this->setF_ini('');\n $this->setF_fin('');\n $this->setId_nom_new('');\n $this->setPrimary_key($aPK);\n }", "function __construct() {\n if($this->Fields) {\n foreach($this->Fields as $key => $value) {\n $this->$key = null;\n if($value['extra'] === \"auto_increment\") $this->Id = $key;\n if($value['extra'] === \"ref\") $this->Ref = $key;\n }\n }\n }", "public function initialize()\n {\n $this->setSchema(\"atiempo_prod\");\n $this->hasMany('id', 'AcCartaAvalDetalle', 'id_carta', ['alias' => 'AcCartaAvalDetalle']);\n }", "protected function _initialize()\n {\n $this->metadata()->setTablename('turma');\n $this->metadata()->setPackage('Model');\n \n # nome_do_membro, nome_da_coluna, tipo, comprimento, opcoes\n \n $this->metadata()->addField('id', 'id', 'int', 11, array('primary' => true, 'notnull' => true, 'autoincrement' => true));\n $this->metadata()->addField('foto', 'foto', 'varchar', 45, array());\n $this->metadata()->addField('ano', 'ano', 'int', 11, array('notnull' => true));\n $this->metadata()->addField('semestre', 'semestre', 'int', 1, array('notnull' => true));\n\n \n $this->metadata()->addRelation('egressos', Lumine_Metadata::ONE_TO_MANY, 'Egresso', 'turmaId', null, null, null);\n }", "public function initialize()\n {\n /*$this->hasOne('id', 'Broadcasters', 'id', NULL);\n $this->hasOne('id', 'Clients', 'id', NULL);\n $this->hasMany('id', 'Credits', 'user_id', NULL);*/\n }", "public function initialize()\n {\n $this->setSchema(\"\");\n $this->hasMany(\n 'id',\n 'App\\Models\\Flats',\n 'house_id',\n array('alias' => 'Flats', \"reusable\" => true)\n );\n\n $this->belongsTo(\n \"street_id\",\n \"App\\Models\\Streets\",\n \"id\",\n array(\"alias\" => \"Streets\", \"reusable\" => true)\n );\n }", "function init()\n {\n $this->defineAttribute('label', true, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('routeUrl', false, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('add', false, 'Nuova scheda', COMPONENT_TYPE_STRING);\n $this->defineAttribute('cssClass', false, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('buttonId', false, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('noLink', false, false, COMPONENT_TYPE_STRING);\n $this->defineAttribute('iconClass', false, 'fa-plus', COMPONENT_TYPE_STRING);\n\n parent::init();\n }", "protected function populate_value()\n {\n }", "public function __construct() {\n\t\t$this->taxonomies = array();\n\t\t$this->attributes = array();\n\t\t$this->variations = array();\n\t}", "public function Initialize()\n\t\t{\n\t\t\t$this->intIdOrganization = Organization::IdOrganizationDefault;\n\t\t\t$this->strName = Organization::NameDefault;\n\t\t\t$this->strPhone = Organization::PhoneDefault;\n\t\t\t$this->strQrCode = Organization::QrCodeDefault;\n\t\t\t$this->strOrganizationImage = Organization::OrganizationImageDefault;\n\t\t\t$this->strLatitude = Organization::LatitudeDefault;\n\t\t\t$this->strLongitude = Organization::LongitudeDefault;\n\t\t\t$this->strCountry = Organization::CountryDefault;\n\t\t\t$this->strCity = Organization::CityDefault;\n\t\t\t$this->strAddress = Organization::AddressDefault;\n\t\t\t$this->intIdOrganizationType = Organization::IdOrganizationTypeDefault;\n\t\t\t$this->intIdOwner = Organization::IdOwnerDefault;\n\t\t}", "public function initialize()\n {\n $this->belongsTo('nu_cedula', 'Datospersonales', 'nu_cedula', array('alias' => 'Datospersonales'));\n $this->belongsTo('nu_cedula', 'Datospersonales', 'nu_cedula', array('foreignKey' => true));\n }", "public function initialize()\n {\n if ($this->initialized || !$this->association) {\n return;\n }\n $this->doInitialize();\n $this->initialized = true;\n }", "protected function initialize()\n {\n // load the driver\n static::getDriver();\n\n // add in the default ID property\n if (static::$ids == [self::DEFAULT_ID_PROPERTY] && !isset(static::$properties[self::DEFAULT_ID_PROPERTY])) {\n static::$properties[self::DEFAULT_ID_PROPERTY] = self::$defaultIDProperty;\n }\n\n // generates created_at and updated_at timestamps\n if (property_exists($this, 'autoTimestamps')) {\n $this->installAutoTimestamps();\n }\n\n // fill in each property by extending the property\n // definition base\n foreach (static::$properties as &$property) {\n $property = array_replace(self::$propertyDefinitionBase, $property);\n }\n\n // order the properties array by name for consistency\n // since it is constructed in a random order\n ksort(static::$properties);\n }", "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_nom('');\n $this->setId_nivel('');\n $this->setId_asignatura('');\n $this->setId_situacion('');\n // la fecha debe estar antes del acta por si hay que usar la funcion inventarActa.\n $this->setF_acta('');\n $this->setActa('');\n $this->setDetalle('');\n $this->setPreceptor('');\n $this->setId_preceptor('');\n $this->setEpoca('');\n $this->setId_activ('');\n $this->setNota_num('');\n $this->setNota_max('');\n $this->setTipo_acta('');\n $this->setPrimary_key($aPK);\n }", "function initializeObjectAttribute( $contentObjectAttribute, $currentVersion, $originalContentObjectAttribute )\n {\n if ( $currentVersion != false )\n {\n $dataText = $originalContentObjectAttribute->content();\n $contentObjectAttribute->setContent( $dataText );\n }\n else\n {\n $default = array( 'value' => array() );\n $contentObjectAttribute->setContent( $default );\n }\n }" ]
[ "0.7389131", "0.7322956", "0.71741456", "0.70577127", "0.68915945", "0.6864304", "0.6676938", "0.6642353", "0.65942943", "0.65509385", "0.6528375", "0.64911056", "0.6463845", "0.6426178", "0.6424324", "0.6417007", "0.639959", "0.6381442", "0.63516563", "0.634209", "0.63274556", "0.62927306", "0.62857705", "0.62544054", "0.6253949", "0.62254304", "0.6182925", "0.6130522", "0.61134726", "0.61039096", "0.61039096", "0.61039096", "0.61039096", "0.61039096", "0.6093147", "0.60867053", "0.6078682", "0.606422", "0.60569054", "0.6046787", "0.60381216", "0.6029291", "0.6029048", "0.60249245", "0.60116154", "0.5996054", "0.5991864", "0.5986109", "0.5984611", "0.5979068", "0.5976306", "0.5974081", "0.59723765", "0.59577024", "0.59574485", "0.5953503", "0.5953503", "0.5953503", "0.5953503", "0.5953503", "0.5953503", "0.5953503", "0.5953503", "0.5953503", "0.5941538", "0.593958", "0.593958", "0.593958", "0.593958", "0.593958", "0.593958", "0.593958", "0.593958", "0.593958", "0.593958", "0.59385747", "0.5932857", "0.59201944", "0.5914768", "0.5913976", "0.5871881", "0.58654857", "0.58618253", "0.5857184", "0.5856735", "0.58392304", "0.5839005", "0.5836397", "0.5835472", "0.5835445", "0.582651", "0.58219254", "0.58217484", "0.581422", "0.58077854", "0.58057946", "0.58014584", "0.5796225", "0.57911766", "0.5787573", "0.5785171" ]
0.0
-1
Check if the card holder name is valid
public function isValidHolder() { return !empty($this->holderValue) && preg_match($this->holderPattern, $this->holderValue); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _name_check($str){\n }", "private function ValidateName($name){\n if (empty($name)){ //checks if empty\n $this->valid = False;\n }else if (strlen($name)>= 30){ //checks max length\n $this->valid = False;\n }else if(!preg_match(\"/^[a-zA-Z ]*$/\",$name)){ //checks format\n $this->valid = False;\n }\n }", "function validName($name)\n {\n //name should not be empty and should contain only letters\n return !empty($name) && ctype_alpha($name);\n }", "function verifyUserName($name) {\r\n if (preg_match('/^[a-zA-Z0-9\\ \\\\._\\'\"-]{4,50}$/', $name) != 1) { // no match\r\n return \"Name must be 4-50 characters long and consist of letters, digits, \"\r\n . \"spaces, dots, underscores, apostrophies, or minus sign.\";\r\n }\r\n return TRUE;\r\n}", "public static function isValidName($name) {}", "private function assertTheNameOnlyContainsAllowedCharacters()\n {\n if (1 !== preg_match(self::NAME_REGEX, $this->getName())) {\n throw new Exception('The result of the getName method can only contain letters, numbers, underscore and dashes.');\n }\n }", "function isValidName ($name)\r\n{\r\n global $cf_reservedpattern;\r\n\r\n $reservedpattern = $cf_reservedpattern ? $cf_reservedpattern : '[_a-z]{0,1}([\\d]+)';\r\n\r\n if (preg_match(\"%^\".$reservedpattern.\"$%i\", $name, $matches))\r\n return FALSE; // reserved - not permitted\r\n\r\n $pattern = '[a-z\\d][_a-z\\d]{2,23}';\r\n if (preg_match('%^'.$pattern.'$%i', $name))\r\n if (!preg_match(\"%^(api|com|biz|def|gov|net|org|wap|web|www|gamma|mobile|mygamma|buzzcity|netbeacon)[\\d]*$%i\", $name))\r\n return TRUE;\r\n\r\n return FALSE; // not permitted\r\n}", "function validateName()\n {\n global $inName, $validForm, $nameErrMsg;\t\t//Use the GLOBAL Version of these variables instead of making them local\n $nameErrMsg = \"\";\t\t\t\t\t\t\t\t//Clear the error message.\n if($inName==\"\")\n {\n $validForm = false;\t\t\t\t\t//Invalid name so the form is invalid\n $nameErrMsg = \"Name is required\";\t//Error message for this validation\n }\n\n else if(!preg_match(\"/^[a-zA-Z\\s]+$/\",$inName)){\n $validForm=false;\n $nameErrMsg=\"Please use only letters\";\n }\n\n else\n {\n $inLname = trim($inName);\t\t\t\t//Removes leading/trailing characters\n $inLname = htmlspecialchars($$inName);\t//converts special characters\n }\n }", "public static function nameIsValid($name) {\r\n return ( is_string($name) && !empty($name) && strlen($name) >=2 ); \r\n }", "function validateName($name)\n {\n return (mb_strlen($name) <= CUSTOMER_NAME_MAX_LENGTH && mb_strlen($name) !== 0);\n }", "function isValidName($name)\n{\n if (! preg_match(\"/^[a-zA-Z ]*$/\", $name)) {\n return false;\n }\n return true;\n}", "function valid_name($name) {\r\n\tif (empty($name)) \r\n\t\treturn false;\r\n\telse\r\n\t\treturn true;\r\n }", "static function validName($name)\r\n {\r\n if (ctype_alpha($name)) {\r\n return $name;\r\n } else if ($name == \"\") {\r\n return !empty($name);\r\n }\r\n }", "function validName($name)\r\n {\r\n $name = str_replace(' ', '', $name);\r\n return !empty($name) && ctype_alpha($name);\r\n }", "public function validateName()\n {\n if (strlen(trim($_POST[$this->key])) < $this->minLength) {\n self::$errors[] = $this->convertUnderscores() . \" field requires at least $this->minLength characters\";\n }\n\n //check for profanity.\n if ($this->noProfanity) {\n $this->checkProfanity();\n }\n\n //lastly, check for valid first name patterns.\n\n if (!preg_match(\"/^[a-zA-Z]+[ -\\/\\\\'\\\"]*[a-zA-Z]+[ \\\"]{0,2}[a-zA-Z]*$/\", trim($_POST[$this->key]))) {\n self::$errors[] = \"Not a valid \" . $this->convertUnderscores();\n }\n\n return self::$errors ? false : true;\n }", "function check_name($str, $blank_ok = FALSE)\n\t{\n\t\tif ($str == '')\n\t\t\treturn $blank_ok;\n\t\tif (preg_match(\"#^\\d+[e|E]#\", $str))\n\t\t\treturn FALSE;\n\t\treturn TRUE;\n\t}", "public static function checkName($name)\r\n {\r\n if (strlen($name) >= 4) {\r\n return true;\r\n }\r\n return false;\r\n }", "static function checkNames($input)\r\n {\r\n if (preg_match('/^[\\w\\W][\\w\\W]{1,20}$/', $input)) {\r\n return true; //Illegal Character found!\r\n } else {\r\n echo PageBuilder::printError(\"Please enter alphabets only in name fields.\");\r\n return false;\r\n }\r\n }", "function nameValidator() {\n\t\tglobal $firstname;\n\t\treturn ctype_alpha($firstname);\n\t}", "function is_name_valid($input)\n {\n return (preg_match(\"/^([-a-z_ ])+$/i\", $input)) ? TRUE : FALSE;\n }", "public function name_validation($name){\n\t\tif(!preg_match('/^[a-zA-Z0-9. ]*$/',$name)){ \n\t\t\treturn true;\n \t}\n }", "public static function validateName($name) {\n if (preg_match(\"/^[a-zA-Z]*$/\",$name))\n return true;\n else\n return false;\n }", "function validateName($name) {\n\tif (!preg_match('/[^A-Za-z]+/', $name) && strlen($name) >= 2 && strlen($name) <= 20)\n\t\treturn 1;\t//name is valid\n\telse\n\t\treturn 0;\n}", "function ValidateName($name)\n{\n $chars = str_split($name);\n\n // Assess each character\n foreach ($chars as $char) {\n if (!ValidateChar($char)) {\n return false;\n }\n }\n\n // // Check for empty\n // if (empty($name)) {\n // return false;\n // }\n\n return true;\n}", "function validateUserName($name)\n {\n /**condition for validating the type and size of user input string\n *takes user input name as a parameter for validating with the set conditons\n */\n if (preg_match('/[a-zA-Z]{3}/', $name)) {\n return true;\n }\n }", "function isValidShortName($name) {\n return preg_match('#^[a-z0-9]+$#i', $name);\n}", "function _validateUsername($name)\n {\n return trim(substr(preg_replace('/[^A-Za-z0-9_ \\-]/', '',$name),0,24)); \n }", "public static function validate_name( $value ) {\n\t\treturn !DataValidator::cc_number_exists_in_str( $value );\n\t}", "function test_names($data){\n\tif (!preg_match(\"/^[a-zA-Z-' ]*$/\",$data)) {\n \t\treturn \"Only letters and white space allowed\";\n\t}\n\treturn $data;\n}", "function validateName($string){\n\n\tif(preg_match(\"/^[a-zA-Z\\s]{5,30}$/\", $string)){\n\n\t\treturn true;\n\t}\n\telse{\n\n\t\treturn false;\n\t}\n\n\n}", "protected function checkName()\n {\n if (preg_match('/^[a-zA-Z_]{1}[a-zA-Z_0-9]*$/', $this->name) == false) {\n throw new ReflectionException('Annotation parameter name may contain letters, underscores and numbers, but contains an invalid character.');\n }\n }", "function account_namevalid() {\n if (strspn($_POST['clientusername'],\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-\") == 0) {\n return false;\n }\n \n // must contain all legal characters\n if (strspn($_POST['clientusername'],\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_\") != strlen($_POST['clientusername'])) {\n return false;\n }\n\n // min and max length\n if (strlen($_POST['clientusername']) < 5) {\n return false;\n }\n if (strlen($_POST['clientusername']) > 25) {\n return false;\n }\n\n // illegal names\n if (eregi(\"^((root)|(bin)|(daemon)|(adm)|(lp)|(sync)|(shutdown)|(halt)|(mail)|(news)|(uucp)|(operator)|(games)|(mysql)|(httpd)|(nobody)|(dummy)|(www)|(cvs)|(shell)|(ftp)|(irc)|(debian)|(ns)|(download))$\", $_POST['username'])) {\n return false;\n }\n if (eregi(\"^(anoncvs_)\", $_POST['clientusername'])) {\n return false;\n }\n\nreturn true;\n}", "private function __validate_name() {\n if (isset($this->initial_data[\"name\"])) {\n if ($this->get_limiter_id_by_name($this->initial_data[\"name\"], true)) {\n $this->id = $this->get_limiter_id_by_name($this->initial_data[\"name\"]);\n } else {\n $this->errors[] = APIResponse\\get(4209);\n }\n } else {\n $this->errors[] = APIResponse\\get(4167);\n }\n }", "function name_validation($str)\n{\n return preg_match(\"/^[a-zA-Z ]+$/\", $str);\n}", "function validInfo($info)\r\n{\r\n return !empty($info) //&& ctype_alpha($name)\r\n ;\r\n}", "function validName($name) {\r\n //checks to see that a string is all alphabetic\r\n return\r\n (\r\n (!empty($name)) && ctype_alpha($name));\r\n}", "function nameFormat ($value){\n \n if(strlen($value) == 0){\n return true;\n }\n \n else if(!preg_match(VALID_NAME_FORMAT,$value)){\n return false;\n }\n \n return true;\n}", "function validate_name($name)\r\n\t{\r\n\t\t$trim = trim($name);\r\n\t\tif(strlen($trim) > 1)\r\n\t\t{\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n\t\treturn FALSE;\r\n\t}", "public function validateRealname() {\r\n $leng = mb_strlen($this->data[$this->name]['RealName']);\r\n if ($leng > 128) {\r\n return FALSE;\r\n } else if ($leng > 64) {\r\n if (mb_ereg(self::_REGEX_FULLWITH, $this->data[$this->name]['RealName']) !== false) {\r\n return FALSE;\r\n }\r\n }\r\n return TRUE;\r\n }", "private function validateName($name)\n {\n if($name != NULL && $name != \"\"){\n return TRUE;\n } else {\n return FALSE;\n }\n }", "public static function validateName($name) {\n\t\tif (!empty($name)) {\n\t\t\tif (preg_match('/^[a-z0-9 ]{3,}$/i', $name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "protected static function isValidName($name)\n {\n return '' === $name || null === $name || preg_match('/^[a-zA-Z0-9_][a-zA-Z0-9_\\-:]*$/D', $name);\n }", "function sanitizeName() {\n $pattern = \"/[0-9`!@#$%^&*()_+\\-=\\[\\]{};':\\\"\\\\|,.<>\\/?~]/\";\n if (!preg_match($pattern, $this->fname) && !preg_match($pattern, $this->lname)) {\n $this->fname = trim($this->fname);\n $this->lname = trim($this->lname);\n } else {\n die(\"Error. Check your form data\");\n }\n }", "function verify_name($name) // Colorize: green\n { // Colorize: green\n return isset($name) // Colorize: green\n && // Colorize: green\n is_string($name) // Colorize: green\n && // Colorize: green\n $name != \"\"; // Colorize: green\n }", "public static function checkName($name)\n {\n if (strlen($name) >= 2) {\n return true;\n }\n return false;\n }", "function is_reserved_name($str) {\n\t\t$reserved = array('name','value','content','parent','rank','password','timestamp');\n\t\tif(empty($str) || in_array($str, $reserved)) return true;\n\t\treturn false;\n\t}", "public function name_valid($name) {\n if (!preg_match(\"/^[a-z0-9]+$/i\", $name)) {\n /* name contains invalid characters */\n return false;\n }\n\n if (strlen($name) >= 100) {\n /* name is too long */\n return false;\n }\n\n /* name already exists? */\n $stmt = get_pdo()->prepare('select * from user where name = :name');\n $stmt->bindValue(':name', $name);\n $stmt->execute();\n return count($stmt->fetchAll()) == 0;\n }", "private function validateUsername() {\r\n $val = trim($this->data['username');\r\n \r\n if( empty($val) ) { \r\n $this->addError('username', 'username cannot be empty');\r\n } else {\r\n if(preg_match('/^[a-aA-Z0-9]{6,12}$/', $val)) {\r\n $this->addError('username', 'username must 6-12 chars $ alphanumeric')\r\n }\r\n } \r\n }", "function validate_name($name){\n\n\tif(empty($name)){\n\t\t\n\t\treturn false;\n\t\t\n\t}\n\t else if(count(explode(' ',$name)) <2){\n\t\t\n\t\t\n\t\t\treturn false;\n\t\t\n\t}\n\t\n\telse if(!preg_match(\"/^[a-zA-Z \\.\\-]*$/\",$name)){\n\t\t\n\t\t\n\t\treturn false;\n\t}\n\telse if(!preg_match(\"/^[a-zA-Z]*$/\",$name[0])){\n\t\t\n\t\t\n\t\treturn false;\n\t}\n\telse{\n\t\t\n\t\treturn true;\n\t}\n\t\n\t\n}", "function isNameViable(){\n\t$postName = filter_var($_POST['name'], FILTER_SANITIZE_SPECIAL_CHARS);\n\tif(strlen($postName) < 3){\n\t\treturn false;\n\t}\n\n\t$f = $postName[0]; #first letter is predicted class\n\t$s = $postName[1]; #second letter is actual class\n\t#third letter is '_'\n\tif(($f=='B' || $f=='D' || $f=='F' || $f=='L' || $f=='R') && \n\t\t($s=='B' || $s=='D' || $s=='F' || $s=='L' || $s=='R') &&\n\t\t$postName[2]=='_'){\n\t\t\treturn true;\n\t} else{\n\t\treturn false;\n\t}\n}", "public static function isValidName( $name ) {\n return TRUE;\n }", "function _valid_transportername($str)\r\n\t\t{\r\n\t\t\t$this->erpm->auth();\r\n\t\t\t\r\n\t\t\t$transporter_id = $this->input->post('transporter_id');\r\n\t\t\tif($transporter_id)\r\n\t\t\t\t$cond = ' and id != '.$transporter_id;\r\n\t\t\telse\r\n\t\t\t\t$cond = '';\r\n\t\t\t\r\n\t\t\t$transp_name =$this->input->post('name');;\r\n\t\t\tif($this->db->query(\"select count(*) as t from pnh_transporter_info where name = ? $cond\",$transp_name)->row()->t)\r\n\t\t\t{\r\n\t\t\t\t$this->form_validation->set_message('_valid_transportername',$transp_name.' is already available ');\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}", "private function _checkName($name)\n {\n if (!preg_match('/' . $this->_packet->question[0]->qname . '$/', $name)) {\n \n throw new Net_DNS2_Exception(\n 'name provided (' . $name . ') does not match zone name (' .\n $this->_packet->question[0]->qname . ')',\n Net_DNS2_Lookups::E_PACKET_INVALID\n );\n }\n \n return true;\n }", "public static function filename_valid($name) {\n return strlen($name) < 100 && preg_match(\"/^[a-z0-9 \\.-]+$/i\", $name) != 0;\n }", "function valid_name($name){\r\n for($i = 0; $i < strlen($name); $i++){\r\n if( is_numeric( $name[$i] ) ){\r\n return False;\r\n }\r\n }\r\n return True;\r\n }", "public function getCardHolderName()\n {\n return $this->cardHolderName;\n }", "public function getValidatedName($name){\n\t if(empty($name)){\n\t \t$validName=FALSE;\n\t }\n\t\telse {\n\t\t\tif(strlen($name)==1){\n\t \t$validName=FALSE;\n\t }\n\t \t$validName = $this->sanitizeString($name);\n\t\t}\n\t return $validName;\n }", "private function validName() {\n\t\t\tif($this->conn->getNumResults(\"SELECT name FROM usergroup WHERE name = '\".mysql_real_escape_string($this->name).\"' AND groupId != '\".$this->groupId.\"'\") == 0)\n\t\t\t\treturn true;\n\t\t\treturn false;\n\t\t}", "public function hasValidNameArgument()\n {\n $name = $this->argument('name');\n\n if (! Str::contains($name, '/')) {\n $this->error(\"The name argument expects a vendor and name in 'Composer' format. Here's an example: `vendor/name`.\");\n\n return false;\n }\n\n return true;\n }", "function valid_item_name ($item_name) {\n if ( empty($item_name) )\n return false;\n else \n return true;\t\n}", "function isCorrectFilename ($name) {\r\n if (!empty($name)) {\r\n if (preg_match('/[a-zA-Z0-9_]/', $name)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "function validate_name($name){\n\t$test = \"\";\n\n\t// Test Null Username\n\n\tif ($name == \"\")\n\t{\n\t\t$test .= \"<li> Username field was blank, This is required.</li>\\n\";\n\t}\n\n\t//Test Existing Username\n\n\t$result = safequery(\"select * from person where name = '\".addslashes($name).\"'\");\n\tif(mysql_num_rows($result)>0)\n\t{\n\t\t$test .= \"<li>That username is already in use. Sorry.</li>\";\n\t}\n\n\n\treturn $test;\n}", "function checkData() {\n\t //check template name\n\t if (!ereg('^[0-9a-zA-Z_\\-]+$',$this->newIdt)) {\n\t\t $this->error = MF_WRONG_SHORT_NAME;\n\t\t return false;\n\t } else \n\t \t return $this->isNameFree();\n }", "public function valid()\n {\n return !empty($this->name);\n }", "private function validateUserName($un){\n if(strlen($un)<2 || strlen($un)>25){\n array_push($this->errorArray, Constants::$userNameCharecters);\n return;\n }\n #SQL QUERY\n $query = $this->con->prepare(\"SELECT * FROM users WHERE userName=:un\");\n $query->bindValue(':un', $un); #bind the value to user name\n $query->execute();\n\n if($query->rowCount() !=0){\n array_push($this->errorArray,Constants::$userNameTaken);\n }\n\n }", "public function getCardHolderName() {\n\t\treturn $this->cardHolderName;\n\t}", "private function assertValidName() : void\n {\n InvalidDescriptorArgumentException::assertIsNotEmpty(\n $this->name,\n '#[Route.name] must contain a non-empty string.'\n );\n }", "public function validName(string $ressourceName): bool\n {\n $minLength = 3;\n $maxLength = 255;\n $regex = '/^[a-z](?!oog)([a-z0-9-_.~+%]){'.$minLength.','.$maxLength.'}+$/';\n\n $isValid = (preg_match($regex, $ressourceName)) ? true : false;\n\n return $isValid;\n }", "function give_donation_form_validate_name_fields( $post_data ) {\n\n\t$is_alpha_first_name = ( ! is_email( $post_data['give_first'] ) && ! preg_match( '~[0-9]~', $post_data['give_first'] ) );\n\t$is_alpha_last_name = ( ! is_email( $post_data['give_last'] ) && ! preg_match( '~[0-9]~', $post_data['give_last'] ) );\n\n\tif ( ! $is_alpha_first_name || ( ! empty( $post_data['give_last'] ) && ! $is_alpha_last_name ) ) {\n\t\tgive_set_error( 'invalid_name', esc_html__( 'The First Name and Last Name fields cannot contain an email address or numbers.', 'give' ) );\n\t}\n}", "public function nameIsClean()\n {\n return ($this->getName() != '' && $this->getName() == $this->getCleanName());\n }", "public function validate_name($str){\n $allowed = array(\".\", \"-\", \"_\", \" \"); // you can add here more value, you want to allow.\n if(ctype_alnum(str_replace($allowed, '', $str ))) {\n return true;\n }\n else{\n return false;\n }\n }", "public function name(string $name) : bool\n\t{\n\t\tif (!preg_match(\"/^[a-zA-Z ]*$/\",$name)) {\n\t\t\t$this->errors[] = 'Only letters and white space allowed';\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "function ValidateNames($inputName, $titleName)\r\n{\r\n $errorMessage = \"\";\r\n if($_POST[$inputName] != \"\" && !IsValidName($_POST[$inputName]))\r\n {\r\n $errorMessage .= \"The $titleName should only contain alphanumeric characters\\\\n\";\r\n }\r\n \r\n return $errorMessage;\r\n}", "private function userNameValidate($uName){\n //Search Pattern\n if(preg_match(\"/^[a-zA-Z0-9]*$/\",$uName)){\n $result = true;\n }else{\n $result = false;\n }\n return $result;\n }", "private function __validate_name() {\n if (isset($this->initial_data[\"name\"])) {\n if ($this->get_limiter_id_by_name($this->initial_data[\"name\"], true)) {\n $this->parent_id = $this->get_limiter_id_by_name($this->initial_data[\"name\"]);\n } else {\n $this->errors[] = APIResponse\\get(4209);\n }\n } else {\n $this->errors[] = APIResponse\\get(4167);\n }\n }", "function isValidName($str)\n{\n $parts = explode(' ', $str);\n\n if (count($parts) < 2) {\n return false;\n }\n\n if ($str !== formatName($str))\n return false;\n\n return true;\n}", "function is_validwhitelistname($name) {\n\tif (!is_string($name))\n\treturn false;\n\n\tif (!preg_match(\"/[^a-zA-Z0-9\\.\\/]/\", $name))\n\treturn true;\n\n\treturn false;\n}", "function isValid($username) {\n\treturn !preg_match('/[^a-z0-9.\\-_]/i', $username);\n}", "public static function isNameValid(string $val) : bool {\n $len = strlen($val);\n\n if ($len > 0) {\n for ($x = 0 ; $x < $len ; $x++) {\n $char = $val[$x];\n\n if ($char == '=' || $char == '&' || $char == '#' || $char == '?') {\n return false;\n }\n }\n\n return true;\n }\n\n return false;\n }", "function is_validwhitelistname($name) {\n\tif (!is_string($name))\n\t\treturn false;\n\n\tif (!preg_match(\"/[^a-zA-Z0-9\\_\\.\\/]/\", $name))\n\t\treturn true;\n\n\treturn false;\n}", "private final static function validClassName($name)\n {\n # a-z, 0-9. Must start with a capitalised letter\n return !preg_match('#[^A-Za-z0-9]|^[^A-Z]#', $name);\n }", "public function setCardholderName($value)\r\n {\r\n $cardholderName = trim($value);\r\n $cardholderName = strlen($cardholderName)>0 ? $cardholderName : null;\r\n return $this->setParameter('cardholderName', $cardholderName);\r\n }", "function test_uname($uname){\n //but may be useful when debugging\n $result = \"\";\n $unamelength = strlen($uname);\n //test length\n if ($unamelength < 3) $result = \"Invalid username: make it longer\";\n if ($unamelength > 25) $result = \"Invalid username: make it shorter\";\n //test for the word 'guest'\n if (strpos($uname, 'guest') !== false) $result=\"This word is restricted.\";\n //test for bad characters\n if (preg_match(\"/[^a-zA-Z0-9-_]/\", $uname)) $result = \"Invalid username\";\n return $result;\n}", "private function validName($name): bool {\n\t\t$pattern = '~\n# XML 1.0 Name symbol PHP PCRE regex <http://www.w3.org/TR/REC-xml/#NT-Name>\n(?(DEFINE)\n (?<NameStartChar> [A-Z_a-z\\\\xC0-\\\\xD6\\\\xD8-\\\\xF6\\\\xF8-\\\\x{2FF}\\\\x{370}-\\\\x{37D}\\\\x{37F}-\\\\x{1FFF}\\\\x{200C}-\\\\x{200D}\\\\x{2070}-\\\\x{218F}\\\\x{2C00}-\\\\x{2FEF}\\\\x{3001}-\\\\x{D7FF}\\\\x{F900}-\\\\x{FDCF}\\\\x{FDF0}-\\\\x{FFFD}\\\\x{10000}-\\\\x{EFFFF}])\n (?<NameChar> (?&NameStartChar) | [.\\\\-0-9\\\\xB7\\\\x{0300}-\\\\x{036F}\\\\x{203F}-\\\\x{2040}])\n (?<Name> (?&NameStartChar) (?&NameChar)*)\n)\n^(?&Name)$\n~ux';\n\t\treturn (1 === preg_match($pattern, $name));\n\t}", "public function isLegalName($name) {\n\t\t// This variable name is special to bash, so we can't use it\n\t\tif ( $name === '_' ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn (bool) preg_match('/^[_A-Za-z][A-Za-z0-9_]*$/', $name);\n\t}", "public function validateName($attribute)\n {\n if (!$this->hasErrors()) {\n if (!preg_match('/^[\\w\\s\\p{L}]{1,255}$/u', $this->$attribute)) {\n $this->addError($attribute, Yii::t('podium/view', 'Name must contain only letters, digits, underscores and spaces (255 characters max).'));\n }\n }\n }", "private final static function validDbName($name)\n {\n return !preg_match('#[^a-z_]|^[^a-z]|[^a-z]|__$#', $name);\n }", "function name_exists($str){\n\n\t\tif(strlen($str)<3 || strlen($str)>30){\n\t\t\t$this->form_validation->set_message('name_exists','The field {field} must be between 3 and 30 characters in length');\n\t\t\treturn false;\n\t\t}\n\t\t$nameExists = $this->DAO->entitySelection('station',array('nameStation'=>$str),TRUE);\n\t\tif($nameExists['data']){\n\t\t\t$this->form_validation->set_message('name_exists','The field {field} already exists');\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t}", "function check_username(){\n $usernameErr = '';\n if(empty($_POST[\"username\"])){\n $usernameErr = \"Please enter a username\";\n }\n else{\n $username = $_POST['username'];\n if(!preg_match(\"/^[a-zA-Z0-9_]+$/\", $username)) {\n $usernameErr = \"Alpha lower, upper and underscore only for username\";\n }\n else{//username is ok\n $usernameErr = \"ok\";\n }\n }\n return $usernameErr;\n\n}", "public function checkName() {\r\n // Params\r\n $this->lastName = $this->uri->params['lastName'];\r\n // Class call\r\n $checkClass = new LastNameOrigin($this->lastName);\r\n $res = $checkClass->Call();\r\n // Return result\r\n $this->returnJson($res['code'], $res['message']);\r\n }", "function validate_name($str){\n\t\t//the content of the fields gets automatically passed to the method\n\t\tif ($str == trim($str) && strpos($str, ' ') !== false) {\n\t\t$this->form_validation->set_message('validate_name','Space not allowed');\n\t\treturn FALSE; \n\t\t}\n\t\telse\n\t\t{\n\t\treturn TRUE;\n\t\t}\n\t}", "function regexcheckusername($username){\n\t$regex_pattern=\"/^\\s*([a-zA-Z0-9]+[a-zA-Z0-9_-]*)+[a-zA-Z0-9]\\s*$/\"; //the displayname must begin and end with alphanumeric\n\treturn preg_match($regex_pattern,$username);//returns 1 if the username was valid\n}", "private function checkUsername($name){\n\t\t\tif(strlen($name) < 3)\n\t\t\t\tthrow new UserFewCharException();\n\t\t\tif($this->userList->getUsers()->getUserByName($name) != null)\n\t\t\t\tthrow new UserExistsException();\n\t\t\tif($name != strip_tags($name))\n\t\t\t\tthrow new UserBadCharException();\n\t\t\treturn true;\n\t\t}", "private function hasValidUserName($input) {\n\t\treturn strtolower($input->user) == strtolower(get_option(\"wp_broadbean_users\"));\n\t}", "public static function isName($name)\n {\n return preg_match(Tools::cleanNonUnicodeSupport('/^[^0-9!<>,;?=+()@#\"°{}_$%:¤|]*$/u'), stripslashes($name));\n }", "public function validateControlName($name);", "function _valid_trayname($str)\r\n\t{\r\n\t\t$this->erpm->auth();\r\n\t\t\r\n\t\t// used for checking valid tray name while editting \r\n\t\t$tray_id = $this->input->post('tray_id');\r\n\t\tif($tray_id)\r\n\t\t\t$cond = ' and tray_id != '.$tray_id;\r\n\t\telse \r\n\t\t\t$cond = '';\r\n\t\t\r\n\t\t$tray_name =$this->input->post('tray_name');\r\n\t\tif($this->db->query(\"select count(*) as t from m_tray_info where tray_name = ? $cond \",$tray_name)->row()->t)\r\n\t\t{\r\n\t\t\t$this->form_validation->set_message('_valid_trayname',$tray_name.' is already available ');\r\n\t\t\treturn false; \r\n\t\t}\r\n\t\treturn true;\r\n\t}", "function validateUname($data)\n{\n\t\t$pisahUnderscore = explode('_',$data);\n\t\t$str5=$pisahUnderscore[0];\n\t\t$int2=$pisahUnderscore[1];\n\n\t\tif ((str_word_count($str5) == 1) and (strlen((string) trim($str5)) == 5) and ((strlen((int) trim($int2)) == 2)))\n\t\t{\n\t\t\techo \"Terverifikasi\";\n\t\t} else {\n\t\t\techo \"Coba lagi\";\n\t\t}\n}", "function validName($name) {\n \n return preg_replace('/\\s+/', '_',$name);\n\n}", "public function validate_account(){ \n\t\tif($this->data['Client']['account_holder'][0] != ''){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}" ]
[ "0.6930809", "0.69180316", "0.6863945", "0.68418515", "0.68159664", "0.6805217", "0.6792469", "0.6695895", "0.6672061", "0.66699326", "0.6637037", "0.662809", "0.66240895", "0.6608831", "0.65966374", "0.6594446", "0.6589824", "0.658925", "0.6535304", "0.6533795", "0.65293205", "0.651765", "0.6505915", "0.6496357", "0.64897543", "0.64796406", "0.6471624", "0.64709127", "0.6466805", "0.64542705", "0.6433615", "0.64242435", "0.6399159", "0.6398242", "0.63654894", "0.6365311", "0.6365287", "0.63631946", "0.6363035", "0.6352081", "0.63482016", "0.63419944", "0.63234365", "0.62999475", "0.62932545", "0.6286351", "0.627725", "0.62705564", "0.62592673", "0.62562025", "0.6239451", "0.6204902", "0.6188973", "0.61846924", "0.61818206", "0.6158518", "0.6149331", "0.61435056", "0.61371267", "0.61327666", "0.6122531", "0.6115934", "0.6113917", "0.61035395", "0.6100395", "0.6084348", "0.6076623", "0.60729647", "0.6070043", "0.60639244", "0.6062007", "0.60608953", "0.6056001", "0.60525167", "0.6051943", "0.6033399", "0.60321987", "0.60320586", "0.6011702", "0.60061646", "0.59863925", "0.5980256", "0.59792584", "0.5977191", "0.5966648", "0.5962729", "0.5962484", "0.5959718", "0.5938548", "0.59309125", "0.593031", "0.5924949", "0.59156805", "0.59066087", "0.58943224", "0.589069", "0.58858585", "0.58825636", "0.5856877", "0.5847077" ]
0.649008
24
Validates if the card expiry is correct
public function isValidExpiry() { $month = $this->expiryMonthValue; $year = $this->expiryYearValue; $monthNow = intval(date('n')); $yearNow = intval(date('Y')); if (is_scalar($month)) { $month = intval($month); } if (is_scalar($year)) { $year = intval($year); } return is_integer($month) && $month >= 1 && $month <= 12 && is_integer($year) && ($year > $yearNow || ($year === $yearNow && $month > $monthNow)) && $year < ($yearNow + 10); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function validate_expire_date($value)\n \t{\n \t$current_month=date(\"m\");\n\t\t$current_year=date(\"Y\"); \n\t\t$current_date=$current_year.$current_month;\n\t\t$expire_date=$value;\n\t\t\t\n\t\tif ($expire_date >= $current_date) {\n\t\t\treturn 1; // valid expire date\n\t\t}\n\t\telse {\n\t\t\treturn 0; /* card expired */\n\t\t}\n\t\t\n \t}", "function _validateExpiry($expiry)\n {\n if (!preg_match('/^[dmf]$/', $expiry))\n $expiry = 'd';\n \n return $expiry;\n }", "public function checkExpiryDate() {\n $expDate = DateTime::createFromFormat('Y-m-d H:i:s', $this->password_expiry_date);\n $today = new DateTime(\"now\");\n fb($today->diff($expDate)->format('%a'), \"PASSWORD EXPIRY\");\n return ($today->diff($expDate)->format('%a'));\n }", "private function validate_expiry_date() {\n\t\tif ( $this->expiry_date && current_time( 'timestamp' ) > $this->expiry_date ) {\n\t\t\tthrow new Exception( $error_code = self::E_WC_COUPON_EXPIRED );\n\t\t}\n\t}", "public function check_hash_expiry_valid($hash_expiry){\n \t$current_date = new DateTime();\n\t\t$hash_expiry = new DateTime($hash_expiry);\n\t\t$interval = $current_date->diff($hash_expiry); //currentdate - hashexpiry\n\n\t\t//get elapsed\n\t\t$elapsed_day = $interval->format('%a');\n\t\t$elapsed_hour = $interval->format('%h');\n\n\t\tif($elapsed_day <= 1){\n\t\t\t$hrOneDay = ($elapsed_day == 1 ? 24:0);\n\t\t\t$total_elapsed_hour = $hrOneDay + $elapsed_hour;\n\n\t\t\tif($total_elapsed_hour <= 24){\n\t\t\t\t//return \"Valid:: \".$elapsed_day .\" day, \" . $elapsed_hour .\" hours\";\n\t\t\t\treturn TRUE;\n\t\t\t}else{\n\t\t\t\t//return \"ExpiredE:: \".$elapsed_day .\" day, \" . $elapsed_hour .\" hours\";\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\t\n\t\t}else{\n\t\t\t//return \"ExpiredDay:: \".$elapsed_day .\" day, \" . $elapsed_hour .\" hours\";\n\t\t\treturn FALSE;\n\t\t}\n }", "function isValid() {\n //we get if it is still good or expired\n return DataHora::compareDate2($this->getExpirationDate(), '>=', date('m/d/Y'), 'mm/dd/yyyy', 'mm/dd/yyyy');\n }", "protected function validateAuthCodeExpiryTime()\n {\n $authCodeExpiryTimestamp = strtotime($this->authCodeExpiryTime);\n if ($authCodeExpiryTimestamp === false) {\n throw new Exception('An invalid auth code expiry time was provided: ' . $this->authCodeExpiryTime);\n }\n\n if ($authCodeExpiryTimestamp <= time()) {\n throw new Exception('The auth code expiry time must be in the future: ' . $this->authCodeExpiryTime);\n }\n }", "public function setExpiry( $expiry );", "public function validateExpirationTime()\n\t\t{\n\t\t\t// Variabel som ska innehålla tiden från filen.\n\t\t\t$correctTime = \"\";\n\t\t\t\n\t\t\t// Öppnar filen, läser igenom den och sparar värdet i $correctTime, för att sedan stänga filen.\n\t\t\t$file = fopen('cookieExpirationTime.txt','r');\n\t\t\twhile ($line = fgets($file))\n\t\t\t{\n\t\t\t $correctTime = $line;\n\t\t\t}\n\t\t\tfclose($file);\n\t\t\t\n\t\t\t// Om tiden från filen är större än just precis nu...\n\t\t\tif(intval($correctTime) > time())\n\t\t\t{\n\t\t\t\t// Returnera true, kakan är fortfarande giltig.\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Annars kalla på felmeddelandet, kakans levnadstid är över.\n\t\t\t\t$this->cookieException();\n\t\t\t}\n\t\t}", "public function expiryDate();", "function is_valid_card ( $card_number, $exp_month, $exp_year, \n\t\t$cc_type, $allowed_types )\n\t{\n\t\t$card_type\t\t\t\t= $this->get_card_type($card_number);\n\n\t\t// if given doesn't match determined\n\t\tif ( $card_type != $this->cc_text_type[ $cc_type ] )\n\t\t{\n\t\t\treturn ERR_BAD_TYPE_MATCH;\n\t\t}\n\n\t\tif ( in_array($card_type, $allowed_types) )\n\t\t{\n\t\t\t$ret = $this->is_valid_number ( $card_number, $card_type );\n\n\t\t\tif ( $ret != CC_SUCCESS )\n\t\t\t{\n\t\t\t\treturn $ret;\n\t\t\t}\n\n\t\t\t$ret = $this->is_valid_expiration ( $exp_month, $exp_year );\n\n\t\t\tif ( $ret != CC_SUCCESS )\n\t\t\t{\n\t\t\t\treturn $ret;\n\t\t\t}\n\n\t\t\treturn CC_SUCCESS;\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\treturn ERR_INVALID_TYPE;\n\t\t}\n\t}", "private function validateFields()\n {\n $errors = array();\n for ($x=0; $x < count($this->_fields); $x++)\n {\n $field = $this->_fields[$x];\n if ($field['type'] == WFT_CC_EXPIRATION)\n {\n // one or both fields left blank\n if (strlen(trim($this->getPostValue($field['id'] . 'Month'))) == 0 ||\n strlen(trim($this->getPostValue($field['id'] . 'Year'))) == 0)\n {\n if ($field['required'])\n $errors[] = 'You must select an card expiration month and year';\n $monthValue = $yearValue = -1;\n $value = '';\n }\n else\n {\n $monthValue = intval($this->getPostValue($field['id'] . 'Month'));\n $yearValue = intval($this->getPostValue($field['id'] . 'Year'));\n $curYear = intval(date('Y'));\n if ($yearValue < $curYear)\n $errors[] = 'The expiration year is in the past';\n if ($monthValue < 1 || $monthValue > 12)\n $errors[] = 'The expiration month is not valid';\n }\n }\n else if($field['required'] && !strlen(trim($this->getPostValue($field['id']))))\n {\n if (strlen($field['caption']) > 0)\n $errors[] = $field['caption'] . ' is a required field';\n else\n $errors[] = 'This field is required';\n $value = '';\n }\n else if($field['type'] == WFT_CURRENCY)\n {\n $value = trim($this->getPostValue($field['id']));\n $value = str_replace('$', '', $value);\n $cur = floatval($value);\n $value = strval($cur);\n }\n else if($field['type'] == WFT_ANTI_SPAM_IMAGE)\n {\n $antiSpamInput = $this->getPostValue($field['id']);\n $wordVerifyID = $this->getPostValue('wordVerifyID');\n $graphs = new Graphs();\n $wordVerifyText = $graphs->getVerificationImageText($wordVerifyID);\n if (strtoupper($antiSpamInput) != $wordVerifyText || $antiSpamInput == '')\n {\n $errors[] = 'The text you entered did not correspond with the text in the security image';\n $value = 0;\n }\n else\n {\n $value = 1;\n }\n $graphs->clearVerificationImageText($wordVerifyID);\n }\n else if($field['type'] == WFT_SELECT || $field['type'] == WFT_CC_TYPE || $field['type'] == WFT_BOOLEAN)\n {\n $value = $this->getPostValue($field['id']);\n if (!strcmp($value, 'noset'))\n {\n $errors[] = $field['caption'] . ': You must select an option';\n }\n }\n else if($field['type'] == WFT_CC_NUMBER)\n {\n $value = '';\n // Clean credit card number input\n $cardNumber = preg_replace('/[^0-9]/', '', $this->getPostValue($field['id']));\n\n if ($field['required'] == false && !strlen($cardNumber))\n {\n $value = '';\n }\n else\n {\n // Guess the card type by using a pregex pattern matching algorithm\n $cardType = $this->getCreditCardTypeByNumber($cardNumber);\n if ($cardType == -1)\n $errors[] = 'The credit card number you entered is not a recognized Visa, MasterCard, American Express '\n . 'or Discover card.';\n else if (!$this->isCardNumberValid($cardType, $cardNumber))\n $errors[] = 'The credit card number you entered has not been recognized and may be invalid.';\n else\n {\n // Valid card number, now change all card type fields to match\n // the autodetected card type (visa, mastercard, etc.)\n $value = $cardNumber;\n $cardTypeName = $this->getCreditCardName($cardType);\n\n for ($y=0; $y < count($this->_fields); $y++)\n {\n if ($this->_fields[$y]['type'] == WFT_CC_TYPE)\n {\n $this->_fields[$y]['validatedDataOverride'] = $cardTypeName;\n $this->_fields[$y]['validatedData'] = $cardTypeName;\n }\n }\n }\n }\n }\n else\n {\n $value = trim($this->getPostValue($field['id']));\n\n if (!($field['required'] == false && !strlen($value)))\n {\n if (strlen($field['regex_test']) > 0)\n {\n if (!preg_match($field['regex_test'], $value))\n {\n $errors[] = $field['regex_fail'];\n }\n }\n if (strlen($value) < $field['length'][0] || strlen($value) > $field['length'][1])\n {\n if ($field['length'][0] == $field['length'][1])\n {\n if (strlen(trim($field['caption'])) > 0)\n $errors[] = sprintf(\"%s must be %d characters in length\",\n $field['caption'], $field['length'][0]);\n else\n $errors[] = sprintf(\"This field must be %d characters in length\",\n $field['length'][0]);\n }\n else\n $errors[] = sprintf(\"%s must be between %s characters in length\",\n $field['caption'], implode(' and ', $field['length']));\n }\n }\n $value = str_replace(array(\"\\r\",\"\\n\",\"\\t\",\"\\f\"), '', strip_tags($value));\n }\n\n // Set the validated (form returned) data\n switch($field['type'])\n {\n case WFT_CC_EXPIRATION:\n if ($monthValue != -1 && $yearValue != -1)\n $this->_fields[$x]['validatedData'] = sprintf('%d/%d', $monthValue, $yearValue);\n else\n $this->_fields[$x]['validatedData'] = '';\n break;\n default:\n if (isset($this->_fields[$x]['validatedDataOverride']) && strlen($this->_fields[$x]['validatedDataOverride']))\n $this->_fields[$x]['validatedData'] = $this->_fields[$x]['validatedDataOverride'];\n else\n $this->_fields[$x]['validatedData'] = $value;\n break;\n }\n }\n return $errors;\n }", "public function validate_coupon_expiry_time( $is_expired = false, $coupon = object ) {\n\n\t\t\t// Proceed only if WooCommerce has flag this coupon as expired.\n\t\t\tif ( true === $is_expired ) {\n\t\t\t\tif ( $this->is_wc_gte_30() ) {\n\t\t\t\t\t$coupon_id = ( is_object( $coupon ) && is_callable( array( $coupon, 'get_id' ) ) ) ? $coupon->get_id() : 0;\n\t\t\t\t} else {\n\t\t\t\t\t$coupon_id = ( ! empty( $coupon->id ) ) ? $coupon->id : 0;\n\t\t\t\t}\n\n\t\t\t\tif ( 0 !== $coupon_id ) {\n\t\t\t\t\t$expiry_date_timestamp = 0;\n\t\t\t\t\tif ( $this->is_wc_gte_30() ) {\n\t\t\t\t\t\tif ( is_object( $coupon ) && is_callable( array( $coupon, 'get_date_expires' ) ) ) {\n\t\t\t\t\t\t\t$expiry_date_object = $coupon->get_date_expires();\n\t\t\t\t\t\t\tif ( is_a( $expiry_date_object, 'WC_DateTime' ) && is_callable( array( $expiry_date_object, 'getTimestamp' ) ) ) {\n\t\t\t\t\t\t\t\t$expiry_date_timestamp = $expiry_date_object->getTimestamp();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$expiry_date_timestamp = ( ! empty( $coupon->expiry_date ) ) ? $coupon->expiry_date : 0;\n\t\t\t\t\t\tif ( ! is_int( $expiry_date_timestamp ) ) {\n\t\t\t\t\t\t\t$expiry_date_timestamp = strtotime( $expiry_date_timestamp );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( 0 !== $expiry_date_timestamp ) {\n\t\t\t\t\t\t$expiry_time = (int) get_post_meta( $coupon_id, 'wc_sc_expiry_time', true );\n\t\t\t\t\t\tif ( ! empty( $expiry_time ) ) {\n\t\t\t\t\t\t\t$expiry_date_timestamp = $expiry_date_timestamp + $expiry_time; // Adding expiry time to expiry date.\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$current_timestamp = current_time( 'timestamp', true );\n\t\t\t\t\t\tif ( $current_timestamp <= $expiry_date_timestamp ) {\n\t\t\t\t\t\t\t$is_expired = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $is_expired;\n\t\t}", "protected function expired()\n {\n return Carbon::now()->diffInSeconds($this->valid, false) < 0;\n }", "public function hasDecredExpiry()\n {\n return $this->decred_expiry !== null;\n }", "public function isCardValid()\n {\n return $this->isValidCard;\n }", "public function validate()\n {\n $requiredParameters = array(\n 'number' => 'credit card number',\n 'expiryMonth' => 'expiration month',\n 'expiryYear' => 'expiration year'\n );\n\n foreach ($requiredParameters as $key => $val) {\n if (!$this->getParameter($key)) {\n throw new InvalidCreditCardException(\"The $val is required\");\n }\n }\n\n if ($this->getExpiryDate('Ym') < gmdate('Ym')) {\n throw new InvalidCreditCardException('Card has expired');\n }\n\n if (!Helper::validateLuhn($this->getNumber())) {\n throw new InvalidCreditCardException('Card number is invalid');\n }\n\n if (!is_null($this->getNumber()) && !preg_match('/^\\d{12,19}$/i', $this->getNumber())) {\n throw new InvalidCreditCardException('Card number should have 12 to 19 digits');\n }\n }", "function get_expiry() {\n\t\treturn $this->get_expiry_from_vtec();\n\t}", "public function expiry(string $expiry)\n {\n $date = \\DateTime::createFromFormat(\"Y-m-d\", $expiry)->format('Y-m-d H:i:s');\n if ($date <= date('Y-m-d 23:59:59')) {\n return false;\n }\n if ($date) {\n $this->expiry = $expiry;\n return $this;\n } else {\n return false;\n }\n }", "public function is_valid() {\n\t\tif($this->expires > time()) {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function is_expired()\n {\n }", "public function is_valid() {\n\t\t$license = $this->get_license();\n\n\t\tif ( isset( $license['license'] ) && 'valid' === $license['license'] ) {\n\t\t\tif ( isset( $license['expires'] ) && time() < strtotime( $license['expires'] ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function expiryDate_validation($str) {\n $dt = new DateTime('now');\n $dt = $dt->format('Y-m-d H:i:s');\n\n $start = strtotime($this->input->post('startDate'));\n $expriry = strtotime($this->input->post('expiryDate'));\n\n if ($start > $expriry) {\n $this->form_validation->set_message('expiryDate_validation', 'Your start date-time must be earlier than your expiry date-time.');\n return FALSE;\n }\n return TRUE;\n }", "public function isExpired() {}", "private function isValid(Request $request)\n {\n $this->validate($request, [\n 'expires_at' => 'required|date',\n ]);\n }", "function verifyCreditCard($credit_card, $expiration_date, $security_code, $pdo_bank) {\n \n $stmt = $pdo_bank->prepare(\"SELECT zip_code from credit_card where credit_card_number=:cred\");\n $stmt->execute([\"cred\"=>$credit_card]);\n $data = $stmt->fetchAll();\n\n if ($data == null) {\n return 1; // Credit card is not found\n }\n\n /** Then check if credit card has expired or if wrong credit card expiration date is entered **/\n \n $stmt = $pdo_bank->prepare(\"SELECT zip_code from credit_card where credit_card_number=:cred and expiration_date=:exp_date and expiration_date > now()\");\n $stmt->execute([\"exp_date\"=>$expiration_date, \"cred\"=>$credit_card]);\n $data = $stmt->fetchAll();\n\n if ($data==null) {\n return 2; // wrong expiration date entered or credit card has expired\n }\n\n /** Validate credit card security code **/\n\n $stmt = $pdo_bank->prepare(\"SELECT security_code from credit_card where credit_card_number=:cred\");\n $stmt->execute([\"cred\"=>$credit_card]);\n $data = $stmt->fetchAll();\n\n if (!password_verify($security_code, $data[0][\"security_code\"])) {\n return 3; //wrong security code\n }\n\n return 0; // the user has provided correct credit card information\n \n }", "public function isExpired() : bool\n {\n return $this->getExpiryAttribute()->timestamp < Carbon::now()->timestamp\n && $this->length !== 0\n && !$this->isRemoved();\n }", "abstract protected function isExpired();", "public function is_expired() {\n\t\treturn $this->get_expires() < time();\n\t}", "public function isExpired();", "public function isExpired();", "public function isExpired();", "public function isExpired();", "public function isExpired();", "public function isExpired();", "public function isExpired();", "private function validatePassportIssuedDate() {\n $issued_date = DateTime::createFromFormat( 'd.m.Y', $this->passport_issued_date );\n\n if ( $issued_date < DateTime::createFromFormat( 'd.m.Y', '01.10.1997' ) ) {\n $this->errors[] = [ 'Паспорт должен быть выдан не позднее 1 октября 1997 года' ];\n }\n\n if ( $issued_date > new DateTime( 'tomorrow' ) ) {\n $this->errors[] = [ 'Паспорт не может быть выдан в будущем' ];\n }\n }", "public function isExpiring() {\n return $this->expiration - time() < 22 * 24 * 3600;\n }", "public function isExpired()\n {\n $expiryDate = $this->getData('expiry_date');\n\n if ($expiryDate == null) {\n return false;\n }\n\n $expiryDate = strtotime($expiryDate);\n\n if ($expiryDate > time()) {\n return false;\n }\n\n return true;\n }", "public function isExpired()\n {\n return Carbon::now()->gt(Carbon::parse($this->getExpirationDate()));\n }", "public function getExpiry()\n {\n return $this->expiry;\n }", "public function getExpiry()\n {\n return $this->expiry;\n }", "public function setExpiry($var)\n {\n GPBUtil::checkInt64($var);\n $this->expiry = $var;\n\n return $this;\n }", "public function validateExpiredTests()\n {\n try\n {\n $tests = AnswerHeader::query()->where('estado', 'A')->get();\n if ($tests->count() > 0)\n {\n foreach ($tests as $test)\n {\n $limitTime = (float)$test->parameter->duracion_examen;\n $startTime = strtotime($test->fecha_inicio);\n $currentTime = strtotime(date('Y-m-d H:i:s'));\n $time = round(($currentTime - $startTime)/60, 2);\n\n // Valida si tiempo esta expirado\n if($time > $limitTime)\n $expiredIds[] = $test->id;\n }\n\n if (isset($expiredIds))\n {\n AnswerHeader::whereIn('id', $expiredIds)\n ->update(['estado' => 'E', 'modificado_por' => 0, 'fecha_modificacion' => date('Y-m-d H:i:s')]);\n }\n }\n }\n catch (\\Exception $ex)\n {\n Log::error(\"[DashboardController][validateExpiredTests] Exception: \".$ex);\n }\n }", "public function tellInvalidCard()\n {\n }", "private function validatePaymentFields(){\n }", "public function isExpired(): bool\n {\n return $this->expires != 0 && $this->expires < time();\n }", "public function clearExpiry();", "public function isValidPaydate($date);", "function checkValididty($maxAge=null){\n\t\t#- check for validity\n\t\tif( empty($this->cacheTime) && empty($this->content) ){\n\t\t\treturn false;\n\t\t}\n\t\tif( null !== $maxAge && (strtotime($this->cacheTime) + $maxAge) < time()){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function isExpired(): bool;", "public function isTokenExpired()\n {\n return Carbon::now()->greaterThanOrEqualTo($this->getTokenExpiry()->subMinutes(5));\n }", "public function isTokenExpired()\n {\n return Carbon::now()->greaterThanOrEqualTo($this->getTokenExpiry()->subMinutes(5));\n }", "public function isExpired()\n {\n return ! is_null($this->expiration) &&\n Carbon::now()\n ->gte($this->expiration);\n }", "public function isExpired ()\n {\n return $this->getExpirationDate()->getTimestamp() < time();\n }", "public function isValid($key)\n {\n \t$key = strval($key);\n\n $key = $this->getActualCacheKey($key);\n\t $contents = $this->getCacheContents();\n\t $meta = isset($contents[$key]) ? $contents[$key] : [];\n\n if (empty($meta['expires_at'])) {\n return false;\n }\n\n return Carbon::now() < Carbon::createFromFormat(self::RFC_7231, $meta['expires_at']);\n }", "public function hasExpirationDate()\n {\n return isset($this->user_expiration);\n }", "public function check_expiry($user_account_id)\n\t{\n\t\ttry {\n\t\t\t$select_status = $log_data = null;\n\t\t\t$stmt = $this->conn->prepare(\"SELECT * FROM vw_users_expiry WHERE user_account_id =:user_account_id order by valid_to desc limit 1\");\n\t\t\t$stmt->execute(array(':user_account_id'=>$user_account_id));\n\t\t\tif ($stmt->rowCount() == 1) {\n\t\t\t\t$result_row=$stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\t\tif($result_row != 'wrong' && (strtotime($result_row['valid_to']) > strtotime(date('Y-m-d H:i:s')))) {\n\t\t\t\t\t$select_status = 'valid';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$select_status = 'invalid';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ($stmt->rowCount() == 0) {\n\t\t\t\t$select_status = 'expiry';\n\t\t\t}\n\t\t}\n\t\tcatch (PDOException $e) {\n\t\t\t$select_status = 'error';\n\t\t\t$log_data = \"\".$e->getMessage().\"\".CONFIG::NEWLINE_ERROR.\"|\";\n\t\t}\n\t\treturn array($select_status, $log_data);\n\t}", "function exit_if_expired($time) {\n global $expiry_days;\n if ( (time() - $time) > $expiry_days*86400) {\n return_error(\"expired\"); // echo \"We're sorry, more than \".$expiry_days.\" have passed and this is no longer available.\";\n exit();\n }\n}", "public function getPaymentAuthExpiration();", "public function hasExpired(): bool\n {\n $expiry = $this->expiry();\n\n return $expiry !== null && time() > $expiry;\n }", "public function hasExpired() {\n return $this->getExpirationTime() <= time();\n }", "public function hasExpired() {\n return $this->getExpirationTime() <= time();\n }", "function validate()\n\t{\n\t\tglobal $lng;\n\n\t\tinclude_once 'Services/Payment/exceptions/class.ilShopException.php';\n\n\t\tswitch($this->getPriceType())\n\t\t{\n\t\t\tcase self::TYPE_DURATION_MONTH:\n\t\t\t\tif(!preg_match('/^[1-9][0-9]{0,1}$/', $this->__getDuration()))\n\t\t\t\t\tthrow new ilShopException($lng->txt('paya_price_not_valid'));\n\t\t\t\tbreak;\n\n\t\t\tcase self::TYPE_DURATION_DATE:\n\t\t\t\tif(!preg_match('/^[0-9]{4,4}-[0-9]{1,2}-[0-9]{1,2}$/', $this->__getDurationFrom()))\n\t\t\t\t\tthrow new ilShopException($lng->txt('payment_price_invalid_date_from'));\n\n\t\t\t\t$from_date = explode('-', $this->__getDurationFrom());\n\t\t\t\tif(!checkdate($from_date[1], $from_date[2], $from_date[0]))\n\t \t\t\tthrow new ilShopException($lng->txt('payment_price_invalid_date_from'));\n\n\t\t\t\tif(!preg_match('/^[0-9]{4,4}-[0-9]{1,2}-[0-9]{1,2}$/', $this->__getDurationUntil()))\n\t\t\t\t\tthrow new ilShopException($lng->txt('payment_price_invalid_date_until'));\n\n\t\t\t\t$till_date = explode('-', $this->__getDurationUntil());\n\t\t\t\tif(!checkdate($till_date[1], $till_date[2], $till_date[0]))\n\t \t\t\tthrow new ilShopException($lng->txt('payment_price_invalid_date_until'));\n\n\t \t\t$from = mktime(12, 12, 12, $from_date[1], $from_date[2], $from_date[0]);\n\t \t\t$till = mktime(12, 12, 12, $till_date[1], $till_date[2], $till_date[0]);\n\n\t \t\tif($from >= $till)\n\t\t\t\t\tthrow new ilShopException($lng->txt('payment_price_invalid_date_from_gt_until'));\n\t\t\t\tbreak;\n\n\t\t\tcase self::TYPE_UNLIMITED_DURATION:\n\t\t\t\treturn true;\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tthrow new ilShopException($lng->txt('payment_no_price_type_selected_sdf'));\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif(preg_match('/[0-9]/',$this->__getPrice()))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\tthrow new ilShopException($lng->txt('payment_price_invalid_price'));\n\t}", "public function isExpired() :bool\n {\n return ($this->expires < time());\n }", "public function validacion_fecha($fec){\n \n self::set_fecha($fec); // asignar la fecha\n $partes= explode(\"-\", self::get_fecha()); \n echo \"<br><br>\";\n echo \"Fecha Ingresada <br><br>\";\n print_r($partes);\n $actual = array(date(\"Y\"),date(\"m\"),date(\"d\"));\n echo \"<br><br>\";\n echo \"Fecha actual <br><br>\";\n print_r($actual);\n \n if(self::escritura_valida($partes) && self::fecha_mayor_actual($actual, $partes)) // si es valida la escritura y la fecha es mayor a la actual es correcta la fecha\n {\n return true;\n }\n else{\n return false;\n }\n }", "public function isTokenExpired()\n {\n $expireTime = $this->getDataValue('expiration') - time();\n return $expireTime < 5;\n }", "public function isOtpValid()\n {\n $pdo = static::getDB();\n\n $sql = \"select otp, to_char(otp_last_date, 'YYYY-MM-DD HH24:MI:SS') as otp_last_date from users where email = :email\";\n $result = $pdo->prepare($sql);\n $result->execute([$this->email]);\n\n $result = $result->fetchObject();\n\n $currentTime = strtotime(Extra::getCurrentDateTime());\n $time = strtotime($result->OTP_LAST_DATE);\n\n $diff_in_seconds = ($currentTime - $time);\n\n if($diff_in_seconds > 300){\n return false;\n }\n return $result->OTP;\n }", "public function accessTokenValid()\n {\n return $this->expireTime > time();\n }", "function pre_confirmation_check() {\n global $_POST, $messageStack;\n\n\t// if the card number has the blanked out middle number fields, it has been processed, show message that \n\t// the charges were not processed through the merchant gateway and continue posting payment.\n\tif (strpos($_POST['paymentech_field_1'],'*') !== false) {\n \t$messageStack->add(MODULE_PAYMENT_PAYMENTECH_NO_DUPS, 'caution');\n\t\treturn false;\n\t}\n\n include(DIR_FS_MODULES . 'general/classes/cc_validation.php');\n\n $cc_validation = new cc_validation();\n $result = $cc_validation->validate($_POST['paymentech_field_1'], $_POST['paymentech_field_2'], $_POST['paymentech_field_3'], $_POST['paymentech_field_4']);\n $error = '';\n switch ($result) {\n case -1:\n $error = sprintf(TEXT_CCVAL_ERROR_UNKNOWN_CARD, substr($cc_validation->cc_number, 0, 4));\n break;\n case -2:\n case -3:\n case -4:\n $error = TEXT_CCVAL_ERROR_INVALID_DATE;\n break;\n case false:\n $error = TEXT_CCVAL_ERROR_INVALID_NUMBER;\n break;\n }\n\n if ( ($result == false) || ($result < 1) ) {\n $messageStack->add($error . '<!-- ['.$this->code.'] -->', 'error');\n return true;\n }\n\n $this->cc_card_type = $cc_validation->cc_type;\n $this->cc_card_number = $cc_validation->cc_number;\n $this->cc_cvv2 = $_POST['paymentech_field_4'];\n $this->cc_expiry_month = $cc_validation->cc_expiry_month;\n $this->cc_expiry_year = $cc_validation->cc_expiry_year;\n\treturn false;\n }", "function hasDomainExpired($expiryString)\n{\n $expiry = DateTime::createFromFormat(\"Y-m-d\", $expiryString);\n $today = new DateTime();\n $difference = $today->diff($expiry);\n return $difference->invert == 1;\n}", "public function getIsValid(): bool\n {\n $token = $this->getToken();\n\n return !empty($token) && !$this->getIsExpired();\n }", "private function checkTokenExpire()\n {\n if (new DateTime() > $this->tokenExpire) {\n $this->refreshToken();\n $this->getAuthorization();\n }\n }", "public function isExpired()\n {\n return ((time() - $this->expireTime) > 0);\n }", "private function validate_booking(): bool {\n\t $this->errors = array();\n\n // Clear data using test_input function\n foreach ($this->request->post as $key => $value) {\n $this->request->post[$key] = self::test_input($this->request->post[$key]);\n }\n\n // Time\n if(!(preg_match(\"/^(?:2[0-3]|[01][0-9]):[0-5][0-9]$/\", $this->request->post[\"time\"]))){\n array_push($this->errors,$this->language->get('time_error'));\n }\n\n // Date\n $temp = new DateTime();\n\n // Create date object (without time)\n $date = DateTime::createFromFormat('Y-m-d', $this->request->post[\"date\"]);\n\n // Remove time from datetime string\n $now = DateTime::createFromFormat(\"Y-m-d\", $temp->format(\"Y-m-d\"));\n\n // Extract data\n $year = $date->format(\"Y\");\n $month = $date->format(\"m\");\n $day = $date->format(\"d\");\n\n if($date < $now){\n array_push($this->errors,$this->language->get('date_past_error'));\n }\n else if(!checkdate($month,$day,$year)) {\n //$this->errors[\"date\"] = $this->language->get('date_error');\n array_push($this->errors,$this->language->get('date_value_error'));\n }\n\n //TODO: REMOVE\n return count($this->errors) == 0;\n }", "public function isExpired(): bool\n {\n return $this->expired;\n }", "public function isValid()\n {\n if (!$this->isAuthenticate())\n {\n return false;\n }\n return !$this->access_token->isExpired();\n }", "public function isExpired()\n {\n return $this->expireAt < new DateTime();\n }", "protected function needsRenewal(): bool\n {\n return $this->renewable() === true && $this->expiryTime() - time() < $this->duration() / 2;\n }", "public function postEditCard(EditCardRequest $request)\n {\n try {\n $expiry = explode('/', $request->expiry);\n $month = $expiry[0];\n $year = $expiry[1];\n $customerId = RecruiterProfile::where(['user_id' => Auth::user()->id])->pluck('customer_id');\n $customer = \\Stripe\\Customer::retrieve($customerId[0]);\n $card = $customer->sources->retrieve($request->cardId);\n $card->exp_month = $month;\n $card->exp_year = $year;\n $card->save();\n $this->response['success'] = true;\n $this->response['message'] = trans('messages.card_edidted');\n } catch (\\Exception $e) {\n Log::error($e->getMessage());\n $this->response['success'] = false;\n $this->response['message'] = $e->getMessage();\n }\n return $this->response;\n }", "public function has_expired()\n\t{\n\t\treturn $this->until < time();\n\t}", "public function getCltvExpiry()\n {\n return $this->cltv_expiry;\n }", "public function isExpired($giftcard = null)\n {\n if ($giftcard === null) {\n return false;\n }\n if (!$giftcard['date_expires']) {\n return false;\n }\n $timezone = $this->_localeDate->getConfigTimezone(\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE,\n $this->getQuote()->getStoreId()\n );\n $expirationDate = (new \\DateTime($giftcard['date_expires'], new \\DateTimeZone($timezone)))->setTime(0, 0, 0);\n $currentDate = (new \\DateTime('now', new \\DateTimeZone($timezone)))->setTime(0, 0, 0);\n if ($expirationDate < $currentDate) {\n return true;\n }\n\n return false;\n }", "public function hasExpired(){\n if($this->isIndefinied())\n return false;\n\n \\Log::info('Hoy'.print_r(Carbon::now(),true));\n \\Log::info('Expira'.print_r(Carbon::parse($this->expires_on),true));\n return (bool) Carbon::now()->greaterThan(Carbon::parse($this->expires_on));\n }", "public function testCheckIfAccountExpired()\n {\n }", "public function getExpiration()\n {\n }", "function isExpired() {\n return $this->expired;\n }", "public function expired()\n {\n return !$this->subscribed() && $this->billing_trial_ends_at && strtotime($this->billing_trial_ends_at) <= time();\n }", "public function hasExpired()\n {\n return (new Time($this->expires->getTimestamp()))->isPast();\n }", "function getExpiryDate() {\n return $this->expirydate;\n }", "function validate_token($token, $procedure, $expiry = 5)\n\t{\n\t\t// parsing passed token, checking proper syntax\n\t\tif (is_array($strings = explode(\"\\n\", $token)))\n\t\t{\n\t\t\t[$token_time, $token_proc] = explode('|', $strings[0]);\n\t\t\t$token_mac = $strings[1];\n\n\t\t\t// something's wrong with the input\n\t\t\tif (!$token_time || !$token_proc || !$token_mac)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// recalculating MAC\n\t\t$new_mac = hash('sha1', $this->engine->db->system_seed . $this->sid . $token_time . $token_proc);\n\n\t\t// validating conditions. exact order is crucial!\n\t\tif ($token_mac !== $new_mac)\n\t\t{\n\t\t\t// MAC mismatch\n\t\t\treturn false;\n\t\t}\n\t\telse if ($token_proc !== $procedure)\n\t\t{\n\t\t\t// procedure mismatch\n\t\t\treturn false;\n\t\t}\n\t\telse if (time() > ($expiry * 60 + $token_time))\n\t\t{\n\t\t\t// token expired\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}", "public function getExpiry() : int\n {\n return $this->getValue('nb_domain_zone_expiry');\n }", "public function hasExpired() {\n\t\t$expires = $this->getExpires();\n\n\t\tif (empty($expires)) {\n\t\t\tthrow new IdentityProviderException('\"expires\" is not set on the token');\n\t\t}\n\n\t\treturn $expires < time();\n\t}", "public function isValid()\n {\n return $this->getStatus() != 'unlicensed';\n }", "public function tokenIsExpired(): bool\n {\n if (empty($this->expirationTime)) {\n throw OsstException::emptyExpirationTime();\n }\n\n return $this->expirationTime <= time();\n }", "public function onlyValid()\n {\n $today = new \\DateTime();\n $currentYear = (int)$today->format('Y');\n $currentMonth = (int)$today->format('m');\n $this->addFieldToFilter('cc_exp_year', array(\"gteq\" => $currentYear));\n\n /**\n * @var $card \\HiPay\\FullserviceMagento\\Model\\Card\n*/\n foreach ($this->getItems() as $card) {\n if ($card->getCcExpYear() == $currentYear && $card->getCcExpMonth() < $currentMonth) {\n $this->removeItemByKey($card->getId());\n }\n }\n\n return $this;\n }", "public function getExpiration();", "public static function creditCardExpirationDate()\n {\n return new EqualityNode('credit_card_expiration_date');\n }", "function give_donation_form_validate_cc() {\n\n\t$card_data = give_get_donation_cc_info();\n\n\t// Validate the card zip.\n\tif ( ! empty( $card_data['card_zip'] ) ) {\n\t\tif ( ! give_donation_form_validate_cc_zip( $card_data['card_zip'], $card_data['card_country'] ) ) {\n\t\t\tgive_set_error( 'invalid_cc_zip', __( 'The zip / postal code you entered for your billing address is invalid.', 'give' ) );\n\t\t}\n\t}\n\n\t// Ensure no spaces.\n\tif ( ! empty( $card_data['card_number'] ) ) {\n\t\t$card_data['card_number'] = str_replace( '+', '', $card_data['card_number'] ); // no \"+\" signs.\n\t\t$card_data['card_number'] = str_replace( ' ', '', $card_data['card_number'] ); // No spaces.\n\t}\n\n\t// This should validate card numbers at some point too.\n\treturn $card_data;\n}", "public function isExpired()\n {\n return $this->expired;\n }" ]
[ "0.735785", "0.698944", "0.6890495", "0.6830082", "0.67981374", "0.6762844", "0.66329616", "0.65387195", "0.6432012", "0.6423044", "0.641111", "0.63837266", "0.6376616", "0.63720363", "0.6351864", "0.63451046", "0.62929225", "0.629138", "0.62854254", "0.62830925", "0.62826914", "0.620331", "0.62015384", "0.6192759", "0.61709946", "0.6165224", "0.61467594", "0.61415017", "0.6114396", "0.610409", "0.610409", "0.610409", "0.610409", "0.610409", "0.610409", "0.610409", "0.6081324", "0.60646105", "0.60117906", "0.59723836", "0.592441", "0.592441", "0.59117734", "0.5909863", "0.58699894", "0.5864646", "0.5862425", "0.5847782", "0.58462137", "0.5844961", "0.5840015", "0.5825695", "0.5825695", "0.5821626", "0.58179414", "0.5786787", "0.578481", "0.57840854", "0.5779771", "0.57793987", "0.5776264", "0.57687587", "0.57687587", "0.57447857", "0.5741043", "0.5740284", "0.5731459", "0.57233804", "0.5722066", "0.5711997", "0.57029134", "0.56962496", "0.5687287", "0.56872797", "0.5680549", "0.5674696", "0.56542116", "0.5652748", "0.56503886", "0.56499565", "0.5639105", "0.56341314", "0.5630115", "0.5612574", "0.55870295", "0.5573673", "0.5573026", "0.557201", "0.5570542", "0.5569979", "0.55686396", "0.55671024", "0.5564215", "0.5560132", "0.5546706", "0.5539658", "0.55379415", "0.55288744", "0.5521611", "0.5514436" ]
0.72353196
1
Check if the card CVV is valid
public function isValidCVV() { return ctype_digit($this->cvvValue) && $this->validCVVLength(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function validCVVLength()\n {\n if (empty($this->cvvValue)) {\n return false;\n }\n $cvvLength = $this->getCardProp('cvvLength');\n foreach ($cvvLength as $length) {\n if (strlen($this->cvvValue) === $length) {\n return true;\n }\n }\n return false;\n }", "public static function isValidCvvLen($cvv) {\n $pattern = '/^[0-9]{3,4}$/';\n return preg_match($pattern, $cvv) ? TRUE : FALSE;\n }", "protected function checkCCCVC($cardNumber, $cvc){\n $firstnumber = (int) substr($cardNumber, 0, 1);\n if ($firstnumber === 3){\n if (!preg_match(\"/^\\d{4}$/\", $cvc)){\n throw new Exception(__('Please enter a valid card verification number.'));\n }\n }else if (!preg_match(\"/^\\d{3}$/\", $cvc)){\n throw new Exception(__('Please enter a valid card verification number.'));\n }\n return true;\n }", "private function isvalidCard($CardNo,$Month,$Year,$Cvv){\n\t\t\t\t$stmt = $this->con->prepare(\"SELECT debit_card_number FROM `DebitCard` WHERE debit_card_number=? AND cvv=?;\");\n\t\t\t$stmt->bind_param(\"ss\", $CardNo,$Cvv);\n\t\t\t\n\t\t\tif($stmt->execute()){\n\t\t\t\n\t\t\treturn 0;}\n\t\t\t\n\t\t\n\t\t\t\n\t\t}", "public function isCardValid()\n {\n return $this->isValidCard;\n }", "function ValidVisualVerifyCode($vvcid, $enteredcode)\n{\n global $DB;\n\n $vvcid = empty($vvcid) ? 0 : (int)$vvcid;\n $enteredcode = empty($enteredcode) ? '' : trim((string)$enteredcode);\n if(($vvcid > 0) && (strlen($enteredcode) == SD_VVCLEN))\n {\n $verifycode = $DB->query_first(\"SELECT verifycode FROM {vvc} WHERE vvcid = %d\", $vvcid);\n $DB->query_first(\"DELETE FROM {vvc} WHERE vvcid = %d\", $vvcid);\n if(!empty($verifycode))\n {\n return (strtolower(trim($verifycode['verifycode'])) == strtolower($enteredcode));\n }\n }\n\n return false;\n\n}", "public function has_cvv_rejection() {\n\n\t\treturn isset( $this->response->creditCardVerification ) && 'cvv' === $this->response->creditCardVerification->gatewayRejectionReason;\n\t}", "function CaptchaIsValid($element_id='',$forceMode=false)\n{\n global $mainsettings, $sdlanguage, $userinfo, $captcha;\n\n $forceMode = isset($forceMode)?Is_Valid_Number($forceMode,false,1,3):false; //SD342\n //SD332: new flag \"require_vvc\" added\n //SD343: disabled captcha by empty captcha_method was missing\n if(!empty($userinfo['adminaccess']) ||\n (!$forceMode && (!$userinfo['require_vvc'] || empty($mainsettings['captcha_method']) ||\n (!empty($userinfo['loggedin']) && !empty($mainsettings['captcha_guests_only'])))) )\n {\n return true;\n }\n\n if(($forceMode=='1') || ($mainsettings['captcha_method'] == '1'))\n {\n if(!strlen($captcha->privatekey) || !strlen($captcha->publickey))\n {\n // Fallback to VVC!\n $mainsettings['captcha_method'] = 2;\n }\n else\n {\n if(isset($_POST['g-recaptcha-response']))\n {\n return $captcha->IsValid();\n }\n else\n {\n return false;\n }\n }\n }\n\n if(($forceMode=='2') || ($mainsettings['captcha_method'] == '2'))\n {\n $vvcid = GetVar($element_id.'_vvcid', '', 'string', true, false);\n $code = GetVar($element_id.'_verifycode', null, 'string', true, false);\n if(!empty($vvcid) && !empty($code) && ValidVisualVerifyCode($vvcid, $code))\n {\n return true;\n }\n }\n\n if(($forceMode=='3') || ($mainsettings['captcha_method'] == '3')) //SD342 - simple math question\n {\n $vvcid = GetVar($element_id.'_vvcid', '', 'string', true, false);\n $code = GetVar($element_id.'_verifycode', null, 'natural_number', true, false);\n if(!empty($vvcid) && isset($code) && ($vvcid == md5($code.date(\"H\").'37')))\n {\n return true;\n }\n }\n\n return false;\n\n}", "function _checkCDV($number) \n {\n $cdv = intval(substr($number, -1));\n $digits = strlen($number)-1;\n $weights = array(9, 7, 3, 1);\n $sum = 0;\n for ($i = 0; $i < $digits; $i++) {\n $sum += $weights[$i % 4] * intval(substr($number, $i, 1));\n }\n return (((10 - ($sum % 10)) % 10) == $cdv); \n }", "public function testVatin()\n {\n $this->assertTrue(RuValidation::vatin('7710140679'));\n $this->assertTrue(RuValidation::vatin('772807592828'));\n\n $this->assertFalse(RuValidation::vatin('12345'));\n\n // invalid checksums\n $this->assertFalse(RuValidation::vatin('7710140670'));\n $this->assertFalse(RuValidation::vatin('772807592837'));\n }", "public static function checkCvInfo(){\n\n }", "function setCVV($cvv) {\n\t\tif (strlen($cvv)>=3 and strlen($cvv)<=4 and is_numeric($cvv)) {\n\t\t\t$this->cvv = $cvv;\n\t\t} else {\n\t\t\t$this->error[] = \"Invalid CVV\";\n\t\t}\n\t}", "function setCVV($cvv) {\n\t\tif (strlen($cvv)>=3 and strlen($cvv)<=4 and is_numeric($cvv)) {\n\t\t\t$this->cvv = $cvv;\n\t\t} else {\n\t\t\t$this->error[] = \"Invalid CVV\";\n\t\t}\n\t}", "public function validacion_provincia($cedula){\n \n \n \n if( ($cedula[0]<= 2))\n {\n if($cedula[0]== 2 && ($cedula[1] > 4) ){\n echo \"Codigo de provincia de la cedula incorrecto, Por favor, ingrese una cédula correcta\";\n }\n else{\n return true; \n }\n }\n else{\n echo \"Codigo de provincia de la cedula incorrecto, Por favor, ingrese una cédula correcta\";\n }\n \n}", "function vCC( $cc )\r\n\t\t{\r\n\t\t\t#eg. 718486746312031\r\n\t\t\treturn preg_match('/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6011[0-9]{12}|3(?:0[0-5]|[68][0-9])[0-9]{11}|3[47][0-9]{13})$/', $cc);\r\n\t\t\t\r\n\t\t}", "function validateCC($cc_num, $type) {\n if ($type == \"American\") {$pattern = \"/^([34|37]{2})([0-9]{13})$/\";if (preg_match($pattern, $cc_num)) {$verified = true;} else {$verified = false;}} elseif ($type == \"Dinners\") {$pattern = \"/^([30|36|38]{2})([0-9]{12})$/\";if (preg_match($pattern, $cc_num)) {$verified = true;} else {$verified = false;}} elseif ($type == \"Discover\") {$pattern = \"/^([6011]{4})([0-9]{12})$/\";if (preg_match($pattern, $cc_num)) {$verified = true;} else {$verified = false;}} elseif ($type == \"Master\") {$pattern = \"/^([51|52|53|54|55]{2})([0-9]{14})$/\";if (preg_match($pattern, $cc_num)) {$verified = true;} else {$verified = false;}} elseif ($type == \"Visa\") {$pattern = \"/^([4]{1})([0-9]{12,15})$/\"; if (preg_match($pattern, $cc_num)) {$verified = true;} else {$verified = false;}}\n\n if($verified == false) {\n //if validation fail, print a message\n echo \"Credit card invalid. Please make sure that you entered a valid credit card \";\n } \n}", "private function validateVersion()\n {\n return preg_match('/[0-99]+\\.[0-99]+\\.[0-99]+.*/', $this->version);\n }", "public function tellInvalidCard()\n {\n }", "function is_valid($voucher)\n\t{\n\t\t//$voucher = $this->get_voucher($id);\n\n\t\t//die(var_dump($voucher));\n\t\t\t\t\n\t\tif($voucher['max_uses']!=0 && $voucher['num_uses'] >= $voucher['max_uses'] ) return false;\n\t\t\n\t\tif($voucher['start_date'] != \"0000-00-00\")\n\t\t{\n\t\t\t$start = strtotime($voucher['start_date']);\n\t\t\n\t\t\t$current = time();\n\t\t\n\t\t\tif($current < $start)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif($voucher['end_date'] != \"0000-00-00\")\n\t\t{\n\t\t\t$end = strtotime($voucher['end_date']) + 86400; // add a day for the availability to be inclusive\n\t\t\n\t\t\t$current = time();\n\t\t\n\t\t\tif($current > $end)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public function hasCV()\n {\n if($this->cv_path)\n {\n return true;\n }\n return false;\n }", "public function checkVerrouille()\n {\n $this->ligne->checkVerrouille();\n }", "public function getIsRequestToCorrectCvvOrAvsError();", "function isValid() ;", "public function isValid()\n {\n return $this->getStatus() != 'unlicensed';\n }", "public function setCVV($cvv = '') {\n $security = array(\n 'x_card_code'=>$cvv,\n );\n $this->NVP = array_merge($this->NVP, $security); \n }", "function validateCredential(){\r\n\r\n\t\t$avsData = array('Street' => '1 Main St', 'City' => 'San Jose', 'PostalCode' => '95131');\r\n\t\t$cardData = array('cardowner' => 'Jane Doe', 'cardtype' => 'Visa', 'pan' => '4012888812348882', 'expire' => '1218', 'cvv' => '123');\r\n\t\t\r\n\t\ttry {\r\n\t\t\t$obj_transaction = new VelocityProcessor( $this->applicationprofileid, $this->merchantprofileid, $this->workflowid, $this->isTestAccount, $this->identitytoken, null);\r\n\t\t\treturn array('status'=>1,'message'=>'Authentication Validated Successfully.');\r\n\t\t\t/* try {\r\n\t\t\t\t$response = $obj_transaction->verify(array(\r\n\t\t\t\t\t\t'amount' => 1.00,\r\n\t\t\t\t\t\t'avsdata' => $avsData,\r\n\t\t\t\t\t\t'carddata' => $cardData,\r\n\t\t\t\t\t\t'entry_mode' => 'Keyed',\r\n\t\t\t\t\t\t'IndustryType' => $this->IndustryType,\r\n\t\t\t\t\t\t'Reference' => 'Ezneterp',\r\n\t\t\t\t\t\t'EmployeeId' => '11'\r\n\t\t\t\t));\r\n\t\t\t\t\r\n\t\t\t\tif (is_array($response) && isset($response['Status']) && $response['Status'] == 'Successful') \r\n\t\t\t\t\treturn array('status'=>1,'message'=>'Authentication Validated Successfully.');\r\n\t\t\t\telse\r\n\t\t\t\t\treturn array('status'=>0,'errors'=>$response);\r\n\t\t\t\t\r\n\t\t\t} catch (Exception $e) {\r\n\t\t\t\treturn array('status'=>0,'errors'=>$e->getMessage());\r\n\t\t\t} */\r\n\t\t\t\r\n\t\t\t\r\n\t\t} catch(Exception $e) {\r\n\t\t\tif(strcmp($e->getMessage(), 'An invalid security token was provided') == 0)\r\n\t\t\t\treturn array('status'=>0,'errors'=>'An invalid security token was provided');\r\n\t\t\telse\r\n\t\t\t\treturn array('status'=>0,'errors'=>$e->getMessage());\r\n\t\t}\r\n\t}", "function checkLicence() {\n\n $isValid = true;\n \n return $isValid;\n}", "function pre_confirmation_check() {\n global $_POST, $messageStack;\n\n\t// if the card number has the blanked out middle number fields, it has been processed, show message that \n\t// the charges were not processed through the merchant gateway and continue posting payment.\n\tif (strpos($_POST['paymentech_field_1'],'*') !== false) {\n \t$messageStack->add(MODULE_PAYMENT_PAYMENTECH_NO_DUPS, 'caution');\n\t\treturn false;\n\t}\n\n include(DIR_FS_MODULES . 'general/classes/cc_validation.php');\n\n $cc_validation = new cc_validation();\n $result = $cc_validation->validate($_POST['paymentech_field_1'], $_POST['paymentech_field_2'], $_POST['paymentech_field_3'], $_POST['paymentech_field_4']);\n $error = '';\n switch ($result) {\n case -1:\n $error = sprintf(TEXT_CCVAL_ERROR_UNKNOWN_CARD, substr($cc_validation->cc_number, 0, 4));\n break;\n case -2:\n case -3:\n case -4:\n $error = TEXT_CCVAL_ERROR_INVALID_DATE;\n break;\n case false:\n $error = TEXT_CCVAL_ERROR_INVALID_NUMBER;\n break;\n }\n\n if ( ($result == false) || ($result < 1) ) {\n $messageStack->add($error . '<!-- ['.$this->code.'] -->', 'error');\n return true;\n }\n\n $this->cc_card_type = $cc_validation->cc_type;\n $this->cc_card_number = $cc_validation->cc_number;\n $this->cc_cvv2 = $_POST['paymentech_field_4'];\n $this->cc_expiry_month = $cc_validation->cc_expiry_month;\n $this->cc_expiry_year = $cc_validation->cc_expiry_year;\n\treturn false;\n }", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "function is_valid_card ( $card_number, $exp_month, $exp_year, \n\t\t$cc_type, $allowed_types )\n\t{\n\t\t$card_type\t\t\t\t= $this->get_card_type($card_number);\n\n\t\t// if given doesn't match determined\n\t\tif ( $card_type != $this->cc_text_type[ $cc_type ] )\n\t\t{\n\t\t\treturn ERR_BAD_TYPE_MATCH;\n\t\t}\n\n\t\tif ( in_array($card_type, $allowed_types) )\n\t\t{\n\t\t\t$ret = $this->is_valid_number ( $card_number, $card_type );\n\n\t\t\tif ( $ret != CC_SUCCESS )\n\t\t\t{\n\t\t\t\treturn $ret;\n\t\t\t}\n\n\t\t\t$ret = $this->is_valid_expiration ( $exp_month, $exp_year );\n\n\t\t\tif ( $ret != CC_SUCCESS )\n\t\t\t{\n\t\t\t\treturn $ret;\n\t\t\t}\n\n\t\t\treturn CC_SUCCESS;\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\treturn ERR_INVALID_TYPE;\n\t\t}\n\t}", "protected static function validCvcLength($cvc, string $type = NULL) : bool\n {\n return self::validCardNumberLength($cvc, $type, 'cvcLength');\n }", "public function isValid() {}", "public function isValid() {}", "public function isValid() {}", "public function isValid() {}", "public function isValid() {}", "public function isValid() {}", "public function isValid() {}", "public function isValid() {}", "public function valid();", "public function valid();", "public function valid();", "public function valid();", "public function isValid();", "public function isValid();", "public function isValid();", "public function isValid();", "public function isValid();", "public function isValid();", "public function isValid();", "public function isValid();", "public function isValid();", "public function isValid();", "public function isValid();", "public function isValid();", "public function isValid();", "public function isValid();", "public function isValid();", "public function isValid();", "public function valid()\n {\n\n $allowed_values = $this->getBootOrderAllowableValues();\n if (!in_array($this->container['boot_order'], $allowed_values)) {\n return false;\n }\n $allowed_values = $this->getFirewallAllowableValues();\n if (!in_array($this->container['firewall'], $allowed_values)) {\n return false;\n }\n $allowed_values = $this->getVideoModelAllowableValues();\n if (!in_array($this->container['video_model'], $allowed_values)) {\n return false;\n }\n $allowed_values = $this->getVncAllowableValues();\n if (!in_array($this->container['vnc'], $allowed_values)) {\n return false;\n }\n return true;\n }", "private function _vtc_check_result($result, &$error)\n\t{\n\t if(!$result)\n\t {\n\t $error = 'Không có dữ liệu trả về';\n\t return false;\n\t }\n\n\t $secret_key = $this->setting('secret_key');\n\t \n\t $data = $result[\"data\"];\n\t\t$sign = $result[\"sign\"];\n\t\t$plaintext = $data . \"|\" . $secret_key;\n\t\t$mysign = strtoupper(hash('sha256', $plaintext));\n\t\tif($mysign != $sign)\n\t\t{\n\t $error = ' Fail to validate data!';\n\t return false;\n\t }\n\t else\n\t {\n\t $string = explode('|',$data);\n\t $status = $string[1];\n\t $amount = floatval($string[2]);\n\t \n\t if($status == 1)\n\t { \n\t return true;\n\t }\n\t else if($status == 2)\n\t {\n\t $error = 'Payment is Successful (pay with pending)!';\n\t return NULL;\n\t }\n\t else if($status == 0)\n\t {\n\t $error = 'Payment is Pending!';\n\t return NULL;\n\t }\n\t else if($status == -1)\n\t {\n\t $error = 'Payment is Failed!';\n\t return false;\n\t }\n\t else if($status == -5)\n\t {\n\t $error = 'OrderID is not valid!';\n\t return false;\n\t }\n\t else if($status == -6)\n\t {\n\t $error = \"Account's balance is insufficient!\";\n\t return false;\n\t }\n\t else\n\t {\n\t $error = 'Payment is Not Success!';\n\t return false;\n\t }\n\t }\n\t\n\t return false;\n\t}", "public function isValidCard(Card $card)\n {\n $crawler = $this->client->request('POST', $this->url, ['relation_number' => $card->toString()]);\n\n $status = false;\n $crawler->filter('.alert.alert-success')->each(function () use (&$status) {\n $status = true;\n });\n\n return $status;\n }", "public function validateVatPercent($vatPercent);", "public function valid()\n {\n $allowed_values = [\"CREDIT_CARD\", \"CASH\", \"THIRD_PARTY_CARD\", \"NO_SALE\", \"SQUARE_WALLET\", \"SQUARE_GIFT_CARD\", \"UNKNOWN\", \"OTHER\"];\n if (!in_array($this->container['event_type'], $allowed_values)) {\n return false;\n }\n $allowed_values = [\"OTHER_BRAND\", \"VISA\", \"MASTERCARD\", \"AMERICAN_EXPRESS\", \"DISCOVER\", \"DISCOVER_DINERS\", \"JCB\", \"CHINA_UNIONPAY\", \"SQUARE_GIFT_CARD\"];\n if (!in_array($this->container['card_brand'], $allowed_values)) {\n return false;\n }\n $allowed_values = [\"MANUAL\", \"SCANNED\", \"SQUARE_CASH\", \"SQUARE_WALLET\", \"SWIPED\", \"WEB_FORM\", \"OTHER\"];\n if (!in_array($this->container['entry_method'], $allowed_values)) {\n return false;\n }\n return true;\n }", "public function checkValidity()\n { \t\n \treturn true;\n }", "function InfUpdateCreditCardCVV($inf_card_id, $CVV2) {\n\n\t$credit_card = new Infusionsoft_CreditCard();\n\t$credit_card->Id = $inf_card_id;\n\t$credit_card->CVV2 = $CVV2;\n\treturn $credit_card->save(); // Update Card in Infusionsoft\n}", "public function displayCardCvv($card_id)\n {\n\t\tif(!$card_id){\n\t\t\tthrow new Exception\\IsNullOrInvalid(\"Error Processing Request - Null/Invalid Card Id\");\n\t\t}\n\n\t\t$url = \"/cards/{$card_id}/secure-data/cvv2\";\n\n\t\treturn $this->sendRequest('get', $url);\n }", "public function validate()\n {\n $requiredParameters = array(\n 'number' => 'credit card number',\n 'expiryMonth' => 'expiration month',\n 'expiryYear' => 'expiration year'\n );\n\n foreach ($requiredParameters as $key => $val) {\n if (!$this->getParameter($key)) {\n throw new InvalidCreditCardException(\"The $val is required\");\n }\n }\n\n if ($this->getExpiryDate('Ym') < gmdate('Ym')) {\n throw new InvalidCreditCardException('Card has expired');\n }\n\n if (!Helper::validateLuhn($this->getNumber())) {\n throw new InvalidCreditCardException('Card number is invalid');\n }\n\n if (!is_null($this->getNumber()) && !preg_match('/^\\d{12,19}$/i', $this->getNumber())) {\n throw new InvalidCreditCardException('Card number should have 12 to 19 digits');\n }\n }", "function isValid();", "protected function validateCardNumber($params) {\n\t\t$cardNumber = $params['sg_CardNumber'];\n\n\t\tif ($cardNumber <> $this->cleanCardNumber($cardNumber)) {\n\t\t\tthrow new CardNumberException(\"Card number is not pre-processed\");\n\t\t}\n\n\t\t$cardLength = strlen($cardNumber); \n\n\t\tif ($cardLength < SafechargeConstants::CARD_NUMBER_MIN_LENGTH) {\n\t\t\tthrow new CardNumberException(\"Card number is too short\");\n\t\t}\n\n\t\tif ($cardLength > SafechargeConstants::CARD_NUMBER_MAX_LENGTH) {\n\t\t\tthrow new CardNumberException(\"Card number is too long\");\n\t\t}\n\n\t\t/* Credit card LUHN checker - coded '05 shaman - www.planzero.org *\n\t\t * This code has been released into the public domain, however please *\n\t\t * give credit to the original author where possible. */\n\t\t$parity = $cardLength % 2;\n\t\t$sum = 0;\n\t\tfor ($i = 0; $i < $cardLength; $i++) { \n\t\t\t$digit = $cardNumber[$i];\n\t\t\tif ($i % 2 == $parity) $digit = $digit * 2; \n\t\t\tif ($digit > 9) $digit = $digit - 9; \n\t\t\t$sum = $sum + $digit;\n\t\t}\n\t\t$valid = ($sum % 10 == 0) ? true : false; \n\n\t\tif (!$valid) {\n\t\t\tthrow new CardNumberException(\"Invalid checksum\");\n\t\t}\n\t}", "public function Valid();", "protected function compareVCards(VCard $vcard, VCard $dbVCard)\n {\n \t$this->assertNotNull($dbVCard);\n\n \t$this->assertEquals( VCardDB::VCARD_PRODUCT_ID,\n $dbVCard->prodid->getValue() );\n unset($dbVCard->prodid);\n \n $this->assertEquals($vcard, $dbVCard);\n }", "protected function _checkCard($account) {\n\t\t// Make sure it isn't on the blacklist\n\t\t$result = payment_option_credit_card::validate_blacklist ( $account );\n\t\tif (FALSE === $result ['valid']) {\n\t\t\t$this->response = $result ['error'];\n\t\t\t$this->status = self::STATUS_FAIL;\n\t\t\t$this->save_failure ();\n\t\t\t\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t// Make sure it isn't on the greylist\n\t\t$result = payment_option_credit_card::validate_greylist ( $account );\n\t\tif (FALSE === $result ['valid']) {\n\t\t\t$this->response = $result ['error'];\n\t\t\t$this->status = self::STATUS_FAIL;\n\t\t\t$this->save_failure ();\n\t\t\t\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\treturn TRUE;\n\t}", "public static function isPaymentValid($result, $secretKey = '', $ver = '')\n {\n if ($secretKey == '') {\n if (Configuration::getSecretKey() != '') {\n $secretKey = Configuration::getSecretKey();\n }elseif (Configuration::getCreditKey() != '') {\n $secretKey = Configuration::getCreditKey();\n }\n }\n if ($ver == '') {\n $ver = Configuration::getApiVersion();\n }\n if (!array_key_exists('signature', $result)) return 'Nothing to validate';\n $signature = $result['signature'];\n if ($ver === '2.0') {\n $encoded = $result['encodedData'];\n return $signature === Signature::generateSignature($encoded, $secretKey, $ver);\n } else {\n $response = self::clearResult($result);\n }\n return $signature === Signature::generateSignature($response, $secretKey, $ver);\n }", "protected function isMatchCvv(DataObject $response)\n {\n $cvvMatch = strtolower((string) $response->getData(static::CVV2MATCH));\n return $cvvMatch === static::RESPONSE_YES || $cvvMatch === static::RESPONSE_NOT_SUPPORTED;\n }", "public function valid()\n {\n }", "public function valid()\n {\n }", "public function valid()\n {\n }", "public function valid()\n {\n }", "protected function checkPcreVersion() {}", "public function testBuildCreditCardAVSOnly()\n {\n $config = new SinglePayConfig();\n $config->setServiceConfig(self::$testConfig);\n\n $card = new Card();\n $card->setName('TEST')\n ->setNumber('8696969')\n ->setExpiryMonth('09')\n ->setExpiryYear('18')\n ->setCvv('200');\n\n $order = new Order();\n $order->setAmount('10.00')\n ->setCustomerNo('1990');\n\n $billingAddress = new Address();\n $billingAddress->setName('TEST')\n ->setAddress1('Test address 1')\n ->setAddress2('Test address 2')\n ->setCity('Test City')\n ->setState('Test State')\n ->setZipcode('Test Zipcode')\n ->setEmail('Test Email')\n ->setPhone('112212121212');\n\n $shippingAddress = new Address();\n\n $data = new SinglePayData();\n $data->setOrder($order)\n ->setCard($card)\n ->setBillingAddress($billingAddress)\n ->setShippingAddress($shippingAddress);\n\n $creditCardAVSOnly = ExpressFactory::buildCreditCardAVSOnly($config, $data);\n $this->assertInstanceOf('\\SinglePay\\PaymentService\\Element\\Express\\Method\\CreditCardAVSOnly', $creditCardAVSOnly);\n $this->assertInstanceOf('\\SinglePay\\PaymentService\\Element\\Express\\Type\\Address', $creditCardAVSOnly->address);\n }", "private function isValid(): bool\n {\n $this->generateChecksum();\n return (($this->luhnValue % $this->base == 0) && ($this->luhnValue != 0));\n }", "abstract public function valid();", "public function pagoCompra($numTarjeta, $cvv, $vigencia){\n\n $tarjeta = substr($numTarjeta,0,16);\n\n if($tarjeta && $cvv && $vigencia){\n return true;\n }else\n {\n return false;\n }\n \n die();\n }", "function checkVatID_it($vat_id) {\n\t\tif (strlen($vat_id) != 13)\n\t\t\treturn 0;\n\n\t\tif ($this->live_check = true) {\n\n\t\t\treturn $this->live($vat_id);\n\n\t\t} else {\n\t\t\treturn 9; // es gibt keinen algorithmus\n\t\t}\n\t}", "public function valid(){ }", "public function testCreditCardIsValid($data)\n {\n $pattern = \"/^([0-9]{4}[\\s]?){3}([0-9]{4})$/\";\n\n $this->assertMatchesRegularExpression($pattern,$data);\n\n }", "public function getCvv()\n {\n return $this->cvv;\n }", "function vCard() {\n\t\tglobal $mainframe;\n\n\t\t/*\n\t\t * Initialize some variables\n\t\t */\n\t\t$db = & $mainframe->getDBO();\n\n\t\t$SiteName = $mainframe->getCfg('sitename');\n\t\t$contactId = JRequest::getVar('contact_id', 0, '', 'int');\n\n\t\t/*\n\t\t * Get a JContact table object and load the selected contact details\n\t\t */\n\t\t$contact = new JTableContact($db);\n\t\t$contact->load($contactId);\n\n\t\t/*\n\t\t * Get the contact detail parameters\n\t\t */\n\t\t$menuParams = new JParameter($contact->params);\n\t\t$show \t= $menuParams->get('vcard', 0);\n\n\t\t/*\n\t\t * Should we show the vcard?\n\t\t */\n\t\tif ($show) {\n\t\t\t/*\n\t\t\t * We need to parse the contact name field and build the name\n\t\t\t * information for the vcard.\n\t\t\t */\n\t\t\t$firstname \t= null;\n\t\t\t$middlename = null;\n\t\t\t$surname \t= null;\n\n\t\t\t// How many parts do we have?\n\t\t\t$parts = explode(' ', $contact->name);\n\t\t\t$count = count($parts);\n\n\t\t\tswitch ($count) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// only a first name\n\t\t\t\t\t$firstname = $parts[0];\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 2 :\n\t\t\t\t\t// first and last name\n\t\t\t\t\t$firstname = $parts[0];\n\t\t\t\t\t$surname = $parts[1];\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\t// we have full name info\n\t\t\t\t\t$firstname = $parts[0];\n\t\t\t\t\t$surname = $parts[$count -1];\n\t\t\t\t\tfor ($i = 1; $i < $count -1; $i ++) {\n\t\t\t\t\t\t$middlename .= $parts[$i].' ';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// quick cleanup for the middlename value\n\t\t\t$middlename = trim($middlename);\n\n\t\t\t/*\n\t\t\t * Create a new vcard object and populate the fields\n\t\t\t */\n\t\t\t$v = new JvCard();\n\n\t\t\t$v->setPhoneNumber($contact->telephone, 'PREF;WORK;VOICE');\n\t\t\t$v->setPhoneNumber($contact->fax, 'WORK;FAX');\n\t\t\t$v->setName($surname, $firstname, $middlename, '');\n\t\t\t$v->setAddress('', '', $contact->address, $contact->suburb, $contact->state, $contact->postcode, $contact->country, 'WORK;POSTAL');\n\t\t\t$v->setEmail($contact->email_to);\n\t\t\t$v->setNote($contact->misc);\n\t\t\t$v->setURL( $mainframe->getBaseURL(), 'WORK');\n\t\t\t$v->setTitle($contact->con_position);\n\t\t\t$v->setOrg($SiteName);\n\n\t\t\t$filename = str_replace(' ', '_', $contact->name);\n\t\t\t$v->setFilename($filename);\n\n\t\t\t$output = $v->getVCard($SiteName);\n\t\t\t$filename = $v->getFileName();\n\n\t\t\t// Send vCard file headers\n\t\t\theader('Content-Disposition: attachment; filename='.$filename);\n\t\t\theader('Content-Length: '.strlen($output));\n\t\t\theader('Connection: close');\n\t\t\theader('Content-Type: text/x-vCard; name='.$filename);\n\t\t\theader('Cache-Control: store, cache');\n\t\t\theader('Pragma: cache');\n\n\t\t\tprint $output;\n\t\t} else {\n\t\t\tJError::raiseWarning('SOME_ERROR_CODE', 'JContactController::vCard: '.JText::_('NOTAUTH'));\n\t\t\treturn false;\n\t\t}\n\t}", "public static function check_vat_number( $valid_data, $data ) {\n global $edd_options;\n\n if ( isset( $data['edd_vatreg'] ) ) {\n if ( !isset( $data['vat_number'] ) || empty( $data['vat_number'] ) || \"\" === $data['vat_number'] ) {\n edd_set_error( 'taxedd-no-vat-number-error', __( 'If you are VAT registered, please enter a VAT number.', 'taxamoedd' ) );\n }\n\n $vatnumber = preg_replace( '/\\s+/', '', $data['vat_number'] );\n\n if ( isset( $edd_options['taxedd_private_token'] ) ) {\n \n $resp = taxedd_get_vat_details($vatnumber);\n \n if ( 1 != $resp['buyer_tax_number_valid'] ) {\n edd_set_error( 'taxedd-invalid-vat-number', __( 'The VAT number is invalid. Please double check or untick the VAT Registered Box.', 'taxamoedd' ) );\n }\n\n } else {\n edd_set_error( 'taxedd-no-prviate-key', __( 'Private key not present, so unable to complete purchase. Please contact shop owner.', 'taxamoedd' ) );\n }\n }\n }", "public /*bool*/ function valid()\n\t{\n\t\treturn false;\n\t}", "public function validate()\n {\n $info = $this->getInfoInstance();\n\n $quote = $info->getQuote();\n\n $maxInstallmentsNumber = Mage::getStoreConfig('payment/vindi_creditcard/max_installments_number');\n\n if ($this->isSingleOrder($quote) && ($maxInstallmentsNumber > 1)) {\n if (! $installments = $info->getAdditionalInformation('installments')) {\n return $this->error('Você deve informar o número de parcelas.');\n }\n\n if ($installments > $maxInstallmentsNumber) {\n return $this->error('O número de parcelas selecionado é inválido.');\n }\n\n $minInstallmentsValue = Mage::getStoreConfig('payment/vindi_creditcard/min_installment_value');\n $installmentValue = ceil($quote->getGrandTotal() / $installments * 100) / 100;\n\n if (($installmentValue < $minInstallmentsValue) && ($installments > 1)) {\n return $this->error('O número de parcelas selecionado é inválido.');\n }\n }\n\n if ($info->getAdditionalInformation('use_saved_cc')) {\n return $this;\n }\n\n $availableTypes = $this->api()->getCreditCardTypes();\n\n $ccNumber = $info->getCcNumber();\n\n // remove credit card non-numbers\n $ccNumber = preg_replace('/\\D/', '', $ccNumber);\n\n $info->setCcNumber($ccNumber);\n\n if (! $this->_validateExpDate($info->getCcExpYear(), $info->getCcExpMonth())) {\n return $this->error(Mage::helper('payment')->__('Incorrect credit card expiration date.'));\n }\n\n if (! array_key_exists($info->getCcType(), $availableTypes)) {\n return $this->error(Mage::helper('payment')->__('Credit card type is not allowed for this payment method.'));\n }\n\n return $this;\n }", "function do_input_validation($_GPV) {\n\t# Initialize array\n\t\t$err_entry = array(\"flag\" => 0);\n\n\t# Check modes and data as required\n\t\tIF ($_GPV['mode'] == 'contact') {\n\t\t# Check required fields (err / action generated later in cade as required)\n\t\t\tIF (!$_GPV['mc_id']) \t{$err_entry['flag'] = 1; $err_entry['mc_id'] = 1;}\n\t\t\tIF (!$_GPV['mc_name']) \t{$err_entry['flag'] = 1; $err_entry['mc_name'] = 1;}\n\t\t\tIF (!$_GPV['mc_email'])\t{$err_entry['flag'] = 1; $err_entry['mc_email'] = 1;}\n\t\t\tIF (!$_GPV['mc_subj']) \t{$err_entry['flag'] = 1; $err_entry['mc_subj'] = 1;}\n\t\t\tIF (!$_GPV['mc_msg']) \t{$err_entry['flag'] = 1; $err_entry['mc_msg'] = 1;}\n\n\t\t# Validate Email Address\n\t\t\tIF (do_validate_email($_GPV['mc_email'], 0)) {\n\t\t\t\t$err_entry['flag'] = 1;\n\t\t\t\t$err_entry['mc_email'] = 1;\n\t\t\t\t$err_entry['err_email_invalid'] = 1;\n\t\t\t}\n\n\t\t# Validate the captcha if \"GD\" is loaded\n\t\t\tIF (extension_loaded('gd') && file_exists(PKG_PATH_ADDONS.'captcha')) {\n\t\t\t\tIF ($_SESSION['security_code'] != $_GPV['security_code'] || empty($_SESSION['security_code'])) {\n \t\t\t\t$err_entry['flag'] = 1; $err_entry['sec_code'] = 1;\n\t \t\t\t\tunset($_SESSION['security_code']);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tIF ($_GPV['mode'] == 'client') {\n\t\t# Check required fields (err / action generated later in cade as required)\n\t\t\tIF (!$_GPV['cc_cl_id']) \t{$err_entry['flag'] = 1; $err_entry['cc_cl_id'] = 1;}\n\t\t\tIF (!$_GPV['cc_mc_id']) \t{$err_entry['flag'] = 1; $err_entry['cc_mc_id'] = 1;}\n\t\t\tIF (!$_GPV['cc_subj']) \t{$err_entry['flag'] = 1; $err_entry['cc_subj'] = 1;}\n\t\t\tIF (!$_GPV['cc_msg']) \t{$err_entry['flag'] = 1; $err_entry['cc_msg'] = 1;}\n\t\t}\n\n\t# Return results\n\t\treturn $err_entry;\n}" ]
[ "0.7276227", "0.68107826", "0.67192733", "0.668024", "0.6605354", "0.6510927", "0.6184723", "0.611253", "0.605536", "0.604287", "0.60405314", "0.5968022", "0.5968022", "0.59226596", "0.5886032", "0.5868217", "0.58346707", "0.582154", "0.5791632", "0.57769036", "0.57542366", "0.5747903", "0.5744788", "0.57353204", "0.57239395", "0.5707679", "0.56963396", "0.5686567", "0.56836724", "0.56836724", "0.56836724", "0.56836724", "0.56836724", "0.56836724", "0.56836724", "0.56836724", "0.5663086", "0.565801", "0.5650742", "0.5650742", "0.5650056", "0.5649912", "0.5649912", "0.5649912", "0.5649912", "0.5649912", "0.5647074", "0.5647074", "0.5647074", "0.5647074", "0.5638674", "0.5638674", "0.5638674", "0.5638674", "0.5638674", "0.5638674", "0.5638674", "0.5638674", "0.5638674", "0.5638674", "0.5638674", "0.5638674", "0.5638674", "0.5638674", "0.5638674", "0.5638674", "0.5621486", "0.5617121", "0.56080425", "0.56068504", "0.56028473", "0.55961573", "0.55523306", "0.5551118", "0.5530778", "0.5505667", "0.54982823", "0.54968274", "0.54940844", "0.54914767", "0.54632825", "0.5440189", "0.54386103", "0.54386103", "0.54386103", "0.54386103", "0.5438485", "0.54332376", "0.5429003", "0.541932", "0.54162556", "0.5407496", "0.53996694", "0.5394896", "0.5393072", "0.5389828", "0.53706557", "0.53690696", "0.5364725", "0.5362461" ]
0.8100069
0
Check if the card luhn checksum is valid
protected function validLuhn($number) { $luhn = $this->getCardProp('luhn'); if (empty($luhn)) { return true; } return static::luhnCheck($number); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function isValid(): bool\n {\n $this->generateChecksum();\n return (($this->luhnValue % $this->base == 0) && ($this->luhnValue != 0));\n }", "public function isValidChecksum()\n\t{\n\t\t$length = strlen($this->number);\n\t\t$value = $this->ccNumber;\n\t\t$sum = 0;\n $weight = 2;\n\n for ($i = $length - 2; $i >= 0; $i--) {\n $digit = $weight * $value[$i];\n $sum += floor($digit / 10) + $digit % 10;\n $weight = $weight % 2 + 1;\n }\n\n if ((10 - $sum % 10) % 10 != $value[$length - 1]) {\n return false;\n }\n\n return true;\n\t}", "private function verifyByLuhnAlgorithm($number){ }", "public function validate()\n {\n // get the value; remove spaces, dashes, and dots\n $value = str_replace([' ', '-', '.'], '', (string) $this->getValue());\n\n // is it composed only of digits?\n if (! ctype_digit($value)) {\n return false;\n }\n\n // luhn mod-10 algorithm: https://gist.github.com/1287893\n $sumTable = [\n [0,1,2,3,4,5,6,7,8,9],\n [0,2,4,6,8,1,3,5,7,9],\n ];\n\n $sum = 0;\n $flip = 0;\n\n for ($i = strlen($value) - 1; $i >= 0; $i--) {\n $sum += $sumTable[$flip++ & 0x1][$value[$i]];\n }\n return $sum % 10 === 0;\n }", "private function luhn_check($number) {\r\n\r\n\t\t// Set the string length and parity\r\n\t\t$number_length=strlen($number);\r\n\t\t$parity=$number_length % 2;\r\n\r\n\t\t// Loop through each digit and do the maths\r\n\t\t$total=0;\r\n\t\tfor ($i=0; $i<$number_length; $i++) {\r\n\t\t\t$digit=$number[$i];\r\n\t\t\t// Multiply alternate digits by two\r\n\t\t\tif ($i % 2 == $parity) {\r\n\t\t\t\t$digit*=2;\r\n\t\t\t\t// If the sum is two digits, add them together (in effect)\r\n\t\t\t\tif ($digit > 9) {\r\n\t\t\t\t\t$digit-=9;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Total up the digits\r\n\t\t\t$total+=$digit;\r\n\t\t}\r\n\r\n\t\t// If the total mod 10 equals 0, the number is valid\r\n\t\treturn ($total % 10 == 0) ? TRUE : FALSE;\r\n\r\n\t}", "protected function validateChecksum() {\n\t}", "function checksum_validate($number)\n{\n $original = substr($number, 0, strlen($number) - 1);\n return checksum_generate($original) === $number;\n}", "public function isValid() {\n\t\t$checksum = self::calculateChecksum($this->number . $this->checkDigit, $this->nDigits + 1);\n\t\t// If the checksum is divisible by 10 it is valid\n\t\treturn ($checksum % 10) === 0;\n\t}", "function is_valid_bank_card_number($number)\n{\n if (is_null($number) || strlen($number) < 16 || strlen($number) > 19)\n {\n return false;\n }\n $pattern = \"/^\\d{16,19}$/\";\n return (preg_match($pattern, $number) == 1);\n}", "protected function validateCardNumber($params) {\n\t\t$cardNumber = $params['sg_CardNumber'];\n\n\t\tif ($cardNumber <> $this->cleanCardNumber($cardNumber)) {\n\t\t\tthrow new CardNumberException(\"Card number is not pre-processed\");\n\t\t}\n\n\t\t$cardLength = strlen($cardNumber); \n\n\t\tif ($cardLength < SafechargeConstants::CARD_NUMBER_MIN_LENGTH) {\n\t\t\tthrow new CardNumberException(\"Card number is too short\");\n\t\t}\n\n\t\tif ($cardLength > SafechargeConstants::CARD_NUMBER_MAX_LENGTH) {\n\t\t\tthrow new CardNumberException(\"Card number is too long\");\n\t\t}\n\n\t\t/* Credit card LUHN checker - coded '05 shaman - www.planzero.org *\n\t\t * This code has been released into the public domain, however please *\n\t\t * give credit to the original author where possible. */\n\t\t$parity = $cardLength % 2;\n\t\t$sum = 0;\n\t\tfor ($i = 0; $i < $cardLength; $i++) { \n\t\t\t$digit = $cardNumber[$i];\n\t\t\tif ($i % 2 == $parity) $digit = $digit * 2; \n\t\t\tif ($digit > 9) $digit = $digit - 9; \n\t\t\t$sum = $sum + $digit;\n\t\t}\n\t\t$valid = ($sum % 10 == 0) ? true : false; \n\n\t\tif (!$valid) {\n\t\t\tthrow new CardNumberException(\"Invalid checksum\");\n\t\t}\n\t}", "function isCardNumberValid($creditCardNumber)\n {\n $creditCardNumber = strrev($this->cardNumberClean($creditCardNumber));\n // $creditCardNumber = strrev($creditCardNumber);\n $sum = 0;\n\n for ($i = 0; $i < strlen($creditCardNumber); $i++) {\n $digit = (int)substr($creditCardNumber, $i, 1);\n\n // Double every second digit\n if ($i % 2 == 1) {\n $digit *= 2;\n }\n\n // Add digits of 2-digit numbers together\n if ($digit > 9) {\n $digit = ($digit % 10) + floor($digit / 10);\n }\n\n $sum += $digit;\n }\n\n // If the total has no remainder it's OK\n return ($sum % 10 == 0);\n }", "function verify_creditcard_mod10($strccno = '')\n {\n if (empty($strccno))\n {\n return false;\n }\n $len = mb_strlen($strccno);\n if ($len < 13 OR $len > 16)\n {\n return false;\n }\n $checkdig = (int)$strccno[--$len];\n for ($i=--$len, $sum = 0, $dou = true; $i >= 0; $i--, $dou =! $dou)\n {\n $curdig = (int)$strccno[$i];\n if ($dou)\n {\n $curdig *= 2;\n if ($curdig > 9) $curdig-=9;\n }\n $sum += $curdig;\n }\n if (($checkdig + $sum) % 10 == 0)\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public static function isValid($inn)\n {\n return strlen($inn) === 10 && self::checksum($inn) === $inn[9];\n }", "public function validate(): bool\n {\n // exact pin and serial number look like\n return $this->validateAmount();\n }", "public static function luhn_check( $str ) {\n\t\t$odd = (strlen( $str ) % 2);\n\t\t$sum = 0;\n\n\t\tfor( $i = 0; $i < strlen( $str ); $i++ ) {\n\t\t\tif ( $odd ) {\n\t\t\t\t$sum += $str[$i];\n\t\t\t} else {\n\t\t\t\tif ( ( $str[$i] * 2 ) > 9 ) {\n\t\t\t\t\t$sum += $str[$i] * 2 - 9;\n\t\t\t\t} else {\n\t\t\t\t\t$sum += $str[$i] * 2;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$odd = !$odd;\n\t\t}\n\t\treturn( ( $sum % 10 ) == 0 );\n\t}", "public function valid_cc_number($number)\n\t{\n\t\t// is the number in the correct format?\n\t\t$valid_format = FALSE;\n\t\tif(ereg(\"^5[1-5][0-9]{14}$\", $number)) // mastercard\n\t\t{\n\t\t\t$valid_format = TRUE;\n\t\t}\n\t\telseif(ereg(\"^4[0-9]{12}([0-9]{3})?$\", $number)) // visa\n\t\t{\n\t\t\t$valid_format = TRUE;\n\t\t}\n\t\t// will add others as needed\n\t\n\t\t// is the number valid?\n\t\t$card_number = strrev($number);\n\t\t$num_sum = 0;\n\t\t\n\t\tfor($i=0; $i < strlen($card_number); $i++)\n\t\t{\n\t\t\t$current_num = substr($card_number, $i, 1);\n\t\t\t\n\t\t\t// double every second digit\n\t\t\tif($i%2 == 1)\n\t\t\t{\n\t\t\t\t$current_num *= 2;\n\t\t\t}\n\t\t\t\n\t\t\t// add digits of 2-digit numbers together\n\t\t\tif($current_num > 9)\n\t\t\t{\n\t\t\t\t$first_num = $current_num % 10;\n\t\t\t\t$second_num = ($current_num - $first_num) / 10;\n\t\t\t\t$current_num = $first_num + $second_num;\n\t\t\t}\n\t\t\t\n\t\t\t$num_sum += $current_num;\n\t\t}\n\t\t\n\t\t// if the total has no remainder it's OK\n\t\t$pass_check = ($num_sum % 10 == 0);\n\t\t\n\t\tif($valid_format && $pass_check)\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function testShouldReturnTrue()\n\t{\n\t\t$this->assertTrue(SRPH\\Luhn\\luhn('7992739877'));\n\t\t$this->assertTrue(SRPH\\Luhn\\luhn('79927398712'));\n\t}", "function at_affilinet_validate_ean($barcode){\n if (!preg_match(\"/^[0-9]{13}$/\", $barcode)) {\n return false;\n }\n\n $digits = $barcode;\n\n // 1. Add the values of the digits in the\n // even-numbered positions: 2, 4, 6, etc.\n $even_sum = $digits[1] + $digits[3] + $digits[5] +\n $digits[7] + $digits[9] + $digits[11];\n\n // 2. Multiply this result by 3.\n $even_sum_three = $even_sum * 3;\n\n // 3. Add the values of the digits in the\n // odd-numbered positions: 1, 3, 5, etc.\n $odd_sum = $digits[0] + $digits[2] + $digits[4] +\n $digits[6] + $digits[8] + $digits[10];\n\n // 4. Sum the results of steps 2 and 3.\n $total_sum = $even_sum_three + $odd_sum;\n\n // 5. The check character is the smallest number which,\n // when added to the result in step 4, produces a multiple of 10.\n $next_ten = (ceil($total_sum / 10)) * 10;\n $check_digit = $next_ten - $total_sum;\n\n // if the check digit and the last digit of the\n // barcode are OK return true;\n if ($check_digit == $digits[12]) {\n return true;\n }\n\n return false;\n }", "private function _check_crc()\n\t{\n\t\t// Make sure we have unsigned crc padded hex.\n\t\t$crc_uncompressed = hash('crc32b', $this->data);\n\t\t$this->_crc = str_pad(dechex($this->_crc), 8, '0', STR_PAD_LEFT);\n\n\t\treturn $this->data !== false && $this->_crc === $crc_uncompressed;\n\t}", "protected static function validLuhnAlgorithm(string $number, string $type = NULL) : bool\n {\n return self::getCardFormats()[$type]['luhn'] ? LuhnAlgorithm::check($number) : true;\n }", "public function isLuhnValid(string $number): bool {\n $number = $this->clean($number);\n\n // If the total modulo 10 is equal to 0\n // then the number is valid according to the Luhn formula\n return $this->luhnChecksum($number) === 0;\n }", "public function testShouldReturnFalse()\n\t{\n\t\t$this->assertFalse(SRPH\\Luhn\\luhn('7992739871'));\n\t\t$this->assertFalse(SRPH\\Luhn\\luhn('79927398710'));\n\t\t$this->assertFalse(SRPH\\Luhn\\luhn('79927398711'));\n\t\t$this->assertFalse(SRPH\\Luhn\\luhn('79927398713'));\n\t}", "public function calculateLuhn($credit_card) {\n // largo del string\n $length = strlen($credit_card);\n // tarjeta de credito sin el digito de chequeo\n $credit_card_user = substr($credit_card, 0, $length - 1);\n\n $values = []; // array temporal\n // duplico los numeros en indices pares\n for ($i = $length - 2; $i >= 0; $i--) {\n if ($i % 2 == 0) {\n // sumo cada uno de los digitos devueltos al duplicar\n array_push($values, $this->sumDigits((string) ($credit_card_user[$i] * 2)));\n } else {\n array_push($values, (int) $credit_card_user[$i]);\n }\n }\n\n return ($this->checkDigit(array_sum($values)) == $credit_card[$length - 1]);\n }", "public function hasCardNumber() : bool;", "private function _check_header_crc()\n\t{\n\t\t$this->_crc = 256;\n\n\t\t// Build the checksum for this header and make sure it matches what it claims\n\t\tfor ($i = 0; $i < 148; $i++)\n\t\t{\n\t\t\t$this->_crc += ord($this->_header[$i]);\n\t\t}\n\t\tfor ($i = 156; $i < 512; $i++)\n\t\t{\n\t\t\t$this->_crc += ord($this->_header[$i]);\n\t\t}\n\n\t\t$this->_crc_check = $this->_current['checksum'] === $this->_crc;\n\n\t\treturn $this->_crc_check;\n\t}", "public function isCardValid()\n {\n return $this->isValidCard;\n }", "public function check() : bool\n { \n foreach($this->caller->numbersCalled as $key => $number)\n {\n \n foreach ($this->card->numbers as $key => $cardLine) \n {\n \n if(in_array($number, $cardLine)){\n $this->confirmations++;\n continue 2;\n }\n\n }\n }\n\n if($this->confirmations<24)\n {\n return false;\n }\n\n return true;\n }", "private function isvalidCard($CardNo,$Month,$Year,$Cvv){\n\t\t\t\t$stmt = $this->con->prepare(\"SELECT debit_card_number FROM `DebitCard` WHERE debit_card_number=? AND cvv=?;\");\n\t\t\t$stmt->bind_param(\"ss\", $CardNo,$Cvv);\n\t\t\t\n\t\t\tif($stmt->execute()){\n\t\t\t\n\t\t\treturn 0;}\n\t\t\t\n\t\t\n\t\t\t\n\t\t}", "public function hasMd5checksum(){\n return $this->_has(3);\n }", "public function hasMd5checksum(){\n return $this->_has(3);\n }", "protected function card_validate($cardno, &$cardtype=null) {\n return (CreditCardValidator::CCLuhnCheck($cardno) and CreditCardValidator::CCPrefixLengthTypeCheck($cardno, $cardtype));\n }", "public static function isValidChecksum(string $address): bool\n {\n if (!self::isValidHex($address)) {\n throw new InvalidArgumentException(\"Given address '{$address}' is not a valid Ethereum address.\");\n }\n\n $address = (string) Hex::of($address);\n $hash = (string) Sha3::hash(strtolower($address));\n\n for ($i = 0; $i < 40; ++$i) {\n if (ctype_alpha($address[$i])) {\n $charInt = intval($hash[$i], 16);\n\n if ((ctype_upper($address[$i]) && $charInt <= 7) || (ctype_lower($address[$i]) && $charInt > 7)) {\n return false;\n }\n }\n }\n\n return true;\n }", "public function Checksum_Good($tle_set)\n {\n if (strlen($tle_set) < 69) {\n return false;\n }\n\n $checksum = 0;\n\n for ($i = 0; $i < 68; $i++) {\n if (($tle_set[$i] >= '0') && ($tle_set[$i] <= '9')) {\n $value = $tle_set[$i] - '0';\n } else if ($tle_set[$i] == '-' ) {\n $value = 1;\n } else {\n $value = 0;\n }\n\n $checksum += $value;\n }\n\n $checksum %= 10;\n $check_digit = $tle_set[68] - '0';\n\n return $checksum == $check_digit;\n }", "function CCValidationSolution($Number) {\r\n global $CardName, $CardNumber, $language;\r\n\r\n require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CCVAL_FUNCTION); \r\n\r\n\r\n// Get rid of spaces and non-numeric characters.\r\n $Number = OnlyNumericSolution($Number);\r\n\r\n// Do the first four digits fit within proper ranges? If so, who's the card issuer and how long should the number be?\r\n $NumberLeft = substr($Number, 0, 4);\r\n $NumberLength = strlen($Number);\r\n\r\n if ( ($NumberLeft >= 3000) && ($NumberLeft <= 3059) ) {\r\n $CardName = 'Diners Club';\r\n $ShouldLength = 14;\r\n } elseif ( ($NumberLeft >= 3600) && ($NumberLeft <= 3699) ) {\r\n $CardName = 'Diners Club';\r\n $ShouldLength = 14;\r\n } elseif ( ($NumberLeft >= 3800) && ($NumberLeft <= 3889) ) {\r\n $CardName = 'Diners Club';\r\n $ShouldLength = 14;\r\n } elseif ( ($NumberLeft >= 3400) && ($NumberLeft <= 3499) ) {\r\n $CardName = 'American Express';\r\n $ShouldLength = 15;\r\n } elseif ( ($NumberLeft >= 3700) && ($NumberLeft <= 3799) ) {\r\n $CardName = 'American Express';\r\n $ShouldLength = 15;\r\n } elseif ( ($NumberLeft >= 3528) && ($NumberLeft <= 3589) ) {\r\n $CardName = 'JCB';\r\n $ShouldLength = 16;\r\n } elseif ( ($NumberLeft >= 3890) && ($NumberLeft <= 3899) ) {\r\n $CardName = 'Carte Blache';\r\n $ShouldLength = 14;\r\n } elseif ( ($NumberLeft >= 4000) && ($NumberLeft <= 4999) ) {\r\n $CardName = 'Visa';\r\n if ($NumberLength > 14) {\r\n $ShouldLength = 16;\r\n } elseif ($NumberLength < 14) {\r\n $ShouldLength = 13;\r\n }\r\n } elseif ( ($NumberLeft >= 5100) && ($NumberLeft <= 5599) ) {\r\n $CardName = 'MasterCard';\r\n $ShouldLength = 16;\r\n } elseif ($NumberLeft == 5610) {\r\n $CardName = 'Australian BankCard';\r\n $ShouldLength = 16;\r\n } elseif ($NumberLeft == 6011) {\r\n $CardName = 'Discover/Novus';\r\n $ShouldLength = 16;\r\n } else {\r\n $cc_val = sprintf(TEXT_CCVAL_ERROR_UNKNOWN_CARD, $NumberLeft);\r\n return $cc_val;\r\n }\r\n\r\n// Is the number the right length?\r\n if ($NumberLength <> $ShouldLength) {\r\n $Missing = $NumberLength - $ShouldLength;\r\n if ($Missing < 0) {\r\n $cc_val = sprintf(TEXT_CCVAL_ERROR_INVALID_NUMBER, $CardName, $Number);\r\n } else {\r\n $cc_val = sprintf(TEXT_CCVAL_ERROR_INVALID_NUMBER, $CardName, $Number);\r\n }\r\n\r\n return $cc_val;\r\n }\r\n\r\n// Does the number pass the Mod 10 Algorithm Checksum?\r\n if (Mod10Solution($Number)) {\r\n $CardNumber = $Number;\r\n return true;\r\n } else {\r\n $cc_val = sprintf(TEXT_CCVAL_ERROR_INVALID_NUMBER, $CardName, $Number);\r\n return $cc_val;\r\n }\r\n }", "public static function cc_number_exists_in_str( $str ) {\n\t\t$luhnRegex = <<<EOT\n/\n(?#amex)(3[47][0-9]{13})|\n(?#bankcard)(5610[0-9]{12})|(56022[1-5][0-9]{10})|\n(?#diners carte blanche)(300[0-5][0-9]{11})|\n(?#diners intl)(36[0-9]{12})|\n(?#diners US CA)(5[4-5][0-9]{14})|\n(?#discover)(6011[0-9]{12})|(622[0-9]{13})|(64[4-5][0-9]{13})|(65[0-9]{14})|\n(?#InstaPayment)(63[7-9][0-9]{13})|\n(?#JCB)(35[2-8][0-9]{13})|\n(?#Laser)(6(304|7(06|09|71))[0-9]{12,15})|\n(?#Maestro)((5018|5020|5038|5893|6304|6759|6761|6762|6763|0604)[0-9]{8,15})|\n(?#MasterCard)(5[1-5][0-9]{14})|\n(?#Solo)((6334|6767)[0-9]{12,15})|\n(?#Switch)((4903|4905|4911|4936|6333|6759)[0-9]{12,15})|((564182|633110)[0-9]{10,13})|\n(?#Visa)(4([0-9]{15}|[0-9]{12}))\n/\nEOT;\n\n\t\t$nonLuhnRegex = <<<EOT\n/\n(?#china union pay)(62[0-9]{14,17})|\n(?#diners enroute)((2014|2149)[0-9]{11})\n/\nEOT;\n\n\t\t// Transform the regex to get rid of the new lines\n\t\t$luhnRegex = preg_replace( '/\\s/', '', $luhnRegex );\n\t\t$nonLuhnRegex = preg_replace( '/\\s/', '', $nonLuhnRegex );\n\n\t\t// Remove common CC# delimiters\n\t\t$str = preg_replace( '/[\\s\\-]/', '', $str );\n\n\t\t// Now split the string on everything else and join again so the regexen have an 'easy' time\n\t\t$str = join( ' ', preg_split( '/[^0-9]+/', $str, PREG_SPLIT_NO_EMPTY ) );\n\n\t\t// First do we have any numbers that match a pattern but is not luhn checkable?\n\t\t$matches = array();\n\t\tif ( preg_match_all( $nonLuhnRegex, $str, $matches ) > 0 ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Find potential CC numbers that do luhn check and run 'em\n\t\t$matches = array();\n\t\tpreg_match_all( $luhnRegex, $str, $matches );\n\t\tforeach ( $matches[0] as $candidate ) {\n\t\t\tif ( DataValidator::luhn_check( $candidate ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// All our checks have failed; probably doesn't contain a CC number\n\t\treturn false;\n\t}", "public function isValid()\n {\n $this->checkJMBG();\n\n $arr = @$this->explode();\n if (count($arr) <> 13) return false;\n foreach ($arr as $k => $v) $$k = (int)$v;\n\n $checksum = 11 - (7 * ($A + $G) + 6 * ($B + $H) + 5 * ($C + $I) + 4 * ($D + $J) + 3 * ($E + $K) + 2 * ($F + $L)) % 11;\n return ($checksum == $M);\n }", "private function isCardNumberValid($cardType, $cardNumber)\n {\n if (empty($cardNumber))\n {\n return false;\n }\n\n if (!strcmp($cardNumber, '1234123412349999')) return true;\n if (!strcmp($cardNumber, '1234123412348888')) return true;\n\n /* Create a regular expression to validate card numbers by issuer. */\n switch ($cardType)\n {\n case WF_CARD_TYPE_MASTERCARD:\n $regex = '/^5[1-5]\\d{14}$/';\n break;\n\n case WF_CARD_TYPE_VISA:\n $regex = '/^4\\d{12}(\\d{3})?$/';\n break;\n\n case WF_CARD_TYPE_AMERICANEXPRESS:\n $regex = '/^3[47]\\d{13}$/';\n break;\n\n case WF_CARD_TYPE_DISCOVER:\n $regex = '/^6011\\d{12}$/';\n break;\n\n default:\n return false;\n break;\n }\n\n /* Fail if the card number is not valid for the specified issuer. */\n if (!preg_match($regex, $cardNumber))\n {\n return false;\n }\n\n /* Reverse the card number; we have to start from the right. */\n $reversedCardNumber = strrev($cardNumber);\n\n /* 1) Loop through each digit in the (reversed) card number.\n * A) Multiply every second digit by 2.\n * B) If this multiplication results in a two-digit number, add\n * the two digits together and use the resulting value instead.\n * 2) Add all of the values obtained in step 1 together. Every digit\n * gets added, even ones that weren't doubled.\n * 3) If the value obtained in step 2 is evenly divisible by 10, the\n * card number is valid.\n */\n $sum = 0;\n for ($i = 0; $i < strlen($reversedCardNumber); $i++)\n {\n $currentDigit = $reversedCardNumber[$i];\n\n /* Double every second digit. */\n if (($i % 2) != 0)\n {\n $currentDigit *= 2;\n }\n\n /* If we just generated a two-digit number, we add the value of\n * each digit togeather instead of using the two-digit number.\n */\n if ($currentDigit > 9)\n {\n /* Divide by 10 and take the remainder to get second digit. */\n $secondDigit = $currentDigit % 10;\n\n /* Subtract second digit and divide by 10 to get first digit. */\n $firstDigit = ($currentDigit - $secondDigit) / 10;\n\n $currentDigit = $firstDigit + $secondDigit;\n }\n\n $sum += $currentDigit;\n }\n\n if (($sum % 10) != 0)\n {\n return false;\n }\n\n return true;\n }", "public function checkResetCode()\n {\n return $this->resetCode()->isValid();\n }", "protected function validCard($number)\n {\n $pattern = $this->getCardProp('pattern');\n return preg_match($pattern, $number) && $this->validLuhn($number);\n }", "public function validate_address($address) { \n\n\t// Decode\n\t$decode = $this->base58_decode($address); \n\tif (strlen($decode) != 50) { return false; }\n\n\t// Compare address versionok\\n\n\t$version = substr($decode, 0, 2);\n\t$p2sh_byte = TESTNET == 1 ? 'c4' : '05';\n\tif (hexdec($version) > hexdec($this->public_prefix) && $version != $p2sh_byte) { return false; }\n\n\t// Compare checksum\n\t$hash = hash('sha256', hash('sha256', pack(\"H*\", substr($decode, 0, 42)), true));\n\treturn substr($decode, -8) == substr($hash, 0, 8);\n\t\t\n}", "private function validate_credit_card($numeroCartao, $response){\n\t\t// faz as validações de pagamento...\n\n if(strlen($numeroCartao) != 16){\n\n\t\t\t$response['Error'] = \"Número do cartão deve ter 16 dígitos\";\n\t\t\t$this->response(json_encode($response), 200);\n\n\n\t\t} else if(substr($numeroCartao, 0, 1) != 4 && substr($numeroCartao, 0, 1) != 5 && substr($numeroCartao, 0, 1) != 3) {\n\n\t\t\t$response['Error'] = \"Cartão com numeração inválida\";\n\t\t\t$this->response(json_encode($response), 200);\n\n\t\t} else{\n\t\t\t\n\t\t\t$soma = 0;\n\n\t\t\tfor($i = strlen($numeroCartao) - 1; $i >= 0; $i--){\n\n \t\t\t$lenght = $i+1;\n\n\t\t\t\tif(($i % 2) == 0){\t\n\n\t\t\t\t\t$impares = substr($numeroCartao, $i, 1)*2;\n\t\t\t\t\tif ($impares > 9) {\n\t\t\t\t\t\t$impares = $impares - 9;\n\t\t\t\t\t}\n\t\t\t\t\t$soma= $soma + $impares;\n \t\t\t\t\t\t\t\n\t\t\t\t}\n\t\n\t\t\t\tif (($i%2)!= 0) {\n\t\t\n\t\t\t\t\t$soma = $soma+ substr($numeroCartao, $i, 1);\n\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\tif ($soma%10 != 0){\n\n\t\t\t\t$response['Error'] = \"Cartão com numeração inválida\";\n\t\t\t\t$this->response(json_encode($response), 200);\n\n\t\t\t}\n\t\t}\n\t}", "protected function _checkCard($account) {\n\t\t// Make sure it isn't on the blacklist\n\t\t$result = payment_option_credit_card::validate_blacklist ( $account );\n\t\tif (FALSE === $result ['valid']) {\n\t\t\t$this->response = $result ['error'];\n\t\t\t$this->status = self::STATUS_FAIL;\n\t\t\t$this->save_failure ();\n\t\t\t\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t// Make sure it isn't on the greylist\n\t\t$result = payment_option_credit_card::validate_greylist ( $account );\n\t\tif (FALSE === $result ['valid']) {\n\t\t\t$this->response = $result ['error'];\n\t\t\t$this->status = self::STATUS_FAIL;\n\t\t\t$this->save_failure ();\n\t\t\t\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\treturn TRUE;\n\t}", "public static function credit_card($number, $type = NULL)\r\n {\r\n // Remove all non-digit characters from the number\r\n if (($number = preg_replace('/\\D+/', '', $number)) === '')\r\n return FALSE;\r\n\r\n if ($type == NULL)\r\n {\r\n // Use the default type\r\n $type = 'default';\r\n }\r\n elseif (is_array($type))\r\n {\r\n foreach ($type as $t)\r\n {\r\n // Test each type for validity\r\n if (valid::credit_card($number, $t))\r\n return TRUE;\r\n }\r\n\r\n return FALSE;\r\n }\r\n\r\n $cards = Kohana::config('credit_cards');\r\n\r\n // Check card type\r\n $type = strtolower($type);\r\n\r\n if ( ! isset($cards[$type]))\r\n return FALSE;\r\n\r\n // Check card number length\r\n $length = strlen($number);\r\n\r\n // Validate the card length by the card type\r\n if ( ! in_array($length, preg_split('/\\D+/', $cards[$type]['length'])))\r\n return FALSE;\r\n\r\n // Check card number prefix\r\n if ( ! preg_match('/^'.$cards[$type]['prefix'].'/', $number))\r\n return FALSE;\r\n\r\n // No Luhn check required\r\n if ($cards[$type]['luhn'] == FALSE)\r\n return TRUE;\r\n\r\n // Checksum of the card number\r\n $checksum = 0;\r\n\r\n for ($i = $length - 1; $i >= 0; $i -= 2)\r\n {\r\n // Add up every 2nd digit, starting from the right\r\n $checksum += $number[$i];\r\n }\r\n\r\n for ($i = $length - 2; $i >= 0; $i -= 2)\r\n {\r\n // Add up every 2nd digit doubled, starting from the right\r\n $double = $number[$i] * 2;\r\n\r\n // Subtract 9 from the double where value is greater than 10\r\n $checksum += ($double >= 10) ? $double - 9 : $double;\r\n }\r\n\r\n // If the checksum is a multiple of 10, the number is valid\r\n return ($checksum % 10 === 0);\r\n }", "function pre_confirmation_check() {\n global $_POST, $messageStack;\n\n\t// if the card number has the blanked out middle number fields, it has been processed, show message that \n\t// the charges were not processed through the merchant gateway and continue posting payment.\n\tif (strpos($_POST['paymentech_field_1'],'*') !== false) {\n \t$messageStack->add(MODULE_PAYMENT_PAYMENTECH_NO_DUPS, 'caution');\n\t\treturn false;\n\t}\n\n include(DIR_FS_MODULES . 'general/classes/cc_validation.php');\n\n $cc_validation = new cc_validation();\n $result = $cc_validation->validate($_POST['paymentech_field_1'], $_POST['paymentech_field_2'], $_POST['paymentech_field_3'], $_POST['paymentech_field_4']);\n $error = '';\n switch ($result) {\n case -1:\n $error = sprintf(TEXT_CCVAL_ERROR_UNKNOWN_CARD, substr($cc_validation->cc_number, 0, 4));\n break;\n case -2:\n case -3:\n case -4:\n $error = TEXT_CCVAL_ERROR_INVALID_DATE;\n break;\n case false:\n $error = TEXT_CCVAL_ERROR_INVALID_NUMBER;\n break;\n }\n\n if ( ($result == false) || ($result < 1) ) {\n $messageStack->add($error . '<!-- ['.$this->code.'] -->', 'error');\n return true;\n }\n\n $this->cc_card_type = $cc_validation->cc_type;\n $this->cc_card_number = $cc_validation->cc_number;\n $this->cc_cvv2 = $_POST['paymentech_field_4'];\n $this->cc_expiry_month = $cc_validation->cc_expiry_month;\n $this->cc_expiry_year = $cc_validation->cc_expiry_year;\n\treturn false;\n }", "function checkValidLine_Y6051($acct){\r\n\t\t\tif( strlen($acct)==9 && is_numeric($acct) ){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t}", "private function validate_isrc($value)\n\t{\n\t\tif (strlen(trim($value)) == 12) {\n\t\t\treturn 1; /* valid */\n\t\t}\n\t\telse {\n\t\t\treturn 0; /* invalid */\n\t\t}\n\t}", "private function validateChecksum($vat): void\n {\n $numbers = trim(substr($vat, 2));\n\n $len = strlen($numbers);\n\n self::assertEquals(10, $len);\n self::assertStringStartsWith('0', $numbers);\n\n // Mod97 check on first 8 digits\n $checksum = 97 - fmod(substr($numbers, 0, 8), 97);\n // Make sure checksum is 2 characters long\n $checksum = sprintf('%02d', $checksum);\n\n self::assertEquals((string) $checksum, substr($numbers, 8, 10));\n }", "abstract public function nonce_check();", "function verifyCreditCard($credit_card, $expiration_date, $security_code, $pdo_bank) {\n \n $stmt = $pdo_bank->prepare(\"SELECT zip_code from credit_card where credit_card_number=:cred\");\n $stmt->execute([\"cred\"=>$credit_card]);\n $data = $stmt->fetchAll();\n\n if ($data == null) {\n return 1; // Credit card is not found\n }\n\n /** Then check if credit card has expired or if wrong credit card expiration date is entered **/\n \n $stmt = $pdo_bank->prepare(\"SELECT zip_code from credit_card where credit_card_number=:cred and expiration_date=:exp_date and expiration_date > now()\");\n $stmt->execute([\"exp_date\"=>$expiration_date, \"cred\"=>$credit_card]);\n $data = $stmt->fetchAll();\n\n if ($data==null) {\n return 2; // wrong expiration date entered or credit card has expired\n }\n\n /** Validate credit card security code **/\n\n $stmt = $pdo_bank->prepare(\"SELECT security_code from credit_card where credit_card_number=:cred\");\n $stmt->execute([\"cred\"=>$credit_card]);\n $data = $stmt->fetchAll();\n\n if (!password_verify($security_code, $data[0][\"security_code\"])) {\n return 3; //wrong security code\n }\n\n return 0; // the user has provided correct credit card information\n \n }", "public function isValidCard(Card $card)\n {\n $crawler = $this->client->request('POST', $this->url, ['relation_number' => $card->toString()]);\n\n $status = false;\n $crawler->filter('.alert.alert-success')->each(function () use (&$status) {\n $status = true;\n });\n\n return $status;\n }", "public function isValidCheckDigit() {\n\t\t$checkDigit = self::calculateCheckDigit($this->number);\n\t\t// Validate\n\t\treturn $checkDigit === $this->checkDigit;\n\t}", "public static function verifyChecksum(): bool\n {\n $checksumFile = static::getChecksumFileName();\n\n if (!file_exists($checksumFile)) {\n return false;\n }\n\n $oldHashes = static::getStoredChecksums();\n $newHashes = static::generateChecksums();\n\n foreach ($newHashes as $fileName => $hash) {\n if (!array_key_exists($fileName, $oldHashes)) {\n return false;\n }\n\n if ($hash !== $oldHashes[$fileName]) {\n return false;\n }\n }\n\n return true;\n }", "public function testSnils()\n {\n $this->assertTrue(RuValidation::snils('112-233-445 95'));\n $this->assertTrue(RuValidation::snils('032-032-952 00'));\n\n $this->assertFalse(RuValidation::snils('03203295200'));\n\n // invalid checksum\n $this->assertFalse(RuValidation::snils('112-233-445 96'));\n }", "function validateCC($cc_num, $type) {\n if ($type == \"American\") {$pattern = \"/^([34|37]{2})([0-9]{13})$/\";if (preg_match($pattern, $cc_num)) {$verified = true;} else {$verified = false;}} elseif ($type == \"Dinners\") {$pattern = \"/^([30|36|38]{2})([0-9]{12})$/\";if (preg_match($pattern, $cc_num)) {$verified = true;} else {$verified = false;}} elseif ($type == \"Discover\") {$pattern = \"/^([6011]{4})([0-9]{12})$/\";if (preg_match($pattern, $cc_num)) {$verified = true;} else {$verified = false;}} elseif ($type == \"Master\") {$pattern = \"/^([51|52|53|54|55]{2})([0-9]{14})$/\";if (preg_match($pattern, $cc_num)) {$verified = true;} else {$verified = false;}} elseif ($type == \"Visa\") {$pattern = \"/^([4]{1})([0-9]{12,15})$/\"; if (preg_match($pattern, $cc_num)) {$verified = true;} else {$verified = false;}}\n\n if($verified == false) {\n //if validation fail, print a message\n echo \"Credit card invalid. Please make sure that you entered a valid credit card \";\n } \n}", "public function f_ValidarCIF($ccNumber)\n\t{\n\t\t$lb_ret=false;\n\t\tif (strlen($ccNumber) == 8)\n\t\t{\n\t\t\t$lb_ret=true;\n\t\t\t$numOfDigits = 0 - strlen($ccNumber);\n\t\t\t$i = -1;\n\t\t\t\n\t\t\twhile ($i>=$numOfDigits)\n\t\t\t{\n\t\t\t\tif (($i % 2) == 0)\n\t\t\t\t{\n\t\t\t\t\t$double = 2*(substr($ccNumber, $i, 1));\n\t\t\t\t\t$total += substr($double,0,1);\n\t\t\t\t\tif (strlen($double > 1))\n\t\t\t\t\t{\n\t\t\t\t\t\t$total += substr($double,1,1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$total += substr($ccNumber, $i, 1);\n\t\t\t\t}\n\t\t\t\t$i--;\n\t\t\t}\n\t\t\t\n\t\t\tif (($total % 10) != 0)\n\t\t\t{\n\t\t\t\t$lb_ret=false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $lb_ret;\n\t}", "public function validate($value)\n {\n $value = preg_replace('/[^\\d]/', '', (string) $value);\n if (strlen($value) != 11 ) {\n return false;\n }\n $acumulado = 0;\n $digits = str_split($value);\n\n // obtain digit\n $digit = array_pop($digits);\n\n for ($i=0; $i < count($digits); $i++ ) {\n $acumulado += $digits[9-$i] * (2 + ($i % 6 ));\n }\n $verif = 11 - ( $acumulado % 11 );\n $verif = $verif == 11? 0 : $verif;\n\n return $digit == $verif;\n }", "public function testReturnTrueOnValidEthereumAddress()\n {\n $result = Wallet::validate(self::VALID_ETH_ADDRESS, Wallet::ETHEREUM);\n\n $this->assertTrue($result);\n }", "function verifyPaymentDatafeed($src, $prc, $successCode, $merchantReferenceNumber, $paydollarReferenceNumber, $currencyCode, $amount, $payerAuthenticationStatus, $secureHashSecret, $secureHash) {\r\n\t$buffer = $src . '|' . $prc . '|' . $successCode . '|' . $merchantReferenceNumber . '|' . $paydollarReferenceNumber . '|' . $currencyCode . '|' . $amount . '|' . $payerAuthenticationStatus . '|' . $secureHashSecret;\r\n\t$verifyData = sha1($buffer);\r\n\tif ($secureHash == $verifyData) { return true; }\r\n\treturn false;\r\n}", "function checkfor_valid_Facs_payment_line($line){\r\n\t$valid = 0;\r\n\t$recordBeginning = substr($line, 0, 2);\r\n\tif($recordBeginning == 11){\r\n\t\t$valid = 1;\r\n\t}else { $valid = 0; }\r\n\treturn $valid;\r\n}", "public function isValidLength()\n\t{\n\t\tif ($this->ccNumber === null)\n\t\t\treturn false;\n\t\t$ccNumberLength = strlen($this->ccNumber);\n\t\t$ccType = $this->getType();\n\t\tif ($ccType === null)\n\t\t\treturn false;\n\n\t\t// Check length\n\t\treturn in_array($ccNumberLength, $this->cardLength[$ccType]);\n\t}", "public function luhnChecksum(string $number): int {\n $number = $this->clean($number);\n\n // Reverse the string\n $number = strrev($number);\n\n $total = 0;\n\n // From the rightmost digit, which is the check digit,\n // and moving left, double the value of every second digit.\n for ($i = 0; $i <= strlen($number) - 1; $i++) {\n $val = (int) $number[$i];\n\n $val = ($i & 1) ? $val * 2 : $val;\n\n // If the result of this doubling operation is\n // greater than 9 then subtract 9 from the product\n if ($val > 9) {\n $val -= 9;\n }\n\n // Take the sum of all the digits\n $total += $val;\n }\n\n return $total % 10;\n }", "protected function _isChecksumValid($iban)\n {\n $number = $this->_toNumericString($iban);\n\n return 1 === $this->_mod($number, 97);\n }", "public function tellInvalidCard()\n {\n }", "function bankAccountNumber($number, $dashes = false)\n {\n $dash = $dashes ? \"-\" : \"\";\n if (!preg_match(\"/^\\d{8}\".$dash.\"\\d{8}(\".$dash.\"\\d{8})?$/\", $number)) {\n return false;\n }\n $number = preg_replace(\"/-|0{8}$/\", \"\", $number);\n $len = strlen($number);\n\n return \n Validate_HU::_checkCDV(substr($number, 0, 8)) &&\n (($len == 16 && Validate_HU::_checkCDV(substr($number, 8, 8))) ||\n ($len == 24 && Validate_HU::_checkCDV(substr($number, 8, 16))));\n }", "public function validateFormatCreditCard($cc) {\n $pattern_1 = '/^((4[0-9]{12})|(4[0-9]{15})|(5[1-5][0-9]{14})|(3[47][0-9]{13})|(6011[0-9]{12}))$/';\n $pattern_2 = '/^((30[0-5][0-9]{11})|(3[68][0-9]{12})|(3[0-9]{15})|(2123[0-9]{12})|(1800[0-9]{12}))$/';\n\n if (preg_match($pattern_1, $cc)) {\n return true;\n } else if (preg_match($pattern_2, $cc)) {\n return true;\n } else {\n return false;\n }\n }", "function validar_dni($dni){\n $letra = substr($dni, -1);\n $numeros = substr($dni, 0, -1);\n if ( substr(\"TRWAGMYFPDXBNJZSQVHLCKE\", $numeros%23, 1) == $letra && strlen($letra) == 1 && strlen ($numeros) == 8 ){\n echo 'valido';\n }else{\n echo 'no valido';\n }\n}", "public function verifyHash($input)\n {\n $salt = substr($input, 0, strrpos($input, '$') + 1);\n $checksum = substr($input, strrpos($input, '$') + 1);\n\n return ($this->verifySalt($salt) && 1 === preg_match('/^[\\.\\/0-9A-Za-z]{28}$/', $checksum));\n }", "public static function validate($parameters): bool\n {\n $uuidData = preg_replace('/[^0-9a-f]/i', '', $parameters['uuid']);\n\n $amountLength = substr($uuidData, 1, 1);\n $amount = substr($uuidData, 2, $amountLength);\n $serviceId = substr($uuidData, 8, 8);\n\n $strChecksumUUID = substr($uuidData, ($amountLength + 2), (6 - $amountLength));\n $hash = hash_hmac(UUID::HASH_METHOD, self::$prefix . $amountLength . $amount . $serviceId, $parameters['secret']);\n\n return substr($hash, 0, strlen($strChecksumUUID)) === $strChecksumUUID;\n }", "public function testCreditCardIsValid($data)\n {\n $pattern = \"/^([0-9]{4}[\\s]?){3}([0-9]{4})$/\";\n\n $this->assertMatchesRegularExpression($pattern,$data);\n\n }", "public function validate()\n {\n $formatValid = preg_match('/^([A-Z]{2})([0-9]{2})([0-9A-Z]{12,30})/', $this->data);\n\n if (!$formatValid) {\n $this->invalidate();\n return false;\n }\n\n $isValid = self::validateIBAN($this->data);\n\n if (! $isValid) {\n $this->invalidate();\n }\n\n return $isValid;\n }", "public function testShouldReturnFalseForBlankStrings()\n\t{\n\t\t$this->assertFalse(SRPH\\Luhn\\luhn());\n\t\t$this->assertFalse(SRPH\\Luhn\\luhn(''));\n\t}", "function CheckAvalibility(& $rsURL) \n{\t\n\t$sResult = CurlGetHeaders($rsURL); \n\t\n\tif($sResult === false)\n\t{\n\t\treturn false;\n\t}\n\t\n\t$nMatch = preg_match('#[123][0-9]{2,2}#i', $sResult[0]); \n\tif($nMatch === false || $nMatch > 0)\n\t{\n\t\treturn true; \t\n\t} \n\t\n\treturn false;\n}", "public function valid_compte_hashValidation($hash){ \n\n\t\t$sql = \"UPDATE utilisateur SET ut_compte_valide = '1' WHERE ut_hash_validation = ?\";\n\t\t$res = $this->executerRequete($sql,array($hash));\n\t\t\treturn ($res->rowCount() == 1); // si 1 alors mise a jour ok\n\n\t\t}", "public function isValid($value)\n {\n $this->_setValue($value);\n\n if (!is_string($value)) {\n $this->_error(self::INVALID, $value);\n return false;\n }\n\n if (!ctype_digit($value)) {\n $this->_error(self::CONTENT, $value);\n return false;\n }\n\n $length = strlen($value);\n $types = $this->getType();\n $foundp = false;\n $foundl = false;\n foreach ($types as $type) {\n foreach ($this->_cardType[$type] as $prefix) {\n if (substr($value, 0, strlen($prefix)) == $prefix) {\n $foundp = true;\n if (in_array($length, $this->_cardLength[$type])) {\n $foundl = true;\n break 2;\n }\n }\n }\n }\n\n if ($foundp == false){\n $this->_error(self::PREFIX, $value);\n return false;\n }\n\n if ($foundl == false) {\n $this->_error(self::LENGTH, $value);\n return false;\n }\n\n $sum = 0;\n $weight = 2;\n\n for ($i = $length - 2; $i >= 0; $i--) {\n $digit = $weight * $value[$i];\n $sum += floor($digit / 10) + $digit % 10;\n $weight = $weight % 2 + 1;\n }\n\n if ((10 - $sum % 10) % 10 != $value[$length - 1]) {\n $this->_error(self::CHECKSUM, $value);\n return false;\n }\n\n if (!empty($this->_service)) {\n try {\n require_once 'Zend/Validate/Callback.php';\n $callback = new Zend_Validate_Callback($this->_service);\n $callback->setOptions($this->_type);\n if (!$callback->isValid($value)) {\n $this->_error(self::SERVICE, $value);\n return false;\n }\n } catch (Zend_Exception $e) {\n $this->_error(self::SERVICEFAILURE, $value);\n return false;\n }\n }\n\n return true;\n }", "function isValidSerialNumber($serialNumber) {\n\tunset($serialNumber);\n\treturn true;\n}", "function give_donation_form_validate_cc() {\n\n\t$card_data = give_get_donation_cc_info();\n\n\t// Validate the card zip.\n\tif ( ! empty( $card_data['card_zip'] ) ) {\n\t\tif ( ! give_donation_form_validate_cc_zip( $card_data['card_zip'], $card_data['card_country'] ) ) {\n\t\t\tgive_set_error( 'invalid_cc_zip', __( 'The zip / postal code you entered for your billing address is invalid.', 'give' ) );\n\t\t}\n\t}\n\n\t// Ensure no spaces.\n\tif ( ! empty( $card_data['card_number'] ) ) {\n\t\t$card_data['card_number'] = str_replace( '+', '', $card_data['card_number'] ); // no \"+\" signs.\n\t\t$card_data['card_number'] = str_replace( ' ', '', $card_data['card_number'] ); // No spaces.\n\t}\n\n\t// This should validate card numbers at some point too.\n\treturn $card_data;\n}", "protected static function validate_credit_card( $value ) {\n\t\t$calculated_card_type = self::getCardType( $value );\n\t\tif ( !$calculated_card_type ){\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "function fn_validate_cc_number($number, $show_error = false)\n{\n if (empty($number)) {\n return false;\n }\n\n $number = str_replace(array('-',' '), '', $number);\n\n if (preg_match('/^([?0-9]{13,19}|[?*\\d]+)$/', $number)) {\n return true;\n } elseif ($show_error) {\n fn_set_notification('E', __('error'), __('text_not_valid_cc_number', array(\n '[cc_number]' => $number\n )));\n }\n\n return false;\n}", "Public Function verifyResetCode($Code)\n\t{\n\t\t$Row = $this->_db->fetchRow('SELECT * FROM bevomedia_user_reset_password WHERE ID = ' . $this->id . ' AND Hash = \"' . $Code .'\"');\n\t\tif(!$Row || !sizeOf($Row))\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t\t\t\n\t}", "function checkValidLine_Y3210($acct){\r\n\t\t\tif( strlen($acct)>0){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t}", "protected function is_hash_digest_valid() {\r\n\t\t$result = false;\r\n\t\t$data = $this->build_variables_string();\r\n\t\tif ( $data ) {\r\n\t\t\t$hash_digest_received = self::get_post_var( 'HashDigest' );\r\n\t\t\t$hash_digest_calculated = $this->calculate_hash_digest( $data, 'SHA1', get_option( 'paymentsense_preshared_key' ) );\r\n\t\t\t$result = strToUpper( $hash_digest_received ) === strToUpper( $hash_digest_calculated );\r\n\t\t}\r\n\t\treturn $result;\r\n\t}", "public function calculateChecksum() {}", "public function calculateChecksum() {}", "public function passes($attribute, $value)\n {\n $reg = '/^[0-9]{11}$/';\n if(preg_match($reg, $value)==false)\n return false;\n else\n {\n $digits = str_split($value);\n if ((intval(substr($value, 4, 2)) > 31)||(intval(substr($value, 2, 2)) > 12))\n return false;\n $checksum = (1*intval($digits[0]) + 3*intval($digits[1]) + 7*intval($digits[2]) + 9*intval($digits[3]) + 1*intval($digits[4]) + 3*intval($digits[5]) + 7*intval($digits[6]) + 9*intval($digits[7]) + 1*intval($digits[8]) + 3*intval($digits[9]))%10;\n if($checksum == 0)\n $checksum = 10;\n $checksum = 10 - $checksum;\n\n return (intval($digits[10]) == $checksum);\n }\n }", "public function isValidHexData($str) {\n\n // Always ensure 0x prefix.\n if (!EthereumStatic::hasHexPrefix($str)) {\n return FALSE;\n }\n // Should always have at least one digit - zero is \"0x0\".\n if (strlen($str) <= 3) {\n return FALSE;\n }\n\n // Ensure two hex digits per byte.\n if ((strlen($str) % 2 != 0)) {\n return FALSE;\n }\n return ctype_xdigit(self::removeHexPrefix($str));\n }", "public function hasMd5checksums(){\n return $this->_has(1);\n }", "public function hasMd5checksums(){\n return $this->_has(1);\n }", "abstract public function isPaymentValid($reference, $expected_naira_amount);", "function TestCheckDigit($barcode)\n {\n $sum=0;\n for($i=1;$i<=11;$i+=2)\n $sum+=3*$barcode[$i];\n for($i=0;$i<=10;$i+=2)\n $sum+=$barcode[$i];\n return ($sum+$barcode[12])%10==0;\n }", "public static function Validate(string $mac):bool\n {\n if (strlen($mac) != 17) return false;\n\n return preg_match(\"/[0-9A-F][0-9A-F][:][0-9A-F][0-9A-F][:][0-9A-F][0-9A-F][:][0-9A-F][0-9A-F][:][0-9A-F][0-9A-F][:][0-9A-F][0-9A-F]/\", $mac) == 1;\n }", "private function validate($cbuNumber)\n {\n if(!Cbu::bankExists($cbuNumber))\n\t\t\t\t{\n return false;\n }\n\n\n // Check digits\n return $this->verifyDigits($cbuNumber);\n }", "abstract public function checksum($barcode);", "function checkVatID_c($vat_id) {\n\t\tif (strlen($vat_id) != 10)\n\t\t\treturn 0;\n\n\t\t// LUHN-10 code http://www.ee.unb.ca/tervo/ee4253/luhn.html\n\n\t\t$id = substr($vat_id, 1);\n\t\t$checksum = 0;\n\t\tfor ($i = 9; $i > 0; $i --) {\n\t\t\t$digit = $vat_id {\n\t\t\t\t$i};\n\t\t\tif ($i % 2 == 1)\n\t\t\t\t$digit *= 2;\n\t\t\tif ($digit >= 10) {\n\t\t\t\t$checksum += $digit -10 + 1;\n\t\t\t} else {\n\t\t\t\t$checksum += $digit;\n\t\t\t}\n\t\t}\n\t\tif ($this->modulo($checksum, 10) == 0)\n\t\t\treturn 1;\n\n\t\treturn 0;\n\t} // Canada\n\n\t// belgien\n\tfunction checkVatID_be($vat_id) {\n\t\tif (strlen($vat_id) != 11)\n\t\t\treturn 0;\n\n\t\t$checkvals = (int) substr($vat_id, 2, -2);\n\t\t$checksum = (int) substr($vat_id, -2);\n\n\t\tif (97 - $this->modulo($checkvals, 97) != $checksum)\n\t\t\treturn 0;\n\n\t\treturn 1;\n\t} // end belgien\n\n\t// daenemark\n\tfunction checkVatID_dk($vat_id) {\n\t\tif (strlen($vat_id) != 10)\n\t\t\treturn 0;\n\n\t\t$weights = array (2, 7, 6, 5, 4, 3, 2, 1);\n\t\t$checksum = 0;\n\n\t\tfor ($i = 0; $i < 8; $i ++)\n\t\t\t$checksum += (int) $vat_id[$i +2] * $weights[$i];\n\t\tif ($this->modulo($checksum, 11) > 0)\n\t\t\treturn 0;\n\n\t\treturn 1;\n\t} // end daenemark\n\n\t// deutschland\n\tfunction checkVatID_de($vat_id) {\n\t\tif (strlen($vat_id) != 11)\n\t\t\treturn 0;\n\n\t\t$prod = 10;\n\t\t$checkval = 0;\n\t\t$checksum = (int) substr($vat_id, -1);\n\n\t\tfor ($i = 2; $i < 10; $i ++) {\n\t\t\t$checkval = $this->modulo((int) $vat_id[$i] + $prod, 10);\n\t\t\tif ($checkval == 0)\n\t\t\t\t$checkval = 10;\n\t\t\t$prod = $this->modulo($checkval * 2, 11);\n\t\t} // end for($i = 2; $i < 10; $i++)\n\t\t$prod = $prod == 1 ? 11 : $prod;\n\t\tif (11 - $prod != $checksum)\n\t\t\treturn 0;\n\n\t\treturn 1;\n\t} // end deutschland\n\n\t// estland\n\tfunction checkVatID_ee($vat_id) {\n\n\t\tif (strlen($vat_id) != 11)\n\t\t\treturn 0;\n\t\tif (!is_numeric(substr($vat_id, 2)))\n\t\t\treturn 0;\n\n\t\tif ($this->live_check = true) {\n\n\t\t\treturn $this->live($vat_id);\n\n\t\t} else {\n\t\t\treturn 9; // es gibt keinen algorithmus\n\t\t}\n\t} // end estland\n\n\t// finnland\n\tfunction checkVatID_fi($vat_id) {\n\t\tif (strlen($vat_id) != 10)\n\t\t\treturn 0;\n\n\t\t$weights = array (7, 9, 10, 5, 8, 4, 2);\n\t\t$checkval = 0;\n\t\t$checksum = (int) substr($vat_id, -1);\n\n\t\tfor ($i = 0; $i < 8; $i ++)\n\t\t\t$checkval += (int) $vat_id[$i +2] * $weights[$i];\n\n\t\tif (11 - $this->modulo($checkval, 11) != $checksum)\n\t\t\treturn 0;\n\n\t\treturn 1;\n\t} // end finnland\n\n\t// frankreich\n\tfunction checkVatID_fr($vat_id) {\n\t\tif (strlen($vat_id) != 13)\n\t\t\treturn 0;\n\t\tif (!is_numeric(substr($vat_id), 4))\n\t\t\treturn 0;\n\n\t\tif ($this->live_check = true) {\n\n\t\t\treturn $this->live($vat_id);\n\n\t\t} else {\n\t\t\treturn 9; // es gibt keinen algorithmus\n\t\t}\n\n\t} // end frankreich\n\n\t// griechenland\n\tfunction checkVatID_el($vat_id) {\n\t\tif (strlen($vat_id) != 11)\n\t\t\treturn 0;\n\n\t\t$checksum = substr($vat_id, -1);\n\t\t$checkval = 0;\n\n\t\tfor ($i = 1; $i <= 8; $i ++)\n\t\t\t$checkval += (int) $vat_id[10 - $i] * pow(2, $i);\n\t\t$checkval = $this->modulo($checkval, 11) > 9 ? 0 : $this->modulo($checkval, 11);\n\t\tif ($checkval != $checksum)\n\t\t\treturn 0;\n\n\t\treturn 1;\n\t} // end griechenland\n\n\t// grossbrittanien\n\tfunction checkVatID_gb($vat_id) {\n\t\tif (strlen($vat_id) != 11 && strlen($vat_id) != 14)\n\t\t\treturn 0;\n\t\tif (!is_numeric(substr($vat_id, 2)))\n\t\t\treturn 0;\n\n\t\tif ($this->live_check = true) {\n\n\t\t\treturn $this->live($vat_id);\n\n\t\t} else {\n\t\t\treturn 9; // es gibt keinen algorithmus\n\t\t}\n\n\t} // end grossbrittanien\n\n\t/********************************************\n\t* irland *\n\t********************************************/\n\t// irland switch\n\tfunction checkVatID_ie($vat_id) {\n\t\tif (strlen($vat_id) != 10)\n\t\t\treturn 0;\n\t\tif (!checkVatID_ie_new($vat_id) && !checkVatID_ie_old($vat_id))\n\t\t\treturn 0;\n\n\t\treturn 1;\n\t} // end irland switch\n\n\t// irland alte methode\n\tfunction checkVatID_ie_old($vat_id) {\n\t\t// in neue form umwandeln\n\t\t$transform = array (substr($vat_id, 0, 2), '0', substr($vat_id, 4, 5), $vat_id[2], $vat_id[9]);\n\t\t$vat_id = join('', $transform);\n\n\t\t// nach neuer form pruefen\n\t\treturn checkVatID_ie_new($vat_id);\n\t} // end irland alte methode\n\n\t// irland neue methode\n\tfunction checkVatID_ie_new($vat_id) {\n\t\t$checksum = strtoupper(substr($vat_id, -1));\n\t\t$checkval = 0;\n\t\t$checkchar = 'A';\n\t\tfor ($i = 2; $i <= 8; $i ++)\n\t\t\t$checkval += (int) $vat_id[10 - $i] * $i;\n\t\t$checkval = $this->modulo($checkval, 23);\n\t\tif ($checkval == 0) {\n\t\t\t$checkchar = 'W';\n\t\t} else {\n\t\t\tfor ($i = $checkval -1; $i > 0; $i --)\n\t\t\t\t$checkchar ++;\n\t\t}\n\t\tif ($checkchar != $checksum)\n\t\t\treturn false;\n\n\t\treturn true;\n\t} // end irland neue methode\n\t/* end irland\n\t********************************************/\n\n\t// italien\n\tfunction checkVatID_it($vat_id) {\n\t\tif (strlen($vat_id) != 13)\n\t\t\treturn 0;\n\n\t\tif ($this->live_check = true) {\n\n\t\t\treturn $this->live($vat_id);\n\n\t\t} else {\n\t\t\treturn 9; // es gibt keinen algorithmus\n\t\t}\n\t} // end italien\n\n\t// lettland\n\tfunction checkVatID_lv($vat_id) {\n\n\t\tif (strlen($vat_id) != 13)\n\t\t\treturn 0;\n\t\tif (!is_numeric(substr($vat_id, 2)))\n\t\t\treturn 0;\n\n\t\tif ($this->live_check = true) {\n\n\t\t\treturn $this->live($vat_id);\n\n\t\t} else {\n\t\t\treturn 9; // es gibt keinen algorithmus\n\t\t}\n\t} // end lettland\n\n\t// litauen\n\tfunction checkVatID_lt($vat_id) {\n\n\t\tif ((strlen($vat_id) != 13) || (strlen($vat_id) != 11))\n\t\t\treturn 0;\n\t\tif (!is_numeric(substr($vat_id, 2)))\n\t\t\treturn 0;\n\n\t\tif ($this->live_check = true) {\n\n\t\t\treturn $this->live($vat_id);\n\n\t\t} else {\n\t\t\treturn 9; // es gibt keinen algorithmus\n\t\t}\n\t} // end litauen\n\n\t// luxemburg\n\tfunction checkVatID_lu($vat_id) {\n\t\tif (strlen($vat_id) != 10)\n\t\t\treturn 0;\n\n\t\t$checksum = (int) substr($vat_id, -2);\n\t\t$checkval = (int) substr($vat_id, 2, 6);\n\t\tif ($this->modulo($checkval, 89) != $checksum)\n\t\t\treturn 0;\n\n\t\treturn 1;\n\t} // luxemburg\n\n\t// malta\n\tfunction checkVatID_mt($vat_id) {\n\n\t\tif (strlen($vat_id) != 10)\n\t\t\treturn 0;\n\t\tif (!is_numeric(substr($vat_id, 2)))\n\t\t\treturn 0;\n\n\t\tif ($this->live_check = true) {\n\n\t\t\treturn $this->live($vat_id);\n\n\t\t} else {\n\t\t\treturn 9; // es gibt keinen algorithmus\n\t\t}\n\t} // end malta\n\n\t// niederlande\n\tfunction checkVatID_nl($vat_id) {\n\t\tif (strlen($vat_id) != 14)\n\t\t\treturn 0;\n\t\tif (strtoupper($vat_id[11]) != 'B')\n\t\t\treturn 0;\n\t\tif ((int) $vat_id[12] == 0 || (int) $vat_id[13] == 0)\n\t\t\treturn 0;\n\n\t\t$checksum = (int) $vat_id[10];\n\t\t$checkval = 0;\n\n\t\tfor ($i = 2; $i <= 9; $i ++)\n\t\t\t$checkval += (int) $vat_id[11 - $i] * $i;\n\t\t$checkval = $this->modulo($checkval, 11) > 9 ? 0 : $this->modulo($checkval, 11);\n\n\t\tif ($checkval != $checksum)\n\t\t\treturn 0;\n\n\t\treturn 1;\n\t} // end niederlande\n\n\t// oesterreich\n\tfunction checkVatID_at($vat_id) {\n\t\tif (strlen($vat_id) != 11)\n\t\t\treturn 0;\n\t\tif (strtoupper($vat_id[2]) != 'U')\n\t\t\treturn 0;\n\n\t\t$checksum = (int) $vat_id[10];\n\t\t$checkval = 0;\n\n\t\tfor ($i = 3; $i < 10; $i ++)\n\t\t\t$checkval += $this->cross_summa((int) $vat_id[$i] * ($this->is_even($i) ? 2 : 1));\n\t\t$checkval = substr((string) (96 - $checkval), -1);\n\n\t\tif ($checksum != $checkval)\n\t\t\treturn 0;\n\n\t\treturn 1;\n\t} // end oesterreich\n\n\t// polen\n\tfunction checkVatID_pl($vat_id) {\n\t\tif (strlen($vat_id) != 12)\n\t\t\treturn 0;\n\n\t\t$weights = array (6, 5, 7, 2, 3, 4, 5, 6, 7);\n\t\t$checksum = (int) $vat_id[11];\n\t\t$checkval = 0;\n\t\tfor ($i = 0; $i < count($weights); $i ++)\n\t\t\t$checkval += (int) $vat_id[$i +2] * $weights[$i];\n\t\t$checkval = $this->modulo($checkval, 11);\n\n\t\tif ($checkval != $checksum)\n\t\t\treturn 0;\n\n\t\treturn 1;\n\t} // end polen\n\n\t// portugal\n\tfunction checkVatID_pt($vat_id) {\n\t\tif (strlen($vat_id) != 11)\n\t\t\treturn 0;\n\n\t\t$checksum = (int) $vat_id[10];\n\t\t$checkval = 0;\n\n\t\tfor ($i = 2; $i < 10; $i ++) {\n\t\t\t$checkval += (int) $vat_id[11 - $i] * $i;\n\t\t}\n\t\t$checkval = (11 - $this->modulo($checkval, 11)) > 9 ? 0 : (11 - $this->modulo($checkval, 11));\n\t\tif ($checksum != $checkval)\n\t\t\treturn 0;\n\n\t\treturn 1;\n\t} // end portugal\n\n\t// schweden\n\tfunction checkVatID_se($vat_id) {\n\t\tif (strlen($vat_id) != 14)\n\t\t\treturn 0;\n\t\tif ((int) substr($vat_id, -2) < 1 || (int) substr($vat_id, -2) > 94)\n\t\t\treturn 0;\n\t\t$checksum = (int) $vat_id[11];\n\t\t$checkval = 0;\n\n\t\tfor ($i = 0; $i < 10; $i ++)\n\t\t\t$checkval += $this->cross_summa((int) $vat_id[10 - $i] * ($this->is_even($i) ? 2 : 1));\n\t\tif ($checksum != ($this->modulo($checkval, 10) == 0 ? 0 : 10 - $this->modulo($checkval, 10)))\n\t\t\treturn 0;\n\n\t\t$checkval = 0;\n\t\tfor ($i = 0; $i < 13; $i ++)\n\t\t\t$checkval += (int) $vat_id[13 - $i] * ($this->is_even($i) ? 2 : 1);\n\t\tif ($this->modulo($checkval, 10) > 0)\n\t\t\treturn 0;\n\n\t\treturn 1;\n\t} // end schweden\n\n\t// slowakische republik\n\tfunction checkVatID_sk($vat_id) {\n\t\tif (strlen($vat_id) != 12)\n\t\t\treturn 0;\n\t\tif (!is_numeric(substr($vat_id, 2)))\n\t\t\treturn 0;\n\n\t\tif ($this->live_check = true) {\n\n\t\t\treturn $this->live($vat_id);\n\n\t\t} else {\n\t\t\treturn 9; // es gibt keinen algorithmus\n\t\t}\n\n\t} // end slowakische republik\n\n\t// slowenien\n\tfunction checkVatID_si($vat_id) {\n\t\tif (strlen($vat_id) != 10)\n\t\t\treturn 0;\n\t\tif ((int) $vat_id[2] == 0)\n\t\t\treturn 0;\n\n\t\t$checksum = (int) $vat_id[9];\n\t\t$checkval = 0;\n\n\t\tfor ($i = 2; $i <= 8; $i ++)\n\t\t\t$checkval += (int) $vat_id[10 - $i] * $i;\n\t\t$checkval = $this->modulo($checkval, 11) == 10 ? 0 : 11 - $this->modulo($checkval, 11);\n\t\tif ($checksum != $checkval)\n\t\t\treturn 0;\n\n\t\treturn 1;\n\t} // end slowenien\n\n\t// spanien\n\tfunction checkVatID_es($vat_id) {\n\t\t// Trim country info\n\t\t$vat_id = substr($vat_id, 2);\n\n\t\t// Is it a naturalized foreigner?\n\t\tif (strtoupper($vat_id[0]) == 'X')\n\t\t\t$vat_id = substr($vat_id, 1); // Truncated $vat_id is validated as a regular one\n\n\t\t// Length check \n\t\tif (strlen($vat_id) > 9) // $vat_id at this point should be 9 chars at most\n\n\n\n\t\t\treturn 0;\n\n\t\t// Is it a company?\n\t\tif (!is_numeric($vat_id[0])) {\n\t\t\t$allowed = array ('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H');\n\t\t\t$checkval = false;\n\n\t\t\tfor ($i = 0; $i < count($allowed); $i ++) {\n\t\t\t\tif (strtoupper($vat_id[0]) == $allowed[$i])\n\t\t\t\t\t$checkval = true;\n\t\t\t} // end for($i=0; $i<count($allowed); $i++)\n\t\t\tif (!$checkval)\n\t\t\t\treturn 9; // Few more letters are allowed, but not likely to happen\n\n\t\t\t$vat_len1 = strlen($vat_id) - 1;\n\n\t\t\t$checksum = (int) $vat_id[$vat_len1];\n\t\t\t$checkval = 0;\n\n\t\t\tfor ($i = 1; $i < $vat_len1; $i ++)\n\t\t\t\t$checkval += $this->cross_summa((int) $vat_id[$i] * ($this->is_even($i) ? 1 : 2));\n\n\t\t\tif ($checksum != 10 - $this->modulo($checkval, 10))\n\t\t\t\treturn 0;\n\n\t\t\treturn 1;\n\t\t} // end Is it a company?\n\n\t\t// Is it an Individual? (or naturalized foreigner)\n\t\tif (!is_numeric($vat_id[strlen($vat_id) - 1])) {\n\t\t\t$allowed1 = \"TRWAGMYFPDXBNJZSQVHLCKE\";\n\n\t\t\t$vat_len1 = strlen($vat_id) - 1;\n\n\t\t\t$checksum = strtoupper($vat_id[$vat_len1]);\n\t\t\t$checkval = $this->modulo((int) substr($vat_id, 0, $vat_len1), 23);\n\n\t\t\tif ($checksum != $allowed1[$checkval])\n\t\t\t\treturn 0;\n\n\t\t\t$this->vat_mod = array ('status' => $allowed1[$checkval]);\n\n\t\t\treturn 1;\n\t\t} // end Is it an Individual?\n\n\t\treturn 0; // No match found\n\t} // end spanien\n\n\t// tschechien\n\tfunction checkVatID_cz($vat_id) {\n\n\t\tif ((strlen($vat_id) != 10) || (strlen($vat_id) != 11) || (strlen($vat_id) != 12))\n\t\t\treturn 0;\n\t\tif (!is_numeric(substr($vat_id, 2)))\n\t\t\treturn 0;\n\n\t\tif ($this->live_check = true) {\n\n\t\t\treturn $this->live($vat_id);\n\n\t\t} else {\n\t\t\treturn 9; // es gibt keinen algorithmus\n\t\t}\n\t} // end tschechien\n\n\t// ungarn\n\tfunction checkVatID_hu($vat_id) {\n\n\t\tif (strlen($vat_id) != 10)\n\t\t\treturn 0;\n\t\tif (!is_numeric(substr($vat_id, 2)))\n\t\t\treturn 0;\n\n\t\tif ($this->live_check = true) {\n\n\t\t\treturn $this->live($vat_id);\n\n\t\t} else {\n\t\t\treturn 9; // es gibt keinen algorithmus\n\t\t}\n\t} // end ungarn\n\n\t// zypern\n\tfunction checkVatID_cy($vat_id) {\n\n\t\tif (strlen($vat_id) != 11)\n\t\t\treturn 0;\n\n\t\tif ($this->live_check = true) {\n\n\t\t\treturn $this->live($vat_id);\n\n\t\t} else {\n\t\t\treturn 9; // es gibt keinen algorithmus\n\t\t}\n\t} // end zypern\n\n\t/*******************************************************************/\n\n\t/********************************************************************\n\t* mathematische Hilfsfunktionen *\n\t********************************************************************/\n\t// modulo berechnet den rest einer division von $val durch $param\n\tfunction modulo($val, $param) {\n\t\treturn $val - (floor($val / $param) * $param);\n\t} // end function modulo($val, $param)\n\n\t// stellt fest, ob eine zahl gerade ist\n\tfunction is_even($val) {\n\t\treturn ($val / 2 == floor($val / 2)) ? true : false;\n\t} // end function is_even($val)\n\n\t// errechnet die quersumme von $val\n\tfunction cross_summa($val) {\n\t\t$val = (string) $val;\n\t\t$sum = 0;\n\t\tfor ($i = 0; $i < strlen($val); $i ++)\n\t\t\t$sum += (int) $val[$i];\n\t\treturn $sum;\n\t} // end function cross_summa((string) $val)\n\t/*******************************************************************/\n\n\t/********************************************************************\n\t* Live Check *\n\t********************************************************************/\n\t// Live Check überprüft die USTid beim Bundesamt für Finanzen\n\tfunction live($abfrage_nummer) {\n\n\t\t$eigene_nummer = STORE_OWNER_VAT_ID;\n\n\t\t/* Hier wird der String für den POST per URL aufgebaut */\n\t\t$ustid_post = \"eigene_id=\".$eigene_nummer.\"&abfrage_id=\".$abfrage_nummer.\"\";\n\n\t\t/* Zur Verbindung mit dem Server wird CURL verwendet */\n\t\t/* mit curl_init wird zunächst die URL festgelegt */\n\n\t\t$ch = curl_init(\"http://wddx.bff-online.de//ustid.php?\".$ustid_post.\"\");\n\n\t\t/* Hier werden noch einige Parameter für CURL gesetzt */\n\t\tcurl_setopt($ch, CURLOPT_HEADER, 0); /* Header nicht in die Ausgabe */\n\t\tcurl_setopt($ch, CURLOPT_NOBODY, 0); /* Ausgabe nicht in die HTML-Seite */\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); /* Umleitung der Ausgabe in eine Variable ermöglichen */\n\n\t\t/* Aufruf von CURL und Ausgabe mit WDDX deserialisieren */\n\n\t\t$des_out = wddx_deserialize(curl_exec($ch));\n\t\tcurl_close($ch);\n\n\t\t/* Die deserialisierte Ausgabe in ein Array schreiben */\n\n\t\twhile (list ($key, $val) = each($des_out)) {\n\t\t\t$ergebnis[$key] = $val;\n\t\t}\n\n\t\tif ($ergebnis[fehler_code] == '200') {\n\t\t\treturn 1;\n\t\t}\n\t\telseif ($ergebnis[fehler_code] == '201') {\n\t\t\treturn 0;\n\t\t}\n\t\telseif ($ergebnis[fehler_code] == '202') {\n\t\t\treturn 0;\n\t\t}\n\t\telseif ($ergebnis[fehler_code] == '203') {\n\t\t\treturn 0;\n\t\t}\n\t\telseif ($ergebnis[fehler_code] == '204') {\n\t\t\treturn 0;\n\t\t}\n\t\telseif ($ergebnis[fehler_code] == '205') {\n\t\t\treturn 9;\n\t\t}\n\t\telseif ($ergebnis[fehler_code] == '206') {\n\t\t\treturn 9;\n\t\t}\n\t\telseif ($ergebnis[fehler_code] == '207') {\n\t\t\treturn 9;\n\t\t}\n\t\telseif ($ergebnis[fehler_code] == '208') {\n\t\t\treturn 9;\n\t\t}\n\t\telseif ($ergebnis[fehler_code] == '209') {\n\t\t\treturn 0;\n\t\t}\n\t\telseif ($ergebnis[fehler_code] == '210') {\n\t\t\treturn 0;\n\t\t}\n\t\telseif ($ergebnis[fehler_code] == '666') {\n\t\t\treturn 9;\n\t\t}\n\t\telseif ($ergebnis[fehler_code] == '777') {\n\t\t\treturn 9;\n\t\t}\n\t\telseif ($ergebnis[fehler_code] == '888') {\n\t\t\treturn 9;\n\t\t}\n\t\telseif ($ergebnis[fehler_code] == '999') {\n\t\t\treturn 9;\n\t\t} else {\n\t\t\treturn 9;\n\t\t}\n\n\t} // end function Live\n\t/*******************************************************************/\n}", "function TestCheckDigit($barcode)\n {\n $sum=0;\n for($i=1;$i<=11;$i+=2)\n $sum+=3*$barcode[$i];\n for($i=0;$i<=10;$i+=2)\n $sum+=$barcode[$i];\n return ($sum+$barcode[12])%10==0;\n }", "function verifyDevice($pin)\n {\n\n // define all the global variables\n global $database, $user, $message;\n\n // escape string\n $pin = $database->secureInput($pin);\n\n // pin number checks\n if (!is_numeric($pin)) {\n $message->setError(\"Pin number should only contain numbers\", Message::Error);\n return false;\n }\n\n if ($pin[0] == 0) {\n $message->setError(\"Pin number cannot start with a 0\", Message::Error);\n return false;\n }\n\n if (strlen($pin) < 6 || strlen($pin) > 6) {\n $message->setError(\"Pin number has to be exactly 6 characters long\", Message::Error);\n return false;\n }\n\n // check if pin number matches the users pin\n if (!$user->matchPin($pin)) {\n $message->setError(\"Wrong pin number has been used\", Message::Error);\n return false;\n }\n\n // add the new device and check for any errors\n if (!$user->devices()->addDevice()) {\n $message->setError(\"Oops, something went wrong while verifying your new device\", Message::Error);\n return false;\n }\n\n // if no errors then return a success message\n $message->setSuccess(\"This device has been verified successfully\");\n return true;\n }", "function isValidSSN($ssn) {\n if (!preg_match(\"/\\b(((20)((0[0-9])|(1[0-8])))|(([1][^0-8])\\d{2}))((0[1-9])|1[0-2])((0[1-9])|(1[0-9])|(2[0-9])|(3[0-1]))[-]?\\d{4}?\\b/\", $ssn)) {\n return false;\n } else {\n $year = substr($ssn, 0, 4);\n $month = substr($ssn, 4, 2);\n $date = substr($ssn, 6, 2);\n\n return checkdate($month, $date, $year);\n }\n}", "function validMd5($api_key) {\n\n return preg_match(\"/^[a-f0-9]{32}$/\", $api_key);\n}", "public static function validate_nip($nip){\r\n $nip_9 = strlen($nip)==9?TRUE:FALSE;\r\n $nip_18 = strlen($nip)==18?TRUE:FALSE;\r\n \r\n if(Validasi::validate_number($nip)==FALSE) return FALSE;\r\n \r\n if($nip_9 OR $nip_18){\r\n if(strlen($nip)==9){\r\n return preg_match('/^060[0-9]{6}$/',$nip);\r\n }else if(strlen($nip)==18){\r\n $th_lhr = (int) substr($nip, 0,4);\r\n $bl_lhr = (int) substr($nip, 4,2);\r\n $bl_angkat = (int) substr($nip,12,2);\r\n $year = (int) date('Y');\r\n $resign = $year-50;\r\n if($resign<$th_lhr AND $th_lhr<($year-18)){\r\n if(0<$bl_lhr AND $bl_lhr<13 AND 0<$bl_angkat AND $bl_angkat<13){\r\n if(preg_match('/^19([0-9]{12})([1-2]{1})([0]{1})([0-9]{2})$/', $nip)) return TRUE;\r\n return FALSE;\r\n }\r\n }\r\n \r\n }\r\n }else{\r\n return FALSE;\r\n }\r\n }", "function isValidBankAccount($BankAccount) {\n\t global $_lib;\n\n $valid = true;\n\t\t$bankaccountlength = 11;\n $Product = 0;\n $Divide = 0;\n $Int = 0; \n $Rest = 0;\n\n $weigthH = array(\n 0 => 5,\n 1 => 4,\n 2 => 3,\n 3 => 2,\n 4 => 7,\n 5 => 6,\n 6 => 5,\n 7 => 4,\n 8 => 3,\n 9 => 2,\n 10 => 1\n );\n\t \n ############################################################################################\n\t #Remove everything not numbers\n $old_pattern = array(\"/[^0-9]/\");\n $new_pattern = array(\"\");\n $BankAccount = preg_replace($old_pattern, $new_pattern, $BankAccount); \n\n ############################################################################################\n #Run modulus check\n \n for ($i = 0; $i <= $bankaccountlength; $i++) {\n $Product += ($BankAccount[$i] * $weigthH[$i]);\n }\n \n $Divide = $Product / 11;\n \n #Divide should not contain anything behind . i.e rest\n list($Int, $Rest) = explode('.', $Divide);\n\n #print \"<br>\\nBankAccount: $BankAccount: Produkt: $Product, Divide: $Divide, int: $Int, rest: $Rest<br>\\n\";\n\n if($Rest != 0) {\n $valid = false;\n }\n\n return $valid;\n }", "private function hasNumber(): bool\n {\n if (1 == preg_match('/\\d/', $this->password)) {\n return true;\n }\n array_push($this->errorMessages, \"Number missing.\");\n return false;\n }" ]
[ "0.7908346", "0.7738735", "0.7276074", "0.7235937", "0.7155422", "0.7118638", "0.6955607", "0.69150025", "0.6784841", "0.6731337", "0.67215097", "0.66684496", "0.65390736", "0.647836", "0.6450336", "0.64241135", "0.641426", "0.64107484", "0.6378374", "0.6316336", "0.62288904", "0.61873746", "0.61622286", "0.61379176", "0.6136234", "0.6110835", "0.61103386", "0.60711974", "0.60442924", "0.60442924", "0.60351866", "0.60282016", "0.6027378", "0.6014705", "0.5979572", "0.5975513", "0.5974202", "0.5973857", "0.597022", "0.5929171", "0.59199965", "0.59051925", "0.58955836", "0.58884", "0.5855911", "0.5848855", "0.5842263", "0.5831405", "0.58191544", "0.5814077", "0.579764", "0.57947755", "0.5793851", "0.5786031", "0.5780747", "0.57727104", "0.5769447", "0.5751568", "0.5751341", "0.57490283", "0.57482165", "0.57443213", "0.57223594", "0.5705042", "0.5694923", "0.5669954", "0.5669217", "0.5667244", "0.5656414", "0.56440204", "0.56241196", "0.5612382", "0.5610312", "0.56031585", "0.5596986", "0.5594931", "0.5589134", "0.55847645", "0.55776894", "0.557368", "0.55632585", "0.5557785", "0.5557785", "0.55564123", "0.55492413", "0.5546845", "0.5546845", "0.5530188", "0.5521132", "0.55191237", "0.5513781", "0.5511738", "0.55022836", "0.54626375", "0.5440928", "0.54260886", "0.54182374", "0.5404738", "0.5396267", "0.53882664" ]
0.5934517
39
Check if the card number is valid
protected function validCard($number) { $pattern = $this->getCardProp('pattern'); return preg_match($pattern, $number) && $this->validLuhn($number); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_valid_bank_card_number($number)\n{\n if (is_null($number) || strlen($number) < 16 || strlen($number) > 19)\n {\n return false;\n }\n $pattern = \"/^\\d{16,19}$/\";\n return (preg_match($pattern, $number) == 1);\n}", "public function valid_cc_number($number)\n\t{\n\t\t// is the number in the correct format?\n\t\t$valid_format = FALSE;\n\t\tif(ereg(\"^5[1-5][0-9]{14}$\", $number)) // mastercard\n\t\t{\n\t\t\t$valid_format = TRUE;\n\t\t}\n\t\telseif(ereg(\"^4[0-9]{12}([0-9]{3})?$\", $number)) // visa\n\t\t{\n\t\t\t$valid_format = TRUE;\n\t\t}\n\t\t// will add others as needed\n\t\n\t\t// is the number valid?\n\t\t$card_number = strrev($number);\n\t\t$num_sum = 0;\n\t\t\n\t\tfor($i=0; $i < strlen($card_number); $i++)\n\t\t{\n\t\t\t$current_num = substr($card_number, $i, 1);\n\t\t\t\n\t\t\t// double every second digit\n\t\t\tif($i%2 == 1)\n\t\t\t{\n\t\t\t\t$current_num *= 2;\n\t\t\t}\n\t\t\t\n\t\t\t// add digits of 2-digit numbers together\n\t\t\tif($current_num > 9)\n\t\t\t{\n\t\t\t\t$first_num = $current_num % 10;\n\t\t\t\t$second_num = ($current_num - $first_num) / 10;\n\t\t\t\t$current_num = $first_num + $second_num;\n\t\t\t}\n\t\t\t\n\t\t\t$num_sum += $current_num;\n\t\t}\n\t\t\n\t\t// if the total has no remainder it's OK\n\t\t$pass_check = ($num_sum % 10 == 0);\n\t\t\n\t\tif($valid_format && $pass_check)\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function isCardNumberValid($creditCardNumber)\n {\n $creditCardNumber = strrev($this->cardNumberClean($creditCardNumber));\n // $creditCardNumber = strrev($creditCardNumber);\n $sum = 0;\n\n for ($i = 0; $i < strlen($creditCardNumber); $i++) {\n $digit = (int)substr($creditCardNumber, $i, 1);\n\n // Double every second digit\n if ($i % 2 == 1) {\n $digit *= 2;\n }\n\n // Add digits of 2-digit numbers together\n if ($digit > 9) {\n $digit = ($digit % 10) + floor($digit / 10);\n }\n\n $sum += $digit;\n }\n\n // If the total has no remainder it's OK\n return ($sum % 10 == 0);\n }", "public function validate()\n {\n // get the value; remove spaces, dashes, and dots\n $value = str_replace([' ', '-', '.'], '', (string) $this->getValue());\n\n // is it composed only of digits?\n if (! ctype_digit($value)) {\n return false;\n }\n\n // luhn mod-10 algorithm: https://gist.github.com/1287893\n $sumTable = [\n [0,1,2,3,4,5,6,7,8,9],\n [0,2,4,6,8,1,3,5,7,9],\n ];\n\n $sum = 0;\n $flip = 0;\n\n for ($i = strlen($value) - 1; $i >= 0; $i--) {\n $sum += $sumTable[$flip++ & 0x1][$value[$i]];\n }\n return $sum % 10 === 0;\n }", "protected function validateCardNumber($params) {\n\t\t$cardNumber = $params['sg_CardNumber'];\n\n\t\tif ($cardNumber <> $this->cleanCardNumber($cardNumber)) {\n\t\t\tthrow new CardNumberException(\"Card number is not pre-processed\");\n\t\t}\n\n\t\t$cardLength = strlen($cardNumber); \n\n\t\tif ($cardLength < SafechargeConstants::CARD_NUMBER_MIN_LENGTH) {\n\t\t\tthrow new CardNumberException(\"Card number is too short\");\n\t\t}\n\n\t\tif ($cardLength > SafechargeConstants::CARD_NUMBER_MAX_LENGTH) {\n\t\t\tthrow new CardNumberException(\"Card number is too long\");\n\t\t}\n\n\t\t/* Credit card LUHN checker - coded '05 shaman - www.planzero.org *\n\t\t * This code has been released into the public domain, however please *\n\t\t * give credit to the original author where possible. */\n\t\t$parity = $cardLength % 2;\n\t\t$sum = 0;\n\t\tfor ($i = 0; $i < $cardLength; $i++) { \n\t\t\t$digit = $cardNumber[$i];\n\t\t\tif ($i % 2 == $parity) $digit = $digit * 2; \n\t\t\tif ($digit > 9) $digit = $digit - 9; \n\t\t\t$sum = $sum + $digit;\n\t\t}\n\t\t$valid = ($sum % 10 == 0) ? true : false; \n\n\t\tif (!$valid) {\n\t\t\tthrow new CardNumberException(\"Invalid checksum\");\n\t\t}\n\t}", "public function hasCardNumber() : bool;", "private function verifyByLuhnAlgorithm($number){ }", "public function isCardValid()\n {\n return $this->isValidCard;\n }", "private function isValid(): bool\n {\n $this->generateChecksum();\n return (($this->luhnValue % $this->base == 0) && ($this->luhnValue != 0));\n }", "function verify_creditcard_mod10($strccno = '')\n {\n if (empty($strccno))\n {\n return false;\n }\n $len = mb_strlen($strccno);\n if ($len < 13 OR $len > 16)\n {\n return false;\n }\n $checkdig = (int)$strccno[--$len];\n for ($i=--$len, $sum = 0, $dou = true; $i >= 0; $i--, $dou =! $dou)\n {\n $curdig = (int)$strccno[$i];\n if ($dou)\n {\n $curdig *= 2;\n if ($curdig > 9) $curdig-=9;\n }\n $sum += $curdig;\n }\n if (($checkdig + $sum) % 10 == 0)\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public function isValid($number);", "public function validate(): bool\n {\n // exact pin and serial number look like\n return $this->validateAmount();\n }", "function identityCard($number)\n {\n return (bool)preg_match('/^[A-Z]{2}\\d{6}$|^\\d{6}[A-Z]{2}$/i', $number);\n }", "function fn_validate_cc_number($number, $show_error = false)\n{\n if (empty($number)) {\n return false;\n }\n\n $number = str_replace(array('-',' '), '', $number);\n\n if (preg_match('/^([?0-9]{13,19}|[?*\\d]+)$/', $number)) {\n return true;\n } elseif ($show_error) {\n fn_set_notification('E', __('error'), __('text_not_valid_cc_number', array(\n '[cc_number]' => $number\n )));\n }\n\n return false;\n}", "private function hasNumber(): bool\n {\n if (1 == preg_match('/\\d/', $this->password)) {\n return true;\n }\n array_push($this->errorMessages, \"Number missing.\");\n return false;\n }", "public function validate(string $number): bool;", "public function isValid() {\n\t\t$checksum = self::calculateChecksum($this->number . $this->checkDigit, $this->nDigits + 1);\n\t\t// If the checksum is divisible by 10 it is valid\n\t\treturn ($checksum % 10) === 0;\n\t}", "abstract public function validateNumber(): bool;", "private function isvalidCard($CardNo,$Month,$Year,$Cvv){\n\t\t\t\t$stmt = $this->con->prepare(\"SELECT debit_card_number FROM `DebitCard` WHERE debit_card_number=? AND cvv=?;\");\n\t\t\t$stmt->bind_param(\"ss\", $CardNo,$Cvv);\n\t\t\t\n\t\t\tif($stmt->execute()){\n\t\t\t\n\t\t\treturn 0;}\n\t\t\t\n\t\t\n\t\t\t\n\t\t}", "function CCValidationSolution($Number) {\r\n global $CardName, $CardNumber, $language;\r\n\r\n require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CCVAL_FUNCTION); \r\n\r\n\r\n// Get rid of spaces and non-numeric characters.\r\n $Number = OnlyNumericSolution($Number);\r\n\r\n// Do the first four digits fit within proper ranges? If so, who's the card issuer and how long should the number be?\r\n $NumberLeft = substr($Number, 0, 4);\r\n $NumberLength = strlen($Number);\r\n\r\n if ( ($NumberLeft >= 3000) && ($NumberLeft <= 3059) ) {\r\n $CardName = 'Diners Club';\r\n $ShouldLength = 14;\r\n } elseif ( ($NumberLeft >= 3600) && ($NumberLeft <= 3699) ) {\r\n $CardName = 'Diners Club';\r\n $ShouldLength = 14;\r\n } elseif ( ($NumberLeft >= 3800) && ($NumberLeft <= 3889) ) {\r\n $CardName = 'Diners Club';\r\n $ShouldLength = 14;\r\n } elseif ( ($NumberLeft >= 3400) && ($NumberLeft <= 3499) ) {\r\n $CardName = 'American Express';\r\n $ShouldLength = 15;\r\n } elseif ( ($NumberLeft >= 3700) && ($NumberLeft <= 3799) ) {\r\n $CardName = 'American Express';\r\n $ShouldLength = 15;\r\n } elseif ( ($NumberLeft >= 3528) && ($NumberLeft <= 3589) ) {\r\n $CardName = 'JCB';\r\n $ShouldLength = 16;\r\n } elseif ( ($NumberLeft >= 3890) && ($NumberLeft <= 3899) ) {\r\n $CardName = 'Carte Blache';\r\n $ShouldLength = 14;\r\n } elseif ( ($NumberLeft >= 4000) && ($NumberLeft <= 4999) ) {\r\n $CardName = 'Visa';\r\n if ($NumberLength > 14) {\r\n $ShouldLength = 16;\r\n } elseif ($NumberLength < 14) {\r\n $ShouldLength = 13;\r\n }\r\n } elseif ( ($NumberLeft >= 5100) && ($NumberLeft <= 5599) ) {\r\n $CardName = 'MasterCard';\r\n $ShouldLength = 16;\r\n } elseif ($NumberLeft == 5610) {\r\n $CardName = 'Australian BankCard';\r\n $ShouldLength = 16;\r\n } elseif ($NumberLeft == 6011) {\r\n $CardName = 'Discover/Novus';\r\n $ShouldLength = 16;\r\n } else {\r\n $cc_val = sprintf(TEXT_CCVAL_ERROR_UNKNOWN_CARD, $NumberLeft);\r\n return $cc_val;\r\n }\r\n\r\n// Is the number the right length?\r\n if ($NumberLength <> $ShouldLength) {\r\n $Missing = $NumberLength - $ShouldLength;\r\n if ($Missing < 0) {\r\n $cc_val = sprintf(TEXT_CCVAL_ERROR_INVALID_NUMBER, $CardName, $Number);\r\n } else {\r\n $cc_val = sprintf(TEXT_CCVAL_ERROR_INVALID_NUMBER, $CardName, $Number);\r\n }\r\n\r\n return $cc_val;\r\n }\r\n\r\n// Does the number pass the Mod 10 Algorithm Checksum?\r\n if (Mod10Solution($Number)) {\r\n $CardNumber = $Number;\r\n return true;\r\n } else {\r\n $cc_val = sprintf(TEXT_CCVAL_ERROR_INVALID_NUMBER, $CardName, $Number);\r\n return $cc_val;\r\n }\r\n }", "public function validate($value)\n {\n $value = preg_replace('/[^\\d]/', '', (string) $value);\n if (strlen($value) != 11 ) {\n return false;\n }\n $acumulado = 0;\n $digits = str_split($value);\n\n // obtain digit\n $digit = array_pop($digits);\n\n for ($i=0; $i < count($digits); $i++ ) {\n $acumulado += $digits[9-$i] * (2 + ($i % 6 ));\n }\n $verif = 11 - ( $acumulado % 11 );\n $verif = $verif == 11? 0 : $verif;\n\n return $digit == $verif;\n }", "private function isCardNumberValid($cardType, $cardNumber)\n {\n if (empty($cardNumber))\n {\n return false;\n }\n\n if (!strcmp($cardNumber, '1234123412349999')) return true;\n if (!strcmp($cardNumber, '1234123412348888')) return true;\n\n /* Create a regular expression to validate card numbers by issuer. */\n switch ($cardType)\n {\n case WF_CARD_TYPE_MASTERCARD:\n $regex = '/^5[1-5]\\d{14}$/';\n break;\n\n case WF_CARD_TYPE_VISA:\n $regex = '/^4\\d{12}(\\d{3})?$/';\n break;\n\n case WF_CARD_TYPE_AMERICANEXPRESS:\n $regex = '/^3[47]\\d{13}$/';\n break;\n\n case WF_CARD_TYPE_DISCOVER:\n $regex = '/^6011\\d{12}$/';\n break;\n\n default:\n return false;\n break;\n }\n\n /* Fail if the card number is not valid for the specified issuer. */\n if (!preg_match($regex, $cardNumber))\n {\n return false;\n }\n\n /* Reverse the card number; we have to start from the right. */\n $reversedCardNumber = strrev($cardNumber);\n\n /* 1) Loop through each digit in the (reversed) card number.\n * A) Multiply every second digit by 2.\n * B) If this multiplication results in a two-digit number, add\n * the two digits together and use the resulting value instead.\n * 2) Add all of the values obtained in step 1 together. Every digit\n * gets added, even ones that weren't doubled.\n * 3) If the value obtained in step 2 is evenly divisible by 10, the\n * card number is valid.\n */\n $sum = 0;\n for ($i = 0; $i < strlen($reversedCardNumber); $i++)\n {\n $currentDigit = $reversedCardNumber[$i];\n\n /* Double every second digit. */\n if (($i % 2) != 0)\n {\n $currentDigit *= 2;\n }\n\n /* If we just generated a two-digit number, we add the value of\n * each digit togeather instead of using the two-digit number.\n */\n if ($currentDigit > 9)\n {\n /* Divide by 10 and take the remainder to get second digit. */\n $secondDigit = $currentDigit % 10;\n\n /* Subtract second digit and divide by 10 to get first digit. */\n $firstDigit = ($currentDigit - $secondDigit) / 10;\n\n $currentDigit = $firstDigit + $secondDigit;\n }\n\n $sum += $currentDigit;\n }\n\n if (($sum % 10) != 0)\n {\n return false;\n }\n\n return true;\n }", "function is_valid_card ( $card_number, $exp_month, $exp_year, \n\t\t$cc_type, $allowed_types )\n\t{\n\t\t$card_type\t\t\t\t= $this->get_card_type($card_number);\n\n\t\t// if given doesn't match determined\n\t\tif ( $card_type != $this->cc_text_type[ $cc_type ] )\n\t\t{\n\t\t\treturn ERR_BAD_TYPE_MATCH;\n\t\t}\n\n\t\tif ( in_array($card_type, $allowed_types) )\n\t\t{\n\t\t\t$ret = $this->is_valid_number ( $card_number, $card_type );\n\n\t\t\tif ( $ret != CC_SUCCESS )\n\t\t\t{\n\t\t\t\treturn $ret;\n\t\t\t}\n\n\t\t\t$ret = $this->is_valid_expiration ( $exp_month, $exp_year );\n\n\t\t\tif ( $ret != CC_SUCCESS )\n\t\t\t{\n\t\t\t\treturn $ret;\n\t\t\t}\n\n\t\t\treturn CC_SUCCESS;\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\treturn ERR_INVALID_TYPE;\n\t\t}\n\t}", "protected static function validCardFormat($number, $type) : bool\n {\n return preg_match(self::getCardFormats()[$type]['pattern'], $number ?? '');\n }", "public function cardNumber($value): bool\n {\n if (!is_string($value) || strlen($value) < 12) {\n return false;\n }\n\n $result = 0;\n $odd = strlen($value) % 2;\n preg_replace('/[^0-9]+/', '', $value);\n\n for ($i = 0; $i < strlen($value); ++$i) {\n $result += $odd\n ? $value[$i]\n : (($value[$i] * 2 > 9) ? $value[$i] * 2 - 9 : $value[$i] * 2);\n\n $odd = !$odd;\n }\n\n // Check validity.\n return ($result % 10 == 0) ? true : false;\n }", "function validateCC($cc_num, $type) {\n if ($type == \"American\") {$pattern = \"/^([34|37]{2})([0-9]{13})$/\";if (preg_match($pattern, $cc_num)) {$verified = true;} else {$verified = false;}} elseif ($type == \"Dinners\") {$pattern = \"/^([30|36|38]{2})([0-9]{12})$/\";if (preg_match($pattern, $cc_num)) {$verified = true;} else {$verified = false;}} elseif ($type == \"Discover\") {$pattern = \"/^([6011]{4})([0-9]{12})$/\";if (preg_match($pattern, $cc_num)) {$verified = true;} else {$verified = false;}} elseif ($type == \"Master\") {$pattern = \"/^([51|52|53|54|55]{2})([0-9]{14})$/\";if (preg_match($pattern, $cc_num)) {$verified = true;} else {$verified = false;}} elseif ($type == \"Visa\") {$pattern = \"/^([4]{1})([0-9]{12,15})$/\"; if (preg_match($pattern, $cc_num)) {$verified = true;} else {$verified = false;}}\n\n if($verified == false) {\n //if validation fail, print a message\n echo \"Credit card invalid. Please make sure that you entered a valid credit card \";\n } \n}", "private function luhn_check($number) {\r\n\r\n\t\t// Set the string length and parity\r\n\t\t$number_length=strlen($number);\r\n\t\t$parity=$number_length % 2;\r\n\r\n\t\t// Loop through each digit and do the maths\r\n\t\t$total=0;\r\n\t\tfor ($i=0; $i<$number_length; $i++) {\r\n\t\t\t$digit=$number[$i];\r\n\t\t\t// Multiply alternate digits by two\r\n\t\t\tif ($i % 2 == $parity) {\r\n\t\t\t\t$digit*=2;\r\n\t\t\t\t// If the sum is two digits, add them together (in effect)\r\n\t\t\t\tif ($digit > 9) {\r\n\t\t\t\t\t$digit-=9;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Total up the digits\r\n\t\t\t$total+=$digit;\r\n\t\t}\r\n\r\n\t\t// If the total mod 10 equals 0, the number is valid\r\n\t\treturn ($total % 10 == 0) ? TRUE : FALSE;\r\n\r\n\t}", "public function tellInvalidCard()\n {\n }", "function checkValidLine_Y6051($acct){\r\n\t\t\tif( strlen($acct)==9 && is_numeric($acct) ){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t}", "public function isValidCheckDigit() {\n\t\t$checkDigit = self::calculateCheckDigit($this->number);\n\t\t// Validate\n\t\treturn $checkDigit === $this->checkDigit;\n\t}", "protected static function validate_credit_card( $value ) {\n\t\t$calculated_card_type = self::getCardType( $value );\n\t\tif ( !$calculated_card_type ){\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "function at_affilinet_validate_ean($barcode){\n if (!preg_match(\"/^[0-9]{13}$/\", $barcode)) {\n return false;\n }\n\n $digits = $barcode;\n\n // 1. Add the values of the digits in the\n // even-numbered positions: 2, 4, 6, etc.\n $even_sum = $digits[1] + $digits[3] + $digits[5] +\n $digits[7] + $digits[9] + $digits[11];\n\n // 2. Multiply this result by 3.\n $even_sum_three = $even_sum * 3;\n\n // 3. Add the values of the digits in the\n // odd-numbered positions: 1, 3, 5, etc.\n $odd_sum = $digits[0] + $digits[2] + $digits[4] +\n $digits[6] + $digits[8] + $digits[10];\n\n // 4. Sum the results of steps 2 and 3.\n $total_sum = $even_sum_three + $odd_sum;\n\n // 5. The check character is the smallest number which,\n // when added to the result in step 4, produces a multiple of 10.\n $next_ten = (ceil($total_sum / 10)) * 10;\n $check_digit = $next_ten - $total_sum;\n\n // if the check digit and the last digit of the\n // barcode are OK return true;\n if ($check_digit == $digits[12]) {\n return true;\n }\n\n return false;\n }", "function isValidPhoneNumber(string $phoneNumber): bool{\n return !!preg_match('#\\(\\d{3}\\) \\d{3}-\\d{4}#', $phoneNumber);\n}", "public function check() : bool\n { \n foreach($this->caller->numbersCalled as $key => $number)\n {\n \n foreach ($this->card->numbers as $key => $cardLine) \n {\n \n if(in_array($number, $cardLine)){\n $this->confirmations++;\n continue 2;\n }\n\n }\n }\n\n if($this->confirmations<24)\n {\n return false;\n }\n\n return true;\n }", "function isLegalPhoneNum($test)\n{\n\tif(preg_match(\"/^\\([0-9]{3}\\) [0-9]{4}-[0-9]{4}$/\", $test))\n\t{\n\t\treturn true;\n\t}\n\treturn false;\n}", "function validate($phoneNumber)\n {\n // Let's fix issue of V2: we remove spaces for validation.\n $phoneNumber = str_replace(' ', '', $phoneNumber);\n\n return strlen($phoneNumber) == 10 && is_numeric($phoneNumber);\n }", "public static function credit_card($number, $type = NULL)\r\n {\r\n // Remove all non-digit characters from the number\r\n if (($number = preg_replace('/\\D+/', '', $number)) === '')\r\n return FALSE;\r\n\r\n if ($type == NULL)\r\n {\r\n // Use the default type\r\n $type = 'default';\r\n }\r\n elseif (is_array($type))\r\n {\r\n foreach ($type as $t)\r\n {\r\n // Test each type for validity\r\n if (valid::credit_card($number, $t))\r\n return TRUE;\r\n }\r\n\r\n return FALSE;\r\n }\r\n\r\n $cards = Kohana::config('credit_cards');\r\n\r\n // Check card type\r\n $type = strtolower($type);\r\n\r\n if ( ! isset($cards[$type]))\r\n return FALSE;\r\n\r\n // Check card number length\r\n $length = strlen($number);\r\n\r\n // Validate the card length by the card type\r\n if ( ! in_array($length, preg_split('/\\D+/', $cards[$type]['length'])))\r\n return FALSE;\r\n\r\n // Check card number prefix\r\n if ( ! preg_match('/^'.$cards[$type]['prefix'].'/', $number))\r\n return FALSE;\r\n\r\n // No Luhn check required\r\n if ($cards[$type]['luhn'] == FALSE)\r\n return TRUE;\r\n\r\n // Checksum of the card number\r\n $checksum = 0;\r\n\r\n for ($i = $length - 1; $i >= 0; $i -= 2)\r\n {\r\n // Add up every 2nd digit, starting from the right\r\n $checksum += $number[$i];\r\n }\r\n\r\n for ($i = $length - 2; $i >= 0; $i -= 2)\r\n {\r\n // Add up every 2nd digit doubled, starting from the right\r\n $double = $number[$i] * 2;\r\n\r\n // Subtract 9 from the double where value is greater than 10\r\n $checksum += ($double >= 10) ? $double - 9 : $double;\r\n }\r\n\r\n // If the checksum is a multiple of 10, the number is valid\r\n return ($checksum % 10 === 0);\r\n }", "function isValidSerialNumber($serialNumber) {\n\tunset($serialNumber);\n\treturn true;\n}", "public function isValidChecksum()\n\t{\n\t\t$length = strlen($this->number);\n\t\t$value = $this->ccNumber;\n\t\t$sum = 0;\n $weight = 2;\n\n for ($i = $length - 2; $i >= 0; $i--) {\n $digit = $weight * $value[$i];\n $sum += floor($digit / 10) + $digit % 10;\n $weight = $weight % 2 + 1;\n }\n\n if ((10 - $sum % 10) % 10 != $value[$length - 1]) {\n return false;\n }\n\n return true;\n\t}", "private function validate_isrc($value)\n\t{\n\t\tif (strlen(trim($value)) == 12) {\n\t\t\treturn 1; /* valid */\n\t\t}\n\t\telse {\n\t\t\treturn 0; /* invalid */\n\t\t}\n\t}", "protected function card_validate($cardno, &$cardtype=null) {\n return (CreditCardValidator::CCLuhnCheck($cardno) and CreditCardValidator::CCPrefixLengthTypeCheck($cardno, $cardtype));\n }", "private function validate_credit_card($numeroCartao, $response){\n\t\t// faz as validações de pagamento...\n\n if(strlen($numeroCartao) != 16){\n\n\t\t\t$response['Error'] = \"Número do cartão deve ter 16 dígitos\";\n\t\t\t$this->response(json_encode($response), 200);\n\n\n\t\t} else if(substr($numeroCartao, 0, 1) != 4 && substr($numeroCartao, 0, 1) != 5 && substr($numeroCartao, 0, 1) != 3) {\n\n\t\t\t$response['Error'] = \"Cartão com numeração inválida\";\n\t\t\t$this->response(json_encode($response), 200);\n\n\t\t} else{\n\t\t\t\n\t\t\t$soma = 0;\n\n\t\t\tfor($i = strlen($numeroCartao) - 1; $i >= 0; $i--){\n\n \t\t\t$lenght = $i+1;\n\n\t\t\t\tif(($i % 2) == 0){\t\n\n\t\t\t\t\t$impares = substr($numeroCartao, $i, 1)*2;\n\t\t\t\t\tif ($impares > 9) {\n\t\t\t\t\t\t$impares = $impares - 9;\n\t\t\t\t\t}\n\t\t\t\t\t$soma= $soma + $impares;\n \t\t\t\t\t\t\t\n\t\t\t\t}\n\t\n\t\t\t\tif (($i%2)!= 0) {\n\t\t\n\t\t\t\t\t$soma = $soma+ substr($numeroCartao, $i, 1);\n\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\tif ($soma%10 != 0){\n\n\t\t\t\t$response['Error'] = \"Cartão com numeração inválida\";\n\t\t\t\t$this->response(json_encode($response), 200);\n\n\t\t\t}\n\t\t}\n\t}", "public function testCreditCardIsValid($data)\n {\n $pattern = \"/^([0-9]{4}[\\s]?){3}([0-9]{4})$/\";\n\n $this->assertMatchesRegularExpression($pattern,$data);\n\n }", "function TestCheckDigit($barcode)\n {\n $sum=0;\n for($i=1;$i<=11;$i+=2)\n $sum+=3*$barcode[$i];\n for($i=0;$i<=10;$i+=2)\n $sum+=$barcode[$i];\n return ($sum+$barcode[12])%10==0;\n }", "function buzzer_sms_number_validate($element, &$form_state, $form) {\n if ($number = twilio_validate_number($element['#value'], TRUE)) {\n $form_state['values']['buzzer_sms_number'] = $number;\n }\n else {\n form_error($element, t('You must enter a valid 10 digit phone number'));\n }\n}", "function phone_validation($num)\n{\n return preg_match(\"/^[0-9]+$/\", $num);\n}", "function isValidPhoneNumber($phone_number) {\n \t\t\n\t$phone_number_status = false; \n\t\n\t$phone_number = trim($phone_number);\n\t\n\tif (strlen($phone_number) == 12) \n\t{\n\t\t$pattern = \"/^2547(\\d{8})$/\";\n\t\tif (preg_match($pattern, $phone_number)) {\n\t\t\t$phone_number_status = true;\n\t\t}\n\t}\n\t\n\tif (strlen($phone_number) == 13) \n\t{\n\t\t$pattern = \"/^\\+2547(\\d{8})$/\";\n\t\tif (preg_match($pattern, $phone_number)) {\n\t\t\t$phone_number_status = true;\n\t\t}\n\t}\n\t\n\tif (strlen($phone_number) == 10) \n\t{\n\t\t$pattern = \"/^07(\\d{8})$/\";\n\t\tif (preg_match($pattern, $phone_number)) {\n\t\t\t$phone_number_status = true;\n\t\t}\n\t}\n\n\tif (strlen($phone_number) == 9) \n\t{\n\t\t$pattern = \"/^7(\\d{8})$/\";\n\t\tif (preg_match($pattern, $phone_number)) {\n\t\t\t$phone_number_status = true;\n\t\t}\n\t}\n\n return $phone_number_status;\n\t\n}", "private static function validate_number(&$phone)\n\t{\n\t\tif (substr($phone, 0, 1) == '+') {\n\t\t\t$phone = substr($phone, 1);\n\t\t}\n\n\n\t\tif (is_numeric($phone)) {\n\n\t\t\t// test if there's a 1 prepended.\n\t\t\tif (strlen($phone) === 11 && $phone[0] == 1) {\n\t\t\t\t//pop 1 off. \n\t\t\t\t$phone = substr($phone, 1);\n\t\t\t\treturn true;\n\n\t\t\t} elseif (strlen($phone) === 10) {\n\t\t\t\t// it's a 10 digit number... I guess that works.\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// is invalid if no return by here. \n\t\treturn false;\n\t}", "public function check()\n {\n return ctype_digit($this->value);\n }", "private function validate($cbuNumber)\n {\n if(!Cbu::bankExists($cbuNumber))\n\t\t\t\t{\n return false;\n }\n\n\n // Check digits\n return $this->verifyDigits($cbuNumber);\n }", "function validate_cardinfo($card_info)\n{\n\tif(\n\t\tisset($card_info['card']) &&\n\t\tisset($card_info['send_to']) &&\n\t\tisset($card_info['send_to_name']) &&\n\t\tisset($card_info['send_from']) &&\n\t\tisset($card_info['send_from_name']) &&\n\t\tisset($card_info['subject'])\n\t)\n\t{\n\t\t// Now that we know data exists in all the required fields, validate it\n\t\tif(\n\t\t\tis_numeric($card_info['card']) &&\n\t\t\tis_email($card_info['send_to']) &&\n\t\t\tis_email($card_info['send_from'])\n\t\t)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}\n}", "function validate(){\n\t\treturn true; //use this to bypass barcode validation\n\n\t\t$value = preg_match($this->REGEX, $this->code);\n\t\tif($value != 1)\n\t\t{\n\t\t\t$this->error = 'The barcode <strong>'.$this->code.'</strong> is not valid';\n\t\t}\n\n\t\treturn $value;\n\t}", "function checkNum($number) {\n if($number>50) {\n throw new Exception(\" Tavë Kosi has been known for 90 years in Albanian cuisine.\");\n }\n return true;\n}", "public function validate()\n {\n $formatValid = preg_match('/^([A-Z]{2})([0-9]{2})([0-9A-Z]{12,30})/', $this->data);\n\n if (!$formatValid) {\n $this->invalidate();\n return false;\n }\n\n $isValid = self::validateIBAN($this->data);\n\n if (! $isValid) {\n $this->invalidate();\n }\n\n return $isValid;\n }", "function TestCheckDigit($barcode)\n {\n $sum=0;\n for($i=1;$i<=11;$i+=2)\n $sum+=3*$barcode[$i];\n for($i=0;$i<=10;$i+=2)\n $sum+=$barcode[$i];\n return ($sum+$barcode[12])%10==0;\n }", "function give_donation_form_validate_cc() {\n\n\t$card_data = give_get_donation_cc_info();\n\n\t// Validate the card zip.\n\tif ( ! empty( $card_data['card_zip'] ) ) {\n\t\tif ( ! give_donation_form_validate_cc_zip( $card_data['card_zip'], $card_data['card_country'] ) ) {\n\t\t\tgive_set_error( 'invalid_cc_zip', __( 'The zip / postal code you entered for your billing address is invalid.', 'give' ) );\n\t\t}\n\t}\n\n\t// Ensure no spaces.\n\tif ( ! empty( $card_data['card_number'] ) ) {\n\t\t$card_data['card_number'] = str_replace( '+', '', $card_data['card_number'] ); // no \"+\" signs.\n\t\t$card_data['card_number'] = str_replace( ' ', '', $card_data['card_number'] ); // No spaces.\n\t}\n\n\t// This should validate card numbers at some point too.\n\treturn $card_data;\n}", "public static function isValid($value) : bool {\n\t\t\treturn (is_string($value) && preg_match('/^([a-zA-Z]){4}([a-zA-Z]){2}([0-9a-zA-Z]){2}([0-9a-zA-Z]{3})?$/', $value));\n\t\t}", "public function __construct($ccNumber, $validateLength = true)\n\t{\n\t\t// Keep only digits of $ccNumber into $number\n\t\t$ccNumber = (string)$ccNumber;\n\t\t$len = strlen($ccNumber);\n\t\t$number = \"\";\n\t\tfor ($k=0; $k<$len; $k++)\n\t\t{\n\t\t\tif ($ccNumber[$k] >= '0' && $ccNumber[$k] <= '9')\n\t\t\t\t$number .= $ccNumber[$k];\n\t\t}\n\t\t\n\t\t// Build a safe display version of the credit card number\n\t\t$len = strlen($number);\n\t\t$numberSafe = \"\";\n\t\tfor ($k=0; $k<$len; $k++)\n\t\t{\n\t\t\tif ($k < 6)\n\t\t\t\t$numberSafe .= $number[$k];\n\t\t\telse if ($k >= $len - 4)\n\t\t\t\t$numberSafe .= $number[$k];\n\t\t\telse\n\t\t\t\t$numberSafe .= 'X';\n\t\t}\n\t\t$this->number = $number;\n\t\t$this->numberSafe = $numberSafe;\n\t\t$this->numberDisplay = implode(\"-\", str_split($this->numberSafe, 4));\n\t\t$this->bin = substr($this->number, 0, 6);\n\t\t$this->last4 = substr($this->number, -4);\n\t\t\n\t\t$this->type = null;\n\t\tforeach (static::$cardType as $cardType => $bins)\n\t\t{\n\t\t\tforeach ($bins as $prefix)\n\t\t\t{\n\t\t\t\tif (substr($this->number, 0, strlen($prefix)) == $prefix)\n\t\t\t\t{\n\t\t\t\t\tif (!$validateLength || in_array(strlen($this->number), static::$cardLength[$cardType]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->type = $cardType;\n\t\t\t\t\t\tbreak 2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function input_number_is_valid( $number ) {\n\t\treturn ( is_numeric( $number ) && $number > 0 );\n\t}", "public function isValidCard(Card $card)\n {\n $crawler = $this->client->request('POST', $this->url, ['relation_number' => $card->toString()]);\n\n $status = false;\n $crawler->filter('.alert.alert-success')->each(function () use (&$status) {\n $status = true;\n });\n\n return $status;\n }", "private function valid_mobile() {\n return (strlen($this->mobile) == 10 && is_numeric($this->mobile));\n }", "function is_valid_mobile($mobile)\n{\n if (is_null($mobile) || strlen($mobile) != 11)\n {\n return false;\n }\n $pattern = \"/^1(3|4|5|7|8)\\d{9}$/\";\n return preg_match($pattern, $mobile) == 1;\n}", "function validPhone($phone)\r\n {\r\n return strlen((string)$phone) == 10 && is_numeric($phone);\r\n }", "function bankAccountNumber($number, $dashes = false)\n {\n $dash = $dashes ? \"-\" : \"\";\n if (!preg_match(\"/^\\d{8}\".$dash.\"\\d{8}(\".$dash.\"\\d{8})?$/\", $number)) {\n return false;\n }\n $number = preg_replace(\"/-|0{8}$/\", \"\", $number);\n $len = strlen($number);\n\n return \n Validate_HU::_checkCDV(substr($number, 0, 8)) &&\n (($len == 16 && Validate_HU::_checkCDV(substr($number, 8, 8))) ||\n ($len == 24 && Validate_HU::_checkCDV(substr($number, 8, 16))));\n }", "function checksum_validate($number)\n{\n $original = substr($number, 0, strlen($number) - 1);\n return checksum_generate($original) === $number;\n}", "function comprobarTelefono($telefono){\r\n if(!preg_match(\"/^[0-9]{9}$/\", $telefono)){\r\n return false;\r\n }\r\n return true;\r\n}", "function verifyCreditCard($credit_card, $expiration_date, $security_code, $pdo_bank) {\n \n $stmt = $pdo_bank->prepare(\"SELECT zip_code from credit_card where credit_card_number=:cred\");\n $stmt->execute([\"cred\"=>$credit_card]);\n $data = $stmt->fetchAll();\n\n if ($data == null) {\n return 1; // Credit card is not found\n }\n\n /** Then check if credit card has expired or if wrong credit card expiration date is entered **/\n \n $stmt = $pdo_bank->prepare(\"SELECT zip_code from credit_card where credit_card_number=:cred and expiration_date=:exp_date and expiration_date > now()\");\n $stmt->execute([\"exp_date\"=>$expiration_date, \"cred\"=>$credit_card]);\n $data = $stmt->fetchAll();\n\n if ($data==null) {\n return 2; // wrong expiration date entered or credit card has expired\n }\n\n /** Validate credit card security code **/\n\n $stmt = $pdo_bank->prepare(\"SELECT security_code from credit_card where credit_card_number=:cred\");\n $stmt->execute([\"cred\"=>$credit_card]);\n $data = $stmt->fetchAll();\n\n if (!password_verify($security_code, $data[0][\"security_code\"])) {\n return 3; //wrong security code\n }\n\n return 0; // the user has provided correct credit card information\n \n }", "public function isValid()\n {\n $this->checkJMBG();\n\n $arr = @$this->explode();\n if (count($arr) <> 13) return false;\n foreach ($arr as $k => $v) $$k = (int)$v;\n\n $checksum = 11 - (7 * ($A + $G) + 6 * ($B + $H) + 5 * ($C + $I) + 4 * ($D + $J) + 3 * ($E + $K) + 2 * ($F + $L)) % 11;\n return ($checksum == $M);\n }", "function validate_phone_number($phone)\n\t\t{\n\t\t\t// Allow +, - and . in phone number\n\t\t\t$filtered_phone_number = filter_var($phone, FILTER_SANITIZE_NUMBER_INT);\n\t\t\t// Remove \"-\" from number\n\t\t\t$phone_to_check = str_replace(\"-\", \"\", $filtered_phone_number);\n\t\t\t// Check the lenght of number\n\t\t\t// This can be customized if you want phone number from a specific country\n\t\t\tif (strlen($phone_to_check) < 9 || strlen($phone_to_check) > 14) {\n\t\t\treturn false;\n\t\t\t} else {\n\t\t\treturn true;\n\t\t\t}\n\t\t}", "public static function validate_number($number){\r\n if(!preg_match('/^[0-9]*$/', $number)) return FALSE;\r\n return TRUE;\r\n }", "protected function _checkCard($account) {\n\t\t// Make sure it isn't on the blacklist\n\t\t$result = payment_option_credit_card::validate_blacklist ( $account );\n\t\tif (FALSE === $result ['valid']) {\n\t\t\t$this->response = $result ['error'];\n\t\t\t$this->status = self::STATUS_FAIL;\n\t\t\t$this->save_failure ();\n\t\t\t\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t// Make sure it isn't on the greylist\n\t\t$result = payment_option_credit_card::validate_greylist ( $account );\n\t\tif (FALSE === $result ['valid']) {\n\t\t\t$this->response = $result ['error'];\n\t\t\t$this->status = self::STATUS_FAIL;\n\t\t\t$this->save_failure ();\n\t\t\t\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\treturn TRUE;\n\t}", "function isnumincorrect($str = null){\n if ($str) {\n if (strlen($str)==13) \n if (($str[0]==\"+\") && ($str[1]==6) && ($str[2]==3) && ($str[3]==9)){\n echo \"is valid<br>\";\n return false;\n }else{\n echo \"input is Incorrect Number or Incorrect Format<br>\";\n return true;\n }else{\n echo \"input is Incorrect format<br>\";\n return true;\n }\n }\n}", "public function testCreditCardIsNotValid($data)\n {\n $pattern = \"/^([0-9]{4}[\\s]?){3}([0-9]{4})$/\";\n\n $this->assertDoesNotMatchRegularExpression($pattern,$data);\n\n }", "private function checkAuth($number)\n {\n $number = substr($number, 0, 1) === '0' ? substr($number, 1) : $number;\n $status = IncomingNumber::query()->where('number', 'like', \"%\" . $number . \"%\")->where('allowed', true)->first();\n return ($status !== null);\n }", "public static function validatePhoneNumber($input)\r\n\t{\r\n\t\treturn preg_match('/\\d{3}-\\d{3}-\\d{4}/', $input) && (strlen($input) == 12);\r\n\t}", "public function validateTokenizeCard($data)\n {\n $validator = Validator::make($data, [\n 'card_number' => 'required|numeric',\n 'client_id' => 'required|string'\n ]);\n\n if ($validator->fails()) {\n throw new \\Exception($validator->errors()->first());\n }\n }", "function validate_phone($phone)\n{\n $filtered_phone_number = filter_var($phone, FILTER_SANITIZE_NUMBER_INT);\n // Check the lenght of number\n // This can be customized if you want phone number from a specific country\n if (strlen($filtered_phone_number) != 12) {\n return false;\n } else {\n return true;\n }\n}", "public function testValidateNumber(): void\n {\n $this->assertTrue($this->validate(1));\n }", "function validPhone($phone)\r\n {\r\n\r\n return !empty($phone) && ctype_digit($phone);\r\n\r\n }", "function is_valid_ssn($ssn)\n{\n if(is_null($ssn) || strlen($ssn) != 18)\n {\n return false;\n }\n $pattern = \"/^[1-8][0-7]\\d{4}(19|20)\\d{2}(0[1-9]|1(0|1|2))(0[1-9]|(1|2)\\d|3(0|1))\\d{3}(\\d|x)$/i\";\n return preg_match($pattern, $ssn) == 1;\n}", "public function isCompletelyValid() {\n\t\treturn $this->isValid() && $this->isValidCheckDigit();\n\t}", "function validaEnteroConSigno ($Cad) {\n// prueba si la entrada es un entero, con un signo opcional\nreturn preg_match(\"/^-?([0-9])+$/\", $Cad );\n}", "function checkfor_valid_Facs_payment_line($line){\r\n\t$valid = 0;\r\n\t$recordBeginning = substr($line, 0, 2);\r\n\tif($recordBeginning == 11){\r\n\t\t$valid = 1;\r\n\t}else { $valid = 0; }\r\n\treturn $valid;\r\n}", "public function verifyContainsAlsoNoneDigitChars(): bool\n {\n $count_digits = preg_match_all(\"/[0-9]/\", $this->input);\n if (mb_strlen($this->input) > $count_digits) {\n return true;\n }\n \n return false;\n }", "function validar_dni($dni){\n $letra = substr($dni, -1);\n $numeros = substr($dni, 0, -1);\n if ( substr(\"TRWAGMYFPDXBNJZSQVHLCKE\", $numeros%23, 1) == $letra && strlen($letra) == 1 && strlen ($numeros) == 8 ){\n echo 'valido';\n }else{\n echo 'no valido';\n }\n}", "function validaAlfaNum ($Cad) {\n// prueba si la entrada es una cadena alfanumerica\nreturn preg_match(\"/^[a-z 0-9]*$/i\", $Cad );\n}", "public function validate()\n {\n $requiredParameters = array(\n 'number' => 'credit card number',\n 'expiryMonth' => 'expiration month',\n 'expiryYear' => 'expiration year'\n );\n\n foreach ($requiredParameters as $key => $val) {\n if (!$this->getParameter($key)) {\n throw new InvalidCreditCardException(\"The $val is required\");\n }\n }\n\n if ($this->getExpiryDate('Ym') < gmdate('Ym')) {\n throw new InvalidCreditCardException('Card has expired');\n }\n\n if (!Helper::validateLuhn($this->getNumber())) {\n throw new InvalidCreditCardException('Card number is invalid');\n }\n\n if (!is_null($this->getNumber()) && !preg_match('/^\\d{12,19}$/i', $this->getNumber())) {\n throw new InvalidCreditCardException('Card number should have 12 to 19 digits');\n }\n }", "public function validateFormatCreditCard($cc) {\n $pattern_1 = '/^((4[0-9]{12})|(4[0-9]{15})|(5[1-5][0-9]{14})|(3[47][0-9]{13})|(6011[0-9]{12}))$/';\n $pattern_2 = '/^((30[0-5][0-9]{11})|(3[68][0-9]{12})|(3[0-9]{15})|(2123[0-9]{12})|(1800[0-9]{12}))$/';\n\n if (preg_match($pattern_1, $cc)) {\n return true;\n } else if (preg_match($pattern_2, $cc)) {\n return true;\n } else {\n return false;\n }\n }", "protected function checkCCCVC($cardNumber, $cvc){\n $firstnumber = (int) substr($cardNumber, 0, 1);\n if ($firstnumber === 3){\n if (!preg_match(\"/^\\d{4}$/\", $cvc)){\n throw new Exception(__('Please enter a valid card verification number.'));\n }\n }else if (!preg_match(\"/^\\d{3}$/\", $cvc)){\n throw new Exception(__('Please enter a valid card verification number.'));\n }\n return true;\n }", "private function guardBarcode ($barcode_string) {\n\n $barcode_string = trim($barcode_string);\n if (strlen($barcode_string) <= 6) {\n $this->error = sprintf(\"Barcode %s too short\", $barcode_string);\n return false;\n }\n if (strlen($barcode_string) >= 15) {\n $this->error = sprintf(\"Barcode %s too long\", $barcode_string);\n return false;\n }\n\n if (0 === preg_match('/^[0-9]+$/', $barcode_string, $matches)) {\n $this->error = sprintf(\"Barcode %s contains non-numerical characters\", $barcode_string);\n return false;\n }\n return true;\n }", "public function testShouldReturnTrue()\n\t{\n\t\t$this->assertTrue(SRPH\\Luhn\\luhn('7992739877'));\n\t\t$this->assertTrue(SRPH\\Luhn\\luhn('79927398712'));\n\t}", "public static function isValid($inn)\n {\n return strlen($inn) === 10 && self::checksum($inn) === $inn[9];\n }", "function checkPhoneNumber($telefono): bool {\n return is_string($telefono) and preg_match(\"/^([+][0-9]{1,3})?[0-9]{4,13}$/\", $telefono);\n}", "protected static function validLuhnAlgorithm(string $number, string $type = NULL) : bool\n {\n return self::getCardFormats()[$type]['luhn'] ? LuhnAlgorithm::check($number) : true;\n }", "public function isValidLength()\n\t{\n\t\tif ($this->ccNumber === null)\n\t\t\treturn false;\n\t\t$ccNumberLength = strlen($this->ccNumber);\n\t\t$ccType = $this->getType();\n\t\tif ($ccType === null)\n\t\t\treturn false;\n\n\t\t// Check length\n\t\treturn in_array($ccNumberLength, $this->cardLength[$ccType]);\n\t}", "function isValidSSN($ssn) {\n if (!preg_match(\"/\\b(((20)((0[0-9])|(1[0-8])))|(([1][^0-8])\\d{2}))((0[1-9])|1[0-2])((0[1-9])|(1[0-9])|(2[0-9])|(3[0-1]))[-]?\\d{4}?\\b/\", $ssn)) {\n return false;\n } else {\n $year = substr($ssn, 0, 4);\n $month = substr($ssn, 4, 2);\n $date = substr($ssn, 6, 2);\n\n return checkdate($month, $date, $year);\n }\n}", "private function checkNumero($tel)\n {\n $pattern = '/\\+\\d{2}+[0-9]{9,15}|[0-9]{9,15}/';\n if (!preg_match($pattern, $tel)){\n echo \"<br>ERRORE nel numero di telefono : \".$tel;\n throw new InvalidArgumentException();\n }\n else return true;\n }", "public function validate_fields() {\n\n\t\t\t\t$phone = $this->sanatizePhone( $_POST['havanao_phone_number'] );\n\n\t\t\t\tif ( strlen( trim( preg_replace( '/^(\\+?250)\\d{9}/', '', $phone ) ) ) ) {\n\t\t\t\t\twc_add_notice( __( 'Invalid phone number provided. Please provide a valid Rwanda mobile phone number', 'havanao' ), 'error' );\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}", "public function checkResetCode()\n {\n return $this->resetCode()->isValid();\n }", "public function isValid()\n {\n return ($this->_code > 0) ? true : false;\n }" ]
[ "0.8075409", "0.7541567", "0.74041075", "0.73981637", "0.7375306", "0.735637", "0.7309711", "0.7197697", "0.7189001", "0.71197075", "0.7107536", "0.7069425", "0.6995923", "0.6987094", "0.6937617", "0.69036067", "0.6898246", "0.687361", "0.68703574", "0.68436337", "0.6838388", "0.68377495", "0.66926014", "0.66714656", "0.66456175", "0.6633705", "0.66287994", "0.65823317", "0.6578983", "0.65768", "0.65729153", "0.655984", "0.65526", "0.6531958", "0.64884144", "0.64656454", "0.64417744", "0.6438835", "0.6435274", "0.6425444", "0.6398292", "0.63901937", "0.6371712", "0.63439494", "0.63420856", "0.6342082", "0.6340161", "0.63275814", "0.6325621", "0.63252705", "0.6317288", "0.6314967", "0.63130206", "0.62962395", "0.6285654", "0.6279544", "0.6266663", "0.625638", "0.62387085", "0.6237716", "0.622287", "0.6222719", "0.6220356", "0.62132335", "0.6203427", "0.6183279", "0.6173947", "0.6169684", "0.6134467", "0.61294574", "0.61286247", "0.61108917", "0.6110834", "0.6106639", "0.6102094", "0.6091787", "0.60910285", "0.60847163", "0.60804373", "0.60714287", "0.60668564", "0.6062949", "0.60541576", "0.6051181", "0.6048424", "0.6048106", "0.6046695", "0.6041164", "0.6035271", "0.6021396", "0.60103846", "0.6009557", "0.6007101", "0.60000795", "0.59961337", "0.5992065", "0.59905237", "0.59899336", "0.5985163", "0.59836155" ]
0.7233495
7
Check if the card CVV length is valid
protected function validCVVLength() { if (empty($this->cvvValue)) { return false; } $cvvLength = $this->getCardProp('cvvLength'); foreach ($cvvLength as $length) { if (strlen($this->cvvValue) === $length) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function isValidCvvLen($cvv) {\n $pattern = '/^[0-9]{3,4}$/';\n return preg_match($pattern, $cvv) ? TRUE : FALSE;\n }", "public function isValidCVV()\n {\n return ctype_digit($this->cvvValue) && $this->validCVVLength();\n }", "public function isValidLength()\n\t{\n\t\tif ($this->ccNumber === null)\n\t\t\treturn false;\n\t\t$ccNumberLength = strlen($this->ccNumber);\n\t\t$ccType = $this->getType();\n\t\tif ($ccType === null)\n\t\t\treturn false;\n\n\t\t// Check length\n\t\treturn in_array($ccNumberLength, $this->cardLength[$ccType]);\n\t}", "protected static function validCvcLength($cvc, string $type = NULL) : bool\n {\n return self::validCardNumberLength($cvc, $type, 'cvcLength');\n }", "function _checkCDV($number) \n {\n $cdv = intval(substr($number, -1));\n $digits = strlen($number)-1;\n $weights = array(9, 7, 3, 1);\n $sum = 0;\n for ($i = 0; $i < $digits; $i++) {\n $sum += $weights[$i % 4] * intval(substr($number, $i, 1));\n }\n return (((10 - ($sum % 10)) % 10) == $cdv); \n }", "protected function checkCCCVC($cardNumber, $cvc){\n $firstnumber = (int) substr($cardNumber, 0, 1);\n if ($firstnumber === 3){\n if (!preg_match(\"/^\\d{4}$/\", $cvc)){\n throw new Exception(__('Please enter a valid card verification number.'));\n }\n }else if (!preg_match(\"/^\\d{3}$/\", $cvc)){\n throw new Exception(__('Please enter a valid card verification number.'));\n }\n return true;\n }", "public function isLengthValid ($cpf) {\n\n return (strlen($cpf) === self::CPF_VALID_LENGTH);\n }", "function has_length($value, $options=array()) {\n // TODO\n\t$length=strlen($value);\n\tif ($length > $options['1'] || $length < $options['0'])\n\t\treturn false;\n\telse\n\t\treturn true;\n\t\n\t\n }", "function openssl_cipher_iv_length(string $cipher_algo): int|false {}", "private function validateVersion()\n {\n return preg_match('/[0-99]+\\.[0-99]+\\.[0-99]+.*/', $this->version);\n }", "public function incorrectSkuLengthInVirtual()\n {\n //Data\n $productData = $this->loadData('virtual_product_required',\n array('general_sku' => $this->generate('string', 65, ':alnum:')));\n //Steps\n $this->productHelper()->createProduct($productData, 'virtual');\n //Verifying\n $this->assertMessagePresent('validation', 'incorrect_sku_length');\n $this->assertTrue($this->verifyMessagesCount(), $this->getParsedMessages());\n }", "public function hasLength(): bool;", "function length_check() {\n # Reset Error Message\n $this->error_message = \"\";\n\n # Check that a length is set\n if ($this->length) {\n # Check Length\n if (strlen($this->cur_val) > $this->length) {\n # Set Error Message\n $this->set_error(\"Validation for length of input ({$this->cur_val}) failed. The input length is \" . strlen($this->cur_val) . \" and the max length is {$this->length}.\");\n\n # Return Truncated Result\n return substr($this->cur_val, 0, $this->length);\n }\n else {\n return $this->cur_val;\n }\n }\n else {\n return $this->cur_val;\n }\n }", "public function validate()\r\n {\r\n if(($this->length_n>=MIN_LENGTH AND $this->length_n<MAX_LENGTH) AND ($this->width_m>=MIN_WIDTH AND $this->width_m<MAX_WIDTH))\r\n {\r\n return true;\r\n }else {\r\n return false;\r\n }\r\n\r\n \r\n }", "abstract protected function validateFieldLength($fieldLength);", "public function isCardValid()\n {\n return $this->isValidCard;\n }", "function abyp_validate_length( $fieldValue, $minLength ) {\n return ( strlen( trim( $fieldValue ) ) > $minLength );\n }", "public function hasLen()\n {\n return $this->get(self::LEN) !== null;\n }", "function has_length_exactly($value, $exact) {\r\n $length = strlen($value);\r\n return $length == $exact;\r\n}", "public function hasLength(){\n return $this->_has(2);\n }", "private function isValid(): bool\n {\n $this->generateChecksum();\n return (($this->luhnValue % $this->base == 0) && ($this->luhnValue != 0));\n }", "function ValidVisualVerifyCode($vvcid, $enteredcode)\n{\n global $DB;\n\n $vvcid = empty($vvcid) ? 0 : (int)$vvcid;\n $enteredcode = empty($enteredcode) ? '' : trim((string)$enteredcode);\n if(($vvcid > 0) && (strlen($enteredcode) == SD_VVCLEN))\n {\n $verifycode = $DB->query_first(\"SELECT verifycode FROM {vvc} WHERE vvcid = %d\", $vvcid);\n $DB->query_first(\"DELETE FROM {vvc} WHERE vvcid = %d\", $vvcid);\n if(!empty($verifycode))\n {\n return (strtolower(trim($verifycode['verifycode'])) == strtolower($enteredcode));\n }\n }\n\n return false;\n\n}", "function validateLength2($str, $length){\n if((strlen($str)>=$length) || (strlen($str) == 0))\n return false;\n else\n return true;\n}", "function vCC( $cc )\r\n\t\t{\r\n\t\t\t#eg. 718486746312031\r\n\t\t\treturn preg_match('/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6011[0-9]{12}|3(?:0[0-5]|[68][0-9])[0-9]{11}|3[47][0-9]{13})$/', $cc);\r\n\t\t\t\r\n\t\t}", "function validSize($size)\n {\n return $size > 1;\n }", "function verify_creditcard_mod10($strccno = '')\n {\n if (empty($strccno))\n {\n return false;\n }\n $len = mb_strlen($strccno);\n if ($len < 13 OR $len > 16)\n {\n return false;\n }\n $checkdig = (int)$strccno[--$len];\n for ($i=--$len, $sum = 0, $dou = true; $i >= 0; $i--, $dou =! $dou)\n {\n $curdig = (int)$strccno[$i];\n if ($dou)\n {\n $curdig *= 2;\n if ($curdig > 9) $curdig-=9;\n }\n $sum += $curdig;\n }\n if (($checkdig + $sum) % 10 == 0)\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public function valid()\n {\n\n if (strlen($this->container['virtual_operator']) > 60) {\n return false;\n }\n if (strlen($this->container['event_type']) > 100) {\n return false;\n }\n if (strlen($this->container['result_status']) > 100) {\n return false;\n }\n if (strlen($this->container['username']) > 100) {\n return false;\n }\n if (strlen($this->container['property_value']) > 450) {\n return false;\n }\n return true;\n }", "function has_length($value, $options=array()) {\n $length = strlen($value);\n if(isset($options['max']) && ($length > $options['max'])) {\n return false;\n } elseif(isset($options['min']) && ($length < $options['min'])) {\n return false;\n } elseif(isset($options['exact']) && ($length != $options['exact'])) {\n return false;\n } else {\n return true;\n }\n }", "function has_length($value, $options=array()) {\n $length = strlen($value);\n if(isset($options['max']) && ($length > $options['max'])) {\n return false;\n } elseif(isset($options['min']) && ($length < $options['min'])) {\n return false;\n } elseif(isset($options['exact']) && ($length != $options['exact'])) {\n return false;\n } else {\n return true;\n }\n }", "function has_length_exactly($value, $exact) {\n $length = strlen($value);\n return $length == $exact;\n}", "function has_length_exactly( $value, $exact ) {\n $length = strlen( $value );\n return $length == $exact;\n}", "private function validate_isrc($value)\n\t{\n\t\tif (strlen(trim($value)) == 12) {\n\t\t\treturn 1; /* valid */\n\t\t}\n\t\telse {\n\t\t\treturn 0; /* invalid */\n\t\t}\n\t}", "function islenincorrect($str = null){\n if ($str) {\n if (strlen($str)<2 || strlen($str)>50 ) {\n echo \"input is less than 2 or more than 20 Characters<br>\";\n return true;\n }else\n return false;\n }\n}", "public function has_cvv_rejection() {\n\n\t\treturn isset( $this->response->creditCardVerification ) && 'cvv' === $this->response->creditCardVerification->gatewayRejectionReason;\n\t}", "public function hasDataLength(){\n return $this->_has(6);\n }", "public function testTooShort(): void\n {\n $validator = new LengthValidator(5);\n $result = $validator->validate('foo');\n\n $this->assertFalse($result->isValid());\n }", "public function testValid(): void\n {\n $validator = new LengthValidator(5, 15);\n $result = $validator->validate('foo bár báz qux');\n\n $this->assertTrue($result->isValid());\n }", "public function testVatin()\n {\n $this->assertTrue(RuValidation::vatin('7710140679'));\n $this->assertTrue(RuValidation::vatin('772807592828'));\n\n $this->assertFalse(RuValidation::vatin('12345'));\n\n // invalid checksums\n $this->assertFalse(RuValidation::vatin('7710140670'));\n $this->assertFalse(RuValidation::vatin('772807592837'));\n }", "function checkVatID_it($vat_id) {\n\t\tif (strlen($vat_id) != 13)\n\t\t\treturn 0;\n\n\t\tif ($this->live_check = true) {\n\n\t\t\treturn $this->live($vat_id);\n\n\t\t} else {\n\t\t\treturn 9; // es gibt keinen algorithmus\n\t\t}\n\t}", "function CCValidationSolution($Number) {\r\n global $CardName, $CardNumber, $language;\r\n\r\n require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CCVAL_FUNCTION); \r\n\r\n\r\n// Get rid of spaces and non-numeric characters.\r\n $Number = OnlyNumericSolution($Number);\r\n\r\n// Do the first four digits fit within proper ranges? If so, who's the card issuer and how long should the number be?\r\n $NumberLeft = substr($Number, 0, 4);\r\n $NumberLength = strlen($Number);\r\n\r\n if ( ($NumberLeft >= 3000) && ($NumberLeft <= 3059) ) {\r\n $CardName = 'Diners Club';\r\n $ShouldLength = 14;\r\n } elseif ( ($NumberLeft >= 3600) && ($NumberLeft <= 3699) ) {\r\n $CardName = 'Diners Club';\r\n $ShouldLength = 14;\r\n } elseif ( ($NumberLeft >= 3800) && ($NumberLeft <= 3889) ) {\r\n $CardName = 'Diners Club';\r\n $ShouldLength = 14;\r\n } elseif ( ($NumberLeft >= 3400) && ($NumberLeft <= 3499) ) {\r\n $CardName = 'American Express';\r\n $ShouldLength = 15;\r\n } elseif ( ($NumberLeft >= 3700) && ($NumberLeft <= 3799) ) {\r\n $CardName = 'American Express';\r\n $ShouldLength = 15;\r\n } elseif ( ($NumberLeft >= 3528) && ($NumberLeft <= 3589) ) {\r\n $CardName = 'JCB';\r\n $ShouldLength = 16;\r\n } elseif ( ($NumberLeft >= 3890) && ($NumberLeft <= 3899) ) {\r\n $CardName = 'Carte Blache';\r\n $ShouldLength = 14;\r\n } elseif ( ($NumberLeft >= 4000) && ($NumberLeft <= 4999) ) {\r\n $CardName = 'Visa';\r\n if ($NumberLength > 14) {\r\n $ShouldLength = 16;\r\n } elseif ($NumberLength < 14) {\r\n $ShouldLength = 13;\r\n }\r\n } elseif ( ($NumberLeft >= 5100) && ($NumberLeft <= 5599) ) {\r\n $CardName = 'MasterCard';\r\n $ShouldLength = 16;\r\n } elseif ($NumberLeft == 5610) {\r\n $CardName = 'Australian BankCard';\r\n $ShouldLength = 16;\r\n } elseif ($NumberLeft == 6011) {\r\n $CardName = 'Discover/Novus';\r\n $ShouldLength = 16;\r\n } else {\r\n $cc_val = sprintf(TEXT_CCVAL_ERROR_UNKNOWN_CARD, $NumberLeft);\r\n return $cc_val;\r\n }\r\n\r\n// Is the number the right length?\r\n if ($NumberLength <> $ShouldLength) {\r\n $Missing = $NumberLength - $ShouldLength;\r\n if ($Missing < 0) {\r\n $cc_val = sprintf(TEXT_CCVAL_ERROR_INVALID_NUMBER, $CardName, $Number);\r\n } else {\r\n $cc_val = sprintf(TEXT_CCVAL_ERROR_INVALID_NUMBER, $CardName, $Number);\r\n }\r\n\r\n return $cc_val;\r\n }\r\n\r\n// Does the number pass the Mod 10 Algorithm Checksum?\r\n if (Mod10Solution($Number)) {\r\n $CardNumber = $Number;\r\n return true;\r\n } else {\r\n $cc_val = sprintf(TEXT_CCVAL_ERROR_INVALID_NUMBER, $CardName, $Number);\r\n return $cc_val;\r\n }\r\n }", "public function validacion_provincia($cedula){\n \n \n \n if( ($cedula[0]<= 2))\n {\n if($cedula[0]== 2 && ($cedula[1] > 4) ){\n echo \"Codigo de provincia de la cedula incorrecto, Por favor, ingrese una cédula correcta\";\n }\n else{\n return true; \n }\n }\n else{\n echo \"Codigo de provincia de la cedula incorrecto, Por favor, ingrese una cédula correcta\";\n }\n \n}", "function has_length($value , $options = []){\r\n if(isset($options['max']) && (strlen($value) > (int)$options['max'])){\r\n return false;\r\n }\r\n if(isset($options['min']) && (strlen($value) < (int)$options['min'])){\r\n return false;\r\n }\r\n if(isset($options['exact']) && (strlen($value) != (int)$options['exact'])){\r\n return false;\r\n }\r\n return true;\r\n}", "function is_valid_bank_card_number($number)\n{\n if (is_null($number) || strlen($number) < 16 || strlen($number) > 19)\n {\n return false;\n }\n $pattern = \"/^\\d{16,19}$/\";\n return (preg_match($pattern, $number) == 1);\n}", "function CaptchaIsValid($element_id='',$forceMode=false)\n{\n global $mainsettings, $sdlanguage, $userinfo, $captcha;\n\n $forceMode = isset($forceMode)?Is_Valid_Number($forceMode,false,1,3):false; //SD342\n //SD332: new flag \"require_vvc\" added\n //SD343: disabled captcha by empty captcha_method was missing\n if(!empty($userinfo['adminaccess']) ||\n (!$forceMode && (!$userinfo['require_vvc'] || empty($mainsettings['captcha_method']) ||\n (!empty($userinfo['loggedin']) && !empty($mainsettings['captcha_guests_only'])))) )\n {\n return true;\n }\n\n if(($forceMode=='1') || ($mainsettings['captcha_method'] == '1'))\n {\n if(!strlen($captcha->privatekey) || !strlen($captcha->publickey))\n {\n // Fallback to VVC!\n $mainsettings['captcha_method'] = 2;\n }\n else\n {\n if(isset($_POST['g-recaptcha-response']))\n {\n return $captcha->IsValid();\n }\n else\n {\n return false;\n }\n }\n }\n\n if(($forceMode=='2') || ($mainsettings['captcha_method'] == '2'))\n {\n $vvcid = GetVar($element_id.'_vvcid', '', 'string', true, false);\n $code = GetVar($element_id.'_verifycode', null, 'string', true, false);\n if(!empty($vvcid) && !empty($code) && ValidVisualVerifyCode($vvcid, $code))\n {\n return true;\n }\n }\n\n if(($forceMode=='3') || ($mainsettings['captcha_method'] == '3')) //SD342 - simple math question\n {\n $vvcid = GetVar($element_id.'_vvcid', '', 'string', true, false);\n $code = GetVar($element_id.'_verifycode', null, 'natural_number', true, false);\n if(!empty($vvcid) && isset($code) && ($vvcid == md5($code.date(\"H\").'37')))\n {\n return true;\n }\n }\n\n return false;\n\n}", "public static function validateMaxLength(TextBase $control, $length)\r\n\t{\r\n\t\treturn count($control->getValue())<=$length;\r\n\t}", "private function validateChecksum($vat): void\n {\n $numbers = trim(substr($vat, 2));\n\n $len = strlen($numbers);\n\n self::assertEquals(10, $len);\n self::assertStringStartsWith('0', $numbers);\n\n // Mod97 check on first 8 digits\n $checksum = 97 - fmod(substr($numbers, 0, 8), 97);\n // Make sure checksum is 2 characters long\n $checksum = sprintf('%02d', $checksum);\n\n self::assertEquals((string) $checksum, substr($numbers, 8, 10));\n }", "private function checkSymbolLength(): bool\n {\n $passwordLength = strlen($this->password);\n if ($passwordLength > 6) {\n return true;\n }\n array_push($this->errorMessages, \"Please add atleast \" . 7 - $passwordLength . \" characters to your password\");\n return false;\n }", "private function isvalidCard($CardNo,$Month,$Year,$Cvv){\n\t\t\t\t$stmt = $this->con->prepare(\"SELECT debit_card_number FROM `DebitCard` WHERE debit_card_number=? AND cvv=?;\");\n\t\t\t$stmt->bind_param(\"ss\", $CardNo,$Cvv);\n\t\t\t\n\t\t\tif($stmt->execute()){\n\t\t\t\n\t\t\treturn 0;}\n\t\t\t\n\t\t\n\t\t\t\n\t\t}", "function vState ($valoare)\n{\n\t// Parola\n\tif (!preg_match(\"#^[0-9]+$#\", $valoare) || strlen($valoare) < 5)\n\t{\n\t\treturn true;\n\t}\n}", "public function validateLength()\n {\n $resultLength = strlen($this->generate());\n\n if ($resultLength > $this->length) {\n throw new RegistryTooLongException($resultLength);\n }\n\n if ($resultLength < $this->length) {\n throw new RegistryTooShortException($resultLength);\n }\n\n return true;\n }", "function alpha_validate_length( $fieldValue, $minLength ) {\n\t\treturn ( strlen( trim( $fieldValue ) ) > $minLength );\n\t}", "private static function _ivLength() {\n return openssl_cipher_iv_length(static::$cipher);\n }", "public function hasBlockLength()\n {\n return $this->block_length !== null;\n }", "public function validSize() {\n\t\tif($this->file['size'] <= $this->max_bytes) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "function checkVatID_c($vat_id) {\n\t\tif (strlen($vat_id) != 10)\n\t\t\treturn 0;\n\n\t\t// LUHN-10 code http://www.ee.unb.ca/tervo/ee4253/luhn.html\n\n\t\t$id = substr($vat_id, 1);\n\t\t$checksum = 0;\n\t\tfor ($i = 9; $i > 0; $i --) {\n\t\t\t$digit = $vat_id {\n\t\t\t\t$i};\n\t\t\tif ($i % 2 == 1)\n\t\t\t\t$digit *= 2;\n\t\t\tif ($digit >= 10) {\n\t\t\t\t$checksum += $digit -10 + 1;\n\t\t\t} else {\n\t\t\t\t$checksum += $digit;\n\t\t\t}\n\t\t}\n\t\tif ($this->modulo($checksum, 10) == 0)\n\t\t\treturn 1;\n\n\t\treturn 0;\n\t} // Canada\n\n\t// belgien\n\tfunction checkVatID_be($vat_id) {\n\t\tif (strlen($vat_id) != 11)\n\t\t\treturn 0;\n\n\t\t$checkvals = (int) substr($vat_id, 2, -2);\n\t\t$checksum = (int) substr($vat_id, -2);\n\n\t\tif (97 - $this->modulo($checkvals, 97) != $checksum)\n\t\t\treturn 0;\n\n\t\treturn 1;\n\t} // end belgien\n\n\t// daenemark\n\tfunction checkVatID_dk($vat_id) {\n\t\tif (strlen($vat_id) != 10)\n\t\t\treturn 0;\n\n\t\t$weights = array (2, 7, 6, 5, 4, 3, 2, 1);\n\t\t$checksum = 0;\n\n\t\tfor ($i = 0; $i < 8; $i ++)\n\t\t\t$checksum += (int) $vat_id[$i +2] * $weights[$i];\n\t\tif ($this->modulo($checksum, 11) > 0)\n\t\t\treturn 0;\n\n\t\treturn 1;\n\t} // end daenemark\n\n\t// deutschland\n\tfunction checkVatID_de($vat_id) {\n\t\tif (strlen($vat_id) != 11)\n\t\t\treturn 0;\n\n\t\t$prod = 10;\n\t\t$checkval = 0;\n\t\t$checksum = (int) substr($vat_id, -1);\n\n\t\tfor ($i = 2; $i < 10; $i ++) {\n\t\t\t$checkval = $this->modulo((int) $vat_id[$i] + $prod, 10);\n\t\t\tif ($checkval == 0)\n\t\t\t\t$checkval = 10;\n\t\t\t$prod = $this->modulo($checkval * 2, 11);\n\t\t} // end for($i = 2; $i < 10; $i++)\n\t\t$prod = $prod == 1 ? 11 : $prod;\n\t\tif (11 - $prod != $checksum)\n\t\t\treturn 0;\n\n\t\treturn 1;\n\t} // end deutschland\n\n\t// estland\n\tfunction checkVatID_ee($vat_id) {\n\n\t\tif (strlen($vat_id) != 11)\n\t\t\treturn 0;\n\t\tif (!is_numeric(substr($vat_id, 2)))\n\t\t\treturn 0;\n\n\t\tif ($this->live_check = true) {\n\n\t\t\treturn $this->live($vat_id);\n\n\t\t} else {\n\t\t\treturn 9; // es gibt keinen algorithmus\n\t\t}\n\t} // end estland\n\n\t// finnland\n\tfunction checkVatID_fi($vat_id) {\n\t\tif (strlen($vat_id) != 10)\n\t\t\treturn 0;\n\n\t\t$weights = array (7, 9, 10, 5, 8, 4, 2);\n\t\t$checkval = 0;\n\t\t$checksum = (int) substr($vat_id, -1);\n\n\t\tfor ($i = 0; $i < 8; $i ++)\n\t\t\t$checkval += (int) $vat_id[$i +2] * $weights[$i];\n\n\t\tif (11 - $this->modulo($checkval, 11) != $checksum)\n\t\t\treturn 0;\n\n\t\treturn 1;\n\t} // end finnland\n\n\t// frankreich\n\tfunction checkVatID_fr($vat_id) {\n\t\tif (strlen($vat_id) != 13)\n\t\t\treturn 0;\n\t\tif (!is_numeric(substr($vat_id), 4))\n\t\t\treturn 0;\n\n\t\tif ($this->live_check = true) {\n\n\t\t\treturn $this->live($vat_id);\n\n\t\t} else {\n\t\t\treturn 9; // es gibt keinen algorithmus\n\t\t}\n\n\t} // end frankreich\n\n\t// griechenland\n\tfunction checkVatID_el($vat_id) {\n\t\tif (strlen($vat_id) != 11)\n\t\t\treturn 0;\n\n\t\t$checksum = substr($vat_id, -1);\n\t\t$checkval = 0;\n\n\t\tfor ($i = 1; $i <= 8; $i ++)\n\t\t\t$checkval += (int) $vat_id[10 - $i] * pow(2, $i);\n\t\t$checkval = $this->modulo($checkval, 11) > 9 ? 0 : $this->modulo($checkval, 11);\n\t\tif ($checkval != $checksum)\n\t\t\treturn 0;\n\n\t\treturn 1;\n\t} // end griechenland\n\n\t// grossbrittanien\n\tfunction checkVatID_gb($vat_id) {\n\t\tif (strlen($vat_id) != 11 && strlen($vat_id) != 14)\n\t\t\treturn 0;\n\t\tif (!is_numeric(substr($vat_id, 2)))\n\t\t\treturn 0;\n\n\t\tif ($this->live_check = true) {\n\n\t\t\treturn $this->live($vat_id);\n\n\t\t} else {\n\t\t\treturn 9; // es gibt keinen algorithmus\n\t\t}\n\n\t} // end grossbrittanien\n\n\t/********************************************\n\t* irland *\n\t********************************************/\n\t// irland switch\n\tfunction checkVatID_ie($vat_id) {\n\t\tif (strlen($vat_id) != 10)\n\t\t\treturn 0;\n\t\tif (!checkVatID_ie_new($vat_id) && !checkVatID_ie_old($vat_id))\n\t\t\treturn 0;\n\n\t\treturn 1;\n\t} // end irland switch\n\n\t// irland alte methode\n\tfunction checkVatID_ie_old($vat_id) {\n\t\t// in neue form umwandeln\n\t\t$transform = array (substr($vat_id, 0, 2), '0', substr($vat_id, 4, 5), $vat_id[2], $vat_id[9]);\n\t\t$vat_id = join('', $transform);\n\n\t\t// nach neuer form pruefen\n\t\treturn checkVatID_ie_new($vat_id);\n\t} // end irland alte methode\n\n\t// irland neue methode\n\tfunction checkVatID_ie_new($vat_id) {\n\t\t$checksum = strtoupper(substr($vat_id, -1));\n\t\t$checkval = 0;\n\t\t$checkchar = 'A';\n\t\tfor ($i = 2; $i <= 8; $i ++)\n\t\t\t$checkval += (int) $vat_id[10 - $i] * $i;\n\t\t$checkval = $this->modulo($checkval, 23);\n\t\tif ($checkval == 0) {\n\t\t\t$checkchar = 'W';\n\t\t} else {\n\t\t\tfor ($i = $checkval -1; $i > 0; $i --)\n\t\t\t\t$checkchar ++;\n\t\t}\n\t\tif ($checkchar != $checksum)\n\t\t\treturn false;\n\n\t\treturn true;\n\t} // end irland neue methode\n\t/* end irland\n\t********************************************/\n\n\t// italien\n\tfunction checkVatID_it($vat_id) {\n\t\tif (strlen($vat_id) != 13)\n\t\t\treturn 0;\n\n\t\tif ($this->live_check = true) {\n\n\t\t\treturn $this->live($vat_id);\n\n\t\t} else {\n\t\t\treturn 9; // es gibt keinen algorithmus\n\t\t}\n\t} // end italien\n\n\t// lettland\n\tfunction checkVatID_lv($vat_id) {\n\n\t\tif (strlen($vat_id) != 13)\n\t\t\treturn 0;\n\t\tif (!is_numeric(substr($vat_id, 2)))\n\t\t\treturn 0;\n\n\t\tif ($this->live_check = true) {\n\n\t\t\treturn $this->live($vat_id);\n\n\t\t} else {\n\t\t\treturn 9; // es gibt keinen algorithmus\n\t\t}\n\t} // end lettland\n\n\t// litauen\n\tfunction checkVatID_lt($vat_id) {\n\n\t\tif ((strlen($vat_id) != 13) || (strlen($vat_id) != 11))\n\t\t\treturn 0;\n\t\tif (!is_numeric(substr($vat_id, 2)))\n\t\t\treturn 0;\n\n\t\tif ($this->live_check = true) {\n\n\t\t\treturn $this->live($vat_id);\n\n\t\t} else {\n\t\t\treturn 9; // es gibt keinen algorithmus\n\t\t}\n\t} // end litauen\n\n\t// luxemburg\n\tfunction checkVatID_lu($vat_id) {\n\t\tif (strlen($vat_id) != 10)\n\t\t\treturn 0;\n\n\t\t$checksum = (int) substr($vat_id, -2);\n\t\t$checkval = (int) substr($vat_id, 2, 6);\n\t\tif ($this->modulo($checkval, 89) != $checksum)\n\t\t\treturn 0;\n\n\t\treturn 1;\n\t} // luxemburg\n\n\t// malta\n\tfunction checkVatID_mt($vat_id) {\n\n\t\tif (strlen($vat_id) != 10)\n\t\t\treturn 0;\n\t\tif (!is_numeric(substr($vat_id, 2)))\n\t\t\treturn 0;\n\n\t\tif ($this->live_check = true) {\n\n\t\t\treturn $this->live($vat_id);\n\n\t\t} else {\n\t\t\treturn 9; // es gibt keinen algorithmus\n\t\t}\n\t} // end malta\n\n\t// niederlande\n\tfunction checkVatID_nl($vat_id) {\n\t\tif (strlen($vat_id) != 14)\n\t\t\treturn 0;\n\t\tif (strtoupper($vat_id[11]) != 'B')\n\t\t\treturn 0;\n\t\tif ((int) $vat_id[12] == 0 || (int) $vat_id[13] == 0)\n\t\t\treturn 0;\n\n\t\t$checksum = (int) $vat_id[10];\n\t\t$checkval = 0;\n\n\t\tfor ($i = 2; $i <= 9; $i ++)\n\t\t\t$checkval += (int) $vat_id[11 - $i] * $i;\n\t\t$checkval = $this->modulo($checkval, 11) > 9 ? 0 : $this->modulo($checkval, 11);\n\n\t\tif ($checkval != $checksum)\n\t\t\treturn 0;\n\n\t\treturn 1;\n\t} // end niederlande\n\n\t// oesterreich\n\tfunction checkVatID_at($vat_id) {\n\t\tif (strlen($vat_id) != 11)\n\t\t\treturn 0;\n\t\tif (strtoupper($vat_id[2]) != 'U')\n\t\t\treturn 0;\n\n\t\t$checksum = (int) $vat_id[10];\n\t\t$checkval = 0;\n\n\t\tfor ($i = 3; $i < 10; $i ++)\n\t\t\t$checkval += $this->cross_summa((int) $vat_id[$i] * ($this->is_even($i) ? 2 : 1));\n\t\t$checkval = substr((string) (96 - $checkval), -1);\n\n\t\tif ($checksum != $checkval)\n\t\t\treturn 0;\n\n\t\treturn 1;\n\t} // end oesterreich\n\n\t// polen\n\tfunction checkVatID_pl($vat_id) {\n\t\tif (strlen($vat_id) != 12)\n\t\t\treturn 0;\n\n\t\t$weights = array (6, 5, 7, 2, 3, 4, 5, 6, 7);\n\t\t$checksum = (int) $vat_id[11];\n\t\t$checkval = 0;\n\t\tfor ($i = 0; $i < count($weights); $i ++)\n\t\t\t$checkval += (int) $vat_id[$i +2] * $weights[$i];\n\t\t$checkval = $this->modulo($checkval, 11);\n\n\t\tif ($checkval != $checksum)\n\t\t\treturn 0;\n\n\t\treturn 1;\n\t} // end polen\n\n\t// portugal\n\tfunction checkVatID_pt($vat_id) {\n\t\tif (strlen($vat_id) != 11)\n\t\t\treturn 0;\n\n\t\t$checksum = (int) $vat_id[10];\n\t\t$checkval = 0;\n\n\t\tfor ($i = 2; $i < 10; $i ++) {\n\t\t\t$checkval += (int) $vat_id[11 - $i] * $i;\n\t\t}\n\t\t$checkval = (11 - $this->modulo($checkval, 11)) > 9 ? 0 : (11 - $this->modulo($checkval, 11));\n\t\tif ($checksum != $checkval)\n\t\t\treturn 0;\n\n\t\treturn 1;\n\t} // end portugal\n\n\t// schweden\n\tfunction checkVatID_se($vat_id) {\n\t\tif (strlen($vat_id) != 14)\n\t\t\treturn 0;\n\t\tif ((int) substr($vat_id, -2) < 1 || (int) substr($vat_id, -2) > 94)\n\t\t\treturn 0;\n\t\t$checksum = (int) $vat_id[11];\n\t\t$checkval = 0;\n\n\t\tfor ($i = 0; $i < 10; $i ++)\n\t\t\t$checkval += $this->cross_summa((int) $vat_id[10 - $i] * ($this->is_even($i) ? 2 : 1));\n\t\tif ($checksum != ($this->modulo($checkval, 10) == 0 ? 0 : 10 - $this->modulo($checkval, 10)))\n\t\t\treturn 0;\n\n\t\t$checkval = 0;\n\t\tfor ($i = 0; $i < 13; $i ++)\n\t\t\t$checkval += (int) $vat_id[13 - $i] * ($this->is_even($i) ? 2 : 1);\n\t\tif ($this->modulo($checkval, 10) > 0)\n\t\t\treturn 0;\n\n\t\treturn 1;\n\t} // end schweden\n\n\t// slowakische republik\n\tfunction checkVatID_sk($vat_id) {\n\t\tif (strlen($vat_id) != 12)\n\t\t\treturn 0;\n\t\tif (!is_numeric(substr($vat_id, 2)))\n\t\t\treturn 0;\n\n\t\tif ($this->live_check = true) {\n\n\t\t\treturn $this->live($vat_id);\n\n\t\t} else {\n\t\t\treturn 9; // es gibt keinen algorithmus\n\t\t}\n\n\t} // end slowakische republik\n\n\t// slowenien\n\tfunction checkVatID_si($vat_id) {\n\t\tif (strlen($vat_id) != 10)\n\t\t\treturn 0;\n\t\tif ((int) $vat_id[2] == 0)\n\t\t\treturn 0;\n\n\t\t$checksum = (int) $vat_id[9];\n\t\t$checkval = 0;\n\n\t\tfor ($i = 2; $i <= 8; $i ++)\n\t\t\t$checkval += (int) $vat_id[10 - $i] * $i;\n\t\t$checkval = $this->modulo($checkval, 11) == 10 ? 0 : 11 - $this->modulo($checkval, 11);\n\t\tif ($checksum != $checkval)\n\t\t\treturn 0;\n\n\t\treturn 1;\n\t} // end slowenien\n\n\t// spanien\n\tfunction checkVatID_es($vat_id) {\n\t\t// Trim country info\n\t\t$vat_id = substr($vat_id, 2);\n\n\t\t// Is it a naturalized foreigner?\n\t\tif (strtoupper($vat_id[0]) == 'X')\n\t\t\t$vat_id = substr($vat_id, 1); // Truncated $vat_id is validated as a regular one\n\n\t\t// Length check \n\t\tif (strlen($vat_id) > 9) // $vat_id at this point should be 9 chars at most\n\n\n\n\t\t\treturn 0;\n\n\t\t// Is it a company?\n\t\tif (!is_numeric($vat_id[0])) {\n\t\t\t$allowed = array ('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H');\n\t\t\t$checkval = false;\n\n\t\t\tfor ($i = 0; $i < count($allowed); $i ++) {\n\t\t\t\tif (strtoupper($vat_id[0]) == $allowed[$i])\n\t\t\t\t\t$checkval = true;\n\t\t\t} // end for($i=0; $i<count($allowed); $i++)\n\t\t\tif (!$checkval)\n\t\t\t\treturn 9; // Few more letters are allowed, but not likely to happen\n\n\t\t\t$vat_len1 = strlen($vat_id) - 1;\n\n\t\t\t$checksum = (int) $vat_id[$vat_len1];\n\t\t\t$checkval = 0;\n\n\t\t\tfor ($i = 1; $i < $vat_len1; $i ++)\n\t\t\t\t$checkval += $this->cross_summa((int) $vat_id[$i] * ($this->is_even($i) ? 1 : 2));\n\n\t\t\tif ($checksum != 10 - $this->modulo($checkval, 10))\n\t\t\t\treturn 0;\n\n\t\t\treturn 1;\n\t\t} // end Is it a company?\n\n\t\t// Is it an Individual? (or naturalized foreigner)\n\t\tif (!is_numeric($vat_id[strlen($vat_id) - 1])) {\n\t\t\t$allowed1 = \"TRWAGMYFPDXBNJZSQVHLCKE\";\n\n\t\t\t$vat_len1 = strlen($vat_id) - 1;\n\n\t\t\t$checksum = strtoupper($vat_id[$vat_len1]);\n\t\t\t$checkval = $this->modulo((int) substr($vat_id, 0, $vat_len1), 23);\n\n\t\t\tif ($checksum != $allowed1[$checkval])\n\t\t\t\treturn 0;\n\n\t\t\t$this->vat_mod = array ('status' => $allowed1[$checkval]);\n\n\t\t\treturn 1;\n\t\t} // end Is it an Individual?\n\n\t\treturn 0; // No match found\n\t} // end spanien\n\n\t// tschechien\n\tfunction checkVatID_cz($vat_id) {\n\n\t\tif ((strlen($vat_id) != 10) || (strlen($vat_id) != 11) || (strlen($vat_id) != 12))\n\t\t\treturn 0;\n\t\tif (!is_numeric(substr($vat_id, 2)))\n\t\t\treturn 0;\n\n\t\tif ($this->live_check = true) {\n\n\t\t\treturn $this->live($vat_id);\n\n\t\t} else {\n\t\t\treturn 9; // es gibt keinen algorithmus\n\t\t}\n\t} // end tschechien\n\n\t// ungarn\n\tfunction checkVatID_hu($vat_id) {\n\n\t\tif (strlen($vat_id) != 10)\n\t\t\treturn 0;\n\t\tif (!is_numeric(substr($vat_id, 2)))\n\t\t\treturn 0;\n\n\t\tif ($this->live_check = true) {\n\n\t\t\treturn $this->live($vat_id);\n\n\t\t} else {\n\t\t\treturn 9; // es gibt keinen algorithmus\n\t\t}\n\t} // end ungarn\n\n\t// zypern\n\tfunction checkVatID_cy($vat_id) {\n\n\t\tif (strlen($vat_id) != 11)\n\t\t\treturn 0;\n\n\t\tif ($this->live_check = true) {\n\n\t\t\treturn $this->live($vat_id);\n\n\t\t} else {\n\t\t\treturn 9; // es gibt keinen algorithmus\n\t\t}\n\t} // end zypern\n\n\t/*******************************************************************/\n\n\t/********************************************************************\n\t* mathematische Hilfsfunktionen *\n\t********************************************************************/\n\t// modulo berechnet den rest einer division von $val durch $param\n\tfunction modulo($val, $param) {\n\t\treturn $val - (floor($val / $param) * $param);\n\t} // end function modulo($val, $param)\n\n\t// stellt fest, ob eine zahl gerade ist\n\tfunction is_even($val) {\n\t\treturn ($val / 2 == floor($val / 2)) ? true : false;\n\t} // end function is_even($val)\n\n\t// errechnet die quersumme von $val\n\tfunction cross_summa($val) {\n\t\t$val = (string) $val;\n\t\t$sum = 0;\n\t\tfor ($i = 0; $i < strlen($val); $i ++)\n\t\t\t$sum += (int) $val[$i];\n\t\treturn $sum;\n\t} // end function cross_summa((string) $val)\n\t/*******************************************************************/\n\n\t/********************************************************************\n\t* Live Check *\n\t********************************************************************/\n\t// Live Check überprüft die USTid beim Bundesamt für Finanzen\n\tfunction live($abfrage_nummer) {\n\n\t\t$eigene_nummer = STORE_OWNER_VAT_ID;\n\n\t\t/* Hier wird der String für den POST per URL aufgebaut */\n\t\t$ustid_post = \"eigene_id=\".$eigene_nummer.\"&abfrage_id=\".$abfrage_nummer.\"\";\n\n\t\t/* Zur Verbindung mit dem Server wird CURL verwendet */\n\t\t/* mit curl_init wird zunächst die URL festgelegt */\n\n\t\t$ch = curl_init(\"http://wddx.bff-online.de//ustid.php?\".$ustid_post.\"\");\n\n\t\t/* Hier werden noch einige Parameter für CURL gesetzt */\n\t\tcurl_setopt($ch, CURLOPT_HEADER, 0); /* Header nicht in die Ausgabe */\n\t\tcurl_setopt($ch, CURLOPT_NOBODY, 0); /* Ausgabe nicht in die HTML-Seite */\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); /* Umleitung der Ausgabe in eine Variable ermöglichen */\n\n\t\t/* Aufruf von CURL und Ausgabe mit WDDX deserialisieren */\n\n\t\t$des_out = wddx_deserialize(curl_exec($ch));\n\t\tcurl_close($ch);\n\n\t\t/* Die deserialisierte Ausgabe in ein Array schreiben */\n\n\t\twhile (list ($key, $val) = each($des_out)) {\n\t\t\t$ergebnis[$key] = $val;\n\t\t}\n\n\t\tif ($ergebnis[fehler_code] == '200') {\n\t\t\treturn 1;\n\t\t}\n\t\telseif ($ergebnis[fehler_code] == '201') {\n\t\t\treturn 0;\n\t\t}\n\t\telseif ($ergebnis[fehler_code] == '202') {\n\t\t\treturn 0;\n\t\t}\n\t\telseif ($ergebnis[fehler_code] == '203') {\n\t\t\treturn 0;\n\t\t}\n\t\telseif ($ergebnis[fehler_code] == '204') {\n\t\t\treturn 0;\n\t\t}\n\t\telseif ($ergebnis[fehler_code] == '205') {\n\t\t\treturn 9;\n\t\t}\n\t\telseif ($ergebnis[fehler_code] == '206') {\n\t\t\treturn 9;\n\t\t}\n\t\telseif ($ergebnis[fehler_code] == '207') {\n\t\t\treturn 9;\n\t\t}\n\t\telseif ($ergebnis[fehler_code] == '208') {\n\t\t\treturn 9;\n\t\t}\n\t\telseif ($ergebnis[fehler_code] == '209') {\n\t\t\treturn 0;\n\t\t}\n\t\telseif ($ergebnis[fehler_code] == '210') {\n\t\t\treturn 0;\n\t\t}\n\t\telseif ($ergebnis[fehler_code] == '666') {\n\t\t\treturn 9;\n\t\t}\n\t\telseif ($ergebnis[fehler_code] == '777') {\n\t\t\treturn 9;\n\t\t}\n\t\telseif ($ergebnis[fehler_code] == '888') {\n\t\t\treturn 9;\n\t\t}\n\t\telseif ($ergebnis[fehler_code] == '999') {\n\t\t\treturn 9;\n\t\t} else {\n\t\t\treturn 9;\n\t\t}\n\n\t} // end function Live\n\t/*******************************************************************/\n}", "protected static function validCardNumberLength($number, string $type = NULL, $function = 'length') : bool\n {\n return in_array(strlen($number ?? ''), self::getCardFormats()[$type][$function]);\n }", "public function isValidChecksum()\n\t{\n\t\t$length = strlen($this->number);\n\t\t$value = $this->ccNumber;\n\t\t$sum = 0;\n $weight = 2;\n\n for ($i = $length - 2; $i >= 0; $i--) {\n $digit = $weight * $value[$i];\n $sum += floor($digit / 10) + $digit % 10;\n $weight = $weight % 2 + 1;\n }\n\n if ((10 - $sum % 10) % 10 != $value[$length - 1]) {\n return false;\n }\n\n return true;\n\t}", "public function valid()\n {\n\n if (strlen($this->container['addressType']) > 255) {\n return false;\n }\n if (strlen($this->container['applicableRegion']) > 255) {\n return false;\n }\n if (strlen($this->container['errorCode']) > 255) {\n return false;\n }\n if (strlen($this->container['statusCode']) > 255) {\n return false;\n }\n if (strlen($this->container['careOf']) > 255) {\n return false;\n }\n return true;\n }", "public static function validLength($input)\n\t{\n\t\t$length = strlen($input);\n\n\t\tif ($length > 2 && $length <= 500) {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\n\t}", "protected function validateCardNumber($params) {\n\t\t$cardNumber = $params['sg_CardNumber'];\n\n\t\tif ($cardNumber <> $this->cleanCardNumber($cardNumber)) {\n\t\t\tthrow new CardNumberException(\"Card number is not pre-processed\");\n\t\t}\n\n\t\t$cardLength = strlen($cardNumber); \n\n\t\tif ($cardLength < SafechargeConstants::CARD_NUMBER_MIN_LENGTH) {\n\t\t\tthrow new CardNumberException(\"Card number is too short\");\n\t\t}\n\n\t\tif ($cardLength > SafechargeConstants::CARD_NUMBER_MAX_LENGTH) {\n\t\t\tthrow new CardNumberException(\"Card number is too long\");\n\t\t}\n\n\t\t/* Credit card LUHN checker - coded '05 shaman - www.planzero.org *\n\t\t * This code has been released into the public domain, however please *\n\t\t * give credit to the original author where possible. */\n\t\t$parity = $cardLength % 2;\n\t\t$sum = 0;\n\t\tfor ($i = 0; $i < $cardLength; $i++) { \n\t\t\t$digit = $cardNumber[$i];\n\t\t\tif ($i % 2 == $parity) $digit = $digit * 2; \n\t\t\tif ($digit > 9) $digit = $digit - 9; \n\t\t\t$sum = $sum + $digit;\n\t\t}\n\t\t$valid = ($sum % 10 == 0) ? true : false; \n\n\t\tif (!$valid) {\n\t\t\tthrow new CardNumberException(\"Invalid checksum\");\n\t\t}\n\t}", "public function has_video() {\r\n\t\treturn strlen( $this->video );\r\n\t}", "public function isValid()\n {\n return $this->pos < strlen($this->buffer);\n }", "public function valid()\n {\n\n if (strlen($this->container['bookingReferenceNumber']) > 15) {\n return false;\n }\n if (strlen($this->container['carrierName']) > 15) {\n return false;\n }\n if (strlen($this->container['ticketNumber']) > 15) {\n return false;\n }\n if (strlen($this->container['checkDigit']) > 1) {\n return false;\n }\n if (strlen($this->container['extendedPaymentCode']) > 3) {\n return false;\n }\n if (strlen($this->container['passengerName']) > 42) {\n return false;\n }\n if (strlen($this->container['customerCode']) > 40) {\n return false;\n }\n if (strlen($this->container['documentType']) > 1) {\n return false;\n }\n if (strlen($this->container['documentNumber']) > 14) {\n return false;\n }\n if (strlen($this->container['invoiceNumber']) > 25) {\n return false;\n }\n if (strlen($this->container['additionalCharges']) > 20) {\n return false;\n }\n if (strlen($this->container['totalFeeAmount']) > 12) {\n return false;\n }\n if (strlen($this->container['clearingSequence']) > 2) {\n return false;\n }\n if (strlen($this->container['clearingCount']) > 2) {\n return false;\n }\n if (strlen($this->container['totalClearingAmount']) > 20) {\n return false;\n }\n if (strlen($this->container['reservationSystemCode']) > 4) {\n return false;\n }\n if (strlen($this->container['processIdentifier']) > 3) {\n return false;\n }\n if (strlen($this->container['ticketIssueDate']) > 8) {\n return false;\n }\n if (strlen($this->container['originalTicketNumber']) > 14) {\n return false;\n }\n if (strlen($this->container['purchaseType']) > 3) {\n return false;\n }\n if (strlen($this->container['creditReasonIndicator']) > 1) {\n return false;\n }\n if (strlen($this->container['ticketChangeIndicator']) > 1) {\n return false;\n }\n if (strlen($this->container['planNumber']) > 1) {\n return false;\n }\n if (strlen($this->container['arrivalDate']) > 8) {\n return false;\n }\n if (strlen($this->container['restrictedTicketDesciption']) > 20) {\n return false;\n }\n if (strlen($this->container['exchangeTicketAmount']) > 12) {\n return false;\n }\n if (strlen($this->container['exchangeTicketFeeAmount']) > 12) {\n return false;\n }\n if (strlen($this->container['reservationType']) > 32) {\n return false;\n }\n if (strlen($this->container['boardingFeeAmount']) > 12) {\n return false;\n }\n return true;\n }", "public function testTooLong(): void\n {\n $validator = new LengthValidator(null, 10);\n $result = $validator->validate('foo bar baz');\n\n $this->assertFalse($result->isValid());\n }", "function validateDCI($str){\n if((strlen($str)>10) || (strlen($str)<4) || (!ctype_digit($str)) )\n return false;\n else\n return true;\n}", "function checkVatID_ie_new($vat_id) {\n\t\t$checksum = strtoupper(substr($vat_id, -1));\n\t\t$checkval = 0;\n\t\t$checkchar = 'A';\n\t\tfor ($i = 2; $i <= 8; $i ++)\n\t\t\t$checkval += (int) $vat_id[10 - $i] * $i;\n\t\t$checkval = $this->modulo($checkval, 23);\n\t\tif ($checkval == 0) {\n\t\t\t$checkchar = 'W';\n\t\t} else {\n\t\t\tfor ($i = $checkval -1; $i > 0; $i --)\n\t\t\t\t$checkchar ++;\n\t\t}\n\t\tif ($checkchar != $checksum)\n\t\t\treturn false;\n\n\t\treturn true;\n\t}", "function has_length($value, $options=array()) {\n //for first/last name [1,256]\n //for username [7, 256]\n if(strlen($value) > $options[0] && strlen($value) < $options[1]) {\n return 1;\n }\n return 0;\n }", "public function validate()\n {\n // get the value; remove spaces, dashes, and dots\n $value = str_replace([' ', '-', '.'], '', (string) $this->getValue());\n\n // is it composed only of digits?\n if (! ctype_digit($value)) {\n return false;\n }\n\n // luhn mod-10 algorithm: https://gist.github.com/1287893\n $sumTable = [\n [0,1,2,3,4,5,6,7,8,9],\n [0,2,4,6,8,1,3,5,7,9],\n ];\n\n $sum = 0;\n $flip = 0;\n\n for ($i = strlen($value) - 1; $i >= 0; $i--) {\n $sum += $sumTable[$flip++ & 0x1][$value[$i]];\n }\n return $sum % 10 === 0;\n }", "function setCVV($cvv) {\n\t\tif (strlen($cvv)>=3 and strlen($cvv)<=4 and is_numeric($cvv)) {\n\t\t\t$this->cvv = $cvv;\n\t\t} else {\n\t\t\t$this->error[] = \"Invalid CVV\";\n\t\t}\n\t}", "function setCVV($cvv) {\n\t\tif (strlen($cvv)>=3 and strlen($cvv)<=4 and is_numeric($cvv)) {\n\t\t\t$this->cvv = $cvv;\n\t\t} else {\n\t\t\t$this->error[] = \"Invalid CVV\";\n\t\t}\n\t}", "public function valid()\n {\n return $this->index <= $this->length;\n }", "public static function isLength($var, $length) {\n\n if (is_array($var)) {\n return count($var) == $length;\n\n }\n else {\n return strlen($var) == $length;\n\n }\n\n }", "static public function CheckMessageLength($length)\n {\n if ($length > Message::MAX_DATA_LENGTH) {\n throw new Exception('Too much data');\n }\n }", "public function testValidationCaseForNonPositiveOutputLength()\n {\n $generator = $this->getTokenGeneratorForTesting();\n\n // Backward compatible for different versions of PHPUnit\n if (method_exists($this, 'expectException')) {\n $this->expectException(\\LengthException::class);\n\n $generator->getTokenString(0);\n } else {\n $hasThrown = null;\n\n try {\n $generator->getTokenString(0);\n } catch (\\LengthException $exception) {\n $hasThrown = !empty($exception->getMessage());\n } catch (\\Exception $exception) {\n $hasThrown = $exception->getMessage();\n }\n\n $this->assertTrue($hasThrown);\n\n return;\n }\n }", "function validateCC($cc_num, $type) {\n if ($type == \"American\") {$pattern = \"/^([34|37]{2})([0-9]{13})$/\";if (preg_match($pattern, $cc_num)) {$verified = true;} else {$verified = false;}} elseif ($type == \"Dinners\") {$pattern = \"/^([30|36|38]{2})([0-9]{12})$/\";if (preg_match($pattern, $cc_num)) {$verified = true;} else {$verified = false;}} elseif ($type == \"Discover\") {$pattern = \"/^([6011]{4})([0-9]{12})$/\";if (preg_match($pattern, $cc_num)) {$verified = true;} else {$verified = false;}} elseif ($type == \"Master\") {$pattern = \"/^([51|52|53|54|55]{2})([0-9]{14})$/\";if (preg_match($pattern, $cc_num)) {$verified = true;} else {$verified = false;}} elseif ($type == \"Visa\") {$pattern = \"/^([4]{1})([0-9]{12,15})$/\"; if (preg_match($pattern, $cc_num)) {$verified = true;} else {$verified = false;}}\n\n if($verified == false) {\n //if validation fail, print a message\n echo \"Credit card invalid. Please make sure that you entered a valid credit card \";\n } \n}", "public function checkSize()\r\n\t{\r\n\t\treturn ((abs(@filesize($this->targetFile) - @filesize($this->referenceFile))) < $this->sizeTol);\r\n\t}", "public function testValidationSetup()\n {\n $init = 'test';\n $str = new \\Pv\\PString($init, array('length[1]'));\n $valid = $str->getValidation();\n\n $this->assertTrue($valid[0] instanceof \\Pv\\Validate\\Length);\n }", "function checkLength($password)\n{\n return strlen($password) >= MIN_PASSWORD;\n}", "public static function validate_string_minimum_length($value, $length){\n\t\treturn strlen($value) >= $length;\n\t}", "protected function len($num, int $length): bool\n {\n return !! preg_match(\"/^[0-9]{$length}/\", $num);\n }", "public function getIsRequestToCorrectCvvOrAvsError();", "private function process_length($value, $count) {\n if (is_array($value)) {\n if (count($value) != $count) {\n return false;\n } else {\n return true;\n }\n } else {\n if (strlen($value) != $count) {\n return false;\n } else {\n return true;\n }\n }\n }", "function checkArrive($arrive, $X_langArray) {\n\tglobal $errorField;\n\t\n\t//arrive vuoto\n\tif ( strlen($arrive) > 0 && strlen($arrive) < 25 ) {\n\t\t$errorField .= \"&arriveErrMsg=\".urlencode($X_langArray['CREATE_COUNTRY_REV_ARRIVE_LENGTH_MIN_ERR']);\n\t}\n\tif ( strlen($arrive) > 500 ) {\n\t\t$errorField .= \"&arriveErrMsg=\".urlencode($X_langArray['CREATE_COUNTRY_REV_ARRIVE_LENGTH_MAX_ERR']);\n\t}\n}", "function _check_need_sendcvrcmd($deviceid, $open) {\n return false;\n }", "protected function validateChecksum() {\n\t}", "function has_length( $value, $options ) {\n if ( isset( $options[ 'min' ] ) && !has_length_greater_than( $value, $options[ 'min' ] ) ) {\n return false;\n } elseif ( isset( $options[ 'max' ] ) && !has_length_less_than( $value, $options[ 'max' ] ) ) {\n return false;\n } elseif ( isset( $options[ 'exact' ] ) && !has_length_exactly( $value, $options[ 'exact' ] ) ) {\n return false;\n } else {\n return true;\n }\n}", "function checkLength($fieldlength){\n\n $formErrors = array();\n foreach($fieldlength as $nameofField => $valueofField){\n\n if(strlen(trim($_POST[$nameofField])) < $valueofField){\n \n $formErrors[] = $nameofField. \" is not in Valid Format Try again\";\n\n }\n\n }\n return $formErrors; \n\n }", "public static function validateMinLength(TextBase $control, $length)\r\n\t{\r\n\t\treturn count($control->getValue())>=$length;\r\n\t}", "function validarcrear_veredas($coddpt, $codmun, $codver){\n $sql = \"SELECT count(cod_vecor) as cont from veredas where cod_dpto='$coddpt' and cod_muni = '$codmun' and cod_vecor= '$codver'\";\n //echo \"<pre>$sql</pre>\";\n $this->consultar($sql, __FUNCTION__);\n }", "private function countLength() {\n\n $this->_length = strlen($this->_value);\n }", "function isEqual($length) {\n $password = \"This is a secret password!\";\n if(strlen($password) == $length) {\n return true;\n } else {\n return false;\n }\n }", "public function hasAllowedLength($value): bool\n {\n return in_array(strlen($value), $this->lengths);\n }", "function has_length($value, $options) {\n if(isset($options['min']) && !has_length_greater_than($value, $options['min'])) {\n return false;\n } elseif(isset($options['max']) && !has_length_less_than($value, $options['max'])) {\n return false;\n } elseif(isset($options['exact']) && !has_length_exactly($value, $options['exact'])) {\n return false;\n } else {\n return true;\n }\n}", "protected function checkPcreVersion() {}", "function checkVatID_ie($vat_id) {\n\t\tif (strlen($vat_id) != 10)\n\t\t\treturn 0;\n\t\tif (!checkVatID_ie_new($vat_id) && !checkVatID_ie_old($vat_id))\n\t\t\treturn 0;\n\n\t\treturn 1;\n\t}", "function has_length($value, $options) {\r\n if(isset($options['min']) && !has_length_greater_than($value, $options['min'] - 1)) {\r\n return false;\r\n } elseif(isset($options['max']) && !has_length_less_than($value, $options['max'] + 1)) {\r\n return false;\r\n } elseif(isset($options['exact']) && !has_length_exactly($value, $options['exact'])) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n}", "public function validBytes() {\n\t\treturn $this->validByteCount;\n\t}", "public function hasCharVersion(){\n return $this->_has(5);\n }", "public function testCreditCardIsValid($data)\n {\n $pattern = \"/^([0-9]{4}[\\s]?){3}([0-9]{4})$/\";\n\n $this->assertMatchesRegularExpression($pattern,$data);\n\n }", "function _check_capthca()\n\t\t{\n\t\t\t$expiration = time()-3600 ;\n\t\t\t$sql = \" DELETE FROM captcha WHERE captcha_time < ? \";\n\t\t\t$binds = array($expiration);\n\t\t\t$query = $this->db->query($sql, $binds);\n\n\t\t\t//checking input\n\t\t\t$sql = \"SELECT COUNT(*) AS count FROM captcha WHERE word = ? AND ip_address = ? AND captcha_time > ?\";\n\t\t\t$binds = array($_POST['captcha'], $this->input->ip_address(), $expiration);\n\t\t\t$query = $this->db->query($sql, $binds);\n\t\t\t$row = $query->row();\n\n\t\tif ( $row -> count > 0 ){\n\t\t\t\treturn true;\n\t\t}\n\t\t\t\treturn false;\n\n\t\t}" ]
[ "0.77874863", "0.77803177", "0.68738616", "0.67686486", "0.62115264", "0.5985545", "0.57927614", "0.5788978", "0.5780474", "0.57607245", "0.5722373", "0.5708762", "0.57083076", "0.56876063", "0.56847167", "0.5669611", "0.5648677", "0.5622031", "0.5601647", "0.5598988", "0.5579393", "0.5565568", "0.55415165", "0.55380327", "0.5536171", "0.5528586", "0.55263907", "0.551505", "0.551505", "0.55043596", "0.5488261", "0.54793835", "0.5479236", "0.54719156", "0.5466991", "0.54642373", "0.5463029", "0.5446212", "0.54285", "0.5412321", "0.54110855", "0.5408721", "0.54012865", "0.5391317", "0.53861386", "0.53753036", "0.5370947", "0.5368977", "0.5345987", "0.5325195", "0.53047824", "0.5302176", "0.53000546", "0.52952623", "0.52860165", "0.52803653", "0.527351", "0.5268045", "0.5245036", "0.5241489", "0.5234181", "0.5225543", "0.5221367", "0.52174497", "0.52129793", "0.5207412", "0.51981086", "0.5195353", "0.5194004", "0.5194004", "0.51917934", "0.5186568", "0.51833063", "0.518077", "0.51734734", "0.5156278", "0.51508474", "0.51494515", "0.51444566", "0.51333016", "0.5118273", "0.51145273", "0.5092606", "0.50910187", "0.50870246", "0.50857854", "0.507976", "0.50757253", "0.5069116", "0.50646", "0.50639504", "0.5063155", "0.5060597", "0.5058811", "0.50532144", "0.50511944", "0.504944", "0.5045364", "0.5041353", "0.5040058" ]
0.8707792
0
The initialize method is called before the controller's beforeFilter method.
public function initialize( Controller $controller ) { $settings = $this->settings; $this->controller = $controller; // FIXME if( $this->_userId = $this->Session->read( 'Auth.User.id' ) ) { $this->controller->assert( valid_int( $this->_userId ), 'invalidParamForToken' ); // FIXME } $this->User = ClassRegistry::init( 'User' ); $this->Jetonfonction = ClassRegistry::init( 'Jetonfonction' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __init()\n\t{\n\t\t// This code will run before your controller's code is called\n\t}", "protected function initializeController() {}", "public function __construct()\n {\n $this->beforeFilter(function()\n {\n\n });\n }", "public function __construct()\n {\n $this->beforeFilter('auth');\n }", "public function __construct()\n {\n $this->beforeFilter('auth');\n }", "public function __construct()\n {\n parent::__construct();\n $this->beforeFilter('auth');\n }", "public function __construct() {\n\n $this->beforeFilter('auth');\n $this->beforeFilter('auth.admin');\n\n }", "public function _before_init(){}", "public function __construct(){\n $this->beforeFilter('auth');\n }", "public function __construct()\n\t{\n\t\t$this->beforeFilter('auth', ['except' => ['getIndex', 'getView']]);\n\t}", "public function __construct()\n {\n $this->beforeFilter('admin.auth');\n $this->beforeFilter('admin.role:admin');\n \t\n }", "public function __construct()\n {\n $this->beforeFilter('auth');\n\n $this->beforeFilter('csrf', array('on' => 'post'));\n }", "public function initialize()\n\t{\n\t\tparent::initialize();\n\t\t$this->loadComponent('Paginator');\n\t\t$this->loadComponent('Flash'); // Inclusion of the FlashComponent\n\n\n\t}", "public function init()\n {\n /* Initialize action controller here */\n }", "public function init()\n {\n /* Initialize action controller here */\n }", "public function initialize()\n {\n parent::initialize();\n\n $this->loadComponent('RequestHandler');\n $this->loadComponent('Flash');\n\n /*\n * Enable the following components for recommended CakePHP security settings.\n * see https://book.cakephp.org/3.0/en/controllers/components/security.html\n */\n //$this->loadComponent('Security');\n //$this->loadComponent('Csrf');\n }", "public function __construct() \n\t{\n\t\t$this->beforeFilter('apiauth');\n\t}", "public function __construct()\n {\n $this->beforeFilter('csrf', ['except' => ['index', 'create', 'show', 'edit']]);\n $this->beforeFilter('auth');\n }", "public function __construct()\n\t{\n\t\t$this->beforeFilter(function() {\n\t\t\t// Auth Check\n\t\t});\n\t}", "public function __construct()\n {\n \t\n \t # filter as we don't want to reauthenticate\n\t\t$this->beforeFilter('auth');\n\t\t\n\t\t$this->beforeFilter('csrf', array('on' => 'post')); # prevent cross site request forgery\n }", "public function __construct() {\n\n\t\t#Make sure Basecontroller construct gets called\n\t\tparent::__construct();\n\n\t\t#only logged in users are allowed here\n\t\t$this->beforeFilter('auth');\n\t}", "public function __construct()\n {\n $this->beforeFilter('csfr', array('on' => 'post'));\n }", "public function __construct()\n\t{\n\t\t$this->beforeFilter('auth'); //bloqueo de acceso\n\t}", "public function __construct()\n {\n $this->beforeFilter('CSRF', array('on' => 'post'));\n $this->beforeFilter('auth');\n }", "public function beforeFilter()\n {\n parent::beforeFilter();\n }", "public function beforeFilter()\n {\n parent::beforeFilter();\n }", "public function __construct()\n {\n // $this->beforeFilter('auth', ['on' => 'post']);\n }", "public function beforeFilter()\r\n\t {\r\n\t parent::beforeFilter();\r\n\t }", "public function __construct()\n {\n $this->setupFilters();\n }", "public function initialize()\n {\n parent::initialize();\n\n $this->loadComponent('RequestHandler');\n $this->loadComponent('Flash');\n\n $this->loadComponent('Acl', [\n 'className' => 'Acl.Acl'\n ]);\n $this->loadComponent('CakeDC/Users.UsersAuth');\n\n // if ($this->Auth->user('role_id') == 'e687cb91-4cdf-4ab2-992f-e76584199c2e') {\n // var_dump('Redirect');\n // $this->Auth->config('loginRedirect',['controller'=>'articles','action'=>'index']);\n // }\n\n /*\n * Enable the following components for recommended CakePHP security settings.\n * see https://book.cakephp.org/3.0/en/controllers/components/security.html\n */\n //$this->loadComponent('Security');\n //$this->loadComponent('Csrf');\n }", "public function initialize()\n {\n parent::initialize();\n\n $this->loadComponent('RequestHandler');\n $this->loadComponent('Flash');\n $this->loadComponent('Cookie', [\n 'expires' => Configure::read('Config.CookieExpires'),\n 'httpOnly' => true\n ]);\n $this->loadComponent('Common');\n $this->loadComponent('Auth', array(\n 'loginRedirect' => false,\n 'logoutRedirect' => false,\n 'loginAction' => array(\n 'controller' => 'customers',\n 'action' => 'login',\n 'plugin' => null\n ),\n 'sessionKey' => 'Auth.ChoTreo'\n ));\n }", "function beforeFilter() {\n parent::beforeFilter();\n }", "public function initialize()\n {\n parent::initialize();\n\n $this->loadComponent('RequestHandler');\n $this->loadComponent('Flash');\n $this->loadComponent('Auth', ['authenticate' =>\n ['ADmad/JwtAuth.Jwt' => [\n 'parameter' => 'token',\n 'userModel' => 'Sessions',\n 'fields' => [\n 'username' => 'username'\n ],\n 'scope' => ['Sessions.status' => 1],\n 'queryDatasource' => true\n ]\n ],'storage' => 'Memory',\n 'checkAuthIn' => 'Controller.initialize',\n 'loginAction' => false,\n 'unauthorizedRedirect' => false]);\n $this->loadComponent('Paginator');\n $this->loadComponent('BryanCrowe/ApiPagination.ApiPagination',[\n 'visible' => [\n 'page',\n 'current',\n 'count',\n 'perPage',\n 'prevPage',\n 'nextPage'\n ]\n ]);\n }", "public function beforeFilter() {\n\t}", "public function initialize()\n {\n parent::initialize();\n\n $this->loadComponent('RequestHandler');\n $this->loadComponent('Flash');\n $this->loadComponent('Auth', [\n 'authorize' => 'Controller',\n 'loginAction' => [\n 'controller' => 'Users',\n 'action' => 'login',\n ],\n 'loginRedirect' => [\n 'controller' => 'Users',\n 'action' => 'index/',\n ],\n 'logoutRedirect' => [\n 'controller' => 'Booking',\n 'action' => 'index',\n ],\n 'authError' => 'Enregistrez-vous ou Connectez-vous',\n 'authenticate' => [\n 'Form' => [\n 'fields' => ['username' => 'Email', 'password' => 'Password']\n ]\n ]\n ]\n );\n\n /*\n * Enable the following components for recommended CakePHP security settings.\n * see https://book.cakephp.org/3.0/en/controllers/components/security.html\n */\n //$this->loadComponent('Security');\n //$this->loadComponent('Csrf');\n }", "function beforeFilter() {\r\n parent::beforeFilter();\r\n }", "public function __construct()\n\t{\n\t\t$this->filter('before', 'orchestra::manage');\n\t\t\n\t\tparent::__construct();\n\t}", "public function initialize()\n {\n parent::initialize();\n\n $this->loadComponent('RequestHandler',[ 'enableBeforeRedirect' => false ]);\n $this->loadComponent('Flash');\n\n $this->loadComponent('Auth',[\n\n //'authorize' => ['Controller'],\n\n 'loginAction' => '/login',\n 'loginRedirect' => '/',\n 'logoutRedirect' => '/login',\n\n 'authenticate' => [\n 'Form' => [\n 'fields' => [\n 'username' => 'email',\n 'password' => 'password' \n ]\n ]\n ],\n 'loginAction' => [\n 'controller' => 'users',\n 'action' => 'login'\n ],\n\n 'storage' => 'Session'\n ]);\n }", "protected function _beforeInit() {\n\t}", "function beforeFilter(){\n\t\tparent::beforeFilter(); \n\t}", "public function initialize() {\n $this->add_hooks_and_filters();\n }", "public function __construct()\n\t{\n\t\tparent::__construct();\n\n\t\t$this->filter('before', 'orchestra::auth');\n\t}", "public function __construct() \n {\n $this->filter('before', 'login');\n }", "public function __construct()\n {\n $this->beforeFilter('auth.basic');\n }", "public function init()\n {\n $this->rootPageUid = $this->filterConfig->getSettings('rootPageUid');\n $this->respectEnableFields = $this->filterConfig->getSettings('respectEnableFields');\n $this->respectDeletedField = $this->filterConfig->getSettings('respectDeletedField');\n }", "public function initialize()\n {\n parent::initialize();\n\n $this->loadComponent('RequestHandler');\n $this->loadComponent('Flash');\n $this->loadComponent('Cookie');\n\t\t\n\t\t $this->loadComponent('Security');\n\n\t\t\n\t/*\n *Authentication,Redirect\n */\t\n\t\t$this->loadComponent('Auth', [\n\t\t\t\t\t'authenticate' => [\n\t\t\t\t\t'Form' => [\n\t\t\t\t\t'fields' => [\n\t\t\t\t\t'username' => 'username',\n\t\t\t\t\t'password' => 'password']],\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t],\n\t\t\t\t\t'loginAction' => [\n\t\t\t\t\t'controller' => 'Users',\n\t\t\t\t\t'action' => 'login'\n\t\t\t\t\t],\n\t\t\t\t\t\n\t\t\t\t\t'loginRedirect' => [\n\t\t\t\t\t'controller' => 'Documents',\n\t\t\t\t\t'action' => 'index'\n\t\t\t\t\t],\n\t\t\t\t\t'logoutRedirect' => [\n\t\t\t\t\t'controller' => 'Documents',\n\t\t\t\t\t'action' => 'index',\n\t\t\t\t\t'home'\n\t\t\t\t\t],\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t'unauthorizedRedirect' => $this->referer() \n\t\t\n\t\t]);\n\t\n /*permitted actions*/\n\t\t$this->Auth->allow(['display']);\n\t\t\t\n\t\t$this->Auth->allow([\n\t\t'display',\n\t\t'tagindex','searchDocument',\n\t\t'changeLangHu','changeLangEn'\n\t\t\n\t\t]);\n\t\t\n\t\t\n\t\t\n\n\t\t\n\n $this->loadComponent('Security');\n /*Protection against Cross Site Scripting*/\n $this->loadComponent('Csrf');\n }", "public function _initialize()\n {\n $this->cate=CONTROLLER_NAME;\n }", "public function initialize()\n {\n parent::initialize();\n $nav_selected = [\"slides\"];\n $this->set('nav_selected', $nav_selected);\n\n // Allow full access to this controller\n //$this->Auth->allow();\n }", "function beforeFilter() {\n \t/*$this->Auth->authenticate = ClassRegistry::init('User');*/\n \tparent::beforeFilter();\n }", "public function beforeFilter()\n\t{\n\n\t}", "public function __construct() {\n \t$this->beforeFilter('csrf', array('on'=>'post'));\n \t// protect unauthorized users from getting to the dashboard\n \t$this->beforeFilter('auth', array('only'=>array('getDashboard')));\n }", "public function __construct()\n {\n $this->beforeFilter('auth');\n\n $this->beforeFilter('connStoreDB');\n\n $this->afterFilter('disconnStoreDB');\n }", "public function __construct(){\n\t\t$this->beforeFilter('auth', ['except' => ['showLogin', 'doLogin', 'showWelcome', 'showHome']]);\n\n\t}", "public function __construct()\n {\n //$this->beforeFilter('auth', array('except' => array('get', 'index', 'show')));\n }", "public function __construct()\n\t{\n\t\tparent::__construct();\n\n\t\t$this->filter('before', 'orchestra::auth');\n\t\t\n\t\tEvent::fire('orchestra.started: backend');\n\t}", "function beforeFilter()\n {\n parent::beforeFilter();\n $this->Listing->controller = $this->name;\n $this->Listing->action = $this->action;\n\n # Make configuration available in models\n $this->Listing->Config = &$this->Config;\n }", "public function __construct()\n\t{\n\t\tparent::__construct();\n\n\t\t$this->filter('before', 'orchestra::auth');\n\n\t\tEvent::fire('orchestra.started: backend');\n\t}", "public function initialize()\n {\n \t\n \t$this->viewBuilder()->setLayout('default');\n \t\n parent::initialize();\n\n $this->loadComponent('RequestHandler');\n $this->loadComponent('Flash');\n\t\t$this->loadComponent('Auth', [\n 'authorize' => ['Controller'],\n 'loginRedirect' => [\n 'controller' => 'MasterListings', \n 'action' => 'index'\n ],\n 'logoutRedirect' => [\n 'controller' => 'Users', \n 'action' => 'login'\n ],\n 'loginAction' => [\n 'controller' => 'Users', \n 'action' => 'login'\n ],\n 'authenticate' => [\n 'Form' => [\n //'passwordHasher' => 'Blowfish',\n 'userModel' => 'Users', \n 'fields' => ['username' => 'username', 'password' => 'password'] \n \n ]\n ],\n\t\t\t\n 'authError' => 'you are not Authorise to Acccess this location.',\n 'storage' => 'Session'\n ]);\n\n /*\n * Enable the following components for recommended CakePHP security settings.\n * see http://book.cakephp.org/3.0/en/controllers/components/security.html\n */\n //$this->loadComponent('Security');\n //$this->loadComponent('Csrf');\n }", "public function initialize()\n {\n //$this->view->setTemplateBefore('public');\n }", "public function __construct() {\n\t\t$this->beforeFilter('csrf', array('on'=>'post'));\n\t}", "public function initialize()\n {\n parent::initialize();\n\n $this->loadComponent('RequestHandler',['enableBeforeRedirect'=>false]);\n $this->loadComponent('Flash');\n\n parent::initialize();\n ini_set('max_execution_time', \"600\"); //300 seconds = 5 minutes\n ini_set('memory_limit', '2048M');\n \n date_default_timezone_set('America/Bogota');\n $this->loadComponent('Auth', [\n 'authError' => 'Primero debes iniciar sesión.',\n 'authenticate' => [\n 'Form' => [\n 'userModel'=>'Usuarios',\n 'fields' => [\n 'username' => 'usuario',\n 'password' => 'password'\n ]\n ]\n ], \n 'loginAction' => [\n 'controller' => 'Usuarios',\n 'action' => 'login'\n ],\n \n //use isAuthorized in Controllers\n 'authorize' => ['Controller'],\n // If unauthorized, return them to page they were just on\n 'unauthorizedRedirect' => $this->referer(),\n\n 'storage' => 'Session'\n ]);\n if($this->Auth->user()){\n $this->_getMenuBD(); \n $this->getUserData();\n }\n $IndexPage = \"/Dashboard/index/\";\n $this->set(compact('IndexPage'));\n }", "function __construct() {\n $this->beforeFilter('auth.token');\n // ...\n }", "public function initialize() : void\n {\n // Use to initialise member variables.\n $this->filter = new MyTextFilter();\n $this->app->page->add(\"textfilter/navbar\", [], \"main\");\n }", "function beforeFilter() {\n }", "public function __construct()\n\t{\n\t\t// Hook into routing\n\t\tEvent::add('system.pre_controller', array($this, 'add'));\n\t}", "public function __construct() {\n $this->beforeFilter('csrf', array('on' => 'post'));\n }", "public function __construct()\r\n\t{\r\n\t\t$this->beforeFilter('csrf', array('on' => 'post'));\r\n\t}", "public function __construct()\n\t{\t\n\t\t// Hook into routing\n\t\tEvent::add('system.pre_controller', array($this, 'add'));\n\t}", "public function __construct()\n\t{\t\n\t\t// Hook into routing\n\t\tEvent::add('system.pre_controller', array($this, 'add'));\n\t}", "public function __construct() {\n\t\t$this->beforeFilter('csrf', array('on' => ['post']));\n\t}", "public function initialize()\n {\n parent::initialize();\n $this->loadComponent('RequestHandler');\n $this->loadComponent('Flash');\n $this->loadComponent('Cookie');\n $this->cors();\n\n $currentController = $this->request->getParam('controller');\n // pr($currentController); die();\n if($currentController == 'Tenants'){\n $currentController = 'TenantUsers';\n }\n if($currentController == 'CorporateClients'){\n $currentController = 'CorporateClientUsers';\n // pr($currentController);die();\n }\n // $currentController = $this->request->params['controller'];\n $loginAction = $this->Cookie->read('loginAction');\n if(!$loginAction){\n $loginAction = ['controller' => $currentController,'action' => 'login'];\n }\n // pr($loginAction);die;\n $this->loadComponent('Auth',[\n 'loginAction' => ['controller' => $currentController,'action' => 'login'],\n 'authenticate' => [\n 'Form' =>\n [\n 'userModel' => $currentController,\n 'fields' => ['username' => 'email', 'password' => 'password']\n ]\n ],\n 'authorize'=> ['Controller'],\n 'loginAction' => $loginAction,\n 'loginRedirect' => $loginAction,\n 'logoutRedirect' => $loginAction \n\n ]);\n // $this->loadComponent('Auth', [\n\n // 'unauthorizedRedirect' => false,\n // 'checkAuthIn' => 'Controller.initialize',\n\n // // If you don't have a login action in your application set\n // // 'loginAction' to false to prevent getting a MissingRouteException.\n // 'loginAction' => false\n // ]);\n /*\n * Enable the following components for recommended CakePHP security settings.\n * see https://book.cakephp.org/3.0/en/controllers/components/security.html\n */\n }", "public function __construct() {\n\tparent::__construct();\n\t$this->beforeFilter('csrf', array('on'=>'post'));\n\n\t}", "public function initialize()\n {\n parent::initialize();\n $this->Auth->allow(['logout', 'register', 'login', 'join']);\n }", "public function __construct()\n {\n $this->beforeFilter(function(){\n if (!Session::has('prac_id')) \n {\n return redirect('/unauthorizedaccess');\n }\n });\n }", "public function __construct()\n\t{\t\t\n\t\t// Hook into routing\n\t\tEvent::add('system.pre_controller', array($this, 'add'));\n\t}", "public function initialize(): void\n {\n parent::initialize();\n /*\n * Enable the following component for recommended CakePHP form protection settings.\n * see https://book.cakephp.org/4/en/controllers/components/form-protection.html\n */\n //$this->loadComponent('FormProtection');\n }", "public function preController(FilterControllerEvent $event)\r\n {\r\n $controller = $event->getController();\r\n\r\n // Return if its not an array\r\n if (!is_array($controller)) {\r\n return;\r\n }\r\n\r\n $controllerObject = $controller[0];\r\n\r\n // Make sure it can initialize\r\n if ($controllerObject instanceof InitializableControllerInterface) {\r\n\r\n $this->dispatcher->dispatch(\r\n UecodeCommonEvents::PRE_CONTROLLER_INITIALIZE,\r\n new ControllerEvent($controllerObject, $event)\r\n );\r\n\r\n $controllerObject->initialize(\r\n $this->getEntityManager(),\r\n $this->getUserService(),\r\n $this->getResponseService(),\r\n $this->getViewService()\r\n );\r\n\r\n $this->dispatcher->dispatch(\r\n UecodeCommonEvents::POST_CONTROLLER_INITIALIZE,\r\n new ControllerEvent($controllerObject, $event)\r\n );\r\n }\r\n\r\n return;\r\n }", "public function __construct()\n {\n //$this->middleware('auth');\n //$this->beforeFilter('collection_permissions');\n }", "public function __construct()\n\t{\n\t\t$this->beforeFilter('sentry');\n\t\tparent::__construct();\n\t}", "public function beforeFilter() {\n\t\t$this->Auth->authenticate = array('Hms');\n\t\t$this->Auth->authorize = array('Hms');\n\t}", "protected function before_filter() {\n\t}", "protected function initializeAction() {\n\t\t$this->akismetService->setCurrentRequest($this->request->getHttpRequest());\n\t}", "protected function _initialize()\n {\n // 客户资料\n $CustId = I('CustId');\n $this->customer = M('Customer')->find($CustId);\n\n // 操作者资料\n $this->user = session('user');\n }", "protected function initialize() {\n\t}", "public function initialize()\n {\n }", "public function initialize()\n {\n }", "public function initialize()\n {\n //\n }", "public function initialize()\n {\n parent::initialize();\n $this->Auth->allow(\n [\n 'login',\n 'logout',\n 'register',\n 'recover'\n ]\n );\n }", "protected function initialize()\n {\n }", "public function __construct()\n {\n $this->beforeFilter(function() {\n View::share('catnav', Category::all());\n });\n }", "protected function __onInit()\n\t{\n\t}", "public function __construct() {\n\n\t\t$this->beforeFilter('csrf', array ('on'=>['post','put', 'delete']));\n\t}", "public function initialize()\n {\n parent::initialize();\n $this->Auth->allow(['logout','nfsaLogin','home', 'login', 'ercmsRequest', 'index']);\n }", "public function initialize()\n {\n parent::initialize();\n }", "public function initialize()\n {\n parent::initialize();\n }", "public function init()\n\t{\n\t parent::init(); // Required to be called as of Yii2 v2.0.36 https://github.com/yiisoft/yii2/pull/18083#issuecomment-646020002\n\t\t$this->on(self::EVENT_BEFORE_ACTION, [$this, 'checkJsonRequested']);\n\t}", "public function initialize() {\n parent::initialize();\n $this->loadComponent('RequestHandler');\n }", "public function initialize() {\n parent::initialize();\n $this->loadComponent('RequestHandler');\n $this->loadComponent('Flash');\n $this->loadComponent('Auth');\n $userdata = $this->Auth->user();\n $this->set('loggeduser', $userdata);\n \n }", "public function initialize()\n {\n parent::initialize();\n\n $this->loadComponent('RequestHandler');\n $this->loadComponent('Flash');\n\n $this->request_data = $this->request->data;\n\n $header = array('Access-Control-Allow-Origin' => '*',\n 'Access-Control-Allow-Headers' => 'Origin, Authorization, X-Requested-With, Content-Type, Accept',\n 'Access-Control-Allow-Methods' => 'POST, GET, OPTIONS');\n \n $this->response->header($header);\n }", "public function __construct()\n\t{\n\t\t$this->beforeFilter(function() {\n\t\t\tif (Auth::user()->role != 'admin')\n\t\t\t\treturn view('only_for_admin');\n\t\t});\n\t}", "public function initialize()\n {\n }" ]
[ "0.8070821", "0.7997282", "0.798269", "0.79039645", "0.79039645", "0.7883938", "0.7727886", "0.7710762", "0.7702258", "0.76996106", "0.76937556", "0.76644254", "0.76495963", "0.76493293", "0.76493293", "0.7649171", "0.7619978", "0.7616893", "0.76118183", "0.76108426", "0.758662", "0.75829434", "0.75720483", "0.7571731", "0.7558416", "0.7558416", "0.75537056", "0.7534915", "0.750103", "0.74962157", "0.74922365", "0.7487686", "0.7487141", "0.7476274", "0.747466", "0.7439684", "0.7434656", "0.74320227", "0.7422012", "0.7400745", "0.7398177", "0.7392283", "0.73887724", "0.73841536", "0.735556", "0.7345143", "0.7331263", "0.7318047", "0.73175234", "0.73148286", "0.73123336", "0.731088", "0.7273648", "0.72681135", "0.7258591", "0.72435945", "0.723519", "0.72191995", "0.7211782", "0.7211567", "0.7207448", "0.7205507", "0.7196734", "0.71871656", "0.71705896", "0.7164367", "0.71598", "0.71550006", "0.71550006", "0.71457213", "0.71412206", "0.71370405", "0.7134389", "0.71310174", "0.7130968", "0.71267885", "0.712152", "0.7119679", "0.70912963", "0.7091028", "0.7086915", "0.70764244", "0.70686233", "0.705677", "0.7053444", "0.7053444", "0.70470876", "0.70465463", "0.7041088", "0.70407945", "0.70305854", "0.70109326", "0.700063", "0.6998898", "0.6998898", "0.6994438", "0.6992054", "0.69911736", "0.69849396", "0.69821495", "0.69779027" ]
0.0
-1
The beforeRedirect method is invoked when the controller's redirect method is called but before any further action. If this method returns false the controller will not continue on to redirect the request. The $url, $status and $exit variables have same meaning as for the controller's method.
public function beforeRedirect( Controller $controller, $url, $status = null, $exit = true ) { parent::beforeRedirect( $controller, $url, $status , $exit ); return $url; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function mustRedirect();", "public function beforeRedirect(Controller $Controller, $url, $status = null, $exit = true) {\n\t\tif (!empty($Controller->uses) && isset($Controller->{$Controller->modelClass}->lockable) && $Controller->{$Controller->modelClass}->lockable) {\n\t\t\tif (isset($Controller->params['form']['action']) && $Controller->params['form']['action'] == 'cancel') {\n\t\t\t\tClassRegistry::init('Locks.Lock')->deleteAll(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'Lock.class' => Inflector::camelize($Controller->plugin).'.'.$Controller->modelClass,\n\t\t\t\t\t\t'Lock.foreign_key' => $Controller->params['data'][$Controller->modelClass][$Controller->{$Controller->modelClass}->primaryKey]\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}", "protected function checkRedirect() {}", "public function redirect($url, $status = null, $exit = true) {\n\t // AuthComponent will call Controller::redirect(null, 403) in those cases.\n\t // with this we're making sure that we return valid JSON responses in all cases\n\t if($this->request->is('ajax') && $url == null && $status == 403) {\n\t $this->response = new CakeResponse(array('code' => 'code'));\n\t $this->response->send();\n\t return $this->_stop();\n\t }\n\t return parent::redirect($url, $status, $exit);\n\t }", "public function enableRedirect() {\n $this->with_redirect = true;\n }", "public function redirect();", "public function redirect();", "public function redirect();", "public function is_redirect()\n {\n }", "public function setRedirect($url, $code = 302);", "public function isRedirect();", "abstract protected function redirect();", "protected function processRedirect() {}", "public function isRedirect()\n {\n return true;\n }", "public function isRedirect()\n {\n return true;\n }", "public function isRedirect()\n {\n return true;\n }", "public function isRedirect()\n {\n return true;\n }", "public function redirect($redirectUrl);", "public function doRedirect() {\n if(is_null($this->redirect)) {\n return;\n }\n\n if(is_string($this->redirect)) {\n $this->setHeader(\"Location: \" . $this->redirect);\n }\n\n if(is_array($this->redirect)) {\n $url = '/?' . http_build_query($this->redirect);\n $this->setHeader(\"Location: \" . $url);\n }\n return;\n }", "public function redirect(string $url, $status_code = 302);", "public function isRedirect()\n {\n return false;\n }", "function redirect($location = ''){\n $this->_redirect = true;\n $this->_redirect_location = $location;\n $this->_HTML = false;\n $this->_JSON = false;\n }", "public function sendRedirect() {}", "public static function isRedirect() {\n\t return in_array(self::getStatus(),[301,302,303,307,308]);\n\t}", "public static function redirect_initial($url = '', $code = 302)\n {\n self::initial()->redirect($url, $code);\n }", "private function _redirect()\n\t{\n\n\t\t$this->_urlPagSeguro = $this->request->post['url_ps'];\n\n\t\tif (!empty($this->_urlPagSeguro )) {\n\t\t\theader('Location: ' . $this->_urlPagSeguro);\n\t\t\t$this->cart->clear();\n\t\t}\n\t}", "public function before() {\n\t\tif (!$this->request->is_ajax()) {\n\t\t\t$this->request->redirect('/');\n\t\t}\n\n\t\tparent::before();\n\t}", "public function redirectTo();", "public function handle_redirects() {\n global $CFG, $SESSION;\n require_once(__DIR__.'/../../signuplib.php');\n\n if(isset($SESSION->cancel) and $SESSION->cancel == 1) {\n $SESSION->cancel = 0;\n redirect($CFG->wwwroot);\n } elseif($this->page_number != convert_progressstring_to_progressnum($this->applicantprogress)) {\n force_signup_flow($this->page_number);\n }\n return true;\n }", "public function before()\n {\n parent::before();\n\n // Get the HTTP status code\n $action = $this->request->action();\n\n if ($this->request->is_initial())\n {\n // This controller happens to exist, but lets pretent it does not\n $this->request->action($action = 404);\n }\n else if ( ! method_exists($this, 'action_'.$action))\n {\n // Return headers only\n $this->request->action('empty');\n }\n\n // Set the HTTP status code\n $this->response->status($action);\n }", "public static function _redirect($url, $code = 303) {\n self::response(false)\n ->status($code)\n ->header('Location', $url)\n ->write($url)\n ->send();\n }", "public function redirect($url = '', $code = 302, $message = '') {\n\n //Before Dispatch Event\n Library\\Event::trigger('onBeforeRedirect');\n //echo $url;\n //print_R($this->route);\n $redirect = empty($url) ? trim($this->task->redirect) : $url;\n\n if (empty($redirect))\n return;\n\n //Now redirect\n return $this->route->redirect($redirect, $code, $message);\n }", "abstract protected function redirectTo();", "public function redirect(): void\n {\n $this->admin->redirect($this->redirect, $this->redirectCode);\n }", "public function redirect(){\r\n\t}", "public function redirect($url = '', $code = 302)\n\t{\n\t\tif (strpos($url, '://') === FALSE)\n\t\t{\n\t\t\t// Make the URI into a URL\n\t\t\t$url = URL::site($url, TRUE);\n\t\t}\n\n\t\t// Set the response status\n\t\t$this->status = $code;\n\n\t\t// Set the location header\n\t\t$this->headers['Location'] = $url;\n\n\t\t// Send headers\n\t\t$this->send_headers();\n\n\t\t// Stop execution\n\t\texit;\n\t}", "protected function _redirect($url = null)\n {\n $this->_actionFlag->set('', \\Magento\\Framework\\App\\ActionInterface::FLAG_NO_DISPATCH, true);\n if (null === $url) {\n $url = $this->_backendUrl->getUrl('adminhtml/noroute');\n } elseif (is_array($url)) {\n $url = $this->_backendUrl->getUrl(array_shift($url), $url);\n } elseif (false === strpos($url, 'http', 0)) {\n $url = $this->_backendUrl->getUrl($url);\n }\n $this->_response->setRedirect($url);\n }", "public function redirect($url = '', $code = 302)\n {\n $referrer = $this->uri();\n\n if (strpos($referrer, '://') === FALSE)\n {\n $referrer = URL::site($referrer, TRUE, ! empty(Kohana::$index_file));\n }\n\n if (strpos($url, '://') === FALSE)\n {\n // Make the URI into a URL\n $url = URL::site($url, TRUE, ! empty(Kohana::$index_file));\n }\n\n if (($response = $this->response()) === NULL)\n {\n $response = $this->create_response();\n }\n\n echo $response->status($code)\n ->headers('Location', $url)\n ->headers('Referer', $referrer)\n ->send_headers()\n ->body();\n\n // Stop execution\n exit;\n }", "protected function do_redirect($url, $code = 302) {\n header(\"Location: $url\", true, $code);\n exit;\n }", "function redirect($url, $statusCode = 303)\n{\n header('Location: ' . $url, true, $statusCode);\n die();\n}", "public function isRedirect()\n {\n $codes = [\n static::STATUS_MOVED_PERMANENTLY,\n static::STATUS_FOUND,\n static::STATUS_SEE_OTHER,\n static::STATUS_TEMPORARY_REDIRECT,\n ];\n\n return (\n in_array($this->code, $codes) &&\n $this->getHeaderLine('Location')\n );\n }", "public function performRedirect() {\n // Annoyingly, some old code in StandardController calls checkPersonID\n // instead of performRedirect() on delete, so this doesn't get triggered.\n // This should get fixed with Cake 4.\n \n if(!empty($this->request->params['named']['onFinish'])) {\n $this->redirect(urldecode($this->request->params['named']['onFinish']));\n }\n \n $copersonid = null;\n \n if(!empty($this->viewVars['vv_co_person']['CoPerson']['id'])) {\n $copersonid = $this->viewVars['vv_co_person']['CoPerson']['id'];\n } else {\n // Probably completed an edit() call\n $modelpl = strtolower($this->name);\n $authmodel = $this->modelClass . 'Authenticator';\n \n if(!empty($this->viewVars[$modelpl][0][$this->modelClass]['co_person_id'])) {\n $copersonid = $this->viewVars[$modelpl][0][$this->modelClass]['co_person_id'];\n }\n }\n\n $target = array();\n $target['plugin'] = null;\n $target['controller'] = \"authenticators\";\n $target['action'] = 'status';\n $target['copersonid'] = $copersonid;\n \n $this->redirect($target);\n }", "public static function handleRedirect(RedirectEvent $event)\n {\n \\Controller::redirect($event->getNewLocation(), $event->getStatusCode());\n }", "public function error301($redirectURI)\n {\n }", "public function redirect($strLocation, $intStatus = 303, $test = false, $skipSent = false)\n {\n $headers = [];\n\n if (headers_sent() && !$skipSent) {\n if ($test) {\n return static::TERMINATE_HEADERS_ALREADY_SENT;\n }\n\n // @codeCoverageIgnoreStart\n exit;\n // @codeCoverageIgnoreEnd\n }\n\n $strLocation = str_replace('&amp;', '&', $strLocation);\n\n // Make the location an absolute URL\n if (!preg_match('@^https?://@i', $strLocation)) {\n $strLocation = \\Environment::get('base').ltrim($strLocation, '/');\n }\n\n // Ajax request\n if (System::getContainer()->get('huh.request')->isXmlHttpRequest()) {\n $headers[] = 'HTTP/1.1 204 No Content';\n $headers[] = 'X-Ajax-Location: '.$strLocation;\n } else {\n // Add the HTTP header\n switch ($intStatus) {\n case 301:\n $headers[] = 'HTTP/1.1 301 Moved Permanently';\n\n break;\n\n case 302:\n $headers[] = 'HTTP/1.1 302 Found';\n\n break;\n\n case 303:\n $headers[] = 'HTTP/1.1 303 See Other';\n\n break;\n\n case 307:\n $headers[] = 'HTTP/1.1 307 Temporary Redirect';\n\n break;\n }\n\n $headers[] = 'Location: '.$strLocation;\n }\n\n if ($test) {\n return $headers;\n }\n\n // @codeCoverageIgnoreStart\n foreach ($headers as $header) {\n header($header);\n }\n\n exit;\n // @codeCoverageIgnoreEnd\n }", "function redirect() {\n\n\t\tif ($this->redirectUrl) {\n\t\t\tif ($this->message) {\n\t\t\t\tKenedoPlatform::p()->sendSystemMessage($this->message, $this->messageType);\n\t\t\t}\n\t\t\tKenedoPlatform::p()->redirect($this->redirectUrl);\n\t\t}\n\n\t}", "function auth_redirect() {\n\n\t\tauth_redirect();\n\n\t}", "public function before()\r\n\t{\r\n\t\tif ( ! Auth::instance()->logged_in('admin'))\r\n\t\t{\r\n\t\t\tif ($this->request->route() != Route::get('cms-session-login') && $this->request->route() != Route::get('cms-password-forgot') && $this->request->route() != Route::get('cms-password-sent') && $this->request->route() != Route::get('cms-password-change'))\r\n\t\t\t\t$this->request->redirect(Route::get('cms-session-login')->uri());\r\n\t\t}\r\n\r\n\t\t// Remember last visited page\r\n\t\tif ($this->request->method() == Request::GET && Session::instance()->get('back') != $this->request->referrer())\r\n\t\t{\r\n\t\t\tSession::instance()->set('back', $this->request->referrer());\r\n\t\t}\r\n\r\n\t\t// Set default number of records per page\r\n\t\tif (isset($_GET['per_page']))\r\n\t\t{\r\n\t\t\tSession::instance()->set('per_page', $this->request->query('per_page') == 'all' ? 2147483647 : $this->request->query('per_page'));\r\n\r\n\t\t\t$this->request->redirect(Request::detect_uri());\r\n\t\t}\r\n\r\n\t\tparent::before();\r\n\r\n\t\t$this->template\r\n\t\t\t->set('current_user', Auth::instance()->get_user())\r\n\t\t\t->set('affected_ids', Session::instance()->get('affected_ids'));\r\n\t}", "protected function shouldRedirect(): bool\n\t{\n\t\tif($this->session === null || $this->viewFactory === null || in_array($this->request->getMethod(), ['GET', 'HEAD']))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn ($this->input === null || $this->input->shouldRedirect()) && $this->respondWithJson() === false && $this->respondWithXml() === false;\n\t}", "public function isRedirect(): bool\n {\n return $this->code >= 300 && $this->code < 400;\n }", "public function setRedirectUrl($url);", "protected function redirect_protected()\n {\n }", "public function handle_redirection()\n {\n }", "public function beforeRoute()\n {\n if (!Session::get('userid')) {\n \\BarkaneArts\\redirect('/login');\n }\n parent::beforeRoute();\n }", "public function setRedirect($url, $code = 302)\n {\n /**\n * Use single transport object instance\n */\n if (self::$_transportObject === null) {\n self::$_transportObject = new Varien_Object;\n }\n self::$_transportObject->setUrl($url);\n self::$_transportObject->setCode($code);\n Mage::dispatchEvent('controller_response_redirect',\n array('response' => $this, 'transport' => self::$_transportObject));\n\n return parent::setRedirect(self::$_transportObject->getUrl(), self::$_transportObject->getCode());\n }", "public function testRedirect(): void\n {\n $this->post('/tests_apps/redirect_to');\n $this->assertResponseSuccess();\n $this->assertResponseCode(302);\n }", "function redirect() {\n //header('Location: ' . $this->url_origin($_SERVER, false)); \n exit(0);\n}", "public function beforeFilter() {\n \n //$this->redirect($this->referer());\n }", "public function testAssertRedirect(): void\n {\n $this->_response = new Response();\n $this->_response = $this->_response->withHeader('Location', 'http://localhost/get/tasks/index');\n\n $this->assertRedirect();\n $this->assertRedirect('/get/tasks/index');\n $this->assertRedirect(['controller' => 'Tasks', 'action' => 'index']);\n\n $this->assertResponseEmpty();\n }", "abstract protected function redirect($actionName, $controllerName = null, $extensionName = null, array $arguments = null, $pageUid = null, $delay = 0, $statusCode = 303);", "public function isRedirect(): bool\n {\n $statusCode = $this->getStatusCode();\n\n return $statusCode >= 300 && $statusCode < 400;\n }", "function ajan_core_redirect( $location, $status = 302 ) {\n\n\t// On some setups, passing the value of wp_get_referer() may result in an\n\t// empty value for $location, which results in an error. Ensure that we\n\t// have a valid URL.\n\tif ( empty( $location ) )\n\t\t$location = ajan_get_root_domain();\n\n\t// Make sure we don't call status_header() in ajan_core_do_catch_uri() as this\n\t// conflicts with wp_redirect() and wp_safe_redirect().\n\tactivitynotifications()->no_status_set = true;\n\n\twp_safe_redirect( $location, $status );\n\tdie;\n}", "public function redirectAction()\n {\n $model = new KBariotis_NBP_Model_NBP();\n\n $redirectUrl = $model->getRedirectUrl();\n\n if ($redirectUrl)\n $this->_redirectUrl($redirectUrl);\n else\n $this->_redirectUrl(Mage::getUrl('checkout/onepage/failure'));\n }", "public static function redirect($url = null, ?array $params = null, $session = null, $status = null) {}", "public function onKernelRequestRedirect(RequestEvent $event): void;", "public function redirect($url, $code=\\System\\Http\\Response::FOUND, $when=self::REDIRECT_AFTER_MODULES)\n\t\t{\n\t\t\t$when === self::REDIRECT_IMMEDIATELY && \\System\\Http\\Response::redirect($url, $code);\n\t\t\t$this->redirect[$when] = array(\"url\" => $url, \"code\" => $code);\n\t\t}", "public function isRedirect()\r\n\t{\r\n\t\treturn $this->_isRedirect;\r\n\t}", "public function callbackSuccess()\n {\n $this->redirectTo();\n }", "public function beforeFilter(){\n\t\t//redirect to top page in case of only input http://{url}/\n\t\tif(empty($this->params ['controller']) == TRUE){\n\t\t\t$this->redirect(array('controller' => 'home', 'action' => 'index'));\n\t\t}\n\t\t//redirect to top page in case of only input http://{url}/admin/\n\t\t\n\t\tif($this->params ['controller'] == 'admin'){\n\t\t\t$this->redirect(array('controller' => 'admin/users', 'action' => 'index'));\n\t\t}\n\t\t// if admin url requested, check the existing of session\n\t\telseif((isset($this->params ['admin']) == TRUE) && ($this->params ['controller']) != 'users'){\n\t\t\t// check user is logged in\n\t\t\tif(!$this->Session->check(SYS_LOG_000)){\n\t\t\t\t//if not, redirect to login page\n\t\t\t\t$url = Router::url(NULL, true);// get all url\n\t\t\t\tif(!preg_match('/login|logout/i', $url)){\n\t\t\t\t\t$this->Session->write('lastUrl',$url);\n\t\t\t\t}\n\t\t\t\t$this->Session->setFlash(array(Configure::read(SYS_LOG_000.'.SessionTimeout')),'flash_session', array(),'bad');\n\t\t\t\t$this->redirect(array('controller' => 'users', 'action' => 'index'));\n\t\t\t}\n\t\t\t//if user has logged in\n\t\t\t//$this->redirect(array('controller' => 'users', 'action' => 'default'));\n\t\t\t$this->layout='/admin/default';\n\t\t}\n\t\t\n \t//$this->requireNonSSL('');\n\t}", "protected function redirect($url)\n\t{\n\t\t$this->_redirect = $url;\n\t\t$this->_flow = PAGE_FLOW_REDIRECT;\n\t}", "private function redirect()\n {\n\n /* Do your controller action stuff here */\n $resultRedirect = $this->resultRedirectFactory->create();\n $resultRedirect->setPath('oct8ne/login/index');\n return $resultRedirect;\n }", "public function setRedirectUrl($redirectUrl);", "public function do_redirect() {\n\t\twp_safe_redirect( $GLOBALS['redirect_to'] );\n\t\texit;\n\t}", "protected function redirect($url, $code = 302) {\n // map request variables to URL if applicable\n foreach ($this->requestVars as $key => $value) {\n $url = str_replace(\"<$key>\", $value, $url);\n }\n \n header(\"Location: $url\", true, $code);\n exit;\n }", "public function customRedirect($param, $redirectcode) {\n\t$redirect = $this->trimSlash(Mage::getUrl($param));\n if($redirectcode == 0 || $redirectcode == 'default' || $redirectcode == 302 ){\n\t\tMage::app()->getFrontController()->getResponse()->setRedirect($redirect, 302);\n\t\t} else { \n\t\tMage::app()->getFrontController()->getResponse()->setRedirect($redirect, 301);\n\t\t} \n Mage::app()->getResponse()->sendResponse();\n exit;\n }", "function _redirect($url)\n {\n header(\"Location: $url\");\n }", "function http_redirect($url = null, ?array $params = null, $session = null, $status = null) {}", "protected function followRedirect()\n\t\t{\n\t\t\tif (!$this->followRedirect)\n\t\t\t\treturn false; /* disabled */\n\t\t\tif (!isset($this->responseHeaders['Location']) || !is_string($this->responseHeaders['Location'])) {\n\t\t\t\tSERIA_Base::debug('HTTP protocol violation: No location header with response code: '.$this->responseCode);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$redirectPoint = $this->url;\n\t\t\t$location = $this->responseHeaders['Location'];\n\n\t\t\tif(strpos($location, '://')===false)\n\t\t\t{ // handling illegal redirects (Location: /path)\n\t\t\t\t$pi = parse_url($this->url);\n\t\t\t\t$location = $pi['scheme'].'://'.$pi['host'].$location;\n\t\t\t}\n\n\t\t\tif ($this->responseCode == 301 || $this->responseCode == 307) {\n\t\t\t\t/*\n\t\t\t\t * Check whether this is a post request:\n\t\t\t\t */\n\t\t\t\tif (isset($this->currentRequest['postFields']) && $this->currentRequest['postFields'])\n\t\t\t\t\t$post = $this->currentRequest['postFields'];\n\t\t\t\telse {\n\t\t\t\t\tif (isset($this->currentRequest['postFiles']) && $this->currentRequest['postFiles'])\n\t\t\t\t\t\t$post = true;\n\t\t\t\t\telse\n\t\t\t\t\t\t$post = false;\n\t\t\t\t}\n\t\t\t\tif (isset($this->currentRequest['postFiles']) && $this->currentRequest['postFiles'])\n\t\t\t\t\t$postFiles = $this->currentRequest['postFiles'];\n\t\t\t\telse\n\t\t\t\t\t$postFiles = array();\n\t\t\t} else {\n\t\t\t\t$post = false;\n\t\t\t\t$postFiles = array();\n\t\t\t}\n\t\t\t$connectToHost = false;\n\t\t\t$port = false;\n\t\t\t$from = parse_url($redirectPoint);\n\t\t\t$to = parse_url($location);\n\t\t\tif ($from['scheme'] == $to['scheme'] && $from['host'] == $to['host'] && $from['port'] == $to['port']) {\n\t\t\t\tif (isset($this->currentRequest['connectToHost']))\n\t\t\t\t\t$connectToHost = $this->currentRequest['connectToHost'];\n\t\t\t\t$port = $this->currentRequest['port'];\n\t\t\t}\n\t\t\t$this->navigateTo($location, $post, $connectToHost, $port);\n\t\t\tforeach ($postFiles as $name => $file)\n\t\t\t\t$this->postFile($name, $file);\n\t\t\tif ($this->responseCode == 301)\n\t\t\t\t$this->movedPermanently[$redirectPoint] = $location;\n\t\t\treturn true;\n\t\t}", "public function isRedirect($location = null);", "protected function redirect($redirect, $status=302)\r\n {\r\n $this->slim->redirect($redirect, $status);\r\n }", "function redirect ($url){\n\t header(\"Location: $url\");\n\t\texit;\n\t}", "public function redirect($url, $status = NULL, $exit = true) {\n\tif (is_array($url) && !isset($url['language']) && $this->Session->check('User.language')) {\n\t $url['language'] = $this->Session->read('User.language');\n\t}\n\tparent::redirect($url, $status, $exit);\n }", "public function wp_redirect_status($status)\n {\n }", "public function isRedirect()\r\n {\r\n return $this->isSuccessful();\r\n }", "protected function redirect ( $url, $status = 302 ) {\n\t\t$this->perform();\n\n\t\t$codes = array( \n\t\t\t301 => 'Moved Permanently',\n\t\t\t302 => 'Found',\n\t\t\t307 => 'Temporary Redirect'\n\t\t );\n\n\t\tif ( isset( $codes[$status] ) ) {\n\t\t\t$this->header( \"HTTP/1.1 $status $codes[$status]\" );\n\t\t}\n\n\t\t$this->header( \"Location: $url\" );\n\n\t\treturn false;\n\t}", "public function isRedirection();", "public function isRedirect()\n {\n return $this->_isRedirect;\n }", "protected function redirectToCurrentPage() {}", "public function hasRedirectHTTPStatus() { return ($this->status == 301 || $this->status == 302 || $this->status == 303); }", "public function redirect($location, $method = false, $statusCode = null)\n {\n $success = ee()->session->flashdata(':new:message_success');\n $failure = ee()->session->flashdata(':new:message_failure');\n\n if ($failure) {\n $this->output->writeln('<error>'.$failure.'</error>');\n exit;\n }\n\n if ($success) {\n $this->output->writeln('<info>'.$success.'</info>');\n exit;\n }\n }", "public function setRedirect($redirect){\n $this->redirect = $redirect;\n }", "function auth_redirect()\n {\n }", "public function wp_redirect( $url, $status = 302 ) {\n\t\tglobal $wp_version;\n\n\t\t$this->redirect_url = $url;\n\t\t$this->redirect_code = $status;\n\n\t\t$this->iis_fix( $url );\n\t\t$this->cgi_fix( $url, $status );\n\n\t\tif ( intval( $status, 10 ) === 307 ) {\n\t\t\tstatus_header( $status );\n\t\t\tnocache_headers();\n\t\t\treturn $url;\n\t\t}\n\n\t\t$options = red_get_options();\n\t\t$headers = new Red_Http_Headers( $options['headers'] );\n\t\t$headers->run( $headers->get_redirect_headers() );\n\n\t\t// Do we need to set the cache header?\n\t\tif ( ! headers_sent() && isset( $options['redirect_cache'] ) && $options['redirect_cache'] !== 0 && intval( $status, 10 ) === 301 ) {\n\t\t\tif ( $options['redirect_cache'] === -1 ) {\n\t\t\t\t// No cache - just use WP function\n\t\t\t\tnocache_headers();\n\t\t\t} else {\n\t\t\t\t// Custom cache\n\t\t\t\theader( 'Expires: ' . gmdate( 'D, d M Y H:i:s T', time() + $options['redirect_cache'] * 60 * 60 ) );\n\t\t\t\theader( 'Cache-Control: max-age=' . $options['redirect_cache'] * 60 * 60 );\n\t\t\t}\n\t\t}\n\n\t\tstatus_header( $status );\n\t\treturn $url;\n\t}", "function redirect($location){\n\t\t \theader(\"Location: \" . $location);\n\t\t \t// never execute anything below u \n\t\t \texit; \n}", "function performRedirect() {\n // Figure out where to redirect back to based on how we were called\n \n $cop = null;\n \n if($this->action == 'add' && isset($this->request->data['CoGroupMember']['co_person_id'])) {\n $cop = $this->request->data['CoGroupMember']['co_person_id'];\n } elseif($this->action == 'delete'\n && isset($this->request->params['named']['return'])) {\n if($this->request->params['named']['return'] == 'person'\n && isset($this->request->params['named']['copersonid'])) {\n $cop = $this->request->params['named']['copersonid'];\n }\n // else return = group\n }\n \n if(isset($cop)) {\n $params = array('controller' => 'co_people',\n 'action' => 'canvas',\n $cop\n );\n } elseif(isset($this->gid)) {\n $params = array('controller' => 'co_groups',\n 'action' => 'edit',\n $this->gid,\n 'co' => $this->cur_co['Co']['id']\n );\n } else {\n // A perhaps not ideal default, but we shouldn't get here\n $params = array('controller' => 'co_groups',\n 'action' => 'index',\n 'co' => $this->cur_co['Co']['id']\n );\n }\n \n $this->redirect($params);\n }", "public function redirect( $url, $code = 302, $exit_after_redirect = true ) {\n\t\t$this->code( $code );\n\t\t$this->header( \"Location: $url\" );\n\t\tif ( $exit_after_redirect ) {\n\t\t\texit;\n\t\t}\n\t}", "public function redirect($url, $statusCode = 303) {\n header('Location: '.$this->di->get('Url')->url.'/'. $url, true, $statusCode);\n die();\n }", "protected function redirect($url, $status = 302)\n {\n $this->response->redirect($url, $status);\n }", "public function preDispatch() {\n if (!Zend_Auth::getInstance()->hasIdentity()) {\n $requestUri = Zend_Controller_Front::getInstance()->getRequest()->getRequestUri();\n $session = new Zend_Session_Namespace('lastRequest');\n $session->lastRequestUri = $requestUri;\n $this->_helper->redirector('index', 'index', 'login');\n }\n }", "protected function redirection($url, $code = 302) {\n\t\tmysql::close();\n\t\theader(\"Location: \" . $url, true, $code);\n\t\texit(0);\n\t}" ]
[ "0.6953164", "0.68876463", "0.65891665", "0.65512604", "0.64930564", "0.6413982", "0.6413982", "0.6413982", "0.63401526", "0.62921107", "0.62665105", "0.625516", "0.62379074", "0.62308836", "0.62308836", "0.62308836", "0.62308836", "0.6212034", "0.6190663", "0.61799985", "0.6137233", "0.6130744", "0.6081812", "0.60758835", "0.60456926", "0.60341996", "0.60105544", "0.6004693", "0.5979521", "0.5974162", "0.59655863", "0.5961832", "0.5960346", "0.5953565", "0.5951147", "0.59465504", "0.5944182", "0.59389997", "0.5928565", "0.59236306", "0.5899569", "0.5892393", "0.5869869", "0.5853464", "0.58353573", "0.583448", "0.58183295", "0.58153456", "0.58056426", "0.5801329", "0.57984436", "0.57978725", "0.5794714", "0.5783889", "0.5782309", "0.5775598", "0.57736576", "0.5772242", "0.5771784", "0.57702786", "0.5766827", "0.5766185", "0.5761279", "0.5758795", "0.5753549", "0.5746409", "0.5739683", "0.5739574", "0.5737699", "0.5718873", "0.5707015", "0.5705199", "0.57040435", "0.5702735", "0.5701857", "0.570096", "0.5694335", "0.56897205", "0.56896347", "0.5688626", "0.56681037", "0.56639", "0.56620187", "0.56582963", "0.5655769", "0.56531686", "0.5648131", "0.5645868", "0.5645173", "0.5634958", "0.5624996", "0.5621715", "0.5620495", "0.56177616", "0.5614071", "0.56121385", "0.56104696", "0.5588878", "0.55770063", "0.5572035" ]
0.7694723
0
Call the Model constructor
function __construct() { parent::__construct(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct()\n {\n $this ->model = $this ->makeModel($this ->model());\n }", "function __construct () {\n\t\t$this->_model = new Model();\n\t}", "function __construct()\n {\n // 呼叫模型(Model)的建構函數\n parent::__construct();\n \n }", "function __construc()\r\n\t{\r\n\t\tparent::Model();\r\n\t}", "function __construct()\r\n {\r\n parent::Model();\r\n }", "function __construct() {\r\n parent::Model();\r\n }", "function __construct() {\n // Call the Model constructor \n parent::__construct();\n }", "public function __construct() {\n // Call the Model constructor\n parent::__construct();\n }", "private function __construct($model)\r\n {\r\n\r\n }", "function __construct()\n {\n // Call the Model constructor\n parent::__construct();\n }", "function __construct()\n {\n // Call the Model constructor\n parent::__construct();\n }", "function __construct()\n {\n // Call the Model constructor\n parent::__construct();\n }", "function __construct()\n {\n // Call the Model constructor\n parent::__construct();\n }", "function __construct()\n {\n parent::Model();\n }", "function __construct(){\n\t\tparent::__construct();\n\t\t\t$this->set_model();\n\t}", "public function __construct()\n\t{\n\t\tif (!$this->model_name)\n\t\t{\n\t\t\t$this->model_name = str_replace('Model_', '', get_class($this));\n\t\t}\n\t\t$this->model_name = strtolower($this->model_name);\n\t\t\n\t\t$this->_initialize_db();\n\t}", "public function __construct()\n {\n parent::Model();\n\n }", "function __construct()\n\t\t{\n\t\t\t// Call the Model constructor\n\t\t\tparent::__construct();\n\t\t $this->load->database();\t\n\t\t}", "public function __construct()\n {\n // All of my models are like this\n parent::__construct(get_class($this));\n // Calling methods to get the relevant data\n $this->generateNewsData();\n $this->generateAnalyticsData();\n $this->generatePostsData();\n }", "public function __construct(){\n\t\tparent::__construct();\n\t\t$this->load->model('Model');\n\t}", "public function __construct(){\n\t\tparent::__construct();\n\t\t$this->load->model('Model');\n\t}", "public function __construct () {\n $this->model = 'App\\\\' . $this->model;\n $this->model = new $this->model();\n\n // Get the column listing for a given table\n $this->table_columns = Schema::getColumnListing( $this->table );\n }", "public function __construct()\n\t{\n\t\t// \\ladybug_dump($model);\n\t}", "function __construct () {\n\n\t\techo 'I am in Model';\n\n\t}", "public function __construct() {\n $this->openConnection();\n $this->model();\n }", "public function __construct()\n {\n $this->model = app()->make($this->model());\n }", "function __construct()\n {\n $this->openDatabaseConnection();\n $this->loadModel();\n }", "public function __construct(Model $model) {\n parent::__construct($model);\n \n }", "public function __construct()\n {\n $this->model = new BaseModel;\n }", "public function __construct()\n {\n parent::__construct();\n //自动加载相对应的数据模型\n if ($this->auto_load_model) {\n $model_name = $this->model_name ? $this->model_name . '_model' : $this->router->fetch_class() . '_model';\n $this->load->model($model_name, 'model');\n }\n $this->_set_user();\n $this->_check_resource();\n }", "public function __construct(){\n\t\tinclude_once(\"model/crews_model.php\");\n\t\t$this->model = new crews_model();\n\t}", "public function __construct($model) \n {\n parent::__construct($model);\n }", "public function __construct($initModel = true) {\n if ($initModel)\n $this->model = new Model();\n }", "public function __construct() {\n\t\tparent::__construct();\n\t\t$this->load->model('data');\n\t}", "public function __construct() {\n $this->porcentajesCursoModel = $this->model('PorcentajesCursoModel');\n $this->tipoModuloModel = $this->model('TipoModuloModel');\n $this->cursoModel = $this->model('CursoModel');\n }", "public function __construct() {\n $this->docenteModel = $this->model('DocenteModel');\n }", "function __construct(Model $model)\n {\n $this->model=$model;\n }", "public function __construct() {\n // load our model\n $this->userModel = $this->model('User'); // will check models folder for User.php\n }", "public function __construct($model)\n {\n //\n $this->model = $model;\n }", "public function __construct() {\n\t\t$this->orgModel = new OrgModel(); // TODO: \n\t }", "public function __construct()\n {\n\n $this->SubCategory = new SubCategoriesModel;\n $this->Functions = new ModelFunctions();\n }", "function __construct() {\n parent::__construct();\n $this->load->model('Callcenter_model');\n }", "public function __construct() {\n // und lädt das zugehörige Model\n $this->userModel = $this->model('User');\n }", "function __construct()\n {\n parent::__construct();\n $this->__resTraitConstruct();\n $this->load->model('VSMModel');\n $this->load->model('TextPreprocessingModel');\n\n }", "public function __CONSTRUCT(){\n $this->model = new Estadobien();\n }", "public function __construct()\r\n\t{\r\n\tparent::__construct();\r\n\t\r\n\t//load database libray manually\r\n\t$this->load->database();\r\n\t\r\n\t//load Model\r\n\t$this->load->model('Hello_Model');\r\n\t}", "function __construct() {\n\t\t$this->cotizacionModel = new cotizacionModel();\n\t}", "protected function _construct()\n {\n $this->_init(Model::class, ResourceModel::class);\n }", "public function __construct() {\n parent::__construct('md_rent_car', 'md_order');\n $this->log->log_debug('RentCarAffairModel model be initialized');\n }", "function __construct($model)\n {\n $this->model = $model;\n }", "public function __construct()\n {\n $this->modelName = explode('.', Route::currentRouteName())[0];\n $this->model = new Model($this->modelName);\n }", "public function __construct( Model $model ) {\n\t\t$this->model = $model;\n\t}", "public function __construct () {\n\t\tparent::__construct ();\n\t\t\n\t\tif ($this->models)\n\t\tforeach ($this->models as $model) {\n\t\t\tunset ($this->models[$model]);\n\t\t\t$this->models[$model] = $this->session->getModel ($model,$this);\n\t\t\t$this->$model = $this->models[$model];\n\t\t}\n\t}", "public function __construct()\n {\n \t parent::__construct();\n \t $this->load->model('Modelo');\n }", "function\t__construct()\t{\n\t\t\t\t/* contrutor da classe pai */\n\t\t\t\tparent::__construct();\n\t\t\t\t/* abaixo deverão ser carregados helpers, libraries e models utilizados\n\t\t\t\t\t por este model */\n\t\t}", "function __construct()\n {\n parent::__construct();\n\n\t\t$this->load->model('floatplan_model');\n\t\t$this->load->model('user_model');\n }", "public function __construct() {\r\n $this->model = new CompanyModel();\r\n }", "public function __construct($model){\r\n\t\t$this->model = $model;\r\n\t}", "public function __construct()\n {\n $this->MemberModel = new MemberModel();\n }", "public function __construct()\n\t{\n\t\t$this->modelProducts = new ProductsModel();\n\t\t/* ********** fin initialisation Model ********** */\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->model('LeBabeModel');\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->model('LeBabeModel');\n\t}", "public function __construct()\n {\n parent::__construct();\n\n $this->model = new MembersModel();\n }", "public function __construct() {\n $this->load = new Load();\n $this->model = new Model();\n }", "public function __construct()\n {\n echo \"constructeur model\";\n }", "function __construct()\n {\n $this->view = new View();\n $this->model = new si_cf_parametroModel();\n }", "public function __construct()\n\t\t{\n\t\t\t/*goi thang den ham _init trong ResourceModel*/\n\t\t\tparent::_init('lienhe', 'id', new ContactModel);\n\t\t}", "public function __construct()\n {\n parent::__construct();\n\n\t\t$this->load->model(\"options_model\");\n\t\t$this->load->model(\"selections_model\");\n\t\t$this->load->model(\"info_model\");\n\t\t$this->load->model(\"dealer_model\");\n\t\t$this->load->library(\"encrypt\");\n\t\t$this->load->model(\"promocode_model\");\n\t}", "public function __construct()\n {\n parent::__construct();\n $this->load->model(['m_voting', 'm_master', 'm_prospects', 'm_factors']);\n }", "public function __construct() {\n parent::__construct();\n $this->load->model('Thematic_model');\n }", "function __construct() {\n $this->model = new HomeModel();\n }", "public function __construct() {\n\n parent::__construct();\n\n // Load models\n $this->load->model(\"attributesModel\", \"attributes\");\n\n }", "public function __construct()\n\t{\n\t\t//MVC: makes CodeIgniter style $this->load->model() available to my controllers\n\t\t$this->load = new modelLoader($this);\n\t}", "public function __construct($model)\n {\n $this->model = $model;\n }", "public function __construct($model)\n {\n $this->model = $model;\n }", "public function __construct($model)\n {\n $this->model = $model;\n }", "public function __construct($model)\n {\n $this->model = $model;\n }", "public function __construct($model)\n {\n $this->model = $model;\n }", "public function __construct($model)\n {\n $this->model = $model;\n }", "public function __construct($model)\n {\n $this->model = $model;\n }", "public function __construct($model)\n {\n $this->model = $model;\n }", "public function __construct($model)\n {\n $this->model = $model;\n }", "function __construct()\n\t{\n\t\tparent :: __construct();\n\t\t$this -> load -> model('getinfo','m');\n\t}", "function __construct() {\n $this->loteModel = new loteModel();\n }", "public function __construct() {\n parent::__construct();\n $this->load->model(array('dt_diag_klsf_model','dt_obat_model','dt_pasien_model','dt_pemeriksaan_model','dt_proses_model','dt_thpan_model'));\n }", "function __construct()\n\t{\n\t\t// this->model = new Producto();\n\t}", "public function __construct()\n {\n // Call the CI_Model constructor\n parent::__construct();\n }", "public function __construct()\n {\n // Call the CI_Model constructor\n parent::__construct();\n }", "public function __construct() {\n\t\t$this->empleadoModel = $this->model('Empleado');\n\t}", "public function __construct()\r\n\t{\r\n\t\tparent::__construct();\r\n\t\t\r\n\t\t$this->load->model(array('user_model','program_model'));\r\n\t\t\r\n\t}", "public function __construct(Model $model)\n {\n // $this->$key = $model;\n $this->model = $model;\n }", "function __construct()\n {\n // load model\n Load::loadModel(\"helpDesk\");\n }", "public function __construct()\n\t{\n\t\t$this->model = new Layout_Model();\n\t}", "public function __construct(){\n $this->sliderModel = $this->model('Slider');\n $this->siteInfoModel = $this->model('SiteInfo');\n $this->officeModel = $this->model('Office');\n $this->categoryModel = $this->model('Category');\n $this->brandModel = $this->model('Brands');\n $this->productModel = $this->model('Products');\n $this->imgModel = $this->model('Image');\n }", "function __construct()\n {\n parent::__construct();\n // $this->load->model('');\n }", "public function __construct() {\r\n parent::__construct();\r\n $this->load->model(array(\r\n 'app_model'\r\n ));\r\n }", "function __construct(){\n\t\t\t$this->model = new model(); //variabel model merupakan objek baru yang dibuat dari class model\n\t\t\t$this->model->table=\"tb_dosen\";\n\t\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->model('TimeTable_model', 'tmtl');\n\t\t$this->load->model('Schools_model', 'schl');\n\t}", "public function __construct() {\n\t\t\t$this->modelName = 'concreeeeeete';\n\t\t}", "public function __construct($model = null)\n {\n $instance = $this->makeModel($model);\n parent::__construct($instance->getConnection()->query());\n $this->setModel($instance);\n }", "function __construct() {\n parent::__construct();\n $this->load->model('Fontend_model');\n $this->load->model('Package_model');\n }" ]
[ "0.8196736", "0.8080118", "0.8054001", "0.7839992", "0.78184336", "0.78158236", "0.7770901", "0.773286", "0.7704549", "0.7701882", "0.7701882", "0.7701882", "0.7701882", "0.76811564", "0.76426494", "0.75779855", "0.75710344", "0.75621206", "0.7518676", "0.75171185", "0.75171185", "0.7511973", "0.7489728", "0.7468261", "0.74572253", "0.7449389", "0.7445181", "0.7444535", "0.7427869", "0.7407304", "0.74014014", "0.73759925", "0.73413444", "0.7335981", "0.73260605", "0.7277932", "0.7272845", "0.72707343", "0.7265125", "0.7254405", "0.7252804", "0.72438663", "0.7242104", "0.7241692", "0.7240256", "0.7231797", "0.7230043", "0.72287345", "0.7228103", "0.722678", "0.72072005", "0.71945196", "0.7175319", "0.716174", "0.71547157", "0.7150238", "0.7140722", "0.71377164", "0.71358", "0.7132933", "0.7132409", "0.7132409", "0.71250975", "0.71239203", "0.71029484", "0.7092826", "0.70837456", "0.7072703", "0.70563996", "0.7049204", "0.70491046", "0.7045107", "0.70382833", "0.7036996", "0.7036996", "0.7036996", "0.7036996", "0.7036996", "0.7036996", "0.7036996", "0.7036996", "0.7036996", "0.7033529", "0.7029588", "0.7026682", "0.70233345", "0.70195305", "0.70195305", "0.7018619", "0.7012934", "0.7012402", "0.7007989", "0.70067614", "0.7005785", "0.7004497", "0.6996979", "0.69894654", "0.6989313", "0.6972264", "0.6970196", "0.6969221" ]
0.0
-1
contructor of the class
function __construct($id = NULL) { if ($id != NULL) { $this->id = $id; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _construct() {\n \t\n\t\t\n\t}", "final private function __construct() {\n\t\t\t}", "private function __construct()\t{}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct()\r\n\t{\r\n\t\r\n\t}", "public function _construct()\n\t{\n\n\t}", "private function __construct() {\r\n\t\r\n\t}", "function __construct (){\n\t\t}", "final private function __construct(){\r\r\n\t}", "private function __construct() { \n\t\t\n\n\t}", "public function __construct() { \n\t\t\n\n\t\t}", "private function __construct(){\n\t\t }", "function _construct(){ }", "public function __construct()\n\t\t{\n\t\t\t\n\t\t}", "private function __construct() {\n\t\t}", "private function __construct() {\r\n\t\t\r\n\t}", "public function __construct()\n\t\t{\n\t\t\t//\n\t\t}", "final private function __construct()\n\t{\n\t}", "private function __construct( )\n {\n\t}", "public function construct()\n\t\t{\n\t\t}", "private function __construct()\r\n\t{\r\n\t}", "function __construct()\r\n\t\t{\r\n\t\t\t\r\n\t\t}", "private function __construct()\n\t{\n\t\t\n\t}", "public function __construct()\r\n\t\t{\r\n\t\t}", "private function __construct()\r\r\n\t{\r\r\n\t}", "final private function __construct()\n {\n }", "private function __construct()\n\t{\n\n\t}", "final private function __construct() {}", "final private function __construct() {}", "public function __construct()\n\t\t{\n\t\t\t# code...\n\t\t}", "function __construct() {\n\n\t\t}", "private function __construct(){\n \t\n }", "public function __construct() {\n\n\t\t}", "function __construct() {\n\t\t\t\n\t\t}", "private function __construct () \n\t{\n\t}", "private function __construct()\r\n {}", "final private function __construct() { }", "final private function __construct() { }", "final private function __construct() { }", "function __construct(){\n\n\t\t}", "private function __construct() {\r\n\t}", "private function __construct() {\r\n\t}", "function __construct() ;", "private function __construct(){\n\t\n\t}", "public function __construct() {\n\t\t\n\t}", "public function __construct() {\n\t\t\n\t}", "public function __construct() {\n\t\t\n\t}", "public function __construct() {\n\t\t\n\t}", "public function __construct() {\n\t\t\n\t}", "public function __construct (){}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "function __constructor(){}", "private function __construct () {}", "function __construct(){}", "function __construct(){}", "function __construct(){}", "public function __construct() {\r\n\r\n\t\t}", "function __construct(){\n\t\t// nowt much...\n\t}", "public function __construct()\n\t\t{\t\t\t\n\t\t}", "public function __construct()\n\t{}", "public function __construct()\n\t{\n\t\n\t}", "public function __construct()\n\t{\n\t\n\t}", "protected function __construct()\r\n\t\t{\r\n\t\t}", "public function __construct() {\r\n\t\t//\r\n\t}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}" ]
[ "0.87680227", "0.8700297", "0.86710656", "0.8660726", "0.8660726", "0.8660726", "0.8660726", "0.8660726", "0.8660726", "0.8660726", "0.8660726", "0.8660726", "0.8660726", "0.8660726", "0.8660726", "0.8660726", "0.8660726", "0.8660726", "0.8660726", "0.8660726", "0.86428946", "0.86305267", "0.8615083", "0.8614659", "0.85868526", "0.8582963", "0.8579208", "0.85755813", "0.85752344", "0.8560891", "0.8553464", "0.85473734", "0.8545304", "0.8534987", "0.85317993", "0.8522833", "0.8521283", "0.8519905", "0.8519185", "0.85106003", "0.8507173", "0.8497912", "0.84975463", "0.8466518", "0.8466518", "0.84615314", "0.84605455", "0.8459056", "0.8458652", "0.8454436", "0.84521586", "0.84416133", "0.8434605", "0.8434605", "0.8434605", "0.8425069", "0.8423817", "0.8423817", "0.84223443", "0.84127027", "0.840215", "0.840215", "0.840215", "0.840215", "0.840215", "0.8396966", "0.8396377", "0.8396377", "0.8396377", "0.8396377", "0.8396377", "0.8396377", "0.8396377", "0.8396377", "0.8396377", "0.8390457", "0.83888835", "0.83861536", "0.83861536", "0.83861536", "0.8372806", "0.83690065", "0.83664364", "0.83578074", "0.8357336", "0.8357336", "0.83515084", "0.8345688", "0.8342958", "0.8342958", "0.8342958", "0.8342958", "0.8342958", "0.8342958", "0.8342958", "0.8342958", "0.8342958", "0.8342958", "0.8342958", "0.8342958", "0.8342958" ]
0.0
-1
Callback instead of rules.
public function testCallback1(): void { $model = $this->createModel(); $validator = $this->createValidator($model); // Age should be odd (nepāra skaitlis) $validator->rule('age', [ [ function ($field, $value, $params, $data) { return $value % 2 !== 0; }, 'message' => 'Age should be odd', ], ]); $err = $model->createEntity()->setMulti([ 'age' => 10, // odd number, so should throw error ])->validate(); $this->assertSame(['age' => 'Age should be odd'], $err); // error and custom message }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract function rules();", "abstract public function rules();", "abstract public function rules();", "abstract public function rules();", "abstract public function rules();", "abstract function rules();", "public function rules();", "public function rules();", "public function rules();", "abstract protected function getRules();", "protected function _generateRules()\n {\n }", "abstract public function parseRules();", "public function rules($data);", "abstract public function rules(): array;", "abstract public function rules(): array;", "abstract public function rules(): array;", "public function beforeRules(): void\n {\n }", "public function afterRules(): void\n {\n }", "public function buildRules(): void\n {\n }", "public function validateRules();", "abstract protected function rules($actor, $data, $obj = null);", "abstract public function rules() : array;", "public function rules()\n {\n }", "public static function allRules()\n {\n }", "public function getRules()\n {\n }", "public function getRules()\n {\n }", "public function getRules()\n {\n }", "public function getRules() {}", "abstract public function getRules(): array;", "public function rules()\n {\n //\n }", "public function setRules() {\n }", "abstract protected function validationRules() : array;", "public function rules(): array;", "public function rules(): array;", "public function setupValidatorRules()\n { }", "protected function processRules() {\n\n\t\t$active_lang = implode('|', array_keys( Yii::app()->params['languages'] ));\n\t\t$domain = Yii::app()->params['current_domain'];\n\t\t\n\t\t// if( ($urlrules = Yii::app()->cache->get('customurlrules')) === false )\n\t\t// {\n\t\t\t$_more = array();\n\t\t\t\n\t\t\t$dbCommand = Yii::app()->db->createCommand(\"SELECT alias, language FROM {{custompages}}\")->query();\n\t\t\t$urlRules = $dbCommand->readAll();\n\t\t\tforeach($urlRules as $rule)\n\t\t\t{\n\t\t\t\t$_more[ \"/<alias:({$rule['alias']})>\" ] = array('site/custompages/index');\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t$dbCommand = Yii::app()->db->createCommand(\"SELECT id, seoname FROM {{members}}\")->query();\n\t\t\t$urlUsers = $dbCommand->readAll();\n\t\t\tforeach($urlUsers as $uu)\n\t\t\t{\n\t\t\t\t$_more[ \"/user/<id:({$uu['id']})>-<alias:({$uu['seoname']})>\" ] = array('site/users/viewprofile');\n\t\t\t}\n\n\t\t\t$this->rules = array(\n\n\t\t\t\t//-----------------------ADMIN--------------\n\t\t\t\t\"/admin\" => 'admin/index/index',\n\t\t\t\t\"/admin/<_c:([a-zA-z0-9-]+)>\" => 'admin/<_c>/index',\n\t\t\t\t\"/admin/<_c:([a-zA-z0-9-]+)>/<_a:([a-zA-z0-9-]+)>\" => 'admin/<_c>/<_a>',\n\t\t\t\t\"/admin/<_c:([a-zA-z0-9-]+)>/<_a:([a-zA-z0-9-]+)>//*\" => 'admin/<_c>/<_a>/',\n\t\t\t\t//-----------------------ADMIN--------------\n\n //gii\n \"/gii\" => array('gii'),\n \"/gii/<_c:([a-zA-z0-9-_]+)>\" => array('gii/<_c>/'),\n \"/gii/<_c:([a-zA-z0-9-_]+)>/<_a:([a-zA-z0-9-_]+)>/*\" => array('gii/<_c>/<_a>/'),\n\n\t\t\t\t\"/products/category/<alias:.*?>\" => 'site/products/category/',\n \"/products/active/<type:(lowprice|cent|all)>/\" => 'site/products/active/',\n \"/products/ended/<type:(lowprice|cent|all)>/\" => 'site/products/ended/',\n \"/products/upcoming/<type:(lowprice|cent|all)>/\" => 'site/products/upcoming/',\n \"/products/label/<id:([a-zA-z0-9-_]+)?>\" => 'site/products/label/',\n \"/messagesShop/index/<shop_id:([a-zA-z0-9-_]+)?>\" => 'site/messagesShop/index/',\n \n \"/register/\" => 'site/profile/create/',\n \"/Anmeldung/\" => 'site/profile/create/',\n \n \"/search/detail/<condition:([a-zA-z0-9-_]+)?>\" => 'site/search/detail',\n \"/shop/search/<shop_id:([a-zA-z0-9-_]+)?>/<condition:([a-zA-z0-9-_]+)?>\" => 'site/shop/search/',\n \"/search.html/\" => 'site/search/search',\n \"/orders/customer/<shop_id:([a-zA-z0-9-_]+)>\" => 'site/orders/customer/',\n \"/admin/orders/vi_customer/<id:([a-zA-z0-9-_]+)>\" => 'site/admin/orders/vi_customer/',\n \"/shopRatings/detail/<shop_id:([a-zA-z0-9-_]+)>\" => 'site/shopRatings/detail/',\n \"/shopManager/detail/<shop_id:([a-zA-z0-9-_]+)>\" => 'site/shopManager/detail/',\n \"/custompages/detail/<alias:.*?>\" => 'site/custompages/detail',\n \"/shopNewsletter/sendNewletter/<shop_id:([a-zA-z0-9-_]+)>\" => 'site/shopNewsletter/sendNewletter/',\n \"/shopNewsletter/join/<shop_id:([a-zA-z0-9-_]+)>\" => 'site/shopNewsletter/join/',\n \"/blogshop/blog/<shop_id:([a-zA-z0-9-_]+)>/<blog_id:([a-zA-z0-9-_]+)>\" => 'site/blogshop/blog/',\n \"/blogshop/detail/<shop_id:([a-zA-z0-9-_]+)>\" => 'site/blogshop/detail/',\n \"/shop/sort/<shop_id:([a-zA-z0-9-_]+)>/<sort_id:([a-zA-z0-9-_]+)>\" => 'site/shop/sort/',\n \"/shop/contact/<shop_id:([a-zA-z0-9-_]+)>\" => 'site/shop/contact/',\n \"/shop/star/<shop_id:([a-zA-z0-9-_]+)>/<star:([a-zA-z0-9-_]+)>\" => 'site/shop/star/',\n \"/shop/findproduct/<shop_id:([a-zA-z0-9-_]+)>/<price:([a-zA-z0-9-_]+)>\" => 'site/shop/findproduct/',\n \"/shop/category/<shop_id:([a-zA-z0-9-_]+)>/<category_id:([a-zA-z0-9-_]+)>\" => 'site/shop/category/',\n \"/productsshop/detail/<shop_id:([a-zA-z0-9-_]+)>/<id:([a-zA-z0-9-_]+)>\" => 'site/productsShop/detail/',\n \"/productsshop/addComment\" => 'site/productsShop/addComment',\n \"/products/detail/<id:([a-zA-z0-9-_]+)>\" => 'site/products/detail/',\n \"/tags/detail/<slug:([a-zA-z0-9-_]+)>\" => 'site/tags/detail/',\n \"/shop/detail/<shop_id:([a-zA-z0-9-_]+)>\" => 'site/shop/detail/',\n \n \"/votes/voting/<type:(lowprice|cent|all)>/\" => 'site/votes/voting/',\n\n\t\t\t\t\"/<_a:(register|login|logout|verify)>\" => 'site/users/<_a>',\n\t\t\t\t\"/admin-login\" => 'site/users/admin',\n\t\t\t\t\"/forgot-password\" => 'site/users/lostpassword',\n\t\t\t\t\"/change-password\" => 'site/users/changepass',\n\t\t\t\t\"/contact-us\" => 'site/contactus/index',\n\t\t\t\t\"/messages\" => 'site/usermessages/index',\n\t\t\t\t\"/<_a:(viewmessage|sendmessage)>\" => 'site/usermessages/<_a>',\n\t\t\t\t// \"/invoices\" => 'site/transactions/index',\n\t\t\t\t// \"/buy-a-plan\" => 'site/transactions/buyplan',\n\t\t\t\t// \"/<_a:(earning|cashout)>\" => 'site/transactions/<_a>',\n\t\t\t\t// \"/<id:(\\d+)>-<ualias:(.*?)>/blog/<alias:(.*)>\" => array('site/blog/viewpost'),\n\t\t\t\t// Blogs\n\t\t\t\t\"/blog/category/<alias:(.*)>\" => 'site/blog/viewcategory',\n\t\t\t\t\"/blog/view/<alias:(.*)>\" => 'site/blog/viewpost',\n\n\t\t\t\t\"/\" => 'site/index/index',\n\t\t\t\t\"/<_c:([a-zA-z0-9-]+)>\" => 'site/<_c>/index',\n\t\t\t\t\"/<_c:([a-zA-z0-9-]+)>/<_a:([a-zA-z0-9-]+)>\" => 'site/<_c>/<_a>',\n\t\t\t\t\"/<_c:([a-zA-z0-9-]+)>/<_a:([a-zA-z0-9-]+)>//*\" => 'site/<_c>/<_a>/',\n \n \n \n\t\t\t);\n\n\t\t\t$urlrules = array_merge( $_more, $this->rules );\n\t\t\t//Yii::app()->cache->set('customurlrules', $urlrules);\n\t\t// }\n\t\t\n\t\t$this->rules = $urlrules;\n\t\t\n // Run parent\n parent::processRules();\n\n }", "private function process()\n {\n foreach ($this->rules as $key => $rule)\n {\n $exp = explode('|', $rule);\n\n foreach ($exp as $method)\n {\n if (strstr($method, ':')) list($method, $param) = explode(':', $method, 2);\n else $param = '';\n \n $input = array_get($this->input, $key);\n\n if (method_exists($this, \"process_$method\") === false)\n {\n if (!$input) continue;\n \n if (array_key_exists($method, self::$custom))\n {\n if (call_user_func(self::$custom[$method], $input, $param, $this) !== true) $this->set_error($key, $method);\n } else {\n throw new ValidatorNotFound(\"No validator exists for [$method]\");\n }\n } else {\n if (($input || $method == 'required') && $this->{\"process_$method\"}($input, $param, $this) !== true) $this->set_error($key, $method);\n }\n }\n }\n }", "public function executeRules()\n {\n // Retrieve rules for the current thing\n $rules = Rule::where('thingListener', $this->listener)->get();\n foreach ($rules as $rule) {\n if (true === $this->validateJson($rule->jsonRule)) {\n $this->jsonRule = json_decode($rule->jsonRule);\n $this->parseJson();\n }\n }\n\n return;\n }", "abstract protected function setValidationRules(): array;", "public function rules(): array\n {\n }", "public function getRule();", "protected function processRules() {\n $this->rules = array(\n 'dang-ky' => 'auth/register',\n 'lay-lai-mat-khau' => 'auth/forgotpassword',\n 'tim-kiem-san-pham' => 'product/search',\n 'tin-tuc/gioi-thieu' => 'site/about',\n 'doi-tac' => 'partner/index',\n 'tuyen-dung' => 'recruitment/list',\n 'dai-ly' => 'agency/list',\n 'tin-tuc/<title>-<id:\\d+>' => 'news/list',\n 'tin-tuc' => 'news/list',\n 'tin-tuc/chi-tiet/<title>-<id:\\d+>' => 'news/detail',\n 'lien-he' => 'site/contact',\n 'danh-muc-san-pham/<title>-<id:\\d+>-<sort>' => 'product/catalog',\n 'danh-muc-san-pham/<title>-<id:\\d+>' => 'product/catalog',\n 'nhan-hang/<name>-<id:\\d+>-<mid:\\d+>-<sort>' => 'product/manufacture',\n 'nhan-hang/<name>-<id:\\d+>-<mid:\\d+>' => 'product/manufacture',\n 'san-pham/<title>-<id:\\d+>' => 'product/detail',\n 'gio-hang' => 'shoppingcart/order',\n 'gio-hang/them-<id:\\d+>' => 'shoppingcart/add',\n \n '<controller:\\w+>/<id:\\d+>' => '<controller>/view',\n '<controller:\\w+>/<action:\\w+>/<id:\\d+>' => '<controller>/<action>',\n '<controller:\\w+>/<action:\\w+>' => '<controller>/<action>',\n );\n // Run parent\n parent::processRules();\n }", "function training_rules_callback() {\n rules_invoke_event('training_event');\n $output = 'Do event!';\n\n return array(\n array(\n '#type' => 'markup',\n '#markup' => $output,\n ),\n );\n}", "abstract protected function getValidationRules();", "public function get_all_rules()\n {\n }", "public function setupFilterRules()\n { }", "private function setupRules()\n {\n // Validator::extend('rule', 'App\\Support\\Rules\\Rule@validate');\n // Validator::replacer('rule', 'App\\Support\\Rules\\Rule@message');\n }", "public function getRules();", "protected function customRules()\n {\n return [\n ['company', 'validateExpenseType'],\n ]; // todo\n }", "protected function defineRules()\n {\n return [];\n }", "protected function buildValidationCallback() {\n }", "abstract public function addRule(ValidationRule$rule);", "public function rules()\n {\n return []\n //\n ;\n }", "public function rules($items = array()){\n //Merge the entered rules with the existing rules\n $this->rules = array_merge($this->rules, $items);\n }", "public function rules()\n {\n //no rules\n return [];\n }", "public function getRules(): array;", "public function getRules(): array;", "public function visitRule(ILess_Node_Rule $node, ILess_Visitor_Arguments $arguments)\r\n {\r\n $arguments->visitDeeper = false;\r\n }", "protected function preValidate() {}", "public function printRules() {}", "protected function setupDefaultsRules()\n { }", "public function rules($action, $id);", "public function rules()\n\t{\n\t\treturn(parent::rules());\n\t}", "public function compare_to_rule($value, $rule)\n {\n }", "public function apply() {}", "public function rules() {\n return $this->get_from_model(__FUNCTION__);\n }", "public function getAdminRules($callback)\n {\n $rules = $this->getProperty('rules');\n\n if ($rules && is_array($rules)) {\n foreach ($rules as $class) {\n $rule = $this->getCachedAdminRuleClass($class);\n\n $callback($rule);\n }\n }\n }", "public static function applyValidation() {\n foreach (self::$_rules as $rk => $rv) {\n $_element = self::$_rules[$rk];\n if (is_array($_element)) {\n foreach ($_element as $key => $ruleValue) {\n if (!self::$_elements[$rk]['inValid']) {\n $method = \"_\" . $key;\n self::$_inputElement = $rk;\n self::$_elementValue = self::$_values[$rk];\n self::$_validationRule = $key;\n self::$_ruleValue = $ruleValue;\n\n self::$method();\n }\n }\n }\n }\n\n if (count(self::$_response) == 0) {\n return true;\n }\n\n return self::$_response;\n }", "function hasCallbackKey( $rules );", "abstract protected function mapRule($field, $rule, $params, $message, $fieldType);", "private function applyRule($rule, $value, $fld) {\r\n if (isset($this->messages[$fld]))\r\n return;\r\n\r\n // -- laadt class\r\n $class = ucfirst($rule);\r\n // $path = 'lib/rules/' . $class . '.php';\r\n // if (!file_exists($path))\r\n // throw new Exception('not found: ' . $path);\r\n \r\n // include_once $path;\r\n\r\n // -- past rule toe\r\n $ruleObject = new $class($rule, $value, $fld);\r\n if (!$ruleObject->succeed())\r\n $this->messages[$fld] = $ruleObject->getMessage();\r\n }", "function getInputRules( $idx );", "public function run() {\n \n foreach( $this->validation_rules as $var=>$opt) {\n \n /*\n $default_opt = [\n 'min' => false,\n 'max' => false,\n 'required' => false,\n ];\n $opt = array_merge($default_opt,$opt);\n */\n \n //if compulsary field is not set then no point validating further\n if(isset($opt['set']) && !$this->is_set($var)) {\n continue;\n } \n \n /* Trim whitespace from beginning and end of variable */\n if( array_key_exists('trim', $opt) ) {\n $this->source[$var] = trim( $this->source[$var] );\n }\n \n $is_required = false;\n \n //if required field is empty then no point validating further\n if( isset($opt['required']) && !$this->not_empty($var) ) {\n continue;\n }\n \n if( isset($opt['required']) ) {\n unset($opt['required']);\n $is_required = true;\n }\n \n if( isset($opt['set']) )\n unset($opt['set']);\n \n if( isset($opt['trim']) )\n unset($opt['trim']);\n \n foreach( $opt as $rule_type=>$rule_val ) {\n $raw_field_value = isset($this->source[$var]) ? $this->source[$var] : false;\n \n /*\n if(is_string($raw_field_value) && strlen($raw_field_value) == 0 && !$is_required)\n continue;\n */\n $result = true;\n if( method_exists($this, 'validate_'.$rule_type) ) {\n $t_params = is_array($rule_val) ? array_merge([$var], $rule_val) : [$var, $rule_val];\n //$result = call_user_func_array([$this, 'validate_'.$rule_type], [$var, $rule_val]);\n $result = call_user_func_array([$this, 'validate_'.$rule_type], $t_params);\n }\n elseif( method_exists($this->caller_obj, $rule_type) ) {\n $t_params = is_array($rule_val) ? array_merge([$this, $raw_field_value], $rule_val) : [$this, $raw_field_value, $rule_val];\n $result = call_user_func_array([$this->caller_obj, $rule_type], $t_params);\n }\n elseif( function_exists($rule_type) ) {\n $t_params = is_array($rule_val) ? array_merge([$this, $raw_field_value], $rule_val) : [$this, $raw_field_value, $rule_val];\n $result = call_user_func_array($rule_type, $t_params);\n }\n \n if($result === false)\n break;\n }\n }\n }", "function after_validation() {}", "abstract public function runRule($property_short, $rule, $value = NULL);", "public function validateRules($args, $force = false);", "protected function processRules() {\n\t\t$active_lang = implode('|', array_keys( Yii::app()->params['languages'] ));\n\t\t$domain = Yii::app()->params['current_domain'];\n\t\t\n\t\t// if( ($urlrules = Yii::app()->cache->get('customurlrules')) === false )\n\t\t// {\n\t\t\t$_more = array();\n\t\t\t\n\t\t\t$dbCommand = Yii::app()->db->createCommand(\"SELECT alias, language FROM {{custompages}}\")->query();\n\t\t\t$urlRules = $dbCommand->readAll();\n\t\t\tforeach($urlRules as $rule)\n\t\t\t{\n\t\t\t\t$_more[ \"/<alias:({$rule['alias']})>\" ] = array('site/custompages/index');\n\t\t\t}\n\n\t\t\t//set url news category\n\t\t\t$dbCommand = Yii::app()->db->createCommand(\"SELECT alias FROM {{news_categorys}}\")->query();\n\t\t\t$urlRules = $dbCommand->readAll();\n\t\t\tforeach($urlRules as $rule)\n\t\t\t{\n\t\t\t\t$_more[ \"news/category/<alias:({$rule['alias']})>\" ] = array('site/news/viewcategory');\n\t\t\t}\n\n\t\t\t//set url news\n\t\t\t$dbCommand = Yii::app()->db->createCommand(\"SELECT alias FROM {{news}}\")->query();\n\t\t\t$urlRules = $dbCommand->readAll();\n\t\t\tforeach($urlRules as $rule)\n\t\t\t{\n\t\t\t\t$_more[ \"news/view/<alias:({$rule['alias']})>\" ] = array('site/news/viewpost');\n\t\t\t}\n\n\t\t\t//set url Products category\n\t\t\t$dbCommand = Yii::app()->db->createCommand(\"SELECT alias FROM {{categories}}\")->query();\n\t\t\t$urlRules = $dbCommand->readAll();\n\t\t\tforeach($urlRules as $rule)\n\t\t\t{\n\t\t\t\t$_more[ \"articles/category/<alias:({$rule['alias']})>\" ] = array('site/products/viewcategory');\n\t\t\t}\n\n\t\t\t//set url Products\n\t\t\t$dbCommand = Yii::app()->db->createCommand(\"SELECT alias FROM {{products}}\")->query();\n\t\t\t$urlRules = $dbCommand->readAll();\n\t\t\tforeach($urlRules as $rule)\n\t\t\t{\n\t\t\t\t$_more[ \"articles/view/<alias:({$rule['alias']})>\" ] = array('site/products/detail');\n\t\t\t}\n\n //set url Videos\n $dbCommand = Yii::app()->db->createCommand(\"SELECT alias FROM {{videos}}\")->query();\n $urlRules = $dbCommand->readAll();\n foreach($urlRules as $rule)\n {\n $_more[ \"hearing-tv/detail/<alias:({$rule['alias']})>\" ] = array('site/auditionTV/detail');\n }\n\n\t\t\t$dbCommand = Yii::app()->db->createCommand(\"SELECT id, seoname FROM {{members}}\")->query();\n\t\t\t$urlUsers = $dbCommand->readAll();\n\t\t\tforeach($urlUsers as $uu)\n\t\t\t{\n\t\t\t\t$_more[ \"/user/<id:({$uu['id']})>-<alias:({$uu['seoname']})>\" ] = array('site/users/viewprofile');\n\t\t\t}\n \n \t//$dbCommand = Yii::app()->db->createCommand(\"SELECT alias FROM {{products}}\")->query();\n\t\t\t//$urlRules = $dbCommand->readAll();\n\t\t\t$urlRules = array();\n\t\t\tforeach($urlRules as $rule)\n\t\t\t{\n\t\t\t\t$_more[ \"/articles/detail/<alias:({$rule['alias']})>\" ] = array('site/products/detail');\n\t\t\t}\n\n\t\t\t$this->rules = array(\n\n\t\t\t\t//-----------------------ADMIN--------------\n\t\t\t\t\"/admin\" => 'admin/index/index',\n \"/admin/articles\" => 'admin/products/index',\n \"/admin/articles/create\" => 'admin/products/create',\n \"/admin/articles/view\" => 'admin/products/view',\n \"/admin/articles/update\" => 'admin/products/update',\n \"/admin/articles/delete\" => 'admin/products/delete',\n \"/admin/articleComments\" => 'admin/ProductComments/index',\n \"/admin/articleComments/create\" => 'admin/ProductComments/create',\n \"/admin/articleComments/view\" => 'admin/ProductComments/view',\n \"/admin/articleComments/update\" => 'admin/ProductComments/update',\n \"/admin/articleComments/delete\" => 'admin/ProductComments/delete',\n\n\t\t\t\t\"/admin/<_c:([a-zA-z0-9-]+)>\" => 'admin/<_c>/index',\n\t\t\t\t\"/admin/<_c:([a-zA-z0-9-]+)>/<_a:([a-zA-z0-9-]+)>\" => 'admin/<_c>/<_a>',\n\t\t\t\t\"/admin/<_c:([a-zA-z0-9-]+)>/<_a:([a-zA-z0-9-]+)>//*\" => 'admin/<_c>/<_a>/',\n\t\t\t\t//-----------------------ADMIN--------------\n\n //gii\n \"/gii\" => array('gii'),\n \"/gii/<_c:([a-zA-z0-9-_]+)>\" => array('gii/<_c>/'),\n \"/gii/<_c:([a-zA-z0-9-_]+)>/<_a:([a-zA-z0-9-_]+)>/*\" => array('gii/<_c>/<_a>/'),\n\n\t\t\t\t\"/products/category/<alias:.*?>\" => 'site/products/category/',\n \"/products/active/<type:(lowprice|cent|all)>/\" => 'site/products/active/',\n \"/products/ended/<type:(lowprice|cent|all)>/\" => 'site/products/ended/',\n \"/products/upcoming/<type:(lowprice|cent|all)>/\" => 'site/products/upcoming/',\n \"/products/label/<id:([a-zA-z0-9-_]+)?>\" => 'site/products/label/',\n \"/articles\" => 'site/products/index/',\n \n \"/register/\" => 'site/profile/create/',\n \"/Anmeldung/\" => 'site/profile/create/',\n \"/guestbook\" => 'site/index/guestbook/',\n \"/grand-public\" => 'site/auditionTV/grandPublic',\n \"/videos-pro\" => 'site/auditionTV/videosPro',\n \"/hearing-TV\" => 'site/auditionTV/index',\n \"/classified-ads\" => 'site/Announcements/index',\n \"/formulaire_annonce\" => 'site/Announcements/register',\n \"/classified-ads/<id:([a-zA-z0-9-_]+)?>\" => 'site/Announcements/detail/',\n \"/hearing-care-centers\" => 'site/directoryOrders/directory',\n \"/hearing-aid-suppliers\" => 'site/directoryOrders/hearingAidSuppliers',\n \"/ENT-doctors\" => 'site/directoryOrders/doctors',\n \"/instrumentation-ORL\" => 'site/directoryOrders/InstrumentationORL',\n \"/services-ORL\" => 'site/directoryOrders/ServicesORL',\n \"/speech-therapists\" => 'site/directoryOrders/speechTherapists',\n \"/associative-sector\" => 'site/directoryOrders/associativeSector',\n \"/organizations\" => 'site/directoryOrders/organizations',\n \"/organizations/type/<alias:.*?>\" => 'site/directoryOrders/typeAgency/',\n \"/organizations/departement/<alias:.*?>\" => 'site/directoryOrders/department/',\n \"/organizations/ville/<alias:.*?>\" => 'site/directoryOrders/department/',\n \"/services/departement/<alias:.*?>\" => 'site/directoryOrders/services/',\n \"/services/ville/<alias:.*?>\" => 'site/directoryOrders/services/',\n \"/hospitals/<alias:.*?>/<id:.*?>\" => 'site/directoryOrders/hospitals/',\n \"/orthophonistes/departement/<alias:.*?>\" => 'site/directoryOrders/orthophonistes/',\n \"/orthophonistes/ville/<alias:.*?>\" => 'site/directoryOrders/orthophonistes/',\n \"/speech/<alias:.*?>/<id:.*?>\" => 'site/directoryOrders/speech/',\n \"/event/<id:([a-zA-z0-9-_]+)?>\" => 'site/Events/detail',\n \"/laureates-CNA\" => 'site/students/laureatesCNA',\n \"/espace-pro\" => 'site/regulation/espacePro',\n \"/appear-directory\" => 'site/directoryOrders/appearDirectory',\n \"/doctors/departement/<alias:.*?>\" => 'site/directoryOrders/doctorsByDepartment/',\n \"/doctors/ville/<alias:.*?>\" => 'site/directoryOrders/doctorsByDepartment/',\n \"/doctor/<alias:.*?>/<id:.*?>\" => 'site/directoryOrders/detailDoctor/',\n\n \"/search\" => 'site/index/search',\n \"/search-advanced\" => 'site/index/searchAdvanced',\n \"/searchalpha\" => 'site/index/searchAlpha',\n \"/supports\" => 'site/index/supports',\n \"/orders/customer/<shop_id:([a-zA-z0-9-_]+)>\" => 'site/orders/customer/',\n \"/admin/orders/vi_customer/<id:([a-zA-z0-9-_]+)>\" => 'site/admin/orders/vi_customer/',\n \"/custompages/detail/<alias:.*?>\" => 'site/custompages/detail',\n \"/products/detail/<id:([a-zA-z0-9-_]+)>\" => 'site/products/detail/',\n \"/support/detail/<id:([a-zA-z0-9-_]+)>\" => 'site/support/detail/',\n \"/tags/detail/<slug:([a-zA-z0-9-_]+)>\" => 'site/tags/detail/',\n \n\n\t\t\t\t\"/<_a:(register|login|logout|verify)>\" => 'site/users/<_a>',\n\t\t\t\t\"/admin-login\" => 'site/users/admin',\n\t\t\t\t\"/affiliate-login\" => 'site/users/affiliate',\n\t\t\t\t\"/forgot-password\" => 'site/users/lostpassword',\n\t\t\t\t\"/change-password\" => 'site/users/changepass',\n\t\t\t\t\"/contact-us\" => 'site/contactus/index',\n\t\t\t\t\"/news-letter\" => 'site/newsletter/index',\n\t\t\t\t\"/messages\" => 'site/usermessages/index',\n\t\t\t\t\"/users-login\" => 'site/login/index',\n\t\t\t\t\"/directory-orders\" => 'site/directoryOrders/create',\n\t\t\t\t\"/<_a:(viewmessage|sendmessage)>\" => 'site/usermessages/<_a>',\n\t\t\t\t// \"/invoices\" => 'site/transactions/index',\n\t\t\t\t// \"/buy-a-plan\" => 'site/transactions/buyplan',\n\t\t\t\t// \"/<_a:(earning|cashout)>\" => 'site/transactions/<_a>',\n\t\t\t\t// \"/<id:(\\d+)>-<ualias:(.*?)>/blog/<alias:(.*)>\" => array('site/blog/viewpost'),\n\t\t\t\t// Blogs\n\t\t\t\t\"/blog/category/<alias:(.*)>\" => 'site/blog/viewcategory',\n\t\t\t\t\"/blog/view/<alias:(.*)>\" => 'site/blog/viewpost',\n\n\t\t\t\t\"/\" => 'site/index/index',\n\t\t\t\t\"/<_c:([a-zA-z0-9-]+)>\" => 'site/<_c>/index',\n\t\t\t\t\"/<_c:([a-zA-z0-9-]+)>/<_a:([a-zA-z0-9-]+)>\" => 'site/<_c>/<_a>',\n\t\t\t\t\"/<_c:([a-zA-z0-9-]+)>/<_a:([a-zA-z0-9-]+)>//*\" => 'site/<_c>/<_a>/',\n \n \n \n\t\t\t);\n\n\t\t\t$urlrules = array_merge( $_more, $this->rules );\n\t\t\t//Yii::app()->cache->set('customurlrules', $urlrules);\n\t\t// }\n\t\t\n\t\t$this->rules = $urlrules;\n\t\t\n // Run parent\n parent::processRules();\n\n }", "public function getRules(): Collection;", "public function beforeMatch($callback)\n {\n $this->beforeMatchCallback = $callback;\n }", "public function rules()\n {\n if( $this->is('category/store') ) {\n return $this->createRules();\n return $this->messages();\n } \n elseif ( $this->is('category/update/{id}') ) {\n return $this->updateRules();\n return $this->messages();\n }\n }", "abstract public function runValidation();", "public function mod_rewrite_rules()\n {\n }", "abstract protected function afterSuccessValidation();", "public function page_rewrite_rules()\n {\n }", "abstract public function getValidationRules(): array;", "public function testGetRules()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "protected function _callback($reflection) {\n\t\t$args = array_merge(array($reflection), $this->args);\n\t\t// Call the particular filtering checker\n\t\t$res = call_user_func_array(array($this, $this->method), $args);\n\t\t// Return that value, taking negate into account\n\t\treturn $this->negate ? !$res : $res;\n\t}", "function before_validation(){}", "public function append(callable $rule)\n {\n $this->rules[] = $rule;\n }", "public function validationRules( array $input );", "public function rules()\n {\n $this->setOrdenarPor();\n return parent::rules();\n }", "public function createRules()\n {\n return [];\n }", "abstract protected function prepareFieldValidationRule($field_validation_rule);", "public function registerRules(){\n \t// $this->applyValidationDateRange('start_event', 'end_event', 'editable_cierre');\n \t// $this->applyValidationTextMemo('desc_sol_comun', 3000, 0);\n \t$this->applyValidationClear('desc_sol_comun', 3000, 0);\n\t}", "public function add_rule( WP_Autoload_Rule $rule );", "public function initRules() {\n $config = Context::$appConfig;\n if (isset($config->interceptRules['pre'])) {\n $this->preRules = $config->interceptRules['pre'];\n }\n if (isset($config->interceptRules['post'])) {\n $this->postRules = $config->interceptRules['post'];\n }\n }", "public function rules()\n {\n return parent::rules();\n }", "public function testValidateMultipleRules() {\n $validator = new Validator();\n $value = 15;\n $collection = new RuleCollection();\n $collection->addRule($this->getMockRuleReturnTrue());\n $collection->addRule($this->getMockRuleReturnTrue());\n $result = $validator->validateMultipleRules($value, $collection);\n $this->assertTrue($result);\n }", "abstract protected function getPatternsAndCallbacks(): array;", "public function validate()\n {\n foreach ( $this->rules as $key => $rules ) {\n foreach ( $rules as $type => $rule ) {\n if ( $this->hasErrors( $key ) )\n break;\n $this->validateRule( $key, $type, $rule );\n }\n }\n }", "function custom_rewrite_rule() {\n\n}" ]
[ "0.74657136", "0.71453434", "0.71453434", "0.71453434", "0.71453434", "0.7121836", "0.67501414", "0.67501414", "0.67501414", "0.66861004", "0.64135826", "0.6401654", "0.63241017", "0.6260465", "0.6260465", "0.6260465", "0.6248875", "0.6235612", "0.61692274", "0.6160403", "0.61330605", "0.6110758", "0.6102282", "0.6101519", "0.6044202", "0.6044202", "0.6044202", "0.60354173", "0.60104203", "0.59735143", "0.5929199", "0.5917428", "0.590287", "0.590287", "0.5876634", "0.5867524", "0.57977134", "0.5796915", "0.5784829", "0.5779976", "0.5755519", "0.57135934", "0.57063633", "0.57003915", "0.5650955", "0.5650255", "0.56335145", "0.5608379", "0.55782586", "0.55561125", "0.55525124", "0.5540539", "0.5505225", "0.5469096", "0.5445026", "0.5419279", "0.5419279", "0.5415016", "0.5404773", "0.54040945", "0.53971034", "0.5378583", "0.5369476", "0.5366519", "0.5365818", "0.5362696", "0.5360488", "0.5333831", "0.5326556", "0.5318769", "0.5311451", "0.5307998", "0.5306451", "0.53011847", "0.5292891", "0.5288685", "0.5284664", "0.5276113", "0.52760684", "0.52700204", "0.5267625", "0.5261288", "0.5260078", "0.52587616", "0.5246839", "0.52357423", "0.52270687", "0.5208964", "0.5195604", "0.5194291", "0.5177883", "0.5177725", "0.5176424", "0.5176263", "0.5162989", "0.51596075", "0.51564986", "0.5145315", "0.51356196", "0.51194626", "0.51098293" ]
0.0
-1
Create a new employee provider.
public function __construct(HasherContract $hasher, string $scope) { parent::__construct($hasher, Employee::class); if (! in_array($scope, $this->allowedScopes)) { throw new InvalidArgumentException("Employee scope [$scope] is not allowed."); } $this->scope = $scope; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createProvider();", "public function create($params) {\n\t\t$this->validateInput($params);\n\n\t\t$employee = $this->employee->forceCreate($this->formatParams($params));\n\n\t\t$employee_term = $this->createEmployeeTerm($employee, $params);\n\n\t\t$this->createEmployeeDesignation($employee, $params, $employee_term->id);\n\n\t\t$this->createEmployeeSalary($employee, $params);\n\n\t\t$this->createEmployeeQualification($employee, $params);\n\n\t\t$this->createEmployeeAccounts($employee, $params);\n\n\t\t$this->createEmployeeDocuments($employee, $params);\n\n\t\tif (gbv($params, 'login_enable')) {\n\t\t\t$this->updateUserLogin($employee, $params);\n\t\t}\n\n\t\treturn $employee;\n\t}", "public function store(CreateProviderRequest $request)\n\t{\n\t \n\t\tProvider::create($request->all());\n\n\t\treturn redirect()->route('admin.provider.index');\n\t}", "public function createEmployee()\n {\n $this->view('employees/create');\n }", "public function create_employee()\n {\n //get dropdown data\n $functional_units = [];\n $data = [];\n $this->get_data($data, $functional_units);\n\n return view('accounts.create_employee')->with([\n 'functional_units' => $functional_units, \n 'data' => $data\n ]);\n }", "public function createProvider($type, $name, array $credentials)\n {\n $this->requestWithErrorHandling('post', '/api/teams/'.Helpers::config('team').'/providers', [\n 'type' => $type,\n 'name' => $name,\n 'meta' => $credentials,\n ]);\n }", "public function createAction()\n {\n if (!$this->request->isPost()) {\n $this->dispatcher->forward([\n 'controller' => \"employee\",\n 'action' => 'index'\n ]);\n\n return;\n }\n\n $employee = new Employee();\n $employee->id = $this->request->getPost(\"id\");\n $employee->name = $this->request->getPost(\"name\");\n $employee->surename = $this->request->getPost(\"surename\");\n $employee->patronymic = $this->request->getPost(\"patronymic\");\n $employee->position = $this->request->getPost(\"position\");\n $employee->departmentId = $this->request->getPost(\"department_id\");\n \n\n if (!$employee->save()) {\n foreach ($employee->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n $this->dispatcher->forward([\n 'controller' => \"employee\",\n 'action' => 'new'\n ]);\n\n return;\n }\n\n $this->flash->success(\"employee was created successfully\");\n\n $this->dispatcher->forward([\n 'controller' => \"employee\",\n 'action' => 'index'\n ]);\n }", "public function create()\n {\n return view('admin.providers.create', compact('provider', 'addresses'));\n }", "public function store(ProviderCreateRequest $request)\n {\n try {\n\n $this->validator->with($request->all())->passesOrFail(ValidatorInterface::RULE_CREATE);\n\n $provider = $this->repository->create($request->all());\n\n $response = [\n 'message' => 'Provider created.',\n 'data' => $provider->toArray(),\n ];\n\n if ($request->wantsJson()) {\n\n return response()->json($response);\n }\n\n return redirect()->back()->with('message', $response['message']);\n } catch (ValidatorException $e) {\n if ($request->wantsJson()) {\n return response()->json([\n 'error' => true,\n 'message' => $e->getMessageBag()\n ]);\n }\n\n return redirect()->back()->withErrors($e->getMessageBag())->withInput();\n }\n }", "public function create()\n\t{\n\t \n\t \n\t return view('admin.provider.create');\n\t}", "public function createEmployee() {\n $newUser = User::create([\n \"name\"=>request('name'),\n \"email\"=>request('email'),\n \"password\"=> '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm',\n \"organizationId\"=>Auth::user()->organizationId,\n \"role\"=>\"employee\",\n \"password_token\"=>\\str_random(100)\n ]);\n\n $headers = request('headers');\n\n if(isset($headers)) {\n for($i = 0; $i < sizeof($headers); $i++) {\n Header::create([\n 'header'=>$headers[$i],\n 'userId'=>$newUser->id\n ]);\n }\n }\n\n return back();\n }", "public function storeNewEmployer($input);", "public function create()\n {\n //\n return view('admin.provider.create');\n }", "public function store(StoreEmployeeRequest $request)\n {\n // Send request to RandomUser API to get fake employee data\n $client = new Client();\n $url = \"https://randomuser.me/api/\";\n\n try {\n $response = $client->request(\"GET\", $url);\n } catch (RequestException $e) {\n if ($e->hasResponse()) {\n return [\n 'result' => 'error',\n 'message' => Psr7\\Message::toString($e->getResponse())\n ];\n }\n }\n\n $random_data = json_decode((string)$response->getBody())->results[0];\n\n // Create new employee\n $employee = new Employee();\n $employee['gender'] = $random_data->gender;\n $employee['first_name'] = $random_data->name->first;\n $employee['last_name'] = $random_data->name->last;\n $employee['title'] = $random_data->name->title;\n $employee['address'] = implode(\n \" \",\n [\n $random_data->location->street->number,\n $random_data->location->street->name,\n ]\n );\n $employee['city'] = $random_data->location->city;\n $employee['state'] = $random_data->location->state;\n $employee['country'] = $random_data->location->country;\n $employee['postcode'] = $random_data->location->postcode;\n $employee['email'] = $random_data->email;\n $employee->save();\n $employee_id = $employee->id;\n\n $data = $request->all();\n\n // Create employee experience\n foreach ($data['experience'] as $row) {\n $experience = new Experience([\n 'employee_id' => $employee_id,\n 'company_name' => $row['company_name'],\n 'job_title' => $row['job_title'],\n 'experience' => $row['experience'],\n 'month_from' => $row['month_from'],\n 'year_from' => $row['year_from'],\n 'month_to' => $row['month_to'] ?? null,\n 'year_to' => $row['year_to'] ?? null\n ]);\n $experience->save();\n }\n\n return [\n 'result' => 'success',\n 'message' => 'New employee and experience created',\n 'data' => [\n 'employee_id' => $employee_id,\n 'first_name' => $employee['first_name'],\n 'last_name' => $employee['last_name'],\n 'email' => $employee['email']\n ]\n ];\n }", "public function testCreateEmployee()\n {\n }", "public function createEmployee($request){\n\n $form_data = $this->createEmployeeArray($request);\n Employee::create($form_data);\n\n }", "public function create() {\n\t\t$employees = User::whereBetween('access_label', [2, 3])\n\t\t\t->where('deletion_status', 0)\n\t\t\t->select('id', 'name')\n\t\t\t->orderBy('id', 'DESC')\n\t\t\t->get()\n\t\t\t->toArray();\n\t\treturn view('administrator.hrm.expence.add_expence', compact('employees'));\n\t}", "public function create($data)\n {\n \n \t\n \t$data = ['url' => 'Employers','method'=>'POST','data'=>$data];\n \treturn $this->payRunObject->call($data);\n }", "public function create()\n {\n $provinces = Address::distinct()->select('Province')->pluck('Province', 'Province');\n $provinces = $provinces->prepend('Choose');\n \n $data = [\n 'allEnterprices' => Enterprise::select('Name of enterprise')->get(),\n 'activities' => Activity::pluck('Activity', 'ID'),\n 'sectors' => Enterprise::$sectors,\n 'licenses' => Enterprise::$licenses,\n 'provinces' => $provinces,\n 'yes_no' => Enterprise::$yes_no,\n 'sdp_skills' => Enterprise::$sdp_skills,\n 'loops' => Enterprise::loops(1, 10),\n 'provinces' => Province::select('Province')->get(),\n 'districts' => District::select('District', 'Province')->get()->groupBy('Province'),\n 'communes' => Commune::select('Commune', 'District')->get()->groupBy('District'),\n 'villages' => Address::select('ID', 'Village', 'Commune')->get()->groupBy('Commune'),\n 'interventions' => Intervention::pluck('Code', 'ID'),\n 'submitters' => Submitter::select('ID', 'Full Name as Name')->orderBy('Full Name', 'ASC')->pluck('Name', 'ID'),\n ];\n\n \n\n return view('enterprise.create')->with($data);\n }", "public function create()\n {\n return view(\"employees.create\");\n }", "public function create()\n {\n $data = Employee::preparingData();\n\n return view('employees.create',compact( 'data'));\n }", "public function create()\n {\n $jobgroup = Jobgroup::all();\n $regions = Region::all();\n $dcc = Dccregions::all();\n $lcc = Lccregions::all();\n return view('employees.create', compact('regions','jobgroup','dcc','lcc'));\n }", "public function create()\n {\n $this->data['mode'] = 'create';\n $this->data['designations'] = Designation::designationArray();\n $this->data['tierTypes'] = TierType::tierTypeArray();\n return view('hr::admin.employee.create', $this->data);\n }", "public function create()\n {\n //\n return view('admin.employees.create');\n }", "function get_employee()\n\t\t{\n\t\t\treturn EmployeeFactory::createEmployee($this->empID);\n\t\t}", "public function create()\n {\n return view('providers.create');\n }", "public function create()\n {\n return view('admin.providers.create');\n }", "public function create()\n {\n //\n return view('hr/employee/create');\n }", "public function create()\n {\n $employee = null;\n $gender = 1;\n $religion = 2;\n $role = 0;\n $shift = 1;\n $roles = Role::whereNotIn('id', [AppHelper::USER_ADMIN, AppHelper::USER_TEACHER, AppHelper::USER_STUDENT, AppHelper::USER_PARENTS])->pluck('name', 'id');\n return view('backend.hrm.employee.add', compact('employee', 'gender', 'religion', 'role', 'roles', 'shift'));\n }", "public function actionCreate()\n {\n $model = new Employe();\n\n if ($model->load(Yii::$app->request->post())) {\n if ($model->save()) {\n Yii::$app->session->setFlash('success', \"Employee created successfully.\");\n } else {\n Yii::$app->session->setFlash('error', \"Employee not saved.\");\n }\n return $this->redirect(['index']);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function create()\n {\n //\n return view('employees.create');\n }", "public function create()\n {\n return view('admin.new_employee');\n }", "public function crear ($nombre = \"Pepe\", $apellido = \"Argento\", $dni = 36543023, $salario = 1200, $sector = \"indefinido\")\n\t\t{\n\t\t\t$emp= new \\App\\Empleado ($nombre, $apellido, $dni, $salario, $sector);\n\t\t\treturn $emp;\n\t\t}", "public function create()\n {\n //\n return view('employees.create');\n }", "public function create()\n {\n\n // return form providers\n return view('backend.providers.form');\n }", "public function created(Provider $provider)\n {\n //\n }", "public static function createNew()\n\t{\n\t\tif (func_num_args() == 1) {\n\t\t\t$type = self::TYPE_PUBLIC;\n\t\t\t$module = self::MODULE_TICKETS;\n\t\t\tlist($title) = func_get_args();\n\t\t} elseif (func_num_args() == 2) {\n\t\t\t$module = self::MODULE_TICKETS;\n\t\t\tlist($title, $type) = func_get_args();\n\t\t} else {\n\t\t\tlist($title, $type, $module) = func_get_args();\n\t\t}\n\t\t\n\t\t$new_department = new kyDepartment();\n\t\t$new_department->setTitle($title);\n\t\t$new_department->setType($type);\n\t\t$new_department->setModule($module);\n\t\treturn $new_department;\n\t}", "public function create()\n {\n $positions = Position::all();\n\n return view('employees.create', compact('positions', 'employees'));\n }", "public function create()\n {\n //\n $employee = [\n \"first_name\" => \"\",\n \"last_name\" => \"\",\n \"company_id\" => \"\",\n \"mobile_no\" => \"\",\n \"email\" => \"\",\n ];\n $companies = $this->companyModel->get();\n return view('employee.create', ['companies' => $companies, 'employee' => (object) $employee]);\n }", "public function makeEmployees($employeesFields = [])\n {\n /** @var EmployeesRepository $employeesRepo */\n $employeesRepo = App::make(EmployeesRepository::class);\n $theme = $this->fakeEmployeesData($employeesFields);\n return $employeesRepo->create($theme);\n }", "public function create()\n {\n return view('admin.backends.employee.form.create');\n }", "public function create()\n {\n //\n return view('employee.create');\n }", "public function create(CreateResourceRequest $request)\n {\n return $this->page(CreateEventProviderPage::class);\n }", "public function storeNewEmployee()\n {\n $values = DatabaseHelpers::dbAddAudit(request()->all());\n $values['gender'] = Person::getGender($values['gender']);\n $values['title'] = Person::getTitle($values['title']);\n $person = Person::create($values);\n\n $employee_values['person_id'] = $person->id;\n $employee_values['employee_status_id'] = $values['employee_status_id'];\n $employee_values['employee_classification_id'] = $values['employee_classification_id'];\n $employee_values['start_date'] = $values['start_date'];\n $employee_values['end_date'] = $values['end_date'];\n\n $values = DatabaseHelpers::dbAddAudit($employee_values);\n $employee = Employee::create($values);\n\n ViewHelpers::flash($employee, 'employee');\n\n if ($employee) {\n $employee->searchable();\n\n return redirect()->to('employee/'.$employee->uuid.'/profile');\n }\n\n return redirect()->back()->withInput();\n }", "public function actionCreate() {\n $model = new Employee();\n \n $data = $this->data;\n\n if (!empty($data)) {\n $model->employee_code = $data['employee_code'];\n $model->employee_name = $data['employee_name'];\n $model->employee_email = $data['employee_email'];\n $model->status = $data['status'];\n $model->department_id = $data['department_id'];\n }\n\n $errors = $this->EmpDetailsvalidate($data['address']);\n if ($model->validate() && empty($errors)) {\n $model->save();\n\n $this->InsertUpdateEmpAddress($model->id, $data['address']);\n echo $this->messageReturn(\"success\", 200);\n } else {\n $error = $model->getErrors();\n //print_r($errors);\n array_push($error, $errors);\n echo $this->messageReturn(\"error\", 404, \"\", $error);\n }\n exit;\n }", "public function createEnterpriseUser($input);", "public function create()\n {\n return view('provider.create');\n }", "public function post_create(){\n\n\t\t$data = Input::get();\n\t\t$rules = array('institute' => 'required',\n\t\t\t\t\t\t'place' => 'required',\n\t\t\t\t\t\t'year_of_passout' => 'required',\n\t\t\t\t\t\t'degree' => 'required'\n\t\t\t\t\t\t);\n\n\t\t$validator = Validator::make($data, $rules);\n\t\t$employee_id = Input::get(\"employee_id\");\n\n\t\tif($validator->fails())\n\t\t{\n\t\t\treturn Response::json(array('errors' => $validator->messages), 400);\n\t\t}\n\n\t\t$education = new Education();\n\t\t$education->fill($data);\n\t\t$education->save();\n\t\treturn Response::json(compact(\"education\"), 201);\n\t}", "function createEmployee( Request $request )\n\t\t\t{\n\t\t\t\t$validated = $request->validate( [ 'username' =>'required|unique:employees' ] );\n\n\t\t\t\tif ( ! empty( $validated ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$employee = new Employee();\n\n\t\t\t\t\t\t$employee->status = empty( $request->status ) ? 0 : 1;\n\t\t\t\t\t\t// we can also create a function where we can validate if $request->dept_id exisist in DB to be double sure before any insertion of a foreign key\n\t\t\t\t\t\t$employee->department_id = $request->dept_id;\n\t\t\t\t\t\t$employee->name = $request->name;\n\t\t\t\t\t\t$employee->username = $request->username;\n\t\t\t\t\t\t// Password should never be stored in plain format, so we will encrypt and store it in DB, you may use any other encryption methid like md5 / sha, etc\n\t\t\t\t\t\t$employee->password = bcrypt( $request->password );\n\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$result = $employee->save();\n\n\t\t\t\t\t\t\t\tif ( $result )\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\treturn [ $this->finalResponse( 'success', 'User created!', 'Pleae login to continue.', [ 'emp_id' => $employee->id ] ) ];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\treturn [ $this->finalResponse() ];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch ( Exception $e )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->finalResponse();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\treturn [ $this->finalResponse( 'info', 'User already exists!', 'Please choose a different username.' ) ];\n\t\t\t\t\t}\n\t\t\t}", "public function create()\n {\n return view('employee::admin.employees.create');\n }", "public function create()\n {\n return View::make('provider/create');\n }", "function create()\r\n {\r\n // call the stored procedure query\r\n $sql = \"CALL create_Employer(:employer_name, :employer_email, :company_name, :job_title)\";\r\n \r\n // prepare query statement\r\n $stmt = $this->conn->prepare($sql);\r\n\r\n // sanitize the data\r\n $this->employer_name = htmlspecialchars(strip_tags($this->employer_name));\r\n $this->employer_email = htmlspecialchars(strip_tags($this->employer_email));\r\n $this->company_name = htmlspecialchars(strip_tags($this->company_name));\r\n $this->job_title = htmlspecialchars(strip_tags($this->job_title));\r\n\r\n // bind the data\r\n $stmt->bindParam(\":employer_name\",$this->employer_name);\r\n $stmt->bindParam(\":employer_email\",$this->employer_email);\r\n $stmt->bindParam(\":company_name\",$this->company_name);\r\n $stmt->bindParam(\":job_title\",$this->job_title);\r\n\r\n // execute the query\r\n if($stmt->execute())\r\n return true;\r\n\r\n return false;\r\n }", "public function store(ProviderCreateRequest $request)\n {\n Provider::create($request->validated());\n\n return redirect()->route('provider.index')\n ->with('status','El proyecto fue creado con exito');\n }", "public function create(Request $request)\n { \n $identificationTypes = IdentificationType::all();\n $genders = [\n ['id' => 'M', 'name' => 'Masculino'],\n ['id' => 'F', 'name' => 'Feminino']\n ];\n $civilStates = [\n ['name' => 'Soltero(a)'],\n ['name' => 'Conviviente'],\n ['name' => 'Casado(a)'],\n ['name' => 'Divorciado(a)'],\n ['name' => 'Viudo(a)']\n ];\n $departments = Department::all();\n $provinces = Province::all();\n $districts = District::all();\n $phoneOperators = PhoneOperator::all();\n $phoneTypes = PhoneType::all();\n $agencies = Agency::all();\n $areas = Area::all();\n $roles = Role::all();\n $contractTypes = ContractType::all();\n $jobTypes = JobType::all();\n $disponibilityToTravel = [\n ['id'=>1,'name'=>'si'],\n ['id'=>0,'name'=>'no']\n ];\n $typesLicenses = [\n ['id'=>'moto','name'=>'Moto'],\n ['id'=>'auto','name'=>'Auto'],\n ['id'=>'ambos','name'=>'ambos']\n ];\n $clothingSizes = [\n ['name' => 'XS'],\n ['name' => 'S'],\n ['name' => 'M'],\n ['name' => 'L'],\n ['name' => 'XL']\n ];\n \n return view('employees.create', compact('identificationTypes',\n 'genders',\n 'departments',\n 'civilStates',\n 'provinces',\n 'districts',\n 'phoneOperators',\n 'phoneTypes',\n 'agencies',\n 'areas',\n 'roles',\n 'contractTypes',\n 'jobTypes',\n 'disponibilityToTravel',\n 'typesLicenses',\n 'clothingSizes'\n ));\n }", "public function create()\n {\n //Get all employee types already been created\n $allTypes = $this->getAllTypes();\n //Get all leave types, to be assigned to employee type\n $allLeaveTypes = $this->getAllLeaveTypes();\n //Get leave entitlements\n $leaveEnt = LeaveEntitlement::orderBy('id','ASC')->get();\n //dd($leaveEnt);\n\n return view('emptype.create')->with(compact('allTypes', 'allLeaveTypes', 'leaveEnt'));\n }", "public function createRecordByProviderId($name='', $account='', $providerType='', $providerId='', $attributes=array()) {\n\n if(!isset($attributes[\"email\"])) {\n $attributes[\"email\"] = null;\n }\n\n $rowCount = $this->create(array(\n \"domain_name\" => self::DOMAIN_NAME,\n \"group_id\" => self::GROUP_ID,\n \"name\" => $name,\n \"account\" => $account,\n \"email\" => $attributes[\"email\"],\n \"hash\" => \"------\",\n \"salt\" => \"------\",\n \"oauth_type\" => $providerType,\n \"oauth_id\" => $providerId,\n \"create_datetime\" => date(\"Y-m-d H:i:s\")\n ));\n\n if($rowCount == 1) {\n return $this->lastCreated()->getId();\n }\n else {\n throw new DbOperationException(\"Create new consumer user fail.\");\n }\n }", "public function create()\n {\n return view('employees.create');\n }", "public function create()\n {\n return view('employees.create');\n }", "public function create()\n {\n return view('employees.create');\n }", "public function create()\n {\n return view('employees.create');\n }", "public function create()\n {\n return view('employees.create');\n }", "public function create()\n {\n return view('employees.create');\n }", "public function create()\n {\n return view('employees.create');\n }", "public function create()\n {\n return view('employees.create');\n }", "public function create()\n {\n return view('pages.admin.employee.create');\n }", "public function store(Request $request)\n {\n \n \n $career_id=$request->input('career_id');\n $employeeFirstName=$request->input('employeeFirstName');\n $employeeMiddleName=$request->input('employeeMiddleName');\n $employeeLastName=$request->input('employeeLastName');\n $employeeBrithday=$request->input('employeeBrithday');\n $employeeFrom=$request->input('employeeFrom');\n $employeeTo=$request->input('employeeTo');\n $employeeMobile=$request->input('employeeMobile');\n $employeePhoneHome=$request->input('employeePhoneHome');\n $employeePhoneJob=$request->input('employeePhoneJob');\n $employeeAddress=$request->input('employeeAddress');\n $employeeCity=$request->input('employeeCity');\n $employeeNational=$request->input('employeeNational');\n $employeeSalary=$request->input('employeeSalary');\n \n\n\n \n $new_employee = New Employee ;\n \n $new_employee->career_id=$career_id;\n $new_employee->employeeFirstName=$employeeFirstName;\n $new_employee->employeeMiddleName=$employeeMiddleName;\n $new_employee->employeeLastName=$employeeLastName;\n $new_employee->employeeBrithday=$employeeBrithday;\n $new_employee->employeeFrom=$employeeFrom;\n $new_employee->employeeTo=$employeeTo;\n $new_employee->employeeMobile=$employeeMobile;\n $new_employee->employeePhoneHome=$employeePhoneHome;\n $new_employee->employeePhoneJob=$employeePhoneJob;\n $new_employee->employeeAddress=$employeeAddress;\n $new_employee->employeeCity=$employeeCity;\n $new_employee->employeeNational=$employeeNational;\n $new_employee->employeeSalary=$employeeSalary;\n \n $new_employee->save();\n\n\n\n\n\n return redirect ('/accountant/employees') ;\n\n }", "public function create()\n {\n $action = 'add';\n $master = $this->getmasterfields();\n return view('hrmodule.employeesexit.add')->with([\n 'action' => $action,\n 'pageTitle' => \"Employees Exit\",\n 'Addform' => \"Add New Employees Exit\",\n 'master' => $master\n ]);\n }", "public function create()\n {\n\t\t$countryList \t= Country::lists('title','id');\n\t\t$religionList\t= Religion::lists('title','id');\n\t\t$genderList \t= Gender::lists('title','id');\n\t\t$deptList\t\t= Department::lists('title','id');\n\t\t$designList \t= Designation::lists('title','id');\n\t\t$statusList \t= Status::lists('title','id');\n\t\t\n return view('admin.employee.create', compact('countryList', 'religionList', 'genderList', 'deptList', 'designList', 'statusList'));\n }", "public function testEmployeeCreate()\n {\n $user = factory(User::class)->create();\n $company_id = factory(Company::class)->create()->id;\n\n $response = $this->actingAs($user)->JSON('POST', '/employees', ['first_name' => 'Adam', 'last_name' => 'Kovalski','email' => '[email protected]', 'phone' => '+48123456789', 'company_id' => $company_id]);\n $response->assertStatus(302);\n }", "public function create()\n {\n return view('employees.create'); \n }", "public function create()\n {\n return view('pages.franchise.employee.create');\n }", "public function createAction()\n {\n if (!$this->request->isPost()) {\n $this->dispatcher->forward([\n 'controller' => \"geocliente\",\n 'action' => 'index'\n ]);\n\n return;\n }\n\n $geocliente = new Geocliente();\n $geocliente->setCustomerRefListID($this->request->getPost(\"CustomerRefListID\"));\n $geocliente->setCustomerRefFullName($this->request->getPost(\"CustomerRefFullName\"));\n $geocliente->setSalesRepRefListID($this->request->getPost(\"SalesRepRefListID\"));\n $geocliente->setSalesRepRefFullName($this->request->getPost(\"SalesRepRefFullName\"));\n $geocliente->setCustomerMoreInfo($this->request->getPost(\"CustomerMoreInfo\"));\n $geocliente->setLatitude($this->request->getPost(\"Latitude\"));\n $geocliente->setLongitude($this->request->getPost(\"Longitude\"));\n $geocliente->setAddress($this->request->getPost(\"Address\"));\n $geocliente->setFeatured($this->request->getPost(\"Featured\"));\n\n\n if (!$geocliente->save()) {\n foreach ($geocliente->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n $this->dispatcher->forward([\n 'controller' => \"geocliente\",\n 'action' => 'new'\n ]);\n\n return;\n }\n\n $this->flash->success(\"geocliente was created successfully\");\n\n $this->dispatcher->forward([\n 'controller' => \"geocliente\",\n 'action' => 'index'\n ]);\n }", "public function storeNewOfficeEmployer($input);", "public function create()\n {\n return view('employee.create');\n }", "public function create()\n {\n return view('employee.create');\n }", "public function create()\n {\n return view('employee.create');\n }", "public function create()\n {\n return view('employee.create');\n }", "public function create()\n {\n return view('employee.create');\n }", "public function create()\n {\n //\n return view('employee.add');\n }", "public function store(CreateEmployeeRequest $request)\n {\n $this->employeeModel->addNewEmployee($request);\n return redirect()->route('employees.index')->with('success', 'Thêm nhân viên thành công');\n }", "public function create()\n {\n $employee = new Employee();\n $companies = Company::all();\n return view('backemployees.create',compact('employee','companies'));\n }", "public function store(ProviderRequest $request)\n {\n Provider::create($request->validated());\n return;\n }", "public function createEmployeeSave()\n {\n $data = array();\n $data['name'] = $_POST['name'];\n $data['address'] = $_POST['address'];\n $this->model('Employee')->createEmployee($data);\n header(\"Location: \" . URL . \"public/employees/index\");\n }", "public function create()\n {\n $products = Product::all()->pluck('name','id');\n $providers = Provider::all()->pluck('name','id');\n return view('productProviders/create',['products'=>$products, 'providers'=>$providers]);\n }", "public function create()\n {\n $roles=['Administrator','Manager','Normal'];\n $data = Designation::all();\n return view('employees.create', ['data' => $data],compact('roles'));\n }", "public function create(Request $request)\n {\n\n\n $request->validate([\n 'first_name' => 'required|max:60',\n 'last_name' => 'required|max:60',\n 'middle_name' => 'max:60',\n 'address' => 'required|max:120',\n 'department_id' => 'required|max:20',\n 'city_id' => 'required|max:20',\n 'state_id' => 'required|max:20',\n 'country_id' => 'required|max:20',\n 'zip' => 'required|max:60',\n 'birthday' => 'date',\n 'date_hired' => 'date',\n ]);\n\n\n $employee = new Employee([\n 'first_name' => $request->first_name,\n 'last_name' => $request->last_name,\n 'middle_name' => $request->middle_name,\n 'address' => $request->address,\n 'department_id' => $request->department_id,\n 'city_id' => $request->city_id,\n 'state_id' => $request->state_id,\n 'country_id' => $request->country_id,\n 'zip' => $request->zip,\n 'birthday' => $request->birthday,\n 'date_hired' => $request->date_hired,\n\n ]);\n\n ;\n\n if (!$employee->save()){\n return response()->json(['message' => 'Employee not create. Internal Server Error'], 500);\n }\n\n return response()->json(['message' => 'Employee has been created'], 201);\n }", "public function create()\n {\n $companyData = $this->company->getCompanyData();\n return view('addEmployee',compact('companyData'));\n }", "public function store(EmployeeRequest $request)\n {\n //First we need to create a new address column\n //We will need the id of the newly created address to be \n //Inserted into the employees table\n $address = new Address();\n $address->city = $request->input('employeeCity');\n $address->street = $request->input('employeeStreet');\n $address->post_code = $request->input('employeePostcode');\n $address->save();\n\n //Get the id of the newly created address\n $address_id = Address::select('id')->max('id');\n \n //New employee object from the model\n //This will represent the employees table from the database\n //And we will fill in the new employee column with values from inputs\n $emp = new Employee();\n $emp->address_id = $address_id;\n $emp->name = $request->input('employeeName');\n $emp->surname = $request->input('employeeSurname');\n $emp->email = $request->input('employeeEmail');\n $emp->password = Hash::make($request->input('employeePassword'));\n $emp->type = $request->input('types');\n $emp->salary = $request->input('employeeSalary');\n $emp->start_date = Carbon::now()->toDateTimeString();\n $emp->save();\n\n return redirect(\"/employee/create\")->with(\"success\", 'Employee added successfuly');\n \n }", "public function store(Request $request)\n {\n Employee::create($request->all());\n }", "abstract public function createContract(): ProviderCustomer;", "public function creating($employee)\n {\n $work_location = WorkLocation::find($employee->work_location_id);\n\n if ($work_location) {\n $month_number = $work_location->currentSetting()->paid_holiday_after_joined_period;\n\n $carbon_start_using_paid_holiday_date = new Carbon($employee->joined_date);\n\n if (isset($month_number)) {\n $carbon_start_using_paid_holiday_date->addMonths($month_number);\n }\n $employee->holidays_update_day = $carbon_start_using_paid_holiday_date->format('m/d');\n\n } else {\n throw new \\Exception('This WorkLocation does not exist!!');\n }\n }", "public function create()\n {\n return view('admin.employes.create');\n }", "public function create(StoreSupplierRequest $request)\n {\n return new CreateResponse('focus.suppliers.create');\n }", "public function newSupplier($options = array())\n {\n return $this->newItem(\"supplier\", \"suppliers\", $options);\n }", "protected function createServiceProvider()\n {\n $moduleServiceProviderPath = $this->path(\"Providers/ModuleServiceProvider.php\");\n $content = File::get($moduleServiceProviderPath);\n\n $types = $this->option('type');\n\n if ($types == 'all') {\n $types = 'admin,site';\n }\n $types = explode(',', $types);\n\n $stringTypes = json_encode($types);\n\n // replace Route list\n $content = str_ireplace(\"ROUTES_LIST\", $stringTypes, $content);\n\n // replace module name\n $content = str_ireplace(\"ModuleName\", $this->moduleName, $content);\n $content = str_ireplace(\"ClassName\", Str::singular($this->moduleName), $content);\n $serviceProviderName = Str::singular($this->moduleName) .'ServiceProvider';\n $serviceProviderDirectory = $this->modulePath(\"Providers\");\n\n $this->checkDirectory($serviceProviderDirectory);\n $this->createFile(\"$serviceProviderDirectory/{$serviceProviderName}.php\", $content, 'ServiceProvider');\n $this->updateServiceProviderConfig();\n }", "public function actionCreate()\n\t{\n\t\t$model=new Employe;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Employe']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Employe'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id_employe));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function create()\n {\n $companies = $this->companyService->get();\n\n return view('employees.create', compact('companies'));\n }", "private function createUserDaoProvider($name, $provider) {}", "public function store(StoreEmployeeRequest $request)\n {\n $password = Hash::make($request->password);\n $data = $request->all();\n $data['password'] = $password;\n\n $employee = Employee::create($data);\n\n return EmployeeResource::collection($employee);\n }", "public function __construct(Employee $employee)\n {\n $this->employee = $employee ;\n }", "public function create()\n {\n return view('backs.provider.create');\n }" ]
[ "0.67299145", "0.66411597", "0.623943", "0.6235594", "0.62345254", "0.6130273", "0.6073243", "0.5997405", "0.59829354", "0.59703046", "0.5957863", "0.5938256", "0.59256524", "0.5918902", "0.59093946", "0.59030807", "0.5844666", "0.5840325", "0.57978773", "0.57960343", "0.5790098", "0.57759064", "0.5757653", "0.574262", "0.574053", "0.57319045", "0.5724657", "0.5723067", "0.5721029", "0.5714587", "0.5706717", "0.57031095", "0.5702718", "0.5697636", "0.569459", "0.56858253", "0.5671626", "0.5657727", "0.56543636", "0.565375", "0.56460613", "0.56446916", "0.5638019", "0.5637421", "0.56292325", "0.56275165", "0.56251746", "0.562267", "0.56116736", "0.5603828", "0.5600978", "0.55975926", "0.5593681", "0.55893004", "0.5585059", "0.55794334", "0.55773485", "0.55773485", "0.55773485", "0.55773485", "0.55773485", "0.55773485", "0.55773485", "0.55773485", "0.55771315", "0.5572644", "0.55681205", "0.5562031", "0.5561136", "0.5555221", "0.5550804", "0.5547591", "0.554651", "0.55440867", "0.55440867", "0.55440867", "0.55440867", "0.55440867", "0.55413055", "0.5535133", "0.55347395", "0.5532149", "0.552947", "0.55094016", "0.5502964", "0.54968417", "0.5496079", "0.5493932", "0.5492508", "0.549169", "0.54908365", "0.54883873", "0.54837465", "0.54829544", "0.54712397", "0.5471137", "0.54695195", "0.54640967", "0.5461488", "0.54422206", "0.54416966" ]
0.0
-1
Retrieve a user by their unique identifier.
public function retrieveById($identifier) { return $this->createModel()->newQuery()->{$this->scope}()->find($identifier); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function retrieveById($identifier)\n {\n return User::find($identifier);\n }", "public static function get_user($user_id);", "public function get_user($identifier)\n {\n return $this->call_method(\"get/user\",\n array('identifier' => $identifier,\n )\n );\n }", "public function retrieveById($identifier)\n {\n $user = $this->model->find($identifier);\n return $this->getGenericUser($user);\n }", "public function getUserOne()\r\n {\r\n return $this->getOne(User::class, [\r\n 'id' => 'user_id',\r\n ]); \r\n }", "public function getUser($id);", "public function getOne($id)\n {\n return $this->user->find($id);\n }", "public static function getUserById($id)\n\t{\n\t\t$user = self::where('ID',$id)->first();\n\t\treturn $user;\n\t}", "function get_user( $user_id ){\n\t$app = \\Jolt\\Jolt::getInstance();\n\treturn $app->store('db')->findOne('user', array( '_id'=>$user_id ));\n}", "public function getUser($id) {\n return $this->getEntityManager()\n ->getRepository('Alt68\\Entities\\User')\n ->findOneBy(array(\n 'id' => $id));\n }", "private function getUserById($id) {\n\t\t$em = $this->getDoctrine()->getManager()->getRepository('AppBundle\\Entity\\User');\n\n\t\t$user = $em->findOneById($id);\t\n\t\t\n\t\treturn $user;\n\t}", "function findUser($id) {\n\n $conn = \\Database\\Connection::connect();\n\n try {\n $sql = \"SELECT * FROM user WHERE _user_Id = ?;\";\n $q = $conn->prepare($sql);\n $q->execute(array($id));\n $user = $q->fetchObject('\\App\\User');\n }\n catch(\\PDOException $e)\n {\n echo $sql . \"<br>\" . $e->getMessage();\n }\n\n \\Database\\Connection::disconnect();\n\n return $user;\n }", "public function getUser($id)\r\n {\r\n $userRepository = $this->entityManager->getRepository(User::class);\r\n $user = $userRepository->find($id);\r\n\r\n return $user;\r\n }", "function getUser($user, $id) {\n return $user->readByID($id);\n}", "public function retrieveByID($identifier)\n\t{\n\t\t//$time|$rand|$username|md5($time.$rand.$username.$appKey)\t\t\n\t\t\n\t\t\n\t\ttry {\n\t\t\t$id = \\Crypt::decrypt($identifier);\n\t\t} catch (\\Illuminate\\Encryption\\DecryptException $e) {\n\t\t\t$id = '';\n\t\t}\n\t\t\n\t\t$idValue = explode('||', $id);\n\t\tif (count($idValue)===3) {\n\t\t\tlist($oldTime, $username, $rand) = $idValue;\n\t\t\t$appKey = \\Config::get('app.key');\n\t\t\t$userInfo = \\DbWeb\\WebUser::find($username);\n\t\t\t\n\t\t\t//if ($userInfo && md5(\"{$oldTime}{$userInfo->rand}{$username}{$appKey}\") == $md5) {\n\t\t\tif ($userInfo && $userInfo->rand == $rand) {\n\t\t\t\t$time = time();\n\t\t\t\t//$rand = \\Str::quickRandom(15);\n\t\t\t\t$id = \\Crypt::encrypt(\"{$time}||{$username}||{$rand}\");\n\t\t\t\t//$userInfo->rand = $rand;\n\t\t\t\t$userInfo->touch();\n\t\t\t\treturn new GenericUser([\n\t\t\t\t\t'id' => $id,\n\t\t\t\t\t'userName' => $userInfo->user,\n\t\t\t\t\t'chineseName' => $userInfo->chinese_name,\n\t\t\t\t\t'deptName' => $userInfo->dept_name,\n\t\t\t\t\t'deptId' \t\t=> $userInfo->dept_id\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public function getUser($id)\n {\n return $this->userRepository->getUser($id);\n }", "public static function get_user( $identifier ) {\n\t\tforeach ( self::get_user_lookup_fields() as $field ) {\n\t\t\tif ( $user = get_user_by( $field, $identifier ) ) {\n\t\t\t\treturn $user;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "function cicleinscription_get_user_by_id($userid){\n\tglobal $DB;\n\treturn $DB->get_record('user', array('id'=>$userid));\n}", "public function getById(string $id): User;", "public function getUserIdWithUsername($id);", "public function getUserById($id){\n $query = $this->db->get_where('user', array('k_id_user' => $id));\n return $query->row();\n }", "public function retrieveUser($userId)\n {\n return $this->start()->uri(\"/api/user\")\n ->urlSegment($userId)\n ->get()\n ->go();\n }", "public function get($id) {\n $sql =<<<SQL\nSELECT * from $this->tableName\nwhere idUser=?\nSQL;\n\n $pdo = $this->pdo();\n $statement = $pdo->prepare($sql);\n\n $statement->execute(array($id));\n if($statement->rowCount() === 0) {\n return null;\n }\n\n return new User($statement->fetch(PDO::FETCH_ASSOC));\n }", "public function getUser($id)\n {\n return $this->dbService->getById($id, $this->userClass);\n }", "public function retrieveById($identifier) {\n $username = $identifier;\n $password = $this->credential_store[$username];\n return new User([\n 'email' => $username,\n 'password' => $password,\n ]);\n }", "public function getUserById($id)\n {\n return $this->repository->getUserById($id);\n }", "function get_user_by_id($user_id) {\n\t\t$this->db->where('id', $user_id);\n\n\t\t$query = $this->db->get($this->table_name);\n\t\tif ($query->num_rows() == 1) {\n\t\t\treturn $query->row();\n\t\t}\n\n\t\treturn NULL;\n\t}", "public function getUser( $id)\n\t{\n\t\n\t\t$user=$this->collection->findOne(array('_id'=> new MongoId($id)));\n\n\t\treturn $user;\n\t}", "public function getUser($userId);", "public function getUser($userId);", "function user($id){\n\n $sql = \"SELECT * FROM users WHERE id=$id\";\n return fetch($sql);\n }", "public function getUserFromIdentifier($userIdentifier) {\n\t\treturn $this->personRepository->findByIdentifier($userIdentifier);\n\t}", "public function getUserWithId($id){\r\n\r\n\t\t$sql = \"Select * from users where id = ?\";\r\n\t\t$query = $this->db->prepare($sql);\r\n\t\t$query->execute([$id]);\r\n\r\n\t\t$postOwner = $query->fetch(PDO::FETCH_OBJ);\r\n\t\treturn $postOwner;\r\n\t}", "public function getUser($id = null);", "public function retrieveUser ($email) {\n return $this->usersDB->retrieve($email);\n }", "public function userbyid($id)\n {\n $sql=\"SELECT * FROM users where id='$id'\";\n\t $result = $this->db->query($sql);\n\t return $result->row();\n \n }", "public function getById(int $id): User;", "public function get_user_by_id($user_id, $organization_id);", "public function findUserById($id)\n {\n $sql = \"SELECT rowid, * FROM USER WHERE rowid=?\";\n $row = $this->getDb()->fetchAssoc($sql, array($id));\n if ($row){\n return $this->buildDomainObject($row);\n }else{\n throw new UsernameNotFoundException('User not found.');\n }\n }", "public function findUserById()\n {\n $this->db->query('SELECT * FROM user WHERE id = :id');\n $this->db->bind(':id', $_SESSION['id']);\n \n $row = $this->db->single();\n \n return $row; \n }", "public function get_user($id) {\n $this->db->where('id', $id);\n $query = $this->db->get('users');\n \n return $query->row();\n }", "public function fetchUserByUserId($userId);", "public function getById($id)\n {\n return $this->appUser->find($id);\n }", "function user()\n {\n return eZUser::fetch( $this->UserID );\n }", "abstract public function fetchUserById($id);", "public function getUser() {\n\t\tif (empty($this->user)) {\n\t\t\t$this->user = $this->usersTable->findById($this->userId);\n\t\t}\n\t\t\n\t\treturn $this->user;\n\t}", "private function getUser()\n {\n if ($this->userData['id']) {\n $user = gateway('northstar')->asClient()->getUser($this->userData['id']);\n\n if ($user && $user->id) {\n info('Found user by id', ['user' => $user->id]);\n\n return $user;\n }\n }\n\n if ($this->userData['email']) {\n $user = gateway('northstar')->asClient()->getUserByEmail($this->userData['email']);\n\n if ($user && $user->id) {\n info('Found user by email', ['user' => $user->id]);\n\n return $user;\n }\n }\n\n if (! isset($this->userData['mobile'])) {\n return null;\n }\n\n $user = gateway('northstar')->asClient()->getUserByMobile($this->userData['mobile']);\n\n if ($user && $user->id) {\n info('Found user by mobile', ['user' => $user->id]);\n\n return $user;\n }\n\n return null;\n }", "public function getById($id) {\n\n $sql = \"SELECT * FROM user WHERE id = {$id}\";\n\n return $this->query($sql);\n }", "public function getUser() {\n\t\treturn $this->getTable('User')->find($this->user_id);\n\t}", "public function get($id = null)\n {\n return $id === null ? $this['user'] : $this->getUserRepository()->find($id);\n }", "function GetUser()\n\t{\n\t\t$user = new User();\n\t\treturn $user->Get($this->userId);\n\t}", "function get_user_by_ID($id){\n global $database;\n $query = \"SELECT * FROM \".TABLE_PREFIX.\"users WHERE ID = \" . $id;\n return $database->query( $query );\n}", "public function getUserById($id) {\n\t\t\n\t}", "public function get_user_by_user_id($user_id) {\n //$user_id = $this->real_escape_string($user_id);\n return $this->query(\"SELECT * FROM users WHERE user_id = '\" . $user_id . \"'\");\n }", "public function getUserid()\n {\n return $this->get(self::_USERID);\n }", "public function getUserid()\n {\n return $this->get(self::_USERID);\n }", "public function getUserid()\n {\n return $this->get(self::_USERID);\n }", "public static function findUser($id)\r\n {\r\n $app = \\Slim\\Slim::getInstance();\r\n $user = User::find($id);\r\n if(!$user){\r\n $app->halt('404',json_encode(\"Use not found.\"));\r\n }\r\n return $user;\r\n }", "function get_user_by_id($id) {\r\n\t\t$query = $this->db->query('SELECT user_fname, user_lname, user_email\r\n\t\t\t\t\t\t\t\t\tFROM user\r\n\t\t\t\t\t\t\t\t\tWHERE user_id = '.$id.'');\r\n\t\treturn $query->result();\r\n\t}", "function get_user() {\n // $query = $this->db->where('id', 1)->get('user', 1);\n $query = $this->db->get_where('user', array('id'=>1),1);\n \n return $query->row();\n }", "public function getUserById($id)\n {\n return $this->getManagement()->users->get($id);\n }", "public function getById($id)\n {\n $this->logger->info(__CLASS__.\":\".__FUNCTION__);\n return $this->em->getRepository('AppBundle:User')->find($id);\n }", "public function getItem( int $id ) {\n\t\treturn User::where( 'id', $id )->first();\n\t}", "public function getUserByID()\n {\n $user = $this->usersController->getUserByID($_POST['id']);\n echo json_encode($user);\n return $user;\n }", "public function getUser() {\n\t\treturn $this->api->getUserById($this->getUserId());\n\t}", "public function getUser($userId) {\n\t\t$query = $this->db->query(\"SELECT id, email, firstname, lastname, api_key, avatar FROM users WHERE id = \" . (int)$userId);\n\n\t\treturn $query->row;\n\t}", "public function getUser()\n {\n $attributes = $this->getUserAttributes();\n\n // Try to load user by ldap id attribute\n if ($this->idAttribute !== null && isset($attributes['authclient_id'])) {\n $user = User::findOne(['authclient_id' => $attributes['authclient_id'], 'auth_mode' => $this->getId()]);\n if ($user !== null) {\n return $user;\n }\n }\n\n return $this->getUserAuto();\n }", "public function show($id)\n {\n return user::find($id);\n }", "public function getUserById($id){\n // Query for the user.\n $this->db->query('SELECT * FROM users WHERE id = :id');\n // Bind the values.\n $this->db->bind(':id', $id);\n // Return the row. \n $row = $this->db->single();\n\n return $row;\n }", "public function findById($id){\n $user = $this->DB->query(\"SELECT u.* FROM user u WHERE u.id = $id\")->fetch(PDO::FETCH_ASSOC);\n return $user;\n }", "function getUser($userId) {\r\n $results = $this->querySimpleExecute(\"select * from t_user where idUser=$userId\");\r\n return $results = $this->formatData($results)[0];\r\n }", "public static function user($id = 0)\n\t{\n\t\t// Get the user by id\n\t\tif ($id)\n\t\t\treturn User::model()->active->findbyPk($id);\n\t\telse\n\t\t{\n\t\t\t// Return false if user is guest\n\t\t\tif (Yii::ap()->user->isGuest)\n\t\t\t\treturn false;\n\t\t\telse\n\t\t\t\treturn User::model()->active->findbyPk(Yii::app()->user->id);\n\t\t}\n\t}", "private static function _FindUserByUserId(int $user_id) {\r\n \r\n $db = DbClass::getInstance();\r\n \r\n $sql = 'SELECT * FROM users WHERE user_id=:user_id';\r\n $data = [':user_id' => $user_id];\r\n\r\n $query_st = $db->singleQueryRetStatement($sql, $data);\r\n\r\n $user = $query_st->fetchObject('User');\r\n \r\n return $user;\r\n }", "public function getUserById($id)\n {\n\t $result = $this->getUserDbTable()->select()\n \t\t\t\t\t\t\t\t\t ->where('user_id = ?', (int)$id, 'INT')\n \t\t\t\t\t\t\t\t\t ->query()->fetch();\n \tif($result) return $result;\n }", "public function get_user($id) {\r\n $conn = $this->conn();\r\n $sql = \"SELECT * FROM register WHERE id = ?\";\r\n $stmt = $conn->prepare($sql);\r\n $stmt->execute([$id]);\r\n $user = $stmt->fetch();\r\n $result = $stmt->rowCount();\r\n\r\n if($result > 0 ){\r\n \r\n return $user;\r\n }\r\n\r\n \r\n }", "public function getUserByID($id)\n {\n return $this->db->get_where('inm_user', array('id' => $id));\n }", "public function getOne($id)\n\t\t{\n\t\t\treturn usersDao::instance()->getOne($id);\n\t\t}", "public function getUser()\n {\n $identity = $this->session->get('auth-identity');\n if (isset($identity['id'])) {\n $user = Users::findFirstById($identity['id']);\n if ($user == false) {\n // throw new Exception('The user does not exist');\n }\n\n return $user;\n }\n\n return false;\n }", "public function findUserById($id)\n {\n return $this->userDao->findUserById($id);\n }", "public function getUserId();", "public function getUserId();", "public function getUserId();", "public function getUserId();", "public function getUserId();", "public function getUserId();", "public function getUserId();", "public function getUserId();", "public function getUserId();", "public function get($userId)\n {\n return User::findOrFail($userId);\n }", "public function get(int $id): User\n {\n return $this->model->findOrFail($id);\n }", "function get_user_by_id($id) {\n $db = new PDO(\"mysql:host=localhost; dbname=registration\", \"root\", \"root\");\n $sql = \"SELECT * FROM users WHERE id=:id\";\n $statement = $db->prepare($sql);\n $statement->execute([\n 'id' => $id\n ]);\n $user = $statement->fetch(PDO::FETCH_ASSOC);\n return $user;\n}", "function cicleinscription_get_user_by_username($username){\n\tglobal $DB;\n\treturn $DB->get_record('user', array('username'=>$username));\n}", "public function getUser($id) {\n foreach ($this->_users as $user) {\n if ($user->id == $id) return $user;\n }\n return false;\n }", "public function get_user( $id ) {\n $u = $this->call( 'userGet', [\n 'userId' => $id ] );\n\n return $u ? $u->user : false;\n }", "function getUser() {\n return user_load($this->uid);\n }", "function get_user($user_id)\n\t{\n\t\t$ci =& get_instance();\n\t\treturn $ci->auth_model->get_user($user_id);\n\t}", "function get_user($user_id)\n\t{\n\t\t$ci =& get_instance();\n\t\treturn $ci->auth_model->get_user($user_id);\n\t}", "function user_get()\n {\n $id = $this->get('id');\n if ($id == '') {\n $user = $this->db->get('auth_user')->result();\n } else {\n $this->db->where('id', $id);\n $user = $this->db->get('auth_user')->result();\n }\n $this->response($user, 200);\n }", "public static function getByID($id) {\r\n // Create a new user object\r\n $user = new User();\r\n // Get the data from the database for the user by ID\r\n $user->get([\"id\" => $id, \"LIMIT\" => 1]);\r\n // return the user object\r\n return $user;\r\n }", "function getUser()\n {\n if (empty($this->user_id))\n return $this->_user = null;\n if (empty($this->_user) || $this->_user->user_id != $this->user_id) {\n $this->_user = $this->getDi()->userTable->load($this->user_id);\n }\n return $this->_user;\n }", "function getUserById($id) {\n\t$result = mysql_query(\"SELECT userId, email, password FROM users where userId = $id\");\n\t$row = mysql_fetch_array($result, MYSQL_ASSOC);\n\tmysql_free_result($result);\n\treturn $row;\n}" ]
[ "0.7874085", "0.7821166", "0.77227825", "0.753227", "0.7475642", "0.74202543", "0.74125993", "0.7385195", "0.7331228", "0.73289955", "0.7308177", "0.7236237", "0.72270316", "0.7218127", "0.7182016", "0.7178964", "0.7176346", "0.7175991", "0.7164751", "0.71540815", "0.7131668", "0.71248424", "0.7122619", "0.7115296", "0.7109309", "0.70935625", "0.70882505", "0.7083064", "0.70614964", "0.70614964", "0.7054499", "0.70496047", "0.7048301", "0.7047926", "0.7040871", "0.703853", "0.703706", "0.7036931", "0.703486", "0.70342416", "0.7033705", "0.70251775", "0.70169353", "0.7011685", "0.70068187", "0.6977783", "0.69703716", "0.69575125", "0.69516796", "0.69488776", "0.694482", "0.69421387", "0.69347614", "0.6932361", "0.6929306", "0.6929306", "0.6929306", "0.6926418", "0.6924336", "0.6920275", "0.6919264", "0.6906907", "0.6906645", "0.6902096", "0.6889995", "0.6889624", "0.68873566", "0.6886946", "0.6886842", "0.6886348", "0.6876558", "0.68739766", "0.68694365", "0.6867929", "0.68661827", "0.6857992", "0.6857184", "0.6854152", "0.68510926", "0.68499583", "0.68499583", "0.68499583", "0.68499583", "0.68499583", "0.68499583", "0.68499583", "0.68499583", "0.68499583", "0.6849084", "0.68464863", "0.68436784", "0.6830532", "0.68301314", "0.68239856", "0.6817152", "0.6815", "0.6815", "0.6810417", "0.6810124", "0.68003076", "0.67958194" ]
0.0
-1
Retrieve a user by the given credentials.
public function retrieveByCredentials(array $credentials) { if (empty($credentials)) { return; } // First we will add each credential element to the query as a where clause. // Then we can execute the query and, if we found a user, return it in a // Eloquent Employee "model" that will be utilized by the Guard instances. $query = $this->createModel()->newQuery()->{$this->scope}(); foreach ($credentials as $key => $value) { if (! Str::contains($key, 'password')) { $query->where($key, $value); } } return $query->first(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_user_by_credentials($credentials) {\n $stmt = $this->pdo->prepare('SELECT id, user_name, email_address, password, remember_me_until \n FROM users WHERE user_name = :user_name OR email_address = :email_address;');\n $stmt->execute([\n 'user_name' => $credentials,\n 'email_address' => $credentials\n ]);\n $user = $stmt->fetch();\n return $user;\n }", "public function getByCredentials(string $email, string $password): User;", "public function retrieveByCredentials(array $credentials)\n\t{\n\t\tif (! $user = $credentials[$this->getUsernameField()]) {\n\t\t\tthrow new \\InvalidArgumentException('\"'.$this->getUsernameField().'\" field is missing');\n\t\t}\n\n\t\t$query = $this->createModel()->newQuery();\n\n\t\tforeach ($credentials as $key => $value)\n\t\t{\n\t\t\tif ( ! str_contains($key, 'password')) $query->where($key, $value);\n\t\t}\n\n\t\t$model = $query->first();\n\t\tif($model) {\n\t\t\treturn $this->getUserFromLDAP($model);\n\t\t}\n\n\t\treturn null;\n\t}", "public function retrieveByCredentials(array $credentials)\n {\n // First we will add each credential element to the query as a where clause.\n // Then we can execute the query and, if we found a user, return it in a\n // generic \"user\" object that will be utilized by the Guard instances.\n $query = $this->model;\n foreach ($credentials as $key => $value) {\n if (!Str::contains($key, 'password')) {\n $query->where($key, $value);\n }\n }\n // Now we are ready to execute the query to see if we have an user matching\n // the given credentials. If not, we will just return nulls and indicate\n // that there are no matching users for these given credential arrays.\n $user = $query->first();\n return $this->getGenericUser($user);\n }", "public function retrieveByCredentials(array $credentials)\n {\n if (isset($credentials['user_code'])) {\n return User::where(['user_code' => $credentials['user_code']])->first();\n }\n\n if (isset($credentials['email'])) {\n $externalUser = ExternalUser::where(['email' => $credentials['email']])->first();\n if ($externalUser !== null) {\n return $externalUser->user;\n }\n }\n\n if (isset($credentials['jwt_token'])) {\n try {\n $decoded = JWT::decode($credentials['jwt_token'], $this->websiteToken, ['HS256']);\n $user = User::where(['user_code' => $decoded->lidnr])->first();\n if ($user === null) {\n // First login for user, create one\n $user = User::create([\n 'user_code' => $decoded->lidnr,\n 'type' => User::TYPE_GEWIS,\n ]);\n }\n return $user;\n } catch (\\UnexpectedValueException $e) {\n return null;\n }\n }\n\n return null;\n }", "public function retrieveByCredentials(array $credentials) {\n $userData = $this->getUserDataByEmail($credentials['email']);\n if ($userData != null && $userData[1] == $credentials['password']) {\n return \\User::fromCSV($userData);\n }\n return null;\n }", "public function getUser($credentials, UserProviderInterface $userProvider)\n {\n\t \n }", "private function getUserByRequestCredentials(Request $request)\n {\n if (null !== $u = $request->get('u')) {\n $username = str_replace('\\40', '@', $u);\n if (null !== $user = $this->getRepository('user')->findOneByEmailPro($username)) {\n return $user;\n }\n } else {\n $credentialsHeader = $request->headers->get('Authorization');\n $encodedCredentials = str_replace('Basic ', '', $credentialsHeader);\n if (null !== $userId = $this->get('session')->get('chat.auth.'.$encodedCredentials)) {\n return $this->getRepository('user')->find($userId);\n } else {\n if (false !== $credentialsHeader = base64_decode($encodedCredentials)) {\n $credentialsHeader = explode(':', $credentialsHeader);\n $username = isset($credentialsHeader[0]) ? $credentialsHeader[0] : '';\n $username = str_replace('\\40', '@', $username);\n $password = isset($credentialsHeader[1]) ? $credentialsHeader[1] : '';\n }\n\n if (!empty($username) && !empty($password) && filter_var($username, FILTER_VALIDATE_EMAIL)) {\n if (null !== $user = $this->getRepository('user')->findOneByEmailPro($username)) {\n if ((null !== $userToken = $user->getMeta($user::META_TOKEN_CHAT)) && $userToken->getValue() === $password) {\n if ($user->isEnabled()) {\n $this->get('session')->set('chat.auth.'.$encodedCredentials, $user->getId());\n return $user;\n }\n }\n }\n }\n }\n }\n\n\n return null;\n }", "public function retrieveByCredentials(array $credentials)\n {\n if (empty($credentials)) {\n return;\n }\n\n // First we will add each credential element to the query as a orWhere clause\n // and removes any passed scopes. Then we can execute the query and, if we found\n // a user, return it in a Eloquent User \"model\" that will be utilized by the Guard\n // instances.\n $query = $this->createModel()->newQuery()->withoutGlobalScopes($this->scopesToRemove);\n\n $query->where(function ($query) use ($credentials) {\n foreach ($credentials as $key => $value) {\n if (! Str::contains($key, 'password')) {\n $query->orWhere($key, $value);\n }\n }\n });\n\n return $query->first();\n }", "public function retrieveByCredentials(array $credentials)\n {\n /** @var \\Jcfk\\Models\\User $user */\n $user = parent::retrieveByCredentials($credentials);\n\n if ($user && $user->isActive()) {\n return $user;\n }\n\n return null;\n }", "public function retrieveByCredentials(array $credentials)\n {\n return new User($credentials);\n }", "public function retrieveUserByUsername($username)\n {\n return $this->start()->uri(\"/api/user\")\n ->urlParameter(\"username\", $username)\n ->get()\n ->go();\n }", "public function getUserByCredentials($username, $password)\n {\n return $this->find()->where('username', $username)->where('password', md5($password))->get();\n }", "public function getUserWithUsername($username);", "public function findByCredentials(array $credentials)\n\t{\n\t\t$model = $this->createModel();\n\t\t$loginName = $model->getLoginName();\n\n\t\tif ( ! array_key_exists($loginName, $credentials))\n\t\t{\n\t\t\tthrow new \\InvalidArgumentException(\"Login attribute [$loginName] was not provided.\");\n\t\t}\n\n\t\t$passwordName = $model->getPasswordName();\n\n\t\t$query = $model->newQuery();\n\t\t$hashableAttributes = $model->getHashableAttributes();\n\t\t$hashedCredentials = array();\n\n\n\t\t// build query from given credentials\n\t\tforeach ($credentials as $credential => $value)\n\t\t{\n\t\t\tif($credential == 'password')\n\t\t\t{\n\t\t\t\t\t$query = $query->whereRaw('password = md5(concat(\"'.$value.'\",bba_token))');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$query = $query->where($credential, '=', $value);\n\t\t\t}\n\t\t}\n\n\t\tif ( ! $user = $query->first())\n\t\t{\n\t\t\tthrow new Exception(\"A user was not found with the given credentials.\");\n\t\t}\n\t\tif ( $user->user_status == 'Locked')\n\t\t{\n\t\t\tthrow new Exception(\"Locked\");\n\t\t}\n\t\tif ( $user->user_status == 'Deleted')\n\t\t{\n\t\t\tthrow new Exception(\"Deleted\");\n\t\t}\n\t\treturn $user;\n\t}", "public static function get_user($user_id);", "public function user() {\n $connection = new HTTPConnector($this);\n $url = $this->credential->getRequestUrl(BitcasaConstants::METHOD_USER . BitcasaConstants::METHOD_PROFILE);\n if (!BitcasaUtils::isSuccess($connection->get($url))) {\n return null;\n }\n\n $response = $connection->getResponse(true);\n\n $user = User::getInstance($response);\n return $user;\n }", "public function getUser($username, $pass){\r\n return $this->userData->getUser($username, $pass);\r\n }", "public function retrieveByCredentials(array $credentials);", "public function retrieveByCredentials(array $credentials);", "public function retrieveByCredentials(array $credentials);", "public function retrieveByCredentials(array $credentials) {\n $query = $this->model->newQuery();\n \n foreach ( Arr::except($credentials, 'password') as $key => $value ) {\n $query->where($key, $value);\n }\n \n return $query->first();\n }", "public function getUser()\n {\n $identity = $this->session->get('auth-identity');\n if (isset($identity['id'])) {\n $user = Users::findFirstById($identity['id']);\n if ($user == false) {\n // throw new Exception('The user does not exist');\n }\n\n return $user;\n }\n\n return false;\n }", "public function getUser($username=\"*\", $password)\n {\n \tif ($username == \"*\") {\n \t\t$user = $this->getCurrentUser();\n \t\t} else {\n\t if (!filter_var($username, FILTER_VALIDATE_EMAIL)) {\n\t \t$user = Users::findFirst(\"user_username = '\" . $username . \"'\");\n\t \t} else {\n\t\t $user = Users::findFirst(\"user_email = '\" . $username . \"'\");\n\t }\n }\n if ($user == false) {\n \treturn false;\n }\n // Check the password\n if (!$this->security->checkHash($password, $user->user_password)) {\n\t\t\treturn false;\n }\n \treturn $user;\n \t}", "public function getUser($username, $password) {\n $conn = $this->getConnection();\n $pass = md5($password . getenv('SALT'));\n return $conn->query(\"SELECT * FROM User WHERE Username = '$username' AND Password = '$pass'\");\n }", "public function getUser() {\n\t\treturn User::newFromName( $this->params['user'], false );\n\t}", "function get_user_by_username_and_password($username, $password){\n if (self::validate_login($username, $password)){\n return self;\n }\n }", "public function retrieveByCredentials(array $credentials): AuthUserServiceContract\n {\n $criteria = collect([]);\n\n foreach ($credentials as $key => $value) {\n if (!Str::contains((string)$key, 'password')) {\n $criteria->put($key, $value);\n }\n }\n\n return $this->authUserService__()->workWithByFilters($criteria);\n }", "function get_one_user($username, $password){\n global $db;\n $query = \"SELECT * FROM users \n WHERE userName = :username AND \n password = :password\";\n $statement = $db->prepare($query);\n $statement->bindValue(':username', $username);\n $statement->bindValue(':password', $password);\n $statement->execute();\n $user = $statement->fetch();\n $statement->closeCursor();\n return $user; \n }", "private function _getUser($args)\n {\n try\n {\n $componentLoader = new MIDAS_ComponentLoader();\n $authComponent = $componentLoader->loadComponent('Authentication', 'api');\n }\n catch (Zend_Exception $e)\n {\n $authComponent = MidasLoader::loadComponent('Authentication');\n }\n return $authComponent->getUser($args, null);\n }", "public static function getUser();", "public function get_user($identifier)\n {\n return $this->call_method(\"get/user\",\n array('identifier' => $identifier,\n )\n );\n }", "public function retrieveById($identifier) {\n $username = $identifier;\n $password = $this->credential_store[$username];\n return new User([\n 'email' => $username,\n 'password' => $password,\n ]);\n }", "public static function getUser()\n\t{\n\t\tif(isset($_SESSION['user_id'])){\n\t\t\t\n\t\t\treturn User::findByID($_SESSION['user_id']);\n\t\t\t\n\t\t}else{\n\t\t\n\t\t\treturn static::loginFromRememberCookie();\n\t\t\n\t\t}\n\t}", "public function findUserByCredentials(string $email, string $password): ?UserView;", "public function getUser() {\n\t\treturn $this->api->getUserById($this->getUserId());\n\t}", "public function retrieveByCredentials(array $credentials)\n {\n return $this->retrieveByUsername($credentials);\n }", "public function retrieveByCredentials(array $credentials) {\n $query = $this->createModel()->newQuery();\n return $query->first();\n }", "public static function user() {\n // $userInfo = $oauth2->userinfo->get();\n $userInfo = json_decode(json_encode(['email' => '@', 'gender' => null, 'name' => 'test', 'picture' => 'f']));\n return User::fromGoogleUser($userInfo);\n \n }", "private function getUser()\n {\n if ($this->userData['id']) {\n $user = gateway('northstar')->asClient()->getUser($this->userData['id']);\n\n if ($user && $user->id) {\n info('Found user by id', ['user' => $user->id]);\n\n return $user;\n }\n }\n\n if ($this->userData['email']) {\n $user = gateway('northstar')->asClient()->getUserByEmail($this->userData['email']);\n\n if ($user && $user->id) {\n info('Found user by email', ['user' => $user->id]);\n\n return $user;\n }\n }\n\n if (! isset($this->userData['mobile'])) {\n return null;\n }\n\n $user = gateway('northstar')->asClient()->getUserByMobile($this->userData['mobile']);\n\n if ($user && $user->id) {\n info('Found user by mobile', ['user' => $user->id]);\n\n return $user;\n }\n\n return null;\n }", "public function getUser()\n {\n if ($this->_user === false) {\n $this->_user = Client::findByUsername($this->username);\n\n /** added login by email**/\n if($this->_user === false ){\n $this->_user = Client::findByEmail($this->username);\n }\n }\n\n return $this->_user;\n }", "public function getUser()\n {\n $attributes = $this->getUserAttributes();\n\n // Try to load user by ldap id attribute\n if ($this->idAttribute !== null && isset($attributes['authclient_id'])) {\n $user = User::findOne(['authclient_id' => $attributes['authclient_id'], 'auth_mode' => $this->getId()]);\n if ($user !== null) {\n return $user;\n }\n }\n\n return $this->getUserAuto();\n }", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function login($credentials)\n\t{\n\t\t$user = new MyErdikoUser();\n\t\tswitch ($credentials['username']) {\n\t\t\tcase \"[email protected]\":\n\t\t\t\t$user->setUsername('foo');\n\t\t\t\t$user->setDisplayName('Foo');\n\t\t\t\t$user->setUserId(1);\n\t\t\t\t$user->setRoles(array(\"client\"));\n\t\t\t\tbreak;\n\t\t\tcase \"[email protected]\":\n\t\t\t\t$user->setUsername('bar');\n\t\t\t\t$user->setDisplayName('Bar');\n\t\t\t\t$user->setUserId(2);\n\t\t\t\t$user->setRoles(array(\"admin\"));\n break;\n\t\t\tcase \"[email protected]\":\n\t\t\t\t$user->setUsername('jwt');\n\t\t\t\t$user->setDisplayName('JWT');\n\t\t\t\t$user->setUserId(2);\n\t\t\t\t$user->setRoles(array(\"client\"));\n\n $result = (object)array(\n \"user\" => $user,\n \"token\" => \"abc1234\"\n );\n\n return $result;\n\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $user;\n }", "public function getUser()\n {\n if ($this->_user === false) {\n $this->_user = mgcms\\db\\User::find()->andWhere(['or', ['username' => $this->username], ['email' => $this->username]])->one();\n }\n\n return $this->_user;\n }", "public function get( $arg ) {\n\n\t\tif ( is_numeric( $arg ) ) {\n\t\t\t$user = get_user_by( 'id', $arg );\n\t\t} elseif ( is_email( $arg ) ) {\n\t\t\t$user = get_user_by( 'email', $arg );\n\t\t\t// Logins can be emails.\n\t\t\tif ( ! $user ) {\n\t\t\t\t$user = get_user_by( 'login', $arg );\n\t\t\t}\n\t\t} else {\n\t\t\t$user = get_user_by( 'login', $arg );\n\t\t}\n\n\t\treturn $user;\n\t}", "public function getAuthenticatedUser()\n {\n return $this->getUnsplashClient()->sendRequest('GET', 'me');\n }", "public function getUser()\n {\n\t\t//TODO User 1. How can we check the id of the JWT user?\n\t\t$user = '';\n\t\tif ($user) {\n\t\t\treturn $this->sendResponse(UserModel::find($user->id));\n\t\t}\n\t\treturn $this->sendResponse('You are not authorised to view this user');\n }", "public function getUser()\n\t{\n\t\tif(isset($this->user))\n\t\t{\n\t\t\treturn $this->user;\n\t\t}\n\n\t\t$request = new ColoCrossing_Http_Request('/', 'GET');\n\t\t$executor = $this->getHttpExecutor();\n\t\t$response = $executor->executeRequest($request);\n\t\t$content = $response->getContent();\n\n\t\treturn $this->user = ColoCrossing_Object_Factory::createObject($this, null, $content['user'], 'user');\n\t}", "static public function getUser($username)\n {\n $user = User::where('username', $username)->first();\n if(!$user){\n $user = User::where('email', $username)->first();\n }\n return $user;\n }", "public function getUser()\n {\n if ($this->_user === false) {\n $this->_user = self::findOne(['login' => $this->login]);\n if($this->_user[attributes] === null) {\n self::findOne(['email' => $this->login]);\n }\n }\n\n return $this->_user;\n }", "public function getUser($username){\n return $this->findOneByName($username);\n }", "public static function get_user($username) \n {\n $db = Database::getDB();\n\t$query = 'SELECT * FROM users WHERE Username = :Username';\n\t$statement = $db->prepare($query);\n $statement->bindValue(':Username', $username);\n\t$statement->execute();\n\t$results = $statement->fetch();\n $statement->closeCursor();\n $user = new User($results['UserId'],\n $results['Username'],\n $results['Password'],\n $results['Name'],\n $results['Email'],\n $results['Image'],\n $results['Type']); \n\n return $user;\n }", "public function user()\n {\n $this->checkTimeouts();\n\n if (! $this->session->has('socialite_token')) return null;\n if ($this->session->has('google_guard_user')) return $this->session->get('google_guard_user');\n\n try {\n $user = Socialite::driver('google')->userFromToken($this->session->get('socialite_token'));\n } catch (\\Exception $e) {\n }\n\n if (! isset($user) || ! $user) return $this->flushSession();\n\n $userModel = $this->hydrateUserModel($user);\n $this->session->put('google_guard_user', $userModel);\n\n return $userModel;\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function get_user($user) {\n return $this->curl('users/' . $user);\n }", "public function user()\n {\n\n //Check if the user exists\n if (! is_null($this->user)) {\n return $this->user;\n }\n\n //Retrieve token from request and authenticate\n return $this->getTokenForRequest();\n }", "private function _getUser($args)\n {\n return $this->ModuleComponent->Authentication->getUser($args, $this->userSession->Dao);\n }", "public function getUser($username)\n {\n return $this->request->request(self::URI_USER . $username);\n }", "public function retrieveUser($userId)\n {\n return $this->start()->uri(\"/api/user\")\n ->urlSegment($userId)\n ->get()\n ->go();\n }", "protected function getUser($authToken)\n {\n list($headb64, $bodyb64, $cryptob64) = explode('.', $authToken);\n\n $body = JWT::jsonDecode(JWT::urlsafeB64Decode($bodyb64));\n $identity = data_get($body, 'sub');\n\n if (!$identity) {\n throw new AuthenticationException(__('The user credentials were incorrect.'));\n }\n\n return User::find($identity);\n }", "public function getMe()\n {\n return $this->_execute('/user/', self::METHOD_GET);\n }", "public function user()\n {\n if (!$this->user) {\n $identifier = $this->getToken();\n $this->user = $this->provider->retrieveByToken($identifier, '');\n }\n return $this->user;\n }", "public function user($id) {\n\n if (!isset($this->account_details['access_token'])) {\n throw new GoCardless_ClientException('Access token missing');\n }\n\n return GoCardless_User::find_with_client($this, $id);\n\n }", "public function user()\n {\n if ($this->loggedOut) {\n return;\n }\n\n // If we've already retrieved the user for the current request we can just\n // return it back immediately. We do not want to fetch the user data on\n // every call to this method because that would be tremendously slow.\n if (! is_null($this->user)) {\n return $this->user;\n }\n\n $id = $this->session->get($this->getName());\n\n // First we will try to load the user using the identifier in the session if\n // one exists. Otherwise we will check for a \"remember me\" cookie in this\n // request, and if one exists, attempt to retrieve the user using that.\n if (! is_null($id)) {\n if ($this->user = $this->provider->retrieveById($id)) {\n $this->fireAuthenticatedEvent($this->user);\n }\n }\n\n // If the user is null, but we decrypt a \"recaller\" cookie we can attempt to\n // pull the user data on that cookie which serves as a remember cookie on\n // the application. Once we have a user we can return it to the caller.\n $recaller = $this->recaller();\n\n if (is_null($this->user) && ! is_null($recaller)) {\n $this->user = $this->userFromRecaller($recaller);\n\n if ($this->user) {\n $this->replaceRememberToken($this->user, $recaller->token());\n\n $this->updateSession($this->user->getAuthIdentifier());\n\n $this->fireLoginEvent($this->user, true);\n }\n }\n\n return $this->user;\n }", "public function user()\n\t{\n\t\tif (is_null($this->user) and $this->session->has(static::$key))\n\t\t{\n\t\t\t$this->user = call_user_func(Config::get('auth.by_id'), $this->session->get(static::$key));\n\t\t}\n\n\t\treturn $this->user;\n\t}", "function get_user($username = '', $auth = '') {\n\t$user = array(\n\t\t'username' => '',\n\t\t'auth' => ''\n\t);\n\n\ttry {\n\t\t# Query for the requested user\n\t\t$dbh = get_dbh();\n\t\tif (strlen($username)) {\n\t\t\t$stmt = $dbh->prepare('SELECT username, auth FROM users WHERE username = ?');\n\t\t\t$stmt->execute(array($username));\n\t\t} else {\n\t\t\t$stmt = $dbh->prepare('SELECT username, auth FROM users WHERE auth = ?');\n\t\t\t$stmt->execute(array($auth));\n\t\t}\n\t\t$row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n\t\t# If the users exists, map it into our local array\n\t\tif ($row) {\n\t\t\tforeach (array_keys($user) as $key) {\n\t\t\t\t$user[$key] = $row[$key];\n\t\t\t}\n\t\t}\n\t} catch (PDOException $e) {\n\t\terror(0, 'DB error in get_user: ' . $e->getMessage());\n\t}\n\n\treturn $user;\n}", "public function retrieveByCredentials(array $credentials)\n {\n $criteria = [];\n foreach ($credentials as $key => $value) {\n if (!str_contains($key, 'password')) {\n $criteria[$key] = $value;\n }\n\n if($key == 'email')\n {\n $email = $this->em->getRepository(EmailAddress::class)->findOneBy(['email' => $value]);\n if(is_null($email)) return null;\n\n $criteria['primaryEmail'] = $email->getId();\n unset($criteria['email']);\n }\n }\n\n return $this->getRepository()->findOneBy($criteria);\n }", "public function getAuthUser()\n {\n $user = JWTAuth::authenticate(JWTAuth::getToken());\n\n return response()->json(['user' => $user]);\n }", "public function getUser($credentials, UserProviderInterface $userProvider): ?UserInterface\n {\n try {\n $email = $credentials['email'];\n $plainPassword = $credentials['password'];\n\n $signInCommand = new SignInCommand($email, $plainPassword);\n\n $this->bus->handle($signInCommand);\n\n /** @var UserView $user */\n $user = $this->queryBus->handle(new FindByEmailQuery($email));\n\n return Auth::create($user->uuid(), $user->email(), $user->encodedPassword());\n } catch (ValidationException | InvalidCredentialsException | NotFoundException | \\InvalidArgumentException $exception) {\n throw new BadCredentialsException($exception->getMessage(), 0, $exception);\n }\n }", "function get_user( $user_id ){\n\t$app = \\Jolt\\Jolt::getInstance();\n\treturn $app->store('db')->findOne('user', array( '_id'=>$user_id ));\n}", "public function user() {\n\t\tif ( ! is_null($this->user)) return $this->user;\n\t\treturn $this->user = $this->retrieve($this->token);\n\t}", "static public function GetUser() {\n if (self::GetImpersonatedUser()) {\n return self::GetImpersonatedUser();\n }\n return self::GetAuthUser();\n }", "public function fetchUser() {\n return $this->QueryAPI(\"current_user\");\n }", "function getUser($userName = null)\n{\n\tif (!$userName) return $this->loggedUser;\n\t$user = $this->getStorage()->getUser($userName);\n\tif ($user) $user->auth = $this;\n\treturn $user;\n}", "function GetUser()\n\t{\n\t\t$user = new User();\n\t\treturn $user->Get($this->userId);\n\t}", "protected function getUser()\n {\n return $this->loadUser(array(\n 'user_name' => $this->context['admin'],\n ));\n }", "public function getUser() {\n\t\treturn $this->getTable('User')->find($this->user_id);\n\t}", "public static function getLoggedInUser() {\n if (self::$loggedInUser == false) {\n //We need the Db class to escape the username, just in case.\n $db = Db::getInstance();\n\n // The email is used as the username to log into the service.\n $login = $db->escapeString($_SERVER['PHP_AUTH_USER']);\n $password = $db->escapeString($_SERVER['PHP_AUTH_PW']);\n \n $query = \"SELECT \".Config::AUTH_FIELD_UID.\", \".Config::AUTH_FIELD_LOGIN.\" \"\n .\"FROM \".Config::DB_DB.\".\".Config::AUTH_TABLE.\" WHERE \"\n .Config::AUTH_FIELD_LOGIN.\" = '$login' \"\n .\"AND `\".Config::AUTH_FIELD_PASSWORD.\"` = SHA1('$password')\";\n\n self::$loggedInUser = self::loadBySql($query);\n }\n\n return self::$loggedInUser;\n }", "public function user_get($username)\n {\n $q = sprintf(\"SELECT * FROM users WHERE username = '%s'\", $username);\n return $this->query($q);\n }", "public function getUser() : object\n {\n $user = new User();\n $user->setDb($this->db);\n $user->find(\"id\", $this->username);\n\n return $user;\n }", "public function getUserForAuth(User $user)\n {\n $query = \"select `username`, `age`, `role`, `email` from users where email = :email and password = :password limit 1\";\n $sth = $this->db->prepare($query);\n $sth->execute(\n array(\n ':email' => $user->getEmail(),\n ':password' => $user->getPassword()\n\n )\n );\n $resp = $sth->fetch(\\PDO::FETCH_OBJ);\n\n return $resp;\n }", "function getLoggedInUser($token)\n\t{\n\t\tglobal $db;\n\t\t$userId = $this->GetUserIdByToken($token);\n\t\tif(isset($userId))\n\t\t{\n\t\t\t$user = $db->smartQuery(array(\n\t\t\t\t\t'sql' => \"SELECT userid, email, isAdmin FROM `user` WHERE `userid`=:userId;\",\n\t\t\t\t\t'par' => array('userId' => $userId),\n\t\t\t\t\t'ret' => 'fetch-assoc'\n\t\t\t));\n\t\t\treturn $user;\n\t\t}\n\t\treturn (object)array(\"error\" => \"user not found\");\n\t}", "public function readCurrentUser()\n {\n\t\t$data = $this->call(array(), \"GET\", \"users/current.json\");\n\t\tif(isset($data->{'error'})){\n\t\t\tdie($data->{'error'});\n\t\t}\n\t\t$data = $data->{'user'};\n\t\treturn new User($data, $this);\n }", "function getUser($username,$password){\n $str_query = \"Select * from users where username='$username' AND password='$password'\";\n return $this->query ($str_query);\n }", "public function getUser($name = 'id')\n {\n return AuthComponent::user($name);\n }", "private function getUser() {\n\t\t$account = $this->authenticationManager->getSecurityContext()->getAccount();\n\t\t$user = $account->getParty();\n\t\treturn $user;\n\t}", "public function getUserOne()\r\n {\r\n return $this->getOne(User::class, [\r\n 'id' => 'user_id',\r\n ]); \r\n }", "public function getUser( $data )\r\n\t\t{\r\n\t\t\treturn DB::query( \"SELECT * FROM user WHERE username=:username AND password_hash=:password_hash AND status=1\", $data, true );\t\t\r\n\t\t}", "public function retrieve($username);", "function get_user($user_id)\n\t{\n\t\t$ci =& get_instance();\n\t\treturn $ci->auth_model->get_user($user_id);\n\t}" ]
[ "0.793193", "0.75642693", "0.74469113", "0.7326185", "0.72909325", "0.7171141", "0.7095507", "0.68557364", "0.6800361", "0.67877597", "0.6777385", "0.67693186", "0.6741582", "0.6736178", "0.6733566", "0.66533244", "0.66363764", "0.66100967", "0.66034484", "0.66034484", "0.66034484", "0.6600555", "0.6596486", "0.65898466", "0.6586915", "0.6579321", "0.65688956", "0.6543213", "0.64905447", "0.64904714", "0.648841", "0.64750624", "0.6473447", "0.64647", "0.6461333", "0.6456706", "0.64553505", "0.64217013", "0.64060336", "0.64013195", "0.639891", "0.63954765", "0.6393422", "0.6393422", "0.6393422", "0.6393422", "0.6393422", "0.6393422", "0.6393422", "0.6385116", "0.6384594", "0.63633776", "0.6359692", "0.63593316", "0.635044", "0.6345858", "0.63403285", "0.6339971", "0.633308", "0.63233835", "0.6314971", "0.6314971", "0.6314971", "0.6314971", "0.63088644", "0.6308794", "0.6304888", "0.6285966", "0.62808025", "0.62634116", "0.6255195", "0.62545896", "0.62518096", "0.6249996", "0.62471086", "0.6243619", "0.62322146", "0.62297803", "0.622826", "0.6227397", "0.6226571", "0.6215348", "0.6214736", "0.6212026", "0.6194418", "0.6186335", "0.61848396", "0.61769164", "0.6176204", "0.6175848", "0.61740696", "0.6167889", "0.61675274", "0.61613125", "0.6160141", "0.61527866", "0.61502075", "0.614298", "0.6132359", "0.61322975" ]
0.66772145
15
Display a listing of the resource.
public function index() { $channels = Channel::all(); return view('home.channels.index', compact('channels')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { return view('home.channels.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { // dd($request->all()); $validatedData = $request->validate([ 'name' => 'required|min:2|max:50', 'description' => 'nullable|min:5', ]); $channel = new Channel(); $channel = $this->handleImageUpload($request, $channel); $channel->name = $request->name; $channel->description = $request->description; $channel->user_id = auth()->id(); $channel->save(); // dd($request->all(), $user); return redirect()->to('/channels')->with(['message' => 'Canal adicionado com sucesso']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Check if a profile image has been uploaded
private function handleImageUpload(Request $request, Channel $channel){ if ($request->has('logo')) { // Get image file $image = $request->file('logo'); // Make a image name based on user name and current timestamp $name = Str::slug($request->input('name')).'_'.time(); // Define folder path $folder = '/uploads/channels/'; // Make a file path where image will be stored [ folder path + file name + file extension] $filePath = $folder . $name. '.' . $image->getClientOriginalExtension(); // Upload image $this->uploadImage($image, $folder, 'public', $name); // // Apagar a imagem que estava associada ao usuario anteriormente if($channel->logo && $channel->logo !== 'assets/img/s4.png') { $this->deleteImage($folder, 'public', explode('/', $channel->logo)[3]); } // Set user profile image path in database to filePath $channel->logo = $filePath; } return $channel; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasProfilePicture()\n {\n $file = public_path('/images/players/') . $this->id . '.webp';\n return ( file_exists($file) ) ? true : false;\n }", "public function photoExists(): bool\n {\n return Storage::disk($this->profilePhotoDisk())->exists($this->profile_photo_path);\n }", "public function profile_complete()\n\t{\n\t\t$profile_image = glob(\"uploads/avatar/\".$this->_user->id.\"*\");\n\t\treturn ( ! empty($this->_user->biography) AND !empty($profile_image));\n\t}", "public function isImage(){\n if(isset($_POST[\"submit\"])) {\n $check = getimagesize($_FILES[\"fileToUpload\"][\"tmp_name\"]);\n if($check !== false) {\n echo \"File is an image - \" . $check[\"mime\"] . \".<br>\";\n $this->uploadOk = 1;\n } else {\n echo \"File is not an image.<br>\";\n $this->uploadOk = 0;\n }\n }\n return $this->uploadOk;\n }", "public function isImage(){\n if($this->imageFileType != \"jpg\" && $this->imageFileType != \"png\" && $this->imageFileType != \"jpeg\"\n && $this->imageFileType != \"gif\" ) {\n echo \"Sorry, only JPG, JPEG, PNG & GIF files are allowed.<br>\";\n $this->uploadOk = 0;\n }\n return $this->uploadOk;\n }", "public function correctImage(){\n parent::isImage();\n parent::exist();\n parent::sizeFile();\n return $this->uploadOk;\n }", "function hasProfilePicture()\n\t{\n\t\treturn $this->ppic;\n\t}", "public function hasAvatar()\n {\n return isset($this->avatar);\n }", "public function hasAvatar(){\n return $this->_has(9);\n }", "public function hasAvatar(){\n return $this->_has(9);\n }", "public function hasImage(): bool;", "public function hasAvatar(){\n return $this->_has(6);\n }", "public function hasAvatar(){\n return $this->_has(5);\n }", "public function check_image(){\n $sql=\"SELECT * FROM photos\";\n $sql.=\" WHERE name='{$this->name}' \";\n\n $row=self::$connect->query($sql)->rowCount();\n if($row>=1){\n return true;\n }\n }", "public function has_image() {\r\n return ! empty( $this->image );\r\n }", "public function checkUpload() {}", "public function hasAvatar()\n {\n return $this->avatar ? true : false;\n }", "public function availablePhoto(){\n\t\t$this->query->save(\"pmj_member_photo\",array(\"registration_id\"=>getSessionUser(),\"filename_ori\"=>$this->input->post('radio-avatar'),\"filename\"=>$this->input->post('radio-avatar'),\"filename_thumb\"=>$this->input->post('radio-avatar'),\"type\"=>\"main\",\"avatar\"=>\"1\",\"submit_date\"=> date(\"Y-m-d H:i:s\"),\"status\"=>\"online\"));\n\t\t\n\t\tredirect(base_url().\"profile\");\n\t}", "public function hasAvatar() {\r\n\t\treturn !is_null($this->avatar);\r\n\t}", "public function hasImage()\n {\n return !empty($this->image) && file_exists($this->getImagePath());\n }", "public function isUploadedFile() {}", "public function isUploaded() {\n return ($this->getErrorCode() == UPLOAD_ERR_OK);\n }", "protected function checkFileUploadEnabled() {}", "public function exists()\n {\n if(isset($_FILES[$this->param_name])){\n return true;\n }\n else{\n return false;\n }\n }", "function userfile_check()\n\t\t{\n\t\t\tif ($_FILES['userfile']['size'] > 0)\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->form_validation->set_message('userfile_check', 'The {field} file is required');\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}", "public function hasImage()\n {\n return !is_null($this->image);\n }", "public function hasImage(): bool\n {\n return $this->hasImageType(\n $this->getMimeType()\n );\n }", "function checkImg(){\n global $postpath;\n return getimagesize($postpath) !== false;\n }", "public function uploadImage(User $currentUser, User $user) {\n return $currentUser->is($user);\n }", "public function hasPhoto(){\n\t\treturn ($this->photo != \"\");\n\t}", "private function isValidImage() {\r\n\t\t\treturn in_array($this->extension, $this->extAllowed) ? true : false;\r\n\t\t}", "public static function validateImageFile()\n {\n if (!isset($_FILES['logo_file'])) {\n Session::add('feedback_negative', Text::get('FEEDBACK_AVATAR_IMAGE_UPLOAD_FAILED'));\n return false;\n }\n if ($_FILES['logo_file']['size'] > 5000000) {\n // if input file too big (>5MB)\n Session::add('feedback_negative', Text::get('FEEDBACK_AVATAR_UPLOAD_TOO_BIG'));\n return false;\n }\n // get the image width, height and mime type\n $image_proportions = getimagesize($_FILES['logo_file']['tmp_name']);\n // if input file too small\n if ($image_proportions[0] < Config::get('AVATAR_SIZE') || $image_proportions[1] < Config::get('AVATAR_SIZE')) {\n Session::add('feedback_negative', Text::get('FEEDBACK_AVATAR_UPLOAD_TOO_SMALL'));\n return false;\n }\n if (!($image_proportions['mime'] == 'image/jpeg')) {\n Session::add('feedback_negative', Text::get('FEEDBACK_AVATAR_UPLOAD_WRONG_TYPE'));\n return false;\n }\n return true;\n }", "public function hasImage()\n {\n if ($this->_image) {\n return true;\n } else {\n return false;\n }\n }", "function upload_user_profile_picture(){\n\tif(isset($_FILES['profile_picture'])){\n //profile picture is taking from a form.\n\t//upload picture as a blob\n }\n return $profile_picture; // return profile_picture as a blob\n}", "private function checkImage(){\r\n \r\n $images = $this->image;\r\n @$imageName = $images['name'];\r\n @$imageTmp = $images['tmp_name'];\r\n @$imageSize = $images['size'];\r\n @$imageError = $images['error'];\r\n $imageExe = explode('.', $imageName);\r\n $imageExe = strtolower(end($imageExe));\r\n $newName = uniqid('post' , FALSE) . '.' . $imageExe;\r\n \r\n $allowed = [\"jpg\",\"jpeg\" ,\"bmp\" , \"gif\",\"png\"];\r\n// if(in_array($imageExe, $allowed) != 1) {\r\n// Messages::setMsg(\"خطأ\", \"يجب اختيار صورة حقيقية\", \"danger\") ;\r\n// echo Messages::getMsg();\r\n if(0) {\r\n \r\n }else if($imageSize > 1024 * 1024) {\r\n echo \"حجم الصورة جدا كبير\";\r\n }else if($imageError != 0) {\r\n echo \"يرجى ادخال صورة صحيحة\";\r\n }\r\n else{\r\n $dir = __DIR__ . \"/../libs/photos/\" ;\r\n if(!file_exists($dir)){\r\n mkdir($dir,TRUE);\r\n }\r\n $filedire = $dir.$newName;\r\n if(move_uploaded_file($imageTmp, $filedire)) {\r\n $this->uploadImage = $newName;\r\n }\r\n return TRUE;\r\n } // end else\r\n \r\n return false;\r\n }", "public function edit_fileupload_check()\n { \n \n // we retrieve the number of files that were uploaded\n $number_of_files = sizeof($_FILES['img']['tmp_name']);\n \n // considering that do_upload() accepts single files, we will have to do a small hack so that we can upload multiple files. For this we will have to keep the data of uploaded files in a variable, and redo the $_FILE.\n $files = $_FILES['img'];\n \n // first make sure that there is no error in uploading the files\n for($i=0; $i<$number_of_files; $i++)\n {\n if($_FILES['img']['error'][$i] != 0)\n {\n // save the error message and return false, the validation of uploaded files failed\n $this->form_validation->set_message('fileupload_check', 'Please add at least one Image');\n return FALSE;\n }\n return TRUE;\n }\n }", "public function isValidImage() {\n return $this->_is_validimage;\n }", "private function updateProfileImage($cleaned) {\n\t\t$value = $cleaned['profileImage'];\n\t\t$purify = Utils::purify($value);\t\t\n\t\tif ($purify == $value && @getImageSize($purify) != false) {\n\t\t\t$this -> user-> setData(\"profileImage\", $value);\n\t\t\t$this -> user-> write();\n\t\t\techo \"SUCCESS \". $purify;\n\t\t\treturn;\n\t\t} \n\t\techo \"Sorry, that image URL is invalid.\";\n\t}", "public function p_upload(){\n \n if(!isset($_FILES)){\n //send the user back to the profile but this time have error set.\n Router::redirect(\"/users/profile/\".$this->user->user_id.\"/error\");\n }\n //fixed filename upper case possibility.\n $_FILES['avatar_pic']['name'] = strtolower($_FILES['avatar_pic']['name']);\n //get file extension \n $parts = pathinfo( ($_FILES['avatar_pic']['name']) );\n //boolean set to FALSE for incorrect file extension uploading\n $upload_ok = FALSE;\n \n \n \n \n if($parts['extension'] == \"jpg\")\n $upload_ok = TRUE;\n if($parts['extension'] == \"jpeg\")\n $upload_ok = TRUE; \n if($parts['extension'] == \"png\")\n $upload_ok = TRUE;\n if($parts['extension'] == \"gif\")\n $upload_ok = TRUE; \n \n if($upload_ok) { \n //upload the chosen file and rename it temp-user_id.original extension\n Upload::upload($_FILES, \"/uploads/avatars/\", array(\"jpg\", \"jpeg\", \"gif\", \"png\"), \"temp-\".$this->user->user_id); \n //resize the image to 258x181 -- usually it's 258 wide then optimal height.\n $imgObj = new Image(APP_PATH.'uploads/avatars/'.'temp-'.$this->user->user_id.'.'.$parts['extension']);\n \n $imgObj->resize(100, 100);\n $imgObj->save_image(APP_PATH.'uploads/avatars/'.$this->user->user_id.'.'.'png'); //save the file as user_id.png\n unlink('uploads/avatars/'.'temp-'.$this->user->user_id.'.'.$parts['extension']); //delete the temp file\n Router::redirect(\"/users/profile/\".$this->user->user_id);\n }\n else {\n //send the user back to the profile but this time have error set.\n Router::redirect(\"/users/profile/\".$this->user->user_id.\"/error\");\n } //else\n }", "private function validatePhoto()\n {\n if (empty($this->photo['name'])) {\n $this->updateEditProfile();\n } else {\n $formatNamePhoto = new \\Module\\administrative\\Models\\helper\\AdmsFormatCharacter();\n $this->dados['imagem'] = $formatNamePhoto->formatCharacters($this->photo['name']);\n $uploadImg = new \\Module\\administrative\\Models\\helper\\AdmsUploadImgRed();\n $uploadImg->uploadImd(\n $this->photo,\n 'assets/image/user/' . $_SESSION['userId'] . '/',\n $this->dados['imagem'],\n 150,\n 150\n );\n if ($uploadImg->getResult()) {\n $deleteImg = new \\Module\\administrative\\Models\\helper\\AdmsDeleteImg();\n $deleteImg->deleteImage('assets/image/user/' \n . $_SESSION['userId'] . '/' . $this->imgageOld);\n $this->updateEditProfile();\n } else {\n $this->result = false;\n }\n }\n }", "public function check_exists(){\n if(!file_exists($this->file['tmp_name']) ){\n $this->file_name = 'sample.jpg';\n }else{\n $this->tmp_file_name = $this->file['tmp_name'];\n $this->file_type = $this->file['type'];\n $this->file_name = time() . '_' . $this->file['name']; //give name a timestamp to ensure no duplicate images made in the future\n }\n }", "protected function checkTrueImg()\n {\n\n if($this->imgFlag){\n\n if(!getimagesize($this->fileInfo['tmp_name'])){\n\n $this->error = 'The file is not image.';\n\n return false;\n\n }\n\n }\n\n return true;\n\n }", "function getHasPicture()\n {\n return (bool) $this->_bHasPicture;\n }", "public function ajax_check_banner_image_size() {\n \n $path = $_FILES['banner_image']['name'];\n $ext = pathinfo($path, PATHINFO_EXTENSION); \n \n $allowTypes = array('jpg','jpeg','gif','png');\n if(in_array(strtolower($ext),$allowTypes)){\n list($w, $h) = getimagesize($_FILES[\"banner_image\"][\"tmp_name\"]);\n if ($w == 1346 && $h == 660) echo 'Success'; else echo 'Error';\n } else {\n echo 'File_Ext_Err';\n }\n }", "public function hasFile()\n {\n \treturn empty($_FILES) ? false : true;\n }", "protected function validateOwner()\n {\n $value = $this->owner->getValue();\n if (!isset($value['error']) || UPLOAD_ERR_NO_FILE == $value['error']) {\n return true;\n }\n $mime = $this->getConfig();\n return is_array($mime)? in_array($value['type'], $mime):\n $value['type'] == $mime;\n }", "function check_image_existance($path,$image_name)\n{\n //buld the url\n $image_url=$path.$image_name;\n if (file_exists($image_url) !== false) {\n return true;\n }\n}", "public function CheckPicture(User $user)\n {\n if ($user->picture) {\n return $user->picture;\n } else {\n return false;\n }\n }", "public function is_valid_attach() {\r\n\t\tif ( ! current_user_can( 'edit_users' ) && ! $this->is_profile_page() ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}", "public function fileupload_check()\n { \n \n // we retrieve the number of files that were uploaded\n $number_of_files = sizeof($_FILES['img']['tmp_name']);\n \n // considering that do_upload() accepts single files, we will have to do a small hack so that we can upload multiple files. For this we will have to keep the data of uploaded files in a variable, and redo the $_FILE.\n $files = $_FILES['img'];\n \n // first make sure that there is no error in uploading the files\n for($i=0; $i<$number_of_files; $i++)\n {\n if($_FILES['img']['error'][$i] != 0)\n {\n // save the error message and return false, the validation of uploaded files failed\n $this->form_validation->set_message('fileupload_check', 'Please add at least one Image');\n return FALSE;\n }\n return TRUE;\n }\n }", "function isUpload()\n {\n return ($this->type->getTypeName() == 'file');\n }", "function image_exist( $img ) \r\n\t\t{\r\n\t\t\tif( @file_get_contents( $img,0,NULL,0,1) ){ return 1; } else{ return 0; }\r\n\t\t\t\r\n\t\t}", "public function ifImagesExist()\n {\n $session = new SessionContainer('imageUpload');\n if (isset($session->ids)\n && is_array($session->ids)\n && count($session->ids) != 0\n ) {\n return true;\n } else {\n return false;\n }\n }", "public function test_avatars_can_be_uploaded()\n {\n Storage::fake('avatars');\n\n $file = UploadedFile::fake()->image('avatar.jpg');\n\n $response = $this->post('/avatar', [\n 'avatar' => $file,\n ]);\n\n Storage::disk('avatars')->assertExists($file->hashName());\n }", "function logonscreener_image_is_valid($info) {\n $valid = $info['width'] == $GLOBALS['screen_width']\n && $info['height'] == $GLOBALS['screen_height']\n && $info['extension'] == 'jpeg'\n && $info['file_size'] <= LOGONSCREENER_MAX_FILESIZE;\n\n if ($valid) {\n logonscreener_log('Image is valid with no further transformation.');\n }\n\n return $valid;\n}", "public function hasUploadFile($key): bool {\n $file = $this->get($key);\n return is_uploaded_file($file['tmp_name']);\n }", "protected function isExternalImage() {}", "function isPresent($source) {\n global $debugging;\n $uploading = $this->uploading($source);\n if ($debugging > 2) {\n $ul = $uploading ? 'true':'false';\n echo \"<pre>uploading: {$ul} </pre>\";\n }\n return ($uploading || parent::isPresent($source));\n }", "public function isUploaded()\n {\n return $this->uploaded;\n }", "public function checkForProfile()\n\t\t{\n\t\t\treturn (!Auth::user()->profiles) ? false : true;\n\t\t}", "public function hasJustUploaded() {\n return $this->_has(8);\n }", "public function is_default_userpic()\n {\n $this->log('Checking for default userpic');\n return (false !== strpos($this->_connection->get(\n self::HOST . self::ACCOUNT_OVERVIEW_URL,\n null,\n self::HOST . self::ACCOUNT_URL\n ), 'no_videos_'));\n }", "public function isStatusUploading()\n\t{\n\t\treturn $this->status == self::STATUS_UPLOADING;\n\t}", "function uploadProfileImage($filename, $tmpLocation, $type) {\n\n global $userObj;\n global $imageObj;\n\n if($type === 'own') {\n $imageObj->load($tmpLocation);\n $width = $imageObj->getWidth();\n $height = $imageObj->getHeight();\n\n if($width < $height) {\n $imageObj->resizeToWidth(400);\n } else {\n $imageObj->resizeToHeight(400);\n }\n\n $imageObj->crop(400);\n }\n\n $imgName = time() . '_' . $filename;\n $newLocation = \"../../public/images/upload/\" . $imgName;\n\n $loggedUser = $userObj->loggedUser($_SESSION[\"user\"][\"userID\"]);\n\n //if the user had own profile image we delete it from storage\n if($loggedUser[\"profileImage\"] != \"defaultAvatar.png\") {\n $previousLocation = \"../../public/images/upload/\" . $loggedUser[\"profileImage\"];\n }\n\n if($userObj->uploadProfileImage($imgName, $_SESSION[\"user\"][\"userID\"])) {\n \n if($type === 'own') {\n $imageObj->save($newLocation, 100);\n } else {\n copy($tmpLocation, $newLocation);\n }\n\n if(isset($previousLocation)) {\n unlink($previousLocation);\n }\n\n $result[\"data_type\"] = 1;\n $result[\"data_value\"] = $imgName;\n\n echo json_encode($result);\n exit;\n } else {\n $result[\"data_type\"] = 0;\n $result[\"data_value\"] = \"An error occured\";\n\n echo json_encode($result);\n exit;\n }\n\n}", "function checkUserInfo($postInfo, $file, $required)\n {\n $imageRp = new ImageRespository();\n $validateF = new ValidateFunctions();\n\n for ($i = 0; $i < count($required); $i++) {\n if (!$validateF->checkFieldForBlank($required[$i])) {\n $_SESSION['error'] = ['Please ensure all fields are filled out.'];\n return false;\n }\n }\n if (!$validateF->checkEmail($postInfo['user_email'])) {\n $_SESSION['error'] = ['Please Enter a valid email.'];\n return false;\n }\n\n if (!$validateF->emailExists($postInfo['user_email'])) {\n if(!$validateF->emailExists($postInfo['user_email']))\n {\n if(!$validateF->belongToCurrentUser($postInfo['user_email'])){\n $_SESSION['error'] = ['Email is already in use.'];\n return false;\n }\n }\n }\n\n\n\n if ($_GET['action'] != 'edituser' || $_SESSION['id'] != $_GET['id']) {\n if (isset($postInfo['user_password']) && !$validateF->passwordCheck($postInfo['user_password'], $postInfo['user_confirm'])) {\n $_SESSION['error'] = ['Passwords do not match'];\n return false;\n }\n }\n\n if (!$validateF->accountType($postInfo)) {\n $_SESSION['error'] = ['Please pick an account type.'];\n return false;\n }\n\n if (!empty($file['file_upload']['name'] != '')) {\n\n $size = $file['file_upload']['size'];\n if (!$imageRp->checkImgSize($size, 15000000)) {\n $_SESSION['error'] = ['Image Size is greater then the maximum size.'];\n return false;\n }\n\n $fileType = $file['file_upload']['type'];\n if (!$imageRp->isImage($fileType)) {\n $_SESSION['error'] = ['Must be image type'];\n return false;\n }\n }\n\n return true;\n }", "public function hasFileUpload()\n\t{\n\t\treturn stripos($this->server->get('CONTENT_TYPE'),'multipart/form-data')!==false;\n\t}", "function Photo_Uploaded_Is_Valid($file_input, $Max_Size = 500000)\n{\n //Must havein HTML <form enctype=\"multipart/form-data\" .. //otherwise $_FILE is undefined // $file_input is the file input name on the HTML form\n if (!isset($_FILES[$file_input])) {\n return 'No image uploaded';\n }\n if ($_FILES[$file_input]['error'] != UPLOAD_ERR_OK) {\n return 'Error picture upload: code='.$_FILES[$file_input]['error'];\n }\n\n // Check image size\n if ($_FILES[$file_input]['size'] > $Max_Size) {\n return 'Image too big, max file size is '.$Max_Size.' Kb';\n }\n\n // Check that file actually contains an image\n $check = getimagesize($_FILES[$file_input]['tmp_name']);\n if ($check === false) {\n return 'This file is not an image';\n }\n\n // Check extension is jpg,JPG,gif,png\n $imageFileType = pathinfo(basename($_FILES[$file_input]['name']), PATHINFO_EXTENSION);\n if ($imageFileType != 'jpg' && $imageFileType != 'JPG' && $imageFileType != 'gif' && $imageFileType != 'png') {\n return 'Invalid image file type, valid extensions are: .jpg .JPG .gif .png';\n }\n\n return 'OK';\n}", "private function picture_src(){\n foreach (self::PICTURE_EXTENSIONS as $extension){\n $file = UPLOADS.$this->get_name_sanitized().'.'.$extension;\n if(file_exists($file)){\n return $file;\n }\n }\n return false;\n }", "public function picture()\n\t\t{\n\t\t\tif(!Auth::check())\n\t\t\t\treturn 'fail';\n\n\t\t\t$user = Auth::user();\n\t\t\t$profile = Profile::find($user->id);\n\t\t\t$profile->picture = Input::get('picture');\n\n\t\t\tif ($profile->save())\n\t\t\t\treturn 'success';\n\t\t}", "public function hasFileUpload()\n {\n $hasFileUpload = false;\n $option_id = $this->option_id;\n $fieldMaps = Engine_Api::_()->fields()->getFieldsMaps('yndynamicform_entry')->getRowsMatching('option_id', $option_id);\n foreach ($fieldMaps as $fieldMap) {\n $field = $fieldMap->getChild();\n $config = $field->config;\n if ($field->type == 'file_upload' && ($config['show_registered'] || $config['show_guest']))\n {\n $hasFileUpload = true;\n break;\n }\n }\n\n return $hasFileUpload;\n }", "public function isValid(): bool\n {\n return ($this->error === UPLOAD_ERR_OK) && is_uploaded_file($this->getPathname());\n }", "function is_uploaded_file($filename)\n{\n return file_exists($filename);\n}", "private function isImageExist($imageFileName){\n\t return Storage::disk('public_images')->exists($imageFileName);\n }", "function people_getUploadStatus () {\n $response = $this->execute(array('method' => 'flickr.people.getUploadStatus'));\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['user'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "protected function _checkImage() {\n if ( !is_file ( $this->src ) ) {\n $this->src = $this->default_missing_image; \n }\n $image_path_parts = pathinfo ( $this->src );\n $this->_image_name = $image_path_parts['basename'];\n $this->_thumb_filename = $this->attributes['width'] . 'x' . $this->attributes['height'] . '_' . $this->_image_name;\n $this->_thumb_src = $this->thumbs_dir_path . $this->_thumb_filename;\n if ( is_readable ( $this->_thumb_src ) ) {\n $this->_calculated_width = $this->attributes['width'];\n $this->_calculated_height = $this->attributes['height'];\n $this->src = $this->_thumb_src;\n return 'no_thumb_required';\n }\n if ( !$this->_original_image_info = getimagesize ( $this->src ) ) {\n return 'abort';\n } \n if (!in_array ( $this->_original_image_info['mime'], $this->_valid_mime ) ) {\n return 'abort';\n }\n }", "public function testAvatarSuccessfullyUploaded()\n {\n $avatarCount = count(Storage::disk('public')->files('avatars'));\n\n $response = $this->actingAs($this->user)->json('POST', '/avatar', [\n 'avatar' => UploadedFile::fake()->image('avatar.jpg')\n ]);\n\n $this->assertEquals($avatarCount + 1, count(Storage::disk('public')->files('avatars')));\n }", "function upload_pic($files){\n\n\t\t$config = array(\n\t\t\t'upload_path' => \"./assets/uploads\",\n\t\t\t'allowed_types' => \"gif|jpg|png|jpeg\",\n\t\t);\n\t\t$this->load->library('upload', $config);\n\t\t\n\t\tif ( ! $this->upload->do_upload('profile_pic'))\n\t\t{\n\t\t\t$error = array('error' => $this->upload->display_errors());\n\t\t\treturn FALSE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t}", "public function checkImage($image)\n {\n return File::exists(storage_path('app/public/'.$image));\n }", "public function canUpload()\n {\n return $this->checkFrontendUserPermissionsGeneric('userGroupAllowUpload');\n }", "function Is_image($filename){\n \n $size = getimagesize($filename);\nif($size==FALSE){\n $er=FALSE; \n\n}else{\n $er=TRUE; \n}\nreturn $er;\n}", "public function update_profileImage() {\n \n $data = $_POST['image'];\n\n list($type, $data) = explode(';', $data);\n list(, $data) = explode(',', $data);\n\n $data = base64_decode($data);\n $imageName = time().'.png';\n\n file_put_contents('files/uploads/users/'.$imageName, $data);\n $data = $this->request->data;\n $id = $this->Auth->user('id');\n $profile_image = $imageName;\n if (!empty($profile_image)) {\n $ext = substr(strtolower(strrchr($profile_image, '.')), 1);\n $arr_ext = array(\n 'jpg',\n 'jpeg',\n 'gif',\n 'png',\n );\n if (in_array($ext, $arr_ext)) {\n move_uploaded_file($profile_image, WWW_ROOT . 'files/uploads/users/' . $profile_image);\n \n $data['profile_image'] = $profile_image;\n $update = $this->User->updateUser($id, $data);\n if ($update == 1) {\n $this->Session->write('Auth.User.profile_image', $profile_image);\n die();\n }\n }\n }\n \n \n \n }", "public function uploadImage()\n {\n if($this->thumbnail){\n //hashing name of image by md5\n $name = md5(time().$this->thumbnail->baseName);\n $this->thumbnail->saveAs('upload/post/'.$name.'.'.$this->thumbnail->extension);\n $this->thumbnail = $name.'.'.$this->thumbnail->extension;\n return true;\n }else{\n return false;\n }\n }", "public static function uploadLogo()\n {\n Authentication::checkAuthentication();\n if (self::createLogo()) {\n return true;\n }\n return false;\n // Redirect::to('login/editAvatar');\n }", "public function IsValid() {\n\n return $this->Error === UPLOAD_ERR_OK;\n }", "public function uploadAvatar()\n {\n\n if (!empty($_FILES['avatar']['name'])) {\n\n\n // array containg the extensions of popular image files\n $allowedExtensions = array(\"gif\", \"jpeg\", \"jpg\", \"png\");\n\n //echo $_FILES['avatar']['name'];\n\n\n // make it so i can get the .extension\n $tmp = explode(\".\", $_FILES['avatar']['name']);\n\n\n // get the end part of the file\n $newfilename = hash('sha256', reset($tmp) . time());\n\n $extension = end($tmp);\n\n $_FILES['avatar']['name'] = $newfilename . \".\" . $extension;\n //echo $_FILES['avatar']['name'];\n\n\n // ok here we go.. maybe a switch might be nice?.. meh..\n if ((($_FILES['avatar']['type'] == \"image/gif\")\n || ($_FILES['avatar']['type'] == \"image/jpeg\")\n || ($_FILES['avatar']['type'] == \"image/jpg\")\n || ($_FILES['avatar']['type'] == \"image/png\"))\n && ($_FILES['avatar']['size'] < 2000000)\n && in_array($extension, $allowedExtensions)\n ) {\n\n // get the error\n if ($_FILES['avatar']['error'] > 0) {\n redirect('register.php', $_FILES['avatar']['error'], 'error');\n } else {\n // and finally move the file into the folder\n move_uploaded_file($_FILES['avatar']['tmp_name'], \"images/avatars/\" . $_FILES['avatar']['name']);\n //redirect('index.php', 'Amazing! your all signed up', 'success');\n $_SESSION['avatar'] = $_FILES['avatar']['name'];\n return true;\n }\n\n } else {\n // stop and warn the user that the file type is not suppoerted\n redirect('register.php', 'Invalid File Type! We only accept \"gif\", \"jpeg\", \"jpg\", or \"png\"', 'error');\n }\n } else {\n //move_uploaded_file($_FILES['avatar']['tmp_name'], SERVER_URI . \"images/avatars/\" . $_FILES['avatar']['name']);\n return false;\n }\n\n }", "public function savePhoto(){\n if($this->imageFile && $this->photo = $this->upload($this->user_id, $this->getPrimaryKey())) {\n //off the events to avoid infinite loop\n $this->off(self::EVENT_AFTER_INSERT, [$this, 'savePhoto']);\n $this->off(self::EVENT_AFTER_UPDATE, [$this, 'savePhoto']);\n \n return $this->save(false);\n } \n return true;\n }", "private function allowUploads(): bool\n {\n $allowUploads = isset($this->modVars['allowUploads']) && true === (bool) $this->modVars['allowUploads'];\n if (!$allowUploads) {\n return false;\n }\n if (!file_exists($this->avatarPath) || !is_readable($this->avatarPath) || !is_writable($this->avatarPath)) {\n return false;\n }\n\n return true;\n }", "public function hasFile()\n {\n return (count($this->getUploadedFiles()) > 0);\n }", "function check_file_existance($path)\n{\n //buld the url\n $image_url=$path;\n if (file_exists($image_url) !== false) {\n return true;\n }\n}", "public function SaveProfileImg() {\n $file_name = $_SESSION['user_id'] . \"-\" . time() . \"-\" . $this->ImageName;\n $file_size = $this->ImageSize;\n $file_tmp = $this->ImageTmpName;\n $tmp = explode('.', $file_name);\n $file_ext = end($tmp);\n $expensions = array(\"jpeg\", \"jpg\", \"png\", \"gif\");\n \n if (in_array($file_ext, $expensions) === false) {\n throw new Exception(\"extension not allowed, please choose a JPEG or PNG or GIF file.\");\n }\n \n if ($file_size > 2097152) {\n throw new Exception('File size must be excately 2 MB');\n }\n \n if (empty($errors) == true) {\n move_uploaded_file($file_tmp, \"data/profile/\" . $file_name);\n return \"data/profile/\" . $file_name;\n } else {\n echo \"Error\";\n }\n }", "public function isValid() : bool\n {\n return $this->status === UPLOAD_ERR_OK;\n }", "public function addProfileImage() {\n\n\t\t\n\t\t$upload_path = LITHIUM_APP_PATH.\"/resources/tmp/images/\";\n $temp_file = Upload::handleUpload('test',$upload_path);\n\n $thumb = new \\app\\libraries\\jiles\\images\\Thumbnail($upload_path.$temp_file);\n\t\t$file_name = $this->_session['_id'].'.jpg';\n $thumb->createThumbnail(null,200);\n\n\t $thumb->save(LITHIUM_APP_PATH.\"/webroot/img/members/profile/\".$file_name);\n\n $thumb->createThumbnail(50,50);\n\n\t\t\n $thumb->save(LITHIUM_APP_PATH.\"/webroot/img/members/small/\".$file_name);\n \n \n // add time stamp on so that the picture will refresh in the view.\n\t\t\n $result = array(\"success\"=>true,\"file\"=>\"/img/members/profile/\".$file_name.\"?\".strtotime('now'));\n echo htmlspecialchars(json_encode($result), ENT_NOQUOTES);\n \n\t\t die();\n\t\t\t\n\t\t\n\t}", "function uploadImg($_files, $myprofile, $colomn, $userID){\n\n\t\t$colomn = $colomn == 'cover' ? $colomn : 'image'; //check if the image of cover or avatar\n\t\t$folder = $colomn == 'cover' ? 'cover' : 'avatar'; //get the name of the folder based on the image if it is of cover or avatar\n\n\t\t//get the image data\n\t\t$imgName \t\t= $_files['image']['name'];\n\t\t$imgSize \t\t= $_files['image']['size'];\n\t\t$imgType \t\t= $_files['image']['type'];\n\t\t$imgTemp \t\t= $_files['image']['tmp_name'];\n\n\t\t// print_r(getimagesize($imgTemp));\n\t\t// exit();\n\n\t\t$imgExtension \t= strtolower(pathinfo($imgName, PATHINFO_EXTENSION));\n\n\t\t$allowedExtensions = array(\"png\", \"jpg\", \"jepg\", \"gif\"); //Allowed Images\n\n\t\t$formErrors = array(); //initialize the errors array\n\n\t\tif(empty($imgName))\t\t\t\t\t\t\t\t\t$formErrors[] = @lang('EMPTY_IMG');\n\t\tif($imgSize > 10*1024*1024)\t\t\t\t\t\t\t$formErrors[] = @lang('IMG_EXCEEDED'); //IF IMAGE MORE THAN 10MB\n\t\tif(! in_array($imgExtension, $allowedExtensions)) \t$formErrors[] = @lang('ERR_EXTENSION');\n\t\n\t\tif(empty($formErrors)){\n\n\t\t\t//delete the old image\n\t\t\t$oldImg = $colomn == 'cover' ? @$myprofile[0]['cover'] : @$myprofile[0]['image'];\n\n\t\t\tif(!empty($oldImg)){\n\t\t\t\t@unlink('layout/images/profiles/' . $folder . '/' . $oldImg);\n\t\t\t}\n\n\t\t\t//Upload the New Image\n\t\t\t$newName = encFileName($imgName); //encrypt the name of the image to stor it in DB\n\t\t\t$imgPath = \"layout/images/profiles/\" . $folder . \"/\" . $newName; // The Path Which Upload The Image To\n\n\t\t\tif(@move_uploaded_file($imgTemp, $imgPath)){ //upload the image\n\n\t\t\t\t$update = updateItems('users', $colomn . ' = ?' , array($newName, $userID), 'id = ?');\n\n\t\t\t\tif($update <= 0)\n\t\t\t\t\t$formErrors[] = @lang('ERR_UPLOAD_IMG');\n\n\t\t\t}else{\n\t\t\t\t$formErrors[] = @lang('ERR_IMG_NAME');\n\t\t\t}\n\t\t}\n\n\t\treturn $formErrors; //return the form errors to check if the upload done or error happened ?\n\t}", "public function storeImage($request, $fileKey, $fileName, $path) {\n\n if($request->hasFile($fileKey)){\n\n //get the file from the profile_image request...\n $image = $request->file($fileKey);\n\n //move the file to correct location\n $image->move($path, $fileName);\n\n }\n\n else {\n return false;\n }\n\n\n\n }", "public function has($key)\n {\n parent::has($key);\n return array_key_exists($key, $_FILES);\n }", "protected function validatePhoto(){\n\n $extension = $this->type;\n\n if( !empty($extension)){\n if($extension != 'image/jpeg' && $extension != 'image/png' && $extension != 'image/jpg'){\n $this->errors_on_upload[] = \"Your file should be .jpeg, .jpg or .png\";\n }\n }\n\n if($this->size > Config::MAX_FILE_SIZE){\n $this->errors_on_upload[] = \"Your picture shouldn't be more than 10 Mb\";\n }\n\n if($this->error != 0 && $this->error != 4) { //0 means no error, so if otherwise, display a respective message, 4 no files to upload, we allow that\n $this->errors_on_upload[] = $this->upload_errors_array[$this->error];\n }\n\n }", "protected function saveUserProfile(){\n\t\t$req = $this->postedData;\n\t\t$avatar = $req['avatar'];\n\t\t// Si un fichier est chargé, alors l'utilisateur veut certainement celui-ci comme avatar...\n\t\tif (isset($_FILES['field_string_avatarFile']) and !empty($_FILES['field_string_avatarFile']['name'])) $avatar = 'user';\n\n\t\tswitch ($avatar){\n\t\t\tcase 'default': $this->user->setAvatar('default'); break;\n\t\t\tcase 'gravatar': $this->user->setAvatar('gravatar'); break;\n\t\t\tcase 'user':\n\t\t\t\t$userAvatarFile = Sanitize::sanitizeFilename($this->user->getName()).'.png';\n\t\t\t\tif ((!isset($_FILES['field_string_avatarFile']) or empty($_FILES['field_string_avatarFile']['name'])) and !file_exists(\\Settings::AVATAR_PATH.$userAvatarFile)){\n\t\t\t\t\t// Si l'utilisateur n'a pas d'image déjà chargée et qu'il n'en a pas indiqué dans le champ adéquat, on retourne false\n\t\t\t\t\tnew Alert('error', 'Impossible de sauvegarder l\\'avatar, aucune image n\\'a été chargée !');\n\t\t\t\t\treturn false;\n\t\t\t\t}elseif(isset($_FILES['field_string_avatarFile']) and !empty($_FILES['field_string_avatarFile']['name'])){\n\t\t\t\t\t// Chargement de l'image\n\t\t\t\t\t$args = array();\n\t\t\t\t\t$args['resize'] = array('width' => 80, 'height' => 80);\n\t\t\t\t\t// Les avatars auront le nom des utilisateurs, et seront automatiquement transformés en .png par SimpleImages\n\t\t\t\t\t$args['name'] = $this->user->getName().'.png';\n\t\t\t\t\t$avatarFile = Upload::file($_FILES['field_string_avatarFile'], \\Settings::AVATAR_PATH, \\Settings::AVATAR_MAX_SIZE, \\Settings::ALLOWED_IMAGES_EXT, $args);\n\t\t\t\t\tif (!$avatar) {\n\t\t\t\t\t\tnew Alert('error', 'L\\'avatar n\\'a pas été pris en compte !');\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\t$this->user->setAvatar($avatarFile);\n\t\t\t\t}else{\n\t\t\t\t\t// Si l'utilisateur a déjà une image chargée et qu'il n'en a pas indiqué de nouvelle, on lui remet celle qu'il a déjà.\n\t\t\t\t\t$this->user->setAvatar($userAvatarFile);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'ldap': $this->user->setAvatar('ldap');\n\t\t}\n\t\t// L'authentification via LDAP ramène déjà le nom l'adresse email et la gestion du mot de passe\n\t\tif (AUTH_MODE == 'sql'){\n\t\t\tif (!isset($req['name'])){\n\t\t\t\tnew Alert('error', 'Vous n\\'avez pas indiqué le nom d\\'utilisateur !');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (!isset($req['email'])){\n\t\t\t\tnew Alert('error', 'Vous n\\'avez pas indiqué l\\'adresse email !');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$name = htmlspecialchars($req['name']);\n\t\t\tif (UsersManagement::getDBUsers($name) != null and $name != $this->user->getName()){\n\t\t\t\tnew Alert('error', 'Ce nom d\\'utilisateur est déjà pris !');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$email = $req['email'];\n\t\t\tif (!\\Check::isEmail($email)){\n\t\t\t\tnew Alert('error', 'Le format de l\\'adresse email que vous avez saisi est incorrect !');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$currentPwd = (isset($req['currentPwd'])) ? $req['currentPwd'] : null;\n\t\t\t$newPwd = (isset($req['newPwd'])) ? $req['newPwd'] : null;\n\t\t\tif (!empty($newPwd)){\n\t\t\t\t// On vérifie que le mot de passe actuel a bien été saisi\n\t\t\t\tif (!ACL::canAdmin('admin', 0) and empty($currentPwd)){\n\t\t\t\t\tnew Alert('error', 'Vous avez saisi un nouveau mot de passe sans saisir le mot de passe actuel !');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t// On vérifie que le mot de passe actuel est correct\n\t\t\t\tif (!ACL::canAdmin('admin', 0) and Login::saltPwd($currentPwd) != $this->user->getPwd()){\n\t\t\t\t\tnew Alert('error', 'Le mot de passe actuel que vous avez saisi est incorrect !');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t// On vérifie que le nouveau mot de passe comporte bien le nombre minimum de caractères requis\n\t\t\t\tif (strlen($newPwd) < \\Settings::PWD_MIN_SIZE){\n\t\t\t\t\tnew Alert('error', 'Le mot de passe doit comporter au moins '.\\Settings::PWD_MIN_SIZE.' caractères !');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t$this->user->setPwd($newPwd);\n\t\t\t}\n\t\t}\n\n\t\tif (UsersManagement::updateDBUser($this->user)){\n\t\t\t$msg = ($this->user->getId() == $GLOBALS['cUser']->getId()) ? '' : 'de '.$this->user->getName().' ';\n\t\t new Alert('success', 'Les paramètres du profil '.$msg.'ont été correctement sauvegardés !');\n\t\t\treturn true;\n\t\t}else{\n\t\t\tnew Alert('error', 'Echec de la sauvegarde des paramètres !');\n\t\t\treturn false;\n\t\t}\n\t}", "public function validUpload() {\t\n\t\tif($this->file['error'] == 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function isCoverImage(){\n\t\t$imageID = $this->input->post('imageID');\n\t\t$propertyid = $this->input->post('propertyid');\n\t\techo $responce = $this->AddProperty_model->isCoverImage($imageID,$propertyid);\n\t\texit;\n\t}", "public function check_for_profile(){\n\t\t\n\t\t//get username for logged in user\n\t\t$user_name = $_SESSION['username'];\n\t\t// get user id for the logged in user\n\t\t$user_id = Database::user_id_query($user_name);\n\t\t//call static fucntion to check if user profile already exists\n\t\t$result = UserProfileHelper::check_profile($user_id);\n\t\t//var_dump($result);\n\t\treturn $result;\n\t}", "public function getPicture_always_returnCorrectly()\n {\n $this->assertEquals($this->user['picture'], $this->entity->getPicture());\n }" ]
[ "0.7694139", "0.72921115", "0.724276", "0.70549077", "0.70106906", "0.69444096", "0.68692416", "0.68683964", "0.68220764", "0.68220764", "0.68219256", "0.6784254", "0.67752886", "0.6756287", "0.67381626", "0.67139375", "0.6706925", "0.66958326", "0.66589737", "0.6578977", "0.6555845", "0.64608926", "0.6447855", "0.6446816", "0.6440293", "0.64399385", "0.64068073", "0.6405982", "0.64041424", "0.64026874", "0.63848627", "0.637094", "0.6315794", "0.6277347", "0.6271329", "0.62616944", "0.623079", "0.622859", "0.62258637", "0.622549", "0.62148416", "0.6198035", "0.61925095", "0.6178545", "0.6175384", "0.61726046", "0.6144573", "0.61442924", "0.6142654", "0.61191005", "0.6118372", "0.6100128", "0.60970396", "0.6095711", "0.60864043", "0.60693985", "0.6061165", "0.6057776", "0.60575414", "0.60493624", "0.60493416", "0.60491943", "0.60487145", "0.60469544", "0.6024905", "0.6020447", "0.60045695", "0.5998594", "0.59984726", "0.59915423", "0.5991043", "0.5990795", "0.59764874", "0.5974314", "0.59699386", "0.5968985", "0.59582466", "0.5957351", "0.59531075", "0.59483784", "0.5946901", "0.59458303", "0.59392816", "0.5935392", "0.5932344", "0.5926848", "0.5915339", "0.5911793", "0.59098", "0.5908616", "0.59032124", "0.58993435", "0.5896611", "0.58962077", "0.5894135", "0.5893353", "0.58875144", "0.5883938", "0.5881819", "0.5881741", "0.58799297" ]
0.0
-1
Display the specified resource.
public function show($id) { return view('home.channels.show', ['channel' => Channel::find($id)]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit(Channel $channel) { // dd($channel->description); return view('home.channels.edit', ['channel' => $channel ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.7855196", "0.76957726", "0.7273917", "0.7241426", "0.71717227", "0.7064183", "0.70528984", "0.69836885", "0.694763", "0.69469565", "0.6941572", "0.69301945", "0.6903868", "0.68989486", "0.68989486", "0.68787694", "0.68641657", "0.6860115", "0.6857286", "0.68464494", "0.6834566", "0.68116575", "0.68075293", "0.6805924", "0.6801357", "0.6796291", "0.67915684", "0.67915684", "0.67874014", "0.678544", "0.67787844", "0.6777662", "0.67675763", "0.676299", "0.6746726", "0.6745706", "0.67450166", "0.67450166", "0.6739429", "0.6734577", "0.6725992", "0.67127997", "0.6694406", "0.6692487", "0.6689421", "0.66884303", "0.6687299", "0.6685663", "0.6682167", "0.66701853", "0.66697115", "0.6666091", "0.6666091", "0.66627705", "0.6661716", "0.6661522", "0.6657919", "0.6656454", "0.6653187", "0.6642113", "0.66332614", "0.66324973", "0.66275465", "0.66275465", "0.6619777", "0.6619387", "0.6617973", "0.66154003", "0.66110945", "0.6607966", "0.66065043", "0.6596376", "0.65953517", "0.65941286", "0.6591486", "0.6590759", "0.6588404", "0.658161", "0.6580548", "0.6579757", "0.6577171", "0.65761065", "0.657386", "0.65686774", "0.6567784", "0.65672046", "0.6566417", "0.65615803", "0.65615714", "0.65615714", "0.65592474", "0.65586483", "0.65568006", "0.6556628", "0.65564895", "0.6555322", "0.65551996", "0.6555016", "0.654888", "0.65477645", "0.65451735" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, Channel $channel) { // dd($channel, $request->all()); $validatedData = $request->validate([ 'name' => 'required|min:2|max:50', 'description' => 'nullable|min:5', ]); $channel = $this->handleImageUpload($request, $channel); $channel->name = $request->name; $channel->description = $request->description; $channel->save(); // dd($request->all(), $user); return redirect()->back()->with(['message' => 'Canal Atualizado com sucesso']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy(Channel $channel) { // $channel = Channel::find($channel); $message = 'Canal deletado com sucesso'; $channel->delete(); return redirect()->to('/channels')->with(['message' => $message]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Get Running Active Tickets in Site Gross Hold in previous 2 days
private function getLess2DaysCutOff($transdate, $sitecode) { $siteGHCutOff = new SiteGrossHoldCutOff(); //Cut Off Date To $date = strtotime($transdate); $dateTo = date("Y-m-d", strtotime("+1 day", $date)); $getRunningActive = $siteGHCutOff->getActiveTicketsByDate($transdate, $dateTo, $sitecode); $sumCount = 0; $sumValue = 0.00; if (count($getRunningActive) > 0) { foreach ($getRunningActive as $runningActive) { $sumCount = (int)$sumCount + (int)$runningActive['RunningActiveTicketCount']; $sumValue = (float)$sumValue + (float)$runningActive['RunningActiveTickets']; } } return array("SumCount" => $sumCount, "SumValue" => $sumValue); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function Tickets() {\n\t$filter = array(\"Status\"=>\"Open\");\n\treturn self::get_tickets($filter);\n\t\n \n \n \n \n\t}", "public function getActiveTickets() {\n try {\n $select = $this->select()\n ->from($this);\n// ->where('status =?',1);\n $result = $this->getAdapter()->fetchAll($select);\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n }\n if ($result) :\n return $result;\n endif;\n }", "private function getClosedTicketsByDayList() {\r\n\t\t$sql = \"SELECT dateadd(DAY,0, datediff(day,0, Date_Resolved_UTC)) AS day, count(TicketNbr) as count \";\r\n\t\t$sql .= \"FROM v_rpt_Service \";\r\n\t\t$sql .= \"WHERE Date_Resolved_UTC >= DATEADD(day, -30, GETDATE()) \";\r\n\t\t$sql .= \"AND ( \";\r\n\t\t$sql .= \"status_description LIKE '>%' \";\r\n\t\t$sql .= \"OR status_description LIKE 'Completed' \";\r\n\t\t$sql .= \")\";\r\n\t\t$sql .= \"GROUP BY dateadd(DAY,0, datediff(day,0, Date_Resolved_UTC)) \";\r\n\t\t$sql .= \"ORDER BY dateadd(DAY,0, datediff(day,0, Date_Resolved_UTC)) \";\r\n\t\t$result = sqlsrv_query($this->conn, $sql) or die ('Error in SQL: ' . $sql);\r\n\r\n\t\t$i = 0;\r\n\t\twhile($row = sqlsrv_fetch_array($result)) {\r\n\t\t\t$r[$i]['date'] = (strtotime($row['day'])*1000)-6*60*60*1000;\r\n\t\t\t$r[$i]['count'] = (string)$row['count'];\r\n\t\t\t$i++;\r\n\t\t}\r\n\r\n\t\treturn($r);\r\n\t}", "function getTickets()\r\n\t{\r\n\t\t// get account tickets\r\n\t\treturn $this->call_API('getTickets');\r\n\t}", "private function getSameDayTicketsByDayList() {\r\n\t\t$sql = \"SELECT dateadd(DAY,0, datediff(day,0, Date_Resolved_UTC)) AS day, count(TicketNbr) as count \";\r\n\t\t$sql .= \"FROM v_rpt_Service \";\r\n\t\t$sql .= \"WHERE Date_Resolved_UTC >= DATEADD(day, -30, GETDATE()) \";\r\n\t\t$sql .= \"AND ( \";\r\n\t\t$sql .= \"status_description LIKE '>%' \";\r\n\t\t$sql .= \"OR status_description LIKE 'Completed' \";\r\n\t\t$sql .= \") \";\r\n\t\t$sql .= \"AND dateadd(DAY,0, datediff(day,0, Date_Resolved_UTC)) = dateadd(DAY,0, datediff(day,0, Date_Entered_UTC)) \";\r\n\t\t$sql .= \"GROUP BY dateadd(DAY,0, datediff(day,0, Date_Resolved_UTC)) \";\r\n\t\t$sql .= \"ORDER BY dateadd(DAY,0, datediff(day,0, Date_Resolved_UTC)) \";\r\n\t\t$result = sqlsrv_query($this->conn, $sql) or die ('Error in SQL: ' . $sql);\r\n\r\n\t\t$i = 0;\r\n\t\twhile($row = sqlsrv_fetch_array($result)) {\r\n\t\t\t$r[$i]['date'] = (strtotime($row['day'])*1000)-6*60*60*1000;\r\n\t\t\t$r[$i]['count'] = (string)$row['count'];\r\n\t\t\t$i++;\r\n\t\t}\r\n\r\n\t\treturn($r);\r\n\t}", "public function getValidTickets() {\n\n try {\n $select = $this->select()\n ->from(array('t' => 'ticket_system'), array('t.ticket_id', 't.code', 't.bonus_amt', 't.valid_from', 't.valid_upto', 't.limitation', 't.status'))\n ->setIntegrityCheck(false)\n ->joinLeft(array('con' => 'contests'), 't.ticket_id = con.ticket_id', array(\"con.con_status\"))\n ->where('con.con_status = ?', '0')\n ->order('t.ticket_id DESC');\n\n\n $result = $this->getAdapter()->fetchAll($select);\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n }\n if ($result) :\n return $result;\n endif;\n\n\n\n // echo \"<pre>\"; print_r($result); echo \"</pre>\"; die;\n }", "private function getNewTicketsByDayList() {\r\n\t\t$sql = \"SELECT dateadd(DAY,0, datediff(day,0, Date_Entered_UTC)) AS day, count(TicketNbr) as count \";\r\n\t\t$sql .= \"FROM v_rpt_Service \";\r\n\t\t$sql .= \"WHERE Date_Entered_UTC >= DATEADD(day, -30, GETDATE()) \";\r\n\t\t$sql .= \"GROUP BY dateadd(DAY,0, datediff(day,0, Date_Entered_UTC)) \";\r\n\t\t$sql .= \"ORDER BY dateadd(DAY,0, datediff(day,0, Date_Entered_UTC)) \";\r\n\t\t$result = sqlsrv_query($this->conn, $sql) or die ('Error in SQL: ' . $sql);\r\n\r\n\t\t$i = 0;\r\n\t\twhile($row = sqlsrv_fetch_array($result)) {\r\n\t\t\t$r[$i]['date'] = (strtotime($row['day'])*1000)-6*60*60*1000;\r\n\t\t\t$r[$i]['count'] = (string)$row['count'];\r\n\t\t\t$i++;\r\n\t\t}\r\n\r\n\t\treturn($r);\r\n\t}", "private function getNewTicketsCount() {\r\n\t\t$sql = \"SELECT count(TicketNbr) as count \";\r\n\t\t$sql .= \"FROM v_rpt_Service \";\r\n\t\t$sql .= \"WHERE Date_Entered_UTC >= DATEADD(day, -1, GETDATE()) \";\r\n\t\t$result = sqlsrv_query($this->conn, $sql) or die ('Error in SQL: ' . $sql);\r\n\r\n\t\twhile($row = sqlsrv_fetch_array($result)) {\r\n\t\t\t$r = $row['count'];\r\n\t\t}\r\n\r\n\t\treturn($r);\r\n\t}", "private function getOldTicketsList() {\r\n\t\t$sql = \"SELECT TOP 5 summary, TicketNbr, status_description AS status, \";\r\n\t\t$sql .= \"company_name, age, resource_list as resources \";\r\n\t\t$sql .= \"FROM v_rpt_Service \";\r\n\t\t$sql .= \"WHERE status_description NOT LIKE '>%' \";\r\n\t\t$sql .= \"AND status_description NOT LIKE 'Completed' \";\r\n\t\t$sql .= \"ORDER BY age desc\";\r\n\t\t$result = sqlsrv_query($this->conn, $sql) or die ('Error in SQL: ' . $sql);\r\n\r\n\t\t$r = null;\r\n\t\t$i = 0;\r\n\t\twhile($row = sqlsrv_fetch_array($result)) {\r\n\t\t\t$r[$i]['summary'] = $row['summary'];\r\n\t\t\t$r[$i]['status'] = $row['status'];\r\n\t\t\t$r[$i]['ticket'] = $row['TicketNbr'];\r\n\t\t\t$r[$i]['client'] = $row['company_name'];\r\n\t\t\t$r[$i]['age'] = $row['age'];\r\n\t\t\t$r[$i]['resources'] = $row['resources'];\r\n\t\t\t$i++;\r\n\t\t}\r\n\r\n\t\treturn($r);\r\n\t}", "public function bookingActive()\n\t{\n\t\t$ch = new Curl();\n\t\t\n\t\t$this->headers['Authorization'] = 'Bearer ' . $this->authToken;\n\t\t\n\t\t$data = [];\n\t\t\n\t\treturn $ch->get(GojekID::BASE_ENDPOINT . Action::bookingActive, $data, $this->headers)->getResponse();\n\t}", "public function getTickets()\n {\n return $this->tickets;\n }", "public function getTickets_sold()\n {\n return $this->tickets_sold;\n }", "private function getClosedTicketsCount() {\r\n\t\t$sql = \"SELECT count(TicketNbr) as count \";\r\n\t\t$sql .= \"FROM v_rpt_Service \";\r\n\t\t$sql .= \"WHERE Date_Resolved_UTC >= DATEADD(day, -1, GETDATE()) \";\r\n\t\t$sql .= \"AND ( \";\r\n\t\t$sql .= \"status_description LIKE '>%' \";\r\n\t\t$sql .= \"OR status_description LIKE 'Completed' \";\r\n\t\t$sql .= \")\";\r\n\t\t$result = sqlsrv_query($this->conn, $sql) or die ('Error in SQL: ' . $sql);\r\n\r\n\t\twhile($row = sqlsrv_fetch_array($result)) {\r\n\t\t\t$r = $row['count'];\r\n\t\t}\r\n\r\n\t\treturn($r);\r\n\t}", "public function pendingTickets() {\n $tickets = $this->whereHas('status', function($query) {\n return $query->where('name', 'Solved');\n });\n\n return $tickets;\n }", "public function getSessionInPastTabPlanning()\n {\n $id = Yii::app()->user->idUser;\n $sessionPastPlanning = Yii::app()->db->createCommand(\n 'SELECT u.firstName, u.lastName, u.avatarPath, name, title, description, s.datePost, COUNT(DISTINCT(i.idUserInvited)) AS numInvitedUser,\n s.dateCreate, s.idSession, COUNT(DISTINCT(a.idArchive)) AS numArchive,s.active, s.idUserCreate\n FROM sessions AS s\n LEFT JOIN invited_session AS i ON s.idSession = i.idSession\n INNER JOIN users AS u ON s.idUserCreate = u.idUser\n INNER JOIN topics AS t ON s.idTopic = t.idTopic \n LEFT JOIN archive_session AS a ON s.idSession = a.idSession\n WHERE (s.idUserCreate = :idUserCreate) AND ((s.datePost+ INTERVAL 1 DAY) < Now())\n AND (t.active = 1)\n GROUP BY s.idSession\n ORDER BY s.dateCreate DESC')\n ->bindValues(array(':idUserCreate' => $id))\n ->queryAll();\n return $sessionPastPlanning;\n }", "function get_available_tickets( $include_member_tickets = false ){\n\t\t$tickets = array();\n\t\tforeach ($this->get_tickets() as $EM_Ticket){\n\t\t\t/* @var $EM_Ticket EM_Ticket */\n\t\t\tif( $EM_Ticket->is_available($include_member_tickets) ){\n\t\t\t\t//within time range\n\t\t\t\tif( $EM_Ticket->get_available_spaces() > 0 ){\n\t\t\t\t\t$tickets[] = $EM_Ticket;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$EM_Tickets = new EM_Tickets($tickets);\n\t\treturn apply_filters('em_bookings_get_available_tickets', $EM_Tickets, $this);\n\t}", "public function scopeAssigned($query)\n {\n return $query->whereIn('status', [Ticket::STATUS_WAITING, Ticket::STATUS_READY, Ticket::STATUS_INPROGRESS, Ticket::STATUS_REVISION])->orWhere(function($q){\n $date = new DateTime;\n $date->modify('-2 days');\n $formatted_date = $date->format('Y-m-d H:i:s');\n $q->where('status', Ticket::STATUS_DONE)->where('updated_at', '>', $formatted_date);\n })->get();\n }", "public function getTicketingPerformance(Request $request){\n\t\t$begin = memory_get_usage();\n\t\t$acronym_client = $request->client;\n\t\t$id_client = DB::table('ticketing__client')\n\t\t\t->where('client_acronym','=',$acronym_client)\n\t\t\t->value('id');\n\n\t\t$result = DB::table('ticketing__id')\n\t\t\t->join('ticketing__detail','ticketing__detail.id_ticket','=','ticketing__id.id_ticket')\n\t\t\t->where('ticketing__id.id_client','=',$id_client)\n\t\t\t->take(300)\t\n\t\t\t->orderBy('ticketing__id.id','DESC')\n\t\t\t->get();\n\n\t\tforeach ($result as $key => $value) {\n\t\t\t// echo $value->id . \"<br>\";\n\n\t\t\t\n\n\t\t\t$value->open = DB::table('ticketing__activity')\n\t\t\t\t->where('id_ticket','=',$value->id_ticket)\n\t\t\t\t->where('activity','=','OPEN')\n\t\t\t\t->value('date');\n\n\t\t\t$value->id_open = DB::table('ticketing__id')\n\t\t\t\t->where('id_ticket','=',$value->id_ticket)\n\t\t\t\t->value('id');\n\n\t\t\t$value->last_status = array(\n\t\t\t\tDB::table('ticketing__activity')\n\t\t\t\t\t->where('id_ticket','=',$value->id_ticket)\n\t\t\t\t\t->orderBy('id','DESC')\n\t\t\t\t\t->value('activity'),\n\t\t\t\tDB::table('ticketing__activity')\n\t\t\t\t\t->where('id_ticket','=',$value->id_ticket)\n\t\t\t\t\t->orderBy('id','DESC')\n\t\t\t\t\t->value('date')\n\t\t\t\t);\n\n\t\t\t$value->operator = DB::table('ticketing__activity')\n\t\t\t\t->where('id_ticket','=',$value->id_ticket)\n\t\t\t\t->orderBy('id','DESC')\n\t\t\t\t->value('operator');\n\t\t}\n\t\techo 'Total memory usage : '. (memory_get_usage() - $begin);\n\t\t// return $result;\n\t}", "public function userOpenTickets()\n {\n return $this->hasMany('PanicHD\\PanicHD\\Models\\Ticket', 'user_id')->whereNull('completed_at');\n }", "public function ticketIsActive()\n {\n return true ;\n }", "public function geefDagTickets() {\n $klant_id = $_SESSION['gebruiker']->geefKlant_id();\n if (isset($_POST['datum']) && !empty($_POST['datum'])) {\n //neemt de datum uit de post\n $datum = date(\"Y-m-d\", strtotime($_POST['datum']));\n } else {\n //maakt de datum aan van vandaag\n $datum = Date(\"Y-m-d\");\n }\n\n $sql = 'SELECT * FROM `tickets` WHERE `klant_id` = :klant_id AND `afspraak_datum` LIKE :datum';\n $stmnt = $this->db->prepare($sql);\n $stmnt->bindParam(':datum', $datum);\n $stmnt->bindParam(':klant_id', $klant_id);\n $stmnt->execute();\n $tickets = $stmnt->fetchAll(\\PDO::FETCH_CLASS, __NAMESPACE__ . '\\Ticket');\n return $tickets;\n }", "public function getTodayFreeSweepTimes()\n {\n return $this->get(self::_TODAY_FREE_SWEEP_TIMES);\n }", "public function runSLA(){\n $tickets = Ticket::where('duration', '!=', '')->where('sla_metric', '!=', '')->where('status', 2)->get();\n\n foreach($tickets as $ticket){\n $date = \\Carbon\\Carbon::parse($ticket->created_at);\n\n if($ticket->sla_metric==1){\n $date->addDays($ticket->duration);\n }\n else if($ticket->sla_metric==2){\n $date->addMonths($ticket->duration);\n }\n else if($ticket->sla_metric==3){\n $date->addDay($ticket->duration*7);\n }\n\n while($date->isWeekend()){\n $date->addDay();\n }\n\n if(\\Carbon\\Carbon::now()->diffInDays($date)>0){\n $ticket->status = 6;\n $ticket->save();\n\n $log = Comment::create([\n 'is_comment' => 0,\n 'comment' => ', this ticket is now past the due date. Please take action immediately.',\n 'user_id' => $ticket->assignee,\n 'commenter_role' => '2',\n 'ticket_id' => $ticket->id,\n 'class' => 'fa-clock-o'\n ]);\n }\n }\n }", "public function open_tickets()\n {\n return $this->hasMany('App\\Models\\Tickets', 'mailbox_id', 'id')->where('status', 'open');\n }", "public static function getUnassignedTickets() {\n $tickets = Self::where('is_assigned', 0)\n ->where('status_id', 1)\n ->where('is_approved', 1)\n ->where('created_at', '<', Carbon::now()->subMinutes(30)->toDateTimeString())\n ->get();\n\n return $tickets;\n }", "private function _getTicketsSales(Time $start, Time $end): array\n {\n $startIterator = $start->copy();\n $endIterator = $start->copy();\n $endIterator->addDay();\n\n $data = [];\n\n while ($startIterator < $end) {\n $data[] = [\n 'date' => $startIterator->format('Y-m-d'),\n 'book' => $this->Tickets->find('all')\n ->where([\n 'paid' => true,\n 'created >' => $start,\n 'created <' => $endIterator\n ])->count(),\n 'paypal' => $this->Tickets->find('all')\n ->where([\n 'created >' => $start,\n 'created <' => $endIterator,\n 'paid' => true,\n 'type' => 'paypal'\n ])->count(),\n 'perm' => $this->Tickets->find('all')\n ->where([\n 'created >' => $start,\n 'created <' => $endIterator,\n 'paid' => true,\n 'type' => 'perm'\n ])->count()\n ];\n\n $startIterator->addDay();\n $endIterator->addDay();\n }\n\n return $data;\n }", "function get_tickets( $force_reload = false ){\n\t\tif( !is_object($this->tickets) || $force_reload ){\n\t\t\t$this->tickets = new EM_Tickets($this->event_id);\n\t\t\tif( get_option('dbem_bookings_tickets_single') && count($this->tickets->tickets) == 1 ){\n\t\t\t\t//if in single ticket mode, then the event booking cut-off is the ticket end date\n\t\t \t$EM_Ticket = $this->tickets->get_first();\n\t\t \t$EM_Event = $this->get_event();\n\t\t \t//if ticket has cut-off date, that should take precedence as we save the ticket cut-off date/time to the event in single ticket mode\n\t\t \tif( !empty($EM_Ticket->ticket_end) ){\n\t\t \t\t//if ticket end dates are set, move to event\n\t\t \t\t$EM_Event->event_rsvp_date = $EM_Ticket->end()->format('Y-m-d');\n\t\t \t\t$EM_Event->event_rsvp_time = $EM_Ticket->end()->format('H:i:00');\n\t\t \t\tif( $EM_Event->is_recurring() && !empty($EM_Ticket->ticket_meta['recurrences']) ){\n\t\t \t\t\t$EM_Event->recurrence_rsvp_days = $EM_Ticket->ticket_meta['recurrences']['end_days'];\t\t \t\t\t\n\t\t \t\t}\n\t\t \t}else{\n\t\t \t\t//if no end date is set, use event end date (which will have defaulted to the event start date\n\t\t \t\tif( !$EM_Event->is_recurring() ){\n\t\t \t\t\t//save if we have a valid rsvp end date\n\t\t \t\t\tif( $EM_Event->rsvp_end()->valid ){\n\t\t\t\t\t\t $EM_Ticket->ticket_end = $EM_Event->rsvp_end()->getDateTime();\n\t\t\t\t\t }\n\t\t \t\t}else{\n\t\t\t \t\tif( !isset($EM_Ticket->ticket_meta['recurrences']['end_days']) ){\n\t\t\t \t\t\t//for recurrences, we take the recurrence_rsvp_days and feed it into the ticket meta that'll handle recurrences\n\t\t\t \t\t\t$EM_Ticket->ticket_meta['recurrences']['end_days'] = !empty($EM_Event->recurrence_rsvp_days) ? $EM_Event->recurrence_rsvp_days : 0;\n\t\t\t \t\t\tif( !isset($EM_Ticket->ticket_meta['recurrences']['end_time']) ){\n\t\t\t \t\t\t\tiF( empty($EM_Event->event_rsvp_time) ){\n\t\t\t\t\t\t\t\t $EM_Ticket->ticket_meta['recurrences']['end_time'] = $EM_Event->start()->getTime();\n\t\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t\t $EM_Ticket->ticket_meta['recurrences']['end_time'] = $EM_Event->event_rsvp_time;\n\t\t\t\t\t\t\t }\n\t\t\t \t\t\t}\n\t\t\t\t\t\t $EM_Ticket->ticket_end = $EM_Event->start()->format('Y-m-d') . $EM_Ticket->ticket_meta['recurrences']['end_time'];\n\t\t\t \t\t}\n\t\t \t\t}\n\t\t \t}\n\t\t\t}\n\t\t}else{\n\t\t\t$this->tickets->event_id = $this->event_id;\n\t\t}\n\t\treturn apply_filters('em_bookings_get_tickets', $this->tickets, $this);\n\t}", "public function geefTickets() {\n $klant_id = $_SESSION['gebruiker']->geefKlant_id();\n $sql = 'SELECT * FROM `tickets` WHERE `klant_id` = :klant_id';\n $stmnt = $this->db->prepare($sql);\n $stmnt->bindParam(':klant_id', $klant_id);\n $stmnt->execute();\n $tickets = $stmnt->fetchAll(\\PDO::FETCH_CLASS, __NAMESPACE__ . '\\Ticket');\n return $tickets;\n }", "public function geefEscalatiesTickets() {\n $klant_id = $_SESSION['gebruiker']->geefKlant_id();\n $sql = 'SELECT * FROM `tickets` WHERE `escalatie` != \"\" AND `klant_id` = :klant_id';\n $stmnt = $this->db->prepare($sql);\n $stmnt->bindParam(':klant_id', $klant_id);\n $stmnt->execute();\n $tickets = $stmnt->fetchAll(\\PDO::FETCH_CLASS, __NAMESPACE__ . '\\Ticket');\n return $tickets;\n }", "function getEventTickets($param) {\r\n\t$resultString = '';\r\n\t$param['websiteConfigID'] = WEB_CONF_ID;\r\n\t$param['numberOfRecords'] = TICKET_PAGINATION;\r\n\t$parametersExist = false;\r\n\t$paramkeys = array_keys($param);\r\n\tfor($a = 2; $a < count($param); $a++) {\r\n\t\tif($param[$paramkeys[$a]]) {\r\n\t\t\t$parametersExist = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\tif($parametersExist) {\r\n\t\t$client = new SoapClient(WSDL);\r\n\t\t$result = $client -> __soapCall('GetEventTickets', array('parameters' => $param));\r\n\t\tif(is_soap_fault($result)) {\r\n\t\t\techo '<h2>Fault</h2><pre>';\r\n\t\t\tprint_r($result);\r\n\t\t\techo '</pre>';\r\n\t\t}\r\n\t\t$paramTickets;\r\n\t\tunset($client);\r\n\t\tif(empty($result)){\r\n\t\t\treturn \"No tickets exist for that event\";\r\n\t\t}else {\r\n\t\t\tfor($q=0;$q<count($result->GetEventTicketsResult->Tickets->TicketGroup);$q++){//\r\n\t\t\t\t$resultsObj=$result->GetEventTicketsResult->Tickets->TicketGroup[$q];\r\n\t\t\t\t$eTickCount;\r\n\t\t\t\tforeach ($resultsObj as $k => $v) {\r\n\t\t\t\t\tglobal $eTickCount;\r\n\t\t\t\t\t$paramTickets[$eTickCount]=array($k=>$v);\r\n\t\t\t\t\t$eTickCount++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn $paramTickets;\r\n\t\t}\r\n\t}\r\n}", "public function agentOpenTickets()\n {\n return $this->hasMany('PanicHD\\PanicHD\\Models\\Ticket', 'agent_id')->whereNull('completed_at');\n }", "public function getUsersByClicks() {\n\t\ttry {\n\t\t\t$station = \\Auth::User()->station;\n\t\t\t$timezone = $station->getStationTimezone();\n\t\t\t$now = Carbon::now($timezone);\n\t\t\t$date = $now->copy()->subWeeks(11);\n\n\t\t\t//If station is Nova we want to start at March 11 since this is when we launched with them\n//\t\t\tif(\\Auth::User()->station->id == 8 && $date->lt(Carbon::parse('2016-03-11'))) {\n//\t\t\t\t$date = Carbon::parse('2016-03-11');\n//\t\t\t}\n\n\t\t\t$start = $date->copy()->startOfWeek();\n\t\t\t$end = $start->copy()->endOfWeek();\n\t\t\t$single_clicks = array(0,0,0,0,0,0,0,0,0,0,0,0);\n\t\t\t$double_clicks = array(0,0,0,0,0,0,0,0,0,0,0,0);\n\t\t\t$more_clicks = array(0,0,0,0,0,0,0,0,0,0,0,0);\n\t\t\t$week_labels = array();\n\n//\t\t\t$time = microtime(true);\n\t\t\tfor($i = 0; $i < 12; $i++) {\n\t\t\t\t$week_labels[] = $start->format('d M') . ' - ' . $end->format('d M');\n\n\t\t\t\t//Check if we stored in cache\n\t\t\t\t$cached = \\DB::table('airshr_analytics')\n\t\t\t\t\t->where('type', '=', Analytics::LISTENER_ENGAGEMENT)\n\t\t\t\t\t->where('end_time', '>=', $end->timestamp)\n\t\t\t\t\t->where('start_time', '<=', $start->timestamp)\n\t\t\t\t\t->first();\n\t\t\t\tif($cached && $now->gt($end)) {\n\t\t\t\t\t$result = unserialize($cached->data);\n\t\t\t\t\t$single_clicks[$i] = $result['single_clicks'];\n\t\t\t\t\t$double_clicks[$i] = $result['double_clicks'];\n\t\t\t\t\t$more_clicks[$i] = $result['more_clicks'];\n\t\t\t\t}\n\n\t\t\t\t//If there isn't the result in cache, run the query\n\t\t\t\telse {\n\t\t\t\t\t$users = \\DB::select(\\DB::raw('SELECT COUNT(*) as count FROM airshr_events\n\t\t\t\t\t\t\t\t\t\tWHERE record_timestamp >= :start\n\t\t\t\t\t\t\t\t\t\tAND record_timestamp <= :end\n\t\t\t\t\t\t\t\t\t\tAND station_id = :station\n\t\t\t\t\t\t\t\t\t\tGROUP BY record_device_id'),\n\t\t\t\t\t\tarray('start' => $start->timestamp,\n\t\t\t\t\t\t\t'end' => $end->timestamp,\n\t\t\t\t\t\t\t'station' => $station->id));\n\n\t\t\t\t\tforeach ($users as $user) {\n\t\t\t\t\t\tif ($user->count == 1) {\n\t\t\t\t\t\t\t$single_clicks[$i]++;\n\t\t\t\t\t\t} else if ($user->count == 2) {\n\t\t\t\t\t\t\t$double_clicks[$i]++;\n\t\t\t\t\t\t} else if ($user->count >= 3) {\n\t\t\t\t\t\t\t$more_clicks[$i]++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif($now->gt($end)) {\n\t\t\t\t\t\tAnalytics::create(['type' => Analytics::LISTENER_ENGAGEMENT,\n\t\t\t\t\t\t\t'start_time' => $start->timestamp,\n\t\t\t\t\t\t\t'end_time' => $end->timestamp,\n\t\t\t\t\t\t\t'data' => serialize(array('single_clicks' => $single_clicks[$i],\n\t\t\t\t\t\t\t\t'double_clicks' => $double_clicks[$i],\n\t\t\t\t\t\t\t\t'more_clicks' => $more_clicks[$i]))\n\t\t\t\t\t\t]);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$start->addWeek();\n\t\t\t\t$end = $start->copy()->endOfWeek();\n\t\t\t}\n//\t\t\t$elapsed = microtime(true) - $time;\n//\t\t\t\\Log::info('Time: '. $elapsed);\n\n\n\t\t\t$result = array();\n\n\t\t\treturn response()->json(array('code' => 0,\n\t\t\t\t'single_clicks' => $single_clicks,\n\t\t\t\t'double_clicks' => $double_clicks,\n\t\t\t\t'more_clicks' => $more_clicks,\n\t\t\t\t'labels' => $week_labels));\n\t\t} catch (\\Exception $ex) {\n\t\t\t\\Log::error($ex);\n\t\t\treturn response()->json(array('code' => -1, 'msg' => $ex->getMessage()));\n\t\t}\n\t}", "private function _getTicketsReferentSales()\n {\n $this->loadModel('Users');\n $users = $this->Users->find('all')->toArray();\n $data = [];\n\n foreach ($users as $user) {\n $count = $this->Tickets->find('all')->where(['paid' => 1, 'user_code' => $user->code])->count();\n\n if($count > 0) {\n $data[] = [\n 'label' => $user->firstname . ' ' . $user->lastname,\n 'value' => $this->Tickets->find('all')->where(['paid' => 1, 'user_code' => $user->code])->count()\n ];\n }\n }\n\n return $data;\n }", "public function getSessionInPastTabObservation()\n {\n $id = Yii::app()->user->idUser;\n $sessionPast = Yii::app()->db->createCommand(\n 'SELECT u.firstName, u.lastName, u.avatarPath, name, title, description, s.datePost,\n s.dateCreate,s.idSession, COUNT(DISTINCT(a.idArchive)) AS numArchive,s.active, s.idUserCreate\n FROM sessions AS s\n LEFT JOIN invited_session AS i ON s.idSession = i.idSession\n INNER JOIN users AS u ON s.idUserCreate = u.idUser\n INNER JOIN topics AS t ON s.idTopic = t.idTopic\n LEFT JOIN archive_session AS a ON s.idSession = a.idSession\n WHERE (i.idUserInvited = :idUserInvited OR s.idUserCreate = :idUserCreate) AND ((s.datePost+ INTERVAL 1 DAY) < Now())\n AND (t.active = 1)\n GROUP BY s.idSession\n ORDER BY s.dateCreate DESC')\n ->bindValues(array(':idUserInvited' => $id, ':idUserCreate' => $id))\n ->queryAll();\n return $sessionPast;\n }", "function getAllPlksExpiredWorkers(){\n\t\t\t$sqlQuery = \"SELECT * FROM workers WHERE wkr_permitexp < CURDATE() \n\t\t\t\t\t\t \t\tAND wkr_transtatus IN ('4', '6', '7')\t\t\t\n\t\t\t\t\t\t \t AND wkr_status = 1\n\t\t\t\t\t\t \t\tAND wkr_id NOT IN(\n\t\t\t\t\t\t\t\t\tSELECT permit_wkrid FROM wkr_updatepermit WHERE permit_progress <> 'complete'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t \t\tORDER BY wkr_permitexp\";\t\n\t\t\t\n\t\t\treturn $this->db->query($sqlQuery);\n\t\t}", "public static function get_expired_parking_history() {\n return ParkingHistory::where(\"is_towed\", \"=\", 1)->with(\"parking\")->with(\"vehicle.user\")->get()->toArray();\n }", "public function getActives($date) {\n $start = $date . ' 23:59:59';\n $subscriptionsAll = DB::table('subscriptions')\n ->select(DB::raw('MAX(id) as id'))\n ->where('status_change', '<=', $start)\n ->groupBy('user_id');\n \n $subscriptionsActives = DB::table('subscriptions')\n ->join('status', function ($join) {\n $join->on('status.id', '=', 'subscriptions.status_id');\n })\n ->joinSub($subscriptionsAll, 'sa', function ($join) {\n $join->on('subscriptions.id', '=', 'sa.id');\n })\n ->where('subscriptions.status_change', '<=', $start)\n ->count();\n return $subscriptionsActives;\n }", "public function getExpired()\n {\n return Item::join('item_batches', 'items.id', '=', 'item_batches.item_id')\n ->join('measurement_units', 'items.unit_id', '=', 'measurement_units.id')\n ->where('item_batches.expiry_date', '<', Carbon::now())\n ->where('item_batches.current_quantity', '!=', 0)\n ->select('items.description', 'item_batches.current_quantity', 'measurement_units.short_name', 'item_batches.expiry_date')\n ->get();\n }", "public function getActives()\n {\n $condition = \"since <= '\" . date(\"Y-m-d H:i:s\") . \"' AND until > '\" . date(\"Y-m-d H:i:s\") . \"' OR permanent\";\n return parent::get($condition, \"position\", false);\n }", "public function getTickets(){\n $sql = \"SELECT idChap, chapter, titleChap, DATE_FORMAT(dateChap, 'Le %d-%m-%Y à %k:%i') AS dateChap, DATE_FORMAT(dateChapUpdate, 'Le %d-%m-%Y à %k:%i') AS dateChapUpdate, contentChap FROM chapitres ORDER BY chapter DESC\";\n $tickets = $this->executeRequest($sql);\n return $tickets;\n }", "public function getTicket()\n {\n //Query untuk mengambil data semua ticket\n return $this->db->get('ticket');\n }", "private function getDayCutOff($transdate, $sitecode)\n {\n $ticketModel = new TicketModel();\n\n //Cut Off Date To\n $date = strtotime($transdate);\n $dateTo = date(\"Y-m-d\", strtotime(\"+1 day\", $date));\n\n $getPrintedTickets = $ticketModel->getNumberOfPrintedTickets($transdate, $dateTo, $sitecode);\n $getUsedTickets = $ticketModel->getNumberOfUsedTickets($transdate, $dateTo, $sitecode, 1);\n $getEncashedTickets = $ticketModel->getNumberOfEncashedTickets($transdate, $dateTo, $sitecode, 1);\n $getExpiredTickets = $ticketModel->getNumberOfExpiredTickets($transdate, $dateTo, $sitecode);\n\n $sumCount = $getPrintedTickets['PrintedTickets'] - ($getUsedTickets['UsedTickets'] + $getEncashedTickets['EncashedTickets']);\n $sumValue = $getPrintedTickets['Value'] - ($getUsedTickets['Value'] + $getEncashedTickets['Value']);\n //less expired tickets\n $_sumCount = $sumCount - $getExpiredTickets['ExpiredTickets'];\n $_sumValue = $sumValue - $getExpiredTickets['Value'];\n\n return array(\"SumCount\" => $_sumCount, \"SumValue\" => $_sumValue);\n }", "public function get_tickets($archived = false){\n\t\t//if not looked for archived, retrieve all open tickets\n\t\tif ($archived == FALSE){\n\t\t\t$this->db->order_by(\"created_at\", \"DESC\");\n $query = $this->db->get_where('tickets', array('status' => 'Open'));\n return $query->result_array(); \n\t\t\t}\n\t\t\t//retrieve all closed tickets\n\t\t\telse {\n\t\t\t$this->db->order_by(\"created_at\", \"DESC\");\n\t\t\t$query = $this->db->get_where('tickets', array('status' => 'Closed'));\n\t\t\treturn $query->result_array();\n\t\t\t}\n\t}", "private function getOverBudgetList() {\r\n\t\t$sql = \"SELECT TOP 10 summary, TicketNbr, status_description AS status, Hours_Actual, \";\r\n\t\t$sql .= \"Hours_Budget, company_name, (Hours_Budget - Hours_Actual) AS hours_remaining \";\r\n\t\t$sql .= \"FROM v_rpt_Service \";\r\n\t\t$sql .= \"WHERE status_description NOT LIKE '>%' \";\r\n\t\t$sql .= \"AND status_description NOT LIKE 'Completed' \";\r\n\t\t$sql .= \"AND Hours_Budget > 0 \";\r\n\t\t$sql .= \"AND (Hours_Budget - Hours_Actual) < 0 \";\r\n\t\t$sql .= \"ORDER BY hours_remaining\";\r\n\t\t$result = sqlsrv_query($this->conn, $sql) or die ('Error in SQL: ' . $sql);\r\n\r\n\t\t$r = null;\r\n\t\t$i = 0;\r\n\t\twhile($row = sqlsrv_fetch_array($result)) {\r\n\t\t\t$r[$i]['summary'] = $row['summary'];\r\n\t\t\t$r[$i]['status'] = $row['status'];\r\n\t\t\t$r[$i]['ticket'] = $row['TicketNbr'];\r\n\t\t\t$r[$i]['client'] = $row['company_name'];\r\n\t\t\t$r[$i]['hremaining'] = (float)$row['hours_remaining'];\r\n\t\t\t$i++;\r\n\t\t}\r\n\r\n\t\treturn($r);\r\n\t}", "function findAppointmentsDue(){\n\t$db = dbConnect();\n\n\t$sql = \"SELECT id FROM Appointment WHERE start_date > date_add(NOW(),INTERVAL 15 MINUTE) AND start_date <= date_add(NOW(),INTERVAL 30 MINUTE) AND status = 2 AND (type = 0 OR type = 1)\";\n\n\t$results = $db->query($sql);\n\n\treturn $results;\n}", "static function currentExhibit(){\n\t\t$res = requete_sql(\"SELECT id FROM exhibit WHERE begin_date <= now() AND end_date >= now() \");\n\t\t$res = $res->fetchAll(PDO::FETCH_ASSOC);\n\t\t$currentExhibit = array();\n\t\tforeach ($res as $exhibit) {\n\t\t\t$exhibit = new Exhibit($exhibit['id']);\n\t\t\tarray_push($currentExhibit, $exhibit);\n\t\t}\n\t\treturn $currentExhibit;\n\t}", "public function tickets(Ticket $ticket)\n {\n $range = explode('-', $this->request->range);\n $start_date = date('Y-m-d', strtotime($range[0]));\n $end_date = date('Y-m-d', strtotime($range[1]));\n $this->request->request->add(['date_range' => [$start_date, $end_date]]);\n $tickets = $ticket->apply($this->request->except(['range']))->with(['user:id,username,name', 'dept', 'AsStatus'])->get();\n $html = view('analytics::_ajax._tickets', compact('tickets'))->render();\n\n return response()->json(['status' => 'success', 'html' => $html, 'message' => 'Processed successfully'], 200);\n }", "function getCustOverdue($db_link){\n\t\t$last_subscr = time() - convertDays(365); //Seconds for 365 days\n\t\t$sql_custoverdue = \"SELECT * FROM customer WHERE cust_active = 1 AND cust_lastsub < $last_subscr ORDER BY cust_lastsub, cust_id\";\n\t\t$query_custoverdue = mysqli_query($db_link, $sql_custoverdue);\n\t\tcheckSQL($db_link, $query_custoverdue, $db_link);\n\n\t\treturn $query_custoverdue;\n\t}", "public function active()\n {\n // Create query finding all active sessions\n $query = $this->entityManager->createQuery('SELECT s.id, s.name, s.isPrivate, count(m.id) memberCount FROM Session s LEFT JOIN s.members m WHERE s.lastAction > ?1 GROUP BY s.id');\n $query->setParameter(1, new DateTime('-1 hour'));\n $sessions = $query->getArrayResult();\n return $sessions;\n }", "public function getExpiringSoon()\n {\n return Item::join('item_batches', 'items.id', '=', 'item_batches.item_id')\n ->join('measurement_units', 'items.unit_id', '=', 'measurement_units.id')\n ->where('item_batches.expiry_date', '<', Carbon::now()->addMonths(3))\n ->where('item_batches.expiry_date', '>', Carbon::now())\n ->where('item_batches.current_quantity', '!=', 0)\n ->select('items.description', 'item_batches.current_quantity', 'measurement_units.short_name', 'item_batches.expiry_date')\n ->get();\n }", "public function getLastActivity()\r\n {\r\n $lastId = end($this->messages);\r\n\r\n $lastMsg = new TicketMessage($lastId);\r\n $lastActive = $lastMsg->getTimeCreated();\r\n \r\n return $lastActive; \r\n }", "function getRevenueData($varAction=null,$data=null) {\n //echo \"<pre>\";\n $objClassCommon = new ClassCommon();\n $arrRes=array();\n $argWhere='';\n $varTable = TABLE_ORDER_ITEMS;\n \n if($varAction=='today' || $varAction=='yesterday'){\n if($varAction=='today'){\n $dateToday=date('Y-m-d'); \n }else{\n $dateToday=date('Y-m-d',strtotime(\"-1 days\"));\n }\n \n \n for ($i=4;$i<25;$i=$i+4){\n \n $num_paddedTotime = sprintf(\"%02d\", $i);\n $num_paddedFromtime = sprintf(\"%02d\", $i-4);\n $toTime=$dateToday.' '.$num_paddedTotime.':00:00';\n $fromTime=$dateToday.' '.$num_paddedFromtime.':00:00';\n \n $arrClms = array('TIME(ItemDateAdded) as date');\n $argWhere = 'ItemDateAdded >= \"'.$fromTime.'\" AND ItemDateAdded < \"'.$toTime.'\"';\n $argWhere .= 'AND Status <> \"Canceled\"';\n \n $arrData = $this->select($varTable, $arrClms, $argWhere);\n $count=count($arrData);\n $arrRes[$i]['time'][]=$arrData;\n $arrRes[$i]['count']=$count;\n }\n //print_r($arrRes);\n //die;\n //print_r($arrData);\n //print_r($arrTime);\n //print_r($arrRangeTimes);\n }elseif($varAction=='last_week'){\n $arrWeeksDates=$objClassCommon->getlastWeekDates();\n \n \n foreach($arrWeeksDates as $key=>$date){\n $toTime=$date.' 23:00:00';\n $fromTime=$date.' 00:00:00';\n \n $arrClms = array('DATE(ItemDateAdded) as date');\n $argWhere = 'ItemDateAdded >= \"'.$fromTime.'\" AND ItemDateAdded <= \"'.$toTime.'\"';\n $argWhere .= 'AND Status <> \"Canceled\"';\n \n $arrData = $this->select($varTable, $arrClms, $argWhere);\n $count=count($arrData);\n $arrRes[$key]['dates']=$arrData;\n $arrRes[$key]['count']=$count;\n }\n //print_r($arrWeeksDates);\n //print_r($arrRes);\n //die;\n //print_r($arrData);\n //print_r($arrTime);\n //print_r($arrRangeTimes);\n }elseif($varAction=='last_month'){\n $lastMonth=date('n', strtotime(date('Y-m').\" -1 month\"));\n $lastMonthYear=date('Y', strtotime(date('Y-m').\" -1 month\"));\n \n $arrWeeksDates=$objClassCommon->getWeeks($lastMonth,$lastMonthYear);\n //echo $lastMonth.'=='.$lastMonthYear;\n //echo \"<pre>\";\n //print_r($arrWeeksDates);\n //die;\n \n foreach($arrWeeksDates as $key=>$date){\n $toTime=$date['endDate'].' 23:00:00';\n $fromTime=$date['startDate'].' 00:00:00';\n \n $arrClms = array('DATE(ItemDateAdded) as date');\n $argWhere = 'ItemDateAdded >= \"'.$fromTime.'\" AND ItemDateAdded <= \"'.$toTime.'\"';\n $argWhere .= 'AND Status <> \"Canceled\"';\n \n $arrData = $this->select($varTable, $arrClms, $argWhere);\n $count=count($arrData);\n $arrRes[$key]['dates']=$arrData;\n $arrRes[$key]['count']=$count;\n }\n //print_r($arrWeeksDates);\n //print_r($arrRes);\n //die;\n //print_r($arrData);\n //print_r($arrTime);\n //print_r($arrRangeTimes);\n }elseif($varAction=='searchReports'){\n $argWhere='';\n if($data['fromDate'] !=''){\n $argWhere .='ItemDateAdded >= \"'.date('Y-m-d',strtotime($data['fromDate'])).' 00:00:00\"';\n }\n if($data['toDate'] !=''){\n if($argWhere != ''){\n $argWhere .=' AND ItemDateAdded <= \"'.date('Y-m-d',strtotime($data['toDate'])).' 23:00:00\"';\n }else{\n $argWhere .='ItemDateAdded <= \"'.date('Y-m-d',strtotime($data['toDate'])).' 23:00:00\"';\n }\n \n }\n \n $arrClms = array('count(ItemDateAdded) as counts');\n $argWhere .= 'AND Status <> \"Canceled\"';\n \n $arrData = $this->select($varTable, $arrClms, $argWhere);\n $count=$arrData[0]['counts'];\n $arrRes['result']=$count;\n }elseif($varAction=='top_order'){\n \n $varQuery = \"SELECT count(fkItemID) as count,fkItemID,ItemName FROM \" . $varTable . \" WHERE Status <> 'Canceled' AND ItemType ='product' GROUP BY fkItemID ORDER BY count DESC LIMIT 10\";\n $arrData = $this->getArrayResult($varQuery);\n //pre($arrData);\n $arrRes['result']=$arrData;\n $arrRes['count']=count($arrData);\n }\n \n //die;\n echo json_encode($arrRes);\n die;\n }", "public function index()\n {\n $user = Auth::user();\n\n if($user->role > 3)\n return redirect('/');\n else if($user->agency_id==0){\n $unassigned_tickets = Ticket::where('assignee', NULL)->where('status', 1)->orderBy('created_at', 'DESC')->paginate(20);\n \n if($user->role == 0){\n $inprocess_tickets = Ticket::where('status', 2)->paginate(10);\n $pending_tickets = Ticket::where('status', 3)->orWhere('status', 7)->paginate(10); \n $closed_tickets = Ticket::where('status', 5)->paginate(10);\n }\n else if($user->role == 1){\n $subs = User::where('role', 2)->where('agency_id', $user->agency_id)->lists('id');\n $inprocess_tickets = Ticket::where('status', 2)->whereIn('assignee', $subs)->paginate(10);\n $pending_tickets = Ticket::where('status', 3)->orWhere('status', 7)->whereIn('assignee', $subs)->paginate(10);\n $closed_tickets = Ticket::where('status', 5)->whereIn('assignee', $subs)->paginate(10);\n }\n else if($user->role == 2){\n $inprocess_tickets = Ticket::where('status', 2)->where('assignee', $user->id)->paginate(10);\n $pending_tickets = Ticket::where('status', 3)->orWhere('status', 7)->where('assignee', $user->id)->paginate(10);\n $closed_tickets = Ticket::where('status', 5)->where('assignee', $user->id)->paginate(10);\n }\n\n foreach ($unassigned_tickets as $key => $uticket) {\n $deptname = Department::find($uticket->dept_id)->pluck('dept_name');\n $uticket->dept_name = $deptname;\n }\n\n foreach ($inprocess_tickets as $key => $iticket) {\n $deptname = Department::find($iticket->dept_id)->pluck('dept_name');\n $iticket->dept_name = $deptname;\n }\n\n foreach ($pending_tickets as $key => $pticket) {\n $deptname = Department::find($pticket->dept_id)->pluck('dept_name');\n $pticket->dept_name = $deptname;\n }\n\n return view('tickets.all-tickets')->with('unassigned_tickets', $unassigned_tickets)\n ->with('inprocess_tickets', $inprocess_tickets)\n ->with('pending_tickets', $pending_tickets)\n ->with('closed_tickets', $closed_tickets)\n ->with('user', $user);\n }\n }", "public function getCashBacks()\n {\n try {\n return $this\n ->cash\n ->where('account_id', auth()->user()->account_id)\n ->orderBy('created_at', 'desc')// get last requests first\n ->orderBy('is_approved', 'asc')// then order them by approved asc 0 -> 1 as not paid first\n ->get();\n } catch (\\Exception $e) {\n self::logErr($e->getMessage());\n return new Collection();\n }\n }", "public function fechasreportarpagopeople($db, $TicketId){\n\n $fechaanio = date('Y');\n $fechames= date('m');\n $fechaultimodia = new DateTime();\n $fechaultimodia->modify('last day of this month');\n $fechaultimodiames= $fechaultimodia->format('d');\n $fechaaniomes= $fechaanio.'-'.$fechames;\n $mesAnterior = date( \"m\", strtotime( $fechaaniomes.\" -1 month\" ) );\n $ultimoDiaMesAnterior= date(\"d\",(mktime(0,0,0,$mesAnterior+1,1,$fechaanio)-1));\n\n $sqlfechapago = \"SELECT SoliciteDate FROM LogPagos WHERE TicketId = '\".$TicketId.\"'\";\n $fechapago = $db->GetRow($sqlfechapago);\n\n $fechainicial = $fechaanio.'-'.$mesAnterior.'-'.$ultimoDiaMesAnterior.' 17:01:00';\n $fechafinal = $fechaanio.'-'.$fechames.'-'.$fechaultimodiames.' 17:00:00';\n\n if($fechapago['SoliciteDate'] >= $fechainicial && $fechapago['SoliciteDate'] <= $fechafinal)\n\n {\n return true;\n\n }else{\n\n return false; \n\n }\n }", "public function findAllExpired()\n {\n $queryBuilder = $this->createQueryBuilder('r');\n $date = date('Y-m-d', strtotime(\"-30 days\"));\n\n $queryBuilder\n ->where('r.validated = :state')\n ->setParameter('state', 0)\n ->andWhere('r.addedOn <= :date')\n ->setParameter('date', new \\DateTime($date));\n\n return $queryBuilder\n ->getQuery()\n ->getResult()\n ;\n }", "public function getActive()\n {\n $em = $this->getEntityManager();\n\n $entities = $this->findBy(\n array('end' => null),\n array('id'=>'DESC')\n );\n\n return $entities;\n }", "public function closed_tickets()\n {\n return $this->hasMany('App\\Models\\Tickets', 'mailbox_id', 'id')->where('status', 'closed');\n }", "public function geefGeslotenTickets() {\n $klant_id = $_SESSION['gebruiker']->geefKlant_id();\n $sql = 'SELECT * FROM `tickets` WHERE `status` = \"gesloten\" AND `klant_id` = :klant_id';\n $stmnt = $this->db->prepare($sql);\n $stmnt->bindParam(':klant_id', $klant_id);\n $stmnt->execute();\n $tickets = $stmnt->fetchAll(\\PDO::FETCH_CLASS, __NAMESPACE__ . '\\Ticket');\n return $tickets;\n }", "public function show(Ticket $ticket)\n {\n $user = Auth::user()->id;\n $ticket_go = daily_ticket::where([['user',$user],['date_add',Carbon::now()->format('Y/m/d')],['statue',1]])->get();\n $ticket_back = daily_ticket::where([['user',$user],['date_add',Carbon::now()->format('Y/m/d')],['statue',2]])->get();\n return view('ticket.ticket_list',compact(['ticket_go','ticket_back']));\n }", "public function getAccountActivities($account_id,$startdate,$enddate)\n{\n //let us get the transactions(postings) of a given account id in periods of given dates\n\n return $this->db->where('created_at >=',$startdate)\n ->where('created_at <=',$enddate)\n ->where('account_id',$account_id)\n ->order_by('created_at','ASC')\n ->get($this->postingsTable)\n ->result();\n\n}", "private function getTodayAdvertisements() {\n \treturn AdvertisementQuery::create()\n\t\t\t\t->filterByCurrent()\n\t\t\t\t->filterByBillboard($this)\n\t\t\t\t->find();\n }", "public function EnumerateActive()\n\t{\n\t\t//\t\t\t\tWHERE course.active = 'si' AND courseId IN (0)\n\n\t\t$this->Util()->DB()->setQuery(\"\n\t\t\t\tSELECT *, major.name AS majorName, subject.name AS name, subject.rvoe FROM course\n\t\t\t\tLEFT JOIN subject ON course.subjectId = subject.subjectId \n\t\t\t\tLEFT JOIN major ON major.majorId = subject.tipo\n\t\t\t\tWHERE course.active = 'si' AND listar = 'si'\n\t\t\t\tORDER BY subject.tipo, subject.name, course.group\");\n\t\t//echo $this->Util()->DB()->query;\n\t\t$result = $this->Util()->DB()->GetResult();\n\n\t\tforeach ($result as $key => $res) {\n\t\t\t$result[$key][\"initialDateStamp\"] = strtotime($result[$key][\"initialDate\"]);\n\t\t\t$result[$key][\"finalDateStamp\"] = strtotime($result[$key][\"finalDate\"]);\n\n\t\t\t$toFinishSeconds = $result[$key][\"daysToFinish\"] * 3600 * 24;\n\n\t\t\t$result[$key][\"daysToFinishStamp\"] = strtotime($result[$key][\"initialDate\"]) + $toFinishSeconds;\n\t\t}\n\t\treturn $result;\n\t}", "public function getTicketPrinted()\n {\n return $this->join('customers','sales.customer_id','=','customers.id')\n ->select('sales.*','customers.name as customer')\n ->where('status','=', 3)\n // ->orderBy('updated_at','desc')\n ->get();\n }", "public function index()\n {\n // could be problematic with a hell of a lot sprints...\n $allSprintes = \\Auth::user()->sprints;\n $active = $allSprintes->filter(fn ($s) => $s->is_active)->first();\n $prev = $allSprintes->filter(fn ($s) => $s->id === $active->previous_sprint_id)->first();\n $next = $allSprintes->filter(fn ($s) => $s->previous_sprint_id === $active->id)->first();\n\n return [\n [\n 'id' => $prev->id,\n 'last' => true,\n 'current' => false,\n 'next' => false,\n ],[\n 'id' => $active->id,\n 'last' => false,\n 'current' => true,\n 'next' => false,\n ],[\n 'id' => $next->id,\n 'last' => false,\n 'current' => false,\n 'next' => true,\n ]\n ];\n }", "public function getTicketToDispatch(Request $request)\n {\n\n $userID = Auth::id(); \n $nberRows = 10;\n //retrieve all of the query string values as an associative array\n $query= $request -> query();\n // Store in session Via a request instance...\n $request->session()->put($query);\n \n if($request->session()->has('status')) {\n \n $status = $request->session()->pull('status');\n //$nberRows = $request->session()->get('nberRow'); \n //Get Ticket with status sended by query\n $tickets = $this->ticketRepository->getTicketByStatus($status,$nberRows); \n }\n if($request->session()->has('category')) {\n \n $category = $request->session()->pull('category');\n // $nberRows = $request->session()->get('nberRow'); \n //Get Ticket with status sended by query\n $tickets = $this->ticketRepository->getTicketByCategory($category,$nberRows); \n }\n\n if ($request->has('nberRows')) {\n \n $query = $request->session()->get('category','status');\n if($query =='status'){\n //Get Ticket with status sended by query\n $tickets = $this->ticketRepository->getTicketByStatus($status,$nberRows);\n }\n if($query == 'category' ){\n //Get Ticket with status sended by query\n $tickets = $this->ticketRepository->getTicketByCategory($category,$nberRows);\n }\n\n }\n \n //Get All User who have role Agent\n $agents = $this->roleRepository->getUserByRole('Agent');\n \n //Get value of status column from Ticket table\n $statusColumnValues = $this->ticketRepository->getAllValueOfStatusColumn();\n\n //Get all value of category column from Ticket table\n $categoryColumnValues = $this->ticketRepository->getAllValueOfCategoryColumn();\n // \n return view('tickets.ticket_update_agent',['tickets'=>$tickets,\n 'agents'=>$agents,\n 'categoryColumnValues'=> $categoryColumnValues,\n 'statusColumnValues'=> $statusColumnValues \n ]);\n\n }", "function getTickets($param) {\r\t$resultString = '';\r\t$param['websiteConfigID'] = WEB_CONF_ID;\r\t$param['numberOfRecords'] = TICKET_PAGINATION;\r\t$parametersExist = false;\r\t$paramkeys = array_keys($param);\r\tfor($a = 2; $a < count($param); $a++) {\r\t\tif($param[$paramkeys[$a]]) {\r\t\t\t$parametersExist = true;\r\t\t\tbreak;\r\t\t}\r\t}\r\n\t\r\n\t//die(var_dump($param));\r\n\t\r\tif($parametersExist) {\r\t\t$client = new SoapClient(WSDL);\r\t\t$result = $client -> __soapCall('GetTickets', array('parameters' => $param));\r\n\t\t//var_dump($result);\r\n\t\t\r\t\tif(is_soap_fault($result)) {\r\t\t\techo '<h2>Fault</h2><pre>';\r\t\t\tprint_r($result);\r\t\t\techo '</pre>';\r\t\t}\r\n\t\t$paramTickets=\"\";\r\t\tunset($client);\r\t\tif(empty($result->GetTicketsResult->TicketGroup)){\r\t\t\treturn \"No tickets exist for that event\";\r\t\t}else {\r\n\t\t\tfor($q=0;$q<count($result->GetTicketsResult->TicketGroup);$q++){//\r\n\t\t\t\t$resultsObj=$result->GetTicketsResult->TicketGroup[$q];\r\n\t\t\t\t$eTickCount;\r\n\t\t\t\tforeach ($resultsObj as $k => $v) {\r\n\t\t\t\t\tglobal $eTickCount;\r\n\t\t\t\t\t$paramTickets[$eTickCount]=array($k=>$v);\r\n\t\t\t\t\t$eTickCount++;\r\n\t\t\t\t}\r\n\t\t\t}\r\t\t}return $paramTickets;\r\t}\r}", "public function getassignedtickets($id){\n\t\t$this->db->order_by(\"created_at\", \"DESC\");\n\t\t$this->db->select('*');\n\t\t$this->db->join('tickets', 'tickets.id = ticketsassigned.ticketid ');\n\t\t$this->db->where('tickets.status !=', 'Closed');\n $query = $this->db->get_where('ticketsassigned', array('userid' => $id));\n return $query->result_array(); \t\t\t\n\t}", "public static function getoverdue() {\r\n $today = new DateTime(); \r\n $dueDate = date_modify($today, '-11 months');\r\n $date = $dueDate->format('Y-m-d');\r\n \r\n $db = static::getDB();\r\n $stmt = $db->query(\r\n \"SELECT * FROM lifts \"\r\n . \"WHERE last_insp_date < '$date' \"\r\n . \"AND active = '1' \"\r\n . \"ORDER BY last_insp_date ASC\");\r\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n return $results;\r\n }", "public static function fetchDueList()\n {\n $aDueList = eZPersistentObject::fetchObjectList( eZStaticExportScheduler::definition(),\n \t null,\n \t array( 'date' => array( '<=', time() ) ),\n \t array( 'date' => 'desc' ) );\n\n\t\t\n\t\treturn $aDueList;\n }", "public function getOpenAssignedToMe () {\r\n\t\t$db = new DB();\r\n\t\t$db->connect();\r\n\t\t\r\n\t\t$openstatusTest = \"\";\r\n\t\t$openStatus = \"SELECT * FROM `status` WHERE isDone = 0 AND active != 0\";\r\n\t\t$openQuery = $db->query($openStatus);\r\n\t\twhile ($oneStatus = $openQuery->fetch_assoc()) {\r\n\t\t\tif ($openstatusTest == \"\") {\r\n\t\t\t\t$openstatusTest = $oneStatus[\"id\"];\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$openstatusTest = $openstatusTest . \", \" . $oneStatus[\"id\"];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$sql = \"SELECT task.id, task.summary, project.key, `status`.color, `status`.name AS status FROM task \r\n\t\t\t\t\tINNER JOIN project ON project.id = task.project_id\r\n\t\t\t\t\tINNER JOIN `status` ON `status`.id = task.status_id\t\t\r\n\t\t\t\tWHERE status_id IN ($openstatusTest) AND task.active !=0 AND assignee_id = \" . $_SESSION['nobug'.RANDOMKEY.'userId'] . \"\r\n\t\t\t\tORDER BY project.name, task.id DESC \r\n\t\t\t\tLIMIT 10\";\r\n\t\treturn $db->query($sql);\r\n\t}", "public function activatePending()\n {\n $mydate = date('Y-m-d H:i:s',strtotime(\"-36 hours\"));\n $sql = \"SELECT `bids`.* \n FROM `bids`\n JOIN `campaigns`\n ON `bids`.`campaign_id` = `campaigns`.`id`\n WHERE `campaigns`.`status` = ? \n AND `bids`.`status` = ?\n AND `bids`.`created_at` < ?;\";\n $result = DB::select($sql, array(1, 5, $mydate));\n if(sizeof($result)){\n Log::info(sizeof($result).' Pending Bids to Activate');\n foreach($result as $row){\n $sql = 'UPDATE `bids` SET `status` = ? WHERE `id` = ?';\n DB::update($sql, array(1, $row->id));\n //$info = 'Campaign '.$row->campaign_id.' Activated on Zone '.$row->zone_handle;\n //Log::info($info); \n }\n }else{\n Log::info('No Pending Bids to Activate.');\n }\n }", "protected function maintainActiveTeams()\n\t\t{\n\t\t\t// set teams other than deleted to active if matched during that timeframe\n\t\t\t\n\t\t\t$forty_five_days_in_past = strtotime('-45 days');\n\t\t\t$forty_five_days_in_past = strftime('%Y-%m-%d %H:%M:%S', $forty_five_days_in_past);\n\t\t\t\n\t\t\t// apply new status to any new, active, reactivated or inactive team\n\t\t\t$teamIds = team::getNewTeamIds();\n\t\t\t$teamIds = array_merge($teamIds, team::getActiveTeamIds());\n\t\t\t$teamIds = array_merge($teamIds, team::getReactivatedTeamIds());\n\t\t\t$teamIds = array_merge($teamIds, team::getInactiveTeamIds());\n\t\t\tforeach ($teamIds AS $teamid)\n\t\t\t{\n\t\t\t\t$team = new team($teamid);\n\t\t\t\t$lastMatch = $team->getNewestMatchTimestamp();\n\t\t\t\t// non deleted team did not match last 45 days -> inactive\n\t\t\t\tif ($team->getStatus() !== 'inactive' && $lastMatch && $lastMatch < $forty_five_days_in_past)\n\t\t\t\t{\n\t\t\t\t\t$team->setStatus('inactive');\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\t// non deleted team did match last 45 days -> active\n\t\t\t\t\tif ($team->getStatus() !== 'active' && $lastMatch && $lastMatch > $forty_five_days_in_past)\n\t\t\t\t\t{\n\t\t\t\t\t\t$team->setStatus('active');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$team->update();\n\t\t\t}\n\t\t}", "public function getRecurringOrders();", "public function getActivePolls()\n {\n $pollz = $this->em\n ->createQuery('SELECT p\n FROM NkgPollBundle:Poll p\n WHERE p.active = 1\n AND CURRENT_TIMESTAMP() BETWEEN p.startdate AND p.enddate\n ORDER BY p.enddate DESC');\n\n try {\n $res = $pollz->getResult();\n return $res;\n } catch (\\Doctrine\\ORM\\NoResultException $e) {\n return array();\n }\n }", "public function calculateStageDate(){\n $rallyService = parent::getService('rally','rally');\n $teamService = parent::getService('team','team');\n $leagueService = parent::getService('league','league');\n \n $allRallies = $rallyService->getAllRallies();\n foreach($allRallies as $rally):\n $date = new DateTime($rally['date']);\n foreach($rally['Stages'] as $key => $stage):\n if($key!=0){\n $date->add(new DateInterval('PT15M'));\n }\n $stage->set('date',$date->format('Y-m-d H:i:s'));\n if($date->format('Y-m-d H:i:s')<date('Y-m-d H:i:s')){\n $stage->set('finished',1);\n }\n $stage->save();\n// var_dump($stage->toArray());exit;\n endforeach;\n endforeach;\n echo \"pp\";exit;\n }", "public function get_ticket_listing_by_added($site_id,$filters = false){\n //if(!in_array($status_filter,$accepted_filters)) { $status_filter = \"all\"; }\n \n $DB_data = $this->load->database('default',TRUE);\n// if($status_filters){\n// $DB_data->where_in('state',$status_filters);\n// }\n if($filters){\n $DB_data->like('author_name',$filters)->or_like('name',$filters)->or_like('description',$filters);\n // $DB_data->or_like('probe_name',$filters)->or_like('magnet_name',$filters)->or_like('comment',$filters);\n }\n $DB_data->where('site_id', $site_id);\n $query = $DB_data->order_by('id','desc')->get(\"v_ticket_details\");\n if($query && $query->num_rows()>0){\n $results = array();\n foreach($query->result_array() as $row){\n $row['equipment'] = $this->get_equipment_listing_for_ticket($row['id']); \n $results[\"most_recently\"][$row['id']] = $row;\n }\n }\n return $results; \n }", "public function futureRevisit()\n {\n return \\DB::selectOne(\"SELECT COUNT(id) as total FROM appr_dashboard_delay_order WHERE created_date BETWEEN :from AND :to AND delay_date > :today\", [':from' => strtotime('today'), ':to' => strtotime('tomorrow'), ':today' => strtotime('tomorrow')])->total;\n }", "function get_invested_accounts($tid)\n\t{\n\t return $this->db->select()\n\t\t ->from('pamm_accounts') \n\t\t ->where(\"login IN (select pamm_invested_accounts_login FROM pamm_invested_accounts WHERE pamm_invested_accounts_tid=$tid)\")\n\t\t ->where(\"pamm_accounts.active !='4'\")\t\n\t\t ->get()->result();\n\t}", "public function inProcessTickets()\n {\n $user = Auth::user();\n $all_members = User::where('role', 2)->where('agency_id', $user->agency_id)->lists('id');\n $all_members[count($all_members)] = $user->id;\n\n if($user->role > 3)\n return redirect('/');\n else if($user->role==1){\n $in_process_tickets = Ticket::where('status', 2)->whereIn('assignee', $all_members)->orderBy('created_at', 'DESC')->paginate(20);\n }\n else if($user->role==2){\n $in_process_tickets = Ticket::where('status', 2)->where('assignee', $user->id)->orderBy('created_at', 'DESC')->paginate(20);\n }\n else{\n $in_process_tickets = Ticket::where('status', 2)->orderBy('created_at', 'DESC')->paginate(20);\n }\n\n return view('tickets.in-process')->with('user', $user)->with('in_process_tickets', $in_process_tickets);\n }", "function listTicket() {\n\t\t$query = \"SELECT t.t_id, t.name, t.price, t.quantity_available \n\t\tFROM yam14.F_ticket t, yam14.F_event e\n\t\tWHERE e.e_id = t.e_id\n\t\tAND t.e_id = \" . $this->eid . \";\";\n\t\t\n\t\t$result = mysql_query($query);\n\t\tif (!$result) {\n\t\t\t$message='Invalid Query' .mysql_errno().\" \\n\";\n\t\t $message .= 'Whole Query' . $query;\n\t\t die($message);\n\t\t}//end if\n\t\t\n\t\twhile($row = mysql_fetch_assoc($result)){\n\t\t\t$this->ticketid = $row['t_id'];\n\t\t\t$this->ticketname = $row['name'];\n\t\t\t$this->ticketprice = $row['price'];\n\t\t\t$this->ticketavailable = $row['quantity_available'];\n\t\t\t\n\t\t\techo \"<table class=\\\"table\\\">\";\n\t\t\techo \t\"<form method=\\\"post\\\" action=\\\"event.php?eid=$this->eid\\\">\";\n\t\t\techo \t\"<tr><th colspan=\\\"4\\\">Ticket Information</th></tr>\";\n\t\t\techo \t\"<tr><td>TYPE</td><td>REMAINING</td><td>PRICE</td><td>QUANTITY</td></tr>\";\n\t\t\techo \t\"<tr>\";\n\t\t\techo \"<td>$this->ticketname</td>\";\n\t\t\techo \"<td>\";\n\t\t\tif ($this->ticketavailable==0) {\n\t\t\t\techo \"<p class='error'>Sold Out</p>\";\n\t\t\t}else {\n\t\t\t\techo $this->ticketavailable;\n\t\t\t}\n\t\t\techo \t\"</td>\";\n\t\t\techo \t\"<td>\";\n\t\t\tif ($this->ticketprice==0) {\n\t\t\t\techo \"FREE\";\n\t\t\t}else {\n\t\t\t\techo \"$\" . $this->ticketprice;\n\t\t\t}\n\t\t\techo \"</td>\";\n\t\t\techo \t\"<td><input type=\\\"number\\\" name=\\\"quantity\\\" value=\\\"\\\" step='1' placeholder=\\\"1\\\" min=\\\"1\\\" max=\\\"$this->ticketavailable\\\" \";\n\t\t\tif ($this->ticketavailable==0) {\n\t\t\t\techo \"disabled\";\n\t\t\t}\n\t\t\techo \"/></td>\";\n\t\t\techo \t\"</tr>\";\n\t\t\techo \t\"<tr><td>\";\n\t\t\techo \t\"</td><td></td><td></td><td><input type=\\\"submit\\\" name=\\\"register\\\" value=\\\"Register\\\" class=\\\"btn btn-lg btn-success\\\" \";\n\t\t\tif ($this->ticketavailable==0) {\n\t\t\t\techo \"disabled\";\n\t\t\t}\n\t\t\techo \" /></td></tr>\";\n\t\t\techo \t\"</form>\";\n\t\t\techo \t\"</table>\";\n\t\t}\t\n\t\t\n\t\tmysql_free_result($result);\n\t\t\n\t\t\t\n\t\t\t\n\t}", "function testDaysPerJobIndicator($session_user) {\n\n/*\n $proj = ProjectCache::getInstance()->getProject(14);\n $issueSel = $proj->getIssueSelection();\n*/\n $proj = ProjectCache::getInstance()->getProject(14);\n $issueSel = new IssueSelection(\"Project $proj->name user \".$session_user->getName());\n $issueList = $proj->getIssues($session_user->id);\n $issueSel->addIssueList($issueList);\n\n\n $daysPerJobIndicator = new DaysPerJobIndicator();\n\n echo 'Testing '.$daysPerJobIndicator->getName().'<br>';\n\n $daysPerJob = $daysPerJobIndicator->execute($issueSel);\n\n $jobs = new Jobs();\n $totalElapsed = 0;\n echo \"<table>\";\n echo \"<caption>\".$issueSel->name.\"</caption>\";\n echo \"<tr><th>name</th><th>nbDays</th><th>color</th><tr>\";\n foreach ($daysPerJob as $id => $duration) {\n echo \"<tr>\";\n echo '<td>'.$jobs->getJobName($id).'</td>';\n echo '<td>'.$duration.'</td>';\n echo '<td>'.$jobs->getJobColor($id).'</td>';\n echo \"</tr>\";\n $totalElapsed += $duration;\n }\n echo \"</table>\";\n echo \"totalElapsed = $totalElapsed<br>\";\n\n}", "function getPastEvents()\n {\n //1. Define the query\n $sql = \"SELECT * FROM events WHERE endtime < CURRENT_DATE AND archive != 1 ORDER BY starttime DESC\";\n\n //2. Prepare the statement\n $statement = $this->_dbh->prepare($sql);\n\n //4. Execute the query\n $statement->execute();\n\n //5. Process the results (get OrderID)\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }", "private function getEditableTickets()\n {\n $tickets = ArrayList::create();\n foreach ($this->getTickets() as $ticket) {\n /** @var Ticket $ticket */\n $fieldName = $this->name . \"[{$ticket->ID}][Amount]\";\n $range = range($ticket->OrderMin, $ticket->OrderMax);\n\n $ticket->AmountField = DropdownField::create($fieldName, 'Amount', array_combine($range, $range))\n ->setHasEmptyDefault(true)\n ->setEmptyString(_t('TicketsField.EMPTY', 'Tickets'));\n\n // Set the first to hold the minimum\n if ($this->getTickets()->count() === 1) {\n $ticket->AmountField->setValue($ticket->OrderMin);\n }\n\n // $availability = $ticket->TicketPage()->getAvailability();\n $availability = $ticket->getAvailability();\n if ($availability < $ticket->OrderMax) {\n $disabled = range($availability + 1, $ticket->OrderMax);\n $ticket->AmountField->setDisabledItems(array_combine($disabled, $disabled));\n }\n\n if (!$ticket->getAvailable()) {\n $ticket->AmountField->setDisabled(true);\n }\n\n $this->extend('updateTicket', $ticket);\n $tickets->push($ticket);\n }\n return $tickets;\n }", "private function isOpenNow($request)\n {\n $services = app('ServicesRepository');\n $openinghoursRepo = app('OpeninghoursRepository');\n\n // Get the service URI for which we need to compute the week schedule\n $serviceUri = $request->input('serviceUri');\n $channel = $request->input('channel');\n\n // Get the service\n $service = $services->where('uri', $serviceUri)->first();\n\n if (empty($service)) {\n abort(404, 'The service was not found.');\n }\n\n $channels = [];\n\n // If no channel is passed, return all channels\n if (! empty($channel)) {\n $channels[] = $channel;\n } else {\n $channelObjects = $service->channels->toArray();\n\n foreach ($channelObjects as $object) {\n $channels[] = $object['label'];\n }\n }\n\n if (empty($channels)) {\n abort(404, 'Deze dienst heeft geen enkel kanaal met openingsuren.');\n }\n\n $result = [];\n\n $now = Carbon::now();\n\n foreach ($channels as $channel) {\n $status = 'Gesloten';\n\n // Get the openinghours for the channel\n $openinghours = $openinghoursRepo->getAllForServiceAndChannel($serviceUri, $channel);\n\n // Get the openinghours that is active now\n $relevantOpeninghours = '';\n\n foreach ($openinghours as $openinghoursInstance) {\n if ($now->between(\n (new Carbon($openinghoursInstance->start_date)),\n (new Carbon($openinghoursInstance->end_date))\n )) {\n $relevantOpeninghours = $openinghoursInstance;\n break;\n }\n }\n\n // Add the min/max timestamp for performance increase, allow for margin\n $maxTimestamp = Carbon::today()->addDays(2);\n $minTimestamp = Carbon::today()->subDays(2)->startOfDay();\n\n if (! empty($relevantOpeninghours)) {\n // Check if any calendar has an event that falls within the timeframe\n $calendars = array_sort($relevantOpeninghours->calendars, function ($calendar) {\n return $calendar->priority;\n });\n\n // Iterate all calendars for the day of the week\n foreach ($calendars as $calendar) {\n $ical = $this->createIcalFromCalendar($calendar, $minTimestamp, $maxTimestamp);\n\n if ($this->hasEventForRange($ical, $now->toIso8601String(), $now->toIso8601String())) {\n $status = $calendar->closinghours == 0 ? 'Open' : 'Gesloten';\n\n continue;\n }\n }\n }\n\n $result[$channel] = $status;\n }\n\n return $result;\n }", "function getCurrentEvents()\n {\n //1. Define the query\n $sql = \"SELECT * FROM events WHERE starttime < CURRENT_DATE && event_complete != 1 ORDER BY starttime\";\n\n //2. Prepare the statement\n $statement = $this->_dbh->prepare($sql);\n\n //4. Execute the query\n $statement->execute();\n\n //5. Process the results (get OrderID)\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }", "public static function checkForExpiredVotes()\n {\n self::whereDate('created_at', '<', Carbon::now()->subDay())->delete();\n }", "private function __dailyHealthIndicator() {\n\t\t\t\t\n\t\t$userTimezone = $this->Auth->user('timezone');\n\t\t\n\t\tif ($this->_requestedUser['id'] != $this->Auth->user('id')) {\n $userId = $this->_requestedUser['id']; \n\t\t} else {\n\t\t\t$userId = $this->Auth->user('id');\t\t\t\n\t\t}\n\t\t //set date as today\n\n $todayInUserTimeZone = CakeTime::convert(time(), new DateTimeZone($userTimezone));\n $date_today = CakeTime::format($todayInUserTimeZone, '%m/%d/%Y');\n\t\t\n $dailyHealthIndicator = array();\n // it contains symptoms with latest_record_value null\n $userSymptoms = $this->UserSymptom->getSymptomIdsWithLatestValue($userId);\n\n /*\n * Fetch symptom details \n */\n foreach ($userSymptoms as $userSymptom) {\n $symptomId = $userSymptom ['UserSymptom'] ['symptom_id']; // symptom id\n $symptomName = $this->Symptom->getSymptomNameFromId($symptomId); // symptom name\n $symptomRecordValueJSON = $userSymptom ['UserSymptom'] ['latest_record_value']; // recorded value\n $symptomSeverityValue = 0;\n $lastUpdatedDate = NULL;\n if (!empty($symptomRecordValueJSON)) {\n $symptomLatestRecordValue = json_decode($symptomRecordValueJSON, TRUE); // Decode the json value\n $userTodayDate = date('Y-m-d', $todayInUserTimeZone);\n $lastUpdatedDateInTime = key($symptomLatestRecordValue);\n\n if (!is_null($lastUpdatedDateInTime)) {\n $symptomSeverityValue = $symptomLatestRecordValue [$lastUpdatedDateInTime];\n $lastUpdatedDate = date('m/d/Y', $lastUpdatedDateInTime);\n }\n// debug($lastUpdatedDate);\n // check todays severity added\n// if ( array_key_exists ( strtotime ( $userTodayDate ) , $symptomLatestRecordValue )) {\n// $symptomSeverityValue = $symptomLatestRecordValue[ strtotime ( $userTodayDate ) ];\n// }\n// foreach ($symptomRecordValue as $key => $value) {\n// //$record_date = date('Y-m-d', $key);\n// //debug($symptomName.\" \".date('Y-m-d H:i:s', $key) . \" \". strtotime($userTodayDate));\n// //check if there is record for user's today\n// if ($record_date == $userTodayDate) { //debug($key. \" \".strtotime($userTodayDate)); // debug($record_date. \" \".$userTodayDate); \n// //fetch todays reading\n// $symptomSeverityValue = $symptomRecordValue [$key];\n// }\n//// else {\n////\t\t\t\t\t$symptomSeverityValue = 0;\n////\t\t\t\t}\n// }\n }\n\n switch ($symptomSeverityValue) {\n case 1: $symptomSeverity = 'None';\n break;\n case 2: $symptomSeverity = 'Mild';\n break;\n case 3: $symptomSeverity = 'Moderate';\n break;\n case 4: $symptomSeverity = 'Severe';\n break;\n default:$symptomSeverity = 'No Data';\n }\n /*\n * save details to an array\n */\n $dailyHealthIndicator[] = array('id' => $symptomId, 'name' => $symptomName,\n 'severity' => $symptomSeverity, 'lastUpdated' => $lastUpdatedDate);\n }\n\t\t\n\t\treturn $dailyHealthIndicator; \n\n\t}", "public function get_expired_posts() {\n $today = date(\"Y-m-d\");\n\n $args = array(\n 'post_type' => $this->_post_types_to_cover,\n 'meta_key' => 'bbx_best_before_expiry_date',\n 'orderby' => 'meta_value',\n 'order' => 'ASC',\n 'post_status' => 'publish',\n 'meta_query' => array(\n array(\n 'key' => 'bbx_best_before_expiry_date',\n 'value' => $today,\n 'compare' => '<=',\n 'type' => 'DATE'\n )\n )\n );\n\n $expired_posts = get_posts( $args );\n\n return $expired_posts;\n }", "static function listNextExhibit(){\n\t\t$res = requete_sql(\"SELECT id FROM exhibit WHERE begin_date > now() AND visible = TRUE ORDER BY begin_date ASC\");\n\t\t$res = $res->fetchAll(PDO::FETCH_ASSOC);\n\t\t$list = array();\n\t\tforeach ($res as $exhibit) {\n\t\t\t$exhibit = new Exhibit($exhibit['id']);\n\t\t\tarray_push($list, $exhibit);\n\t\t}\n\t\treturn $list;\n\t}", "function late_today() {\n $page = (integer) $this->request->get('page');\n if($page < 1) {\n $page = 1;\n } // if\n\n list($objects, $pagination) = ProjectObjects::findLateAndToday($this->logged_user, null, get_completable_project_object_types(), $page, 30);\n\n $this->smarty->assign(array(\n 'objects' => $objects,\n 'pagination' => $pagination,\n ));\n\n if($this->request->isAsyncCall()) {\n $this->smarty->display(get_template_path('late_today', 'dashboard', SYSTEM_MODULE));\n die();\n } // if\n }", "public function getServiceTurnaroundTimes()\n {\n if ( null === $this->_turnaroundTimes )\n {\n $model = new Application_Model_ServiceTurnaround();\n $this->_turnaroundTimes = $model->fetchAll( \"service_id = '\" . $this->id . \"'\" );\n }\n return $this->_turnaroundTimes;\n }", "function _erpal_projects_helper_task_has_timetracking_entity_active($nid, &$tracked_time) {\n global $user;\n\n if (!is_numeric($nid)) { //timetrackings without subject but md5 subject\n $timetracking_ids = _timetrackings_by_user($user->uid, false);\n //check if there is one timetracking without subject\n $timetracking_ids_no_subject = array();\n foreach ($timetracking_ids as $timetracking_id) {\n $timetracking = timetracking_load($timetracking_id);\n $equal_description = $nid == md5($timetracking->description);\n if (!$timetracking->subject_id && $equal_description) { //it has no subject node but it must match the md5 description, otherwise the timetrcking was for another subject text.\n \n $timetracking_ids_no_subject[] = $timetracking_id;\n }\n }\n\n $timetracking_ids = $timetracking_ids_no_subject;\n } else\n $timetracking_ids = _timetrackings_by_user($user->uid, $nid);\n\n //load all entities and calculate the total time.\n $timetrackings = timetracking_load_multiple($timetracking_ids);\n\n $total = 0;\n $has_running = false;\n foreach ($timetrackings as $timetracking) {\n if ($timetracking->time_end) {\n $duration = $timetracking->duration;\n } else {\n $duration = (time() - $timetracking->time_start) / (60*60);\n $has_running = true;\n }\n\n $total += $duration;\n }\n\n $tracked_time = round($total, 2);\n\n return $has_running;\n}", "public function getAllInActive()\n {\n return\n DB::table('grades')\n ->select(\n 'id',\n 'eff_begin as effBegin',\n 'eff_end as effEnd',\n 'code',\n 'name',\n 'ordinal',\n 'bottom_rate as bottomRate',\n 'mid_rate as midRate',\n 'top_rate as topRate'\n )\n ->where([\n ['tenant_id', $this->requester->getTenantId()],\n ['company_id', $this->requester->getCompanyId()],\n ['eff_end', '<', Carbon::now()]\n ])\n ->get();\n }", "function getUpcomingEvents()\n {\n //1. Define the query\n $sql = \"SELECT * FROM events WHERE starttime > CURRENT_DATE && archive != 1 ORDER BY starttime\";\n\n //2. Prepare the statement\n $statement = $this->_dbh->prepare($sql);\n\n //4. Execute the query\n $statement->execute();\n\n //5. Process the results (get OrderID)\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }", "private function queryDepositsAndWithdrawals() {\r\n return $this->queryAPI( 'returnDepositsWithdrawals', //\r\n [\r\n 'start' => time() - 14 * 24 * 3600,\r\n 'end' => time() + 3600\r\n ]\r\n );\r\n\r\n }", "function recent_activities() {\n $this->skip_layout = $this->request->isAsyncCall();\n\n $this->smarty->assign(array(\n 'grouped_activities' => group_by_date(ActivityLogs::findActiveProjectsActivitiesByUser($this->logged_user, 20), $this->logged_user),\n ));\n }", "public function getBusySchedules($date,$activity_type,$engineer_id)\n {\n $this->db->where('start_date',$date);\n if($activity_type!='')\n $this->db->where('activity_type', $activity_type); \n if($engineer_id!='')\n $this->db->where('engineer_id', $engineer_id); \n\n $query = $this->db->get('job');\n\n $busy_slots = array();\n\n foreach ($query->result() as $key => $book_detail)\n {\n $busy_slots[] = array(\n \"begin\"=>new DateTime($book_detail->start_time),\n \"end\"=>new DateTime($book_detail->end_time),\n \"engineer_id\"=>$book_detail->engineer_id,\n \"customer_id\"=>$book_detail->customer_id,\n \"req_id\"=>$book_detail->id,\n \"status\"=>$book_detail->status,\n );\n }\n return $busy_slots;\n }", "public function getSessionInPlannedTabPlanning()\n {\n $id = Yii::app()->user->idUser;\n $sessionPlanedPlanning = Yii::app()->db->createCommand(\n 'SELECT u.firstName, u.lastName, u.avatarPath, name, title, description, s.datePost, COUNT(DISTINCT(i.idUserInvited)) AS numInvitedUser,\n s.dateCreate, s.idSession, COUNT(DISTINCT(a.idArchive)) AS numArchive,s.active, s.idUserCreate\n FROM sessions AS s\n LEFT JOIN invited_session AS i ON s.idSession = i.idSession\n INNER JOIN users AS u ON s.idUserCreate = u.idUser\n INNER JOIN topics AS t ON s.idTopic = t.idTopic \n LEFT JOIN archive_session AS a ON s.idSession = a.idSession\n WHERE (s.idUserCreate = :idUserCreate) AND ((s.datePost+ INTERVAL 1 DAY) >= Now())\n AND (t.active = 1)\n GROUP BY s.idSession\n ORDER BY s.dateCreate DESC')\n ->bindValues(array(':idUserCreate' => $id))\n ->queryAll();\n return $sessionPlanedPlanning;\n }", "public function checkAllTicketsAndCarts(){\n date_default_timezone_set(\"Europe/Amsterdam\");\n\n $tickets = Ticket::all();\n $now = date(\"Y-m-d H:i:s\");\n $now = strtotime($now);\n\n foreach($tickets as $key => $ticket) {\n if(isset($ticket->reservation) && $ticket->reservation->status == 'R') {\n $reservationExpiration = strtotime($ticket->reservation->created_at->toDateTimeString() . ' +10 seconds');\n if ($now >= $reservationExpiration ) {\n $reservation = Reservation::where('ticket_id', $ticket->id)->first();\n\n $cartContent = Cart::restoreFromDB($reservation->buyer_id);\n\n if($cartContent) {\n foreach($cartContent as $cartItem) {\n if($cartItem->id == $ticket->id) {\n $cartContent->pull($cartItem->rowId); \n }\n }\n $cartContent = serialize($cartContent);\n\n DB::table('shoppingcart')\n ->where('identifier', $reservation->buyer_id)\n ->update(['content' => $cartContent]);\n }\n }\n }\n }\n }" ]
[ "0.6198606", "0.602018", "0.6012934", "0.577831", "0.5712782", "0.56098336", "0.5532164", "0.5392688", "0.5377374", "0.5289869", "0.528103", "0.5273387", "0.52127546", "0.52094144", "0.5200146", "0.5196404", "0.51946", "0.51821584", "0.5176242", "0.5175706", "0.5159946", "0.5152312", "0.51497805", "0.5142953", "0.513782", "0.5137152", "0.51328075", "0.5127861", "0.51195943", "0.5090546", "0.5079058", "0.506685", "0.5062622", "0.5061891", "0.5059641", "0.5051185", "0.5029541", "0.5020569", "0.50202495", "0.5017167", "0.500242", "0.49915424", "0.49817508", "0.4976267", "0.49724177", "0.49721506", "0.49693993", "0.49671203", "0.49607477", "0.49576285", "0.49555624", "0.49500456", "0.49449798", "0.49409473", "0.4939145", "0.4929795", "0.49281502", "0.49256784", "0.49191555", "0.49182698", "0.49149692", "0.49148828", "0.49112073", "0.4910705", "0.48989308", "0.48951396", "0.48714456", "0.48620018", "0.4859201", "0.48581505", "0.48536462", "0.48524714", "0.48460633", "0.48382467", "0.4835355", "0.4833678", "0.48313376", "0.48287076", "0.48282608", "0.48248062", "0.48196566", "0.48184514", "0.48158598", "0.48121056", "0.48117042", "0.4811499", "0.48108673", "0.48055562", "0.48038182", "0.4803076", "0.4801897", "0.48015347", "0.48014578", "0.47999734", "0.47977978", "0.47965893", "0.4796129", "0.47934493", "0.47917745", "0.47907987" ]
0.51278865
27
Get Running Active Tickets in Tickets Table in previous day
private function getDayCutOff($transdate, $sitecode) { $ticketModel = new TicketModel(); //Cut Off Date To $date = strtotime($transdate); $dateTo = date("Y-m-d", strtotime("+1 day", $date)); $getPrintedTickets = $ticketModel->getNumberOfPrintedTickets($transdate, $dateTo, $sitecode); $getUsedTickets = $ticketModel->getNumberOfUsedTickets($transdate, $dateTo, $sitecode, 1); $getEncashedTickets = $ticketModel->getNumberOfEncashedTickets($transdate, $dateTo, $sitecode, 1); $getExpiredTickets = $ticketModel->getNumberOfExpiredTickets($transdate, $dateTo, $sitecode); $sumCount = $getPrintedTickets['PrintedTickets'] - ($getUsedTickets['UsedTickets'] + $getEncashedTickets['EncashedTickets']); $sumValue = $getPrintedTickets['Value'] - ($getUsedTickets['Value'] + $getEncashedTickets['Value']); //less expired tickets $_sumCount = $sumCount - $getExpiredTickets['ExpiredTickets']; $_sumValue = $sumValue - $getExpiredTickets['Value']; return array("SumCount" => $_sumCount, "SumValue" => $_sumValue); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getActiveTickets() {\n try {\n $select = $this->select()\n ->from($this);\n// ->where('status =?',1);\n $result = $this->getAdapter()->fetchAll($select);\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n }\n if ($result) :\n return $result;\n endif;\n }", "public function Tickets() {\n\t$filter = array(\"Status\"=>\"Open\");\n\treturn self::get_tickets($filter);\n\t\n \n \n \n \n\t}", "public function getTickets()\n {\n return $this->tickets;\n }", "function getTickets()\r\n\t{\r\n\t\t// get account tickets\r\n\t\treturn $this->call_API('getTickets');\r\n\t}", "private function getSameDayTicketsByDayList() {\r\n\t\t$sql = \"SELECT dateadd(DAY,0, datediff(day,0, Date_Resolved_UTC)) AS day, count(TicketNbr) as count \";\r\n\t\t$sql .= \"FROM v_rpt_Service \";\r\n\t\t$sql .= \"WHERE Date_Resolved_UTC >= DATEADD(day, -30, GETDATE()) \";\r\n\t\t$sql .= \"AND ( \";\r\n\t\t$sql .= \"status_description LIKE '>%' \";\r\n\t\t$sql .= \"OR status_description LIKE 'Completed' \";\r\n\t\t$sql .= \") \";\r\n\t\t$sql .= \"AND dateadd(DAY,0, datediff(day,0, Date_Resolved_UTC)) = dateadd(DAY,0, datediff(day,0, Date_Entered_UTC)) \";\r\n\t\t$sql .= \"GROUP BY dateadd(DAY,0, datediff(day,0, Date_Resolved_UTC)) \";\r\n\t\t$sql .= \"ORDER BY dateadd(DAY,0, datediff(day,0, Date_Resolved_UTC)) \";\r\n\t\t$result = sqlsrv_query($this->conn, $sql) or die ('Error in SQL: ' . $sql);\r\n\r\n\t\t$i = 0;\r\n\t\twhile($row = sqlsrv_fetch_array($result)) {\r\n\t\t\t$r[$i]['date'] = (strtotime($row['day'])*1000)-6*60*60*1000;\r\n\t\t\t$r[$i]['count'] = (string)$row['count'];\r\n\t\t\t$i++;\r\n\t\t}\r\n\r\n\t\treturn($r);\r\n\t}", "private function getNewTicketsCount() {\r\n\t\t$sql = \"SELECT count(TicketNbr) as count \";\r\n\t\t$sql .= \"FROM v_rpt_Service \";\r\n\t\t$sql .= \"WHERE Date_Entered_UTC >= DATEADD(day, -1, GETDATE()) \";\r\n\t\t$result = sqlsrv_query($this->conn, $sql) or die ('Error in SQL: ' . $sql);\r\n\r\n\t\twhile($row = sqlsrv_fetch_array($result)) {\r\n\t\t\t$r = $row['count'];\r\n\t\t}\r\n\r\n\t\treturn($r);\r\n\t}", "public function getValidTickets() {\n\n try {\n $select = $this->select()\n ->from(array('t' => 'ticket_system'), array('t.ticket_id', 't.code', 't.bonus_amt', 't.valid_from', 't.valid_upto', 't.limitation', 't.status'))\n ->setIntegrityCheck(false)\n ->joinLeft(array('con' => 'contests'), 't.ticket_id = con.ticket_id', array(\"con.con_status\"))\n ->where('con.con_status = ?', '0')\n ->order('t.ticket_id DESC');\n\n\n $result = $this->getAdapter()->fetchAll($select);\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n }\n if ($result) :\n return $result;\n endif;\n\n\n\n // echo \"<pre>\"; print_r($result); echo \"</pre>\"; die;\n }", "public function pendingTickets() {\n $tickets = $this->whereHas('status', function($query) {\n return $query->where('name', 'Solved');\n });\n\n return $tickets;\n }", "private function getClosedTicketsByDayList() {\r\n\t\t$sql = \"SELECT dateadd(DAY,0, datediff(day,0, Date_Resolved_UTC)) AS day, count(TicketNbr) as count \";\r\n\t\t$sql .= \"FROM v_rpt_Service \";\r\n\t\t$sql .= \"WHERE Date_Resolved_UTC >= DATEADD(day, -30, GETDATE()) \";\r\n\t\t$sql .= \"AND ( \";\r\n\t\t$sql .= \"status_description LIKE '>%' \";\r\n\t\t$sql .= \"OR status_description LIKE 'Completed' \";\r\n\t\t$sql .= \")\";\r\n\t\t$sql .= \"GROUP BY dateadd(DAY,0, datediff(day,0, Date_Resolved_UTC)) \";\r\n\t\t$sql .= \"ORDER BY dateadd(DAY,0, datediff(day,0, Date_Resolved_UTC)) \";\r\n\t\t$result = sqlsrv_query($this->conn, $sql) or die ('Error in SQL: ' . $sql);\r\n\r\n\t\t$i = 0;\r\n\t\twhile($row = sqlsrv_fetch_array($result)) {\r\n\t\t\t$r[$i]['date'] = (strtotime($row['day'])*1000)-6*60*60*1000;\r\n\t\t\t$r[$i]['count'] = (string)$row['count'];\r\n\t\t\t$i++;\r\n\t\t}\r\n\r\n\t\treturn($r);\r\n\t}", "private function getNewTicketsByDayList() {\r\n\t\t$sql = \"SELECT dateadd(DAY,0, datediff(day,0, Date_Entered_UTC)) AS day, count(TicketNbr) as count \";\r\n\t\t$sql .= \"FROM v_rpt_Service \";\r\n\t\t$sql .= \"WHERE Date_Entered_UTC >= DATEADD(day, -30, GETDATE()) \";\r\n\t\t$sql .= \"GROUP BY dateadd(DAY,0, datediff(day,0, Date_Entered_UTC)) \";\r\n\t\t$sql .= \"ORDER BY dateadd(DAY,0, datediff(day,0, Date_Entered_UTC)) \";\r\n\t\t$result = sqlsrv_query($this->conn, $sql) or die ('Error in SQL: ' . $sql);\r\n\r\n\t\t$i = 0;\r\n\t\twhile($row = sqlsrv_fetch_array($result)) {\r\n\t\t\t$r[$i]['date'] = (strtotime($row['day'])*1000)-6*60*60*1000;\r\n\t\t\t$r[$i]['count'] = (string)$row['count'];\r\n\t\t\t$i++;\r\n\t\t}\r\n\r\n\t\treturn($r);\r\n\t}", "public function open_tickets()\n {\n return $this->hasMany('App\\Models\\Tickets', 'mailbox_id', 'id')->where('status', 'open');\n }", "public static function getUnassignedTickets() {\n $tickets = Self::where('is_assigned', 0)\n ->where('status_id', 1)\n ->where('is_approved', 1)\n ->where('created_at', '<', Carbon::now()->subMinutes(30)->toDateTimeString())\n ->get();\n\n return $tickets;\n }", "public function getTickets()\n {\n return $this->hasMany(Ticket::class, ['created_by' => 'id']);\n }", "public function userOpenTickets()\n {\n return $this->hasMany('PanicHD\\PanicHD\\Models\\Ticket', 'user_id')->whereNull('completed_at');\n }", "public function getTicket()\n {\n //Query untuk mengambil data semua ticket\n return $this->db->get('ticket');\n }", "public function geefTickets() {\n $klant_id = $_SESSION['gebruiker']->geefKlant_id();\n $sql = 'SELECT * FROM `tickets` WHERE `klant_id` = :klant_id';\n $stmnt = $this->db->prepare($sql);\n $stmnt->bindParam(':klant_id', $klant_id);\n $stmnt->execute();\n $tickets = $stmnt->fetchAll(\\PDO::FETCH_CLASS, __NAMESPACE__ . '\\Ticket');\n return $tickets;\n }", "public function getTicketPrinted()\n {\n return $this->join('customers','sales.customer_id','=','customers.id')\n ->select('sales.*','customers.name as customer')\n ->where('status','=', 3)\n // ->orderBy('updated_at','desc')\n ->get();\n }", "public function getAllTickets()\n {\n\t\t$tickets = DB::table('tickets')->get();\n\n\t\treturn $tickets;\n }", "public function getLastActivity()\r\n {\r\n $lastId = end($this->messages);\r\n\r\n $lastMsg = new TicketMessage($lastId);\r\n $lastActive = $lastMsg->getTimeCreated();\r\n \r\n return $lastActive; \r\n }", "private function getOldTicketsList() {\r\n\t\t$sql = \"SELECT TOP 5 summary, TicketNbr, status_description AS status, \";\r\n\t\t$sql .= \"company_name, age, resource_list as resources \";\r\n\t\t$sql .= \"FROM v_rpt_Service \";\r\n\t\t$sql .= \"WHERE status_description NOT LIKE '>%' \";\r\n\t\t$sql .= \"AND status_description NOT LIKE 'Completed' \";\r\n\t\t$sql .= \"ORDER BY age desc\";\r\n\t\t$result = sqlsrv_query($this->conn, $sql) or die ('Error in SQL: ' . $sql);\r\n\r\n\t\t$r = null;\r\n\t\t$i = 0;\r\n\t\twhile($row = sqlsrv_fetch_array($result)) {\r\n\t\t\t$r[$i]['summary'] = $row['summary'];\r\n\t\t\t$r[$i]['status'] = $row['status'];\r\n\t\t\t$r[$i]['ticket'] = $row['TicketNbr'];\r\n\t\t\t$r[$i]['client'] = $row['company_name'];\r\n\t\t\t$r[$i]['age'] = $row['age'];\r\n\t\t\t$r[$i]['resources'] = $row['resources'];\r\n\t\t\t$i++;\r\n\t\t}\r\n\r\n\t\treturn($r);\r\n\t}", "public function ticketIsActive()\n {\n return true ;\n }", "public function active()\n {\n // Create query finding all active sessions\n $query = $this->entityManager->createQuery('SELECT s.id, s.name, s.isPrivate, count(m.id) memberCount FROM Session s LEFT JOIN s.members m WHERE s.lastAction > ?1 GROUP BY s.id');\n $query->setParameter(1, new DateTime('-1 hour'));\n $sessions = $query->getArrayResult();\n return $sessions;\n }", "public function pending_tickets()\n {\n return $this->hasMany('App\\Models\\Tickets', 'mailbox_id', 'id')->where('status', 'pending');\n }", "public function getActive()\n {\n $em = $this->getEntityManager();\n\n $entities = $this->findBy(\n array('end' => null),\n array('id'=>'DESC')\n );\n\n return $entities;\n }", "public function geefEscalatiesTickets() {\n $klant_id = $_SESSION['gebruiker']->geefKlant_id();\n $sql = 'SELECT * FROM `tickets` WHERE `escalatie` != \"\" AND `klant_id` = :klant_id';\n $stmnt = $this->db->prepare($sql);\n $stmnt->bindParam(':klant_id', $klant_id);\n $stmnt->execute();\n $tickets = $stmnt->fetchAll(\\PDO::FETCH_CLASS, __NAMESPACE__ . '\\Ticket');\n return $tickets;\n }", "public function closed_tickets()\n {\n return $this->hasMany('App\\Models\\Tickets', 'mailbox_id', 'id')->where('status', 'closed');\n }", "public function getTickets_sold()\n {\n return $this->tickets_sold;\n }", "public function show(Ticket $ticket)\n {\n $user = Auth::user()->id;\n $ticket_go = daily_ticket::where([['user',$user],['date_add',Carbon::now()->format('Y/m/d')],['statue',1]])->get();\n $ticket_back = daily_ticket::where([['user',$user],['date_add',Carbon::now()->format('Y/m/d')],['statue',2]])->get();\n return view('ticket.ticket_list',compact(['ticket_go','ticket_back']));\n }", "public function getSessionInPastTabPlanning()\n {\n $id = Yii::app()->user->idUser;\n $sessionPastPlanning = Yii::app()->db->createCommand(\n 'SELECT u.firstName, u.lastName, u.avatarPath, name, title, description, s.datePost, COUNT(DISTINCT(i.idUserInvited)) AS numInvitedUser,\n s.dateCreate, s.idSession, COUNT(DISTINCT(a.idArchive)) AS numArchive,s.active, s.idUserCreate\n FROM sessions AS s\n LEFT JOIN invited_session AS i ON s.idSession = i.idSession\n INNER JOIN users AS u ON s.idUserCreate = u.idUser\n INNER JOIN topics AS t ON s.idTopic = t.idTopic \n LEFT JOIN archive_session AS a ON s.idSession = a.idSession\n WHERE (s.idUserCreate = :idUserCreate) AND ((s.datePost+ INTERVAL 1 DAY) < Now())\n AND (t.active = 1)\n GROUP BY s.idSession\n ORDER BY s.dateCreate DESC')\n ->bindValues(array(':idUserCreate' => $id))\n ->queryAll();\n return $sessionPastPlanning;\n }", "public function agentOpenTickets()\n {\n return $this->hasMany('PanicHD\\PanicHD\\Models\\Ticket', 'agent_id')->whereNull('completed_at');\n }", "public function getSessionInPastTabObservation()\n {\n $id = Yii::app()->user->idUser;\n $sessionPast = Yii::app()->db->createCommand(\n 'SELECT u.firstName, u.lastName, u.avatarPath, name, title, description, s.datePost,\n s.dateCreate,s.idSession, COUNT(DISTINCT(a.idArchive)) AS numArchive,s.active, s.idUserCreate\n FROM sessions AS s\n LEFT JOIN invited_session AS i ON s.idSession = i.idSession\n INNER JOIN users AS u ON s.idUserCreate = u.idUser\n INNER JOIN topics AS t ON s.idTopic = t.idTopic\n LEFT JOIN archive_session AS a ON s.idSession = a.idSession\n WHERE (i.idUserInvited = :idUserInvited OR s.idUserCreate = :idUserCreate) AND ((s.datePost+ INTERVAL 1 DAY) < Now())\n AND (t.active = 1)\n GROUP BY s.idSession\n ORDER BY s.dateCreate DESC')\n ->bindValues(array(':idUserInvited' => $id, ':idUserCreate' => $id))\n ->queryAll();\n return $sessionPast;\n }", "public function geefDagTickets() {\n $klant_id = $_SESSION['gebruiker']->geefKlant_id();\n if (isset($_POST['datum']) && !empty($_POST['datum'])) {\n //neemt de datum uit de post\n $datum = date(\"Y-m-d\", strtotime($_POST['datum']));\n } else {\n //maakt de datum aan van vandaag\n $datum = Date(\"Y-m-d\");\n }\n\n $sql = 'SELECT * FROM `tickets` WHERE `klant_id` = :klant_id AND `afspraak_datum` LIKE :datum';\n $stmnt = $this->db->prepare($sql);\n $stmnt->bindParam(':datum', $datum);\n $stmnt->bindParam(':klant_id', $klant_id);\n $stmnt->execute();\n $tickets = $stmnt->fetchAll(\\PDO::FETCH_CLASS, __NAMESPACE__ . '\\Ticket');\n return $tickets;\n }", "public function activities()\n {\n return $this->hasMany(\n Activity::class, \n 'ticket_id', \n 'id'\n );\n }", "public function getTickets(){\n $sql = \"SELECT idChap, chapter, titleChap, DATE_FORMAT(dateChap, 'Le %d-%m-%Y à %k:%i') AS dateChap, DATE_FORMAT(dateChapUpdate, 'Le %d-%m-%Y à %k:%i') AS dateChapUpdate, contentChap FROM chapitres ORDER BY chapter DESC\";\n $tickets = $this->executeRequest($sql);\n return $tickets;\n }", "public function tickets(Ticket $ticket)\n {\n $range = explode('-', $this->request->range);\n $start_date = date('Y-m-d', strtotime($range[0]));\n $end_date = date('Y-m-d', strtotime($range[1]));\n $this->request->request->add(['date_range' => [$start_date, $end_date]]);\n $tickets = $ticket->apply($this->request->except(['range']))->with(['user:id,username,name', 'dept', 'AsStatus'])->get();\n $html = view('analytics::_ajax._tickets', compact('tickets'))->render();\n\n return response()->json(['status' => 'success', 'html' => $html, 'message' => 'Processed successfully'], 200);\n }", "public function index() {\n return Ticket::all();\n }", "public function get_tickets($archived = false){\n\t\t//if not looked for archived, retrieve all open tickets\n\t\tif ($archived == FALSE){\n\t\t\t$this->db->order_by(\"created_at\", \"DESC\");\n $query = $this->db->get_where('tickets', array('status' => 'Open'));\n return $query->result_array(); \n\t\t\t}\n\t\t\t//retrieve all closed tickets\n\t\t\telse {\n\t\t\t$this->db->order_by(\"created_at\", \"DESC\");\n\t\t\t$query = $this->db->get_where('tickets', array('status' => 'Closed'));\n\t\t\treturn $query->result_array();\n\t\t\t}\n\t}", "public function getTicket()\n {\n return $this->ticket;\n }", "public function getTicket()\n {\n return $this->ticket;\n }", "public function userTickets() {\r\n return $this->hasMany(\"Cochlea\\TicketSystem\\Models\\Ticket\", 'userId', $this->primaryKey);\r\n }", "public function scopeAssigned($query)\n {\n return $query->whereIn('status', [Ticket::STATUS_WAITING, Ticket::STATUS_READY, Ticket::STATUS_INPROGRESS, Ticket::STATUS_REVISION])->orWhere(function($q){\n $date = new DateTime;\n $date->modify('-2 days');\n $formatted_date = $date->format('Y-m-d H:i:s');\n $q->where('status', Ticket::STATUS_DONE)->where('updated_at', '>', $formatted_date);\n })->get();\n }", "public function getassignedtickets($id){\n\t\t$this->db->order_by(\"created_at\", \"DESC\");\n\t\t$this->db->select('*');\n\t\t$this->db->join('tickets', 'tickets.id = ticketsassigned.ticketid ');\n\t\t$this->db->where('tickets.status !=', 'Closed');\n $query = $this->db->get_where('ticketsassigned', array('userid' => $id));\n return $query->result_array(); \t\t\t\n\t}", "public function tickets()\n {\n return $this->hasMany(Ticket::class);\n }", "public function tickets()\n {\n return $this->hasMany(Ticket::class);\n }", "public function index()\n {\n return Ticket::all();\n }", "public function ticket()\n {\n return $this->hasMany(Ticket::class);\n }", "public function userCompleteTickets()\n {\n return $this->hasMany('PanicHD\\PanicHD\\Models\\Ticket', 'user_id')->whereNotNull('completed_at');\n }", "public function run()\n {\n $ticket = new Ticket();\n $ticket->user_id = '1';\n $ticket->code = 'tk-0001';\n $ticket->description = 'Ticket de prueba número uno';\n $ticket->status = 'active';\n $ticket->save();\n\n $ticket = new Ticket();\n $ticket->user_id = '1';\n $ticket->code = 'tk-0002';\n $ticket->description = 'Ticket de prueba número dos';\n $ticket->status = 'active';\n $ticket->save();\n\n $ticket = new Ticket();\n $ticket->user_id = '1';\n $ticket->code = 'tk-0003';\n $ticket->description = 'Ticket de prueba número tres';\n $ticket->status = 'active';\n $ticket->save();\n\n $ticket = new Ticket();\n $ticket->user_id = '1';\n $ticket->code = 'tk-0004';\n $ticket->description = 'Ticket de prueba número cuatro';\n $ticket->status = 'active';\n $ticket->save();\n\n $ticket = new Ticket();\n $ticket->user_id = '2';\n $ticket->code = 'tk-0005';\n $ticket->description = 'Ticket de prueba número cinco';\n $ticket->status = 'active';\n $ticket->save();\n\n $ticket = new Ticket();\n $ticket->user_id = '2';\n $ticket->code = 'tk-0006';\n $ticket->description = 'Ticket de prueba número seis';\n $ticket->status = 'active';\n $ticket->save();\n\n $ticket = new Ticket();\n $ticket->user_id = '2';\n $ticket->code = 'tk-0007';\n $ticket->description = 'Ticket de prueba número siete';\n $ticket->status = 'closed';\n $ticket->save();\n\n $ticket = new Ticket();\n $ticket->user_id = '2';\n $ticket->code = 'tk-0008';\n $ticket->description = 'Ticket de prueba número ocho';\n $ticket->status = 'closed';\n $ticket->save();\n }", "private function getEditableTickets()\n {\n $tickets = ArrayList::create();\n foreach ($this->getTickets() as $ticket) {\n /** @var Ticket $ticket */\n $fieldName = $this->name . \"[{$ticket->ID}][Amount]\";\n $range = range($ticket->OrderMin, $ticket->OrderMax);\n\n $ticket->AmountField = DropdownField::create($fieldName, 'Amount', array_combine($range, $range))\n ->setHasEmptyDefault(true)\n ->setEmptyString(_t('TicketsField.EMPTY', 'Tickets'));\n\n // Set the first to hold the minimum\n if ($this->getTickets()->count() === 1) {\n $ticket->AmountField->setValue($ticket->OrderMin);\n }\n\n // $availability = $ticket->TicketPage()->getAvailability();\n $availability = $ticket->getAvailability();\n if ($availability < $ticket->OrderMax) {\n $disabled = range($availability + 1, $ticket->OrderMax);\n $ticket->AmountField->setDisabledItems(array_combine($disabled, $disabled));\n }\n\n if (!$ticket->getAvailable()) {\n $ticket->AmountField->setDisabled(true);\n }\n\n $this->extend('updateTicket', $ticket);\n $tickets->push($ticket);\n }\n return $tickets;\n }", "public function checkAllTicketsAndCarts(){\n date_default_timezone_set(\"Europe/Amsterdam\");\n\n $tickets = Ticket::all();\n $now = date(\"Y-m-d H:i:s\");\n $now = strtotime($now);\n\n foreach($tickets as $key => $ticket) {\n if(isset($ticket->reservation) && $ticket->reservation->status == 'R') {\n $reservationExpiration = strtotime($ticket->reservation->created_at->toDateTimeString() . ' +10 seconds');\n if ($now >= $reservationExpiration ) {\n $reservation = Reservation::where('ticket_id', $ticket->id)->first();\n\n $cartContent = Cart::restoreFromDB($reservation->buyer_id);\n\n if($cartContent) {\n foreach($cartContent as $cartItem) {\n if($cartItem->id == $ticket->id) {\n $cartContent->pull($cartItem->rowId); \n }\n }\n $cartContent = serialize($cartContent);\n\n DB::table('shoppingcart')\n ->where('identifier', $reservation->buyer_id)\n ->update(['content' => $cartContent]);\n }\n }\n }\n }\n }", "public function ongoingEvents()\n {\n $now = Carbon::now();\n\n return Event::where('date_start', '<', $now)\n ->where('date_end', '>', $now);\n }", "private function getClosedTicketsCount() {\r\n\t\t$sql = \"SELECT count(TicketNbr) as count \";\r\n\t\t$sql .= \"FROM v_rpt_Service \";\r\n\t\t$sql .= \"WHERE Date_Resolved_UTC >= DATEADD(day, -1, GETDATE()) \";\r\n\t\t$sql .= \"AND ( \";\r\n\t\t$sql .= \"status_description LIKE '>%' \";\r\n\t\t$sql .= \"OR status_description LIKE 'Completed' \";\r\n\t\t$sql .= \")\";\r\n\t\t$result = sqlsrv_query($this->conn, $sql) or die ('Error in SQL: ' . $sql);\r\n\r\n\t\twhile($row = sqlsrv_fetch_array($result)) {\r\n\t\t\t$r = $row['count'];\r\n\t\t}\r\n\r\n\t\treturn($r);\r\n\t}", "public function getActives($date) {\n $start = $date . ' 23:59:59';\n $subscriptionsAll = DB::table('subscriptions')\n ->select(DB::raw('MAX(id) as id'))\n ->where('status_change', '<=', $start)\n ->groupBy('user_id');\n \n $subscriptionsActives = DB::table('subscriptions')\n ->join('status', function ($join) {\n $join->on('status.id', '=', 'subscriptions.status_id');\n })\n ->joinSub($subscriptionsAll, 'sa', function ($join) {\n $join->on('subscriptions.id', '=', 'sa.id');\n })\n ->where('subscriptions.status_change', '<=', $start)\n ->count();\n return $subscriptionsActives;\n }", "function getCurrentEvents()\n {\n //1. Define the query\n $sql = \"SELECT * FROM events WHERE starttime < CURRENT_DATE && event_complete != 1 ORDER BY starttime\";\n\n //2. Prepare the statement\n $statement = $this->_dbh->prepare($sql);\n\n //4. Execute the query\n $statement->execute();\n\n //5. Process the results (get OrderID)\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }", "public function getTotal_tickets()\n {\n return $this->total_tickets;\n }", "public function tickets() {\n return $this->hasMany('Rockit\\Models\\Ticket')\n ->orderBy('amount', 'desc');\n }", "public function getSessionInPlannedTabObservation()\n {\n $id = Yii::app()->user->idUser;\n $sessionPlanned = Yii::app()->db->createCommand(\n 'SELECT u.firstName, u.lastName, u.avatarPath, name, title, description, s.datePost,\n s.dateCreate, s.idSession, COUNT(DISTINCT(a.idArchive)) AS numArchive,s.active, s.idUserCreate\n FROM sessions AS s\n LEFT JOIN invited_session AS i ON s.idSession = i.idSession\n INNER JOIN users AS u ON s.idUserCreate = u.idUser\n INNER JOIN topics AS t ON s.idTopic = t.idTopic\n LEFT JOIN archive_session AS a ON s.idSession = a.idSession\n WHERE (i.idUserInvited = :idUserInvited OR s.idUserCreate = :idUserCreate) AND ((s.datePost+ INTERVAL 1 DAY) >= Now())\n AND (t.active = 1) AND s.active = 0\n GROUP BY s.idSession\n ORDER BY s.active desc, s.dateCreate desc')\n ->bindValues(array(':idUserInvited' => $id, ':idUserCreate' => $id))\n ->queryAll();\n return $sessionPlanned;\n }", "public function geefGeslotenTickets() {\n $klant_id = $_SESSION['gebruiker']->geefKlant_id();\n $sql = 'SELECT * FROM `tickets` WHERE `status` = \"gesloten\" AND `klant_id` = :klant_id';\n $stmnt = $this->db->prepare($sql);\n $stmnt->bindParam(':klant_id', $klant_id);\n $stmnt->execute();\n $tickets = $stmnt->fetchAll(\\PDO::FETCH_CLASS, __NAMESPACE__ . '\\Ticket');\n return $tickets;\n }", "public function EnumerateActive()\n\t{\n\t\t//\t\t\t\tWHERE course.active = 'si' AND courseId IN (0)\n\n\t\t$this->Util()->DB()->setQuery(\"\n\t\t\t\tSELECT *, major.name AS majorName, subject.name AS name, subject.rvoe FROM course\n\t\t\t\tLEFT JOIN subject ON course.subjectId = subject.subjectId \n\t\t\t\tLEFT JOIN major ON major.majorId = subject.tipo\n\t\t\t\tWHERE course.active = 'si' AND listar = 'si'\n\t\t\t\tORDER BY subject.tipo, subject.name, course.group\");\n\t\t//echo $this->Util()->DB()->query;\n\t\t$result = $this->Util()->DB()->GetResult();\n\n\t\tforeach ($result as $key => $res) {\n\t\t\t$result[$key][\"initialDateStamp\"] = strtotime($result[$key][\"initialDate\"]);\n\t\t\t$result[$key][\"finalDateStamp\"] = strtotime($result[$key][\"finalDate\"]);\n\n\t\t\t$toFinishSeconds = $result[$key][\"daysToFinish\"] * 3600 * 24;\n\n\t\t\t$result[$key][\"daysToFinishStamp\"] = strtotime($result[$key][\"initialDate\"]) + $toFinishSeconds;\n\t\t}\n\t\treturn $result;\n\t}", "public function getActivePolls()\n {\n $pollz = $this->em\n ->createQuery('SELECT p\n FROM NkgPollBundle:Poll p\n WHERE p.active = 1\n AND CURRENT_TIMESTAMP() BETWEEN p.startdate AND p.enddate\n ORDER BY p.enddate DESC');\n\n try {\n $res = $pollz->getResult();\n return $res;\n } catch (\\Doctrine\\ORM\\NoResultException $e) {\n return array();\n }\n }", "public function runSLA(){\n $tickets = Ticket::where('duration', '!=', '')->where('sla_metric', '!=', '')->where('status', 2)->get();\n\n foreach($tickets as $ticket){\n $date = \\Carbon\\Carbon::parse($ticket->created_at);\n\n if($ticket->sla_metric==1){\n $date->addDays($ticket->duration);\n }\n else if($ticket->sla_metric==2){\n $date->addMonths($ticket->duration);\n }\n else if($ticket->sla_metric==3){\n $date->addDay($ticket->duration*7);\n }\n\n while($date->isWeekend()){\n $date->addDay();\n }\n\n if(\\Carbon\\Carbon::now()->diffInDays($date)>0){\n $ticket->status = 6;\n $ticket->save();\n\n $log = Comment::create([\n 'is_comment' => 0,\n 'comment' => ', this ticket is now past the due date. Please take action immediately.',\n 'user_id' => $ticket->assignee,\n 'commenter_role' => '2',\n 'ticket_id' => $ticket->id,\n 'class' => 'fa-clock-o'\n ]);\n }\n }\n }", "public function getTicketingPerformance(Request $request){\n\t\t$begin = memory_get_usage();\n\t\t$acronym_client = $request->client;\n\t\t$id_client = DB::table('ticketing__client')\n\t\t\t->where('client_acronym','=',$acronym_client)\n\t\t\t->value('id');\n\n\t\t$result = DB::table('ticketing__id')\n\t\t\t->join('ticketing__detail','ticketing__detail.id_ticket','=','ticketing__id.id_ticket')\n\t\t\t->where('ticketing__id.id_client','=',$id_client)\n\t\t\t->take(300)\t\n\t\t\t->orderBy('ticketing__id.id','DESC')\n\t\t\t->get();\n\n\t\tforeach ($result as $key => $value) {\n\t\t\t// echo $value->id . \"<br>\";\n\n\t\t\t\n\n\t\t\t$value->open = DB::table('ticketing__activity')\n\t\t\t\t->where('id_ticket','=',$value->id_ticket)\n\t\t\t\t->where('activity','=','OPEN')\n\t\t\t\t->value('date');\n\n\t\t\t$value->id_open = DB::table('ticketing__id')\n\t\t\t\t->where('id_ticket','=',$value->id_ticket)\n\t\t\t\t->value('id');\n\n\t\t\t$value->last_status = array(\n\t\t\t\tDB::table('ticketing__activity')\n\t\t\t\t\t->where('id_ticket','=',$value->id_ticket)\n\t\t\t\t\t->orderBy('id','DESC')\n\t\t\t\t\t->value('activity'),\n\t\t\t\tDB::table('ticketing__activity')\n\t\t\t\t\t->where('id_ticket','=',$value->id_ticket)\n\t\t\t\t\t->orderBy('id','DESC')\n\t\t\t\t\t->value('date')\n\t\t\t\t);\n\n\t\t\t$value->operator = DB::table('ticketing__activity')\n\t\t\t\t->where('id_ticket','=',$value->id_ticket)\n\t\t\t\t->orderBy('id','DESC')\n\t\t\t\t->value('operator');\n\t\t}\n\t\techo 'Total memory usage : '. (memory_get_usage() - $begin);\n\t\t// return $result;\n\t}", "public function getTicketToDispatch(Request $request)\n {\n\n $userID = Auth::id(); \n $nberRows = 10;\n //retrieve all of the query string values as an associative array\n $query= $request -> query();\n // Store in session Via a request instance...\n $request->session()->put($query);\n \n if($request->session()->has('status')) {\n \n $status = $request->session()->pull('status');\n //$nberRows = $request->session()->get('nberRow'); \n //Get Ticket with status sended by query\n $tickets = $this->ticketRepository->getTicketByStatus($status,$nberRows); \n }\n if($request->session()->has('category')) {\n \n $category = $request->session()->pull('category');\n // $nberRows = $request->session()->get('nberRow'); \n //Get Ticket with status sended by query\n $tickets = $this->ticketRepository->getTicketByCategory($category,$nberRows); \n }\n\n if ($request->has('nberRows')) {\n \n $query = $request->session()->get('category','status');\n if($query =='status'){\n //Get Ticket with status sended by query\n $tickets = $this->ticketRepository->getTicketByStatus($status,$nberRows);\n }\n if($query == 'category' ){\n //Get Ticket with status sended by query\n $tickets = $this->ticketRepository->getTicketByCategory($category,$nberRows);\n }\n\n }\n \n //Get All User who have role Agent\n $agents = $this->roleRepository->getUserByRole('Agent');\n \n //Get value of status column from Ticket table\n $statusColumnValues = $this->ticketRepository->getAllValueOfStatusColumn();\n\n //Get all value of category column from Ticket table\n $categoryColumnValues = $this->ticketRepository->getAllValueOfCategoryColumn();\n // \n return view('tickets.ticket_update_agent',['tickets'=>$tickets,\n 'agents'=>$agents,\n 'categoryColumnValues'=> $categoryColumnValues,\n 'statusColumnValues'=> $statusColumnValues \n ]);\n\n }", "public function getSessionInPlannedTabPlanning()\n {\n $id = Yii::app()->user->idUser;\n $sessionPlanedPlanning = Yii::app()->db->createCommand(\n 'SELECT u.firstName, u.lastName, u.avatarPath, name, title, description, s.datePost, COUNT(DISTINCT(i.idUserInvited)) AS numInvitedUser,\n s.dateCreate, s.idSession, COUNT(DISTINCT(a.idArchive)) AS numArchive,s.active, s.idUserCreate\n FROM sessions AS s\n LEFT JOIN invited_session AS i ON s.idSession = i.idSession\n INNER JOIN users AS u ON s.idUserCreate = u.idUser\n INNER JOIN topics AS t ON s.idTopic = t.idTopic \n LEFT JOIN archive_session AS a ON s.idSession = a.idSession\n WHERE (s.idUserCreate = :idUserCreate) AND ((s.datePost+ INTERVAL 1 DAY) >= Now())\n AND (t.active = 1)\n GROUP BY s.idSession\n ORDER BY s.dateCreate DESC')\n ->bindValues(array(':idUserCreate' => $id))\n ->queryAll();\n return $sessionPlanedPlanning;\n }", "public function testTicket() {\n $project = factory(\\App\\Project::class)->make();\n $project->method = 'Scrum';\n $project->save();\n\n $sprint = factory(\\App\\Sprint::class)->make();\n $sprint->project_id = $project->id;\n $sprint->save();\n\n $user = factory(\\App\\User::class)->make();\n $user->save();\n\n for ($i = 0; $i < 5; $i++) {\n $ticket = factory(\\App\\Ticket::class)->make();\n $ticket->project_id = $project->id;\n $ticket->sprint_id = $sprint->id;\n $ticket->created_from = $user->id;\n $ticket->save();\n }\n\n $ticketTemp = $sprint->ticket();\n $tickets = Ticket::where('sprint_id', $ticket->sprint_id)->get();\n\n $this->assertEquals($ticketTemp, $tickets);\n\n Ticket::deleteAllTicketsByProjectId($project->id);\n $user->delete();\n $sprint->delete();\n $project->delete();\n }", "private function getPendingEvents ()\n {\n return EventQueue::pending()->with('event_detail')\n ->orderBy('scheduled_start_time', 'asc')\n ->limit(100)\n ->get();\n }", "public function list_ticket() {\n try {\n //construct the sql SELECT statement in this format\n $sql = \"SELECT * FROM \" . $this->tblTicket;\n\n //execute the query\n $query = $this->dbConnection->query($sql);\n\n // if the query failed, return false. \n //if (!$query)\n //return false;\n //if the query succeeded, but no ticket was found.\n if ($query && $query->num_rows > 0) {\n\n //handle the result\n //create an array to store all returned tickets\n $tickets = array();\n\n //loop through all rows in the returned recordsets\n while ($obj = $query->fetch_object()) {\n $ticket = new Ticket(stripslashes($obj->price), stripslashes($obj->gate), stripslashes($obj->seat), stripslashes($obj->class), stripslashes($obj->depart_time), stripslashes($obj->arrival_location), stripslashes($obj->arrival_time), stripslashes($obj->image));\n\n //set the id for the ticket\n $ticket->setId($obj->id);\n\n //add the ticket into the array\n $tickets[] = $ticket;\n }\n return $tickets;\n }if (!$query) {\n throw new DatabaseException(\"query failed to execute, cannot retrieve tickets\");\n }\n }\n //catch exception and display message\n catch (DatabaseException $e) {\n $message = $e->getMessage();\n //display error message in error view from views folder\n $view = new CityError();\n $view->display($message);\n exit();\n }\n //display message for any other error/exception\n catch (Exception $e) {\n $message = $e->getMessage();\n //display error message in error view from views folder\n $view = new CityError();\n $view->display($message);\n exit();\n }\n }", "public function getSessionInActiveTabObservation()\n {\n $id = Yii::app()->user->idUser;\n $result = Yii::app()->db->createCommand(\n 'SELECT u.firstName, u.lastName, u.avatarPath, name, title, description, s.datePost,\n s.dateCreate, s.idSession, COUNT(DISTINCT(a.idArchive)) AS numArchive,s.active, s.idUserCreate\n FROM sessions AS s\n LEFT JOIN invited_session AS i ON s.idSession = i.idSession\n INNER JOIN users AS u ON s.idUserCreate = u.idUser\n INNER JOIN topics AS t ON s.idTopic = t.idTopic\n LEFT JOIN archive_session AS a ON s.idSession = a.idSession\n WHERE (i.idUserInvited = :idUserInvited OR s.idUserCreate = :idUserCreate) AND ((s.datePost+ INTERVAL 1 DAY) >= Now())\n AND (t.active = 1) AND s.active = 1 AND (i.isJoined = 1 OR s.idUserCreate = :idUserCreate)\n GROUP BY s.idSession\n ORDER BY s.active desc, s.datePost desc')\n ->bindValues(array(':idUserInvited' => $id, ':idUserCreate' => $id))\n ->queryAll();\n return $result;\n }", "public function draft_tickets()\n {\n return $this->hasMany('App\\Models\\Drafts', 'mailbox_id', 'id');\n }", "public function GetTickets($date, $eventId){\n\t\t$sql = \"SELECT *\n\t\t\t\t\t\tFROM ticket\n\t\t\t\t\t\tJOIN venue ON venue.venue=ticket.venue\n\t\t\t\t\t\tJOIN artist ON artist.name=ticket.artist\n\t\t\t\t\t\tWHERE DATE(end)='$date' AND \tevent_id = $eventId\";\n\n\t\tglobal $conn;\n\t\t$results = $conn->query($sql);\n\t\t$numRows = $results->num_rows;\n\t\tif($numRows > 0){\n\t\t\twhile($row = $results->fetch_assoc()){\n\t\t\t$data[] = $row;\n\t\t\t}\n\t\t\treturn $data;\n\t\t}\n\t}", "function get_tickets( $force_reload = false ){\n\t\tif( !is_object($this->tickets) || $force_reload ){\n\t\t\t$this->tickets = new EM_Tickets($this->event_id);\n\t\t\tif( get_option('dbem_bookings_tickets_single') && count($this->tickets->tickets) == 1 ){\n\t\t\t\t//if in single ticket mode, then the event booking cut-off is the ticket end date\n\t\t \t$EM_Ticket = $this->tickets->get_first();\n\t\t \t$EM_Event = $this->get_event();\n\t\t \t//if ticket has cut-off date, that should take precedence as we save the ticket cut-off date/time to the event in single ticket mode\n\t\t \tif( !empty($EM_Ticket->ticket_end) ){\n\t\t \t\t//if ticket end dates are set, move to event\n\t\t \t\t$EM_Event->event_rsvp_date = $EM_Ticket->end()->format('Y-m-d');\n\t\t \t\t$EM_Event->event_rsvp_time = $EM_Ticket->end()->format('H:i:00');\n\t\t \t\tif( $EM_Event->is_recurring() && !empty($EM_Ticket->ticket_meta['recurrences']) ){\n\t\t \t\t\t$EM_Event->recurrence_rsvp_days = $EM_Ticket->ticket_meta['recurrences']['end_days'];\t\t \t\t\t\n\t\t \t\t}\n\t\t \t}else{\n\t\t \t\t//if no end date is set, use event end date (which will have defaulted to the event start date\n\t\t \t\tif( !$EM_Event->is_recurring() ){\n\t\t \t\t\t//save if we have a valid rsvp end date\n\t\t \t\t\tif( $EM_Event->rsvp_end()->valid ){\n\t\t\t\t\t\t $EM_Ticket->ticket_end = $EM_Event->rsvp_end()->getDateTime();\n\t\t\t\t\t }\n\t\t \t\t}else{\n\t\t\t \t\tif( !isset($EM_Ticket->ticket_meta['recurrences']['end_days']) ){\n\t\t\t \t\t\t//for recurrences, we take the recurrence_rsvp_days and feed it into the ticket meta that'll handle recurrences\n\t\t\t \t\t\t$EM_Ticket->ticket_meta['recurrences']['end_days'] = !empty($EM_Event->recurrence_rsvp_days) ? $EM_Event->recurrence_rsvp_days : 0;\n\t\t\t \t\t\tif( !isset($EM_Ticket->ticket_meta['recurrences']['end_time']) ){\n\t\t\t \t\t\t\tiF( empty($EM_Event->event_rsvp_time) ){\n\t\t\t\t\t\t\t\t $EM_Ticket->ticket_meta['recurrences']['end_time'] = $EM_Event->start()->getTime();\n\t\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t\t $EM_Ticket->ticket_meta['recurrences']['end_time'] = $EM_Event->event_rsvp_time;\n\t\t\t\t\t\t\t }\n\t\t\t \t\t\t}\n\t\t\t\t\t\t $EM_Ticket->ticket_end = $EM_Event->start()->format('Y-m-d') . $EM_Ticket->ticket_meta['recurrences']['end_time'];\n\t\t\t \t\t}\n\t\t \t\t}\n\t\t \t}\n\t\t\t}\n\t\t}else{\n\t\t\t$this->tickets->event_id = $this->event_id;\n\t\t}\n\t\treturn apply_filters('em_bookings_get_tickets', $this->tickets, $this);\n\t}", "public static function get_expired_parking_history() {\n return ParkingHistory::where(\"is_towed\", \"=\", 1)->with(\"parking\")->with(\"vehicle.user\")->get()->toArray();\n }", "public function actionTicket()\n {\n $model = new MonitoringVoucherForm();\n\n $rawdata = array();\n $option = array();\n $option[] = array('VoucherID' => 1, 'VoucherName' => 'Ticket');\n //Provide list data\n $vouchers = CHtml::listData($option, 'VoucherID', 'VoucherName');\n if (isset($_POST['MonitoringVoucherForm']))\n {\n $rawdata = $this->monitorVouchers($_POST['MonitoringVoucherForm']);\n Yii::app()->session['rawData'] = $rawdata;\n }\n if (count($rawdata) > 0)\n {\n $this->hasResult = true;\n }\n else\n {\n $this->hasResult = false;\n }\n $headertitle = \"Monitoring of Tickets\";\n $this->render('index', array('model' => $model, 'vouchers' => $vouchers, 'rawdata' => $rawdata, 'title' => $headertitle));\n }", "public function batchticketsAction(){\n $request = $this->getRequest();\n\n if ( $request->isPost() ){\n $post = $this->getRequest()->getPost();\n\n $form = new Yourdelivery_Form_Administration_Crm_Ticket();\n if ( $form->isValid($post) ){\n if ($post['offlineStatus'])\n \n \n $values = $form->getValues();\n\n if (strlen($values['scheduledD'])!=0) {\n $values['scheduled'] = substr($values['scheduledD'], 6, 4) . \"-\" . substr($values['scheduledD'], 3, 2) . \"-\" . substr($values['scheduledD'], 0, 2) . \" \" . substr($values['scheduledT'], 0, 2) . \":\" . substr($values['scheduledT'], 3, 2) . \":00\"; \n }\n \n //save new data\n $ticket->setData($values);\n $ticket->save();\n $this->success(__b(\"Changes successfully saved\"));\n $this->logger->adminInfo(sprintf(\"Crm ticket #%d was edited\", $ticket->getId()));\n \n // save the entry in ticket history\n $ticketHistoryEntry = new Yourdelivery_Model_Crm_Tickethistory();\n $ticketHistoryEntry->setData($values);\n $ticketHistoryEntry->setTicketId($ticket->getId());\n \n $admin = $this->session->admin;\n if (!is_null($admin)) {\n $ticketHistoryEntry->setChangedBy($admin->getId());\n }\n else {\n $ticketHistoryEntry->setChangedBy(0);\n }\n $ticketHistoryEntry->save(); \n }\n else{\n $this->error($form->getMessages());\n $this->_redirect('/administration_crm/editticket/ticketId/' . $ticket->getId());\n }\n }\n \n $this->view->assign('batch', 1);\n }", "public function tickets(){\n\t\treturn $this->hasMany('Alsaudi\\\\Eloquent\\\\TicketRelation','trip_id');\n\t}", "static function currentExhibit(){\n\t\t$res = requete_sql(\"SELECT id FROM exhibit WHERE begin_date <= now() AND end_date >= now() \");\n\t\t$res = $res->fetchAll(PDO::FETCH_ASSOC);\n\t\t$currentExhibit = array();\n\t\tforeach ($res as $exhibit) {\n\t\t\t$exhibit = new Exhibit($exhibit['id']);\n\t\t\tarray_push($currentExhibit, $exhibit);\n\t\t}\n\t\treturn $currentExhibit;\n\t}", "function getUpcomingEvents()\n {\n //1. Define the query\n $sql = \"SELECT * FROM events WHERE starttime > CURRENT_DATE && archive != 1 ORDER BY starttime\";\n\n //2. Prepare the statement\n $statement = $this->_dbh->prepare($sql);\n\n //4. Execute the query\n $statement->execute();\n\n //5. Process the results (get OrderID)\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }", "public function agentCompleteTickets()\n {\n return $this->hasMany('PanicHD\\PanicHD\\Models\\Ticket', 'agent_id')->whereNotNull('completed_at');\n }", "function listTicket() {\n\t\t$query = \"SELECT t.t_id, t.name, t.price, t.quantity_available \n\t\tFROM yam14.F_ticket t, yam14.F_event e\n\t\tWHERE e.e_id = t.e_id\n\t\tAND t.e_id = \" . $this->eid . \";\";\n\t\t\n\t\t$result = mysql_query($query);\n\t\tif (!$result) {\n\t\t\t$message='Invalid Query' .mysql_errno().\" \\n\";\n\t\t $message .= 'Whole Query' . $query;\n\t\t die($message);\n\t\t}//end if\n\t\t\n\t\twhile($row = mysql_fetch_assoc($result)){\n\t\t\t$this->ticketid = $row['t_id'];\n\t\t\t$this->ticketname = $row['name'];\n\t\t\t$this->ticketprice = $row['price'];\n\t\t\t$this->ticketavailable = $row['quantity_available'];\n\t\t\t\n\t\t\techo \"<table class=\\\"table\\\">\";\n\t\t\techo \t\"<form method=\\\"post\\\" action=\\\"event.php?eid=$this->eid\\\">\";\n\t\t\techo \t\"<tr><th colspan=\\\"4\\\">Ticket Information</th></tr>\";\n\t\t\techo \t\"<tr><td>TYPE</td><td>REMAINING</td><td>PRICE</td><td>QUANTITY</td></tr>\";\n\t\t\techo \t\"<tr>\";\n\t\t\techo \"<td>$this->ticketname</td>\";\n\t\t\techo \"<td>\";\n\t\t\tif ($this->ticketavailable==0) {\n\t\t\t\techo \"<p class='error'>Sold Out</p>\";\n\t\t\t}else {\n\t\t\t\techo $this->ticketavailable;\n\t\t\t}\n\t\t\techo \t\"</td>\";\n\t\t\techo \t\"<td>\";\n\t\t\tif ($this->ticketprice==0) {\n\t\t\t\techo \"FREE\";\n\t\t\t}else {\n\t\t\t\techo \"$\" . $this->ticketprice;\n\t\t\t}\n\t\t\techo \"</td>\";\n\t\t\techo \t\"<td><input type=\\\"number\\\" name=\\\"quantity\\\" value=\\\"\\\" step='1' placeholder=\\\"1\\\" min=\\\"1\\\" max=\\\"$this->ticketavailable\\\" \";\n\t\t\tif ($this->ticketavailable==0) {\n\t\t\t\techo \"disabled\";\n\t\t\t}\n\t\t\techo \"/></td>\";\n\t\t\techo \t\"</tr>\";\n\t\t\techo \t\"<tr><td>\";\n\t\t\techo \t\"</td><td></td><td></td><td><input type=\\\"submit\\\" name=\\\"register\\\" value=\\\"Register\\\" class=\\\"btn btn-lg btn-success\\\" \";\n\t\t\tif ($this->ticketavailable==0) {\n\t\t\t\techo \"disabled\";\n\t\t\t}\n\t\t\techo \" /></td></tr>\";\n\t\t\techo \t\"</form>\";\n\t\t\techo \t\"</table>\";\n\t\t}\t\n\t\t\n\t\tmysql_free_result($result);\n\t\t\n\t\t\t\n\t\t\t\n\t}", "public function ticketActive() {\n if (func_num_args() > 0):\n $tid = func_get_arg(0);\n try {\n $data = array('status' => '1');\n $result = $this->update($data, 'ticket_id = \"' . $tid . '\"');\n } catch (Exception $e) {\n throw new Exception($e);\n }\n if ($result):\n return $result;\n else:\n return 0;\n endif;\n else:\n throw new Exception('Argument Not Passed');\n endif;\n }", "public function getAllTruckActive()\n\t{\n\t\t/*$sql = \"SELECT id_inventories, article, brand, model, description, id_product\n\t\t\t\tFROM inventories\n\t\t\t\tWHERE id_inventories \n\t\t\t\tIN (\n\t\t\t\t\tSELECT id_truck\n\t\t\t\t\tFROM shippings\n\t\t\t\t)\";\n\t\t\n\t\t$select = $this->dbAdapter->query($sql, Adapter::QUERY_MODE_EXECUTE);\n\t\t$result = $select->toArray();\n\t\treturn $result;*/\n\t\t\n\t\t$sql = new Sql($this->adapter);\n\t\t$select = $sql->select()->from(array('i' => $this->table));\n\t\t\n\t\t$subSelect = $sql->select()\n\t\t\t->from(array(\"s\" => \"shippings\"))\n\t\t\t->columns(array('id_truck'));\n\t\t\n\t\t$select\n\t\t\t->columns(array(\n\t\t\t\t\t'id_inventories', 'article', 'brand', 'model', 'id_product'\n\t\t\t))\n\t\t\t->join(array('shi' => 'shippings'), 'i.id_inventories = shi.id_truck', array('id_shipping', 'start_date'), 'LEFT')\n\t\t\t->where(array(\"shi.end_date\"=>\"0000-00-00\"))\n\t\t\t->where->in(\"id_inventories\", $subSelect);\n\t\t\t//->where->isNull(\"shi.end_date\");\n\t\t\t\n\t\t$selectString = $sql->getSqlStringForSqlObject($select);\n\t\t$execute = $this->dbAdapter->query($selectString, Adapter::QUERY_MODE_EXECUTE);\n\t\t$result = $execute->toArray();\n\t\treturn $result;\n\t}", "protected function maintainActiveTeams()\n\t\t{\n\t\t\t// set teams other than deleted to active if matched during that timeframe\n\t\t\t\n\t\t\t$forty_five_days_in_past = strtotime('-45 days');\n\t\t\t$forty_five_days_in_past = strftime('%Y-%m-%d %H:%M:%S', $forty_five_days_in_past);\n\t\t\t\n\t\t\t// apply new status to any new, active, reactivated or inactive team\n\t\t\t$teamIds = team::getNewTeamIds();\n\t\t\t$teamIds = array_merge($teamIds, team::getActiveTeamIds());\n\t\t\t$teamIds = array_merge($teamIds, team::getReactivatedTeamIds());\n\t\t\t$teamIds = array_merge($teamIds, team::getInactiveTeamIds());\n\t\t\tforeach ($teamIds AS $teamid)\n\t\t\t{\n\t\t\t\t$team = new team($teamid);\n\t\t\t\t$lastMatch = $team->getNewestMatchTimestamp();\n\t\t\t\t// non deleted team did not match last 45 days -> inactive\n\t\t\t\tif ($team->getStatus() !== 'inactive' && $lastMatch && $lastMatch < $forty_five_days_in_past)\n\t\t\t\t{\n\t\t\t\t\t$team->setStatus('inactive');\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\t// non deleted team did match last 45 days -> active\n\t\t\t\t\tif ($team->getStatus() !== 'active' && $lastMatch && $lastMatch > $forty_five_days_in_past)\n\t\t\t\t\t{\n\t\t\t\t\t\t$team->setStatus('active');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$team->update();\n\t\t\t}\n\t\t}", "private function _getTicketsReferentSales()\n {\n $this->loadModel('Users');\n $users = $this->Users->find('all')->toArray();\n $data = [];\n\n foreach ($users as $user) {\n $count = $this->Tickets->find('all')->where(['paid' => 1, 'user_code' => $user->code])->count();\n\n if($count > 0) {\n $data[] = [\n 'label' => $user->firstname . ' ' . $user->lastname,\n 'value' => $this->Tickets->find('all')->where(['paid' => 1, 'user_code' => $user->code])->count()\n ];\n }\n }\n\n return $data;\n }", "private function _getTicketsSales(Time $start, Time $end): array\n {\n $startIterator = $start->copy();\n $endIterator = $start->copy();\n $endIterator->addDay();\n\n $data = [];\n\n while ($startIterator < $end) {\n $data[] = [\n 'date' => $startIterator->format('Y-m-d'),\n 'book' => $this->Tickets->find('all')\n ->where([\n 'paid' => true,\n 'created >' => $start,\n 'created <' => $endIterator\n ])->count(),\n 'paypal' => $this->Tickets->find('all')\n ->where([\n 'created >' => $start,\n 'created <' => $endIterator,\n 'paid' => true,\n 'type' => 'paypal'\n ])->count(),\n 'perm' => $this->Tickets->find('all')\n ->where([\n 'created >' => $start,\n 'created <' => $endIterator,\n 'paid' => true,\n 'type' => 'perm'\n ])->count()\n ];\n\n $startIterator->addDay();\n $endIterator->addDay();\n }\n\n return $data;\n }", "function getCurrentActiveShiftsForUser($userid){\n\t\t$q = Doctrine_Query::create()->from('ShiftSchedule s')->where(\"s.userid = '\".$userid.\"' AND s.status = '1' AND s.id <> '\".$this->getID().\"' \");\n\t\t$result = $q->execute();\n\t\treturn $result;\n\t}", "public function getActive()\n {\n $jobs = array();\n \n $active = $this->_em->getRepository($this->_entityClass)->findByActive(1);\n foreach ($active as $record) {\n $job = new $this->_jobClass(call_user_func($this->_adapterClass . '::factory', $this->_options, $record, $this->_em, $this->_logger));\n array_push($jobs, $job);\n }\n \n return $jobs;\n }", "public function all_ticket()\n {\n //Query untuk mendapatkan semua ticket dengan diurutkan berdasarkan tanggal tiket dibuat\n $query = $this->db->query(\"SELECT A.id_ticket, A.status, A.tanggal, A.last_update, A.id_kondisi, A.deadline, A.teknisi,\n A.problem_summary, A.filefoto, B.nama_sub_kategori, C.nama_kategori, \n D.nama, F.nama_dept, G.nama_kondisi, G.warna, G.waktu_respon, H.lokasi, I.nama_jabatan, K.nama AS nama_teknisi FROM ticket A \n LEFT JOIN sub_kategori B ON B.id_sub_kategori = A.id_sub_kategori\n LEFT JOIN kategori C ON C.id_kategori = B.id_kategori\n LEFT JOIN karyawan D ON D.nik = A.reported\n LEFT JOIN bagian_departemen E ON E.id_bagian_dept = D.id_bagian_dept\n LEFT JOIN departemen F ON F.id_dept = E.id_dept \n LEFT JOIN kondisi G ON G.id_kondisi = A.id_kondisi\n LEFT JOIN lokasi H ON H.id_lokasi = A.id_lokasi\n LEFT JOIN jabatan I ON I.id_jabatan = D.id_jabatan\n LEFT JOIN karyawan K ON K.nik = A.teknisi\n ORDER BY A.tanggal DESC\");\n return $query;\n }", "public function getInactive()\n {\n $jobs = array();\n \n $inactive = $this->_em->getRepository($this->_entityClass)->findByActive(0);\n foreach ($inactive as $record) {\n $job = new $this->_jobClass(call_user_func($this->_adapterClass . '::factory', $this->_options, $record, $this->_em, $this->_logger));\n array_push($jobs, $job);\n }\n \n return $jobs;\n \n }", "public function comp_tickets() {\n\t\treturn $this->hasMany('App\\Comp_ticket');\n\t}", "public function index()\n {\n return TicketResource::collection(Ticket::paginate(10));\n }", "public function getconnectTransactions() {\n $yesterday = new \\DateTime('yesterday');\n $start_date = $yesterday->format('Y-m-d');\n $today = new \\DateTime('now');\n $end_date = $today->format('Y-m-d');\n $status = ApplaneConstentInterface::COMPLETED;\n //create the query\n $query = $this->createQueryBuilder('c');\n $query->select()\n ->Where('c.date >=:create_at', 'c.date <:end_at', 'c.status =:status')\n ->setParameter('create_at', $start_date)\n ->setParameter('end_at', $end_date)\n ->setParameter('status', $status);\n\n $result = $query->getQuery();\n $result_res = $result->getResult();\n return $result_res;\n }", "public function ticket_switch() {\n if ($_GET['action'] == 'ticket_submit') {\n $ticket_switch = $this->ticket_submit();\n return $ticket_switch;\n }\n\n $ticket_switch = $this->ticket_list();\n return $ticket_switch;\n }", "public static function getActiveEvents()\n {\n $seconds = 86400; // One day (this cache tag get invalidates also on event save)\n\n $ret = Cache::remember('active_events', $seconds, function () {\n date_default_timezone_set('Europe/Rome');\n $searchStartDate = date('Y-m-d', time());\n $lastestEventsRepetitionsQuery = EventRepetition::getLastestEventsRepetitionsQuery($searchStartDate, null);\n\n return self::\n select('events.id as id', 'title', 'countries.name AS country_name', 'countries.id AS country_id', 'countries.continent_id AS continent_id', 'event_venues.city AS city', 'events.repeat_until', 'events.category_id', 'events.created_by', 'events.repeat_type')\n ->join('event_venues', 'event_venues.id', '=', 'events.venue_id')\n ->join('countries', 'countries.id', '=', 'event_venues.country_id')\n ->joinSub($lastestEventsRepetitionsQuery, 'event_repetitions', function ($join) {\n $join->on('events.id', '=', 'event_repetitions.event_id');\n })\n ->get();\n\n /* EVERY TIME THIS QUERY CHANGE REMEMBER TO FLUSH THE CACHE\n (php artisan cache:clear) */\n });\n\n return $ret;\n }", "public function getOpened() /* /tickets/opened */\n\t{\n\t\t$tickets = Ticket::where('status', 'opened')->get();\n\t\treturn Response::json([\n\t\t 'tickets' => $tickets->toArray()\n\t\t]);\n\t}", "function getPastEvents()\n {\n //1. Define the query\n $sql = \"SELECT * FROM events WHERE endtime < CURRENT_DATE AND archive != 1 ORDER BY starttime DESC\";\n\n //2. Prepare the statement\n $statement = $this->_dbh->prepare($sql);\n\n //4. Execute the query\n $statement->execute();\n\n //5. Process the results (get OrderID)\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }", "public function index()\n {\n // could be problematic with a hell of a lot sprints...\n $allSprintes = \\Auth::user()->sprints;\n $active = $allSprintes->filter(fn ($s) => $s->is_active)->first();\n $prev = $allSprintes->filter(fn ($s) => $s->id === $active->previous_sprint_id)->first();\n $next = $allSprintes->filter(fn ($s) => $s->previous_sprint_id === $active->id)->first();\n\n return [\n [\n 'id' => $prev->id,\n 'last' => true,\n 'current' => false,\n 'next' => false,\n ],[\n 'id' => $active->id,\n 'last' => false,\n 'current' => true,\n 'next' => false,\n ],[\n 'id' => $next->id,\n 'last' => false,\n 'current' => false,\n 'next' => true,\n ]\n ];\n }", "public function pendingTickets()\n {\n $user = Auth::user();\n $all_members = User::where('role', 2)->where('agency_id', $user->agency_id)->lists('id');\n $all_members[count($all_members)] = $user->id;\n\n if($user->role > 3)\n return redirect('/');\n else if($user->role==1){\n $pending_tickets = Ticket::where('status', 3)->orWhere('status', 7)->whereIn('assignee', $all_members)->orderBy('created_at', 'DESC')->paginate(20);\n }\n else if($user->role==2){\n $pending_tickets = Ticket::where('status', 3)->orWhere('status', 7)->where('assignee', $user->id)->orderBy('created_at', 'DESC')->paginate(20);\n }\n else{\n $pending_tickets = Ticket::where('status', 3)->orWhere('status', 7)->orderBy('created_at', 'DESC')->paginate(20);\n }\n\n return view('tickets.pending')->with('user', $user)->with('pending_tickets', $pending_tickets);\n }", "public function getActiveTransactions()\n\t{\n\t\treturn $this->active_transactions;\n\t}", "public static function getRecentDoneOrders() {\n\n\t\treturn Order::fullActive()\n\t\t\t\t\t->where('state', '=', '3')\n\t\t\t\t\t->orderBy('date', 'desc')\n\t\t\t\t\t->take(10)\n\t\t\t\t\t->get();\n\t}", "public function run()\n {\n DB::table('tickets')->delete();\n\n Ticket::create([\n 'ticket_number' => 'TT-17-00001',\n 'state_id' => 1,\n 'title' => 'Printer malfunction',\n 'description' => 'The printer on the second floor remains in error. Can you please assist.',\n 'user_id' => 2,\n 'rep_id' => 1\n ]\n );\n Ticket::create([\n 'ticket_number' => 'TT-17-00002',\n 'state_id' => 1,\n 'title' => 'Help with installing sofware',\n 'description' => 'The printer on the second floor remains in error. Can you please assist.',\n 'user_id' => 3,\n 'rep_id' => 1\n ]\n );\n Ticket::create([\n 'ticket_number' => 'TT-17-00003',\n 'state_id' => 4,\n 'title' => 'Help... My computer has crashed',\n 'description' => 'Damnit........',\n 'user_id' => 1,\n 'rep_id' => 2\n ]\n );\n Ticket::create([\n 'ticket_number' => 'TT-17-00004',\n 'state_id' => 5,\n 'title' => 'Help with installing sofware',\n 'description' => 'The printer on the second floor remains in error. Can you please assist.',\n 'user_id' => 1,\n 'rep_id' => 3\n ]\n );\n Ticket::create([\n 'ticket_number' => 'TT-17-00005',\n 'state_id' => 1,\n 'title' => 'Can you output some data?',\n 'description' => 'Could you please deliver me the rapports.',\n 'user_id' => 1,\n 'rep_id' => 2\n ]\n );\n }", "function tickets ($user_id) {\n global $sql;\n return $sql->sql_select_array_query(\"SELECT * FROM `tickets` WHERE user_id = '{$user_id}' ORDER BY id DESC\");\n }" ]
[ "0.6583995", "0.64950687", "0.5939585", "0.5902275", "0.5870401", "0.5845082", "0.5818816", "0.579764", "0.5779022", "0.5751545", "0.57260317", "0.57259464", "0.564091", "0.56292045", "0.5608124", "0.557891", "0.55401915", "0.55150676", "0.5500198", "0.54597324", "0.544516", "0.5430493", "0.5426684", "0.54260164", "0.5422214", "0.5414014", "0.53512996", "0.53146434", "0.530261", "0.52976733", "0.5289067", "0.5277773", "0.5275351", "0.52690494", "0.5262965", "0.521864", "0.52137405", "0.5200952", "0.5200952", "0.5185275", "0.51781845", "0.5175295", "0.51690376", "0.51690376", "0.51654565", "0.5152542", "0.5149287", "0.51468056", "0.51381534", "0.51380724", "0.5131307", "0.51199186", "0.51191163", "0.51163554", "0.5098447", "0.509551", "0.5090321", "0.5085698", "0.50761896", "0.50731486", "0.5071645", "0.50456893", "0.5039561", "0.5031036", "0.5027927", "0.5023583", "0.5020772", "0.5020754", "0.5011916", "0.5001378", "0.49968505", "0.4996639", "0.49942496", "0.4987314", "0.49864915", "0.49824914", "0.4979968", "0.49760616", "0.49651125", "0.49631858", "0.4956832", "0.49545404", "0.49486095", "0.49038357", "0.48984447", "0.48941347", "0.48938882", "0.48936367", "0.48795062", "0.48751006", "0.48707557", "0.48576373", "0.4840639", "0.48352736", "0.4827609", "0.48111314", "0.48060578", "0.48049352", "0.48047906", "0.4803133", "0.48000178" ]
0.0
-1
garbage collection is done on the memcached server, no need to do it here...
function mc_ses_gc($maxlt) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cache_gc() {\n // TO DO!!!!!\n }", "function cache_gc()\n {\n // because this gc function is called before storage is initialized,\n // we just set a flag to expunge storage cache on shutdown.\n $this->expunge_cache = true;\n }", "function garbage_collection()\n{\n\tglobal $cache, $db;\n\n\t// Unload cache, must be done before the DB connection if closed\n\tif (!empty($cache))\n\t{\n\t\t$cache->unload();\n\t}\n\n\t// Close our DB connection.\n\tif (!empty($db))\n\t{\n\t\t$db->sql_close();\n\t}\n}", "public function collectGarbage() {}", "public function collectGarbage() {}", "public function collectGarbage() {}", "public function collectGarbage() {}", "public function collectGarbage() {}", "public function collectGarbage() {}", "function garbageCollect() {\n\t\tif ( !mt_rand( 0, 100 ) ) {\n\t\t\t$nowtime = time();\n\t\t\t/* Avoid repeating the delete within a few seconds */\n\t\t\tif ( $nowtime > ($this->lastexpireall + 1) ) {\n\t\t\t\t$this->lastexpireall = $nowtime;\n\t\t\t\t$this->expireall();\n\t\t\t}\n\t\t}\n\t}", "public function garbage_collect();", "public function garbageCollection();", "private function collectGarbage() {\n\t\t$query = 'DELETE FROM ' .//'DELETE LOW_PRIORITY FROM ' .\n\t\t\tShelveIt::$query_cache[ 'table' ] .\n\t\t\t' WHERE time < NOW() - ' . ShelveIt::$query_cache[ 'expire' ];\n \n\t\tif( !mysql_unbuffered_query( $query, $this->mysql ) ) {\n die( \"Garbage collect query: $query<br />\" .\n 'Invalid query: ' . mysql_error( $this->mysql ) );\n };\n\t}", "protected function garbageCollect()\n {\n \n }", "private function destroyCache()\r\n\t{\r\n\t\t$memcache = new \\Memcached();\r\n\t\t$memcache->addServer('localhost', 11211);\r\n\t\t$key = md5(catalogProductList::MEMCACHED_FETCH_ALL);\r\n\t\t$cache_data = $memcache->delete($key);\r\n\t}", "public function __destruct() {\n\t\tmemcache_close($this -> conn);\n\t}", "function _garbage_collection()\n\t{\n\t\tif (class_exists('Stats'))\n\t\t{\n\t\t\tif (ee()->stats->statdata('last_cache_clear')\n\t\t\t\t&& ee()->stats->statdata('last_cache_clear') > 1)\n\t\t\t{\n\t\t\t\t$last_clear = ee()->stats->statdata('last_cache_clear');\n\t\t\t}\n\t\t}\n\n\t\tif ( ! isset($last_clear))\n\t\t{\n\t\t\tee()->db->select('last_cache_clear');\n\t\t\tee()->db->where('site_id', ee()->config->item('site_id'));\n\t\t\t$query = ee()->db->get('stats');\n\n\t\t\t$last_clear = $query->row('last_cache_clear') ;\n\t\t}\n\n\t\tif (isset($last_clear) && ee()->localize->now > $last_clear)\n\t\t{\n\t\t\t$data = array(\n\t\t\t\t'last_cache_clear'\t=> ee()->localize->now + (60*60*24*7)\n\t\t\t);\n\n\t\t\tee()->db->where('site_id', ee()->config->item('site_id'));\n\t\t\tee()->db->update('stats', $data);\n\n\t\t\tif (ee()->config->item('enable_throttling') == 'y')\n\t\t\t{\n\t\t\t\t$expire = time() - 180;\n\n\t\t\t\tee()->db->where('last_activity <', $expire);\n\t\t\t\tee()->db->delete('throttle');\n\t\t\t}\n\n\t\t\tee()->functions->clear_caching('all');\n\t\t}\n\t}", "function doGarbageCollection()\n {\n if(rand()%100 < 1)\n {\n $this->db->gc();\n }\n }", "private function _cacheCleanup()\n\t {\n\t\t$this->_db->exec(\n\t\t \"DELETE FROM `HTTPcache` WHERE \" .\n\t\t \"`datetime` < DATE_SUB(NOW(), INTERVAL \" . $this->_expiry . \" SECOND) OR `expiry` < NOW()\"\n\t\t);\n\t }", "public function __destruct()\n\t{\n\t\tif(!is_null($this->memcache)) {\n\t\t\t$this->memcache->close();\n\t\t\t$this->memcache = null;\n\t\t}\n\t}", "public static function garbage_collection()\n {\n global $wpdb, $_wp_using_ext_object_cache;\n\n if (!$_wp_using_ext_object_cache)\n {\n $expired_transients = $wpdb->get_col(\"SELECT option_name FROM $wpdb->options WHERE option_name LIKE '_transient_timeout%' AND option_value < \" . (isset($_SERVER['REQUEST_TIME']) ? (int) $_SERVER['REQUEST_TIME'] : time()));\n\n foreach ($expired_transients as $transient)\n {\n delete_transient(str_replace('_transient_timeout_', '', $transient));\n }\n }\n }", "public function __destruct() {\n\t\t\tif( ( $memcache = $this->getMemcache() ) != null && !$this->isPersistent ) {\n\t\t\t\t$memcache->close();\n\t\t\t}\n\t\t}", "public static function clean_cached_data()\n {\n }", "function gc (){\n\n # create database object if not create\n self::_connect();\n\n # delete expired session from database table\n $res = $this->link->delete($this->table_name,array(array('','session_expire','<',time(),'')));\n\n }", "private static function _freeMemory()\n {\n flush();\n if (function_exists(\"gc_collect_cycles\")) {\n gc_collect_cycles();\n }\n }", "public function gc()\n {\n $this->delete(array(\n 'creation_date < ?' => date('Y-m-d H:i:s', time() - (3600 * 24)),\n ));\n }", "public function __destruct()\n\t\t{\n\t\t\t// caches. \n\t\t\t//$this->clean_cache();\n\t\t}", "public function tearDown()\n\t{\n\t\t$this->memcache->flush();\n\t\t$this->memcache->close();\n\t\t$this->memcache = NULL;\n\t}", "public function gc()\n\t{\n\t\t$prefix = $this->options['hash'] . '-cache-';\n\n\t\tforeach ($this->data as $key => $value)\n\t\t{\n\t\t\tif (substr($key, 0, strlen($prefix)) == $prefix)\n\t\t\t{\n\t\t\t\t$value = $this->data[$key];\n\n\t\t\t\tif ($this->isDataExpired($value))\n\t\t\t\t{\n\t\t\t\t\tunset($this->data[$key]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public function doGarbageCollection($expire = 0)\n {\n }", "public static function purgeCaches() {}", "public function gc() {}", "public function gc() {}", "private function gc()\n\t{\n\t\tif ($handle = opendir(DIR_SERVER_ROOT . DIR_TMP_NAME . '/' . DIR_DATASTORE_NAME . '/'))\n\t\t{ \n\t\t\t$dir_array = array(); \n\t\t\twhile (false !== ($file = readdir($handle)))\n\t\t\t{ \n\t\t\t\tif ($file != '.' AND $file != '..')\n\t\t\t\t{\n\t\t\t\t\tif (file_exists(DIR_SERVER_ROOT . DIR_TMP_NAME . '/' . DIR_DATASTORE_NAME . '/' . $file))\n\t\t\t\t\t{\n\t\t\t\t\t\t$lastmod = @filemtime(DIR_SERVER_ROOT . DIR_TMP_NAME . '/' . DIR_DATASTORE_NAME . '/' . $file);\n\t\t\t\t\t\tif (($lastmod + ($this->ttl)) < time())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t@unlink(DIR_SERVER_ROOT . DIR_TMP_NAME . '/' . DIR_DATASTORE_NAME . '/' . $file);\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\tclosedir($handle);\n\t\t}\n\t}", "public function __destruct()\n {\n if ($this->cache instanceof Swift_KeyCache) {\n $this->cache->clearAll($this->cacheKey);\n }\n }", "private function freeMemory()\n {\n $this->getContainer()->get('doctrine.orm.entity_manager')->flush();\n $this->getContainer()->get('doctrine.orm.entity_manager')->clear();\n gc_collect_cycles();\n }", "abstract protected function clearCache();", "public function clean() {\n\t\t\tif( !$items = $this->getStats( 'items' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$memcache = $this->getMemcache();\n\t\t\tforeach( $items['items'] as $key => $item ) {\n\t\t\t\t$dump = $memcache->getStats( 'cachedump', $key, $item['number'] * 2 );\n\t\t\t\tforeach( array_keys( $dump ) as $ckey ) {\n\t\t\t\t\t$memcache->get( $ckey );\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->stats = null;\n\t\t}", "public function clearInternalCache()\n {\n $this->_cached = null;\n }", "public function clearCached()\n {\n $this->cached = null;\n }", "protected function garbageCollect()\n {\n $config = $this->app['config']->get('cartalyst.sentinel');\n\n $this->sweep(\n $this->app['sentinel.activations'],\n $config['activations']['lottery']\n );\n\n $this->sweep(\n $this->app['sentinel.reminders'],\n $config['reminders']['lottery']\n );\n }", "protected function _clearDataCache() {}", "public function cache_delete()\n {\n }", "function _deleteCache() {\n require_once(\"Cache/Output.php\");\n $cache = new Cache_Output($GLOBALS[\"BX_config\"][\"popoon\"][\"cacheContainer\"], $GLOBALS[\"BX_config\"][\"popoon\"][\"cacheParams\"] );\n \n // for the time being, just flush everything...\n @$cache->flush('outputcache');\n $cache->flush('');\n }", "public function forgetCached() {\n lRedis::del(Helpers::cacheKey($this) . \":properties\");\n }", "public function __destruct()\r\n {\r\n \t// iterate over the entities and persist them in cache\r\n \tforeach ($this->_entities as $entity) {\r\n \t\t$cacheKey = $this->getCacheKey($entity->getPrimaryKey());\r\n \t\t$this->getCache()->save($entity->disconnect(), $cacheKey, array(self::CACHE_TAG));\r\n \t}\r\n }", "public function doGarbageCollection($expire = 0)\n {\n /*\n $vcnt = xcache_count(XC_TYPE_VAR);\n for ($i = 0; $i < $vcnt; $i ++) {\n xcache_clear_cache(XC_TYPE_VAR, $i);\n }\n */\n }", "public function dettachCache()\n {\n if (!is_null($this->_cache)) {\n unset($this->_cache);\n }\n }", "function cleanCache(){\n\t\t$res = mysql_query(\"delete from `\".addslashes($this->tableName).\"` where `Expires` < NOW()\", $this->app->db());\n\t}", "protected function _cacheClean() {\n\t\t\tSERIA_Base::db()->dbLog(\"_cacheClean(\".$this->table.\", $id)\");\n\t\t\t$this->_cache()->set('generation', microtime(TRUE), 1800);\n\t\t}", "public static function purge_cache(){\n $attachments = new \\CFCDN_Attachments();\n $attachments->purge_cache();\n }", "protected function flushCached()\n\t{\n\t\t$this->objectCache = [];\n\t}", "function gc()\n {\n return true;\n }", "public static function removeCache() {\n\t}", "private function clearCache() {\n\t\t\n\t\tCore\\Cache::clear();\n\t\t\n\t}", "public static function collectGarbage() {\n $wasEnabled = gc_enabled();\n !$wasEnabled && gc_enable();\n\n gc_collect_cycles();\n\n !$wasEnabled && gc_disable();\n }", "public function cleanContrexxCaching()\n {\n $this->_deleteAllFiles();\n }", "protected function purgeCache() {\n\t\tConfigboxCacheHelper::purgeCache();\n\t}", "public function __destruct()\n {\n $this->_loadedPackets = [];\n }", "protected function removeExpiredCacheEntries() {}", "public function __destruct()\n {\n $this->clear();\n }", "public function __destruct()\n {\n $this->clear();\n }", "public function reclaim();", "public function flushCache() {\n\t\t// is deleted. If it cleared our static cache variables\n\t\t// here, they would in effect be useless.\n\t}", "public function __destruct()\n {\n if ($this->cache) {\n $this->cache->setItem(self::CACHE_KEY, $this->messagesWritten);\n }\n }", "protected function __del__() { }", "protected function _clear_cache() {\n\t\t$this->_attrs = array();\n\t\t$this->_options = array();\n\t}", "public function clearCache() {}", "public function clearCache() {}", "public function cleanLookupCache(){\n\t\t$this->lookup = [];\n\t}", "abstract protected function gc();", "private function close()\n\t{\n\t\tif ($this->memcache_connected)\n\t\t{\n\t\t\t$this->connection->close();\n\t\t\t$this->memcache_connected = false;\n\t\t}\n\t}", "private function disableGarbageCollection()\n {\n gc_disable();\n }", "public function gc()\n\t{\n\t\treturn true;\n\t}", "function free() {\r\n\t\t$this->dbh->free() ;\t\t\r\n\t}", "public function __destruct()\n\t{\n\t\t$this->_redisMaster = $this->_redisSlave = null;\n\t}", "public function __destruct()\n {\n foreach ($this->changed as $name => $value) {\n $this->storage->save($this->cache->get($name));\n }\n }", "private static function CLEAR_CACHE() {\n\t\tclearstatcache();\n\t}", "public function forgetCache();", "public function clear_cache(): void;", "public function clearCache()\n {\n }", "public static function reset_caches() {\n self::$instance = null;\n }", "public function __destruct(){\n\t\t$this->purgeQueue();\n\t}", "public function clearCacheData(){\n $cacheKey = $this->getCacheKey();\n $this->clearCache($cacheKey);\n }", "function gc() {\n srand(time());\n if ((rand()%100) < $this->gc_probability) {\n $this->that->garbage_collection($this->gc_time, $this->name);\n }\n }", "function wp_clear_object_cache() {\n\tglobal $wpdb, $wp_object_cache;\n\n\t$wpdb->queries = array(); // or define( 'WP_IMPORTING', true );\n\n\tif ( ! is_object( $wp_object_cache ) ) {\n\t\treturn;\n\t}\n\n\t$wp_object_cache->group_ops = array();\n\t$wp_object_cache->stats = array();\n\t$wp_object_cache->memcache_debug = array();\n\t$wp_object_cache->cache = array();\n\n\tif ( is_callable( $wp_object_cache, '__remoteset' ) ) {\n\t\t$wp_object_cache->__remoteset(); // important\n\t}\n}", "public function gc()\n {\n $expired = $this->find('toGc')->all();\n foreach ($expired as $block) {\n $this->unblock($block->get('id'));\n }\n }", "private function _cleanCache()\n {\n if ($this->cache instanceof \\Zend_Cache_Core) {\n $this->cache->clean();\n $this->addMessage($this->_('Cache cleaned'));\n }\n }", "public function __destruct()\n {\n foreach ($this->changed as $change) {\n $this->saveCacheObject($this->cacheInfo[\"objects\"][$change][\"store\"]);\n }\n $oldUmask = umask(0);\n file_put_contents($this->cacheDirectory . self::CACHE_INFO_FILENAME, json_encode(array(\"cache\" => $this->cacheInfo)));\n @chmod($this->cacheDirectory . self::CACHE_INFO_FILENAME, 0666);\n umask($oldUmask);\n }", "public static function clear_memory_heavy_variables() {\n\t\tglobal $wpdb, $wp_object_cache;\n\n\t\t$wpdb->queries = [];\n\n\t\tif ( is_object( $wp_object_cache ) ) {\n\t\t\t$wp_object_cache->cache = [];\n\t\t\t$wp_object_cache->group_ops = [];\n\t\t\t$wp_object_cache->memcache_debug = [];\n\t\t}\n\t}", "function clear_object_cache() {\n\tglobal $wpdb, $wp_object_cache;\n\n\t$wpdb->queries = [];\n\n\tif ( ! is_object( $wp_object_cache ) ) {\n\t\treturn;\n\t}\n\n\t$wp_object_cache->group_ops = [];\n\t$wp_object_cache->stats = [];\n\t$wp_object_cache->memcache_debug = [];\n\t$wp_object_cache->cache = [];\n\n\tif ( method_exists( $wp_object_cache, '__remoteset' ) ) {\n\t\t$wp_object_cache->__remoteset();\n\t}\n}", "public function purge() {}", "public function clearCache()\n\t{\n\t\t$e107 = e107::getInstance();\n\t\t$e107->ecache->clear_sys(UC_CACHE_TAG);\n\t}", "public function __destructor()\n {\n if ($this->dbCache) {\n $this->dbCache->Close();\n }\n }", "public function purge();", "public function purge();", "public function purge();", "protected function tearDown() {\n gc_collect_cycles();\n }", "public static function flushInternalRuntimeCaches() {}", "public static function gc() {\n\t\t// iterate over our types and delete the images\n\t\tforeach (array('album', 'artist') as $type) {\n\t\t\t$sql = \"DELETE FROM `image` USING `image` LEFT JOIN `\" .\n\t\t\t\t$type . \"` ON `\" . $type . \"`.`id`=\" .\n\t\t\t\t\"`image`.`object_id` WHERE `object_type`='\" .\n\t\t\t\t$type . \"' AND `\" . $type . \"`.`id` IS NULL\";\n\t\t\t$db_results = Dba::write($sql);\n\t\t} // foreach\n\t}", "public function testGc()\n {\n ini_set(\"session.gc_maxlifetime\",3);\n $redis=\\RWKY\\Redis\\setUpRedis();\n \\RWKY\\Redis\\RedisSessions::$redis=$redis;\n \\RWKY\\Redis\\RedisSessions::$hash=\"hash\";\n $this->assertEmpty($redis->keys(\"*\"));\n session_start();\n $_SESSION[\"test\"]=1;\n session_write_close();\n $this->assertNotEmpty($redis->keys(\"*\"));\n sleep(5);\n $this->assertTrue(\\RWKY\\Redis\\RedisSessions::gc());\n $this->assertEmpty($redis->keys(\"*\"));\n \\RWKY\\Redis\\RedisSessions::$hash=null;\n session_start();\n $_SESSION[\"test\"]=1;\n session_write_close();\n $this->assertNotEmpty($redis->keys(\"*\"));\n sleep(5);\n $this->assertTrue(\\RWKY\\Redis\\RedisSessions::gc());\n $this->assertEmpty($redis->keys(\"*\"));\n \n }" ]
[ "0.77578104", "0.7688553", "0.7649746", "0.7508744", "0.7508744", "0.7508744", "0.7508744", "0.7508744", "0.7508744", "0.7397591", "0.7370965", "0.7366213", "0.73546", "0.73452187", "0.7291975", "0.7210172", "0.7179157", "0.7126937", "0.7084062", "0.6896378", "0.6858976", "0.6831137", "0.6821144", "0.67937636", "0.6793112", "0.67633915", "0.6724276", "0.66823953", "0.6663654", "0.66616464", "0.6625237", "0.66062826", "0.66050863", "0.6601583", "0.656755", "0.65501964", "0.64915824", "0.64893365", "0.6479088", "0.64621365", "0.64476806", "0.6436472", "0.6425913", "0.64212775", "0.64059913", "0.6402388", "0.6391582", "0.63824016", "0.6346188", "0.63452363", "0.63376", "0.63217986", "0.6303854", "0.6275451", "0.6260194", "0.62357223", "0.62324464", "0.6221374", "0.62129706", "0.61904097", "0.61901927", "0.61901927", "0.6189311", "0.61853904", "0.61728895", "0.6170412", "0.6169955", "0.6168098", "0.6168098", "0.615969", "0.6158138", "0.615553", "0.6147181", "0.6134732", "0.6128859", "0.6113823", "0.6113549", "0.6109156", "0.6108089", "0.60995704", "0.6092968", "0.60867447", "0.60865146", "0.60822475", "0.60542196", "0.60452616", "0.6038696", "0.6034241", "0.6032836", "0.6026811", "0.60260653", "0.60228866", "0.6020761", "0.60164136", "0.6014129", "0.6014129", "0.6014129", "0.6010796", "0.59994483", "0.59961665", "0.5994426" ]
0.0
-1
$xmls = new \SimpleXMLElement( file_get_contents( storage_path( 'app\public\mock\Orders\ListOrdersResponse.xml' ) ) );
public function ListOrders($continue = true) { if (!array_key_exists('CreatedAfter', $this->options) && !array_key_exists('LastUpdatedAfter', $this->options)) { $this->setLimits('Created', '2017-01-01', '2017-01-02'); } $this->options['Action'] = 'ListOrders'; $this->prepareToken(); if ($this->tokenFlag) { $this->resetMarketplaceFilter(); } $param = $this->genQuery(); $response = $this->sendRequest($param); $path = $this->options['Action'] . 'Result'; if (!$this->checkResponse($response)) { return false; } $xml = simplexml_load_string($response['body'])->$path; $this->parseXML($xml); $this->checkToken($xml); if ($this->tokenFlag && $this->tokenUseFlag && $continue === true) { while ($this->tokenFlag) { $this->log('info', "Recursively fetching more Participationseses"); $this->ListOrders(false); } } return $response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getXml() {}", "function readInXML()\n {\n $xml = simplexml_load_file($this->url);\n return $xml;\n }", "protected function _loadXML()\n {\n $fileContents = file_get_contents($this->_wsdlPath);\n $fileContents = str_replace('xs:', '', $fileContents);\n $this->_xml = new \\SimpleXMLElement($fileContents);\n }", "function fetchXMLObj($fname) {\n return simplexml_load_file($fname);\n}", "public function testValidXml() {\r\n\t\t$xml=\"<xml><test>works</test></xml>\";\r\n\t\t$actual = Response::xml($xml);\r\n\t\r\n\t\t$this->assertEquals($actual->test, 'works');\r\n\t}", "public function parseXML(Request $request) {\n $xmlSource = $request->file('xmlfile');\n // Store XML File in Storage Folder\n $xmlPath = $request->file('xmlfile')->store('xml', 'public');\n\n // Parsing XML File\n $xmlDocument = new \\DOMDocument('1.0', 'utf-8');\n $xmlDocument->load(storage_path('app/public/').$xmlPath);\n $xPath = new \\DOMXPath($xmlDocument);\n\n if ($xPath->query('/elements')->length > 0) {\n $rootElement = '/elements/unit';\n }else {\n $rootElement = '/unit';\n }\n\n // Generating HTML Template with XML file\n $htmlTemplate = self::getTemplate($xPath);\n\n // Saving HTML file for testing\n Storage::put('public/html/test.html', $htmlTemplate, 'public');\n\n // Deleting XML File after Parsing Completed\n Storage::delete('public/'.$xmlPath);\n\n // Testing\n self::generateIonicPreview($htmlTemplate);\n\n return view('developer.xml.validator', compact('rootElement', 'xPath', 'htmlTemplate'));\n }", "function getUserList(){\r\n\treturn $ul = simplexml_load_file(\"data/userList.xml\");\r\n}", "protected function fetchData(): SimpleXMLElement\n {\n $response = @simplexml_load_file($this->getApiUrl());\n\n throw_if(\n false === $response,\n XmlParseErrorException::class,\n sprintf('Error parsing file (\"%s\") on line (%s) : %s',\n @libxml_get_last_error()->file,\n @libxml_get_last_error()->line,\n @libxml_get_last_error()->message\n )\n );\n\n return $response;\n }", "function xmlLoader($file){\n\t\t$dom = new domDocument;\n\t\t$dom->loadXML(file_get_contents($file));\n\t\t\tif (!$dom) {\n\t\t\t echo 'Error while parsing the document';\n\t\t\t exit;\n\t\t\t }\n\t\t\n\t\t$s = simplexml_import_dom($dom);\n\t\treturn $s;\n\t\t\n\t\t}", "function fetchXML($url, $fileName){\n if(file_exists($fileName)){\n $xml = simplexml_load_file($fileName);\n } else {\n $xml = simplexml_load_file($url);\n }\n\t\treturn $xml;\n\t}", "function getXML($stamp){\n $url = AGENTS_URL.$stamp;\n $xml = @simplexml_load_file($url);\n\n\n\tif(!$xml){\n logError ('No xml from server');\n exit;\n}\nif (count($xml->children()) == 0){\n logError ('Error parseFile: xml children');\n exit;\n}\n return $xml;\n}", "public function getFakeXMLSobek() {\n\n\t\t// Returns fake XML Sobek.\n\t\treturn new SimpleXMLElement(file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'fake_sobek_return_xml.xml'));\n\t}", "public function getXmlResponse();", "function setXmlArray(){\n \n $xmlData = simplexml_load_file($this->urlXml);\n $this->xmlArray = (array)$xmlData;\n \n }", "public static function fromXML($xml){\n //self::$strxml = file_get_contents($xml);\n // echo self::$xmldoc != null;\n\n $bool = self::$xmldata = self::$xmldoc->loadXML($xml);\n $newXML = self::$xmldoc->saveXML();\n // echo $newXML;\n }", "private function getPhpunitXml(): string\n {\n return (string) file_get_contents($this->resourcePath . DIRECTORY_SEPARATOR . 'Common' . DIRECTORY_SEPARATOR . 'phpunit.xml.stub');\n }", "public function testXmlString()\n {\n $dom = Dom::createFromString(file_get_contents(self::$fixture.'books.xml'));\n $this->assertInstanceOf(DOMDocument::class, $dom);\n $this->assertEquals('catalog', $dom->documentElement->localName);\n }", "public function createXML() {}", "public function testGetRetrievesStorages()\n {\n file_put_contents(self::$temp.DS.'file.txt', 'Hello World');\n $this->assertSame('Hello World', Storage::get(self::$temp.DS.'file.txt'));\n }", "public function __construct()\n {\n parent::__construct();\n $timestamp = Carbon::now()->timestamp;\n $this->filePath = storage_path(\"xml/test_{$timestamp}.xml\");\n $this->indexPath = storage_path('xml/sitemap.xml');\n $this->recordPath = storage_path('xml/record.xml');\n $this->url = 'https://www.jiankang.com/';\n }", "public function testGetExternalShipmentFiles()\n {\n }", "function load($registryloc) {\n\t\t$string = file_get_contents($registryloc);\n\t\t$xmlfile = new SimpleXMLElement($string);\n\t\treturn $xmlfile;\n\t}", "public function xml()\n {\n try\n {\n if (! $this->decoded) {\n $this->response = json_encode(simplexml_load_string($this->response));\n\n $this->json();\n }\n }\n catch (\\Exception $exception){\n $this->decoded = [];\n }\n\n return $this->decoded;\n }", "public function testXmlUri()\n {\n $dom = Dom::createFromUri('http://localhost:1349/books.xml');\n $this->assertInstanceOf(DOMDocument::class, $dom);\n $this->assertEquals('catalog', $dom->documentElement->localName);\n }", "function api() {\n\n $url = \"http://www.ngine.co/test/api/index.php\";\n $file = file_get_contents($url);\n $result = \"\";\n\n if (strpos($file, 'xml') == 2) {\n $xml = simplexml_load_string($file);\n $json = json_encode($xml);\n $result = $json;\n\n } else {\n $fichero = file_get_contents('prueba.json', true);\n $json = json_encode($fichero);\n $result = $fichero;\n\n }\n\n echo $result;\n exit;\n\n }", "function loadxml_as_dom($filename) {\n\t$rpath = dirname(__FILE__) . \"/$filename\";\n\tif ( !file_exists($rpath) ) {\n\t\telog(\"file not exists: [$rpath]\");\n\t\treturn null;\n\t}\n\n\t$dom = simplexml_load_file($rpath);\n\tif (!$dom) {\n\t\telog(\"failed to simplexml_load_file: [$rpath]\");\n\t\treturn null;\n\t}\n\n\treturn $dom;\n}", "function getData($data){\n// $myfile = fopen($data, \"r\") or die(\"Unable to open file!\");\n// $stream = fread($myfile,filesize(\"data.xml\"));\n// fclose($myfile);\n $stream = '\n<product><Type>finance-wow</Type><company>bank</company><name>ING</name><prod2 id=\"test\" color=\"red\"><Ty>finance</Ty><company>bank</company></prod2></product>\n ';\n// $stream = str_replace(array(\"\\r\", \"\\n\"), '', $stream);\n// $stream = trim(preg_replace('/\\s+/', '', $stream)); // all white spaces\n $stream = trim(preg_replace('/(\\>)\\s*(\\<)/m', '$1$2', $stream)); // white spaces in between tags\n\n// $stream = readfile('data.xml');\n// $xml = new SimpleXMLElement($stream);\n $xml = new SimpleXmlIterator($stream);\n return $xml;\n}", "private function _loadXML($filePath) {\n \tif (substr($this->localizationPath, -1) != DIRECTORY_SEPARATOR) {\n \t\t$this->localizationPath = $this->localizationPath.DIRECTORY_SEPARATOR;\n \t}\n\n \t$filePath = $this->localizationPath.$filePath;\n\n \t//\tPARSING...\n \t$doc = new DOMDocument();\n \t$doc->preserveWhiteSpace = false;\n \t$doc->formatOutput = true;\n\n \tif (!$doc->load(realpath($filePath))) {\n \t\tthrow new Exception('Can not load locale '.$filePath);\n \t}\n\n \treturn $doc;\n }", "protected function parseXmlFile() {}", "public function filePath()\n {\n return '/data/monster/monsters.xml';\n }", "public function testConstructValidXML()\n {\n $parser = new Parser($this->createTwig(), '<?xml version=\"1.0\"?><test><name>Pedro</name></test>');\n $this->assertArrayHasKey('0', $parser->getReports());\n\n $parser = new Parser($this->createTwig(), __DIR__ . '/../phpunit.xml');\n $this->assertArrayHasKey('0', $parser->getReports());\n\n $parser = new Parser($this->createTwig());\n $parser->addXmlContent('<?xml version=\"1.0\"?><test><name>Pedro</name></test>');\n $this->assertArrayHasKey('0', $parser->getReports());\n\n $parser = new Parser($this->createTwig());\n $parser->addFileContent(__DIR__ . '/../phpunit.xml');\n $this->assertArrayHasKey('0', $parser->getReports());\n }", "public function testXmlFile()\n {\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionCode(1495569580);\n\n $dom = Dom::createFromFile(self::$fixture.'books.xml');\n $this->assertInstanceOf(DOMDocument::class, $dom);\n $this->assertEquals('catalog', $dom->documentElement->localName);\n\n Dom::createFromFile('invalid');\n }", "protected function parseResponseToXML($response)\n {\n return simplexml_load_string($response->getBody()->getContents());\n }", "function getWeather(){\n\t\t$this->racine->asXml();\n\t}", "public function savetofile()\n\t\t{\n\t\t\treturn $this->xml->asXML($this->file);\n\t\t}", "abstract public function getDataprotXML();", "public function testAsXML()\n {\n \n $xml = '<xml><item1>woooo</item1><item2>yay</item2></xml>';\n \n $testData = \\simplexml_load_string($xml);\n\n $value = new TestValueClass($testData);\n \n $this->assertEquals(\n $value->toArray(), \n [\n 'item1' => 'woooo',\n 'item2' => 'yay',\n 'item3' => null,\n 'item4' => null\n ]\n );\n \n }", "function __construct($xml_dir = '.') {\r\n\t\t\r\n\t\t$this->xml_dir = dir($xml_dir);\r\n\t}", "protected function getMockResponseContents($fileName) {\n return file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'Mocks' . DIRECTORY_SEPARATOR . $fileName);\n }", "private function loadXml($xml)\n {\n return is_file($xml)\n ? simplexml_load_file($xml)\n : simplexml_load_string($xml);\n }", "function readXmlFile($xmlfile) {\n\tglobal $statistics;\n\n\t$xml = file_get_contents($xmlfile);\n\t$o = TypeConverter::xmlToArray($xml,TypeConverter::XML_GROUP);\n\tif ( ! $o ) return false;\n\n\t# Fix some errors in templates prior to continuing\n\n\t$o['Path'] = $xmlfile;\n\t$o['Author'] = getAuthor($o);\n\t$o['DockerHubName'] = strtolower($o['Name']);\n\t$o['Base'] = $o['BaseImage'];\n\t$o['SortAuthor'] = $o['Author'];\n\t$o['SortName'] = $o['Name'];\n\t$o['Forum'] = $Repo['forum'];\n# configure the config attributes to same format as appfeed\n# handle the case where there is only a single <Config> entry\n\n\tif ( $o['Config']['@attributes'] )\n\t\t$o['Config'] = array('@attributes'=>$o['Config']['@attributes'],'value'=>$o['Config']['value']);\n\n\tif ( $o['Plugin'] ) {\n\t\t$o['Author'] = $o['PluginAuthor'];\n\t\t$o['Repository'] = $o['PluginURL'];\n\t\t$o['SortAuthor'] = $o['Author'];\n\t\t$o['SortName'] = $o['Name'];\n\t\t$statistics['plugin']++;\n\t} else\n\t\t$statistics['docker']++;\n\n\treturn $o;\n}", "function __construct($xmlFilePath) \n {\n $this->simplexmlObject = simplexml_load_file($xmlFilePath);\n $this->host = $this->parseXmlElement(\"//host\");\n $this->user = $this->parseXmlElement(\"//user\");\n $this->password = $this->parseXmlElement(\"//password\");\n $this->dbname = $this->parseXmlElement(\"//dbname\");\n $this->socket = $this->parseXmlElement(\"//unix_socket\");\n $this->charset = $this->parseXmlElement(\"//charset\");\n }", "function getItemsFromFile()\n{\n return json_decode(file_get_contents(__DIR__ . '/' . JSON_DATA_FILE), true);\n}", "public function testAddExternalShipmentFile()\n {\n }", "private function getAPIResponse() {\n $query = self::$BASE_URL . $this->city . \",\" . $this->country . self::$KEY . self::$MODE . self::$UNITS;\n $file_content = file_get_contents($query);\n\n return ($file_content[0] != '<') ? null : new SimpleXMLElement($file_content);\n }", "private function _loadXmlFile($file) \r\n {\r\n if (!file_exists($file)) {\r\n throw new Exception(\"The file \" . $file . \" doesn't exists\");\r\n }\r\n $extension = substr($file, -4);\r\n if ($extension !== \".xml\") {\r\n throw new Exception(\"The file \" . $file . \" doesn't have the xml extension\");\r\n }\r\n \r\n $xml = simplexml_load_file($file);\r\n if ($xml === false) {\r\n throw new Exception(\"The file \" . $file . \" is not a valid xml file\");\r\n }\r\n \r\n return $xml;\r\n }", "public function testCreateParseXml(): void\n {\n $saftDemoXml = \\simplexml_load_file(SAFT_DEMO_PATH);\n\n if($saftDemoXml === false){\n $this->fail(\\sprintf(\"Error opening file '%s'\", SAFT_DEMO_PATH));\n }\n\n $paymentsStack = $saftDemoXml\n ->{SourceDocuments::N_SOURCEDOCUMENTS}\n ->{Payments::N_PAYMENTS}\n ->{Payment::N_PAYMENT};\n\n if ($paymentsStack->count() === 0) {\n $this->fail(\"No Payment in XML\");\n }\n\n for ($i = 0; $i < $paymentsStack->count(); $i++) {\n $paymentXml = $paymentsStack[$i];\n $lineStack = $paymentXml->{Line::N_LINE};\n\n if ($lineStack->count() === 0) {\n $this->fail(\"No lines in Payment\");\n }\n\n for ($l = 0; $l < $lineStack->count(); $l++) {\n /* @var $lineXml \\SimpleXMLElement */\n $lineXml = $lineStack[$l];\n $line = new Line(new ErrorRegister());\n $line->parseXmlNode($lineXml);\n\n\n $xmlRootNode = (new AuditFile())->createRootElement();\n $sourceDocNode = $xmlRootNode->addChild(SourceDocuments::N_SOURCEDOCUMENTS);\n $paymentsNode = $sourceDocNode->addChild(Payments::N_PAYMENTS);\n $payNode = $paymentsNode->addChild(Payment::N_PAYMENT);\n\n $xml = $line->createXmlNode($payNode);\n\n try {\n $assertXml = $this->xmlIsEqual($lineXml, $xml);\n $this->assertTrue(\n $assertXml,\n \\sprintf(\n \"Fail on Payment '%s' Line '%s' with error '%s'\",\n $paymentXml->{Payment::N_PAYMENTREFNO},\n $lineXml->{Line::N_LINENUMBER}, $assertXml\n )\n );\n } catch (\\Exception | \\Error $e) {\n $this->fail(\n \\sprintf(\n \"Fail on Document '%s' Line '%s' with error '%s'\",\n $paymentXml->{Payment::N_PAYMENTREFNO},\n $lineXml->{Line::N_LINENUMBER}, $e->getMessage()\n )\n );\n }\n $this->assertEmpty($line->getErrorRegistor()->getOnCreateXmlNode());\n $this->assertEmpty($line->getErrorRegistor()->getOnSetValue());\n $this->assertEmpty($line->getErrorRegistor()->getLibXmlError());\n }\n }\n }", "private function xml() {\n if( $this->format === 'text/hal+xml' ) {\n header('Content-Type: text/hal+xml; charset=utf-8', TRUE, $this->status);\n $hal_response = (new Resource())\n ->setURI(\"/{$this->resource}\". (isset($this->filters['id']) ? $this->filters['id'] : ''))\n ->setLink($this->resource, new Link(\"/{$this->resource}\"))\n ->setData($this->content);\n\n $writer = new Hal\\XmlWriter(true);\n \n return $writer->execute($hal_response);\n } else {\n header('Content-Type: text/xml; charset=utf-8', TRUE, $this->status);\n $xml_data = new \\SimpleXMLElement('<?xml version=\"1.0\"?><data></data>');\n static::array_to_xml($this->content,$xml_data);\n \n return $xml_data->asXML();\n }\n \n }", "public function asXML();", "public function store(Request $request)\n {\n \n $xml_object = simplexml_load_file($request->file('inputFile')->getRealPath());\n \n $json = json_decode(json_encode($xml_object));\n \n if($json->person) {\n $this->savePerson($json->person);\n } \n \n else if ($json->shiporders) {\n $this->saveShiporders($json->shiporders);\n }\n \n }", "private function getFileContentFromLocal(string $fileXML) : string\n {\n\n $pathWithFileXML = config::$Paths['storage'] .'/' . $fileXML;\n\n return file_exists($pathWithFileXML)\n ? file_get_contents($pathWithFileXML)\n : '';\n\n }", "private function callApi()\n {\n // Get the XML from the FloatRates URL\n return simplexml_load_file($this->url);\n }", "private function load(){\n\n $xml = simplexml_load_string($this->response);\n if($xml){\n if(!$this->isResponseSuccessFull($xml)) {\n\n $item = $xml->Items->Item;\n\n $this->data['title'] = $item->ItemAttributes->Title->__toString();\n $this->data['ean'] = $item->ItemAttributes->EAN->__toString();\n $this->data['brand'] = $item->ItemAttributes->Brand->__toString();\n $this->data['picture'] = $item->SmallImage->URL->__toString();\n $this->data['asin'] = $item->ASIN->__toString();\n $this->data['price'] = round(((int)$item->ItemAttributes->ListPrice->Amount->__toString()) / 100,2);\n }\n }else{\n $this->errorMessage[] = 'can not load xml.';\n }\n }", "private function getXml()\n {\n try {\n $directory = __DIR__ . '/../../lib/Gocdb_Services/PI/';\n $em = \\Factory::getEntityManager();\n\n switch ($this->method) {\n case \"access_test\":\n require_once($directory . 'AccessTest.php');\n $this->authByIdentifier(true);\n $xml = (new AccessTest())->getRenderingOutput();\n break;\n case \"get_site\":\n require_once($directory . 'GetSite.php');\n $this->authByIdentifier();\n $getSite = new GetSite($em, $this->baseUrl, $this->baseApiUrl);\n $getSite->setDefaultPaging($this->defaultPaging);\n $getSite->setPageSize($this->defaultPageSize);\n $getSite->validateParameters($this->params);\n $getSite->createQuery();\n $getSite->executeQuery();\n $getSite->setSelectedRendering(\"GOCDB_XML\");\n $xml = $getSite->getRenderingOutput();\n break;\n case \"get_site_list\":\n require_once($directory . 'GetSite.php');\n $getSite = new GetSite($em);\n $getSite->validateParameters($this->params);\n $getSite->createQuery();\n $getSite->executeQuery();\n $getSite->setSelectedRendering(\"GOCDB_XML_LIST\");\n $xml = $getSite->getRenderingOutput();\n break;\n case \"get_site_contacts\":\n require_once($directory . 'GetSiteContacts.php');\n $this->authByIdentifier();\n $getSiteContacts = new GetSiteContacts($em, $this->baseApiUrl);\n $getSiteContacts->setDefaultPaging($this->defaultPaging);\n $getSiteContacts->setPageSize($this->defaultPageSize);\n $getSiteContacts->validateParameters($this->params);\n $getSiteContacts->createQuery();\n $getSiteContacts->executeQuery();\n $xml = $getSiteContacts->getRenderingOutput();\n break;\n case \"get_site_security_info\":\n require_once($directory . 'GetSiteSecurityInfo.php');\n $this->authByIdentifier();\n $getSiteSecurityInfo = new GetSiteSecurityInfo($em, $this->baseApiUrl);\n $getSiteSecurityInfo->setDefaultPaging($this->defaultPaging);\n $getSiteSecurityInfo->setPageSize($this->defaultPageSize);\n $getSiteSecurityInfo->validateParameters($this->params);\n $getSiteSecurityInfo->createQuery();\n $getSiteSecurityInfo->executeQuery();\n $xml = $getSiteSecurityInfo->getRenderingOutput();\n break;\n case \"get_roc_list\":\n require_once($directory . 'GetNGIList.php');\n $getNGIList = new GetNGIList($em);\n $getNGIList->validateParameters($this->params);\n $getNGIList->createQuery();\n $getNGIList->executeQuery();\n $xml = $getNGIList->getRenderingOutput();\n break;\n case \"get_subgrid_list\":\n require_once($directory . 'GetSubGridList.php');\n $getSubGrid = new GetSubGridList($em);\n $getSubGrid->validateParameters($this->params);\n $getSubGrid->createQuery();\n $getSubGrid->executeQuery();\n $xml = $getSubGrid->getRenderingOutput();\n break;\n case \"get_roc_contacts\":\n require_once($directory . 'GetNGIContacts.php');\n $this->authByIdentifier();\n $getNGIContacts = new GetNGIContacts($em, $this->baseUrl, $this->baseApiUrl);\n $getNGIContacts->setDefaultPaging($this->defaultPaging);\n $getNGIContacts->setPageSize($this->defaultPageSize);\n $getNGIContacts->validateParameters($this->params);\n $getNGIContacts->createQuery();\n $getNGIContacts->executeQuery();\n $xml = $getNGIContacts->getRenderingOutput();\n break;\n case \"get_service\":\n require_once($directory . 'GetService.php');\n $getSE = new GetService($em, $this->baseUrl, $this->baseApiUrl);\n $getSE->setDefaultPaging($this->defaultPaging);\n $getSE->setPageSize($this->defaultPageSize);\n $getSE->validateParameters($this->params);\n $getSE->createQuery();\n $getSE->executeQuery();\n $xml = $getSE->getRenderingOutput();\n break;\n case \"get_service_endpoint\":\n require_once($directory . 'GetService.php');\n $getSE = new GetService($em, $this->baseUrl, $this->baseApiUrl);\n $getSE->setDefaultPaging($this->defaultPaging);\n $getSE->setPageSize($this->defaultPageSize);\n $getSE->validateParameters($this->params);\n $getSE->createQuery();\n $getSE->executeQuery();\n $xml = $getSE->getRenderingOutput();\n break;\n case \"get_service_types\":\n require_once($directory . 'GetServiceTypes.php');\n $getST = new GetServiceTypes($em);\n $getST->validateParameters($this->params);\n $getST->createQuery();\n $getST->executeQuery();\n $xml = $getST->getRenderingOutput();\n break;\n case \"get_downtime_to_broadcast\":\n require_once($directory . 'GetDowntimesToBroadcast.php');\n $getDTTBroadcast = new GetDowntimeToBroadcast($em, $this->baseUrl, $this->baseApiUrl);\n $getDTTBroadcast->setDefaultPaging($this->defaultPaging);\n $getDTTBroadcast->setPageSize($this->defaultPageSize);\n $getDTTBroadcast->validateParameters($this->params);\n $getDTTBroadcast->createQuery();\n $getDTTBroadcast->executeQuery();\n $xml = $getDTTBroadcast->getRenderingOutput();\n break;\n case \"get_downtime\":\n //require_once($directory . 'GetDowntimeFallback.php');\n require_once($directory . 'GetDowntime.php');\n $getDowntime = new GetDowntime($em, false, $this->baseUrl, $this->baseApiUrl);\n $getDowntime->setDefaultPaging($this->defaultPaging);\n $getDowntime->setPageSize($this->defaultPageSize);\n $getDowntime->validateParameters($this->params);\n $getDowntime->createQuery();\n $getDowntime->executeQuery();\n $xml = $getDowntime->getRenderingOutput();\n break;\n case \"get_downtime_nested_services\":\n //require_once($directory . 'GetDowntimeFallback.php');\n require_once($directory . 'GetDowntime.php');\n $getDowntime = new GetDowntime($em, true, $this->baseUrl, $this->baseApiUrl);\n $getDowntime->setDefaultPaging($this->defaultPaging);\n $getDowntime->setPageSize($this->defaultPageSize);\n $getDowntime->validateParameters($this->params);\n $getDowntime->createQuery();\n $getDowntime->executeQuery();\n $xml = $getDowntime->getRenderingOutput();\n break;\n case \"get_user\":\n require_once($directory . 'GetUser.php');\n $this->authByIdentifier();\n $getUser = new GetUser(\n $em,\n \\Factory::getRoleActionAuthorisationService(),\n $this->baseUrl,\n $this->baseApiUrl\n );\n $getUser->setDefaultPaging($this->defaultPaging);\n $getUser->setPageSize($this->defaultPageSize);\n $getUser->validateParameters($this->params);\n $getUser->createQuery();\n $getUser->executeQuery();\n $xml = $getUser->getRenderingOutput();\n break;\n case \"get_project_contacts\":\n require_once($directory . 'GetProjectContacts.php');\n $this->authByIdentifier();\n $getProjCon = new GetProjectContacts($em, $this->baseApiUrl);\n $getProjCon->setDefaultPaging($this->defaultPaging);\n $getProjCon->setPageSize($this->defaultPageSize);\n $getProjCon->validateParameters($this->params);\n $getProjCon->createQuery();\n $getProjCon->executeQuery();\n $xml = $getProjCon->getRenderingOutput();\n break;\n case \"get_ngi\":\n require_once($directory . 'GetNGI.php');\n $this->authByIdentifier();\n $getNGI = new GetNGI($em, $this->baseApiUrl);\n $getNGI->setDefaultPaging($this->defaultPaging);\n $getNGI->setPageSize($this->defaultPageSize);\n $getNGI->validateParameters($this->params);\n $getNGI->createQuery();\n $getNGI->executeQuery();\n $xml = $getNGI->getRenderingOutput();\n break;\n case \"get_service_group\":\n require_once($directory . 'GetServiceGroup.php');\n $this->authByIdentifier();\n $getServiceGroup = new GetServiceGroup($em, $this->baseUrl, $this->baseApiUrl);\n $getServiceGroup->setDefaultPaging($this->defaultPaging);\n $getServiceGroup->setPageSize($this->defaultPageSize);\n $getServiceGroup->validateParameters($this->params);\n $getServiceGroup->createQuery();\n $getServiceGroup->executeQuery();\n $xml = $getServiceGroup->getRenderingOutput();\n break;\n case \"get_service_group_role\":\n require_once($directory . 'GetServiceGroupRole.php');\n $this->authByIdentifier();\n $getServiceGroupRole = new GetServiceGroupRole($em, $this->baseUrl, $this->baseApiUrl);\n $getServiceGroupRole->setDefaultPaging($this->defaultPaging);\n $getServiceGroupRole->setPageSize($this->defaultPageSize);\n $getServiceGroupRole->validateParameters($this->params);\n $getServiceGroupRole->createQuery();\n $getServiceGroupRole->executeQuery();\n $xml = $getServiceGroupRole->getRenderingOutput();\n break;\n case \"get_cert_status_date\":\n require_once($directory . 'GetCertStatusDate.php');\n $this->authByAnyIdentifier();\n $getCertStatusDate = new GetCertStatusDate($em, $this->baseApiUrl);\n $getCertStatusDate->setDefaultPaging($this->defaultPaging);\n $getCertStatusDate->setPageSize($this->defaultPageSize);\n $getCertStatusDate->validateParameters($this->params);\n $getCertStatusDate->createQuery();\n $getCertStatusDate->executeQuery();\n $xml = $getCertStatusDate->getRenderingOutput();\n break;\n case \"get_cert_status_changes\":\n require_once($directory . 'GetCertStatusChanges.php');\n $this->authByIdentifier();\n $getCertStatusChanges = new GetCertStatusChanges($em, $this->baseApiUrl);\n $getCertStatusChanges->setDefaultPaging($this->defaultPaging);\n $getCertStatusChanges->setPageSize($this->defaultPageSize);\n $getCertStatusChanges->validateParameters($this->params);\n $getCertStatusChanges->createQuery();\n $getCertStatusChanges->executeQuery();\n $xml = $getCertStatusChanges->getRenderingOutput();\n break;\n case \"get_site_count_per_country\":\n require_once($directory . 'GetSiteCountPerCountry.php');\n $getCountrySiteCount = new GetSiteCountPerCountry($em);\n $getCountrySiteCount->validateParameters($this->params);\n $getCountrySiteCount->createQuery();\n $getCountrySiteCount->executeQuery();\n $xml = $getCountrySiteCount->getRenderingOutput();\n break;\n //case \"get_role_action_mappings\":\n default:\n die(\"Unable to find method: {$this->method}\");\n break;\n }\n } catch (\\Exception $e) {\n die($e->getMessage());\n }\n return $xml;\n }", "function getTestDataFromFile($file) {\n return require $file;\n}", "public function testReadFromMicrostorage()\n {\n }", "protected function getData() {\n\n $path = $this->getPath();\n\n // Check if file exists.\n if(!file_exists($path)) {\n throw new ImporterException(t('XML file @path does not exist.', array('@path' => $path)));\n }\n\n // Let the XML parser use internal errors so we can collect them later if anything goes wrong.\n libxml_use_internal_errors(true);\n $xml = simplexml_load_file($path);\n if($xml === FALSE) {\n $error_message = \"Failed loading XML:\";\n foreach(libxml_get_errors() as $error) {\n $error_message.= PHP_EOL . $error->message;\n }\n throw new ImporterException($error_message);\n }\n\n // XML -> JSON -> ARRAY\n $json = json_encode($xml);\n $array = json_decode($json, TRUE);\n return $array;\n }", "public function getXml($name)\n{\nreturn $this->$name->getXML();\n}", "public function loadXML() : ?SimpleXMLElement\n {\n $path = resource_path('assets/database/ushospitals.xml');\n return file_exists($path) ? simplexml_load_file($path)->row[0] : null;\n }", "public function load_xml_file(string $file ): self\n { \n $pathinfo = pathinfo($file);\n $this->filename = $pathinfo['basename']; \n $this->path = $pathinfo['dirname'];\n $xml = file_get_contents($file); \n $this->load_xml_string($xml); \n // print_r($this->bandelements);\n return $this;\n }", "function _getFileXML($file) {\n\n if (empty($file))\n $this->fatalErrorPage(\"XML file to parse was not set\");\n\n if (!($fp = fopen($file, \"r\", 1))) {\n $this->fatalErrorPage(\"could not open XML input from file $file\");\n }\n \n $this->contentBuffer = NULL;\n while ($data = fread($fp, 4096)) {\n $this->contentBuffer .= $data;\n }\n\n fclose($fp);\n\n }", "public static function xmlDataProvider()\n {\n return [\n [[__DIR__ . '/_files/data.xml', \\Magento\\Framework\\Simplexml\\Element::class]]\n ];\n }", "private function getXmlResponse($xmlFile)\n {\n $libDir = \\sfConfig::get(\"sf_lib_dir\");\n return file_get_contents($libDir . \"/Gcs/Services/xml/\" . $xmlFile);\n }", "function getXML() {\n return $this->xml;\n }", "private function getCreateSchemaWrapper()\n {\n return file_get_contents(__DIR__ . '/../Stubs/schema-create.stub');\n }", "protected function getStub()\n {\n return __DIR__.'/stubs/service.stub';\n }", "public function testXML() {\n $result = ApiResponse::xml()\n ->code(200)\n ->status('OK!')\n ->addProperty('extrastatus', 'ok')\n ->addProperty('extra', '')\n ->removeProperty('extra')\n ->output();\n $this->assertXmlStringEqualsXmlString($this->expected_xml, $result);\n }", "private function readXmlFile(string $xmlFile): SimpleXMLElement {\n echo \"\\tPrüfe \" . basename($xmlFile) .\n ' (' . number_format(round(filesize($xmlFile) / 1024, 2), 2) . ' kbyte): ';\n\n // Öffne XML Datei zum Lesen\n $content = file_get_contents($xmlFile);\n if (!$content) {\n throw new RuntimeException(PHP_EOL . 'Fehler beim lesen der XML Datei ' . $xmlFile);\n }\n\n // XML Datei in Parser laden\n $xml = new SimpleXMLElement($content, LIBXML_NOERROR | LIBXML_NOWARNING | LIBXML_NONET);\n if (!$xml) {\n throw new RuntimeException('Fehler in parseWetterWarnung: Die XML Datei konnte nicht verarbeitet werden.');\n }\n\n return $xml;\n }", "private function fileContent($path)\n\t{\n\t\tif ( !file_exists($path))\n\t\t{\n\t\t\tUtils_Configuration_XMLLoaderOpenFileException(\n\t\t\t\t'Nie ma pliku ' . $path);\n\t\t}\n\n\t\t$this->sXML = file_get_contents($path);\n\n\t\tif (false === $this->sXML)\n\t\t{\n\t\t\tUtils_Configuration_XMLLoaderOpenFileException(\n\t\t\t\t'Nie udalo sie odczytac zawartosci pliku ' . $path);\n\t\t}\n\t}", "protected function setUp() {\n $this->object = new XmlFile(__DIR__.'/rss-techcrunch.xml');\n }", "public function loadXml($filename,$map_path){\r\n \r\n $this->rootPath = $this->_preparePath($map_path);\r\n \r\n if(!File::exists( $this->rootPath .DS. $filename ))\r\n App::critical_error ('XML document not found: '.$this->rootPath .DS. $filename);\r\n \r\n $xmlDoc = $this->_initDocument($this->rootPath .DS. $filename);\r\n \r\n //get the project elements\r\n $elements = $xmlDoc->getElementsByTagName('element');\r\n \r\n foreach($elements as $element){\r\n \r\n if(count($this->elements) == 0 ){\r\n $this->elements = $this->_loadElement($element);\r\n }\r\n else{\r\n $this->elements = array_merge($this->elements,$this->_loadElement($element));\r\n }\r\n }\r\n \r\n //isolate the template key\r\n if(!is_null($this->_templatekey) && !is_null($this->elements[$this->_templatekey]))\r\n $this->elements['templates'] = $this->elements[$this->_templatekey];\r\n \r\n //clean the element values\r\n //array_walk_recursive($this->element, array($this, '_clean'));\r\n \r\n return File::put(APP_PROJECT .DS. 'elements.php' ,serialize($this->elements)); \r\n }", "public function getPriceXml() {\n\t\t//app/code/local is in the include path\n\t\t//file get contents does not use include path\n\t\tif (! file_exists(BP.'/app/code/local/Metrof/MadeToOrder/pricingsheets/samplexml.txt') ) {\n\t\t\treturn '';\n\t\t}\n\t\treturn @file_get_contents(BP.'/app/code/local/Metrof/MadeToOrder/pricingsheets/samplexml.txt');\n\t}", "function createFileInterface($filePath)\n{\n //$sxe=simplexml_load_file( $filePath );//Default file type\n if (file_exists($filePath)) \n {\n $xml = simplexml_load_file($filePath);\n createSaveForm($filePath);\n dispFile( $xml);\n }\n else \n {\n exit('Failed to open' . $filePath);\n }\n}", "function local_file_get_contents($file) {\r\n\t\treturn file_get_contents($file);\r\n\t}", "public function testAddExternalShipmentFileByURL()\n {\n }", "public function testInvalidXml() {\r\n\t\t$xml=\"non xml string\";\r\n\t\t$actual = Response::xml($xml);\r\n\t\t\r\n\t\t$this->assertEquals($actual->success, 'false');\r\n\t}", "public function makeCall() {\n try {\n $request_params = \\Request::all();\n $file_name = str_replace('+', '0', $request_params['To']) . '.xml';\n $data = file_get_contents(\"https://s3.eu-central-1.amazonaws.com/barq-live/call_xmls/\" . $file_name);\n print($data);\n } catch (\\Illuminate\\Database\\QueryException $ex) {\n return $this->getExceptionUtils()->storeException($ex);\n } catch (\\Exception $ex) {\n return $this->getExceptionUtils()->storeException($ex);\n }\n }", "public function getStub()\n {\n return __DIR__.'/stubs/collection.stub';\n }", "private function xml()\n {\n $xml = Array2XML::createXML('rastreio', $this->data);\n return $xml->saveXML();\n }", "public function upload_xml()\n {\n $this->upload_xml_file();\n }", "public static function fromFile($filename)\n {\n $rVal = new static();\n $rVal->xml = simplexml_load_file($filename);\n\n return $rVal;\n }", "static public function loadFile($sFileName)\n\t{\n\t\t// Make sure the file exists.\n\t\tif (!file_exists($sFileName)) {\n\t\t\tthrow new RuntimeException(sprintf('%s::%s File not found: %s ', __CLASS__, __FUNCTION__, $sFileName));\n\t\t}\n\n\t\t// The file must be readable.\n\t\tif (!is_readable($sFileName)) {\n\t\t\tthrow new RuntimeException(sprintf('%s::%s File not readable: %s ', __CLASS__, __FUNCTION__, $sFileName));\n\t\t}\n\n\t\t// Enable user error handling (disables libxml error handling, which can cause fatals)\n\t\tlibxml_use_internal_errors(true);\n\n\t\t$oSimpleXMLElement = simplexml_load_file($sFileName);\n\n\t\tstatic::handleErrors();\n\n\t\t// Return SimpleXMLElement.\n\t\treturn $oSimpleXMLElement;\n\t}", "function get_xml($piecemakerId) \n\t{\n $this->check_dir();\n $file = $this->plugin_path.$this->books_dir.\"/\".$piecemakerId.\".xml\";\n\n\t\treturn $this->get_xml_php($file);\n\n\t}", "public function importPlayerXml() \n {\n return (new ImportPlayerXml($this->getPlayerDataProvider, $this->playerRepository))->import();\n }", "static function load_xml($path,$file,$cdata=true) {\r\n\t\tif($cdata) {\r\n\t\t\tif(!$xml = simplexml_load_file(\"{$path}{$file}\")) {\r\n\t\t\t\tdie(\"Could not read {$file} file\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif(!$xml = simplexml_load_file(\"{$path}{$file}\", null, LIBXML_NOCDATA)) {\r\n\t\t\t\tdie(\"Could not read {$file} file\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $xml;\r\n\t}", "public function __invoke($name)\n {\n return response()->file(storage_path('app/'.$name));\n }", "public function contents() {\n\t\treturn file_get_contents($this->path);\n\t}", "public function testAddOrderFile()\n {\n }", "public function loadxml ($file) {\n $this->xml = new domDocument();\n $rval = $this->xml->load($file);\n if (!($rval)) {\n print \"Error! could not load XML file $file.<br>\";\n }\n }", "public function xml()\n\t{\n \t$view = view('sitemap.xml')->with([\n 'pages' => $this->pages\n ]);\n return response($view, '200')->header('Content-Type', 'text/xml');\n }", "public function testXmlParser() {\n $xmlElement = new SimpleDOM('<?xml version=\"1.0\"?><test/>');\n $xml = $xmlElement->asXML();\n $this->assertNotFalse($xml);\n }", "function icedrive_response_to_array($response)\r\n {\r\n libxml_use_internal_errors(true);\r\n $xml = simplexml_load_string(str_replace(':', '', $response));\r\n $xml = json_encode($xml);\r\n $xml = json_decode($xml, true);\r\n return $xml;\r\n }", "public function test()\n {\n $path = Storage::disk('local')->put('file.txt', 'Contents');\n return response()->json((['message' => 'File put in disk', 'path' => $path]), 200);\n }", "public function store(uploadXmlRequest $request)\n {\n if (Input::hasFile('attachment'))\n {\n $destination = storage_path($this->uploadDestination);\n $file_name = time() . '.xml';\n $request->file('attachment')->move($destination, $file_name);\n\n //insert uploaded file name in my_files table\n $my_file = new Myfile();\n $my_file->name = $file_name;\n $my_file->save();\n\n //parse xml\n try {\n $xml = simplexml_load_file($destination.'/'.$file_name);\n\n foreach ($xml->employee as $row)\n {\n //insert parsed xml in to my_rows table\n $my_file->rows()->create([\n 'name' => $row->name,\n 'job' => $row->job,\n ]);\n }\n\n } catch (\\Exception $e)\n {\n\n Myfile::find($my_file->id)->delete();\n return redirect()->back()->with('error', 'corrupted file,please select xml file ');\n }\n\n //redirect back with success message\n return redirect()->back()->with('message', 'file uploded Successfully');\n\n }\n }", "protected function _getXml()\n {\n if ($this->_xml) {\n return $this->_xml;\n }\n libxml_use_internal_errors();\n $data = simplexml_load_string($this->_getBody());\n if ($data) {\n $this->_xml = $data;\n\n return $this->_xml;\n }\n\n return null;\n }", "function mysql2xml() {\r\n\t $this->xml = new XMLFile();\r\n \r\n }", "public function __construct($filename, $file_contents) {\r\n if (static::$already_executed) {\r\n \t$this->initialized = true;\r\n \treturn;\r\n }\r\n \r\n parent::__construct($filename, $file_contents);\r\n \r\n if (!class_exists(\"DOMDocument\")) {\r\n Yasca::log_message(\"DOMDocument is not available. Rats results are not available. Please install php-xml.\", E_USER_WARNING);\r\n $this->canExecute = false;\r\n }\r\n }", "private function __construct()\n {\n \t$this->storage_dir = $_SERVER[\"DOCUMENT_ROOT\"] . '/storage';\n }", "public function testPushFileToLocal()\n {\n //\n \t$path = base_path('tests/data/artist_images');\n \t$file_path = $path. '/Marter.png';\n \tprintf(\"\\n\" . $file_path);\n \t$resource = file_get_contents($file_path);\n \t$relativePath = Storage::disk('local')->put('artist/artist.png', $resource, 'public');\n \tprintf(\"\\nrelativePath = \" . $relativePath);\n }", "private function getSchemaWrapper(): string\n {\n return file_get_contents($this->resolveStubPath('/app/Http/Controllers/ApiController.stub'));\n }", "public function store()\n\t{\n\t\t$xml = Input::get('xml');\n\t\t$this->importer->storeXML($xml);\n\t\t$this->importer->import($xml);\n\t\treturn redirect()->route('admin.index');\n\t}" ]
[ "0.61623806", "0.6067801", "0.6026442", "0.5982121", "0.58738345", "0.58500093", "0.58087975", "0.57588553", "0.57413024", "0.5712053", "0.5645658", "0.5627291", "0.5556247", "0.5523321", "0.54728353", "0.5459101", "0.54353756", "0.5419203", "0.5416062", "0.5396314", "0.53814924", "0.53763634", "0.5371661", "0.52843314", "0.5283051", "0.5277097", "0.52744436", "0.5251837", "0.5238542", "0.5228203", "0.52251154", "0.52157146", "0.5198033", "0.51887125", "0.5187654", "0.51764774", "0.5151363", "0.5127353", "0.51255", "0.5125343", "0.5116332", "0.5109193", "0.50837445", "0.5081408", "0.50774324", "0.5068618", "0.50651205", "0.50646216", "0.50415945", "0.5023152", "0.50223726", "0.50168955", "0.5014857", "0.50145304", "0.5012418", "0.49930832", "0.4992338", "0.4979614", "0.49790186", "0.49782577", "0.49767703", "0.49688232", "0.49576843", "0.4947623", "0.4941129", "0.49313515", "0.4926634", "0.49166575", "0.49081525", "0.4908104", "0.4906499", "0.48857558", "0.4882675", "0.48779202", "0.48763537", "0.48694104", "0.48641428", "0.48640466", "0.48616475", "0.48605388", "0.48452166", "0.4835819", "0.48326927", "0.48311713", "0.48287824", "0.482273", "0.48139524", "0.48056242", "0.48027262", "0.4799627", "0.47991925", "0.47969943", "0.47949994", "0.47890517", "0.47806236", "0.47801626", "0.47795522", "0.4775375", "0.4769966", "0.47644123", "0.47606915" ]
0.0
-1
Returns the list of orders.
public function getList() { if (isset($this->orderList)) { return $this->orderList; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAllOrders()\n {\n $dataService = new OrderDataService();\n\n return $dataService->getAllOrders();\n }", "public function getOrders()\n {\n return $this->orders;\n }", "public function Orders()\n {\n return $this->getOrders();\n }", "public function GetAllOrders() {\n return $this->orderManager->GetAllOrders();\n }", "public function getOrders()\n {\n $result = array();\n\n if (!empty(\\XLite\\Core\\Request::getInstance()->order_ids)) {\n $orderIds = explode(',', \\XLite\\Core\\Request::getInstance()->order_ids);\n\n foreach ($orderIds as $orderId) {\n $orderId = trim($orderId);\n $order = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Order')->find(intval($orderId));\n if ($order) {\n $result[] = $order;\n }\n }\n\n } else {\n $result[] = $this->getOrder();\n }\n\n return $result;\n }", "protected function getAllOrders()\n {\n return Order::withTrashed()\n ->with(['address', 'user'])\n ->orderBy('id', 'DESC')\n ->get();\n }", "function getOrders() {\n\t\t$orders = Mage::getModel ( 'sales/order' )->getCollection ()->addAttributeToSelect ( \"*\" )->addAttributeToFilter ( 'status', array ('complete') );\n\t\t$orders_data = $this->preapreOrdersTosend ( $orders );\n\t\treturn $orders_data;\n\t}", "public function findAllOrders()\n {\n return $this->createQueryBuilder('o')\n ->orderBy('o.createdDate' , 'DESC');\n }", "private function GetOrders()\n\t{\t$orders = array();\n\t\t$where = array();\n\t\t\n\t\tif ($this->startdate)\n\t\t{\t$where[] = 'orderdate>=\"' . $this->startdate . ' 00:00:00\"';\n\t\t}\n\t\tif ($this->enddate)\n\t\t{\t$where[] = 'orderdate<=\"' . $this->enddate . ' 23:59:59\"';\n\t\t}\n\t\tif (!$this->showunpaid)\n\t\t{\t$where[] = 'NOT paiddate=\"0000-00-00 00:00:00\"';\n\t\t}\n\t\t\n\t\t$sql = 'SELECT * FROM storeorders';\n\t\tif ($wstr = implode(' AND ', $where))\n\t\t{\t$sql .= ' WHERE ' . $wstr;\n\t\t}\n\t\t$sql .= ' ORDER BY orderdate DESC';\n\t\t\n\t\tif ($result = $this->db->Query($sql))\n\t\t{\twhile ($row = $this->db->FetchArray($result))\n\t\t\t{\t$orders[$row['id']] = $row;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $orders;\n\t}", "public static function getOrders()\n\t{\n $orders = DB::query(\"SELECT orderproducts.*, products.strName, products.strDescription, products.strFeatures, products.price, products.category_id, products.status_id, orders.totalAmount, orders.date, inventoryproducts.name AS inventoryproductsname\n FROM orderproducts\n LEFT JOIN orders ON orderproducts.orderId=orders.id\n LEFT JOIN products ON orderproducts.productId=products.id\n LEFT JOIN inventoryproducts ON products.inventoryproductsId=inventoryproducts.id\");\n\n // acting as a factory\n // empty array to avoid errors when nothing was found\n\t\t$ordersArray = array();\n\t\tforeach($orders as $order)\n\t\t{\n\t\t\t// create an instance / object for this SPECIFIC \n\t\t\t$ordersArray[] = new OrdersAdmin($order); // put this object onto the array\n }\n\t\t// return the list of objects\n\t\t//return $ordersArray;\n }", "public function getOrderList()\n {\n }", "public function actionOrders(){\n\t\t$orders = $this->_getOrderModel()->getAllOrder();\n\t\t\n\t\t$viewParams = array(\n\t\t\t'orders' => $orders\n\t\t);\n\t\t\n\t\treturn $this -> responseView('DTUI_ViewPublic_EntryPoint_Orders','dtui_order_list',$viewParams);\n\t}", "public function index()\n {\n // get all orders\n $orders = Order::all();\n\n return $orders;\n }", "public function getOrderings() {}", "public function orders() {\n if ($this->orders != null)\n return $this->orders;\n $ids = Pdb::fetchAll('small_order', self::$table);\n return $this->orders = safe_array_map(function ($id) { return new Order($id); }, $ids); // no paging here\n }", "public function allOrders()\n\t{\n\t\trequire 'Database.php';\n\n\t\t$req = $db->prepare(\"SELECT lol_server,lol_summoner,lol_account,lol_password,order_id, order_queue, order_boost, order_type, order_wins, start_league, start_division, desired_league, desired_division, order_date, DATE_FORMAT(order_date, '%d/%m/%Y') AS date, order_price, order_status, order_pause FROM orders WHERE user_id = ? ORDER BY order_status\");\n\t\t$req->execute(array($_SESSION['id']));\n\n\t\treturn $req->fetchAll();\n\t}", "public function getOrders()\n {\n return $this->hasMany(Order::className(), ['customer_id' => 'id']);\n }", "public function getOrderings();", "public function getOrders()\n {\n $response = $this->orderDesk->get( \"orders\" );\n $orders = $response[ \"orders\" ];\n $values = [];\n\n if (!empty($orders)) {\n foreach ( $orders as $order ) {\n\n $value = [\n $order[\"shipping\"][\"first_name\"],\n $order[\"shipping\"][\"last_name\"],\n $order[\"email\"],\n $order[\"shipping_method\"],\n $order[\"payment_type\"],\n $order[\"order_total\"]\n ];\n \n array_push( $values, $value );\n }\n \n $this->updateGoogleSheets( $values );\n } else {\n return $response['message'];\n }\n }", "public function getOrders($filter = array()) {\n return $this->getTable()->getOrders();\n }", "public function Orders()\n {\n $this->_Orders->ClearAllOptions();\n return $this->_Orders;\n }", "public function AllOrders_get() {\n extract($_GET);\n $result = $this->feeds_model->AllOrders($per_page, $offset);\n return $this->response($result);\n }", "public function get_all_my_orders()\n {\n return $this->_request('allmyorders');\n }", "function show_orders() {\n\n\t\t$connection = new MySQLDataSource();\n $connection->connect($GLOBALS['db']['default']['hostname'],\n $GLOBALS['db']['default']['username'],\n $GLOBALS['db']['default']['password'],\n $GLOBALS['db']['default']['database']);\n\t\t$query = \"SELECT * FROM orders ORDER BY date;\";\n\t\t$connection->execute_query($query);\n\t\t$row = $connection->next();\n\t\t$i = 0;\n\n\t\tif(!$row) {\n\n\t\t\t$connection->disconnect();\n\t\t\treturn false;\n\n\t\t} else {\n\n\t\t\twhile($row) {\n\n\t\t\t\t$orders[$i] = new Order();\n\t\t\t\t$orders[$i]->setIdOrder($row->id_order);\n\t\t\t\t$orders[$i]->setDate($row->date);\n\t\t\t\t$orders[$i]->setIdCustomer($row->id_customer);\n\t\t\t\t$orders[$i]->setAmount($row->amount);\n\t\t\t\t$row = $connection->next();\n\t\t\t\t$i++;\n\n\t\t\t}\n\n\t\t\t$connection->disconnect();\n\t\t\treturn $orders;\n\n\t\t}\n\t}", "function getOrderings() ;", "public function orders($data)\n {\n $ids = $this->service->getPartnerOrdersIds($this->client->id);\n\t\tif(empty($ids)) {\n\t\t\treturn array();\n\t\t}\n $data['ids'] = $ids;\n return $this->getApiAdmin()->order_get_list($data);\n }", "public function orders()\n {\n return $this->morphMany(Checkout::orderModel(), 'customer');\n }", "public function getOrderList()\n {\n if ($this->_aOrderList === null) {\n $this->_aOrderList = array();\n\n // Load user Orderlist\n if ($oUser = $this->getUser()) {\n $iNrofCatArticles = (int) $this->getConfig()->getConfigParam('iNrofCatArticles');\n $iNrofCatArticles = $iNrofCatArticles ? $iNrofCatArticles : 1;\n $this->_iAllArtCnt = $oUser->getOrderCount();\n if ($this->_iAllArtCnt && $this->_iAllArtCnt > 0) {\n $this->_aOrderList = $oUser->getOrders($iNrofCatArticles, $this->getActPage());\n $this->_iCntPages = round($this->_iAllArtCnt / $iNrofCatArticles + 0.49);\n }\n }\n }\n\n return $this->_aOrderList;\n }", "public function getOrders() \n {\n return $this->_fields['Orders']['FieldValue'];\n }", "public function actionGetOrders(): \\yii\\web\\Response\n {\n return $this->asJson(CommerceReports::$plugin->orders->getOrders());\n }", "public function getOrders(){\n if ( is_null($this->orders) ){\n $db = $this->getTable()->getAdapter();\n $sid = $this->getCourier()->getId();\n\n //get all orders of courier service\n $sql = sprintf(\"select id from orders\n where (billCourier=0 or billCourier is NULL)\n and courierId = %d\",$sid);\n \n $rows = $db->fetchAll($sql);\n $orders = new SplObjectStorage();\n foreach($rows as $o){\n try{\n $order = new Yourdelivery_Model_Order($o['id']);\n\n if ( $order->getMode() == \"great\" && $order->getState() != 2 &&\n //check for great which do not provide pfand\n //kreiner, gela\n !in_array($order->getCourier()->getId(),array(12123,12115)) ){\n continue;\n }\n\n if ( $order->getState() < 0 ){\n continue;\n }\n\n if ( $order->getDeliverTime() > $this->until ){\n continue;\n }\n\n $orders->attach($order);\n }\n catch ( Yourdelivery_Exception_Database_Inconsistency $e ){\n\n }\n }\n $this->orders = $orders;\n }\n return $this->orders;\n }", "public function retrieveOrders() {\r\n $client = new Client(\r\n str_replace('/public', '', get_site_url()),\r\n // get_site_url(),\r\n $this->consumer_key,\r\n $this->consumer_secret,\r\n [\r\n 'wp_api' => true,\r\n 'version' => 'wc/v3',\r\n 'query_string_auth' => true,\r\n 'timeout' => PADBSYNC_CURL_TIMEOUT\r\n ]\r\n );\r\n \r\n global $wpdb;\r\n \r\n $query = \"SELECT ID FROM {$wpdb->prefix}posts WHERE profaktura_status = %d AND post_type = %s ORDER BY post_date DESC\";\r\n \r\n $sql = $wpdb->prepare($query, [0, 'shop_order']);\r\n \r\n $dbOrdersProStatZero = $wpdb->get_results($sql);\r\n \r\n $allOrders = $client->get('orders');\r\n \r\n $orders = [];\r\n \r\n if (count($allOrders) > 0 && count($dbOrdersProStatZero) > 0) {\r\n foreach ($allOrders as $o) {\r\n foreach ($dbOrdersProStatZero as $d) {\r\n if ($o->id == $d->ID) {\r\n $orders[] = $o;\r\n continue;\r\n }\r\n }\r\n } \r\n }\r\n \r\n if (count($orders) < 1) {\r\n return new WP_REST_Response(['message' => 'No orders found!']);\r\n }\r\n \r\n return new WP_REST_Response($orders);\r\n }", "public function AllOpen_Orders_get() {\n extract($_GET);\n $result = $this->feeds_model->AllOpen_Orders();\n return $this->response($result);\n }", "function admin_get_all_orders(){\n\t //$orders = $this->Order->find('all');\n\t $this->paginate = array('limit' => 10, 'order' => 'Order.od_date DESC');\n\t \n\t $this->set('orders', $this->paginate());\n\t \n\t \n\t if(!empty($this->data)){\n\t $this->Order->id = $this->data['Order']['id'];\n\t $this->Order->saveField('od_status', $this->data['Order']['od_status']);\n\t \n\t $result = $this->Order->get_ordered_items($this->data['Order']['id']);\n\t \n\t\t//enviar el correo electronico de la situacion\n\t $this->set('orderedProducts',$result);\n\t $this->set('status', $this->data['Order']['od_status']);\n\t $this->MyEmail->sendOrderStatusEmail($this->data['Order']['od_payment_email']);\n\t $this->redirect($this->referer());\n\t } \n\t}", "public function getAllOrdersInBasket() {\n\n $basketUser = $this->getBasketUserFromAuth();\n\n $basketDetailModel = new Application_Model_BasketDetail();\n\n $result = $basketDetailModel->getAllOrdersInBasket($basketUser);\n\n return $result;\n }", "public function getOrdersAll()\n {\n $data = DB::table('orders')\n ->select(\n 'orders.id',\n 'orders.room_id',\n 'orders.user_id',\n 'users.name',\n 'rooms.room_name',\n DB::raw('date_format(orders.check_in, \"%e %M %Y\") as check_in'),\n DB::raw('date_format(orders.check_out, \"%e %M %Y\") as check_out'),\n 'orders.message',\n 'orders.status')\n ->join('rooms', 'room_id', 'rooms.id')\n ->join('users', 'user_id', 'users.id')\n ->get();\n\n return response()->json($data);\n }", "public function orders()\r\n {\r\n return $this->hasMany('Syscover\\Market\\Models\\Order', 'customer_id');\r\n }", "public function getOpenOrders(): array;", "public static function allPurchaseOrders()\n {\n try {\n $result = JasminConnect::callJasmin('/purchases/orders');\n } catch (Exception $e) {\n return $e->getMessage();\n }\n\n $purchaseOrders = array();\n\n foreach(json_decode($result->getBody(), true) as $order) {\n if($order['documentStatus'] === 1) {\n $purchaseOrder = [\n 'sort_key' => substr($order['naturalKey'], '9'),\n 'id' => str_replace('.', '-', $order['naturalKey']),\n 'owner' => $order['sellerSupplierParty'],\n 'date' => substr($order['documentDate'], 0, 10),\n 'items' => []\n ];\n\n foreach ($order['documentLines'] as $product) {\n array_push($purchaseOrder['items'], [\n 'id' => $product['purchasesItem'],\n 'description' => $product['description'],\n 'quantity' => $product['quantity'],\n 'stock' => Products::getProductStock($product['purchasesItem']),\n 'zone' => Products::getProductWarehouseSection($product['purchasesItem'])\n ]);\n }\n\n array_push($purchaseOrders, $purchaseOrder);\n }\n }\n\n // Array sorting in ascending order\n usort($purchaseOrders, function ($a, $b) {return $a['sort_key'] > $b['sort_key'];});\n\n return $purchaseOrders;\n }", "public function orders()\n {\n $this->isUser();\n\n $this->data['noCabinetOrAdmin'] = true;\n\n $orderModel = new OrderModel();\n\n $orders = $orderModel->ordersByUserId(Session::get('userId'));\n\n $this->data['ordersInfo'] = $orders;\n\n if ($orders) {\n\n $productArrays = array();\n\n foreach ($orders as $order) {\n\n $productArrays[$order['id']] = json_decode($order['products'], true);\n }\n\n $this->data['idsAndAmountsByOrder'] = $productArrays;\n\n foreach ($productArrays as $product) {\n\n foreach ($product as $productId => $amount) {\n\n $productIdAndAmount[$productId] = $amount;\n }\n }\n\n $dataForIdsString = array_keys($productIdAndAmount);\n\n $idsString = implode(', ', $dataForIdsString);\n\n if ($idsString) {\n\n $productModel = new ProductModel();\n\n $productsInfo = $productModel->getProductsByIds($idsString);\n\n $this->data['productsInfo'] = $productsInfo;\n }\n\n }\n \n $this->render('orders');\n }", "public function index()\n {\n return Order::all();\n }", "public function index()\n {\n return Order::all();\n }", "function orders() {\n\t \treturn $this->hook(\"/{$this->subject_slug}/v1/orders.xml?api_key={$this->api_key}\",\"order\");\n\t}", "public function orders()\n {\n return $this->hasMany(Order::class)->orderBy('created_at', 'DESC');\n }", "public function getCustomerOrders()\n {\n $customer = auth()->user();\n $orders = Order::where('customer_id', $customer->getKey())->get();\n\n return response()->json($orders->transform(function($order) use ($customer) {\n return [\n 'order_id' => $order->order_id,\n 'total_amount' => $order->total_amount,\n 'created_on' => $order->created_on,\n 'shipped_on' => $order->shipped_on,\n 'name' => $customer->name,\n ];\n }));\n }", "function getAllOrders(){\n\t\t$conn \t= connectDB();\n\t\t$sth \t= $conn \t-> prepare('SELECT *\n\t\t\t\t\t\t\t\t\t\tFROM `order`');\n\t\t$sth \t-> execute();\n\t\treturn \t$sth;\n\t}", "public function list(){\n $list = $this->getOrders();\n return view('orders.form-order', compact('list'));\n // dd($list);\n }", "public function orders(): Orders\n {\n return new Orders($this);\n }", "public function getOrders( $id )\n {\n return $this->customerService->get( $id )->orders;\n }", "public function getOrders() : \\TheCodingMachine\\TDBM\\AlterableResultIterator\n {\n return $this->retrieveManyToOneRelationshipsStorage('orders', 'from__product_id__to__table__products__columns__id', ['orders.product_id' => $this->get('id', 'products')]);\n }", "public static function GetOrders() {\n $orders = [];\n $users_order = DB::table('users')\n ->join('orders', 'users.id', '=', 'orders.user_id')\n ->select('users.*', 'orders.*')\n ->orderBy('orders.created_at', 'desc')\n ->paginate(8);\n foreach ($users_order as $new_users_order) {\n $orders[] = (array) $new_users_order;\n }\n foreach ($orders as &$orders_data) {\n $orders_data['data'] = unserialize($orders_data['data']);\n }\n\n self::$data['orders'] = $orders;\n self::$data['users_order'] = $users_order;\n self::$data['title'] .= 'CMS';\n self::$data['page_name'] = 'Ski Expert | Orders';\n return view('cms.orders', self::$data);\n }", "public function orders()\n {\n return $this->hasMany(Order::class);\n }", "public function orders()\n {\n return $this->hasMany(Order::class);\n }", "public function orders()\n {\n return $this->hasMany(Order::class);\n }", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrdersAction()\n {\n $em = $this->getDoctrine()->getManager();\n $currencies = $em->getRepository('ApiBundle:CurrencyOrder')->findBy(array(), array('id' => 'DESC'));\n $view = $this->view($currencies);\n return $this->handleView($view);\n }", "public function orders() {\n return $this->hasMany(Models\\Order::class);\n }", "public function getOrders()\n {\n $request = new Request;\n $request->setUrl(\"order\");\n $this->populateMetadata($request);\n $response = $this->send($request);\n if ($response->code !== 200) {\n $msg = \"Error occured when obtaining order data from the API.\";\n $this->logger->error($msg, [\"request\" => $request, \"response\" => $response]);\n throw new ShoeppingResponseException($msg);\n }\n return $response->data;\n }", "public function orders() {\n return $this->hasMany(Order::class);\n }", "public function orders_get_list() {\n\t\t $sql = <<<EOD\n\t\t SELECT\n\t\t \t{$this->wpdb->prefix}topspin_orders.id,\n\t\t \t{$this->wpdb->prefix}topspin_orders.artist_id,\n\t\t \t{$this->wpdb->prefix}topspin_orders.created_at,\n\t\t \t{$this->wpdb->prefix}topspin_orders.subtotal,\n\t\t\t{$this->wpdb->prefix}topspin_currency.currency,\n\t\t\t{$this->wpdb->prefix}topspin_currency.symbol,\n\t\t \t{$this->wpdb->prefix}topspin_orders.tax,\n\t\t \t{$this->wpdb->prefix}topspin_orders.phone,\n\t\t \t{$this->wpdb->prefix}topspin_orders.shipping_method_calculator,\n\t\t \t{$this->wpdb->prefix}topspin_orders.reshipment,\n\t\t \t{$this->wpdb->prefix}topspin_orders.fan,\n\t\t \t{$this->wpdb->prefix}topspin_orders.details_url,\n\t\t \t{$this->wpdb->prefix}topspin_orders.exchange_rate,\n\t\t \t{$this->wpdb->prefix}topspin_orders.shipping_method_code,\n\t\t \t{$this->wpdb->prefix}topspin_orders.shipping_address_firstname,\n\t\t \t{$this->wpdb->prefix}topspin_orders.shipping_address_lastname,\n\t\t \t{$this->wpdb->prefix}topspin_orders.shipping_address_lastname,\n\t\t \t{$this->wpdb->prefix}topspin_orders.shipping_address_address1,\n\t\t \t{$this->wpdb->prefix}topspin_orders.shipping_address_address2,\n\t\t \t{$this->wpdb->prefix}topspin_orders.shipping_address_city,\n\t\t \t{$this->wpdb->prefix}topspin_orders.shipping_address_state,\n\t\t \t{$this->wpdb->prefix}topspin_orders.shipping_address_postal_code,\n\t\t \t{$this->wpdb->prefix}topspin_orders.shipping_address_country,\n\t\t \t{$this->wpdb->prefix}topspin_orders.shipping_address_phone\n\t\t FROM {$this->wpdb->prefix}topspin_orders\n\t\t LEFT JOIN\n\t\t \t{$this->wpdb->prefix}topspin_currency ON {$this->wpdb->prefix}topspin_orders.currency = {$this->wpdb->prefix}topspin_currency.currency\n\t\t WHERE\n\t\t \t{$this->wpdb->prefix}topspin_orders.artist_id = '%d'\n\t\t GROUP BY\n\t\t \t{$this->wpdb->prefix}topspin_orders.id\n\t\t ORDER BY\n\t\t \t{$this->wpdb->prefix}topspin_orders.created_at DESC\nEOD;\n\t\t$ordersList = $this->wpdb->get_results($this->wpdb->prepare($sql,array($this->artist_id)));\n\t\tif(count($ordersList)) {\n\t\t\tforeach($ordersList as $key=>$order) {\n\t\t\t\t$ordersList[$key]->items_list = $this->orders_get_items_list($order->id);\n\t\t\t}\n\t\t}\n\t\treturn $ordersList;\n\t}", "public function get_market_orders($args = array())\n {\n return $this->_request('marketorders', $args);\n }", "private function getShopOrderList() {\n\t\tif (array_key_exists('shopTemplate', $this->template->conf)) {\n\t\t\t$templateCode = $this->template->plugin->fileResource($this->template->conf['shopTemplate']);\n\t\t\t//$templateCode = $this->template->tplutils->getSubpart($tmpl, '###ORDERS_LIST_TEMPLATE###');\n\t\t} else {\n\t\t\t$templateCode = $this->template->plugin->getTemplate('###SHOP###');\n\t\t}\n\n\t\t$feusers_uid = $GLOBALS['TSFE']->fe_user->user['uid'];\n\t\tif (!$feusers_uid) {\n\t\t\treturn $this->template->tplutils->getSubpart($templateCode, '###MEMO_NOT_LOGGED_IN###');\n\t\t}\n\n\t\t$cond = array();\n\t\t$cond['select'] = '*';\n\t\t$cond['from'] = 'sys_products_orders';\n\t\t$cond['order'] = 'crdate';\n\n\t\t$cond['limit'] = '';\n\n\t\t// Get a custom where, or default if none\n\t\t$cond = $this->calc->custom->getOrderListCondition();\n\t\tif (!$cond) {\n\t\t\t$cond['where'] = 'feusers_uid=' . intval($feusers_uid) . ' AND NOT deleted';\n\t\t} else if (!is_array($cond)) {\n\t\t\t$cond['where'] = $cond;\n\t\t}\n\n\t\treturn $this->layoutOrderList($templateCode, $cond);\n\t}", "public function getOrderings()\n {\n return $this->orderings;\n }", "public function get_my_orders( $args = array() )\n {\n return $this->_request('myorders', $args);\n }", "protected function obtainDataOrders()\n\t{\n\t\t$this->dbQueryResult['ORDERS'] = CSaleOrder::GetList(array($this->sortBy => $this->sortOrder), $this->filter);\n\t\t$this->dbQueryResult['ORDERS']->NavStart($this->arParams[\"ORDERS_PER_PAGE\"], false);\n\n\t\tif(empty($this->dbQueryResult['ORDERS']))\n\t\t\treturn;\n\n\t\twhile ($arOrder = $this->dbQueryResult['ORDERS']->GetNext())\n\t\t{\n\t\t\t$arOBasket = array();\n\t\t\t$dbBasket = CSaleBasket::GetList(array('NAME' => 'asc'), array(\"ORDER_ID\"=>$arOrder[\"ID\"]), false, false, array('*'));\n\t\t\twhile ($arBasket = $dbBasket->Fetch())\n\t\t\t{\n\t\t\t\tif (CSaleBasketHelper::isSetItem($arBasket))\n\t\t\t\t\tcontinue;\n\n\t\t\t\t$arOBasket[] = $arBasket;\n\t\t\t}\n\n\t\t\t$this->dbResult['ORDERS'][] = array(\n\t\t\t\t\"ORDER\" => $arOrder,\n\t\t\t\t\"BASKET_ITEMS\" => $arOBasket,\n\t\t\t);\n\t\t}\n\t}", "private function getCustomerOrders()\n {\n $order = \\Magento\\Framework\\App\\ObjectManager::getInstance()->get(\\Magento\\Sales\\Model\\OrderFactory::class);\n $orderCollection = $order->create()->getCollection()->addFieldToFilter(\n 'customer_id', $this->getCustomerId()\n )->addFieldToFilter(\n 'status', \\Magento\\Sales\\Model\\Order::STATE_COMPLETE\n );\n return $orderCollection;\n }", "function get_order() {\n $query = $this->db->get('orders');\n return $query->result_array();\n }", "public function getAllOrders(){\n $transactions = $this->getAllTransactions();\n $trans_ids = array_keys($transactions);\n\n $orders = array();\n // For each transaction ID, find all associated products purchased\n foreach($trans_ids as $id){\n $item_counts = array();\n $item_names = array();\n $item_costs = array();\n\n // Dictionary with product_ids as keys, quantities as values.\n $contains = $this->getContains($id);\n // Get an array of product IDs associated with this transaction.\n $contains_product_ids = array_keys($contains);\n // For each product in this purchase, get the name, quantity and cost.\n $counter = 0;\n foreach($contains_product_ids as $pid){\n $current_product = $this->getProduct($pid);\n $item_counts[$pid] = $contains[$pid]; // load the count of the product\n $item_costs[$pid] = $current_product['unit_cost'];\n $item_names[$pid] = $current_product['name'];\n // Create an order with the current transaction information.\n //$this->errorLogger($current_order->formattedOrderString());\n $counter++;\n }\n $current_order = Order::createOrderWithArrays($item_counts, $item_names, $item_costs);\n array_push($orders, $current_order);\n }\n $this->errorLogger($counter);\n return $orders;\n }", "private function getAllOrders()\n {\n try\n {\n $this->db->openConnection();\n $connection = $this->db->getConnection();\n $statement = $connection->prepare(\"SELECT o.order_id, u.username, o.`date`\n FROM orders o\n INNER JOIN `user` u\n ON u.user_id = o.user_id\n WHERE o.active = true\"\n );\n if($statement->execute())\n {\n $results = $statement->fetchAll(PDO::FETCH_ASSOC);\n \n foreach($results as $arr)\n {\n echo \"<tr class='clickableRow orders'>\";\n echo \"<td data-order-id=\".utf8_encode($arr['order_id']).\">\".utf8_encode($arr['order_id']).\"</td>\"; \n echo \"<td>\".utf8_encode($arr['username']).\"</td>\";\n echo \"<td>\".utf8_encode($arr['date']).\"</td>\";\n echo \"</tr>\";\n }\n }\n } catch (PDOException $ex)\n {\n $this->db->showError($ex, false);\n } finally\n {\n $this->db->closeConnection();\n }\n }", "public function orders()\n {\n return $this->hasMany('App\\Order', 'customerid');\n }", "public function listOrder()\n {\n //\n $orders = Order::where('user_id','=',Auth::user()->id)->get();\n //dd($orders);\n return view('orders.list-order',compact('orders'));\n }", "public function loadAllOrders()\n\t\t{\n\t\t\t$orders = $this->mgrOrder->getAllOrders();\n\t\t\t//var_dump($orders);\n\t\t\tforeach ($orders as $order) {\n\t\t\t\t\n\t\t\t\t$element = \"<tr class=\\\"order\\\" onclick='openModalTable(\" . json_encode($order, JSON_HEX_APOS, JSON_HEX_QUOT) . \")'>\";\n\t\t\t\t$element .= \"<td id=\\\"id-order-\" . $order->getId() . \"\\\">\" . $order->getId() . \"</td>\";\n\t\t\t\t$element .= \"<td id=\\\"client-name-\" . $order->getId() . \"\\\">\" . $order->getClient()->getName() . \"</td>\";\n\t\t\t\t$element .= \"<td id=\\\"address-\" . $order->getId() . \"\\\">\" . $order->getClient()->getAddress() . \"</td>\";\n\t\t\t\t$element .= \"<td id=\\\"city-\" . $order->getId() . \"\\\">\" . $order->getClient()->getCity() . \"</td>\";\n\t\t\t\t$element .= \"<td id=\\\"province-\" . $order->getId() . \"\\\">\" . $order->getClient()->getProvince() . \"</td>\";\n\t\t\t\t$element .= \"<td id=\\\"postal_code-\" . $order->getId() . \"\\\">\" . $order->getClient()->getPostalCode() . \"</td>\";\n\t\t\t\t$element .= \"<td id=\\\"state-name-\" . $order->getId() . \"\\\">\" . $order->getState() . \"</td>\";\n\n\t\t\t\t$element .= \"</tr>\";\n\t\t\t\t\n\t\t\t\techo $element;\n\t\t\t}\n\t\t}", "public function AllClosed_Orders_get() {\n extract($_GET);\n $result = $this->feeds_model->AllClosed_Orders();\n return $this->response($result);\n }", "function getAllOrders() {\n\techo \"Getting All Order </br>\";\n\t$response = getRequest('/api/order');\n\tprintInfo($response);\n}", "private function getAllOrders() {\n // if database connection opened\n if ($this->databaseConnection()) {\n\n // load pages for the user\n $sql = $this->db_connection->prepare(\"SELECT * FROM `orders`\");\n $sql->execute();\n\n // fetch all from the widget\n $sql = $sql->fetchAll();\n\n // $this->debug($sql);\n\n if ( isset($sql) ) {\n return $sql;\n } else {\n return false;\n }\n\n } else {\n\n return false;\n\n }\n }", "protected function list_orders() {\r\n // Get response\r\n $dt = new DataTableResponse( $this->user );\r\n\r\n $website_order = new WebsiteOrder();\r\n\r\n // Set Order by\r\n $dt->order_by( '`website_order_id`', '`total_cost`', '`status`', '`date_created`' );\r\n $dt->add_where( ' AND `website_id` = ' . (int) $this->user->account->id );\r\n $dt->search( array( '`website_order_id`' => false ) );\r\n\r\n // Get items\r\n $website_orders = $website_order->list_all( $dt->get_variables() );\r\n $dt->set_row_count( $website_order->count_all( $dt->get_count_variables() ) );\r\n\r\n // Set initial data\r\n $data = false;\r\n\r\n /**\r\n * @var WebsiteOrder $order\r\n */\r\n if ( is_array( $website_orders ) )\r\n foreach ( $website_orders as $order ) {\r\n switch ( $order->status ) {\r\n case WebsiteOrder::STATUS_DECLINED:\r\n $status = 'Declined';\r\n break;\r\n\r\n case WebsiteOrder::STATUS_PURCHASED:\r\n $status = 'Purchased';\r\n break;\r\n\r\n case WebsiteOrder::STATUS_PENDING:\r\n $status = 'Pending';\r\n break;\r\n\r\n case WebsiteOrder::STATUS_DELIVERED:\r\n $status = 'Delivered';\r\n break;\r\n\r\n case WebsiteOrder::STATUS_RECEIVED:\r\n $status = 'Received';\r\n break;\r\n\r\n case WebsiteOrder::STATUS_SHIPPED:\r\n $status = 'Shipped';\r\n break;\r\n\r\n default:\r\n $status = 'Error';\r\n break;\r\n }\r\n\r\n $date = new DateTime( $order->date_created );\r\n\r\n $link_text = '';\r\n if ( $order->is_ashley_express() ) {\r\n $link_text = \" - Express Delivery\";\r\n }\r\n\r\n $data[] = array(\r\n '<a href=\"' . url::add_query_arg( 'woid', $order->id, '/shopping-cart/orders/view/' ) . '\" title=\"' . _('View') . '\">' . $order->id . '</a>' . $link_text\r\n , $order->name\r\n , '$' . number_format( $order->total_cost, 2 )\r\n , $status\r\n , $date->format('F jS, Y')\r\n );\r\n }\r\n\r\n // Send response\r\n $dt->set_data( $data );\r\n\r\n return $dt;\r\n }", "public function getOrder(): array;", "public function allOrders(){\n $data = Orders::paginate(10);\n $selected_status = \"\";\n return view('dashboard.orders', ['orders' => $data, 'list_status' => $this->order->list_status, 'selected_status' => $selected_status]);\n }", "public function allOrder()\n {\n $orders = Order::where('id','!=',0)\n ->orderBy('id','desc')\n ->get()\n ->groupBy(function ($data){\n return $data->created_at->format('M-Y');\n });\n\n return view('user.admin.order.all-order',[\n 'orders' => $orders\n ]);\n }", "public function getOrderItems()\n {\n return $this->hasMany(OrderItem::className(), ['order_id' => 'id'])->inverseOf('order');\n }", "public function getOrders()\n {\n return Controllers\\OrdersController::getInstance();\n }", "public function getAllUserOrders() {\n $stmt = $this->conn->prepare(\"SELECT * FROM `order` \");\n // $stmt->bind_param(\"i\", $id_user);\n $stmt->execute();\n $orders = $stmt->get_result();\n $stmt->close();\n return $orders;\n }", "function fetchAllOrders()\n\t{\n\t\t$sql = \"SELECT o.booking_id,o.journey_id,o.booking_time,o.email, o.amount, r.route_name, o.order_status, j.departure_date, j.departure_time, j.vehicle_reg,j.route_id, j.driver_id, j.conductor_id, b.color,b.model,b.coach,b.no_of_seats,r.start_point, r.end_point, r.distance,r.duration, j.driver_name,j.conductor_name,b.imgurl,b.normal_seats,b.vip_seats FROM booking as o, journey as j, route as r, bus as b WHERE j.journey_id = o.journey_id AND j.route_id = r.route_id AND j.vehicle_reg = b.registration AND j.route_id = r.route_id\";\n\t\t$result = $this->conn->query($sql);\n\t\tif ($result->num_rows > 0) {\n\t\t\twhile ($row = $result->fetch_assoc()) {\n\t\t\t\t$orders[] = new Order($row['booking_id'], $row['journey_id'], $row['booking_time'], $row['email'],\n\t\t\t\t\t$row['amount'], $row['route_name'], $row['order_status'],$row['departure_date'],\n\t\t\t\t\t$row['departure_time'],$row['vehicle_reg'],$row['route_id'],$row['driver_id'],$row['conductor_id'],\n\t\t\t\t\t$row['color'],$row['model'],$row['coach'],$row['no_of_seats'],$row['start_point'],$row['end_point'],\n\t\t\t\t\t$row['distance'],$row['duration'],$row['driver_name'],$row['conductor_name'],$row['imgurl'],$row['normal_seats'],$row['vip_seats']\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn $orders;\n\t\t} else {\n\t\t\treturn [];\n\t\t}\n\t}", "public function vendor_orders()\n {\n $query = $this->db->where('vendor_hash', $this->current_user->user_hash)\n ->where('progress >', '0')\n ->order_by('time desc')\n ->get('orders');\n\n if ($query->num_rows() > 0) {\n $row = $query->result_array();\n return $this->build_array($row);\n } else {\n return array();\n }\n }", "public function all() : Collection\n {\n return Order::all();\n }", "public function getOrderItems()\n {\n return $this->hasMany(OrderItems::class, ['oi_order_id' => 'id']);\n }", "public function orders() {\n return $this->belongsToMany(Order::class);\n }", "public function displayOrder()\n {\n $orderList = array();\n\n try {\n $stmt = $this->db->prepare(\"SELECT * \n FROM OrderTable\n WHERE OrderStatus = 0\");\n $stmt->execute();\n\n $row[] = $stmt->fetchAll(PDO::FETCH_ASSOC);\n if ($stmt->rowCount() > 0) {\n foreach ($row as $order) {\n array_push($orderList, $order);\n\n }\n return $orderList;\n\n }\n\n } catch (PDOException $e) {\n echo $e->getMessage();\n }\n }", "public function getAvailableOrders()\n {\n return [\n 'name-asc' => 'from-a-z',\n 'name-desc' => 'from-z-a',\n 'created_at-desc' => 'newest-first',\n 'created_at-asc' => 'oldest-first',\n 'price-asc' => 'cheapest-first',\n 'price-desc' => 'expensive-first'\n ];\n }", "public function getUserOrders()\n {\n $orders = $this->orderRepository->getUserOrders();\n return api_response_paginate(\n 200,\n 'success',\n (new OrderCollection($orders))\n ->paginate(Request::get('per-page') ?? 10));\n }", "public function the_endpoint_should_return_all_orders()\n {\n $card = CreditCard::factory()->create();\n $orders = Order::factory()->create();\n \n $response = $this->get('/api/orders');\n\n dd($response->json());\n $response->assertStatus(200);\n $response->assertJsonStructure([\n 'orders' => [\n '*' => [\n 'id',\n 'credit_card_id',\n 'user_id',\n \n ]\n ]\n ]);\n $this->assertDatabaseCount('orders', 1);\n }", "public function orders()\n {\n return $this->hasMany('App\\Models\\Order');\n }", "public function getAllOwnOrders() {\n\n $query = $this->db->prepare(\"SELECT * FROM `orders` WHERE `order_partner_id` = 28\");\n\n try {\n\n $query->execute();\n\n $result = $query->fetchAll();\n return $result;\n\n } catch (PDOException $e) {\n die($e->getMessage());\n }\n }", "public function orders()\n {\n return $this->belongsToMany(Order::class);\n }", "public function orders()\n {\n return $this->belongsToMany(Order::class);\n }" ]
[ "0.8403535", "0.837304", "0.8264767", "0.82152873", "0.81597173", "0.7992888", "0.799288", "0.7940962", "0.7880177", "0.78399986", "0.78278834", "0.78264725", "0.78177106", "0.7812809", "0.78027225", "0.7792554", "0.7762744", "0.7726025", "0.76651174", "0.7641245", "0.7593855", "0.75908923", "0.7586832", "0.7540502", "0.75183153", "0.7483935", "0.74233145", "0.73885804", "0.7356087", "0.7343987", "0.7328445", "0.7303434", "0.7296334", "0.7273253", "0.72725487", "0.7264081", "0.72619104", "0.72579086", "0.72572803", "0.72556776", "0.72430456", "0.72430456", "0.7229519", "0.72081923", "0.7196818", "0.71845394", "0.71789795", "0.71765125", "0.7173038", "0.7172024", "0.7168756", "0.71606416", "0.71606416", "0.71606416", "0.7160404", "0.7160404", "0.7160404", "0.7160404", "0.7160404", "0.7160404", "0.71398455", "0.7120345", "0.7110794", "0.7098495", "0.7079358", "0.70761764", "0.7062219", "0.7058148", "0.7050363", "0.702477", "0.7008321", "0.7006467", "0.69840497", "0.6963855", "0.6952614", "0.6944853", "0.6933977", "0.6932452", "0.6931608", "0.6929923", "0.6915521", "0.69095325", "0.69092625", "0.68927366", "0.6888373", "0.6873912", "0.68731326", "0.68705183", "0.6869301", "0.6867458", "0.6857309", "0.68537134", "0.68403953", "0.6837903", "0.6824668", "0.6822626", "0.68102586", "0.68060577", "0.68035793", "0.68035793" ]
0.680407
98
Sets the time frame for the orders fetched. (Optional) Sets the time frame for the orders fetched. If no times are specified, times default to the current time.
public function setLimits($mode, $lower = null, $upper = null) { try { if ($upper) { $before = $this->genTime($upper); } else { $before = $this->genTime('- 2 min'); } if ($lower) { $after = $this->genTime($lower); } else { $after = $this->genTime('- 2 min'); } if ($after > $before) { $after = $this->genTime($upper . ' - 150 sec'); } if ($mode == 'Created') { $this->options['CreatedAfter'] = $after; if ($before) { $this->options['CreatedBefore'] = $before; } unset($this->options['LastUpdatedAfter']); unset($this->options['LastUpdatedBefore']); } else if ($mode == 'Modified') { $this->options['LastUpdatedAfter'] = $after; if ($before) { $this->options['LastUpdatedBefore'] = $before; } unset($this->options['CreatedAfter']); unset($this->options['CreatedBefore']); } else { $this->log('warning', 'First parameter should be either "Created" or "Modified".'); return false; } } catch (\Exception $e) { $this->log('error', 'Error: ' . $e->getMessage() . $this->options['LastUpdatedAfter'] . $this->options['LastUpdatedBefore'] . $e->getFile() . $e->getLine()); return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSetTime() {\n $time = new \\DateTime();\n $this->order->setTime($time);\n $this->assertEquals($time, $this->order->getTime());\n }", "public function setTime($time);", "public static function addTimes()\n\t{\n\t\tforeach (TimeKeeper::getAll() as $key => $values) {\n\t\t\tself::$response[\"time\"][$key][\"seconds\"] = $values[\"seconds\"];\n\t\t\tself::$response[\"time\"][$key][\"times\"] = $values[\"times\"];\n\t\t}\n\t}", "public function setSyncTime(): void\n {\n }", "public function set_times($timestamp_type=false)\n\t{\n\t\tif ($timestamp_type !== false) $this->timestamp_type = $timestamp_type;\n\n\t\t// set current time\n\t\tswitch($this->timestamp_type)\n\t\t{\n\t\t\tcase 'object':\n\t\t\t\t$this->now = new egw_time('now');\n\t\t\t\tbreak;\n\t\t\tcase 'string':\n\t\t\t\t$this->now = egw_time::to('now',egw_time::DATABASE);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->now = egw_time::to('now','ts');\n\t\t}\n\t\t$this->tz_offset_s = egw_time::tz_offset_s();\n\t}", "public function setRecurringOrders(array $orders);", "public function setTime($time=0){\n\t\t\t$this->_time = $time;\n\t\t}", "public static function changeCurrentTime($currentTime = 'now')\n {\n self::$_currentTime = $currentTime;\n }", "public function setCacheTime($time)\n\t{\n\t\t$this->iCacheTime = $time;\n\t}", "public function setOrders($orders)\n {\n $this->orders = (int)$orders;\n\n return $this;\n }", "function setTZ($tz)\r\n {\r\n $this->tz = $tz;\r\n }", "protected function setCacheTime( $cacheTime ): void\n {\n $this->_cacheTime = $cacheTime;\n }", "public function __construct($timeslots)\n {\n $this->timeslots = $timeslots;\n }", "public function setTimezone($timezone)\n {\n $this->timezone = $timezone;\n\n // We need to re-build the SOAP headers.\n $this->headers = array();\n }", "public function set_location_trading_hour_days(){}", "public function setKeyTimes($keyTimes) {\n\t\t$this->attributes['keyTimes'] = $keyTimes;\n\t\t$this->keyTimes = $keyTimes;\n\t\treturn $this;\n\t}", "public function setServerTime();", "public function setTiming(array $timing)\n {\n $this->timing = $timing;\n return $this;\n }", "public function setOrderBy($orders)\n {\n foreach ($orders as $key => $value) {\n $this->queryBuilder->addOrderBy($key, $value);\n }\n return $this;\n }", "public function setTimeStamp()\n\t{\n\t\t$this->_current_timestamp = time();\n\t}", "public function setTime(?DateTime $value): void {\n $this->getBackingStore()->set('time', $value);\n }", "public function setDueDateTime($timestamp);", "public function OrderList(Request $request){\n // 'user_id' => 'required',\n // ]);\n // if($validation->fails()) {\n // return array('status'=>500,'message'=>'Validation Alert','image_base_prefix_url'=>'http://technodeviser.com/grocerydelivery/','data'=>$validation->getMessageBag());\n // }\n $user = auth('api')->user();\n $user_id = $user->user_id;\n $orders = DB::connection('mysql_sec')->table('orders')\n ->where('user_id',$user_id)->orderBy('order_id', 'DESC')->get();\n foreach($orders as $order){\n $time_id =$order->time_slot;\n $time = DB::connection('mysql_sec')->table('store_time_slot')\n ->where(['id'=>$time_id])->first();\n if($time){\n $order->time_slot = $time->opening_time.' - '.$time->closing_time;\n }\n }\n return apiResponse(true,202,$orders);\n }", "function set_time_zone()\n {\n $this->set_date_to_now();\n $offset = $GLOBALS['time_diff'] - $GLOBALS['server_time_offset'];\n $this->timestamp+=($offset*3600);\n }", "public static function setSendTime ($str) {\n self::$dateTime = $str;\n }", "private static function setTimeTracker()\n {\n if (!is_object($GLOBALS['TT'])) {\n $GLOBALS['TT'] = Tx_Smarty_Service_Compatibility::makeInstance('t3lib_TimeTrackNull');\n }\n }", "public function setDefaultCacheTime($minutes)\n {\n $this->default = $minutes;\n }", "private function setRoundTripTime(string $rtt): void\n {\n $this->round_trip_time = $this->parseRoundTripTime($rtt);\n }", "public function setUseTime($use_time) \n \t{\n \t\t$this->use_time = $use_time;\n \t}", "function set_date_to_now()\n {\n $this->timestamp=time();\n }", "function set_values() {\n\t\tparent::set_values();\n\t\t$currency = new currency($this->_currency_id);\n\t\t\n\t\t$this->order_id->value = $this->_order_id;\n\t\t$this->timestamp->value = date(\"j M Y\");\n\t\t$this->total_amount->value = $currency->format_money($this->_total_amount);\n\t}", "private function setTimeZone() {\n $companySettings = Store::get('company_settings');\n $timezone = $companySettings->time_zone;\n if ($timezone) {\n\n $dt = new \\DateTime('now', new \\DateTimeZone($timezone));\n $abbreviation = $dt->format('T');\n\n config(['app.timezone' => $timezone]);\n view()->share('time_zone', [\n 'name' => $timezone,\n 'abbr' => $abbreviation\n ]);\n\n $offsetToFormat = new \\DateTime('now', new \\DateTimeZone($timezone));\n $timezoneOffset = $offsetToFormat->format('P');\n\n DB::statement(\"SET time_zone = '\".$timezoneOffset.\"'\");\n }\n }", "public function getOrders(){\n if ( is_null($this->orders) ){\n $db = $this->getTable()->getAdapter();\n $sid = $this->getCourier()->getId();\n\n //get all orders of courier service\n $sql = sprintf(\"select id from orders\n where (billCourier=0 or billCourier is NULL)\n and courierId = %d\",$sid);\n \n $rows = $db->fetchAll($sql);\n $orders = new SplObjectStorage();\n foreach($rows as $o){\n try{\n $order = new Yourdelivery_Model_Order($o['id']);\n\n if ( $order->getMode() == \"great\" && $order->getState() != 2 &&\n //check for great which do not provide pfand\n //kreiner, gela\n !in_array($order->getCourier()->getId(),array(12123,12115)) ){\n continue;\n }\n\n if ( $order->getState() < 0 ){\n continue;\n }\n\n if ( $order->getDeliverTime() > $this->until ){\n continue;\n }\n\n $orders->attach($order);\n }\n catch ( Yourdelivery_Exception_Database_Inconsistency $e ){\n\n }\n }\n $this->orders = $orders;\n }\n return $this->orders;\n }", "public function setBookCheckoutTimeAttribute($value)\n {\n $this->attributes['book_checkout_time'] = Carbon::parse($value)->format('H:i:s');\n }", "public function setTime($timestamp)\r\n {\r\n $this->data['year'] = (int) date(\"Y\", $timestamp);\r\n $this->data['mon'] = (int) date(\"m\", $timestamp);\r\n $this->data['day'] = (int) date(\"d\", $timestamp);\r\n $this->data['hour'] = (int) date(\"G\", $timestamp);\r\n $this->data['min'] = (int) date(\"i\", $timestamp);\r\n }", "public function setTimeToCook($_timeToCook)\n {\n \t$_timeToCook = date('H:i', strtotime($_timeToCook));\n $this->_timeToCook = $_timeToCook;\n }", "public function setSendingTime($time ){\n $this->sendingTime = $time;\n }", "function set_time($newhour, $newminute, $newday, $newmonth, $newyear)\n {\n //sets the Date object given the hour, minute, day, month, and year\n $newtimestamp=mktime( $newhour, $newminute, 0, $newmonth, $newday, $newyear);\n $this->timestamp=$newtimestamp;\n }", "public function setTimeOverride( $time ) {\n\t\t$this->time = $time;\n\t}", "public function setStartTime($startTime) {\r\n\t\t$this->startTime = $startTime;\r\n\t}", "function SetOrdering()\n {\n GLOBAL $_REQUEST;\n\n $sfid = 'sf' . $this->GetID();\n $srid = 'sr' . $this->GetID();\n $this->sf = $_REQUEST[$sfid];\n $this->sr = $_REQUEST[$srid];\n\n if ($this->sf != '') {\n $this->selectSQL->orders[] = $this->sf . \" \" . $this->sr;\n\n if ($this->sr == \"desc\") {\n $this->sr = \"asc\";\n $this->az = \"za\";\n } else {\n $this->sr = \"desc\"; //!< this is for the future \n $this->az = \"az\";\n } \n } else {\n $this->az = '';\n $this->sr = '';\n } \n }", "public function setTimestamp($timestamp);", "public function setDate()\n\t{\n\t\tif($this->isNewRecord)\n\t\t\t$this->create_time=$this->update_time=time();\n\t\telse\n\t\t\t$this->update_time=time();\n\t}", "public function setDate()\n\t{\n\t\tif($this->isNewRecord)\n\t\t\t$this->create_time=$this->update_time=time();\n\t\telse\n\t\t\t$this->update_time=time();\n\t}", "private function _setTimeZone()\n {\n /** @var WebApplication|ConsoleApplication $this */\n $timezone = $this->getConfig()->getGeneral()->timezone;\n\n if (!$timezone) {\n $timezone = $this->getProjectConfig()->get('system.timeZone');\n }\n\n if ($timezone) {\n $this->setTimeZone($timezone);\n }\n }", "public function setOrderDate($date)\n {\n $this->order_date = $date;\n }", "private function set_details() {\n if ($this->type != 'delivery') {\n $meetup = $this->retrieve([\n 'where' => [\n 'id' => $this->type,\n ],\n 'table' => 'meetups'\n ]);\n \n $this->time = \"{$meetup[0]['day']} {$meetup[0]['start_time']} - {$meetup[0]['end_time']}\";\n\n $this->update([\n 'time' => $this->time,\n ]);\n }\n }", "function setOrder($order);", "public function setOrders($value) \n {\n $this->_fields['Orders']['FieldValue'] = $value;\n return;\n }", "function setOrder($order){\n\t\t$this->order=$order;\n\t}", "public function setBuyTimes($value)\n {\n return $this->set(self::_BUY_TIMES, $value);\n }", "public function setBuyTimes($value)\n {\n return $this->set(self::_BUY_TIMES, $value);\n }", "function setTimestamp($timestamp) {\r\r\n\t\t$this->timestamp = $timestamp;\r\r\n\t}", "public function setDisplayTime($displayTime);", "public function setDisplayTime($displayTime);", "public function setTimeZone($time_zone)\n\t{\n\t\tdate_default_timezone_set($time_zone);\n\t\n\t}", "public function setTimezone($timezone) {\n $this->timezone = $timezone;\n }", "public function setOrder($ids);", "public function setTimeSlot($timeSlot) {\r\n\t\t$this->timeSlot = $timeSlot;\r\n\t}", "private function SetOrderData()\n\t\t{\n\t\t\t// doesn't factor in cookies stored by Interspire Shopping Cart, so we have to pass back the\n\t\t\t// order token manually from those payment providers. We do this by taking the\n\t\t\t// cart ID passed back from the provider which stores the order's unique token.\n\t\t\tif(isset($_COOKIE['SHOP_ORDER_TOKEN'])) {\n\t\t\t\t$this->orderToken = $_COOKIE['SHOP_ORDER_TOKEN'];\n\t\t\t}\n\t\t\telse if(isset($_REQUEST['provider'])) {\n\t\t\t\tGetModuleById('checkout', $this->paymentProvider, $_REQUEST['provider']);\n\n\t\t\t\tif(in_array(\"GetOrderToken\", get_class_methods($this->paymentProvider))) {\n\t\t\t\t\t$this->orderToken = $this->paymentProvider->GetOrderToken();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tob_end_clean();\n\t\t\t\t\theader(sprintf(\"Location:%s\", $GLOBALS['ShopPath']));\n\t\t\t\t\tdie();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Load the pending orders from the database\n\t\t\t$this->pendingData = LoadPendingOrdersByToken($this->orderToken, true);\n\t\t\tif(!$this->orderToken || $this->pendingData === false) {\n\t\t\t\t$this->BadOrder();\n\t\t\t\texit;\n\t\t\t}\n\n\t\t\tif($this->paymentProvider === null) {\n\t\t\t\tGetModuleById('checkout', $this->paymentProvider, $this->pendingData['paymentmodule']);\n\t\t\t}\n\n\t\t\tif($this->paymentProvider) {\n\t\t\t\t$this->paymentProvider->SetOrderData($this->pendingData);\n\t\t\t}\n\t\t}", "public static function order_set_expiry($id, $time) {\n\t\t\treturn self::set_('order', $id, array('expiry' => $time));\n\t\t}", "public static function setOptions(array $options)\n {\n foreach ($options as $key => $value) {\n Zend_TimeSync::$options[$key] = $value;\n }\n }", "public static function resetCurrentTime()\n {\n \tself::$_currentTime = 'now';\n }", "public function setOrder($order);", "public function set_all_orders_to_closed() {\n $segments = $this->uri->segment_array();\n $table_id = $segments[3];\n\n // deleting all unnecessary segments (url parts and $table_id)\n unset($segments[0], $segments[1], $segments[2], $segments[3]);\n\n foreach ($segments as $id_order) {\n $this->create_order_record($id_order);\n $this->m_orders_overview->close_order($id_order);\n }\n\n $this->m_orders_overview->close_all_orders($table_id);\n $this->show_order();\n }", "public function editHours($times,$brID)\n {\n $values = array();\n //Update The Working Hours By The Values From Array Times\n foreach($times as $day)\n {\n $sqlUpdate=\"UPDATE work_hours SET startA= '\".$day[0].\"',endA= '\".$day[1].\"',startB='\".$day[2].\"',endB='\".$day[3].\"',dayOFF='\".$day[5].\"'\n WHERE branch_id ='\".$brID.\"' AND day ='\".$day[4].\"'\";\n $this->execute($sqlUpdate,$values);\n }\n }", "public function setDates($dates);", "function setForward() {\r\n\t\t\r\n\t\tswitch($this->freq) {\r\n\t\t\tcase \"one\":\r\n\t\t\t\t$timeAfter = \"0 minutes\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"week\":\r\n\t\t\t\t$timeAfter = \"1 week\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"month\":\r\n\t\t\t\t$timeAfter = \"1 month\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"year\":\r\n\t\t\t\t$timeAfter = \"1 year\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tdie(\"Error with setting Forward.\");\r\n\t\t}\r\n\t\t\r\n\t\t//Have to make an event date and remind object, to be able to use date_add() to make event available for next time\r\n\t\t$temp_event_date_obj = new DateTime($this->event_date_time);\r\n\t\t$temp_remind_date_obj = new DateTime($this->reminder_date_time);\r\n\t\t\r\n\t\t//adding specified amount of weeks, months, etc. for event date and reminder date\r\n\t\t$temp_event_date_obj = date_add($temp_event_date_obj, date_interval_create_from_date_string($timeAfter));\r\n\t\t$temp_remind_date_obj = date_add($temp_remind_date_obj, date_interval_create_from_date_string($timeAfter));\r\n\t\t\r\n\t\t//assign a formatted string of new dates\r\n\t\t$this->event_date_time = date_format($temp_event_date_obj, \"Y-m-d H:i:s\");\r\n\t\t$this->reminder_date_time = date_format($temp_remind_date_obj, \"Y-m-d H:i:s\");\r\n\t\t\r\n\t\t//unset both temporary objects to free memory\r\n\t\tunset($temp_event_date_obj);\r\n\t\tunset($temp_remind_date_obj);\r\n\t}", "public function setStartTime($starttime){\n $this->_starttime = $starttime;\n }", "public function setTimestamp( $timestamp ) {\n\n $this->timestamp = $this->offsetTimestampForWordPressTimezone(\n $timestamp );\n }", "public function setOrderBy(array $orderBy = [])\n {\n if (!empty($orderBy)) {\n $this->items[self::ORDER_BY] = $orderBy;\n } else {\n unset($this->items[self::ORDER_BY]);\n }\n }", "public function setByDateTime(\\DateTime $dateTime) {}", "public function setOrderings(array $orderings)\n {\n $this->orderings = $orderings;\n return $this;\n }", "public function setOrder(?string $order): void\n {\n $this->order = $order;\n }", "public function setOrder(?string $order): void\n {\n $this->order = $order;\n }", "function get_recent_orders(){\n\t $orders = $this->Order->get_recent_orders();\n\t if($this->params['requested']){\n\t return $orders;\n\t }else{\n\t $this->set('orders', $orders);\n\t }\n \n\t}", "public function setStartTime($newStartTime) {\r\n\t\r\n\t\t$this->localStartTime = $newStartTime;\r\n\r\n\t}", "public function setOrder($params)\n\t{\n\t\treturn $this->request('set-order', $params);\n\t}", "function set_event_date_time() {\r\n\t\t\t$dateobj = date_create($this->date . \" \" . $this->time);\r\n\t\t\t\r\n\t\t\t//we can format the date object string to exactly what we want. Leading zeros, etc.\r\n\t\t\t$this->event_date_time = date_format($dateobj, \"Y-m-d H:i:s\");\r\n\t\t}", "function setCurrentTimeLog($TimeObject)\n\t{\n\t\t$this->Current_TimeLog = $TimeObject;\n\t}", "public function setHeaders() : void {\n $this->setCacheHeaders();\n }", "public function resetorder()\n {\n $oOrder = oxNew(\"oxorder\");\n if ($oOrder->load($this->getEditObjectId())) {\n $oOrder->oxorder__oxsenddate = new oxField(\"0000-00-00 00:00:00\");\n $oOrder->save();\n }\n }", "public function resetTimeLimits()\n {\n unset($this->options['RequestedFromDate']);\n unset($this->options['RequestedToDate']);\n }", "public function setTime($time)\n {\n $this->time = $time;\n\n return $this;\n }", "public function setTime($time)\n {\n $this->time = $time;\n\n return $this;\n }", "public function setTime($time)\n {\n $this->time = $time;\n\n return $this;\n }", "public function setTime($time)\n {\n $this->time = $time;\n\n return $this;\n }", "public function setTimeLimits($s = null, $e = null)\n {\n if ($s && is_string($s)) {\n $times = $this->genTime($s);\n $this->options['RequestedFromDate'] = $times;\n }\n if ($e && is_string($e)) {\n $timee = $this->genTime($e);\n $this->options['RequestedToDate'] = $timee;\n }\n if (isset($this->options['RequestedFromDate']) &&\n isset($this->options['RequestedToDate']) &&\n $this->options['RequestedFromDate'] > $this->options['RequestedToDate']\n ) {\n $this->setTimeLimits($this->options['RequestedToDate'].' - 1 second');\n }\n }", "public function setStartTime(?Time $value): void {\n $this->getBackingStore()->set('startTime', $value);\n }", "public function setTime($value)\n {\n if (!array_key_exists('time', $this->fieldsModified)) {\n $this->fieldsModified['time'] = $this->data['fields']['time'];\n } elseif ($value === $this->fieldsModified['time']) {\n unset($this->fieldsModified['time']);\n }\n\n $this->data['fields']['time'] = $value;\n }", "protected function initializeTimeTracker() {}", "public function setRates($rates)\n {\n $this->_rates = $rates;\n }", "public function setTimeOn($created)\n {\n $this->timeOn = (string)$created;\n }", "public function __construct()\n {\n $this->dateTime = new Time('now', 'Asia/Jakarta', 'id_ID');\n }", "public static function set_login_times()\n {\n $sessiontime = self::get_miliseconds_now();\n\n $timer = &self::$timer;\n $timer->__set('session_start', $sessiontime);\n $timer->__set('session_checkpoint', $sessiontime);\n }", "public function setTimezone($_timezone);", "public function setQueuedAtAttribute($value)\n {\n $value = ($value) ? : Carbon::now('Europe/London');\n $this->attributes['queued_at'] = $value;\n }", "public function setTimezone()\n {\n if (!ini_get('date.timezone')) {\n date_default_timezone_set('UTC');\n }\n }", "public function setTime($hours, $minutes, $seconds = 0)\r\n\t{\r\n\t\t// Perform the numeric check\r\n\t\tif (!is_numeric($hours) || !is_numeric($minutes) || !is_numeric($seconds))\r\n\t\t{\r\n\t\t\tthrow new Exception('setTime() expects two or three numbers separated by commas in the order: hours, minutes, seconds');\r\n\t\t}\r\n\t\t\r\n\t\t// Perform the out of range check\r\n\t\t$outOfRange = false;\r\n\t\t\r\n\t\tif ($hours < 0 || $hours > 23)\r\n\t\t{\r\n\t\t\t$outOfRange = true;\r\n\t\t}\r\n\t\tif ($minutes < 0 || $minutes > 59)\r\n\t\t{\r\n\t\t\t$outOfRange = true;\r\n\t\t}\r\n\t\tif ($seconds < 0 || $seconds > 59)\r\n\t\t{\r\n\t\t\t$outOfRange = true;\r\n\t\t}\r\n\t\t\r\n\t\tif ($outOfRange)\r\n\t\t{\r\n\t\t\tthrow new Exception('Invalid time');\r\n\t\t}\r\n\t\t\r\n\t\t// Set the time\r\n\t\tparent::setTime($hours, $minutes, $seconds);\r\n\t}", "public function setTimezone($timezone)\n {\n $this->timezone = $timezone;\n }", "public function setTimeAttribute($time)\n {\n $this->attributes['broadcasted_at'] = Carbon::make($time);\n }" ]
[ "0.5602996", "0.5018955", "0.5002487", "0.48797274", "0.48721212", "0.47848022", "0.4764151", "0.4725844", "0.4684448", "0.46416906", "0.4610569", "0.4609728", "0.46049935", "0.4603836", "0.4583867", "0.45569155", "0.4544521", "0.4533037", "0.45186272", "0.44973543", "0.4483234", "0.44823036", "0.4476329", "0.4464463", "0.4463629", "0.44337583", "0.44174555", "0.44078305", "0.44007072", "0.4393112", "0.43813044", "0.43678173", "0.4367569", "0.43648824", "0.43566564", "0.43429613", "0.43370092", "0.43244144", "0.43196052", "0.43185386", "0.43055826", "0.42896888", "0.42881748", "0.42881748", "0.4284845", "0.42848346", "0.42835405", "0.42729953", "0.42669147", "0.42633107", "0.42585298", "0.4258207", "0.42524406", "0.42474946", "0.42474946", "0.42442068", "0.42233676", "0.42185226", "0.42174447", "0.4216622", "0.42153618", "0.4204331", "0.4201404", "0.4198313", "0.41976413", "0.41957867", "0.4195514", "0.4190669", "0.41885018", "0.41823083", "0.41809517", "0.41635484", "0.41577205", "0.41520527", "0.41520527", "0.41496256", "0.4143071", "0.41417876", "0.41298562", "0.41260377", "0.41234046", "0.41218", "0.41194898", "0.41178882", "0.41178882", "0.41178882", "0.41178882", "0.41144943", "0.4113828", "0.41092303", "0.4108275", "0.41060424", "0.41030106", "0.41022977", "0.41019356", "0.40998316", "0.4098066", "0.40812063", "0.4074601", "0.40722156", "0.40689048" ]
0.0
-1
Sets the order status(es). (Optional) This method sets the list of Order Statuses to be sent in the next request. Setting this parameter tells Amazon to only return Orders with statuses that match those in the list. If this parameter is not set, Amazon will return Orders of any status.
public function setOrderStatusFilter($list) { if (is_string($list)) { //if single string, set as filter $this->resetOrderStatusFilter(); $this->options['OrderStatus.Status.1'] = $list; } else if (is_array($list)) { //if array of strings, set all filters $this->resetOrderStatusFilter(); $i = 1; foreach ($list as $x) { $this->options['OrderStatus.Status.' . $i] = $x; $i++; } } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setOrderStatus($orderStatus){\n return $this->setData(self::ORDER_STATUS, $orderStatus);\n }", "protected function _fcpoSetOrderStatus() {\n $blIsAmazonPending = $this->_oFcpoHelper->fcpoGetSessionVariable('fcpoAmazonPayOrderIsPending');\n $blOrderOk = $this->_fcpoValidateOrderAgainstProblems();\n\n if ($blIsAmazonPending) {\n $this->_setOrderStatus('PENDING');\n $this->oxorder__oxfolder = new oxField('ORDERFOLDER_PROBLEMS', oxField::T_RAW);\n $this->save();\n } elseif ($blOrderOk === true) {\n // updating order trans status (success status)\n $this->_setOrderStatus('OK');\n } else {\n $this->_setOrderStatus('ERROR');\n }\n }", "public function getOrderStatuses()\n {\n $response = $this->client->request('GET', '/v1/settings/orderstatuses');\n return new GetOrderStatusesResponse($response);\n }", "public function setStatuses(&$var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::ENUM, \\Salesorders\\V1\\Status::class);\n $this->statuses = $arr;\n }", "public function changeOrderStatus(Order $order, Request $request)\n\t{\n\n\t\ttry\n\t\t{\n\t\t\t$data = request()->all();\n\t\t\t\t\n\t\t\t \n\t\t\tif(isset($data['id']))\n\t\t\t{\n\t\t\t\tif($data['value'] == 5) {\n\t\t\t\t\tfor ($i=0; $i<count($request->id); $i++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->Order->where('id',$request->id[$i])->update(['order_status_id' => $data['value'],'delivered_date'=>date('Y-m-d')]);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tfor ($i=0; $i<count($request->id); $i++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->Order->where('id',$request->id[$i])->update(['order_status_id' => $data['value']]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t\t$message = $this->success($this->updated,'Oder');\n\t\t\t\t$cnt = $this->orderCount();\n\t\t\t\treturn response()->json(['orderStatus' => $status ,'pId'=> $request->id,'cnt' => $cnt ,'message' => $message]);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tcatch (\\Exception $e) {\n\t\t\tdd($e);\n\t\t\treturn $this->debugLog($e->getMessage());\n\t\t}\n\t}", "public function setTransactionStatus($orderId, string $status);", "public function updateOrderStatus($orders = 0, $order_id = 0, $order_status = 0)\n {\n $total = 1;\n if (empty($orders)) {\n $orders = array();\n\n $orderslist = vRequest::getVar('orders', array());\n $total = 0;\n // Get the list of orders in post to update\n foreach ($orderslist as $key => $order) {\n if ($orderslist[$key]['order_status'] !== $orderslist[$key]['current_order_status']) {\n $orders[$key] = $orderslist[$key];\n $total++;\n }\n }\n }\n\n if (!is_array($orders)) {\n $orders = array($orders);\n }\n\n /* Process the orders to update */\n $updated = 0;\n $error = 0;\n if ($orders) {\n // $notify = vRequest::getVar('customer_notified', array()); // ???\n // $comments = vRequest::getVar('comments', array()); // ???\n foreach ($orders as $virtuemart_order_id => $order) {\n if ($order_id > 0) $virtuemart_order_id = $order_id;\n $this->useDefaultEmailOrderStatus = false;\n if ($this->updateStatusForOneOrder($virtuemart_order_id, $order, true)) {\n $updated++;\n } else {\n $error++;\n }\n }\n }\n $result = array('updated' => $updated, 'error' => $error, 'total' => $total);\n return $result;\n }", "public function add_valid_order_statuses( $statuses, $order ) {\n\t\t$payment_method = $order->get_payment_method();\n\t\tif ( in_array( $payment_method, WC_Swedbank_Plugin::PAYMENT_METHODS, true ) ) {\n\t\t\t$statuses = array_merge(\n\t\t\t\t$statuses,\n\t\t\t\tarray(\n\t\t\t\t\t'processing',\n\t\t\t\t\t'completed',\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\treturn $statuses;\n\t}", "protected function _setDefaultOrderStatuses() {\n $completedOrderStatusId = $this->registry->get('model_extension_payment_' . $this->_getPaymentMethodCode())->getOrderStatusByName($this->language->get('completed_order_status'));\n $failedOrderStatusId = $this->registry->get('model_extension_payment_' . $this->_getPaymentMethodCode())->getOrderStatusByName($this->language->get('cancelled_order_status'));\n $partialRefundedOrderStatusId = $this->registry->get('model_extension_payment_' . $this->_getPaymentMethodCode())->getOrderStatusByName($this->language->get('partial_refunded_order_status'));\n $refundedOrderStatusId = $this->registry->get('model_extension_payment_' . $this->_getPaymentMethodCode())->getOrderStatusByName($this->language->get('refunded_order_status'));\n\n if ($completedOrderStatusId) {\n $this->registry->get('model_extension_payment_' . $this->_getPaymentMethodCode())->addSettingValue('payment_'.$this->_getPaymentMethodCode(), 'payment_'.$this->_getPaymentMethodCode().'_order_completed_status_id', $completedOrderStatusId, $this->config->get('config_store_id'));\n }\n if ($failedOrderStatusId) {\n $this->registry->get('model_extension_payment_' . $this->_getPaymentMethodCode())->addSettingValue('payment_'.$this->_getPaymentMethodCode(), 'payment_'.$this->_getPaymentMethodCode().'_order_failed_status_id', $failedOrderStatusId, $this->config->get('config_store_id'));\n }\n if ($partialRefundedOrderStatusId) {\n $this->registry->get('model_extension_payment_' . $this->_getPaymentMethodCode())->addSettingValue('payment_'.$this->_getPaymentMethodCode(), 'payment_'.$this->_getPaymentMethodCode().'_order_partial_refunded_status_id', $partialRefundedOrderStatusId, $this->config->get('config_store_id'));\n }\n if ($refundedOrderStatusId) {\n $this->registry->get('model_extension_payment_' . $this->_getPaymentMethodCode())->addSettingValue('payment_'.$this->_getPaymentMethodCode(), 'payment_'.$this->_getPaymentMethodCode().'_order_refunded_status_id', $refundedOrderStatusId, $this->config->get('config_store_id'));\n }\n $this->cache->delete(\"order_status.\" . (int)$this->config->get('config_language_id'));\n }", "public function changeStatus($orderId=null,$status=null){\n $allowedStatuses = ShopCore::$orderStatuses;\n if(!$orderId){\n $orderId = (int)$_POST['id'];\n }\n if(!$status){\n $status = $_POST['status'];\n }\n $order = new DBObject('sr_shop_order',$orderId);\n\n if(!$order->id){\n $this->sendJSON(array('success'=>false,'message'=>'Product not found'));\n }\n if(!$allowedStatuses[$status]){\n $this->sendJSON(array('success'=>false,'message'=>'Product not found'));\n }\n if($order->get('status')==$status){\n $this->get($orderId);\n return;\n }\n switch ($order->get('status')){\n case 'new':\n case 'processing':\n switch($status){\n case 'shipped':\n case 'done':\n // -w\n //-r\n $this->updateWarehouse($orderId,-1,-1);\n if($status=='done' && $order->get('customer_id')!='0'){\n $this->updateDiscount($order->get('customer_id'),$order->get('total'));\n }\n break;\n case 'cancelled':\n //-r\n $this->updateWarehouse($orderId,0,-1);\n break;\n }\n break;\n case 'shipped':\n case 'done':\n if($order->get('status')=='done' && $order->get('customer_id')!='0'){\n $this->updateDiscount($order->get('customer_id'),$order->get('total'),true);\n }\n switch($status){\n case 'new':\n case 'processing':\n // +w\n // +r\n $this->updateWarehouse($orderId,1,1);\n break;\n case 'cancelled':\n //+w\n $this->updateWarehouse($orderId,1,0);\n break;\n }\n break;\n\n case 'cancelled':\n switch($status){\n case 'new':\n case 'processing':\n // +r\n $this->updateWarehouse($orderId,0,1);\n break;\n default:\n if(!$allowedStatuses[$status]){\n $this->sendJSON(array('success'=>false,'message'=>'Action denied'));\n }\n break;\n }\n break;\n }\n $order->set('status',$status);\n $order->save();\n $this->get($orderId);\n }", "public function change_order_status_post()\n {\n $pdata = file_get_contents(\"php://input\");\n $data = json_decode($pdata,true);\n $id = $data['order_id'];\n $status = $data['status'];\n $user_id = $data['user_id'];\n // $this->response($user_id);\n $data = array(\n 'status' => $status\n );\n \n $where = array(\n 'id' => $id\n );\n $this->model->update('orders', $data, $where);\n $message = \"Your Order is $status\";\n \n $resp = array('rccode' => 200,'message' => $message);\n $this->response($resp);\n //}\n \n \n }", "public function setMapOrderStatuses(array $data)\n {\n $data = array_filter($data);\n\n $this->map_order_statuses = $data;\n $this->setSettingValue('retailcrm_map_order_statuses', $data, true);\n }", "public function getListOrderStatus(){\n\n return $this->client->makeRequest('orderstatus', 'GET');\n }", "protected function _applyOrderStatusFilter()\n {\n if (is_null($this->_orderStatus)) {\n return $this;\n }\n $orderStatus = $this->_orderStatus;\n if (!is_array($orderStatus)) {\n $orderStatus = array($orderStatus);\n }\n $this->getSelect()->where('status IN(?)', $orderStatus);\n return $this;\n }", "public function set_status( $order, $reset_status = false ) {\n\n\t\t\t/**\n\t\t\t * Post meta table.\n\t\t\t */\n\t\t\t$post_status = get_post_meta( $order['post_id'], self::LANGUAGE_POST_STATUS, true );\n\n\t\t\tif ( ! is_array( $post_status ) ) {\n\t\t\t\t// Meta value is invalid. Reset to an empty array.\n\t\t\t\t$post_status = array();\n\t\t\t}\n\n\t\t\t$result_meta = true;\n\t\t\t$message = '';\n\t\t\t$status_changed = false;\n\n\t\t\tif ( 'draft' === $order['status'] ) {\n\t\t\t\tif ( empty( $post_status[ $order['language'] ] ) || $post_status[ $order['language'] ] != $order['status'] ) {\n\t\t\t\t\t$post_status[ $order['language'] ] = $order['status'];\n\t\t\t\t\t$status_changed = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tunset( $post_status[ $order['language'] ] );\n\t\t\t\t$status_changed = true;\n\t\t\t}\n\n\t\t\tif ( empty( $post_status ) ) :\n\t\t\t\t$result_meta = delete_post_meta( $order['post_id'], self::LANGUAGE_POST_STATUS );\n\t\t\telse:\n\t\t\t\tif ( $status_changed ) {\n\t\t\t\t\t$result_meta = update_post_meta( $order['post_id'], self::LANGUAGE_POST_STATUS, $post_status );\n\t\t\t\t}\n\t\t\tendif;\n\n\t\t\tif ( $status_changed ) {\n\t\t\t\tif ( $result_meta ) {\n\t\t\t\t\t$message = esc_html( sprintf( __( 'Successfully set to \"%s\"', 'wpglobus-plus' ), ucfirst( $order['status'] ) ) );\n\t\t\t\t} else {\n\t\t\t\t\t$message = esc_html( sprintf( __( 'Setting to \"%s\" FAILED!', 'wpglobus-plus' ), ucfirst( $order['status'] ) ) );\n\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$message = esc_html( sprintf( __( 'Already set to \"%s\". Not changing.', 'wpglobus-plus' ), ucfirst( $order['status'] ) ) );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Options table.\n\t\t\t */\n\t\t\t$result_option = true;\n\t\t\t$lang_status = get_option( self::LANGUAGE_STATUS );\n\n\t\t\tif ( empty( $post_status ) ) {\n\n\t\t\t\tif ( ! empty( $lang_status[ $order['language'] ] ) && isset( $lang_status[ $order['language'] ][ $order['post_id'] ] ) ) {\n\t\t\t\t\tunset( $lang_status[ $order['language'] ][ $order['post_id'] ] );\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif ( 'draft' === $order['status'] ) {\n\t\t\t\t\t$lang_status[ $order['language'] ][ $order['post_id'] ] = $order['post_id'];\n\t\t\t\t} else {\n\t\t\t\t\tif ( ! empty( $lang_status[ $order['language'] ] ) && isset( $lang_status[ $order['language'] ][ $order['post_id'] ] ) ) {\n\t\t\t\t\t\tunset( $lang_status[ $order['language'] ][ $order['post_id'] ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t};\n\n\t\t\tif ( isset( $lang_status[ $order['language'] ] ) && empty( $lang_status[ $order['language'] ] ) ) {\n\t\t\t\tunset( $lang_status[ $order['language'] ] );\n\t\t\t}\n\n\t\t\tif ( empty( $lang_status ) ) {\n\t\t\t\t$result_option = delete_option( self::LANGUAGE_STATUS );\n\t\t\t} else {\n\n\t\t\t\t$result_option = update_option( self::LANGUAGE_STATUS, $lang_status, false );\n\t\t\t\tif ( $reset_status ) {\n\t\t\t\t\t$result_option = $this->reset_status();\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t$return = array();\n\t\t\t$return['action'] \t= $order['action'];\n\t\t\t$return['post_id'] \t= $order['post_id'];\n\t\t\t$return['language'] = $order['language'];\n\t\t\t$return['status'] \t= $order['status'];\n\t\t\t$return['message'] \t= $message;\n\n\t\t\treturn $return;\n\n\t\t}", "public function updateStatus(Request $request, Order $order)\n {\n $this->authorize('update', $order);\n $input = $request->input();\n\n $status = $order->fulfillment_status;\n\n foreach (Order::FULFILLMENT_STATUS_ARRAY as $key => $value) {\n if ($value === $input['status']) {\n $status = $key;\n }\n }\n\n //$order->history()->create(['order_id' => $order->id, 'old_status' => $order->fulfillment_status, 'new_status' => $status]);\n $order->fulfillment_status = $status;\n\n $order->save();\n\n $order = $order->fresh(['user', 'history']);\n\n return $this->respond($order);\n }", "public function createOrderStatusesAction()\n\t{\n\t\t$em = $this->getDoctrine()->getManager();\n\t\t$ostatuses = $em->getRepository('UekStoreBundle:OrderStatus')->findAll();\n\t\tif (count($ostatuses) == 0)\n\t\t{\n\t\t\t$status_list = [\n\t\t\t\t\t['id' => OrderStatus::IN_PROGRESS, 'name' => 'In progress'],\n\t\t\t\t\t['id' => OrderStatus::PAID, 'name' => 'Paid']\t];\n\t\t\t\n\t\t\tforeach ($status_list as $status)\n\t\t\t{\n\t\t\t\t$ostatus = new OrderStatus();\n\t\t\t\t$ostatus->setId($status['id']);\n\t\t\t\t$ostatus->setName($status['name']);\n\t\t\t\t$em->persist($ostatus);\n\t\t\t}\n\t\t\t\n\t\t\t$em->flush();\n\t\t}\n\t\t\n\t\treturn $this->redirect($this->generateUrl('uek_homepage'));\n\t}", "public static function onSaleStatusOrderHandler($orderId, $status)\n\t{\n\t\tstatic::addOrderProcessing($orderId, $status);\n\t}", "public function addOrderStatusUpdate(OrderEvent $event)\n {\n $order = $event->getOrder();\n $statusUpdate = new OrderStatusUpdate();\n $statusUpdate->setStatus($order->getStatus());\n $statusUpdate->setOrigin($event->getOrigin());\n $order->addStatusUpdate($statusUpdate);\n }", "function setStatus( $status )\n {\n if ( $status instanceof eZOrderStatus )\n $this->StatusID = $status->attribute( 'id' );\n else\n $this->StatusID = $status;\n $this->setStatusModified( time() );\n }", "public function edit(OrderStatus $orderStatus)\n {\n //\n }", "public function setStatus(?array $status): void\n {\n $this->status['value'] = $status;\n }", "function ostUpdateOrderStatus( $statusID, $status_name, $sort_order, $color, $bold, $italic ){\r\n\r\n\tdb_phquery('\r\n\t\tUPDATE ?#ORDER_STATUSES_TABLE SET '.LanguagesManager::sql_prepareFieldUpdate('status_name', $status_name).',sort_order=?, color=?, bold=?, italic=? \r\n\t\tWHERE statusID=?', $sort_order, $color, (int)$bold, (int)$italic, $statusID);\r\n}", "public function updateStatus()\n {\n $this->status = Cart::CART_STATUS_ORDERED;\n $this->save();\n }", "public function updateStatus(Request $request, Order $order)\n {\n $oldOrder = $order->replicate();\n $this->validate($request, [\n 'status' => 'bail|required|string|in:' . implode(',', config('project.order_status', [])),\n ]);\n\n $order->status = $request->input('status');\n $order->save();\n\n event(new OrderStatusChanged($oldOrder, $order));\n alert()->success('Order status was updated successfully.');\n return back();\n }", "public function changeStatus($id, $status){ \n $this->upd(\"orders\", array(\"status\" => $status), array(\"order_id\" => $id));\n }", "public function setStatus($status)\n {\n $this['status'] = $status;\n }", "public function changeOrderStatus(Request $request){\n $status = Order::where('order_id', $request->id)->first();\n if($status){\n if($status->status == 1){\n DB::table($request->table)->where('id', $request->id)->update(['status' => 0]);\n }else{\n DB::table($request->table)->where('id', $request->id)->update(['status' => 1]);\n }\n $output = array( 'status' => true, 'message' => 'Status update successful.');\n }else{\n $output = array( 'status' => false, 'message' => 'Status can\\'t update.!');\n }\n return response()->json($output);\n }", "public function updateStatuses()\n {\n $affected = DB::update('UPDATE los_orders SET status_code=1 WHERE status_code=0 AND order_date IN (SELECT provide_date FROM los_lunchdates WHERE orders_placed IS NOT NULL)');\n $affected = DB::update('UPDATE los_orders SET status_code=0 WHERE status_code=1 AND order_date IN (SELECT provide_date FROM los_lunchdates WHERE orders_placed IS NULL)');\n }", "public function updateOrderStatus($orderStatus, $comment = '')\n {\n $this->openCart->load->model('extension/payment/mundipagg_order_processing');\n $model = $this->openCart->model_extension_payment_mundipagg_order_processing;\n\n $model->addOrderHistory(\n $this->openCart->session->data['order_id'],\n $orderStatus,\n $comment,\n true\n );\n\n $model->setOrderStatus(\n $this->openCart->session->data['order_id'],\n $orderStatus\n );\n }", "public function getorderStatus()\n\t\t{\n\t\t\t$this->layout = \"index\";\n\t\t\t$this->set('title', 'Status (Linnworks API)');\n\n\t\t}", "public function changePaymentStatus(Order $order, Request $request)\n\t{\n \n\t\ttry\n\t\t{\n\t\t\t$data = request()->all();\n\t\t\t\n\t\t\tif(isset($data['id']))\n\t\t\t{\n\t\t\t\tfor ($i=0; $i<count($request->id); $i++)\n\t\t\t\t{\n\t\t\t\t\t$this->Order->where('id',$request->id[$i])->update(['payments_status_id' => $data['value']]);\n\t\t\t\t}\n\t\t\t\t$message = $this->success($this->updated,'Oder');\n\t\t\t\treturn ['paymentStatus' => $status ,'pId'=> $request->id ,'message' => $message];\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tcatch (\\Exception $e) {\n\t\t\treturn $this->debugLog($e->getMessage());\n\t\t}\n\t}", "public function updateOrderStatus($id_order_state, $id_order)\r\n {\r\n $order_state = new OrderState($id_order_state);\r\n\r\n if (!Validate::isLoadedObject($order_state)) {\r\n $this->errors[] = sprintf(Tools::displayError('Order status #%d cannot be loaded'), $id_order_state);\r\n } else {\r\n $order = new Order((int) $id_order);\r\n if (!Validate::isLoadedObject($order)) {\r\n $this->errors[] = sprintf(Tools::displayError('Order #%d cannot be loaded'), $id_order);\r\n } else {\r\n $current_order_state = $order->getCurrentOrderState();\r\n if ($current_order_state->id == $order_state->id) {\r\n $this->errors[] = sprintf(Tools::displayError('Order #%d has already been assigned this status.', $id_order));\r\n } else {\r\n $history = new OrderHistory();\r\n $history->id_order = $order->id;\r\n $history->id_employee = (int) (isset(Context::getContext()->employee->id)) ? Context::getContext()->employee->id : 0;\r\n\r\n $use_existings_payment = !$order->hasInvoice();\r\n $history->changeIdOrderState((int) $order_state->id, $order, $use_existings_payment);\r\n\r\n $carrier = new Carrier($order->id_carrier, $order->id_lang);\r\n $templateVars = array();\r\n if ($history->id_order_state == Configuration::get('PS_OS_SHIPPING') && $order->shipping_number) {\r\n $templateVars = array('{followup}' => str_replace('@', $order->shipping_number, $carrier->url));\r\n }\r\n\r\n if ($history->addWithemail(true, $templateVars)) {\r\n if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) {\r\n foreach ($order->getProducts() as $product) {\r\n if (StockAvailable::dependsOnStock($product['product_id'])) {\r\n StockAvailable::synchronize($product['product_id'], (int) $product['id_shop']);\r\n }\r\n }\r\n }\r\n } else {\r\n $this->errors[] = sprintf(Tools::displayError('Cannot change status for order #%d.'), $id_order);\r\n }\r\n }\r\n }\r\n }\r\n }", "public function setStatus(NostoOrderStatusInterface $status)\n {\n $this->status = $status;\n }", "public function setStatus(Status $status);", "public function _setStatus($status) {\n\t\t$this->_status = $status;\n\t}", "function listOrderStatus() {\n\t\tglobal $HTML;\n\t\tglobal $page;\n\n\t\t$_ = '';\n\n\t\t// only show orders if user has access\n\t\tif($page->validatePath(\"/janitor/admin/shop/order/list\")) {\n\n\t\t\tinclude_once(\"classes/shop/supershop.class.php\");\n\t\t\t$model = new SuperShop();\n\n\t\t\t$_ .= '<div class=\"orders\">';\n\t\t\t$_ .= '<h2>Order status</h2>';\n\n\n\t\t\tif($model->order_statuses) {\n\t\t\t\t$_ .= '<ul class=\"orders\">';\n\t\t\t\tforeach($model->order_statuses as $order_status => $order_status_name) {\n\t\t\t\t\t$_ .= '<li class=\"'.superNormalize($order_status_name).'\">';\n\t\t\t\t\t$_ .= '<h3>';\n\t\t\t\t\t$_ .= '<a href=\"/janitor/admin/shop/order/list/\"'.$order_status.'\">'.$order_status_name.'</a> ';\n\t\t\t\t\t$_ .= '<span class=\"count\">'.$model->getOrderCount(array(\"status\" => $order_status)).'</span>';\n\t\t\t\t\t$_ .= '<h3>';\n\n\t\t\t\t\t$_ .= '</li>';\n\t\t\t\t}\n\t\t\t\t$_ .= '</ul>';\n\t\t\t}\n\n\t\t\t$_ .= '</div>';\n\t\t}\n\n\t\treturn $_;\n\t}", "public function setStatus($status)\n {\n $this->_status = $status;\n }", "public function set_status ($status) {\n $this->status = $status;\n }", "public function setOrderStatus($magentoOrder)\n {\n if ($this->validatePaymentClass()) {\n return $this->getPaymentClass()->setOrderStatus($magentoOrder);\n }\n\n return parent::setOrderStatus($magentoOrder);\n }", "public function setStatus($status, $save = false) {\n\t\tif ($this->status != $status) {\n\n\t\t\t// set status\n\t\t\t$old_status = $this->status;\n\t\t\t$this->status = $status;\n\n\t\t\t// autosave order?\n\t\t\tif ($save) {\n\t\t\t\t$this->app->table->item->save($this);\n\t\t\t}\n\n\t\t\t// fire event\n\t\t $this->app->event->dispatcher->notify($this->app->event->create($this, 'order:statusChanged', compact('old_status')));\n\t\t}\n\n\t\treturn $this;\n\t}", "public function setStatus($status)\r\n {\r\n $this->status = $status;\r\n }", "public function getAllStatus()\n {\n return OrderStatus::all();\n }", "public function setStatus($status)\n {\n $this->status = $status;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n }", "private function groupByStatus($orders, $omit = false) {\n //set id var if we're including the logged in user\n $id = ($omit) ? $this->User->userId : false;\n //setup result array and parse provided array\n $this->orderSet = array();\n foreach ($orders as $index => $order) {\n\n $order = $this->injectKitData($order);\n\n if ($order['Order']['status'] == 'Approved') {\n $this->approvedOrders['Approved'][$order['Order']['id']] = $order;\n } else {\n if ($id && $id == $order['Order']['user_id']) {\n continue;\n }\n\n // create proper order for status output\n if (!isset($this->orderSet[$order['Order']['user_id']])) {\n $this->orderSet[$order['Order']['user_id']] = $this->statusOutputOrder;\n }\n $this->orderSet[$order['Order']['user_id']]['User'] = $order['User'];\n $orderStatus = ($order['Order']['status'] == 'Shipping') ? 'Shipped' : $order['Order']['status'];\n $this->orderSet[$order['Order']['user_id']][$orderStatus][$order['Order']['id']] = $order;\n }\n }\n }", "public function setStatus($status)\n {\n \n $this->status = $status;\n }", "public function update_status($_order)\n {\n $note = __('Status via reminder plugin automatisch geändert', 'bbb-bac-reminder');\n\n return $_order->update_status('cancelled', $note);\n }", "public function update(Request $request, OrderStatus $orderStatus)\n {\n //\n }", "public function edit(StatusOrder $statusOrder)\n {\n //\n }", "public function add_status( $order, $status ) {\n\n\t\tif ( is_numeric( $order ) ) {\n\t\t\t$order = wc_get_order( $order );\n\t\t}\n\n\t\t// Add the status if it doesn't already exist\n\t\tif ( ! $this->order_has_status( $order, $status ) ) {\n\t\t\treturn add_post_meta( SV_WC_Order_Compatibility::get_prop( $order, 'id' ), '_wc_avatax_status', $status );\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function changeOrderStatus(Request $req){\n Orders::find($req->order_id)->update([\n 'status' => $req->status\n ]);\n return response()->json(\"Đã lưu\");\n }", "public function setStatus($status);", "public function setStatus($status);", "public function setStatuses(array $statuses)\n {\n $this->statuses = array();\n\n $this->addStatuses($statuses);\n\n return $this;\n }", "public function get_order_statuses( $order ) {\n\n\t\tif ( is_numeric( $order ) ) {\n\t\t\t$order = wc_get_order( $order );\n\t\t}\n\n\t\t$statuses = get_post_meta( SV_WC_Order_Compatibility::get_prop( $order, 'id' ), '_wc_avatax_status' );\n\n\t\tif ( ! $statuses ) {\n\t\t\t$statuses = array();\n\t\t}\n\n\t\treturn $statuses;\n\t}", "public function getPendingOrders($status) {\r\n if($status != \"all\"):\r\n $orders = Mage::getModel('marketplace/commission')->getCollection();\r\n $orders->addFieldToSelect('*');\r\n $orders->addFieldToFilter('seller_id', Mage::getSingleton('customer/session')->getCustomer()->getId());\r\n $orders ->getSelect()\r\n ->columns('SUM(seller_amount) as seller_amount')\r\n ->group('order_id'); \r\n /**\r\n * Set order for manage order\r\n */\r\n $orders->setOrder('order_id', 'desc');\r\n /**\r\n * Return orders\r\n */\r\n $condition = new Zend_Db_Expr(\"sales.entity_id = main_table.order_id AND sales.status = '$status'\");\r\n $orders->getSelect()->join(array('sales' => $orders->getTable('sales/order')),\r\n $condition,\r\n array('status' => 'sales.status'));\r\n elseif($status == \"all\"):\r\n $orders = Mage::getModel('marketplace/commission')->getCollection();\r\n $orders->addFieldToSelect('*');\r\n $orders->addFieldToFilter('seller_id', Mage::getSingleton('customer/session')->getCustomer()->getId());\r\n $orders ->getSelect()\r\n ->columns('SUM(seller_amount) as seller_amount')\r\n ->group('order_id'); \r\n /**\r\n * Set order for manage order\r\n */\r\n $orders->setOrder('order_id', 'desc');\r\n /**\r\n * Return orders\r\n */\r\n endif;\r\n return $orders; \r\n }", "public function auto_update_pre_order_status( $order_id, $old_order_status, $new_order_status ) {\n\n\t\t// change to 'active' when changing order status to 'pre-ordered'\n\t\tif ( 'pre-ordered' === $new_order_status )\n\t\t\t$this->update_pre_order_status( $order_id, 'active' );\n\n\t\t// change to 'active when changing order status to on-hold\n\t\tif ( 'on-hold' === $new_order_status && $this->order_contains_pre_order( $order_id ) )\n\t\t\t$this->update_pre_order_status( $order_id, 'active' );\n\n\t\t// change to 'cancelled' when changing order status to 'cancelled', except when the pre-order status is already cancelled. this prevents sending double emails when bulk-cancelling pre-orders\n\t\tif ( 'cancelled' === $new_order_status && WC_Pre_Orders_Order::order_contains_pre_order( $order_id ) && 'cancelled' !== get_post_meta( $order_id, '_wc_pre_orders_status', true ) )\n\t\t\t$this->update_pre_order_status( $order_id, 'cancelled' );\n\t}", "public function setOrderItemStatus(Property\\OrderItemStatusProperty $orderItemStatus) {\n\t\t$this->orderItemStatus = $orderItemStatus;\n\n\t\treturn $this;\n\t}", "public function update(OrderStatus $orderStatus)\n {\n try {\n\n $updateRequest = new OrderStatusUpdateRequest();\n $validator = Validator::make(request()->all(), $updateRequest->rules());\n\n if ($validator->fails()) {\n\n return $this->sendBadRequest('Validation Error.', $validator->errors()->toArray());\n }\n\n $item = $this->orderStatusService->update(request()->all(), $orderStatus);\n\n return $this->sendResponse($item->toArray());\n\n } catch (Exception $exception) {\n\n return $this->sendError('Server Error.', $exception);\n\n }\n }", "public function _update_order_status( $order, $timeline ) {\n\t\t$prev_status = $order->get_meta( '_coinbase_status' );\n\n\t\t$last_update = end( $timeline );\n\t\t$status = $last_update['status'];\n\t\tif ( $status !== $prev_status ) {\n\t\t\t$order->update_meta_data( '_coinbase_status', $status );\n\n\t\t\tif ( 'EXPIRED' === $status && 'pending' == $order->get_status() ) {\n\t\t\t\t$order->update_status( 'cancelled', __( 'Coinbase payment expired.', 'coinbase' ) );\n\t\t\t} elseif ( 'CANCELED' === $status ) {\n\t\t\t\t$order->update_status( 'cancelled', __( 'Coinbase payment cancelled.', 'coinbase' ) );\n\t\t\t} elseif ( 'UNRESOLVED' === $status ) {\n\t\t\t\tif ('OVERPAID' === $last_update['context']) {\n\t\t\t\t\t$order->update_status( 'processing', __( 'Coinbase payment was successfully processed.', 'coinbase' ) );\n\t\t\t\t\t$order->payment_complete();\n\t\t\t\t} else {\n\t\t\t\t\t// translators: Coinbase error status for \"unresolved\" payment. Includes error status.\n\t\t\t\t\t$order->update_status( 'failed', sprintf( __( 'Coinbase payment unresolved, reason: %s.', 'coinbase' ), $last_update['context'] ) );\n\t\t\t\t}\n\t\t\t} elseif ( 'PENDING' === $status ) {\n\t\t\t\t$order->update_status( 'blockchainpending', __( 'Coinbase payment detected, but awaiting blockchain confirmation.', 'coinbase' ) );\n\t\t\t} elseif ( 'RESOLVED' === $status ) {\n\t\t\t\t// We don't know the resolution, so don't change order status.\n\t\t\t\t$order->add_order_note( __( 'Coinbase payment marked as resolved.', 'coinbase' ) );\n\t\t\t} elseif ( 'COMPLETED' === $status ) {\n\t\t\t\t$order->update_status( 'processing', __( 'Coinbase payment was successfully processed.', 'coinbase' ) );\n\t\t\t\t$order->payment_complete();\n\t\t\t}\n\t\t}\n\n\t\t// Archive if in a resolved state and idle more than timeout.\n\t\tif ( in_array( $status, array( 'EXPIRED', 'COMPLETED', 'RESOLVED' ), true ) &&\n\t\t\t$order->get_date_modified() < $this->timeout ) {\n\t\t\tself::log( 'Archiving order: ' . $order->get_order_number() );\n\t\t\t$order->update_meta_data( '_coinbase_archived', true );\n\t\t}\n\t}", "public function all(): JsonResponse\n {\n\n try {\n\n $data = $this->orderStatusService->all();\n\n return $this->sendResource(OrderStatusResource::collection($data));\n\n } catch (Exception $exception) {\n\n return $this->sendError('Server Error.', $exception);\n }\n }", "function updateOrderStatus($orderID, $newStatus)\n {\n return $this->data->updateOrderStatus($orderID, $newStatus);\n }", "public function setHistoryStatuses(array $statuses)\n {\n $this->historyStatuses = array();\n foreach ($statuses as $status) {\n $this->addHistoryStatus($status);\n }\n }", "public function setStatus($status)\n\t{\n\t\t$this->status = $status;\n\t}", "public function run()\n {\n $defaultStatus = ['處理中', '已確認', '已完成', '已取消'];\n foreach ($defaultStatus as $status) {\n OrderStatus::create([\n 'name' => $status\n ]);\n }\n }", "protected static function addOrderProcessing($orderId, $statusName)\n\t{\n\t\t$allowStatuses = Config\\Option::get(\"sale\", \"p2p_status_list\", \"\");\n\t\t$allowCollecting = Config\\Option::get(\"sale\", \"p2p_allow_collect_data\");\n\t\tif ($allowStatuses != '')\n\t\t\t$allowStatuses = unserialize($allowStatuses, ['allowed_classes' => false]);\n\t\telse\n\t\t\t$allowStatuses = array();\n\n\t\tif ($allowCollecting == \"Y\" && !empty($allowStatuses) && is_array($allowStatuses) && in_array($statusName, $allowStatuses))\n\t\t{\n\t\t\t$orderInformation = Sale\\OrderProcessingTable::getList(\n\t\t\t\tarray(\n\t\t\t\t\t\"filter\" => array(\"ORDER_ID\" => (int)$orderId),\n\t\t\t\t\t\"limit\" => 1\n\t\t\t\t)\n\t\t\t);\n\t\t\t$result = $orderInformation->fetch();\n\t\t\tif (!$result)\n\t\t\t\tSale\\OrderProcessingTable::add(array(\"ORDER_ID\" => (int)$orderId));\n\t\t}\n\t}", "public function setStatus(int $status)\n {\n $this->status = $status;\n }", "private function setStatus($status)\n {\n $this->status = $status;\n }", "function set_status($status)\r\n {\r\n $this->set_default_property(self :: PROPERTY_STATUS, $status);\r\n }", "protected function updateOrderState(Order &$order, $status_code)\n {\n \\Db::getInstance()->execute(\"UPDATE \" . _DB_PREFIX_ . \"springxbs_shipment \n SET status_code = \" . (int)$status_code . \" WHERE id_order=\" . (int)$order->id);\n\n $_map = Springxbs::getStatusesMap();\n\n if (isset($_map[$status_code]) && $_map[$status_code] != $order->current_state) {\n if ($this->debug) {\n echo \"Current status: \" . $order->current_state . \"\\n\";\n echo \"New status: \" . $_map[$status_code] . \" ($status_code) \\n\";\n echo \"Employee ID: \" . (Context::getContext()->employee->id) . \"\\n\";\n }\n if (!Context::getContext()->employee->id) {\n $em_id = (int)\\Db::getInstance()->getValue(\"SELECT id_employee FROM\n \" . _DB_PREFIX_ . \"employee WHERE id_profile IN (1,2) AND active=1 ORDER BY id_employee ASC\");\n\n Context::getContext()->employee = new Employee($em_id);\n echo \"Recovered Employee: \" . (Context::getContext()->employee->id) . \"\\n\";\n }\n $order->setCurrentState($_map[$status_code], Context::getContext()->employee->id);\n }\n }", "public function setStatus( $status ) {\n\t\t$this->status = $status;\n\t}", "public function setOrderStatus($orderId, $orderStatusId, $sendStatusMail = false, $comment = null)\n {\n $previousStatusId = $this->getOrderStatus($orderId);\n\n if ($orderStatusId == $previousStatusId) {\n return;\n }\n\n $this->db->executeUpdate(\n 'UPDATE s_order SET status = :status WHERE id = :orderId;',\n [':status' => $orderStatusId, ':orderId' => $orderId]\n );\n\n $sql = '\n INSERT INTO s_order_history (\n orderID, userID, previous_order_status_id, order_status_id,\n previous_payment_status_id, payment_status_id, comment, change_date )\n SELECT id, NULL, :previousStatus, :currentStatus, cleared, cleared, :comment, NOW() FROM s_order WHERE id = :orderId\n ';\n\n $this->db->executeUpdate($sql, [\n ':previousStatus' => $previousStatusId,\n ':currentStatus' => $orderStatusId,\n ':comment' => $comment,\n ':orderId' => $orderId,\n ]);\n\n if ($sendStatusMail) {\n $mail = $this->createStatusMail($orderId, $orderStatusId);\n if ($mail) {\n $this->sendStatusMail($mail);\n }\n }\n }", "public static function fetch_order_status() {\n $order_id = wc_get_order( $_POST['order_id'] );\n $order_key = OmisePluginHelperWcOrder::get_order_key_by_id( $order_id );\n\n if ( ! wp_verify_nonce( $_POST['nonce'], $order_key ) ) {\n die ( 'Busted!');\n }\n\n wp_send_json_success( array( 'order_status' => $order_id->get_status() ) );\n }", "public function setOrderStatus($transactionId, $statusId)\n {\n\n /**\n * TODO creates config for sending email\n */\n// $config = Shopware()->Plugins()->Frontend()->PilibabaPilipaySystem()->Config();\n// $sendStatusMail = (bool)$config->paymentStatusMail;\n\n $order = Shopware()->Modules()->Order();\n\n $sql = 'SELECT id\n FROM s_order\n WHERE transactionID=?\n AND status>=0';\n $orderId = Shopware()->Db()->fetchOne($sql, array(\n $transactionId\n ));\n\n $order = Shopware()->Modules()->Order();\n// $order->setOrderStatus($orderId, $statusId, $sendStatusMail);\n $order->setOrderStatus($orderId, $statusId);\n }", "public function setStatusDispatched(Request $request)\n {\n $id = $request->id;\n $order = Order::where('id', $id)\n ->update(['status' => 2]);\n return response()->json([\n 'message' => 'Order is dispatched',\n ], 201);\n }", "public function setStatus($status)\n {\n if (!is_null($status))\n $this->status = $status;\n }", "protected function setReceivedTransactionStatuses(): void\n {\n $txId = $this->postData['brq_transactions'];\n $statusCode = $this->postData['brq_statuscode'];\n\n if (empty($txId) || empty($statusCode)) {\n return;\n }\n\n $payment = $this->order->getPayment();\n\n $receivedTxStatuses = $payment->getAdditionalInformation(self::BUCKAROO_RECEIVED_TRANSACTIONS_STATUSES) ?? [];\n $receivedTxStatuses[$txId] = $statusCode;\n\n $payment->setAdditionalInformation(self::BUCKAROO_RECEIVED_TRANSACTIONS_STATUSES, $receivedTxStatuses);\n }", "public static function update_pre_order_status( $order, $new_status, $message = '' ) {\n\n\t\tif ( ! $new_status )\n\t\t\treturn;\n\n\t\tif ( ! is_object( $order ) )\n\t\t\t$order = new WC_Order( $order );\n\n\t\t$old_status = get_post_meta( $order->id, '_wc_pre_orders_status', true );\n\n\t\tif ( $old_status == $new_status )\n\t\t\treturn;\n\n\t\tif ( ! $old_status )\n\t\t\t$old_status = 'new';\n\n\t\tupdate_post_meta( $order->id, '_wc_pre_orders_status', $new_status );\n\n\t\t// actions for status changes\n\t\tdo_action( 'wc_pre_order_status_' . $new_status, $order->id, $message );\n\t\tdo_action( 'wc_pre_order_status_' . $old_status . '_to_' . $new_status, $order->id, $message );\n\t\tdo_action( 'wc_pre_order_status_changed', $order->id, $old_status, $new_status, $message );\n\n\t\t// add order note\n\t\t$order->add_order_note( $message . sprintf( __( 'Pre-Order status changed from %s to %s.', WC_Pre_Orders::TEXT_DOMAIN ), $old_status, $new_status ) );\n\t}", "public function changeStatus(ChangeStatusOrderRequest $request)\n {\n $idOrder = $request->input('id');\n //get current status\n $currentStatus = Order::find($idOrder)->status;\n $newStatus = $request->input('status');\n if ($currentStatus == $this::CANCEL) {\n return redirect_errors('Order canceled cannot changer status!');\n }\n if ($currentStatus == $this::PENDING && $newStatus > $this::DELIVERING) {\n return redirect_errors('Order is Pending can only changer Cancel or Delivering status!');\n }\n if (\n $currentStatus == $this::DELIVERING && $newStatus > $this::DELIVERED &&\n $newStatus < $this::DELIVERING && $newStatus != $this::CANCEL\n ) {\n return redirect_errors('Order is Delivering can only changer Cancel or Delivered status!');\n }\n if (\n $currentStatus == $this::DELIVERED &&\n $newStatus < $this::DELIVERED && $newStatus != $this::CANCEL\n ) {\n return redirect_errors('Order is Delivered can only changer Cancel or Charged status!');\n }\n if ($currentStatus == $this::CHARGED) {\n return redirect_errors('Order charged cannot changer status!');\n }\n $model = new Order();\n DB::beginTransaction();\n try {\n $order = $model->find(intval($idOrder));\n $order->status = intval($newStatus);\n $order->save();\n //if cancel then qty return\n if ($newStatus == $this::CANCEL) {\n $model = new Order();\n $order = $model->viewOrder($idOrder);\n $details = $order['order']['detail'];\n foreach ($details as $detail) {\n $qtyReturn = ($detail['quantity']);\n $currentQty = Cd::find($detail['product_id'])->quantity;\n $currentBuyTime = Cd::find($detail['product_id'])->buy_time;\n Cd::find($detail['product_id'])->update([\n 'quantity' => $currentQty + $qtyReturn,\n 'buy_time' => $currentBuyTime + $qtyReturn\n ]);\n }\n// $customer=User::find('user_id');\n// if(is_null($customer)){\n//\n// }\n// Mail::send('auth.message_order', ['name' => 'you'],\n// function ($message) use ($data) {\n// $message\n// ->to($data['email'], $data['name'])\n// ->from('[email protected]')\n// ->subject('Your order canceled!');\n// });\n }\n DB::commit();\n return redirect()->back()->with('success', 'Updated status');\n } catch (\\Exception $e) {\n DB::rollback();\n return redirect_errors('Updated Fails!');\n }\n }", "public function orderStatusManager(Mage_Sales_Model_Order $order, $paymentStatus = null)\n {\n $this->_getPaymentHelper()->orderStatusManager($order, $paymentStatus);\n $order->setShopgateStatusSet(true);\n\n return $order;\n }", "final public function setStatus(Int $status)\n\t{\n\t\t$this->_status = $status;\n\t}", "public function changeOrderStatus($id, $status) {\r\n $sql = \"UPDATE orders SET status = ?, date_changed = now() WHERE id = ?\";\r\n \r\n $query = $this->connection->prepare($sql);\r\n $query->execute(array($status, $id));\r\n }", "public function setStatus($status) {\n if (is_string($status) && in_array($status, $this->_headers)) {\n $headers = array_flip($this->_headers);\n $this->_status = $headers[$status];\n } else if (is_int($status) && array_key_exists($status, $this->_headers)) {\n $this->_status = $status;\n }\n\n return $this;\n }", "public function show(OrderStatus $orderStatus)\n {\n //\n }", "function musth_restws_change_order_status($order, $new_status) {\n\n if ($new_status == 'checkout_complete') {\n\n // The following check is needed to see if the order can change status to\n // checkout_complete\n if (!commerce_checkout_complete_access($order)) {\n // We can't change status\n // Actually we shouldn't have any problem because the check is based on\n // the status itself, but you never know, there could me more requirements to meet\n\n watchdog('musth_restws', 'W3E078 The given order cant access checkout completion (!o) ',\n array('!o' => print_r($order, true)),\n WATCHDOG_ERROR);\n\n return FALSE;\n }\n\n }\n\n // What about the commerce api commerce_checkout_order_can_checkout? Why don't we use it?\n // We don't because it checks if an order has at least one line item\n // We trust Angular with this check\n\n // Just in case, let's refresh the order before changing status\n if ($order->status == 'cart')\n commerce_cart_order_refresh($order);\n\n // We are skipping the save because the order will be saved later\n commerce_order_status_update($order, $new_status, TRUE);\n\n if ($new_status == 'checkout_complete') {\n // Staring the process that will complete the order checkout and put it in\n // the 'pending' status\n // The checkout completion rules will run\n commerce_checkout_complete($order);\n }\n\n return TRUE;\n}", "function setStatus($new_status)\n {\n $this->status = $new_status;\n }", "public function index($order_status = false)\n {\n $filter_data = @Session::get('order_search') ? @Session::get('order_search') : [];\n @Request::input() ? @Session::put('order_search', array_merge($filter_data, @Request::input())) : '';\n $order_status = @Request::get('order_status_hidden') ? Request::get('order_status_hidden') : $order_status;\n $customer_id = @Request::get('customer_id') ? Request::get('customer_id') : null;\n $data = Order::getOrderPaginated(Session::get('order_search'), @Session::get('order_search')['search_status'], $order_status, $customer_id);\n if ($order_status == 2) {\n return view('order.archived_order', $data);\n } else {\n return view('order.index', $data);\n }\n }", "public function change_status(Request $request,$id)\n { \n Order::where('id',$id)->update([\n 'order_status'=>$request->order_status,\n 'updated_at'=>date('Y-m-d H:i:s')\n ]);\n Orderproduct::where('order_id',$id)->update([\n 'order_pro_status'=>$request->order_status\n ,'updated_at'=>date('Y-m-d H:i:s')\n ]);\n Session::flash('flash_message_success', 'Order updated successfully');\n return redirect()->back();\n }", "public function setStatus($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->status !== $v) {\n $this->status = $v;\n $this->modifiedColumns[OrdrhedTableMap::COL_STATUS] = true;\n }\n\n return $this;\n }", "public function changeOrderStatus(){\r\n $cookies = new CookieModel();\r\n $cookie_id = $cookies -> read();\r\n $Form = M('userinfo');\r\n $condition_in['stuid'] = $cookie_id;\r\n $data = $Form->where($condition_in)->find();\r\n if (! $data['manager']) $this->redirect('/');\r\n \t$key = $_REQUEST['id'];\r\n \t//$key = 2;\r\n \t$condition['id'] = $key;\r\n \t$form = M(\"orderinfo\");\r\n \t$data = $form->where($condition)->find();\r\n \t//echo $data;\r\n \tif ($data['status'] == \"下单成功\") $data['status'] = \"烹饪中\";\r\n \telse if ($data['status'] == \"烹饪中\") $data['status'] = \"送餐途中\"; \r\n \telse if ($data['status'] == \"送餐途中\") $data['status'] = \"餐已收到\";\r\n \t$form->save($data);\r\n \t//$this->display();\r\n }", "public function setStatus($var)\n {\n GPBUtil::checkInt32($var);\n $this->status = $var;\n\n return $this;\n }", "public function set_pre_orders_list_option( $status, $option, $value ) {\n\t\tif ( 'wc_pre_orders_edit_pre_orders_per_page' == $option )\n\t\t\treturn $value;\n\n\t\treturn $status;\n\t}", "public function filterStatus()\n {\n if (is_null(Input::get('id'))) {\n Session::put('order_filter', Order::PENDING);\n }\n if (Status_orders::find(Input::get('id'))->count() == 0) {\n Session::put('order_filter', Order::PENDING);\n }\n Session::put('order_filter', Input::get('id'));\n }", "public function getOrdersByStatus($stt){\n $selected_status = self::parseOrderStatusName($stt);\n \n $data = Orders::where('status', $selected_status)->paginate(10);\n return view('dashboard.orders',['orders' => $data, 'list_status' => $this->order->list_status, 'selected_status' => $selected_status]);\n }", "public function setStatus(string $status)\n {\n $this->status = $status;\n }", "private function _handleMagentoStatusUpdate(array $statusData, $status)\n { \n $comment = $this->_getHistoryComment($statusData);\n \n $state = Mage::getResourceModel('sales/order_status_collection')\n ->joinStates()->addStatusFilter($status)\n ->getFirstItem()\n ->getData('state');\n \n $this->_getOrder()->setStatus($status);\n $this->_getOrder()->setState(\n $state, \n false,\n $comment, \n false\n );\n \n $this->_getOrder()->addStatusHistoryComment($this->_getHistoryComment($statusData));\n \n $this->_getOrder()->save();\n }", "private function changeOrderStatus( $builder, $status )\n {\n return $builder->update([\n 'is_order_disable' => $status,\n ]);\n }" ]
[ "0.72443604", "0.6824872", "0.67398775", "0.6737773", "0.6732424", "0.6702589", "0.6606795", "0.64995193", "0.64766365", "0.64658", "0.6405694", "0.62987787", "0.6274773", "0.62530595", "0.621514", "0.61630213", "0.61616194", "0.6146557", "0.6125522", "0.609733", "0.60717773", "0.6068153", "0.6054382", "0.6027355", "0.6011146", "0.5964115", "0.5957333", "0.5945371", "0.5939102", "0.58953047", "0.5873519", "0.58734196", "0.5870556", "0.58675396", "0.58665466", "0.5858753", "0.5858277", "0.58537465", "0.5839971", "0.5836164", "0.58348787", "0.58136463", "0.5813076", "0.5807968", "0.5807968", "0.5807968", "0.5807968", "0.5805509", "0.58047724", "0.5800265", "0.5795782", "0.5787577", "0.5779763", "0.5779625", "0.5776246", "0.5776246", "0.5773479", "0.5770693", "0.5763194", "0.574668", "0.5723036", "0.572262", "0.5715845", "0.5714378", "0.56985265", "0.56873196", "0.56861085", "0.5684202", "0.56837946", "0.56721354", "0.56580293", "0.56480837", "0.5643941", "0.56437004", "0.56326234", "0.56220865", "0.5611004", "0.5608015", "0.5606934", "0.55943954", "0.5591992", "0.55755776", "0.55690914", "0.5556948", "0.5547966", "0.5547206", "0.55417925", "0.554125", "0.5540364", "0.5515472", "0.5510062", "0.549623", "0.54948884", "0.5494642", "0.54928964", "0.54910153", "0.5489807", "0.5483599", "0.5480968", "0.5467906" ]
0.6410156
10
Removes order status options. Use this in case you change your mind and want to remove the Order Status parameters you previously set.
public function resetOrderStatusFilter() { foreach ($this->options as $op => $junk) { if (preg_match("#OrderStatus#", $op)) { unset($this->options[$op]); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function remove_status( $order, $status ) {\n\n\t\treturn delete_post_meta( SV_WC_Order_Compatibility::get_prop( $order, 'id' ), '_wc_avatax_status', $status );\n\t}", "public function deleteStatus()\n {\n $order_status = new OrderState((int)ConfPPM::getConf('status_paysto'));\n if (Validate::isLoadedObject($order_status)) {\n $order_status->delete();\n }\n }", "public function destroy(OrderStatus $orderStatus)\n {\n //\n }", "public function unsetStatus(): void\n {\n $this->status = [];\n }", "public function destroy(StatusOrder $statusOrder)\n {\n //\n }", "public function resetTfmShipmentStatusFilter()\n {\n foreach ($this->options as $op => $junk) {\n if (preg_match(\"#TFMShipmentStatus#\", $op)) {\n unset($this->options[$op]);\n }\n }\n }", "public function resetReportStatuses()\n {\n foreach ($this->options as $op => $junk) {\n if (preg_match('#ReportProcessingStatusList#', $op)) {\n unset($this->options[$op]);\n }\n }\n }", "public function deletePreOrderStatus()\n {\n $connection = $this->getConnection();\n $connection->delete(\n $this->getTable('sales_order_status'),\n ['status = ?' => \"pending_preorder\"]\n );\n $connection->delete(\n $this->getTable('sales_order_status'),\n ['status = ?' => \"processing_preorder\"]\n );\n }", "function gf_remove_processing_status($statuses){\n if(isset($statuses['wc-processing'])){\n unset($statuses['wc-processing']);\n }\n if(isset($statuses['wc-pending'])){\n unset($statuses['wc-pending']);\n }\n if(isset($statuses['wc-cancelled'])){\n unset($statuses['wc-cancelled']);\n }\n if(isset($statuses['wc-failed'])){\n unset($statuses['wc-failed']);\n }\n return $statuses;\n}", "public function remove()\n {\n // MODULE_PAYMENT_SHOPGATE_ORDER_STATUS_ID - Keep this on removing for old installation\n xtc_db_query(\n \"delete from \" . TABLE_CONFIGURATION\n . \" where configuration_key in ('MODULE_PAYMENT_SHOPGATE_STATUS', 'MODULE_PAYMENT_SHOPGATE_ALLOWED', 'MODULE_PAYMENT_SHOPGATE_SORT_ORDER', 'MODULE_PAYMENT_SHOPGATE_ORDER_STATUS_ID')\"\n );\n }", "public function delete(OrderStatus $orderStatus): JsonResponse\n {\n\n try {\n\n $item = $this->orderStatusService->find($orderStatus);\n\n return $this->sendResource(new OrderStatusResource($item));\n\n } catch (Exception $exception) {\n\n return $this->sendError('Server Error.', $exception);\n\n }\n }", "public static function deactivate() {\n\t\tif (Plus_admin::gs('resetsettings_status')){\n\t\t\tdelete_option('cs_plusadmin_settings');\n\t\t\tdelete_option('cs_plus_admin_lpm_settings');\n\t\t\tdelete_option('cs_plus_admin_amm_settings');\n\t\t\tdelete_option('cs_plusadmin_adminmenu');\n\t\t\tdelete_option('cs_plusadmin_adminsubmenu');\n\t\t\tdelete_option('cs_plusadmin_status');\n\t\t}\n\t}", "public function remove_options()\n {\n }", "protected function _setDefaultOrderStatuses() {\n $completedOrderStatusId = $this->registry->get('model_extension_payment_' . $this->_getPaymentMethodCode())->getOrderStatusByName($this->language->get('completed_order_status'));\n $failedOrderStatusId = $this->registry->get('model_extension_payment_' . $this->_getPaymentMethodCode())->getOrderStatusByName($this->language->get('cancelled_order_status'));\n $partialRefundedOrderStatusId = $this->registry->get('model_extension_payment_' . $this->_getPaymentMethodCode())->getOrderStatusByName($this->language->get('partial_refunded_order_status'));\n $refundedOrderStatusId = $this->registry->get('model_extension_payment_' . $this->_getPaymentMethodCode())->getOrderStatusByName($this->language->get('refunded_order_status'));\n\n if ($completedOrderStatusId) {\n $this->registry->get('model_extension_payment_' . $this->_getPaymentMethodCode())->addSettingValue('payment_'.$this->_getPaymentMethodCode(), 'payment_'.$this->_getPaymentMethodCode().'_order_completed_status_id', $completedOrderStatusId, $this->config->get('config_store_id'));\n }\n if ($failedOrderStatusId) {\n $this->registry->get('model_extension_payment_' . $this->_getPaymentMethodCode())->addSettingValue('payment_'.$this->_getPaymentMethodCode(), 'payment_'.$this->_getPaymentMethodCode().'_order_failed_status_id', $failedOrderStatusId, $this->config->get('config_store_id'));\n }\n if ($partialRefundedOrderStatusId) {\n $this->registry->get('model_extension_payment_' . $this->_getPaymentMethodCode())->addSettingValue('payment_'.$this->_getPaymentMethodCode(), 'payment_'.$this->_getPaymentMethodCode().'_order_partial_refunded_status_id', $partialRefundedOrderStatusId, $this->config->get('config_store_id'));\n }\n if ($refundedOrderStatusId) {\n $this->registry->get('model_extension_payment_' . $this->_getPaymentMethodCode())->addSettingValue('payment_'.$this->_getPaymentMethodCode(), 'payment_'.$this->_getPaymentMethodCode().'_order_refunded_status_id', $refundedOrderStatusId, $this->config->get('config_store_id'));\n }\n $this->cache->delete(\"order_status.\" . (int)$this->config->get('config_language_id'));\n }", "public function update_status($_order)\n {\n $note = __('Status via reminder plugin automatisch geändert', 'bbb-bac-reminder');\n\n return $_order->update_status('cancelled', $note);\n }", "public function statusOptions()\n\t{\n\t\treturn array('pending', 'processing', 'complete', 'on_hold');\n\t}", "public function delete() {\n $this->load->auto('localisation/orderstatus');\n if (($this->request->server['REQUEST_METHOD'] == 'POST')) {\n foreach ($this->request->post['selected'] as $id) {\n $this->modelOrderstatus->delete($id);\n }\n } else {\n $this->modelOrderstatus->delete($_GET['id']);\n }\n }", "public function unsetOrderVersion(): void\n {\n $this->orderVersion = [];\n }", "function removeHistory()\n {\n $db = eZDB::instance();\n $orderID = (int)$this->OrderNr;\n $db->query( \"DELETE FROM ezorder_status_history WHERE order_id=$orderID\" );\n }", "public function getOrderStatuses()\n {\n $response = $this->client->request('GET', '/v1/settings/orderstatuses');\n return new GetOrderStatusesResponse($response);\n }", "private function deletePaymentStatus()\n {\n $sql = \"DELETE FROM s_core_states WHERE `group` = 'payment' AND\n id IN (1750, 1751, 1752, 1753)\";\n Shopware()->Db()->query($sql);\n $sql = \"DELETE FROM s_core_snippets WHERE name in ('in_review',\"\n . \"'pre_authorization_of_payment', 'payment_accepted', \"\n . \"'refund')\";\n Shopware()->Db()->query($sql);\n }", "public function setOrderStatus($orderStatus){\n return $this->setData(self::ORDER_STATUS, $orderStatus);\n }", "function ostDeleteOrderStatus( $statusID )\r\n{\r\n\t$statusID = intval($statusID);\r\n\t$q = db_query(\"select count(*) from \".ORDERS_TABLE.\" where statusID=\".$statusID );\r\n\t$r = db_fetch_row( $q );\r\n\tif ( $r[0] != 0 )\r\n\treturn false;\r\n\tdb_query(\"delete from \".ORDER_STATUSES_TABLE.\r\n\t\t\" where statusID=$statusID\" );\r\n\treturn true;\r\n}", "public function changeStatus($orderId=null,$status=null){\n $allowedStatuses = ShopCore::$orderStatuses;\n if(!$orderId){\n $orderId = (int)$_POST['id'];\n }\n if(!$status){\n $status = $_POST['status'];\n }\n $order = new DBObject('sr_shop_order',$orderId);\n\n if(!$order->id){\n $this->sendJSON(array('success'=>false,'message'=>'Product not found'));\n }\n if(!$allowedStatuses[$status]){\n $this->sendJSON(array('success'=>false,'message'=>'Product not found'));\n }\n if($order->get('status')==$status){\n $this->get($orderId);\n return;\n }\n switch ($order->get('status')){\n case 'new':\n case 'processing':\n switch($status){\n case 'shipped':\n case 'done':\n // -w\n //-r\n $this->updateWarehouse($orderId,-1,-1);\n if($status=='done' && $order->get('customer_id')!='0'){\n $this->updateDiscount($order->get('customer_id'),$order->get('total'));\n }\n break;\n case 'cancelled':\n //-r\n $this->updateWarehouse($orderId,0,-1);\n break;\n }\n break;\n case 'shipped':\n case 'done':\n if($order->get('status')=='done' && $order->get('customer_id')!='0'){\n $this->updateDiscount($order->get('customer_id'),$order->get('total'),true);\n }\n switch($status){\n case 'new':\n case 'processing':\n // +w\n // +r\n $this->updateWarehouse($orderId,1,1);\n break;\n case 'cancelled':\n //+w\n $this->updateWarehouse($orderId,1,0);\n break;\n }\n break;\n\n case 'cancelled':\n switch($status){\n case 'new':\n case 'processing':\n // +r\n $this->updateWarehouse($orderId,0,1);\n break;\n default:\n if(!$allowedStatuses[$status]){\n $this->sendJSON(array('success'=>false,'message'=>'Action denied'));\n }\n break;\n }\n break;\n }\n $order->set('status',$status);\n $order->save();\n $this->get($orderId);\n }", "public function resetOriginalStatus() {\n $this->orig_status = $this->getStatus();\n }", "public function destroy(status $status)\n {\n //\n }", "protected function resetStatuses()\n {\n $this->pubDirectory->delete($this->getRelativeFilePath(self::IMPORT_STATUS_READY));\n $this->pubDirectory->delete($this->getRelativeFilePath(self::IMPORT_STATUS_BUSY));\n $this->pubDirectory->delete($this->getRelativeFilePath(self::IMPORT_STATUS_FAILED));\n }", "public static function getOrderFormStatusChoices(): array\n {\n //====================================================================//\n // Load Prestashop Status List\n return array_merge_recursive(\n array(array(\n \"id_order_state\" => 0,\n \"name\" => \"Use Generic Status\",\n )),\n OrderState::getOrderStates(SLM::getDefaultLangId())\n );\n }", "public function add_valid_order_statuses( $statuses, $order ) {\n\t\t$payment_method = $order->get_payment_method();\n\t\tif ( in_array( $payment_method, WC_Swedbank_Plugin::PAYMENT_METHODS, true ) ) {\n\t\t\t$statuses = array_merge(\n\t\t\t\t$statuses,\n\t\t\t\tarray(\n\t\t\t\t\t'processing',\n\t\t\t\t\t'completed',\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\treturn $statuses;\n\t}", "public function removeHistoryStatusFilter()\n {\n $status = $this->helper()->getConfigData('sro_status_delayed');\n $trackList = $this->getRequestCollection();\n \n foreach ($trackList as $key => $track) {\n foreach ($track->getShipment()->getOrder()->getAllStatusHistory() as $history) {\n if ($status == $history->getData('status')) {\n Mage::log(\"{$track->getNumber()}: history found ({$status}) / ignored status\");\n $trackList->removeItemByKey($key);\n break;\n }\n }\n }\n \n $this->setLog(\"{$trackList->count()} never-delayed of {$this->getLog()}\");\n return $this->setRequestCollection($trackList);\n }", "public function edit(OrderStatus $orderStatus)\n {\n //\n }", "protected function _applyOrderStatusFilter()\n {\n if (is_null($this->_orderStatus)) {\n return $this;\n }\n $orderStatus = $this->_orderStatus;\n if (!is_array($orderStatus)) {\n $orderStatus = array($orderStatus);\n }\n $this->getSelect()->where('status IN(?)', $orderStatus);\n return $this;\n }", "private function changeOrderStatus( $builder, $status )\n {\n return $builder->update([\n 'is_order_disable' => $status,\n ]);\n }", "public function toOptionArray()\n {\n /** @var $orderConfig Mage_Sales_Model_Order_Config */\n $orderConfig = Mage::getSingleton('sales/order_config');\n if ($this->_stateStatuses) {\n $statuses = $orderConfig->getStateStatuses($this->_stateStatuses);\n }\n else {\n $statuses = $orderConfig->getStatuses();\n }\n $options = array();\n $options[] = array(\n 'value' => '',\n 'label' => Mage::helper('adminhtml')->__('-- Please Select --')\n );\n foreach ($statuses as $code=>$label) {\n $options[] = array(\n 'value' => $code,\n 'label' => $label\n );\n }\n return $options;\n }", "public function _update_order_status( $order, $timeline ) {\n\t\t$prev_status = $order->get_meta( '_coinbase_status' );\n\n\t\t$last_update = end( $timeline );\n\t\t$status = $last_update['status'];\n\t\tif ( $status !== $prev_status ) {\n\t\t\t$order->update_meta_data( '_coinbase_status', $status );\n\n\t\t\tif ( 'EXPIRED' === $status && 'pending' == $order->get_status() ) {\n\t\t\t\t$order->update_status( 'cancelled', __( 'Coinbase payment expired.', 'coinbase' ) );\n\t\t\t} elseif ( 'CANCELED' === $status ) {\n\t\t\t\t$order->update_status( 'cancelled', __( 'Coinbase payment cancelled.', 'coinbase' ) );\n\t\t\t} elseif ( 'UNRESOLVED' === $status ) {\n\t\t\t\tif ('OVERPAID' === $last_update['context']) {\n\t\t\t\t\t$order->update_status( 'processing', __( 'Coinbase payment was successfully processed.', 'coinbase' ) );\n\t\t\t\t\t$order->payment_complete();\n\t\t\t\t} else {\n\t\t\t\t\t// translators: Coinbase error status for \"unresolved\" payment. Includes error status.\n\t\t\t\t\t$order->update_status( 'failed', sprintf( __( 'Coinbase payment unresolved, reason: %s.', 'coinbase' ), $last_update['context'] ) );\n\t\t\t\t}\n\t\t\t} elseif ( 'PENDING' === $status ) {\n\t\t\t\t$order->update_status( 'blockchainpending', __( 'Coinbase payment detected, but awaiting blockchain confirmation.', 'coinbase' ) );\n\t\t\t} elseif ( 'RESOLVED' === $status ) {\n\t\t\t\t// We don't know the resolution, so don't change order status.\n\t\t\t\t$order->add_order_note( __( 'Coinbase payment marked as resolved.', 'coinbase' ) );\n\t\t\t} elseif ( 'COMPLETED' === $status ) {\n\t\t\t\t$order->update_status( 'processing', __( 'Coinbase payment was successfully processed.', 'coinbase' ) );\n\t\t\t\t$order->payment_complete();\n\t\t\t}\n\t\t}\n\n\t\t// Archive if in a resolved state and idle more than timeout.\n\t\tif ( in_array( $status, array( 'EXPIRED', 'COMPLETED', 'RESOLVED' ), true ) &&\n\t\t\t$order->get_date_modified() < $this->timeout ) {\n\t\t\tself::log( 'Archiving order: ' . $order->get_order_number() );\n\t\t\t$order->update_meta_data( '_coinbase_archived', true );\n\t\t}\n\t}", "function statusMessagesOff()\n\t{\n\t\t$this->bStatusMessages = false;\n\t}", "public function cancelOrder(Mage_Sales_Model_Order $order)\n {\n try {\n // works for 1.8 and 1.9\n $order->registerCancellation();\n } catch (Mage_Core_Exception $e) {\n // exist for backward compatibility with Magento 1.7\n $cancelState = Mage_Sales_Model_Order::STATE_CANCELED;\n /** @var Mage_Sales_Model_Order_Item $item */\n foreach ($order->getAllItems() as $item) {\n if ($cancelState != Mage_Sales_Model_Order::STATE_PROCESSING && $item->getQtyToRefund()) {\n if ($item->getQtyToShip() > $item->getQtyToCancel()) {\n $cancelState = Mage_Sales_Model_Order::STATE_PROCESSING;\n } else {\n $cancelState = Mage_Sales_Model_Order::STATE_COMPLETE;\n }\n }\n $item->cancel();\n }\n\n $order->setSubtotalCanceled($order->getSubtotal() - $order->getSubtotalInvoiced());\n $order->setBaseSubtotalCanceled($order->getBaseSubtotal() - $order->getBaseSubtotalInvoiced());\n\n $order->setTaxCanceled($order->getTaxAmount() - $order->getTaxInvoiced());\n $order->setBaseTaxCanceled($order->getBaseTaxAmount() - $order->getBaseTaxInvoiced());\n\n $order->setShippingCanceled($order->getShippingAmount() - $order->getShippingInvoiced());\n $order->setBaseShippingCanceled($order->getBaseShippingAmount() - $order->getBaseShippingInvoiced());\n\n $order->setDiscountCanceled(abs($order->getDiscountAmount()) - $order->getDiscountInvoiced());\n $order->setBaseDiscountCanceled(\n abs($order->getBaseDiscountAmount()) - $order->getBaseDiscountInvoiced()\n );\n\n $order->setTotalCanceled($order->getGrandTotal() - $order->getTotalPaid());\n $order->setBaseTotalCanceled($order->getBaseGrandTotal() - $order->getBaseTotalPaid());\n\n $order->setState($cancelState, true);\n }\n\t $order->save();\n }", "public function set_pre_orders_list_option( $status, $option, $value ) {\n\t\tif ( 'wc_pre_orders_edit_pre_orders_per_page' == $option )\n\t\t\treturn $value;\n\n\t\treturn $status;\n\t}", "function mfcs_get_request_status_list_options($option = NULL, $hidden = FALSE, $disabled = FALSE) {\n $options = array();\n $options_all = array();\n\n if ($hidden) {\n $options_all[MFCS_REQUEST_STATUS_NONE] = 'None';\n }\n\n $options_all[MFCS_REQUEST_STATUS_DELETED] = 'Deleted';\n $options_all[MFCS_REQUEST_STATUS_UNLOCKED] = 'Queued (Unlocked)';\n $options_all[MFCS_REQUEST_STATUS_LOCKED] = 'Queued (Locked)';\n $options_all[MFCS_REQUEST_STATUS_CLOSED_ACCEPTED] = 'Accepted';\n $options_all[MFCS_REQUEST_STATUS_CLOSED_DENIED] = 'Denied';\n $options_all[MFCS_REQUEST_STATUS_CLOSED_UNAVAILABLE] = 'Room Unavailable';\n $options_all[MFCS_REQUEST_STATUS_CLOSED_DUE_TO_LOCK] = 'Room Unavailable (due to lock)';\n $options_all[MFCS_REQUEST_STATUS_CANCELLED] = 'Cancelled';\n $options_all[MFCS_REQUEST_STATUS_CLOSED_ACCEPTED_CANCELLED] = 'Accepted (Cancelled)';\n\n if ($option == 'select') {\n $options[''] = '- Select -';\n }\n\n foreach ($options_all as $option_id => $option_name) {\n $options[$option_id] = $option_name;\n }\n\n if ($option == 'search') {\n unset($options[MFCS_REQUEST_STATUS_DELETED]);\n }\n\n asort($options);\n\n return $options;\n}", "public function updateOrderStatus($orders = 0, $order_id = 0, $order_status = 0)\n {\n $total = 1;\n if (empty($orders)) {\n $orders = array();\n\n $orderslist = vRequest::getVar('orders', array());\n $total = 0;\n // Get the list of orders in post to update\n foreach ($orderslist as $key => $order) {\n if ($orderslist[$key]['order_status'] !== $orderslist[$key]['current_order_status']) {\n $orders[$key] = $orderslist[$key];\n $total++;\n }\n }\n }\n\n if (!is_array($orders)) {\n $orders = array($orders);\n }\n\n /* Process the orders to update */\n $updated = 0;\n $error = 0;\n if ($orders) {\n // $notify = vRequest::getVar('customer_notified', array()); // ???\n // $comments = vRequest::getVar('comments', array()); // ???\n foreach ($orders as $virtuemart_order_id => $order) {\n if ($order_id > 0) $virtuemart_order_id = $order_id;\n $this->useDefaultEmailOrderStatus = false;\n if ($this->updateStatusForOneOrder($virtuemart_order_id, $order, true)) {\n $updated++;\n } else {\n $error++;\n }\n }\n }\n $result = array('updated' => $updated, 'error' => $error, 'total' => $total);\n return $result;\n }", "protected function _fcpoSetOrderStatus() {\n $blIsAmazonPending = $this->_oFcpoHelper->fcpoGetSessionVariable('fcpoAmazonPayOrderIsPending');\n $blOrderOk = $this->_fcpoValidateOrderAgainstProblems();\n\n if ($blIsAmazonPending) {\n $this->_setOrderStatus('PENDING');\n $this->oxorder__oxfolder = new oxField('ORDERFOLDER_PROBLEMS', oxField::T_RAW);\n $this->save();\n } elseif ($blOrderOk === true) {\n // updating order trans status (success status)\n $this->_setOrderStatus('OK');\n } else {\n $this->_setOrderStatus('ERROR');\n }\n }", "public function updating(Order $order): void\n\t{\n\t\tif ($order->status == 'pending') {\n\t\t\t$order->booster_id = null;\n\t\t}\n\t}", "function _correctOrderStatusName( &$orderStatus ){\r\n\r\n\tif ( $orderStatus[\"statusID\"] == ostGetCanceledStatusId() )\r\n\t$orderStatus[\"status_name\"] = translate(\"ordr_status_cancelled\");\r\n}", "protected function deleteOrderStatusRequest($order_status_id)\n {\n // verify the required parameter 'order_status_id' is set\n if ($order_status_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $order_status_id when calling deleteOrderStatus'\n );\n }\n if ($order_status_id < 1) {\n throw new \\InvalidArgumentException('invalid value for \"$order_status_id\" when calling DefaultApi.deleteOrderStatus, must be bigger than or equal to 1.');\n }\n $resourcePath = '/order-statuses/{orderStatusId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // path params\n if ($order_status_id !== null) {\n $resourcePath = str_replace(\n '{' . 'orderStatusId' . '}',\n ObjectSerializer::toPathValue($order_status_id),\n $resourcePath\n );\n }\n // body params\n $_tempBody = null;\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n \n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n \n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function set_status( $order, $reset_status = false ) {\n\n\t\t\t/**\n\t\t\t * Post meta table.\n\t\t\t */\n\t\t\t$post_status = get_post_meta( $order['post_id'], self::LANGUAGE_POST_STATUS, true );\n\n\t\t\tif ( ! is_array( $post_status ) ) {\n\t\t\t\t// Meta value is invalid. Reset to an empty array.\n\t\t\t\t$post_status = array();\n\t\t\t}\n\n\t\t\t$result_meta = true;\n\t\t\t$message = '';\n\t\t\t$status_changed = false;\n\n\t\t\tif ( 'draft' === $order['status'] ) {\n\t\t\t\tif ( empty( $post_status[ $order['language'] ] ) || $post_status[ $order['language'] ] != $order['status'] ) {\n\t\t\t\t\t$post_status[ $order['language'] ] = $order['status'];\n\t\t\t\t\t$status_changed = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tunset( $post_status[ $order['language'] ] );\n\t\t\t\t$status_changed = true;\n\t\t\t}\n\n\t\t\tif ( empty( $post_status ) ) :\n\t\t\t\t$result_meta = delete_post_meta( $order['post_id'], self::LANGUAGE_POST_STATUS );\n\t\t\telse:\n\t\t\t\tif ( $status_changed ) {\n\t\t\t\t\t$result_meta = update_post_meta( $order['post_id'], self::LANGUAGE_POST_STATUS, $post_status );\n\t\t\t\t}\n\t\t\tendif;\n\n\t\t\tif ( $status_changed ) {\n\t\t\t\tif ( $result_meta ) {\n\t\t\t\t\t$message = esc_html( sprintf( __( 'Successfully set to \"%s\"', 'wpglobus-plus' ), ucfirst( $order['status'] ) ) );\n\t\t\t\t} else {\n\t\t\t\t\t$message = esc_html( sprintf( __( 'Setting to \"%s\" FAILED!', 'wpglobus-plus' ), ucfirst( $order['status'] ) ) );\n\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$message = esc_html( sprintf( __( 'Already set to \"%s\". Not changing.', 'wpglobus-plus' ), ucfirst( $order['status'] ) ) );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Options table.\n\t\t\t */\n\t\t\t$result_option = true;\n\t\t\t$lang_status = get_option( self::LANGUAGE_STATUS );\n\n\t\t\tif ( empty( $post_status ) ) {\n\n\t\t\t\tif ( ! empty( $lang_status[ $order['language'] ] ) && isset( $lang_status[ $order['language'] ][ $order['post_id'] ] ) ) {\n\t\t\t\t\tunset( $lang_status[ $order['language'] ][ $order['post_id'] ] );\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif ( 'draft' === $order['status'] ) {\n\t\t\t\t\t$lang_status[ $order['language'] ][ $order['post_id'] ] = $order['post_id'];\n\t\t\t\t} else {\n\t\t\t\t\tif ( ! empty( $lang_status[ $order['language'] ] ) && isset( $lang_status[ $order['language'] ][ $order['post_id'] ] ) ) {\n\t\t\t\t\t\tunset( $lang_status[ $order['language'] ][ $order['post_id'] ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t};\n\n\t\t\tif ( isset( $lang_status[ $order['language'] ] ) && empty( $lang_status[ $order['language'] ] ) ) {\n\t\t\t\tunset( $lang_status[ $order['language'] ] );\n\t\t\t}\n\n\t\t\tif ( empty( $lang_status ) ) {\n\t\t\t\t$result_option = delete_option( self::LANGUAGE_STATUS );\n\t\t\t} else {\n\n\t\t\t\t$result_option = update_option( self::LANGUAGE_STATUS, $lang_status, false );\n\t\t\t\tif ( $reset_status ) {\n\t\t\t\t\t$result_option = $this->reset_status();\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t$return = array();\n\t\t\t$return['action'] \t= $order['action'];\n\t\t\t$return['post_id'] \t= $order['post_id'];\n\t\t\t$return['language'] = $order['language'];\n\t\t\t$return['status'] \t= $order['status'];\n\t\t\t$return['message'] \t= $message;\n\n\t\t\treturn $return;\n\n\t\t}", "public function hookActionOrderStatusUpdate($params)\n {\n $status = $params['newOrderStatus']?$params['newOrderStatus']->id:false;\n\n if ($status === 7/** Refund status id */) {\n /** If transaction is registred in twispay transactions list */\n $transaction = Twispay_Transactions::getTransactionByCartId($params['cart']->id);\n if ($transaction) {\n if ($transaction['status'] == Twispay_Status_Updater::$RESULT_STATUSES['REFUND_OK']) {\n Twispay_Logger::api_log($this->l('Order already refunded.'));\n $this->context->cookie->redirect_error = $this->l('Order already refunded.');\n } else {\n $keys = self::getKeysInfo();\n if (!$keys) {\n $this->context->cookie->redirect_error = $this->l('Twispay refund error: ').$this->l('Invalid API Keys.');\n /** Redirect to order page */\n /** Skip the part when the status is set */\n Tools::redirect($_SERVER['HTTP_REFERER']);\n die();\n }\n $refund = Twispay_Transactions::refundTransaction($transaction, $keys, $this);\n if ($refund['refunded']) {\n Twispay_Logger::api_log($this->l('Successfully refunded ').json_encode($refund));\n } else {\n Twispay_Logger::api_log($this->l('Twispay refund error: ').json_encode($refund));\n $this->context->cookie->redirect_error = $this->l('Twispay refund error: ').$refund['status'];\n /** Redirect to order page */\n /** Skip the part when the status is set */\n Tools::redirect($_SERVER['HTTP_REFERER']);\n die();\n }\n }\n /** If the order was not payed via twispay */\n } else {\n Twispay_Logger::api_log($this->l('Twispay refund error: ').$this->l('No transactions were found for order with id ').$params['id_order']);\n $this->context->cookie->redirect_error = $this->l('Twispay refund error: ').$this->l('No transactions were found for this order.');\n }\n }\n }", "public function getListOrderStatus(){\n\n return $this->client->makeRequest('orderstatus', 'GET');\n }", "public function clearOptions()\n {\n $this->_options = array();\n }", "public function actionAjaxServiceTypeStatusDeactivate()\n {\n $id=$_REQUEST['id'];\n \t $rec=ServiceTypes::model()->findByPk($id);\n \t $status=$rec->status;\n \n if($status==1)\n {\n \t $rec->status=0;\n \t $rec->save(false);\n\n }\t\n else\n {\n \t $rec->status=1;\n \t $rec->save();\n\n }\n\n\n }", "public function changeOrderStatus(Order $order, Request $request)\n\t{\n\n\t\ttry\n\t\t{\n\t\t\t$data = request()->all();\n\t\t\t\t\n\t\t\t \n\t\t\tif(isset($data['id']))\n\t\t\t{\n\t\t\t\tif($data['value'] == 5) {\n\t\t\t\t\tfor ($i=0; $i<count($request->id); $i++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->Order->where('id',$request->id[$i])->update(['order_status_id' => $data['value'],'delivered_date'=>date('Y-m-d')]);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tfor ($i=0; $i<count($request->id); $i++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->Order->where('id',$request->id[$i])->update(['order_status_id' => $data['value']]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t\t$message = $this->success($this->updated,'Oder');\n\t\t\t\t$cnt = $this->orderCount();\n\t\t\t\treturn response()->json(['orderStatus' => $status ,'pId'=> $request->id,'cnt' => $cnt ,'message' => $message]);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tcatch (\\Exception $e) {\n\t\t\tdd($e);\n\t\t\treturn $this->debugLog($e->getMessage());\n\t\t}\n\t}", "public function destroy(Order $order)\n {\n if ($order->rollback()) {\n return response()->json(['status' => true]);\n } else {\n return response()->json(['status' => false]);\n }\n }", "abstract public function removeState(array $options);", "public function destroy(Status $status)\n {\n $this->authorize('delete', $status);\n $status->delete();\n }", "private function getOrderStatus(OrderModel $order)\n {\n $orderItems = $order->getAllItems();\n $status = [];\n foreach ($orderItems as $orderItem) {\n if (!$orderItem->getParentItemId()) {\n $status[] = $this->getItemStatus($orderItem);\n }\n }\n \n if (count(array_unique($status)) == 1) {\n return current($status);\n }\n \n if (in_array($this->orderStatusHelper->getOrderedStatus(), $status)) {\n return $this->orderStatusHelper->getPartialStatus();\n }\n \n if (in_array($this->orderStatusHelper->getPartialStatus(), $status)) {\n return $this->orderStatusHelper->getPartialStatus();\n }\n \n if (in_array($this->orderStatusHelper->getCancelledStatus(), $status)\n && in_array($this->orderStatusHelper->getShippedStatus(), $status)) {\n return $this->orderStatusHelper->getShippedStatus();\n }\n \n return $this->orderStatusHelper->getPartialStatus();\n }", "public function clearOrder() {\n\t\t\t$this->order->clearOrder();\n\t\t}", "public function updateOrderStatus($orderStatus, $comment = '')\n {\n $this->openCart->load->model('extension/payment/mundipagg_order_processing');\n $model = $this->openCart->model_extension_payment_mundipagg_order_processing;\n\n $model->addOrderHistory(\n $this->openCart->session->data['order_id'],\n $orderStatus,\n $comment,\n true\n );\n\n $model->setOrderStatus(\n $this->openCart->session->data['order_id'],\n $orderStatus\n );\n }", "protected function reset_post_statuses()\n {\n foreach (get_post_stati(array('_builtin' => false)) as $post_status) {\n _unregister_post_status($post_status);\n }\n }", "public function toOptionArray()\n {\n $returnArray = array();\n $returnArray[] = array('value' => '', 'label' => Mage::helper('fooman_ordermanager')->__('Default'));\n foreach (Mage::getModel('sales/order_config')->getStatuses() as $status => $statusLabel) {\n $returnArray[] = array('value' => $status, 'label' => Mage::helper('sales')->__($statusLabel));\n }\n return $returnArray;\n }", "public function edit(StatusOrder $statusOrder)\n {\n //\n }", "public function change_order_status_post()\n {\n $pdata = file_get_contents(\"php://input\");\n $data = json_decode($pdata,true);\n $id = $data['order_id'];\n $status = $data['status'];\n $user_id = $data['user_id'];\n // $this->response($user_id);\n $data = array(\n 'status' => $status\n );\n \n $where = array(\n 'id' => $id\n );\n $this->model->update('orders', $data, $where);\n $message = \"Your Order is $status\";\n \n $resp = array('rccode' => 200,'message' => $message);\n $this->response($resp);\n //}\n \n \n }", "public static function ResetMarkOrderProcessAsCompleted()\n {\n if (array_key_exists(self::SESSION_KEY_NAME_ORDER_SUCCESS, $_SESSION)) {\n unset($_SESSION[self::SESSION_KEY_NAME_ORDER_SUCCESS]);\n }\n }", "public function unsetOrderId(): void\n {\n $this->orderId = [];\n }", "public function getOrderStatus()\n {\n return $this->status;\n }", "public function prune($rOperationStatusRequiredOptions = null)\n {\n if ($rOperationStatusRequiredOptions) {\n $this->addCond('pruneCond0', $this->getAliasedColName(ROperationStatusRequiredOptionsPeer::R_OPERATION_STATUS_REQUIRED_OPTIONS_R_OPERATION_STATUS_OS_ID), $rOperationStatusRequiredOptions->getROperationStatusRequiredOptionsROperationStatusOsId(), Criteria::NOT_EQUAL);\n $this->addCond('pruneCond1', $this->getAliasedColName(ROperationStatusRequiredOptionsPeer::R_OPERATION_STATUS_REQUIRED_OPTIONS_R_OPERATION_OPTION_ID), $rOperationStatusRequiredOptions->getROperationStatusRequiredOptionsROperationOptionId(), Criteria::NOT_EQUAL);\n $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR);\n }\n\n return $this;\n }", "function &getStatusOptions() {\n\t\t$statusOptions = array(\n\t\t\tSUBSCRIPTION_STATUS_ACTIVE => 'subscriptions.status.active',\n\t\t\tSUBSCRIPTION_STATUS_NEEDS_INFORMATION => 'subscriptions.status.needsInformation',\n\t\t\tSUBSCRIPTION_STATUS_NEEDS_APPROVAL => 'subscriptions.status.needsApproval',\n\t\t\tSUBSCRIPTION_STATUS_AWAITING_MANUAL_PAYMENT => 'subscriptions.status.awaitingManualPayment',\n\t\t\tSUBSCRIPTION_STATUS_AWAITING_ONLINE_PAYMENT => 'subscriptions.status.awaitingOnlinePayment',\n\t\t\tSUBSCRIPTION_STATUS_OTHER => 'subscriptions.status.other'\n\t\t);\n\n\t\treturn $statusOptions;\n\t}", "protected function patchOrderStatusRequest($body, $order_status_id)\n {\n // verify the required parameter 'body' is set\n if ($body === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling patchOrderStatus'\n );\n }\n // verify the required parameter 'order_status_id' is set\n if ($order_status_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $order_status_id when calling patchOrderStatus'\n );\n }\n if ($order_status_id < 1) {\n throw new \\InvalidArgumentException('invalid value for \"$order_status_id\" when calling DefaultApi.patchOrderStatus, must be bigger than or equal to 1.');\n }\n $resourcePath = '/order-statuses/{orderStatusId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // path params\n if ($order_status_id !== null) {\n $resourcePath = str_replace(\n '{' . 'orderStatusId' . '}',\n ObjectSerializer::toPathValue($order_status_id),\n $resourcePath\n );\n }\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\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 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 'PATCH',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function destroy(Status $status)\n {\n if ($status->delete()) {\n return response()->json([], 204);\n } else {\n return response()->json([\n 'error' => 'Can not delete status'\n ], 500);\n }\n }", "function attendance_remove_status($status, $context = null, $cm = null) {\n global $DB;\n if (empty($context)) {\n $context = context_system::instance();\n }\n $DB->set_field('attendance_statuses', 'deleted', 1, array('id' => $status->id));\n $event = \\mod_attendance\\event\\status_removed::create(array(\n 'objectid' => $status->id,\n 'context' => $context,\n 'other' => array(\n 'acronym' => $status->acronym,\n 'description' => $status->description\n )));\n if (!empty($cm)) {\n $event->add_record_snapshot('course_modules', $cm);\n }\n $event->add_record_snapshot('attendance_statuses', $status);\n $event->trigger();\n}", "public function listsstatusdelete($status_id)\r\n {\r\n $deleted_status = Status::destroy($status_id);\r\n if($deleted_status){\r\n return response()->json(['msg' => 'Deleted status']);\r\n }\r\n }", "public function setStatuses(&$var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::ENUM, \\Salesorders\\V1\\Status::class);\n $this->statuses = $arr;\n }", "public function batch_clear_result_status() {\n\t\treturn delete_metadata( 'user', null, $this->slug . '_status', '', true );\n\t}", "private function cancelFBAShipment(\n \\Magento\\Sales\\Model\\Order $order,\n \\FBAOutboundServiceMWS_Model_GetFulfillmentOrderResult $fulfillmentResult,\n $amazonStatus\n ) {\n\n if ($order->canCancel()) {\n $shipment = $fulfillmentResult->getFulfillmentOrderItem();\n $skus = [];\n // Get skus from cancelled order\n foreach ($shipment->getmember() as $amazonShipment) {\n $skus[] = $amazonShipment->getSellerSKU();\n }\n\n // if there are skus, match them to products in the order. We want to cancel specific\n // items not the entire order.\n if ($skus) {\n $canceledSku = [];\n foreach ($order->getAllItems() as $item) {\n $product = $item->getProduct();\n if (in_array($product->getSku(), $skus) || in_array($product->getAmazonMcfMerchantSku(), $skus)) {\n // check to make sure the item hasn't already been canceled\n if ($item->getQtyOrdered() != $item->getQtyCanceled()) {\n $qty = $item->getQtyOrdered();\n\n $item->setQtyCanceled($qty);\n $item->save();\n $canceledSku[] = $product->getSku();\n }\n }\n }\n\n // If we have canceled items, add a comment.\n if ($canceledSku) {\n $this->helper->logOrder(\n 'FBA order canceled - items set to canceled with SKUs: ' . implode(\", \", $canceledSku)\n );\n $order->addStatusHistoryComment(\n \"FBA items with Magento SKUs: \" . implode(\", \", $canceledSku)\n . \" are unable to be fulfilled. Check your seller central account for more information.\"\n );\n $order->save();\n }\n }\n }\n }", "public function cancel_all_orders()\n {\n return $this->_request('cancelallorders');\n }", "public function filter_orders_by_export_status() {\n\t\tglobal $typenow;\n\n\t\tif ( 'shop_order' === $typenow ) {\n\n\t\t\t$count = $this->get_order_count();\n\n\t\t\t$terms = array(\n\t\t\t\t0 => (object) array( 'count' => $count['not_exported'], 'term' => __( 'Not Exported to CSV', 'woocommerce-customer-order-csv-export' ) ),\n\t\t\t\t1 => (object) array( 'count' => $count['exported'], 'term' => __( 'Exported to CSV', 'woocommerce-customer-order-csv-export' ) )\n\t\t\t);\n\n\t\t\t?>\n\t\t\t<select name=\"_shop_order_csv_export_status\" id=\"dropdown_shop_order_csv_export_status\">\n\t\t\t\t<option value=\"\"><?php _e( 'Show all orders', 'woocommerce-customer-order-csv-export' ); ?></option>\n\t\t\t\t<?php foreach ( $terms as $value => $term ) : ?>\n\t\t\t\t<option value=\"<?php echo esc_attr( $value ); ?>\" <?php echo esc_attr( isset( $_GET['_shop_order_csv_export_status'] ) ? selected( $value, $_GET['_shop_order_csv_export_status'], false ) : '' ); ?>>\n\t\t\t\t\t<?php printf( '%1$s (%2$s)', esc_html( $term->term ), esc_html( $term->count ) ); ?>\n\t\t\t\t</option>\n\t\t\t\t<?php endforeach; ?>\n\t\t\t</select>\n\t\t\t<?php\n\t\t}\n\t}", "public function hookActionOrderStatusUpdate($params)\n {\n if (!empty($params['id_order'])) {\n $lastOrderStatus = OrderHistory::getLastOrderState($params['id_order']);\n $config = Tools::jsonDecode(Configuration::get('KB_PUSH_NOTIFICATION'), true);\n if (!empty($config) && isset($config['module_config']['enable'])) {\n if (!empty($lastOrderStatus)) {\n $order = new Order($params['id_order']);\n $current_order_status = $params['newOrderStatus']->id;\n $old_order_status = $order->current_state;\n $module_config = $config['module_config'];\n $id_shop = $params['cart']->id_shop;\n $id_lang = $params['cart']->id_lang;\n if ($module_config['enable'] && $module_config['enable_order_status']) {\n $orderStatus_old = new OrderState($old_order_status, $id_lang);\n $orderStatus_new = new OrderState($current_order_status, $id_lang);\n $current_status = $orderStatus_new->name;\n $old_status = $orderStatus_old->name;\n $id_guest = Db::getInstance()->getValue('SELECT id_guest FROM `'._DB_PREFIX_.'guest` WHERE `id_customer` ='.(int)$params['cart']->id_customer);\n $reg_id = KbPushSubscribers::getSubscriberRegIDs($id_guest, $id_shop);\n\n if (empty($reg_id)) {\n $id_guest = $params['cart']->id_guest;\n $reg_id = KbPushSubscribers::getSubscriberRegIDs($id_guest, $id_shop);\n }\n if (!empty($reg_id) && count($reg_id) > 0) {\n $reg_id = $reg_id[count($reg_id)-1]['reg_id'];\n $fcm_setting = Tools::jsonDecode(Configuration::get('KB_PUSH_FCM_SERVER_SETTING'), true);\n if (!empty($fcm_setting)) {\n $fcm_server_key = $fcm_setting['server_key'];\n $headers = array(\n 'Authorization:key=' . $fcm_server_key,\n 'Content-Type:application/json'\n );\n $id_template = KbPushTemplates::getNotificationTemplateIDByType(self::KBPN_ORDER_STATUS_UPDATE);\n if (!empty($id_template)) {\n $fields = array();\n $fields = $this->getNotificationPushData($id_template, $id_lang, $id_shop);\n if (!empty($fields)) {\n $kbTemplate = new KbPushTemplates($id_template, false, $id_shop);\n $message = '';\n if (isset($fields['data']['body'])) {\n $message = $fields['data']['body'];\n if ($kbTemplate->notification_type == self::KBPN_ORDER_STATUS_UPDATE) {\n $orderTotal = $order->getOrdersTotalPaid();\n $orderTotal = Tools::displayPrice($orderTotal);\n $message = str_replace('{{kb_order_reference}}', $order->reference, $message);\n $message = str_replace('{{kb_order_amount}}', $orderTotal, $message);\n $message = str_replace('{{kb_order_before_status}}', $old_status, $message);\n $message = str_replace('{{kb_order_after_status}}', $current_status, $message);\n $fields['data']['body'] = $message;\n }\n }\n $is_sent = 1;\n $push_id = $this->savePushNotification($kbTemplate, $is_sent, array($reg_id));\n if (!empty($push_id)) {\n $fields['to'] = $reg_id;\n $fields[\"data\"][\"base_url\"] = $this->getBaseUrl();\n $fields[\"data\"][\"click_url\"] = $this->context->link->getModuleLink($this->name, 'serviceworker', array('action' => 'updateClickPush'), (bool) Configuration::get('PS_SSL_ENABLED'));\n $fields[\"data\"]['push_id'] = $push_id;\n $result = $this->sendPushRequestToFCM($headers, $fields);\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }", "public function updateStatusFinish()\n {\n $this->resetStatuses();\n }", "public function reset()\n {\n $this->values[self::_STATUS] = null;\n $this->values[self::_REWARDS] = array();\n }", "public function orderStatusManager(Mage_Sales_Model_Order $order, $paymentStatus = null)\n {\n $this->_getPaymentHelper()->orderStatusManager($order, $paymentStatus);\n $order->setShopgateStatusSet(true);\n\n return $order;\n }", "function wcpdf_filter_order_ids( $order_ids, $document_type ) {\n\t$order_ids = apply_filters( 'wpo_wcpdf_process_order_ids', $order_ids, $document_type );\n\t// filter out trashed orders\n\tforeach ( $order_ids as $key => $order_id ) {\n\t\t$order_status = get_post_status( $order_id );\n\t\tif ( $order_status == 'trash' ) {\n\t\t\tunset( $order_ids[ $key ] );\n\t\t}\n\t}\n\treturn $order_ids;\n}", "public function update(OrderStatus $orderStatus)\n {\n try {\n\n $updateRequest = new OrderStatusUpdateRequest();\n $validator = Validator::make(request()->all(), $updateRequest->rules());\n\n if ($validator->fails()) {\n\n return $this->sendBadRequest('Validation Error.', $validator->errors()->toArray());\n }\n\n $item = $this->orderStatusService->update(request()->all(), $orderStatus);\n\n return $this->sendResponse($item->toArray());\n\n } catch (Exception $exception) {\n\n return $this->sendError('Server Error.', $exception);\n\n }\n }", "public function cancelOrderByUser(Request $req){\n $validation = Validator::make($req->all(),[\n \"orders_id\" => \"required|numeric|exists:orders,id\"\n ]);\n if($validation->fails())\n {\n return $this->apiResponseNoObj(400,$validation->errors());\n }\n\n /*Check status of this order */\n $order = Order::find($req->orders_id);\n if($order->status != \"awaitingPayment\"){\n return $this->apiResponseNoObj(423,\"can't cancel the order\");\n }\n \n /*update status of this order*/\n $order->status = \"cancelledByUser\";\n $order->save();\n\n /*retrun data*/\n return $this->apiResponseNoObj(200,\"Successfully canceled\");\n }", "public function getPendingOrders($status) {\r\n if($status != \"all\"):\r\n $orders = Mage::getModel('marketplace/commission')->getCollection();\r\n $orders->addFieldToSelect('*');\r\n $orders->addFieldToFilter('seller_id', Mage::getSingleton('customer/session')->getCustomer()->getId());\r\n $orders ->getSelect()\r\n ->columns('SUM(seller_amount) as seller_amount')\r\n ->group('order_id'); \r\n /**\r\n * Set order for manage order\r\n */\r\n $orders->setOrder('order_id', 'desc');\r\n /**\r\n * Return orders\r\n */\r\n $condition = new Zend_Db_Expr(\"sales.entity_id = main_table.order_id AND sales.status = '$status'\");\r\n $orders->getSelect()->join(array('sales' => $orders->getTable('sales/order')),\r\n $condition,\r\n array('status' => 'sales.status'));\r\n elseif($status == \"all\"):\r\n $orders = Mage::getModel('marketplace/commission')->getCollection();\r\n $orders->addFieldToSelect('*');\r\n $orders->addFieldToFilter('seller_id', Mage::getSingleton('customer/session')->getCustomer()->getId());\r\n $orders ->getSelect()\r\n ->columns('SUM(seller_amount) as seller_amount')\r\n ->group('order_id'); \r\n /**\r\n * Set order for manage order\r\n */\r\n $orders->setOrder('order_id', 'desc');\r\n /**\r\n * Return orders\r\n */\r\n endif;\r\n return $orders; \r\n }", "public function setStatusesForRemoving(array $statuses = [])\n {\n $this->statusesForRemoving = $statuses;\n\n return $this;\n }", "public function status_filter() {\n\n\t\tglobal $typenow;\n\n\t\tif ( ('ticket' != $typenow ) || isset( $_GET['post_status'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this_sort = isset( $_GET['dev_status'] ) ? filter_input( INPUT_GET, 'dev_status', FILTER_SANITIZE_STRING ) : '';\n\t\t$all_selected = ( '' === $this_sort ) ? 'selected=\"selected\"' : '';\n\t\t$open_selected = ( ! isset( $_GET['dev_status'] ) && true === (bool) dev_get_option( 'hide_closed' ) || 'open' === $this_sort ) ? 'selected=\"selected\"' : '';\n\t\t$closed_selected = ( 'closed' === $this_sort ) ? 'selected=\"selected\"' : '';\n\t\t$dropdown = '<select id=\"dev_status\" name=\"dev_status\">';\n\t\t$dropdown .= \"<option value='' $all_selected>\" . __( 'Any Status', TEXTDOMAIN ) . \"</option>\";\n\t\t$dropdown .= \"<option value='open' $open_selected>\" . __( 'Open', TEXTDOMAIN ) . \"</option>\";\n\t\t$dropdown .= \"<option value='closed' $closed_selected>\" . __( 'Closed', TEXTDOMAIN ) . \"</option>\";\n\t\t$dropdown .= '</select>';\n\n\t\techo $dropdown;\n\n\t}", "public function setTransactionStatus($orderId, string $status);", "public function resetOptions()\n {\n $this->options = array();\n }", "function getTenantStatusListBasedOnStatus($status_id)\n{\n $status_list = getTenantStatuses();\n unset($status_list[$status_id]);\n if($status_id == 2) {\n unset($status_list[1]); unset($status_list[4]);\n }\n else if($status_id == 3) {\n unset($status_list[1]); unset($status_list[2]);\n }\n return $status_list;\n}", "private function cancelOrder($order){\r\n $this->log('Cancelling order #'.$order->get_order_number());\r\n $this->addOrderNote($order, 'La orden fue cancelada por Flow');\r\n $order->update_status('cancelled');\r\n }", "function ReviseCheckoutStatusResponseType()\n\t{\n\t\t$this->AbstractResponseType('ReviseCheckoutStatusResponseType', 'urn:ebay:apis:eBLBaseComponents');\n\n\t}", "public function hookpostUpdateOrderStatus($params)\n {\n $orderid = $params['id_order'];\n $order = new Order((int)$orderid);\n $statusid = ($order)? $order->current_state : '';\n if ($statusid == Configuration::get('PS_OS_SHIPPING') || $statusid == Configuration::get('PS_OS_DELIVERED')) {\n // For Shipment confirmation\n if ($statusid == Configuration::get('PS_OS_SHIPPING')) {\n $isActivate = $this->isRulesetActive('shipment_confirmation');\n }\n // For On Delivery confirmation\n if ($statusid == Configuration::get('PS_OS_DELIVERED')) {\n $isActivate = $this->isRulesetActive('on_delivery_confirmation');\n }\n if ($isActivate != null && $isActivate != '' && $this->smsAPI != null && $this->smsAPI != '') {\n $address = new Address((int)$order->id_address_delivery);\n if ($order) {\n $address = new Address((int)$order->id_address_delivery);\n $legendstemp = $this->replaceOrderLegends(\n $isActivate[0]['template'],\n $order,\n $address\n );\n // Use send SMS API here\n $legendstemp = preg_replace('/<br(\\s+)?\\/?>/i', \"\\n\", $legendstemp);\n $postAPIdata = array(\n 'label' => $isActivate[0]['label'],\n 'sms_text' => $legendstemp,\n 'source' => '21000',\n 'sender_id' => $isActivate[0]['senderid'],\n 'mobile_number' => $address->phone_mobile\n );\n $this->sendSMSByAPI($postAPIdata);\n Onehopsmsservice::onehopSaveLog($statusid, $legendstemp, $address->phone_mobile);\n }\n }\n }\n }", "public function setOrderItemStatus(Property\\OrderItemStatusProperty $orderItemStatus) {\n\t\t$this->orderItemStatus = $orderItemStatus;\n\n\t\treturn $this;\n\t}", "public function getOrderByStatus($status = '')\n {\n $arr_data = [];\n switch ($status) {\n case 'reserved':\n $arr_data = PaymentStatus::RESERVED;\n break;\n case 'booking':\n $arr_data = PaymentStatus::BOOKING;\n break;\n case 'dp':\n $arr_data = PaymentStatus::DP;\n break;\n case 'cash-bertahap':\n $arr_data = PaymentStatus::CASH_BERTAHAP;\n break;\n default:\n break;\n }\n $having = [];\n foreach($arr_data as $id){\n array_push($having, \"SUM(payment_status_id = $id)\");\n }\n array_push($having, \"NOT SUM(payment_status_id NOT IN (\".join(\",\", $arr_data).\"))\");\n $having = join(\" AND \", $having);\n // dd($having);\n $orderId = DB::table('payment_histories')->select('order_id')\n ->groupBy(['order_id'])\n ->havingRaw($having)\n ->get()->pluck('order_id')->toArray();\n \n return $orderId;\n }", "public function toOptionArray()\n {\n\t\t$result = array();\n\t\t\n\t\t$data = Mage::getModel('sales/order_status')->getResourceCollection()->getData();\n \n if(!is_null($data))\n {\n\t\t\tforeach($data as $row)\t\t\t\n\t\t\t\t$result[] = array('value' => $row['status'], 'label'=>Mage::helper('adminhtml')->__($row['label']));\t\t\t\n\t\t}\n \n return $result;\n }", "protected function showPaymentStatusUpdater(jshopOrder $order)\r\n {\r\n JFactory::getSession()->set('jshop_send_end_form', 0);\r\n $formAction = $this->getActionUrl('', $order->order_id, 6) . '&payment_stage=status';\r\n\r\n require_once __DIR__ . '/status_form.php';\r\n }", "public function excludingStatus($status)\n {\n $this->whereClause .= ' AND status <> ?';\n $this->parameterList[] = $status;\n\n return $this;\n }", "public function deactivate()\n {\n $this->op->request('DELETE', '/api/prom/configs/deactivate', [\n 'headers' => [\n 'X-Scope-OrgID' => $this->consumerId,\n ]\n ]);\n }", "function cancelOrder($orderNum)\n\t\t{\n\t\t\t$db = dbConnect::getInstance();\n \t\t $mysqli = $db->getConnection();\n\t\t\t $query = \" update check_tb set status = '4' where id='\".$orderNum.\"' \"; \n $res=$mysqli->query($query) or die (mysqli_error($mysqli));\n\t\t\tif($res)\n\t\t\t{\n\t\t\t\treturn true;\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\t\n\t\t\t}\n\t\t}", "function updateStatusForOneOrder($virtuemart_order_id, $inputOrder, $useTriggers = true)\n {\n\n //vmdebug('updateStatusForOneOrder', $inputOrder);\n\n /* Update the order */\n $data = $this->getTable('orders');\n $data->load($virtuemart_order_id);\n $old_order_status = $data->order_status;\n $old_o_hash = $data->o_hash;\n if (empty($inputOrder['virtuemart_order_id'])) {\n unset($inputOrder['virtuemart_order_id']);\n }\n\n $data->bind($inputOrder);\n\n $cp_rm = VmConfig::get('cp_rm', array('C'));\n if (!is_array($cp_rm)) $cp_rm = array($cp_rm);\n\n if (in_array((string) $data->order_status, $cp_rm)) {\n if (!empty($data->coupon_code)) {\n CouponHelper::RemoveCoupon($data->coupon_code);\n }\n }\n //First we must call the payment, the payment manipulates the result of the order_status\n if ($useTriggers) {\n\n\n $_dispatcher = JDispatcher::getInstance(); //Should we add this? $inputOrder\n $_returnValues = $_dispatcher->trigger('plgVmOnUpdateOrderShipment', array(&$data, $old_order_status, $inputOrder));\n\n // Payment decides what to do when order status is updated\n $_returnValues = $_dispatcher->trigger('plgVmOnUpdateOrderPayment', array(&$data, $old_order_status, $inputOrder));\n foreach ($_returnValues as $_returnValue) {\n if ($_returnValue === true) {\n break; // Plugin was successfull\n } elseif ($_returnValue === false) {\n return false; // Plugin failed\n }\n // Ignore null status and look for the next returnValue\n }\n\n /**\n * If an order gets cancelled, fire a plugin event, perhaps\n * some authorization needs to be voided\n */\n if ($data->order_status == \"X\") {\n\n $_dispatcher = JDispatcher::getInstance();\n //Should be renamed to plgVmOnCancelOrder\n $_dispatcher->trigger('plgVmOnCancelPayment', array(&$data, $old_order_status));\n }\n }\n\n if (empty($data->delivery_date)) {\n $del_date_type = VmConfig::get('del_date_type', 'm');\n if (strpos($del_date_type, 'os') !== FALSE) { //for example osS\n $os = substr($del_date_type, 2);\n if ($data->order_status == $os) {\n $date = JFactory::getDate();\n $data->delivery_date = $date->toSQL();\n }\n } else {\n vmLanguage::loadJLang('com_virtuemart_orders', true);\n $data->delivery_date = vmText::_('COM_VIRTUEMART_DELDATE_INV');\n }\n }\n\n //if ($data->store()) {\n\n $task = vRequest::getCmd('task', 0);\n $view = vRequest::getCmd('view', 0);\n\n //The item_id of the request is already given as inputOrder by the calling function (controller). inputOrder could be manipulated by the\n //controller and so we must not use the request data here.\n $upd_items = vRequest::getVar('item_id', false);\n if ($upd_items) {\n\n //get tax calc_value of product VatTax\n $db = JFactory::getDBO();\n $sql = 'SELECT * FROM `#__virtuemart_order_calc_rules` WHERE `virtuemart_order_id` = \"' . $virtuemart_order_id . '\" ORDER BY virtuemart_order_item_id';\n $db->setQuery($sql);\n $orderCalcs = $db->loadObjectList();\n //vmdebug('$orderCalcs',$orderCalcs);\n $allTaxes = array();\n //$taxes = array();\n //$taxes['VatTax'] = array();\n $orderCalcRulesTable = $this->getTable('order_calc_rules');\n\n $data->order_salesPrice = 0.0;\n foreach ($inputOrder as $item_id => $order_item_data) {\n\n if (!empty($item_id) and !is_integer($item_id) and strpos($item_id, '0-') !== 0) continue; //Attention, we need the check against empty, else it continues for \"0\"\n //vmdebug('$order_item_data',$order_item_data);\n $order_item_data['current_order_status'] = $order_item_data['order_status'];\n if (!isset($order_item_data['comments'])) $order_item_data['comments'] = '';\n $order_item_data = (object)$order_item_data;\n $order_item_data->virtuemart_order_id = $virtuemart_order_id;\n $order_item_data->virtuemart_order_item_id = $item_id;\n //$this->updateSingleItem($order_item->virtuemart_order_item_id, $data->order_status, $order['comments'] , $virtuemart_order_id, $data->order_pass);\n if (empty($item_id)) {\n $inputOrder['comments'] .= ' ' . vmText::sprintf('COM_VIRTUEMART_ORDER_PRODUCT_ADDED', $order_item_data->order_item_name);\n }\n\n\n $toRemove = array();\n $taxes = array();\n if (empty($order_item_data->product_tax_id)) {\n $order_item_data->product_tax_id = array();\n } else if (!is_array($order_item_data->product_tax_id)) {\n $order_item_data->product_tax_id = array($order_item_data->product_tax_id);\n }\n\n foreach ($orderCalcs as $i => $calc) {\n\n if ($calc->virtuemart_order_item_id == $item_id) {\n $k = array_search($calc->virtuemart_calc_id, $order_item_data->product_tax_id);\n if ($k !== FALSE) {\n $calc->product_quantity = $order_item_data->product_quantity; //We need it later in the updateBill\n $taxes[$calc->calc_kind][$calc->virtuemart_calc_id] = $calc;\n unset($order_item_data->product_tax_id[$k]);\n } else if ($calc->calc_kind == 'VatTax' or $calc->calc_kind == 'Tax') {\n $toRemove[] = $calc->virtuemart_order_calc_rule_id;\n } else {\n $taxes[$calc->calc_kind][$calc->virtuemart_calc_id] = $calc;\n }\n }\n }\n\n if (!empty($order_item_data->product_tax_id)) {\n //$orderCalcRulesTable = $this->getTable('order_calc_rules');\n foreach ($order_item_data->product_tax_id as $pTaxId) {\n if (empty($pTaxId)) continue;\n $sql = 'SELECT * FROM `#__virtuemart_calcs` WHERE `virtuemart_calc_id` = \"' . $pTaxId . '\" ';\n $db->setQuery($sql);\n $newCalc = $db->loadObject();\n $newCalc->virtuemart_order_calc_rule_id = 0;\n $newCalc->virtuemart_order_id = $order_item_data->virtuemart_order_id;\n //$newCalc->virtuemart_vendor_id = $order_item_data->virtuemart_vendor_id;\n $newCalc->virtuemart_order_item_id = $item_id;\n $newCalc->calc_rule_name = $newCalc->calc_name;\n if (!empty($order_item_data->product_item_price)) {\n $newCalc->calc_amount = $order_item_data->product_item_price * $newCalc->calc_value * 0.01;\n } else {\n $newCalc->calc_amount = $order_item_data->product_final_price * (1 - 1 / ($newCalc->calc_value * 0.01 + 1));\n }\n $newCalc->calc_mathop = '+%';\n\n $orderCalcRulesTable->bindChecknStore($newCalc);\n vmdebug('added new tax', $newCalc->calc_amount, $newCalc);\n $taxes[$newCalc->calc_kind][$orderCalcRulesTable->virtuemart_calc_id] = $orderCalcRulesTable->loadFieldValues(false);\n\n vmdebug('added new tax', $taxes);\n }\n }\n\n\n foreach ($toRemove as $virtuemart_order_calc_rule_id) {\n\n $orderCalcRulesTable->delete($virtuemart_order_calc_rule_id);\n vmdebug('To remove ', $virtuemart_order_calc_rule_id);\n }\n\n $orderItemTable = $this->updateSingleItem($item_id, $order_item_data, true, $taxes, $data->virtuemart_user_id);\n //vmdebug('AFter updateSingleItem, my product_subtotal_with_tax',$order_item_data,$orderItemTable);\n\n foreach ($taxes as $kind) {\n foreach ($kind as $tax) {\n $allTaxes[] = $tax;\n }\n }\n\n $data->order_salesPrice += $orderItemTable->product_final_price * $orderItemTable->product_quantity;\n //vmdebug('update Order new order_salesPrice',$data->order_salesPrice,$order_item_data->product_final_price);\n $inputOrder[$item_id] = $order_item_data;\n }\n\n //$pre = &$allTaxes;\n $pseudoOrder = array('items' => $inputOrder, 'calc_rules' => $allTaxes);\n $pseudoOrder['details']['BT'] = $data;\n //vmdebug('my summarized rules $inputOrder before summarize',$inputOrder );\n $summarizedRules = shopFunctionsF::summarizeRulesForBill($pseudoOrder, false);\n //vmdebug('my summarized rules',$summarizedRules );\n\n //Determine ship/payment tax\n $idWithMax = 0;\n $maxValue = 0.0;\n if (!empty($summarizedRules['taxBill'])) {\n foreach ($summarizedRules['taxBill'] as $rule) {\n if ($rule->calc_kind == 'taxRulesBill' or $rule->calc_kind == 'VatTax') {\n if (empty($idWithMax) or $maxValue <= $rule->subTotal) {\n $idWithMax = $rule->virtuemart_calc_id;\n $maxValue = $rule->subTotal;\n }\n }\n }\n }\n\n $undhandled = array('shipment', 'payment');\n foreach ($undhandled as $calc_kind) {\n $keyN = 'order_' . $calc_kind;\n $keyNTax = $keyN . '_tax';\n //vmdebug('ShipPay Rules handling',$orderCalcs);\n\n //Find existing rule\n $rule = false;\n foreach ($orderCalcs as $i => $rul) {\n if ($rul->calc_kind == $calc_kind) {\n $rule = $rul;\n }\n }\n\n //Seems there was no rule set\n if (!$rule) {\n $ocrTable = $this->getTable('order_calc_rules');\n $rule = $ocrTable->loadFieldValues(false);\n\n $r = $summarizedRules['taxBill'][$idWithMax];\n $rule->virtuemart_calc_id = $r->virtuemart_calc_id;\n $rule->virtuemart_vendor_id = $r->virtuemart_vendor_id;\n $rule->calc_rule_name = $r->calc_rule_name;\n $rule->virtuemart_order_id = $r->virtuemart_order_id;\n $rule->calc_value = $r->calc_value;\n $rule->calc_mathop = $r->calc_mathop;\n $rule->calc_currency = $r->calc_currency;\n //$rule->virtuemart_calc_id = $r->virtuemart_calc_id;\n $rule->calc_kind = $calc_kind;\n vmdebug('ShipPay Rules handling rule missing', $orderCalcs, $rule, $r);\n\n //$ocrTable = $this->getTable('order_calc_rules');\n //$ocrTable->bindChecknStore($rule);\n }\n //$allTaxes[] = $rule;\n $data->{$keyN} = vRequest::getString($keyN, 0.0);\n\n //There is a VAT available\n /*\t\t\t\tif( (/*count($summarizedRules['taxBill'])==1 or * VmConfig::get('radicalShipPaymentVat',true)) and isset($summarizedRules['taxBill'][$idWithMax])){\n\t\t\t\t\t$r = $summarizedRules['taxBill'][$idWithMax];\n\n\t\t\t\t\t$rule->calc_amount = $data->$keyN * ($r->calc_value * 0.01 ) ;\n\t\t\t\t\t$data->$keyNTax = round(floatval($data->$keyNTax),5);\n\t\t\t\t\t$rule->calc_amount = round(floatval($rule->calc_amount), 5);\n\n\t\t\t\t\tif($data->$keyNTax != $rule->calc_amount or $rule->virtuemart_calc_id != $r->virtuemart_calc_id){\n\t\t\t\t\t\t//$data->$keyNTax = $rule->calc_amount;\n\t\t\t\t\t\t$rule->calc_rule_name = $r->calc_rule_name;\n\t\t\t\t\t\t$rule->virtuemart_order_id = $r->virtuemart_order_id;\n\t\t\t\t\t\t$rule->calc_value = $r->calc_value;\n\t\t\t\t\t\t$rule->calc_mathop = $r->calc_mathop;\n\t\t\t\t\t\t$rule->virtuemart_calc_id = $r->virtuemart_calc_id;\n\t\t\t\t\t\t//vmdebug('Updating rule '.$keyNTax,$data->$keyNTax,$rule,$r);\n\t\t\t\t\t\t$ocrTable = $this->getTable('order_calc_rules');\n\t\t\t\t\t\t$ocrTable->bindChecknStore($rule);\n\n\t\t\t\t\t}\n\n\t\t\t\t\t//$summarizedRules['taxBill'][$idWithMax]->subTotal += $rule->calc_amount;\n\t\t\t\t\t$data->$keyNTax = $rule->calc_amount;\n\t\t\t\t\t//vmdebug('Use radicalShipPaymentVat with $idWithMax '.$idWithMax,$summarizedRules['taxBill'][$idWithMax]->subTotal,$data->$keyNTax, $rule);\n\t\t\t\t} else { */\n $data->{$keyNTax} = 0.0;\n $t1 = 0.0;\n if (VmConfig::get('radicalShipPaymentVat', true)) {\n $r = $summarizedRules['taxBill'][$idWithMax];\n\n /*$rule->calc_amount = $data->$keyN * ($r->calc_value * 0.01 ) ;\n\t\t\t\t\t\t$data->$keyNTax = round(floatval($data->$keyNTax),5);\n\t\t\t\t\t\t$rule->calc_amount = round(floatval($rule->calc_amount), 5);\n\t\t\t\t\t\t$data->$keyNTax = $rule->calc_amount;*/\n $t1 = 0.0;\n $data->{$keyNTax} = $r->calc_value * 0.01 * $data->{$keyN};\n } else {\n foreach ($summarizedRules['taxBill'] as $in => $vatrule) {\n\n if (!empty($data->order_salesPrice)) {\n $t1 = $vatrule->calc_value * 0.01 * $vatrule->subTotal / $data->order_salesPrice;\n } else {\n $t1 = 0.0;\n }\n\n //vmdebug('ShipPay Rules store '.$vatrule->calc_value * 0.01.' * '. $vatrule->subTotal.'/'.$data->order_salesPrice.' = '.$t1);\n $data->{$keyNTax} += $t1 * $data->{$keyN};\n //$summarizedRules['taxBill'][$in]->calc_amount += $data->$keyNTax ;\n\n }\n }\n\n if ($data->{$keyNTax} != $rule->calc_amount) {\n $rule->calc_amount = $data->{$keyNTax};\n $rule->calc_value = $t1 * 100.0;\n //vmdebug('ShipPay Rules set',$rule);\n\n $ocrTable = $this->getTable('order_calc_rules');\n $ocrTable->bindChecknStore($rule);\n }\n // }\n //vmdebug('Add rule to $allTaxes',$rule);\n $allTaxes[] = $rule;\n //}\n\n } //*/\n\n $pseudoOrder = array('items' => $inputOrder, 'calc_rules' => $allTaxes);\n $pseudoOrder['details']['BT'] = $data;\n //vmdebug('my summarized rules $inputOrder before summarize',$inputOrder );\n $summarizedRules = shopFunctionsF::summarizeRulesForBill($pseudoOrder, true);\n\n $ocrTable = $this->getTable('order_calc_rules');\n foreach ($summarizedRules['taxBill'] as $r) {\n if ($r->calc_kind == 'payment' or $r->calc_kind == 'shipment') {\n $ocrTable->bindChecknStore($r);\n }\n }\n\n\n $this->calculatePaidByOS($data, $inputOrder);\n\n //prevents sending of email\n $inputOrder['customer_notified'] = 0;\n // invoice_locked should depend ideally on the existence of the invoice, but it would just be an extra query later, we do a new invoice anyway.\n if (VirtueMartModelInvoice::needInvoiceByOrderstatus($data->order_status) or VirtueMartModelInvoice::needInvoiceByOrderstatus($data->order_status, 'inv_osr', array('R'))) {\n $data->invoice_locked = 1;\n //vmdebug('SET LOCK');\n }\n\n $data->store();\n $this->updateBill($virtuemart_order_id, /*$vatTaxes,*/ $summarizedRules['taxBill']);\n } else {\n\n $update_lines = 1;\n if ($task === 'updatestatus' and $view === 'orders') {\n $lines = vRequest::getVar('orders');\n $update_lines = $lines[$virtuemart_order_id]['update_lines'];\n }\n\n if ($update_lines == 1) {\n\n $q = 'SELECT virtuemart_order_item_id\n\t\t\t\t\t\t\t\t\t\t\tFROM #__virtuemart_order_items\n\t\t\t\t\t\t\t\t\t\t\tWHERE virtuemart_order_id=\"' . $virtuemart_order_id . '\"';\n $db = JFactory::getDBO();\n $db->setQuery($q);\n $order_items = $db->loadObjectList();\n if ($order_items) {\n foreach ($order_items as $item_id => $order_item) {\n $this->updateSingleItem($order_item->virtuemart_order_item_id, $data);\n }\n }\n\n $this->calculatePaidByOS($data, $inputOrder);\n }\n //$data->invoice_locked = 0;\n $data->store();\n vmdebug('Going to store the order', $old_o_hash, $data->o_hash);\n }\n vmdebug('Update order status ');\n\n //Must be below the handling of the order items, else we must add an except as for \"customer_notified\"\n if (empty($inputOrder['comments'])) {\n $inputOrder['comments'] = '';\n } else {\n $inputOrder['comments'] = trim($inputOrder['comments']);\n }\n $invM = VmModel::getModel('invoice');\n //TODO use here needNewInvoiceNumber\n $inputOrder['order_status'] = $data->order_status;\n\n vmdebug('updateStatusForOneOrder, a new invoice needed? ', (int)$data->invoice_locked, $old_order_status, $data->order_status, $old_o_hash, $data->o_hash);\n\n if (!$data->invoice_locked and ($old_order_status != $data->order_status or $old_o_hash != $data->o_hash) and VirtueMartModelInvoice::isInvoiceToBeAttachByOrderstats($inputOrder['order_status'])) {\n\n $layout = 'invoice';\n $checkHash = true;\n //$refundOrderStatus = VmConfig::get('inv_osr',array('R'));\n //if(!in_array($old_order_status, $refundOrderStatus) and VirtueMartModelInvoice::needInvoiceByOrderstatus($inputOrder['order_status'],'inv_osr', array('R') )){\n if ($old_order_status != $data->order_status) {\n $checkHash = false;\n }\n\n if (VirtueMartModelInvoice::needInvoiceByOrderstatus($inputOrder['order_status'], 'inv_osr', array('R'))) {\n $layout = 'refund';\n }\n\n $inputOrder['o_hash'] = $data->o_hash;\n\n vmdebug('We need a new invoice ', $layout);\n $inputOrder['invoice_number'] = $invM->createReferencedInvoiceNumber($data->virtuemart_order_id, $inputOrder, $layout, $checkHash);\n }\n\n //We need a new invoice, therefore rename the old one.\n /*$inv_os = VmConfig::get('inv_os',array('C'));\n\t\tif(!is_array($inv_os)) $inv_os = array($inv_os);\n\t\tif($old_order_status!=$data->order_status and in_array($data->order_status,$inv_os)){\n\t\t\t//$this->renameInvoice($data->virtuemart_order_id);\n\t\t\tvmdebug('my input order here',$inputOrder);\n\t\t\t$inputOrder['invoice_number'] = $this->createReferencedInvoice($data->virtuemart_order_id);\n\t\t}*/\n\n /* Update the order history */\n //update order histories needs the virtuemart_order_id\n $inputOrder['virtuemart_order_id'] = $virtuemart_order_id;\n $this->updateOrderHistory($inputOrder);\n // When the plugins did not already notified the user, do it here (the normal way)\n //Attention the ! prevents at the moment that an email is sent. But it should used that way.\n // \t\t\tif (!$inputOrder['customer_notified']) {\n $this->notifyCustomer($data->virtuemart_order_id, $inputOrder);\n // \t\t\t}\n\n //VmConfig::importVMPlugins('vmcoupon');\n $dispatcher = JDispatcher::getInstance();\n $returnValues = $dispatcher->trigger('plgVmCouponUpdateOrderStatus', array($data, $old_order_status));\n if (!empty($returnValues)) {\n foreach ($returnValues as $returnValue) {\n if ($returnValue !== null) {\n return $returnValue;\n }\n }\n }\n\n\n return true;\n /*} else {\n\t\t\treturn false;\n\t\t}*/\n }", "public function cleanReceivedOrders () {\n\n\t\t$filter = new \\Maven\\Core\\Domain\\OrderFilter();\n\t\t$filter->setStatusID( OrderStatusManager::getReceivedStatus()->getId() );\n\n\t\t// A week old\n\t\t$today = MavenDateTime::getWPCurrentDateTime();\n\n\t\t$toDate = new \\Maven\\Core\\MavenDateTime( $today );\n\t\t$toDate->subFromInterval( 'P1W' );\n\n\t\t$filter->setOrderDateTo( $toDate->mySqlFormatDate() );\n\n\t\t$orders = $this->getOrders( $filter );\n\n\t\tforeach ( $orders as $order ) {\n\n\t\t\t//Check if the order has some contact on it.\n\t\t\tif ( !$order->hasBillingInformation() && !$order->hasShippingInformation() && !$order->hasContactInformation() ) {\n\t\t\t\t$this->delete( $order->getId() );\n\t\t\t}\n\t\t}\n\t}", "function hook_commerce_invoice_statuses_alter(&$statuses) {\n // Remove a status.\n unset($statuses[Invoice::STATUS_REFUND_PENDING]);\n // Add a status.\n $statuses['past_due'] = t('Past due');\n}" ]
[ "0.6884756", "0.64209867", "0.63911694", "0.6282528", "0.6261021", "0.61297953", "0.60928315", "0.5940263", "0.5838544", "0.57040715", "0.5631075", "0.5557936", "0.5542757", "0.552905", "0.54975086", "0.54290336", "0.54087687", "0.5375259", "0.5223845", "0.52140033", "0.5201654", "0.51913154", "0.51679295", "0.5158898", "0.5155768", "0.51535404", "0.5152433", "0.51455665", "0.5090972", "0.5069299", "0.50501984", "0.5048391", "0.5039363", "0.50315887", "0.49830943", "0.49593034", "0.49513787", "0.4946687", "0.49228105", "0.49193177", "0.49181587", "0.49178988", "0.4911463", "0.4880229", "0.48764074", "0.4858547", "0.48490006", "0.48455596", "0.484248", "0.48140618", "0.48133963", "0.48105904", "0.4800597", "0.4785937", "0.47819278", "0.47791952", "0.47768307", "0.47744387", "0.47658154", "0.47491094", "0.47451377", "0.47439012", "0.4740444", "0.473959", "0.4729269", "0.4726433", "0.4725146", "0.47173172", "0.4713848", "0.47125337", "0.4709926", "0.47072032", "0.47048366", "0.46923783", "0.4687312", "0.46777335", "0.46644342", "0.46620983", "0.46606585", "0.46548545", "0.4652816", "0.46400744", "0.4635315", "0.46327686", "0.4623709", "0.46167523", "0.4613029", "0.46119407", "0.46105343", "0.46093774", "0.45955697", "0.45945746", "0.45822665", "0.45794573", "0.4576615", "0.45630822", "0.4559961", "0.45552334", "0.45529258", "0.45520085" ]
0.71749544
0
Sets the marketplace(s). (Optional) This method sets the list of Marketplaces to be sent in the next request. Setting this parameter tells Amazon to only return Orders made in marketplaces that match those in the list. If this parameter is not set, Amazon will return Orders belonging to the current store's default marketplace.
public function setMarketplaceFilter($list) { if (is_string($list)) { //if single string, set as filter $this->resetMarketplaceFilter(); $this->options['MarketplaceId.Id.1'] = $list; } else if (is_array($list)) { //if array of strings, set all filters $this->resetMarketplaceFilter(); $i = 1; foreach ($list as $x) { $this->options['MarketplaceId.Id.' . $i] = $x; $i++; } } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setMarketplace($marketplace) {\n $this->marketplaceId = $marketplace;\n }", "public function setListMarketplaces($value)\n {\n $this->_fields['ListMarketplaces']['FieldValue'] = $value;\n return $this;\n }", "public function withListMarketplaces($value)\n {\n $this->setListMarketplaces($value);\n return $this;\n }", "protected function restMarketsEbayMarketplacesGetRequest($referrer_id = null, $marketplace_id = null, $market_id = null, $site_id = null)\n {\n\n $resourcePath = '/rest/markets/ebay/marketplaces';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if (is_array($referrer_id)) {\n $referrer_id = ObjectSerializer::serializeCollection($referrer_id, '', true);\n }\n if ($referrer_id !== null) {\n $queryParams['referrerId'] = $referrer_id;\n }\n // query params\n if (is_array($marketplace_id)) {\n $marketplace_id = ObjectSerializer::serializeCollection($marketplace_id, '', true);\n }\n if ($marketplace_id !== null) {\n $queryParams['marketplaceId'] = $marketplace_id;\n }\n // query params\n if (is_array($market_id)) {\n $market_id = ObjectSerializer::serializeCollection($market_id, '', true);\n }\n if ($market_id !== null) {\n $queryParams['marketId'] = $market_id;\n }\n // query params\n if (is_array($site_id)) {\n $site_id = ObjectSerializer::serializeCollection($site_id, '', true);\n }\n if ($site_id !== null) {\n $queryParams['siteId'] = $site_id;\n }\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "protected function restMarketsListingsMarketplacesGetRequest($referrer_id = null, $marketplace_id = null, $market_id = null, $site_id = null)\n {\n\n $resourcePath = '/rest/markets/listings/marketplaces';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if (is_array($referrer_id)) {\n $referrer_id = ObjectSerializer::serializeCollection($referrer_id, '', true);\n }\n if ($referrer_id !== null) {\n $queryParams['referrerId'] = $referrer_id;\n }\n // query params\n if (is_array($marketplace_id)) {\n $marketplace_id = ObjectSerializer::serializeCollection($marketplace_id, '', true);\n }\n if ($marketplace_id !== null) {\n $queryParams['marketplaceId'] = $marketplace_id;\n }\n // query params\n if (is_array($market_id)) {\n $market_id = ObjectSerializer::serializeCollection($market_id, '', true);\n }\n if ($market_id !== null) {\n $queryParams['marketId'] = $market_id;\n }\n // query params\n if (is_array($site_id)) {\n $site_id = ObjectSerializer::serializeCollection($site_id, '', true);\n }\n if ($site_id !== null) {\n $queryParams['siteId'] = $site_id;\n }\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function isSetListMarketplaces()\n {\n return !is_null($this->_fields['ListMarketplaces']['FieldValue']);\n }", "public function marketplaces()\n {\n return $this->hasMany(Marketplace::class);\n }", "public function setMagentoStores(array $magentoStores);", "public function setMarketplaceId($value)\n {\n $this->_fields['MarketplaceId']['FieldValue'] = $value;\n return $this;\n }", "public function withMarketplaceId($value)\n {\n $this->setMarketplaceId($value);\n return $this;\n }", "public function setAddresstoCookie($places)\n {\n Mage::getModel('core/cookie')->set('places', serialize($places));\n }", "public function withMarketplaceName($value)\n {\n $this->setMarketplaceName($value);\n return $this;\n }", "public function resetMarketplaceFilter()\n {\n foreach ($this->options as $op => $junk) {\n if (preg_match(\"#MarketplaceId#\", $op)) {\n unset($this->options[$op]);\n }\n }\n }", "function setPrivateMarketPlace(PrivateMarketPlace $privateMarketPlace)\n {\n $this->privateMarketPlace = $privateMarketPlace;\n }", "public function run ()\n {\n\n DB::table('regions')->insert([\n 'name' => 'US',\n 'id' => 1,\n ]);\n DB::table('regions')->insert([\n 'name' => 'EU',\n 'id' => 2,\n ]);\n\n DB::table('regions')->insert([\n 'name' => 'FE',\n 'id' => 3,\n ]);\n// factory(\\App\\Marketplace::class, 50)->create();\n\n $marketplaces = [\n [\n 'amazon_marketplace_id' => 'A2EUQ1WTGCTBG2',\n 'endpoint' => 'mws.amazonservices.ca',\n 'name' => 'Canada',\n 'code' => 'CA',\n 'region_id' => 1,\n ],\n [\n 'amazon_marketplace_id' => 'ATVPDKIKX0DER',\n 'endpoint' => 'mws.amazonservices.com',\n 'name' => 'US',\n 'code' => 'US',\n 'region_id' => 1,\n ],\n [\n 'amazon_marketplace_id' => 'A1AM78C64UM0Y8',\n 'endpoint' => 'mws.amazonservices.com.mx',\n 'name' => 'Mexico',\n 'code' => 'MX',\n 'region_id' => 1,\n ],\n [\n 'amazon_marketplace_id' => 'A2Q3Y263D00KWC',\n 'endpoint' => 'mws.amazonservices.com',\n 'name' => 'Brazil',\n 'code' => 'BR',\n 'region_id' => 1,\n\n ],\n\n [\n 'amazon_marketplace_id' => 'A1PA6795UKMFR9',\n 'endpoint' => 'mws-eu.amazonservices.com',\n 'name' => 'Germany',\n 'code' => 'DE',\n 'region_id' => 2,\n ],\n [\n 'amazon_marketplace_id' => 'A1RKKUPIHCS9HS',\n 'endpoint' => 'mws-eu.amazonservices.com',\n 'name' => 'Spain',\n 'code' => 'ES',\n 'region_id' => 2,\n ],\n [\n 'amazon_marketplace_id' => 'A13V1IB3VIYZZH',\n 'endpoint' => 'mws-eu.amazonservices.com',\n 'name' => 'France',\n 'code' => 'FR',\n 'region_id' => 2,\n ],\n [\n 'amazon_marketplace_id' => 'A21TJRUUN4KGV',\n 'endpoint' => 'mws.amazonservices.in',\n 'name' => 'India',\n 'code' => 'IN',\n 'region_id' => 2,\n ],\n [\n 'amazon_marketplace_id' => 'APJ6JRA9NG5V4',\n 'endpoint' => 'mws-eu.amazonservices.com',\n 'name' => 'Italy',\n 'code' => 'IT',\n 'region_id' => 2,\n ],\n [\n 'amazon_marketplace_id' => 'A1F83G8C2ARO7P',\n 'endpoint' => 'mws-eu.amazonservices.com',\n 'name' => 'UK',\n 'code' => 'GB',\n 'region_id' => 2,\n ],\n\n\n\n ];\n\n foreach ($marketplaces as $marketplace) {\n\n DB::table('marketplaces')->insert($marketplace);\n }\n\n }", "public function setMarketplaceName($value)\n {\n $this->_fields['MarketplaceName']['FieldValue'] = $value;\n return $this;\n }", "public function setPlace($place){\n $this->place=$place;\n }", "public function restMarketsEbayMarketplacesGetWithHttpInfo($referrer_id = null, $marketplace_id = null, $market_id = null, $site_id = null)\n {\n $request = $this->restMarketsEbayMarketplacesGetRequest($referrer_id, $marketplace_id, $market_id, $site_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() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n switch($statusCode) {\n case 200:\n if ('\\OpenAPI\\Client\\Model\\Marketplace[]' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\Marketplace[]', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\OpenAPI\\Client\\Model\\Marketplace[]';\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\Marketplace[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function restMarketsListingsMarketplacesGetWithHttpInfo($referrer_id = null, $marketplace_id = null, $market_id = null, $site_id = null)\n {\n $request = $this->restMarketsListingsMarketplacesGetRequest($referrer_id, $marketplace_id, $market_id, $site_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() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n switch($statusCode) {\n case 200:\n if ('\\OpenAPI\\Client\\Model\\Marketplace[]' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\Marketplace[]', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\OpenAPI\\Client\\Model\\Marketplace[]';\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\Marketplace[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function getMarketplacesSelect($params = array(), $customParams = null)\n {\n $table = Engine_Api::_()->getDbtable('marketplaces', 'marketplace');\n $rName = $table->info('name');\n\n $tmTable = Engine_Api::_()->getDbtable('TagMaps', 'core');\n $tmName = $tmTable->info('name');\n\n $select = $table->select()\n ->from($rName)\n ->order( !empty($params['orderby']) ? $rName.'.'.$params['orderby'].' DESC' : $rName.'.creation_date DESC' );\n\n $viewer = Engine_Api::_()->user()->getViewer();\n if( !$viewer->getIdentity() or $viewer->level_id > 2 ) {\n $notAprroved = $this->notAprrovedMarketplaces();\n if( !empty($notAprroved) ) {\n $select->where($rName.\".marketplace_id NOT IN (?) OR owner_id = {$viewer->getIdentity()}\", $notAprroved);\n }\n $select->where($rName.\".photo_id > 0 OR owner_id = {$viewer->getIdentity()}\");\n }\n \n if( !empty($params['user_id']) && is_numeric($params['user_id']) )\n {\n $select->where($rName.'.owner_id = ?', $params['user_id']);\n }\n\n if( !empty($params['user']) && $params['user'] instanceof User_Model_User )\n {\n $select->where($rName.'.owner_id = ?', $params['user_id']->getIdentity());\n }\n\n if( !empty($params['users']) )\n {\n $str = (string) ( is_array($params['users']) ? \"'\" . join(\"', '\", $params['users']) . \"'\" : $params['users'] );\n $select->where($rName.'.owner_id in (?)', new Zend_Db_Expr($str));\n }\n if( !empty($params['brand_id']) )\n {\n $valuesTable = Engine_Api::_()->fields()->getTable('marketplace', 'values');\n $valuesTableName = $valuesTable->info('name');\n\n $metaTable = Engine_Api::_()->fields()->getTable('marketplace', 'meta');\n $metaTableName = $metaTable->info('name');\n\n $select->join($valuesTableName, \"{$valuesTableName}.item_id = {$rName}.marketplace_id\", null)\n ->join($metaTableName, \"{$metaTableName}.category_id = {$rName}.category_id\", null)\n ->where(\"LCASE({$metaTableName}.label) LIKE ?\", \"%brand%\")\n ->where(\"{$valuesTableName}.field_id = {$metaTableName}.field_id\") \n ->where(\"{$valuesTableName}.value = {$params['brand_id']}\")\n ;\n }\n if( !empty($params['never_worn']) )\n {\n $valuesTable = Engine_Api::_()->fields()->getTable('marketplace', 'values');\n $valuesTableName = $valuesTable->info('name');\n\n $metaTable = Engine_Api::_()->fields()->getTable('marketplace', 'meta');\n $metaTableName = $metaTable->info('name');\n\n $optionsTable = Engine_Api::_()->fields()->getTable('marketplace', 'options');\n $optionsTableName = $optionsTable->info('name');\n\n $select->join($valuesTableName, \"{$valuesTableName}.item_id = {$rName}.marketplace_id\", null)\n ->join($metaTableName, \"{$metaTableName}.category_id = {$rName}.category_id\", null)\n ->join($optionsTableName, \"{$metaTableName}.field_id = {$optionsTableName}.field_id\", null)\n ->where(\"LCASE({$metaTableName}.label) LIKE ?\", \"%condition%\")\n ->where(\"LCASE({$optionsTableName}.label) LIKE ?\", \"%new%\")\n ->where(\"{$valuesTableName}.field_id = {$metaTableName}.field_id\") \n ->where(\"{$valuesTableName}.value = {$optionsTableName}.option_id\")\n ;\n }\n if( !empty($params['tag']) )\n {\n $select\n ->setIntegrityCheck(false)\n ->joinLeft($tmName, \"$tmName.resource_id = $rName.marketplace_id\")\n ->where($tmName.'.resource_type = ?', 'marketplace')\n ->where($tmName.'.tag_id = ?', $params['tag']);\n }\n\n if( !empty($params['category']) )\n {\n $select->where($rName.'.category_id in (?)', new Zend_Db_Expr($params['category']));\n }\n\n if( !empty($params['price_end']) )\n {\n $select->where($rName.'.price <= ?', $params['price_end']);\n }\n if( !empty($params['price_start']) )\n {\n $select->where($rName.'.price >= ?', $params['price_start']);\n }\n\n if( isset($params['closed']) && $params['closed']!=\"\" )\n {\n $select->where($rName.'.closed = ?', $params['closed']);\n }\n\n // Could we use the search indexer for this?\n if( !empty($params['search']) )\n {\n $select->where($rName.\".title LIKE ? OR \".$rName.\".body LIKE ?\", '%'.$params['search'].'%');\n }\n\n if( !empty($params['start_date']) )\n {\n $select->where($rName.\".creation_date > ?\", date('Y-m-d', $params['start_date']));\n }\n\n if( !empty($params['end_date']) )\n {\n $select->where($rName.\".creation_date < ?\", date('Y-m-d', $params['end_date']));\n }\n return $select;\n }", "public function setOffers($offers)\n {\n $this->setValue('offers', $offers);\n }", "public function setKeywords($keywords)\n {\n $this->keywords = (array)$keywords;\n }", "protected function setRelatedEntity(array $place): void\n {\n $this->place = new Place($place);\n }", "public function getListMarketplaces()\n {\n return $this->_fields['ListMarketplaces']['FieldValue'];\n }", "public function SetStatusToPackedByMarketplace($parameters = []) {\n\t\t// set the action as required\n\t\t$this->parameters['Action'] = 'SetStatusToPackedByMarketplace';\n\n\t\t// merge the prepared parameters with base parameters\n\t\t$parameters = HttpHelper::handle($parameters);\n\t\t$this->parameters = array_merge($this->parameters, $parameters);\n\n\t\t// make the http request\n\t\t$data = HttpClient::makeCall($this->baseURL, $this->parameters);\n\n\t\t// handle the response given\n\t\t$data = ResponseHelper::property($data, 'SuccessResponse->Body->OrderItems');\n\t\treturn (isset($data[0])) ? $data : null;\n\t}", "public function setMarketId($var)\n {\n GPBUtil::checkString($var, True);\n $this->market_id = $var;\n }", "public function openOrders($market = null)\n {\n $parameters = [];\n if(!is_null($market)) $parameters['market'] = $market;\n\n return $this->_call('market/getopenorders', $parameters, true);\n }", "private function SetOrderData()\n\t\t{\n\t\t\t// doesn't factor in cookies stored by Interspire Shopping Cart, so we have to pass back the\n\t\t\t// order token manually from those payment providers. We do this by taking the\n\t\t\t// cart ID passed back from the provider which stores the order's unique token.\n\t\t\tif(isset($_COOKIE['SHOP_ORDER_TOKEN'])) {\n\t\t\t\t$this->orderToken = $_COOKIE['SHOP_ORDER_TOKEN'];\n\t\t\t}\n\t\t\telse if(isset($_REQUEST['provider'])) {\n\t\t\t\tGetModuleById('checkout', $this->paymentProvider, $_REQUEST['provider']);\n\n\t\t\t\tif(in_array(\"GetOrderToken\", get_class_methods($this->paymentProvider))) {\n\t\t\t\t\t$this->orderToken = $this->paymentProvider->GetOrderToken();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tob_end_clean();\n\t\t\t\t\theader(sprintf(\"Location:%s\", $GLOBALS['ShopPath']));\n\t\t\t\t\tdie();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Load the pending orders from the database\n\t\t\t$this->pendingData = LoadPendingOrdersByToken($this->orderToken, true);\n\t\t\tif(!$this->orderToken || $this->pendingData === false) {\n\t\t\t\t$this->BadOrder();\n\t\t\t\texit;\n\t\t\t}\n\n\t\t\tif($this->paymentProvider === null) {\n\t\t\t\tGetModuleById('checkout', $this->paymentProvider, $this->pendingData['paymentmodule']);\n\t\t\t}\n\n\t\t\tif($this->paymentProvider) {\n\t\t\t\t$this->paymentProvider->SetOrderData($this->pendingData);\n\t\t\t}\n\t\t}", "public function setPlace($ParseString) {\n parse_str($ParseString, $this->Places);\n $this->Execute();\n }", "public function setStocks($stocks)\n {\n $this->stocks = (array) $stocks;\n }", "function wcfmgs_group_manager_show_marketplace_orders( $is_show ) {\r\n \treturn true;\r\n }", "public function setOrder($params)\n\t{\n\t\treturn $this->request('set-order', $params);\n\t}", "public function setDefaultOrderings(array $defaultOrderings)\n {\n $this->defaultOrderings = $defaultOrderings;\n }", "public function setDefaultOrderings(array $defaultOrderings): void;", "public function setMagentoWebsites(array $magentoWebsites);", "public function setKeywords(string $keywords)\n {\n $this->keywords = $keywords;\n }", "public function isSetMarketplaceId()\n {\n return !is_null($this->_fields['MarketplaceId']['FieldValue']);\n }", "public function __construct(Places $places)\n {\n $this->place = $places;\n }", "function wcfmgs_group_manager_allow_vendors_list( $allow_vendors = array(0), $is_marketplace = '', $is_term = true ) {\r\n \tglobal $WCFM, $WCFMgs;\r\n \t\r\n \tif( !$allow_vendors || !is_array( $allow_vendors ) ) $allow_vendors = array(0);\r\n \t\r\n \tif( $is_marketplace == '' ) {\r\n \t\t$is_marketplace = wcfm_is_marketplace();\r\n \t}\r\n \t\r\n\t\t$wcfm_vendor_groups = get_user_meta( $this->manager_id, '_wcfm_vendor_group', true );\r\n\t\tif( !empty( $wcfm_vendor_groups ) ) {\r\n\t\t\tforeach( $wcfm_vendor_groups as $wcfm_vendor_group ) {\r\n\t\t\t\t$group_vendors = get_post_meta( $wcfm_vendor_group, '_group_vendors', true );\r\n\t\t\t\tif( $group_vendors && is_array( $group_vendors ) && !empty( $group_vendors ) ) {\r\n\t\t\t\t\tforeach( $group_vendors as $group_vendor ) {\r\n\t\t\t\t\t\tif( $is_marketplace == 'wcpvendors' ) {\r\n\t\t\t\t\t\t\tif( $is_term ) {\r\n\t\t\t\t\t\t\t\t$term_id = get_user_meta( $group_vendor, '_wcpv_active_vendor', true );\r\n\t\t\t\t\t\t\t\tif( $term_id ) $allow_vendors[] = $term_id;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$allow_vendors[] = $group_vendor;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$allow_vendors[] = $group_vendor;\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}\r\n\t\t\r\n\t\treturn $allow_vendors;\r\n }", "public function setBulk($marketItems)\n {\n $documents = [];\n foreach ($marketItems as $i => $marketItem) {\n $marketItem->Updated = time();\n $documents[$marketItem->ID] = json_decode(json_encode($marketItem), true);\n }\n \n $this->elastic->bulkDocuments(self::INDEX, self::INDEX, $documents);\n }", "public function setListStockTransferOrders(array $listStockTransferOrders = array())\n {\n // validation for constraint: array\n if ('' !== ($listStockTransferOrdersArrayErrorMessage = self::validateListStockTransferOrdersForArrayConstraintsFromSetListStockTransferOrders($listStockTransferOrders))) {\n throw new \\InvalidArgumentException($listStockTransferOrdersArrayErrorMessage, __LINE__);\n }\n if (is_null($listStockTransferOrders) || (is_array($listStockTransferOrders) && empty($listStockTransferOrders))) {\n unset($this->listStockTransferOrders);\n } else {\n $this->listStockTransferOrders = $listStockTransferOrders;\n }\n return $this;\n }", "public function setOfferList($obOfferList)\n {\n $this->obOfferList = $obOfferList;\n }", "protected function setKeywords() {\r\n\t\t$keywords = $this->newsItem->getKeywords();\r\n\t\t$keywordsAction = $this->settings['news']['semantic']['general']['keywords']['action'];\r\n\t\t$pageKeywords = $GLOBALS['TSFE']->page['keywords'];\r\n\t\tif (!empty($keywordsAction) && !empty($pageKeywords)) {\r\n\t\t\tswitch ($keywordsAction) {\r\n\t\t\t\tcase 'prepend':\r\n\t\t\t\t\t$keywords = (empty($keywords)) ? $pageKeywords : $keywords . ', ' . $pageKeywords;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'append':\r\n\t\t\t\t\t$keywords = (empty($keywords)) ? $pageKeywords : $pageKeywords . ',' . $keywords;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t}\r\n\t\t}\r\n\t\t$keywordsArray = t3lib_div::trimExplode(',', $keywords);\r\n\t\t$keywordsLimit = intval($this->settings['news']['semantic']['general']['keywords']['limit']);\r\n\t\t$this->keywords = (empty($keywordsLimit)) ? array_unique($keywordsArray) : $this->keywords = array_slice(array_unique($keywordsArray), 0, $keywordsLimit);\r\n\t}", "public function indexAction()\r\n {\r\n $viewer = Engine_Api::_()->user()->getViewer();\r\n\r\n $ordersTable = Engine_Api::_()->getDbtable('orders', 'marketplace');\r\n $ordersTableName = $ordersTable->info('name');\r\n $marketplaceTable = Engine_Api::_()->getDbtable('marketplaces', 'marketplace');\r\n $marketplaceTableName = $marketplaceTable->info('name');\r\n\r\n\r\n $select = $ordersTable->select()\r\n ->setIntegrityCheck(false)\r\n ->from($ordersTableName, array(\"cnt\" => \"COUNT({$ordersTableName}.marketplace_id)\", \"{$ordersTableName}.marketplace_id\"))\r\n ->joinLeft($marketplaceTableName, \"$marketplaceTableName.marketplace_id = $ordersTableName.marketplace_id\", null)\r\n ->group(\"$ordersTableName.marketplace_id\")\r\n ->order('cnt DESC')\r\n ->order('creation_date DESC')\r\n ->limit($this->_getParam('itemCountPerPage', 10))\r\n\t;\r\n\r\n\tif($category_id = $this->_getParam('category_id', 0)){\r\n\t\t$select\r\n\t\t\t->where($marketplaceTableName.'.category_id = ?', $category_id)\r\n\t\t;\r\n\t}\r\n\t\r\n $this->view->paginator = $paginator = Zend_Paginator::factory($select);\r\n $paginator->setItemCountPerPage($this->_getParam('itemCountPerPage', 10));\r\n \r\n $this->view->paginator->setCurrentPageNumber(1);\r\n\r\n // Do not render if nothing to show\r\n if( $paginator->getTotalItemCount() <= 0 ) {\r\n return $this->setNoRender();\r\n }\r\n\r\n // Add count to title if configured\r\n if( $this->_getParam('titleCount', false) && $paginator->getTotalItemCount() > 0 ) {\r\n $this->_childCount = $paginator->getTotalItemCount();\r\n }\r\n \r\n $settings = Engine_Api::_()->getApi('settings', 'core');\r\n $this->view->items_per_page = $settings->getSetting('marketplace_page', 10);\r\n }", "public function get_markets()\n {\n return $this->_request('getmarkets');\n }", "public function actionIndex()\n {\n $model = new StoreMarket('search');\n $model->unsetAttributes(); // clear any default values\n $model->is_active = '';\n\n if (!empty($_GET['StoreMarket']))\n $model->attributes = $_GET['StoreMarket'];\n\n $dataProvider = $model->search();\n $dataProvider->pagination->pageSize = 20;\n\n $this->render('index', array(\n 'model'=>$model,\n 'dataProvider'=>$dataProvider,\n ));\n }", "private function setStockOptions() {\n // Reset the settings if this is a recrawl\n if ($this->getSaverData()->isRecrawl()) {\n // Set the stock quantity\n $this->product->set_stock_quantity(null);\n\n // Set backorders\n $this->product->set_backorders('no');\n\n // Set the low stock amount if it exists\n $this->product->set_low_stock_amount('');\n }\n\n // If the stock is not managed, set the stock status and stop.\n if (!$this->wcData->isManageStock()) {\n $this->product->set_manage_stock(false);\n $this->product->set_stock_status($this->wcData->getStockStatus());\n return;\n }\n\n // Stock is managed\n $this->product->set_manage_stock(true);\n\n // Set the stock quantity\n $this->product->set_stock_quantity($this->wcData->getStockQuantity());\n\n // Set backorders\n $this->product->set_backorders($this->wcData->getBackorders());\n\n // Set the low stock amount if it exists\n $this->product->set_low_stock_amount($this->wcData->getLowStockAmount());\n }", "public function markets()\n {\n return $this->_call('public/getmarkets', [], false);\n }", "public function setKeywords($keywords)\n\t{\n\t\t$this->keywords = $keywords;\n\n\t\tif($this->pageInitialized)\n\t\t\t$this->setMetaTag('keywords', $this->keywords);\n\t}", "public function setMarket_name ($market_name) {\n\t$this->market_name = $market_name;\n\treturn $this;\n}", "public function prepareQuoteOrder($lines, $product, $storeId, $order, $quote, $isFulfillmentByMarketplace)\n {\n if ($isFulfillmentByMarketplace) $quote->setInventoryProcessed(true);\n\n $quote->setIsSuperMode(true);\n\n foreach ($lines as $item) {\n\n $_product = Mage::getModel('catalog/product')->setStoreId($storeId);\n $productOptions = array();\n $productId = null;\n $mpn = $item->getMerchantProductNo();\n\n if($this->_helper->useSkuInsteadOfId($storeId))\n {\n $productId = $_product->getIdBySku($mpn);\n }\n else\n {\n $parsedMpn = $product->parseMerchantProductNo($mpn);\n $productId = $parsedMpn['product_id'];\n if (isset($parsedMpn['option_id'])) $productOptions = array($parsedMpn['option_id'] => intval($parsedMpn['option_value_id']));\n }\n\n // Load magento product\n $_product->load($productId);\n\n // Disable vat\n if ($this->_helper->disableMagentoVatCalculation($storeId)) $_product->setTaxClassId(0);\n\n // Prepare product parameters for quote\n $params = new Varien_Object();\n $params->setQty($item->getQuantity());\n $params->setOptions($productOptions);\n\n $result = $this->addProductToQuote($_product, $quote, $params, $item, $order, $mpn);\n\n if(!$result) return false;\n }\n return true;\n\n }", "public function setOffers(array $offers)\n {\n $this->offers = $offers;\n\n return $this;\n }", "public function isSetMarketplaceName()\n {\n return !is_null($this->_fields['MarketplaceName']['FieldValue']);\n }", "public function setAmazonOrderId(array $amazonOrderIds)\n {\n return $this->set('amazon_order_id', array(\n 'Id' => $amazonOrderIds\n ));\n }", "public function getOpenOrders ($market = null)\n\t{\n\t\t$params = array ('market' => $market);\n\t\treturn $this->call ('market/getopenorders', $params, true);\n\t}", "public function restMarketsListingsMarketplacesGet($referrer_id = null, $marketplace_id = null, $market_id = null, $site_id = null)\n {\n list($response) = $this->restMarketsListingsMarketplacesGetWithHttpInfo($referrer_id, $marketplace_id, $market_id, $site_id);\n return $response;\n }", "public function get_market_orders($args = array())\n {\n return $this->_request('marketorders', $args);\n }", "public function setOrderBy(array $orderBy = [])\n {\n if (!empty($orderBy)) {\n $this->items[self::ORDER_BY] = $orderBy;\n } else {\n unset($this->items[self::ORDER_BY]);\n }\n }", "public function setServiceProviders(array $providers = []);", "public function setDefaultOrderings(array $defaultOrderings)\n {\n // TODO: Implement setDefaultOrderings() method\n }", "function placeBet( $bet = array() ) {\n // and save it in local property\n $this->bet = $bet;\n }", "function placeBet( $bet = array() ) {\n // and save it in local property\n $this->bet = $bet;\n }", "public function setMarketType($marketType)\n {\n $this->marketType = $marketType;\n return $this;\n }", "protected function listCatalogItemsRequest($marketplace_id, $query = null, $query_context_id = null, $seller_sku = null, $upc = null, $ean = null, $isbn = null, $jan = null)\n {\n // verify the required parameter 'marketplace_id' is set\n if (null === $marketplace_id || (is_array($marketplace_id) && 0 === count($marketplace_id))) {\n throw new InvalidArgumentException('Missing the required parameter $marketplace_id when calling listCatalogItems');\n }\n\n $resourcePath = '/catalog/v0/items';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if (null !== $marketplace_id) {\n $queryParams['MarketplaceId'] = ObjectSerializer::toQueryValue($marketplace_id);\n }\n // query params\n if (null !== $query) {\n $queryParams['Query'] = ObjectSerializer::toQueryValue($query);\n }\n // query params\n if (null !== $query_context_id) {\n $queryParams['QueryContextId'] = ObjectSerializer::toQueryValue($query_context_id);\n }\n // query params\n if (null !== $seller_sku) {\n $queryParams['SellerSKU'] = ObjectSerializer::toQueryValue($seller_sku);\n }\n // query params\n if (null !== $upc) {\n $queryParams['UPC'] = ObjectSerializer::toQueryValue($upc);\n }\n // query params\n if (null !== $ean) {\n $queryParams['EAN'] = ObjectSerializer::toQueryValue($ean);\n }\n // query params\n if (null !== $isbn) {\n $queryParams['ISBN'] = ObjectSerializer::toQueryValue($isbn);\n }\n // query params\n if (null !== $jan) {\n $queryParams['JAN'] = ObjectSerializer::toQueryValue($jan);\n }\n\n return $this->generateRequest($multipart, $formParams, $queryParams, $resourcePath, $headerParams, 'GET', $httpBody);\n }", "public function set(MarketItem $marketItem)\n {\n $marketItem->Updated = time();\n \n $data = json_decode(json_encode($marketItem), true);\n $this->elastic->addDocument(self::INDEX, self::INDEX, $marketItem->ID, $data);\n }", "public function places()\n {\n return [\n 'launch',\n 'launched',\n 'deliver',\n 'delivered',\n 'send',\n 'sent',\n 'take',\n 'took',\n ];\n }", "public function setPlacement($place)\n {\n $this->setOption('placement', $place);\n return $this;\n }", "public function getMarkets ()\n\t{\n\t\treturn $this->call ('public/getmarkets');\n\t}", "function SetOrdering()\n {\n GLOBAL $_REQUEST;\n\n $sfid = 'sf' . $this->GetID();\n $srid = 'sr' . $this->GetID();\n $this->sf = $_REQUEST[$sfid];\n $this->sr = $_REQUEST[$srid];\n\n if ($this->sf != '') {\n $this->selectSQL->orders[] = $this->sf . \" \" . $this->sr;\n\n if ($this->sr == \"desc\") {\n $this->sr = \"asc\";\n $this->az = \"za\";\n } else {\n $this->sr = \"desc\"; //!< this is for the future \n $this->az = \"az\";\n } \n } else {\n $this->az = '';\n $this->sr = '';\n } \n }", "public function setStickerPositionInSet($sticker,$position){\n return $this->make_http_request(__FUNCTION__,(object) get_defined_vars());\n }", "public function setOrders($value) \n {\n $this->_fields['Orders']['FieldValue'] = $value;\n return;\n }", "private function setCurrency()\n {\n $currency = $this->em->getRepository('ClubUserBundle:LocationConfig')->getObjectByKey('default_currency',$this->order->getLocation());\n\n $this->order->setCurrency($currency);\n $this->order->setCurrencyValue(1);\n }", "protected function setEcommerceValues()\n {\n $this->setTxnType('01'); // Purchase\n $this->setTransactionCurrencyCode(826); // Pound sterling\n $this->setTerminalCountryCode(826); // United Kingdom\n\n // CNP/ECommerce (if flagged for payer authorisation with acquirer; no\n // CNP transactions are allowed with the exception of refunds)\n $this->setApacsTerminalCapabilities(4298);\n\n $this->setCaptureMethod(12); // Keyed Cardholder Not Present E-Commerce Order\n $this->setProcessingIdentifier(1); // Auth and Charge\n }", "public function salesOrderPlaceAfter($observer) {\n \n if (Mage::helper('core')->isModuleEnabled('Magestore_Inventorywarehouse'))\n return;\n if (Mage::registry('INVENTORY_CORE_ORDER_PLACE'))\n return;\n Mage::register('INVENTORY_CORE_ORDER_PLACE', true);\n $order = $observer->getOrder();\n $items = $order->getAllItems();\n $warehouseIds = null;\n $warehouseId = Mage::getModel('inventoryplus/warehouse')->getCollection()->getFirstItem()->getId();\n if (!$warehouseId) {\n Mage::log($observer->getOrder(), null, 'inventory_management.log');\n return;\n }\n foreach ($items as $item) {\n $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($item->getProductId()); \n $manageStock = $stockItem->getManageStock();\n if($stockItem->getUseConfigManageStock()){\n $manageStock = Mage::getStoreConfig('cataloginventory/item_options/manage_stock',Mage::app()->getStore()->getStoreId()); \n }\n if(!$manageStock){\n continue;\n }\n \n if (in_array($item->getProductType(), array('configurable', 'bundle', 'grouped')))\n continue;\n $qtyOrdered = 0;\n if (!$item->getQtyOrdered() || $item->getQtyOrdered() == 0) {\n if ($item->getParentItemId()) {\n $qtyOrdered = Mage::getModel('sales/order_item')->load($item->getParentItemId())->getQtyOrdered();\n }\n } else {\n $qtyOrdered = $item->getQtyOrdered();\n }\n $warehouseProduct = Mage::getModel('inventoryplus/warehouse_product')->getCollection()\n ->addFieldToFilter('warehouse_id', $warehouseId)\n ->addFieldToFilter('product_id', $item->getProductId())\n ->getFirstItem();\n $currentQty = $warehouseProduct->getAvailableQty() - $qtyOrdered;\n try {\n $warehouseProduct->setAvailableQty($currentQty)\n ->save();\n Mage::getModel('inventoryplus/warehouse_order')->setOrderId($order->getId())\n ->setWarehouseId($warehouseId)\n ->setProductId($item->getProductId())\n ->setItemId($item->getId())\n ->setQty($qtyOrdered)\n ->save();\n } catch (Exception $e) {\n Mage::log($e->getMessage(), null, 'inventory_management.log');\n }\n }\n }", "function setPlace( &$value )\n {\n $this->Place = $value;\n }", "public function restMarketsEbayMarketplacesGet($referrer_id = null, $marketplace_id = null, $market_id = null, $site_id = null)\n {\n list($response) = $this->restMarketsEbayMarketplacesGetWithHttpInfo($referrer_id, $marketplace_id, $market_id, $site_id);\n return $response;\n }", "public function markets()\n {\n return $this->hasMany(Market::class);\n }", "public function set_keywords($keywords)\n\t{\n\t\tif (is_null($keywords)) {\n\t\t\tthrow new InvalidArgumentException(\"Project Keywords Invalid!\");\n\t\t}\n\t\t$this->keywords = $keywords;\n\t}", "public function chekcingForMarketplaceSellerOrNot() {\n /**\n * Initilize customer and seller group id\n */\n $customerGroupIdVal = $sellerGroupIdVal = $customerStatusValue = '';\n /**\n * Get customer group id\n * @var int\n */\n $customerGroupIdVal = Mage::getSingleton ( 'customer/session' )->getCustomerGroupId ();\n $sellerGroupIdVal = Mage::helper ( 'marketplace' )->getGroupId ();\n /**\n * Get customer status\n * @var int\n */\n $customerStatusValue = Mage::getSingleton ( 'customer/session' )->getCustomer ()->getCustomerstatus ();\n /**\n * Checking for customer group id and seller group id\n */\n if (! Mage::getSingleton ( 'customer/session' )->isLoggedIn () && $customerGroupIdVal != $sellerGroupIdVal) {\n /**\n * add error message\n */\n Mage::getSingleton ( 'core/session' )->addError ( $this->__ ( 'You must have a Seller Account to access this page' ) );\n $this->_redirect ( 'marketplace/seller/login' );\n return false;\n }\n /**\n * Checking whether customer approved or not\n */\n if ($customerStatusValue != 1) {\n /**\n * add error message\n */\n Mage::getSingleton ( 'core/session' )->addError ( $this->__ ( 'Admin Approval is required. Please wait until admin confirms your Seller Account' ) );\n $this->_redirect ( 'marketplace/seller/login' );\n return false;\n }\n }", "function GetAllPlacedOffers()\n {\n $placedOffersModel = new PlacedOffersModel();\n return $placedOffersModel->GetAllPlacedOffers();\n }", "public function setOrderFilter($s)\n {\n if ($s && is_string($s)) {\n $this->resetFilters();\n $this->options['AmazonOrderId'] = $s;\n } else {\n return false;\n }\n }", "public function pullAllOrders()\n {\n $availableStatuses = ['confirmed', 'retrieved', 'pending'];\n foreach ($availableStatuses as $status) {\n /** @var ExpediaConfig $config */\n foreach ($this->getConfig() as $config) {\n\n $requestData = $this->requestDataFormatter->formatGetAllBookingsData($config, $status);\n $request = $this->requestFormatter->formatGetOrdersRequest($requestData);\n\n $response = $this->sendRequestAndGetResponse($request);\n $this->handlePullOrdersResponse($response, $config, $result, true);\n }\n }\n }", "function set_oauth_parms($oauth_parms = null, $oauth_urls = null)\n\t{\n\t\tif (is_array($oauth_urls))\n\t\t{\n\t\t\tlist(\n\t\t\t\t$this->auth_url_request,\n\t\t\t\t$this->auth_url_userauth,\n\t\t\t\t$this->auth_url_access,\n\t\t\t\t$this->auth_url_revoke\n\t\t\t\t) = SPUtils::get_values($oauth_urls, \"request\", \"authorize\", \"access\", \"revoke\");\n\t\t}\n\n\t\tif (is_string($oauth_parms))\n\t\t{\n\t\t\t$oauth_parms = SPUtils::parse_query($oauth_parms);\n\t\t}\n\n\t\tif (is_array($oauth_parms))\n\t\t{\n\t\t\tforeach($oauth_parms as $k => $v)\n\t\t\t{\n\t\t\t\t$this->__oauth[$k] = $v;\n\t\t\t}\n\t\t}\n\t}", "public function geMyOrders()\n {\n $service = new TradingService([\n 'credentials' => [\n 'devId' => env('EBAY_SANDBOX_DEV_ID'),\n 'appId' => env('EBAY_SANDBOX_APP_ID'),\n 'certId' => env('EBAY_SANDBOX_CERT_ID'),\n ],\n 'siteId' => SiteIds::US\n ]);\n /**\n * Create the request object.\n */\n $request = new GetMyeBaySellingRequestType();\n /**\n * An user token is required when using the Trading service.\n */\n $request->RequesterCredentials = new CustomSecurityHeaderType();\n $request->RequesterCredentials->eBayAuthToken = config('ebay.sandbox.authToken');\n /**\n * Request that eBay returns the list of actively selling items.\n * We want 10 items per page and they should be sorted in descending order by the current price.\n */\n $request->ActiveList = new ItemListCustomizationType();\n $request->ActiveList->Include = true;\n $request->ActiveList->Pagination = new PaginationType();\n $request->ActiveList->Pagination->EntriesPerPage = 10;\n $request->ActiveList->Sort = ItemSortTypeCodeType::C_CURRENT_PRICE_DESCENDING;\n $pageNum = 1;\n do {\n $request->ActiveList->Pagination->PageNumber = $pageNum;\n /**\n * Send the request.\n */\n $response = $service->getMyeBaySelling($request);\n /**\n * Output the result of calling the service operation.\n */\n echo \"==================\\nResults for page $pageNum\\n==================\\n\";\n if (isset($response->Errors)) {\n foreach ($response->Errors as $error) {\n printf(\n \"%s: %s\\n%s\\n\\n\",\n $error->SeverityCode === SeverityCodeType::C_ERROR ? 'Error' : 'Warning',\n $error->ShortMessage,\n $error->LongMessage\n );\n }\n }\n if ($response->Ack !== 'Failure' && isset($response->ActiveList)) {\n foreach ($response->ActiveList->ItemArray->Item as $item) {\n printf(\n \"(%s) %s: %s %.2f\\n\",\n $item->ItemID,\n $item->Title,\n $item->SellingStatus->CurrentPrice->currencyID,\n $item->SellingStatus->CurrentPrice->value\n );\n }\n }\n $pageNum += 1;\n } while (isset($response->ActiveList) && $pageNum <= $response->ActiveList->PaginationResult->TotalNumberOfPages);\n }", "function setOrder($order);", "public function SetExternalCheckout()\n\t{\n\t\tif(!isset($_REQUEST['provider'])) {\n\t\t\theader(\"Location: \".$GLOBALS['ShopPath'].\"/cart.php\");\n\t\t\texit;\n\t\t}\n\t\tif(!GetModuleById('checkout', $provider, $_REQUEST['provider'])) {\n\t\t\theader(\"Location: \".$GLOBALS['ShopPath'].\"/cart.php\");\n\t\t\texit;\n\t\t}\n\t\t// This gateway doesn't support a ping back/notification\n\t\tif(!method_exists($provider, 'SetCheckoutData')) {\n\t\t\theader(\"Location: \".$GLOBALS['ShopPath'].\"/cart.php\");\n\t\t\texit;\n\t\t}\n\t\t$provider->SetCheckoutData();\n\t}", "public function listByMarket(Core\\Market $market, $firstResult = 0, $maxResult = 20, $filter = []);", "public function setPlacement($value) {\n\t\t$this->_placement = $value;\n\t}", "public function setList(array $list = null) {\n $this->list = $list;\n }", "public function actionIndex()\n\n {\n\n\t\t$session = Yii::$app->session;\n\n\t\t\n\n\t\t$stores_list = $session['stores_list'];\n\n\t\t\n\n\t\tif(isset($_GET['s'])) {\n\n\t\t\t$s_id = $_GET['s'];\n\n\t\t\tif(empty($stores_list) && $s_id == 0) {\n\n\t\t\t\t$s_id = 0;\n\n\t\t\t} else if(empty($stores_list) && $s_id != 0) {\n\n\t\t\t\t$this->redirect(['index', 's'=> 0]);\n\n\t\t\t} else {\n\n\t\t\t\tif(!array_key_exists($s_id, $stores_list)) {\n\n\t\t\t\t\treset($stores_list);\n\n\t\t\t\t\t$this->redirect(['index', 's'=> key($stores_list)]);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tif(empty($stores_list)) {\n\n\t\t\t\t$this->redirect(['index', 's'=> 0]);\n\n\t\t\t} else {\n\n\t\t\t\treset($stores_list);\n\n\t\t\t\t$this->redirect(['index', 's'=> key($stores_list)]);\n\n\t\t\t}\n\n\t\t}\n\n\t\t\n\n\t\t$searchModel = new OrdersSearch();\n\n\t\t$queryParams = array_merge(array(),Yii::$app->request->getQueryParams());\n\n\t\t$queryParams[\"OrdersSearch\"][\"store_id\"] = $s_id;\n\n\t\t$dataProvider = $searchModel->search($queryParams);\n\n\t\t\n\n return $this->render('index', [\n\n 'searchModel' => $searchModel,\n\n 'dataProvider' => $dataProvider,\n\n\t\t\t'stores_list' => $stores_list,\n\n ]);\n\n }", "public function set_order_configurations($configs)\n {\n $this->order_configurations->clear();\n\n foreach ($configs as $config) {\n $ent = new OrderConfiguration();\n $ent->configuration = $config['configuration'];\n $ent->configuration_limits = $config['configuration_limits'];\n $ent->certification_level = $config['certification'];\n $ent->group = $config['group'];\n $ent->graduation_date = $config['graduation_date'];\n $ent->quantity = $config['quantity'];\n $ent->subtotal_cost = $config['subtotal'];\n $ent->order = $this;\n $this->order_configurations->add($ent);\n }\n\n return $this;\n }", "function invokeGetOrder(MarketplaceWebServiceOrders_Interface $service, $request, $request_item)\n {\n try {\n $response = $service->getOrder($request);\n\n /*item*/\n\n \t$request_item->setAmazonOrderId(\"102-2843002-9986658\");\n\n\n//\t\t\t \t$response_item = $service->listOrderItems($request_item);\n// $listOrderItemsResult = $response_item->getListOrderItemsResult();\n// $orderItems = $listOrderItemsResult->getOrderItems();\n// $orderItemList = $orderItems->getOrderItem();\n//\n//\t\t\t\techo '<pre>'.print_r($orderItemList,1).'</pre>';\n//\n//\t\t\t\techo $orderItemList['0']->getSellerSKU();\n//\t\t\t\texit();\n\n\t\t\t\t//$request_item->setAmazonOrderId(\"002-6565335-7985002\");\n\t\t\t\t$orderItemList =$service->listOrderItems($request_item)->getListOrderItemsResult()->getOrderItems()->getOrderItem();\n\n\t\t\t\techo count($orderItemList).'<br>';\n\t\t\t\tforeach($orderItemList as $val){\n\n\t\t\t\t\techo 'sku:'.$val->getSellerSKU();\n\t\t\t\t\t $itemPrice = $val->getItemPrice();\n\t\t\t\t\techo 'price:'.$itemPrice->getAmount();\n\t\t\t\t}\n\t\t\t//\texit();\n\n\n// foreach ($orderItemList as $orderItem) {\n// \t if ($orderItem->isSetSellerSKU())\n// {\n// echo(\" SellerSKU��<br>\");\n// echo(\" \" . $orderItem->getSellerSKU() . \"��<br>\");\n// }\n// }\n /*item*/\n\n echo (\"Service Response��<br>\");\n echo (\"=============================================================================��<br>\");\n\n echo(\" GetOrderResponse��<br>\");\n if ($response->isSetGetOrderResult()) {\n echo(\" GetOrderResult��<br>\");\n $getOrderResult = $response->getGetOrderResult();\n if ($getOrderResult->isSetOrders()) {\n echo(\" Orders��<br>\");\n $orders = $getOrderResult->getOrders();\n $orderList = $orders->getOrder();\n foreach ($orderList as $order) {\n echo(\" Order��<br>\");\n if ($order->isSetAmazonOrderId())\n {\n echo(\" AmazonOrderId��<br>\");\n echo(\" \" . $order->getAmazonOrderId() . \"��<br>\");\n }\n if ($order->isSetSellerOrderId())\n {\n echo(\" SellerOrderId��<br>\");\n echo(\" \" . $order->getSellerOrderId() . \"��<br>\");\n }\n\n //echo \"SKU��<br>\";\n \t//echo $order->getSellerSKU().'��<br>';\n\n\n if ($order->isSetPurchaseDate())\n {\n echo(\" PurchaseDate��<br>\");\n echo(\" \" . $order->getPurchaseDate() . \"��<br>\");\n }\n if ($order->isSetLastUpdateDate())\n {\n echo(\" LastUpdateDate��<br>\");\n echo(\" \" . $order->getLastUpdateDate() . \"��<br>\");\n }\n if ($order->isSetOrderStatus())\n {\n echo(\" OrderStatus��<br>\");\n echo(\" \" . $order->getOrderStatus() . \"��<br>\");\n }\n if ($order->isSetFulfillmentChannel())\n {\n echo(\" FulfillmentChannel��<br>\");\n echo(\" \" . $order->getFulfillmentChannel() . \"��<br>\");\n }\n if ($order->isSetSalesChannel())\n {\n echo(\" SalesChannel��<br>\");\n echo(\" \" . $order->getSalesChannel() . \"��<br>\");\n }\n if ($order->isSetOrderChannel())\n {\n echo(\" OrderChannel��<br>\");\n echo(\" \" . $order->getOrderChannel() . \"��<br>\");\n }\n if ($order->isSetShipServiceLevel())\n {\n echo(\" ShipServiceLevel��<br>\");\n echo(\" \" . $order->getShipServiceLevel() . \"��<br>\");\n }\n if ($order->isSetShippingAddress()) {\n echo(\" ShippingAddress��<br>\");\n $shippingAddress = $order->getShippingAddress();\n if ($shippingAddress->isSetName())\n {\n echo(\" Name��<br>\");\n echo(\" \" . $shippingAddress->getName() . \"��<br>\");\n }\n if ($shippingAddress->isSetAddressLine1())\n {\n echo(\" AddressLine1��<br>\");\n echo(\" \" . $shippingAddress->getAddressLine1() . \"��<br>\");\n }\n if ($shippingAddress->isSetAddressLine2())\n {\n echo(\" AddressLine2��<br>\");\n echo(\" \" . $shippingAddress->getAddressLine2() . \"��<br>\");\n }\n if ($shippingAddress->isSetAddressLine3())\n {\n echo(\" AddressLine3��<br>\");\n echo(\" \" . $shippingAddress->getAddressLine3() . \"��<br>\");\n }\n if ($shippingAddress->isSetCity())\n {\n echo(\" City��<br>\");\n echo(\" \" . $shippingAddress->getCity() . \"��<br>\");\n }\n if ($shippingAddress->isSetCounty())\n {\n echo(\" County��<br>\");\n echo(\" \" . $shippingAddress->getCounty() . \"��<br>\");\n }\n if ($shippingAddress->isSetDistrict())\n {\n echo(\" District��<br>\");\n echo(\" \" . $shippingAddress->getDistrict() . \"��<br>\");\n }\n if ($shippingAddress->isSetStateOrRegion())\n {\n echo(\" StateOrRegion��<br>\");\n echo(\" \" . $shippingAddress->getStateOrRegion() . \"��<br>\");\n }\n if ($shippingAddress->isSetPostalCode())\n {\n echo(\" PostalCode��<br>\");\n echo(\" \" . $shippingAddress->getPostalCode() . \"��<br>\");\n }\n if ($shippingAddress->isSetCountryCode())\n {\n echo(\" CountryCode��<br>\");\n echo(\" \" . $shippingAddress->getCountryCode() . \"��<br>\");\n }\n if ($shippingAddress->isSetPhone())\n {\n echo(\" Phone��<br>\");\n echo(\" \" . $shippingAddress->getPhone() . \"��<br>\");\n }\n }\n if ($order->isSetOrderTotal()) {\n echo(\" OrderTotal��<br>\");\n $orderTotal = $order->getOrderTotal();\n if ($orderTotal->isSetCurrencyCode())\n {\n echo(\" CurrencyCode��<br>\");\n echo(\" \" . $orderTotal->getCurrencyCode() . \"��<br>\");\n }\n if ($orderTotal->isSetAmount())\n {\n echo(\" Amount��<br>\");\n echo(\" \" . $orderTotal->getAmount() . \"��<br>\");\n }\n }\n if ($order->isSetNumberOfItemsShipped())\n {\n echo(\" NumberOfItemsShipped��<br>\");\n echo(\" \" . $order->getNumberOfItemsShipped() . \"��<br>\");\n }\n if ($order->isSetNumberOfItemsUnshipped())\n {\n echo(\" NumberOfItemsUnshipped��<br>\");\n echo(\" \" . $order->getNumberOfItemsUnshipped() . \"��<br>\");\n }\n if ($order->isSetPaymentExecutionDetail()) {\n echo(\" PaymentExecutionDetail��<br>\");\n $paymentExecutionDetail = $order->getPaymentExecutionDetail();\n $paymentExecutionDetailItemList = $paymentExecutionDetail->getPaymentExecutionDetailItem();\n foreach ($paymentExecutionDetailItemList as $paymentExecutionDetailItem) {\n echo(\" PaymentExecutionDetailItem��<br>\");\n if ($paymentExecutionDetailItem->isSetPayment()) {\n echo(\" Payment��<br>\");\n $payment = $paymentExecutionDetailItem->getPayment();\n if ($payment->isSetCurrencyCode())\n {\n echo(\" CurrencyCode��<br>\");\n echo(\" \" . $payment->getCurrencyCode() . \"��<br>\");\n }\n if ($payment->isSetAmount())\n {\n echo(\" Amount��<br>\");\n echo(\" \" . $payment->getAmount() . \"��<br>\");\n }\n }\n if ($paymentExecutionDetailItem->isSetSubPaymentMethod())\n {\n echo(\" SubPaymentMethod��<br>\");\n echo(\" \" . $paymentExecutionDetailItem->getSubPaymentMethod() . \"��<br>\");\n }\n }\n }\n if ($order->isSetPaymentMethod())\n {\n echo(\" PaymentMethod��<br>\");\n echo(\" \" . $order->getPaymentMethod() . \"��<br>\");\n }\n if ($order->isSetMarketplaceId())\n {\n echo(\" MarketplaceId��<br>\");\n echo(\" \" . $order->getMarketplaceId() . \"��<br>\");\n }\n if ($order->isSetBuyerEmail())\n {\n echo(\" BuyerEmail��<br>\");\n echo(\" \" . $order->getBuyerEmail() . \"��<br>\");\n }\n if ($order->isSetBuyerName())\n {\n echo(\" BuyerName��<br>\");\n echo(\" \" . $order->getBuyerName() . \"��<br>\");\n }\n if ($order->isSetShipmentServiceLevelCategory())\n {\n echo(\" ShipmentServiceLevelCategory��<br>\");\n echo(\" \" . $order->getShipmentServiceLevelCategory() . \"��<br>\");\n }\n }\n }\n }\n if ($response->isSetResponseMetadata()) {\n echo(\" ResponseMetadata��<br>\");\n $responseMetadata = $response->getResponseMetadata();\n if ($responseMetadata->isSetRequestId())\n {\n echo(\" RequestId��<br>\");\n echo(\" \" . $responseMetadata->getRequestId() . \"��<br>\");\n }\n }\n\n } catch (MarketplaceWebServiceOrders_Exception $ex) {\n echo(\"Caught Exception: \" . $ex->getMessage() . \"��<br>\");\n echo(\"Response Status Code: \" . $ex->getStatusCode() . \"��<br>\");\n echo(\"Error Code: \" . $ex->getErrorCode() . \"��<br>\");\n echo(\"Error Type: \" . $ex->getErrorType() . \"��<br>\");\n echo(\"Request ID: \" . $ex->getRequestId() . \"��<br>\");\n echo(\"XML: \" . $ex->getXML() . \"��<br>\");\n }\n }", "public function setStickerPositionInSet(array $params): bool\n {\n return $this->post('setStickerPositionInSet', $params)->getResult();\n }", "private function setSoldIndividually() {\n $this->product->set_sold_individually($this->wcData->isSoldIndividually());\n }", "public function setKeywords($keywords, $encoding = 'UTF-8') {}", "public function setShow_on_market ($show_on_market) {\n\t$this->show_on_market = $show_on_market;\n\treturn $this;\n}", "public function setStoreIds($storeIds);", "public function setOffers($offers) {\n $this->properties['offers'] = $offers;\n\n return $this;\n }", "public function restMarketsSettingsBulkPut()\n {\n list($response) = $this->restMarketsSettingsBulkPutWithHttpInfo();\n return $response;\n }", "public function setOrder(\\Magento\\Sales\\Model\\Order $order);" ]
[ "0.686151", "0.6451205", "0.6084095", "0.5616697", "0.5605863", "0.5438534", "0.5411805", "0.53625154", "0.5344959", "0.5333703", "0.52861553", "0.5172519", "0.51570046", "0.5106644", "0.50831336", "0.5065351", "0.5035239", "0.4982318", "0.49821988", "0.49467465", "0.49351332", "0.4902276", "0.48709556", "0.48537645", "0.48132437", "0.48054278", "0.47636622", "0.47262502", "0.47157145", "0.47114554", "0.4684347", "0.4682611", "0.4650358", "0.4636157", "0.4588158", "0.45751116", "0.45700476", "0.45509794", "0.4548825", "0.45469555", "0.45442796", "0.45415962", "0.45408693", "0.44925573", "0.44702032", "0.44692174", "0.44275254", "0.44229397", "0.44199997", "0.4411879", "0.44106317", "0.44044197", "0.43932414", "0.4391463", "0.43871793", "0.43861842", "0.43851182", "0.43824184", "0.4370452", "0.43683854", "0.4329695", "0.4329695", "0.43267542", "0.4325205", "0.43175817", "0.43106386", "0.43079525", "0.4300274", "0.42965612", "0.42951605", "0.4290174", "0.42792344", "0.4266045", "0.4265861", "0.42510638", "0.42441717", "0.4241663", "0.42330837", "0.42186627", "0.42172036", "0.42153394", "0.42140928", "0.42005122", "0.41998646", "0.4190291", "0.41836756", "0.41781986", "0.41751546", "0.41718408", "0.4169976", "0.41655606", "0.41629344", "0.4154451", "0.4151842", "0.41368935", "0.41367337", "0.41270006", "0.41215748", "0.41207835", "0.4120391" ]
0.5963878
3
Removes marketplace ID options and sets the current store's marketplace instead. Use this in case you change your mind and want to remove the Marketplace ID parameters you previously set.
public function resetMarketplaceFilter() { foreach ($this->options as $op => $junk) { if (preg_match("#MarketplaceId#", $op)) { unset($this->options[$op]); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setMarketplace($marketplace) {\n $this->marketplaceId = $marketplace;\n }", "public function setMarketplaceId($value)\n {\n $this->_fields['MarketplaceId']['FieldValue'] = $value;\n return $this;\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 withMarketplaceId($value)\n {\n $this->setMarketplaceId($value);\n return $this;\n }", "function realanswers_uninstall_options() {\r\n delete_option('real_apikey');\r\n delete_option('real_max_results');\r\n delete_option('real_custom_css');\r\n delete_option('real_captcha_public');\r\n delete_option('real_captcha_private');\r\n delete_option('real_location_count');\r\n delete_option('real_location_value');\r\n}", "function jigoshop_upgrade_145() {\n\t\n\tJigoshop_Base::get_options()->delete_option( 'jigoshop_paypal_send_shipping' );\n\tdelete_option( 'jigoshop_paypal_send_shipping' );\n\tJigoshop_Base::get_options()->delete_option( 'jigoshop_display_totals_tax' );\n\tdelete_option( 'jigoshop_display_totals_tax' );\n\t\n}", "public function getMarketplaceId()\n {\n return $this->_fields['MarketplaceId']['FieldValue'];\n }", "function _delete_option_fresh_site()\n {\n }", "function delete_site_option($option)\n {\n }", "function yaz_set_option($id, $options)\n{\n}", "public function maybe_clean_api_key_options() {\n $current_version = get_option( 'laterpay_version' );\n if ( version_compare( $current_version, '0.9.11', '<' ) ) {\n return;\n }\n\n $options = array(\n 'laterpay_sandbox_backend_api_url' => 'https://api.sandbox.laterpaytest.net',\n 'laterpay_sandbox_dialog_api_url' => 'https://web.sandbox.laterpaytest.net',\n 'laterpay_live_backend_api_url' => 'https://api.laterpay.net',\n 'laterpay_live_dialog_api_url' => 'https://web.laterpay.net',\n );\n\n foreach ( $options as $option_name => $correct_value ) {\n $option_value = get_option( $option_name );\n if ( $option_value != $correct_value ) {\n update_option( $option_name, $correct_value );\n }\n }\n }", "function setPrivateMarketPlace(PrivateMarketPlace $privateMarketPlace)\n {\n $this->privateMarketPlace = $privateMarketPlace;\n }", "public function cleanup() {\n\t\tforeach ( array(\n\t\t\t'leadin_portal_domain',\n\t\t\t'leadin_portalId',\n\t\t\t'leadin_pluginVersion',\n\t\t\t'hubspot_affiliate_code',\n\t\t\t'hubspot_acquisition_attribution',\n\t\t) as $option_name\n\t\t) {\n\t\t\tif ( get_option( $option_name ) ) {\n\t\t\t\tdelete_option( $option_name );\n\t\t\t}\n\t\t}\n\t}", "protected function maybe_update_options() {\n $current_version = get_option( 'laterpay_version' );\n\n if ( version_compare( $current_version, '0.9.8.1', '>=' ) ) {\n delete_option( 'laterpay_plugin_is_activated' );\n }\n }", "public function isSetMarketplaceId()\n {\n return !is_null($this->_fields['MarketplaceId']['FieldValue']);\n }", "public function clearOptions()\n {\n $this->_options = array();\n }", "public function uninstall() {\n\t\tdelete_option( $this->options_key );\n\t}", "public static function DelOffer(){\n\n\n\n\t\t}", "public function setMarketplaceFilter($list)\n {\n if (is_string($list)) {\n //if single string, set as filter\n $this->resetMarketplaceFilter();\n $this->options['MarketplaceId.Id.1'] = $list;\n } else if (is_array($list)) {\n //if array of strings, set all filters\n $this->resetMarketplaceFilter();\n $i = 1;\n foreach ($list as $x) {\n $this->options['MarketplaceId.Id.' . $i] = $x;\n $i++;\n }\n } else {\n return false;\n }\n }", "function hello_world_remove() {\ndelete_option('ernaehrungsnews_anzahl');\ndelete_option('ernaehrungsnews_trimmer');\ndelete_option('ernaehrungsnews_kategorieId');\n\n}", "function resetIDs(){\n resetId(\"data\");\n resetId(\"place\");\n}", "public function remove_options()\n {\n }", "function remove_allowed_options($del_options, $options = '')\n {\n }", "function wpjsfsp_delete_option( $key = '' ) {\n\treturn \\WPJSFSP\\Options::delete( $key );\n}", "public function phpunit_remove_stores() {\n $this->configstores = array();\n }", "private function delete_all_plugin_options() {\n\t\t// Deletes all options from the options table.\n\t\t$this->options->delete( Activation::OPTION_SHOW_ACTIVATION_NOTICE );\n\t\t$this->options->delete( Activation::OPTION_NEW_SITE_POSTS );\n\t\t$this->options->delete( Credentials::OPTION );\n\t\t$this->options->delete( 'googlesitekit-active-modules' );\n\t\t$this->options->delete( Search_Console::PROPERTY_OPTION );\n\t\t$this->options->delete( AdSense::OPTION );\n\t\t$this->options->delete( Analytics::OPTION );\n\t\t$this->options->delete( 'googlesitekit_analytics_adsense_linked' );\n\t\t$this->options->delete( PageSpeed_Insights::OPTION );\n\t\t$this->options->delete( Optimize::OPTION );\n\t\t$this->options->delete( Tag_Manager::OPTION );\n\t\t$this->options->delete( First_Admin::OPTION );\n\t\t$this->options->delete( OAuth_Client::OPTION_PROXY_NONCE );\n\t\t$this->options->delete( Beta_Migration::OPTION_IS_PRE_PROXY_INSTALL );\n\n\t\t// Clean up old site verification data, moved to user options.\n\t\t// Also clean up other old unused options.\n\t\t// @todo remove after RC.\n\t\t$this->options->delete( Verification::OPTION );\n\t\t$this->options->delete( Verification_Tag::OPTION );\n\t\t$this->options->delete( 'googlesitekit_api_key' );\n\t\t$this->options->delete( 'googlesitekit_available_modules' );\n\t\t$this->options->delete( 'googlesitekit_secret_token' );\n\t\t$this->options->delete( 'googlesitekit_project_id' );\n\t\t$this->options->delete( 'googlesitekit_gcp_project' );\n\t}", "protected function _setCompanyCode($storeId=null) {\n\t\t$config = Mage::getSingleton('avatax/config');\n\t\t$this->_request->setCompanyCode($config->getCompanyCode($storeId));\n\t}", "public function resetOptions()\n {\n $this->options = array();\n }", "function update_option($input) {\r\n if ( $_REQUEST['confirm-reset-options'] ) {\r\n delete_option($this->optionsName);\r\n wp_redirect(admin_url('options-general.php?page=' . $this->menuName . '&tab=' . $_POST['active_tab'] . '&reset=true'));\r\n exit();\r\n } else {\r\n wp_redirect(admin_url('options-general.php?page=' . $this->menuName . '&tab=' . $_POST['active_tab'] . '&updated=true'));\r\n exit();\r\n }\r\n }", "protected function clearRegistryData()\n {\n $this->registry->unregister('mapMageworxOptionId');\n $this->registry->unregister('mapMageworxOptionTypeId');\n\n return $this;\n }", "function upgradeWidgetOptions_2_1 ()\n\t{\n\t\t// Keep hardcoded name, in case we change the name at a later stage\n\t\t$oldvalues = get_option( 'widget_avhamazon_wishlist' );\n\t\t$all_options = array ();\n\n\t\tforeach ( $oldvalues as $name => $value ) {\n\t\t\tif ( $name != 'number' ) {\n\t\t\t\t$options = array ();\n\t\t\t\t$options['title'] = $value['title'];\n\t\t\t\t$options['associated_id'] = $value['associated_id'];\n\t\t\t\t$options['wishlist_id'] = $value['wishlist_id'];\n\t\t\t\t$options['locale'] = $value['locale'];\n\t\t\t\t$options['nr_of_items'] = $value['nr_of_items'];\n\t\t\t\t$options['show_footer'] = $value['show_footer'];\n\t\t\t\t$options['footer_template'] = $value['footer_template'];\n\t\t\t\t$all_options[$name] = $options;\n\t\t\t}\n\t\t}\n\n\t\tdelete_option( 'widget_avhamazon_wishlist' );\n\t\tadd_option( $this->db_options_name_widget_wishlist, $all_options );\n\n\t}", "protected function removeOldOptions() {\n $storage_handler = \\Drupal::entityTypeManager()->getStorage('paragraph');\n // Get ids of paragraphs.\n $ids = array_map(function ($item) {\n return $item['target_id'];\n }, $this->entity->get('field_checkbox_answers')->getValue());\n\n $entities = $storage_handler->loadMultiple($ids);\n if ($entities) {\n $storage_handler->delete($entities);\n }\n }", "function onUninstall(){\n\tdelete_option( 'stackoverflowUser' );\n\tdelete_option( 'StackoverflowData' );\n}", "public function delete()\n {\n delete_option($this->optionName);\n }", "function wlms_plugin_uninstall()\n{\n delete_option('wlms_settings');\n}", "public function resetData($store_id){\n\n $element = $this->getStoreInfo($store_id);\n if($element)\n $element->delete();\n }", "function commerce_store_post_update_4() {\n /** @var \\Drupal\\Core\\Config\\ConfigFactoryInterface $config_factory */\n $config_factory = \\Drupal::service('config.factory');\n $uuid = $config_factory->get('commerce_store.settings')->get('default_store');\n if ($uuid) {\n $store_storage = \\Drupal::entityTypeManager()->getStorage('commerce_store');\n /** @var \\Drupal\\commerce_store\\Entity\\StoreInterface[] $stores */\n $stores = $store_storage->loadByProperties(['uuid' => $uuid]);\n $store = reset($stores);\n if ($store) {\n $store->setDefault(TRUE);\n $store->save();\n }\n }\n $config_factory->getEditable('commerce_store.settings')->delete();\n}", "function cmh_delete_plugin_options() {\r\n\tdelete_option('cmh_options');\r\n}", "function store(){\n update_option( $this->option_name, $this->settings );\n }", "public function resetOptions()\n {\n $this->options = [];\n $this->configure();\n }", "public function resetCurrentCartIdentifier();", "function delete_option($name)\n{\n $db = get_db();\n $sql = \"DELETE FROM {$db->Option} WHERE `name` = ?\";\n $db->query($sql, array($name));\n\n // Update the options cache.\n $bootstrap = Zend_Registry::get('bootstrap');\n $options = $bootstrap->getResource('Options');\n if (isset($options[$name])) {\n unset($options[$name]);\n }\n $bootstrap->getContainer()->options = $options;\n}", "function top10_remove() {\r\n//delete_option('omekafeedpull_omekaroot');\r\n}", "function rmOption($id){\t\t\t\t\t\t\t//This is a function to remove options\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t//accepts 1 parameters, the option ID value\r\n\t\t$query= \"DELETE FROM `tbl_option` WHERE `option_id` = $id LIMIT 1\";\r\n\t\t$result = $this->mdb2->query($query) or die('An unknown error occurred while updating the data'); \r\n\t\tif(MDB2::isError($result)){\t\t\t\t\t\t\t//check weather query succeeded\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\treturn true;\r\n\t\t}\t\r\n\t}", "public function remove_license_option($option_key) {\r\n\treturn delete_site_option($this->plugin_config['plugin_prefix'].'_'.$option_key);\r\n}", "public function resetFilters()\n {\n unset($this->options['AmazonOrderId']);\n unset($this->options['FinancialEventGroupId']);\n $this->resetTimeLimits();\n }", "protected function _saveOptions(): void\n {\n if ($this->_search->hasOption(Search::OPTION_SCROLL)) {\n $this->_options[0] = $this->_search->getOption(Search::OPTION_SCROLL);\n }\n\n if ($this->_search->hasOption(Search::OPTION_SCROLL_ID)) {\n $this->_options[1] = $this->_search->getOption(Search::OPTION_SCROLL_ID);\n }\n\n if ($this->_search->hasOption(Search::OPTION_SEARCH_IGNORE_UNAVAILABLE)) {\n $isNotInitial = (null !== $this->_options[2]);\n $this->_options[2] = $this->_search->getOption(Search::OPTION_SEARCH_IGNORE_UNAVAILABLE);\n\n // remove ignore_unavailable from options if not initial search\n if ($isNotInitial) {\n $searchOptions = $this->_search->getOptions();\n unset($searchOptions[Search::OPTION_SEARCH_IGNORE_UNAVAILABLE]);\n $this->_search->setOptions($searchOptions);\n }\n }\n }", "function bf_flush_options() {\r\n\tglobal $bf_options;\r\n\t\r\n\t$bf_options = new BF_Options();\r\n\t$bf_options->get_options();\r\n\t\r\n\tif ( !get_option(THEME_ID . '_options') ) $bf_options->default_options();\r\n}", "public function maybe_update_api_urls_options_names() {\n $current_version = get_option( 'laterpay_version' );\n if ( version_compare( $current_version, '0.9.11', '<' ) ) {\n return;\n }\n\n $old_to_new_option_pair_array = array(\n 'laterpay_api_sandbox_url' => 'laterpay_sandbox_backend_api_url',\n 'laterpay_api_sandbox_web_url' => 'laterpay_sandbox_dialog_api_url',\n 'laterpay_api_live_url' => 'laterpay_live_backend_api_url',\n 'laterpay_api_live_web_url' => 'laterpay_live_dialog_api_url',\n );\n\n foreach ( $old_to_new_option_pair_array as $old_option_name => $new_option_name ) {\n $old_option_value = get_option( $old_option_name );\n\n if ( $old_option_value !== false ) {\n delete_option( $old_option_name );\n add_option( $new_option_name, $old_option_value );\n }\n }\n }", "public function save_option() {\n\t\tupdate_option( self::OPTION_NAME, $this->ryte_option );\n\t}", "function myplugin_deactivate_options( $options )\n{\n\tforeach ($options as $option => $default_value) {\n\t\tdelete_option( $option );\n\t}\n\n\tdelete_option( MYPLUGIN_NAME );\n\n}", "private function setStockOptions() {\n // Reset the settings if this is a recrawl\n if ($this->getSaverData()->isRecrawl()) {\n // Set the stock quantity\n $this->product->set_stock_quantity(null);\n\n // Set backorders\n $this->product->set_backorders('no');\n\n // Set the low stock amount if it exists\n $this->product->set_low_stock_amount('');\n }\n\n // If the stock is not managed, set the stock status and stop.\n if (!$this->wcData->isManageStock()) {\n $this->product->set_manage_stock(false);\n $this->product->set_stock_status($this->wcData->getStockStatus());\n return;\n }\n\n // Stock is managed\n $this->product->set_manage_stock(true);\n\n // Set the stock quantity\n $this->product->set_stock_quantity($this->wcData->getStockQuantity());\n\n // Set backorders\n $this->product->set_backorders($this->wcData->getBackorders());\n\n // Set the low stock amount if it exists\n $this->product->set_low_stock_amount($this->wcData->getLowStockAmount());\n }", "function delete_option($option)\n {\n }", "function cxense_remove_all_settings() {\n foreach(cxense_get_settings() as $setting)\n delete_option($setting['name']);\n}", "function tsuiseki_tracking_uninstall() {\n delete_option('tsuiseki_tracking_key');\n delete_option('tsuiseki_tracking_css_class');\n delete_option('tsuiseki_tracking_excluded_uris');\n}", "protected function _clearAuthToken()\n {\n delete_transient($this->tokenOptionName);\n }", "function hoopsai_wp_uninstall () {\n delete_option('hoopsai_wp_api_key');\n}", "function propanel_of_reset_options($options,$page = ''){\n\n\t\t\t//@since 2.0 mod by denzel, reset defaults\n\t\t\t//replace of_reset_options() function..\t\t\t\n\t\t\t$template = get_option('of_template');\n\n\t\t\tforeach($template as $t):\n\t\t\t\t@$option_name = $t['id'];\n\t\t\t\t@$default_value = $t['std'];\n\t\t\t\tupdate_option(\"$option_name\",\"$default_value\");\n\t\t\tendforeach;\t\t\n\t\t\t//end of mod\t\n\n}", "static function uninstall(){\n $defaults = self::getdefaults();\n foreach ($defaults as $option ) {\n if ( !is_multisite() ) {\n delete_option($option);\n }\n else {\n delete_site_option($option);\n }\n }\n return;\n }", "public function setListMarketplaces($value)\n {\n $this->_fields['ListMarketplaces']['FieldValue'] = $value;\n return $this;\n }", "public function tear_down() {\n\t\tforeach ( static::$original_options as $option => $original_value ) {\n\t\t\tupdate_option( $option, $original_value );\n\t\t}\n\n\t\tparent::tear_down();\n\t}", "function plugin_deactivate(){\n global $fb_opt_name, $gp_opt_name, $popup_fb_page, $popup_delay, $fb_popup_box,$page_not_like_box,$meta_box_fb_like;\n \n $option_name =array($fb_opt_name,$gp_opt_name,$popup_fb_page,$popup_delay,$fb_popup_box,$page_not_like_box);\n \n foreach ($option_name as $value) {\n delete_option( $value);\n }\n \n delete_post_meta_by_key( $meta_box_fb_like );\n}", "function deletePlace($workflowId, $placeId);", "public function set_options_filter() {\n\t\t/**\n\t\t * Filter the plugin options.\n\t\t *\n\t\t * @since 10.0.0\n\t\t *\n\t\t * @return array\n\t\t */\n\t\t$config = apply_filters( 'gu_set_options', [] );\n\n\t\t/**\n\t\t * Filter the plugin options.\n\t\t *\n\t\t * @return null|array\n\t\t */\n\t\t$config = empty( $config ) ? apply_filters_deprecated( 'github_updater_set_options', [ [] ], '6.1.0', 'gu_set_options' ) : $config;\n\n\t\tforeach ( array_keys( self::$git_servers ) as $git ) {\n\t\t\tunset( $config[ \"{$git}_access_token\" ], $config[ \"{$git}_enterprise_token\" ] );\n\t\t}\n\n\t\tif ( ! empty( $config ) ) {\n\t\t\t$config = $this->sanitize( $config );\n\t\t\tself::$options = array_merge( get_site_option( 'git_updater' ), $config );\n\t\t\tupdate_site_option( 'git_updater', self::$options );\n\t\t}\n\t}", "private function resetParams()\n {\n $this->id = null;\n }", "function restore_all() {\n update_option('page_on_front', $this->ale_demo_history['page_on_front']);\n update_option('show_on_front', $this->ale_demo_history['show_on_front']);\n set_theme_mod('nav_menu_locations', $this->ale_demo_history['nav_menu_locations']);\n update_option('sidebars_widgets', $this->ale_demo_history['sidebars_widgets']);\n\n if (isset($this->ale_demo_history['used_widgets']) and is_array($this->ale_demo_history['used_widgets'])) {\n foreach ($this->ale_demo_history['used_widgets'] as $used_widget => $used_widget_value) {\n update_option('widget_' . $used_widget, $used_widget_value);\n }\n }\n\n\n\n // put the old theme settings back\n ale_global::$ale_options = $this->ale_demo_history['theme_options'];\n update_option(ALETHEME_THEME_OPTIONS_NAME, ale_global::$ale_options);\n\n // ?\n update_option('ale_social_networks', $this->ale_demo_history['ale_social_networks']);\n\n // delete the demo history\n delete_option(ALETHEME_SHORTNAME . '_demo_history');\n }", "function fn_warehouses_store_locator_update_store_location_post($store_location_data, $store_location_id, $lang_code, $action)\n{\n if (isset($store_location_data['store_type'])\n && $store_location_data['store_type'] === Manager::STORE_LOCATOR_TYPE_PICKUP\n ) {\n /** @var Manager $manager */\n $manager = Tygh::$app['addons.warehouses.manager'];\n $manager->removeWarehouse($store_location_id);\n }\n}", "function remove_option_whitelist($del_options, $options = '')\n {\n }", "public function resetfeedAction()\n {\n $storeCode = Mage::helper('googlemerchants');\n Mage::getModel('googlemerchants/googlefeed')->setFeedConfig('', $storeCode);\n $this->_redirect('adminhtml/googlemerchants/feed');\n }", "function resetOptions()\n {\n $this->options = $this->_defaultOptions;\n }", "function setNoCarrier()\n{\n\tglobal $cart;\n\t$cart->id_carrier = 0;\n\t$cart->update();\n}", "function delete_user_option($user_id, $option_name, $is_global = \\false)\n {\n }", "public function remove_license_data() {\r\n\t$license_data = $this->get_license_options();\r\n\tforeach($license_data as $key => $value) {\r\n\t\t//delete_site_option($this->plugin_config['plugin_prefix'].'_'.$key);\r\n\t\t$this->remove_license_option($key);\r\n\t}\r\n}", "public function reset()\n {\n delete_option($this->dbVersionKey);\n }", "public function remove_option($option)\n {\n }", "function cinerama_edge_init_theme_options() {\n\t\tglobal $cinerama_edge_global_options;\n\t\tglobal $cinerama_edge_global_Framework;\n\t\tif ( isset( $cinerama_edge_global_options['reset_to_defaults'] ) ) {\n\t\t\tif ( $cinerama_edge_global_options['reset_to_defaults'] == 'yes' ) {\n\t\t\t\tdelete_option( \"edgtf_options_cinerama\" );\n\t\t\t}\n\t\t}\n\n\t\tif ( ! get_option( \"edgtf_options_cinerama\" ) ) {\n\t\t\tadd_option( \"edgtf_options_cinerama\", $cinerama_edge_global_Framework->edgtOptions->options );\n\n\t\t\t$cinerama_edge_global_options = $cinerama_edge_global_Framework->edgtOptions->options;\n\t\t}\n\t}", "protected function _revertOptions(): void\n {\n $this->_search->setOption(Search::OPTION_SCROLL, $this->_options[0]);\n $this->_search->setOption(Search::OPTION_SCROLL_ID, $this->_options[1]);\n if (null !== $this->_options[2]) {\n $this->_search->setOption(Search::OPTION_SEARCH_IGNORE_UNAVAILABLE, $this->_options[2]);\n }\n }", "public function setMarketId($var)\n {\n GPBUtil::checkString($var, True);\n $this->market_id = $var;\n }", "public function updateOffer($options)\n {\n $this->data = $this->model->updateOffer($this->client, $options);\n $this->loadXmlUpdateData();\n }", "function wpt_testimonial_uninstall(){\n\tdelete_option('wpt_effect');\n\tdelete_option('wpt_speed');\n\tdelete_option('wpt_sortby');\n\tdelete_option('wpt_orderby');\n\tdelete_option('wpt_viewall');\n\tdelete_option('wpt_viewall_page');\n}", "public function uninstallHook()\n\t{\n\t\t$ok =\n\t\t\tdelete_option(CommentsEncryptMain::OPTION_PUB_KEY) &&\n\t\t\tdelete_option(CommentsEncryptMain::OPTION_PUB_KEY_HASH);\n\t\t\tdelete_option(CommentsEncryptMain::OPTION_STORE_AVATAR_HASHES)\n\t\t;\n\t}", "function asp_save_option($key, $global = false) {\r\r\n if ( !isset(wd_asp()->o[$key]) )\r\r\n return false;\r\r\n\r\r\n if ( $global ) {\r\r\n return update_site_option($key, wd_asp()->o[$key]);\r\r\n } else {\r\r\n return update_option($key, wd_asp()->o[$key]);\r\r\n }\r\r\n}", "public function format_fragment_options( $options, $context = '' ) {\n\t\t // removes unusable values, and changes options common for all fragments\n if( ! empty( $options ) ){\n foreach( $options as $id => $value ){\n if( is_object( $value ) || is_array( $value ) ){\n // remove item if type is not supported\n unset( $options[ $id ] );\n }\n elseif( 'ajax_loading' == $id ){\n $options['ajax_loading'] = false;\n }\n }\n }\n\n // applies context specific changes\n if( ! empty( $context ) ){\n $options['item'] = $context;\n\n switch( $context ) {\n case 'add_to_wishlist':\n unset( $options['template_part'] );\n\t unset( $options['label'] );\n\t unset( $options['exists'] );\n\t unset( $options['icon'] );\n\t unset( $options['link_classes'] );\n\t unset( $options['link_popup_classes'] );\n\t unset( $options['container_classes'] );\n\t unset( $options['found_in_list'] );\n\t unset( $options['found_item'] );\n\t unset( $options['popup_title'] );\n break;\n }\n }\n\n return $options;\n }", "function upgradeDefaultOptions_2_2 ()\n\t{\n\t\t// Keep hardcoded name, in case we change the name at a later stage\n\t\t$oldvalues = get_option( 'avhamazon' );\n\t\t$newvalues = array ('general' => array (), 'widget_wishlist' => array () );\n\n\t\tforeach ( $oldvalues as $name => $value ) {\n\t\t\tif ( array_key_exists( $name, $this->default_options['general'] ) ) {\n\t\t\t\t$newvalues['general'][$name] = $value;\n\t\t\t}\n\t\t\tif ( array_key_exists( $name, $this->default_options['widget_wishlist'] ) ) {\n\t\t\t\t$newvalues['widget_wishlist'][$name] = $value;\n\t\t\t}\n\t\t}\n\t\tdelete_option( 'avhamazon' );\n\t\tadd_option( $this->db_options_name_core, $newvalues );\n\t}", "function deactivate() {\r\n delete_option(\"bvd_post_version\");\t\r\n delete_option(\"bvd_post_type\");\r\n delete_option(\"bvd_connection\");\r\n delete_option(\"bvd_show_version\");\r\n delete_option(\"bvd_favorites\");\r\n }", "public function resetRequestIds()\n {\n foreach ($this->options as $op => $junk) {\n if (preg_match('#ReportRequestIdList#', $op)) {\n unset($this->options[$op]);\n }\n }\n }", "public function clearConfig()\n {\n $this->_xcoobee->getStore()->clearStore();\n }", "public static function reset_import() {\n\t\t// phpcs: ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash\n\t\t$nonce = FrmAppHelper::simple_get( 'loc_nonce' );\n\t\tif ( ! $nonce || ! wp_verify_nonce( $nonce, 'reset_loc' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdelete_option( 'frm_usloc_options' );\n\t\tforeach ( array( 'frm_loc_lookup', 'frm_loc_list' ) as $form_key ) {\n\t\t\t$form_id = FrmForm::get_id_by_key( $form_key );\n\t\t\tif ( $form_id ) {\n\t\t\t\tFrmForm::destroy( $form_id );\n\t\t\t}\n\t\t}\n\t}", "function carspotAPI_save_appProduct_ids( $post_id )\n\t{\n\t\tif( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;\n\t\t \n\t\t/*if our nonce isn't there, or we can't verify it, bail*/\n\t\tif( !isset( $_POST['meta_box_nonce_product'] ) || !wp_verify_nonce( $_POST['meta_box_nonce_product'], 'my_meta_box_nonce_product' ) ) return;\n\t\t \n\t\t/*if our current user can't edit this post, bail*/\n\t\tif( !current_user_can( 'edit_post' ) ) return;\n\t\t\n\t\t/*Make sure your data is set before trying to save it*/\n\t\tif( isset( $_POST['package_product_code_android'] ) ){\n\t\t\tupdate_post_meta( $post_id, 'package_product_code_android', $_POST['package_product_code_android'] );\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tupdate_post_meta( $post_id, 'package_product_code_android', '' );\n\t\t}\n\t\t/*For IOS */\n\t\tif( isset( $_POST['package_product_code_ios'] ) ){\n\t\t\tupdate_post_meta( $post_id, 'package_product_code_ios', $_POST['package_product_code_ios'] );\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tupdate_post_meta( $post_id, 'package_product_code_ios', '' );\n\t\t}\t\t\n\t}", "function timezonecalculator_uninstall() {\r\n\tdelete_option('widget_timezonecalculator');\r\n\r\n\t$fieldsPre=\"timezones_\";\r\n\t$sectionPost=\"_Section\";\r\n\r\n\t$csstags=array(\"before_List\", \"after_List\", \"before_Tag\", \"after_Tag\", \"Time_Format\");\r\n\r\n\t$sections=array('Instructions' => '1', 'Content' => '1', 'CSS_Tags' => '1', 'Administrative_Options' => '1', 'Calculation' => '1');\r\n\r\n\tforeach ($csstags as $csstag) {\r\n\t\tdelete_option($fieldsPre.$csstag);\r\n\t}\r\n\r\n\tdelete_option(\"TimeZones\");\r\n\r\n\tdelete_option($fieldsPre.'Use_Ajax_Refresh');\r\n\tdelete_option($fieldsPre.'Refresh_Time');\r\n\r\n\tforeach ($sections as $key => $section) {\r\n\t\tdelete_option($fieldsPre.$key.$sectionPost);\r\n\t}\r\n}", "function qoorate_install() {\n\tadd_option('qoorate_api_key', '');\n\tadd_option('qoorate_api_secret', '');\n\tadd_option('qoorate_api_shortname', '');\n}", "public function destroy(Place $place)\n {\n //\n }", "public function destroy(Place $place)\n {\n //\n }", "public function setOptions()\n\t{\n\t\tupdate_option($this->optionVar, serialize($this->options));\n\t}", "private function setOptions()\n {\n $this->clientId = $this->config['stravaSettings']['clientId'];\n $this->clientSecret = $this->config['stravaSettings']['clientSecret'];\n $this->redirectUri = $this->config['stravaSettings']['redirectUri'];\n $this->aprovalPrompt = $this->config['stravaSettings']['approval_prompt'];\n $this->scopes = $this->config['stravaSettings']['scopes'];\n }", "function bf_update_options() {\r\n\tglobal $bf_options;\r\n\tupdate_option(THEME_ID . '_options', maybe_serialize($bf_options));\r\n}", "function ks_save_options_page($post_id) {\n // check if this is an options page\n if ($post_id == 'options') {\n // check if this site is hosted on a Kinsta production environment with caching\n if (wp_get_environment_type() == 'production' && class_exists('Kinsta\\Cache')) {\n wp_remote_get('https://localhost/kinsta-clear-cache-all', [\n 'sslverify' => false, \n 'timeout' => 5\n ]); // purge the cache\n }\n }\n}", "public function reset()\n {\n $this->values[self::_SYSTEM_SETTING_ITEM] = array();\n }", "function deleteSettings() {\n\t\tdelete_option('wassup_settings');\n\t}", "public function reset()\n\t{\n\t\tupdate_option($this->filterName, array());\n\t}" ]
[ "0.6137244", "0.56911683", "0.5467411", "0.5458537", "0.52779084", "0.5251295", "0.51486415", "0.50501186", "0.5045448", "0.5009403", "0.49769783", "0.49490494", "0.4946136", "0.48805892", "0.4868419", "0.48433185", "0.47996268", "0.47982377", "0.47949705", "0.47653383", "0.47627145", "0.4755901", "0.4748344", "0.4745655", "0.47430563", "0.47407502", "0.4738622", "0.47325704", "0.47237137", "0.47113815", "0.47028238", "0.4682435", "0.4679958", "0.46735814", "0.4670859", "0.4664509", "0.46610832", "0.46601364", "0.46550104", "0.4650264", "0.46449137", "0.46258727", "0.46249795", "0.46166873", "0.4615578", "0.46135002", "0.46061343", "0.46033317", "0.45938316", "0.45887244", "0.45844823", "0.458297", "0.45683575", "0.45656505", "0.4561242", "0.4555494", "0.4554741", "0.45431843", "0.45379362", "0.45239115", "0.4518337", "0.45181584", "0.45091832", "0.45022812", "0.44836134", "0.44810718", "0.4478658", "0.44734243", "0.44721454", "0.4452756", "0.44525632", "0.44482136", "0.44461468", "0.44375435", "0.4433139", "0.4432896", "0.44287455", "0.44197905", "0.44183758", "0.44122732", "0.44089928", "0.44080177", "0.44068322", "0.44029072", "0.43945846", "0.4387097", "0.43866923", "0.43831345", "0.4382123", "0.43811974", "0.43713713", "0.43616197", "0.43616197", "0.4360154", "0.43588325", "0.43554735", "0.43542218", "0.43495643", "0.43479055", "0.43457887" ]
0.72764057
0
Sets (or resets) the Fulfillment Channel Filter
public function setFulfillmentChannelFilter($filter) { if ($filter == 'AFN' || $filter == 'MFN') { $this->options['FulfillmentChannel.Channel.1'] = $filter; } else if (is_null($filter)) { unset($this->options['FulfillmentChannel.Channel.1']); } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setFulfillmentChannel($value)\n {\n $this->_fields['FulfillmentChannel']['FieldValue'] = $value;\n return $this;\n }", "public function resetFilter()\n {\n $this->actor = null;\n $this->addTimestamp = null;\n $this->encryptSignature = null;\n $this->expires = null;\n $this->serviceSecurityKey = null;\n $this->signAllHeaders = null;\n $this->tokenReferenceEncryption = null;\n $this->tokenReferenceSignature = null;\n $this->userSecurityKey = null;\n }", "public function setFilter($filter){ }", "function setFilter($filter) {\n\t\t$this->_filter = $filter;\n\t}", "public function withFulfillmentChannel($value)\n {\n $this->setFulfillmentChannel($value);\n return $this;\n }", "public function setFilter(string $filter);", "public function setFilter(?WorkbookFilter $value): void {\n $this->getBackingStore()->set('filter', $value);\n }", "private function setFilter()\n {\n $this->filter['value'] = $this->getParameter('value') == null ? '' : $this->getParameter('value');\n }", "public function set_channel(){\n\t\t$repository_id = sanitize_text_field( $_POST['repository_id'] );\n\t\t$channel = sanitize_text_field( $_POST['channel'] );\n\n\t\t$response = array();\n\t\tif ( wp_verify_nonce( $_POST['nonce'], 'installer_set_channel:' . $repository_id ) ) {\n\t\t\tif( isset( WP_Installer()->settings['repositories'][$repository_id] ) ){\n\t\t\t\tWP_Installer()->settings['repositories'][$repository_id]['channel'] = $channel;\n\t\t\t\tWP_Installer()->settings['repositories'][$repository_id]['no-prompt'] = $_POST['noprompt'] === 'true';\n\t\t\t\tWP_Installer()->save_settings();\n\t\t\t}\n\n\t\t\tWP_Installer()->refresh_repositories_data();\n\n\t\t\t$response['status'] = 'OK';\n\t\t}\n\n\t\techo json_encode( $response );\n\t\texit;\n\t}", "function acf_set_filters($filters = array())\n{\n}", "public function set_filter(){\n \tsetcookie(\"filter\", addslashes($_POST['filter']), time()+(60*60*24*30), '/');\n }", "public function setFilter($filter) : self\n {\n $this->initialized['filter'] = true;\n $this->filter = $filter;\n return $this;\n }", "public function setFilter($side, $channel, $kind, $value=0) {\n \n if(!$this->isReady()) {\n $this->error(\"setFilter() - not ready.\");\n return false;\n }\n \n $side = trim(strtolower($side));\n \n if(($side != \"input\") && ($side != \"output\")) {\n $this->error(\"setFilter() - side must be input or output: $side\");\n return false;\n }\n \n if(!is_numeric($channel)) {\n $this->error(\"setFilter() - channel must be a number: $channel\");\n return false;\n } \n \n if(($channel < 1) || ($channel > 15)) {\n $this->error(\"setFilter() - channel must be in the range 1..15: $channel\");\n return false;\n }\n $channel = (int)floor($channel);\n \n $kind = trim(strtolower($kind));\n \n if(($kind != \"passthrough\") && ($kind != \"null\") && ($kind != \"manual\")) {\n $this->error(\"setFilter() - filter must be manual, null or passthrough: $kind\");\n return false;\n }\n \n if($kind == \"manual\") {\n if(!is_numeric($value)) {\n if($value != 0) {\n $this->error(\"setFilter() - manual filter value must be a number: $value\");\n return false;\n }\n }\n }\n \n if(empty($value)) {\n $value = 0;\n }\n \n /* do the command */\n \n $cmd = \"filter,$side,$channel,$kind,$value\";\n \n $details = $this->doCommand($cmd);\n \n if(!$details) {\n $this->error(\"setFilter() - could not set filter: \".$this->getError());\n return false;\n }\n \n /* make sure it went ok */\n \n $status = trim($details[0]);\n \n if($status != \"OK. Filter set.\") {\n $this->error(\"setFilter() - bad status from ECU Bridge: $status\");\n return false;\n }\n \n /* all done */\n \n return true;\n }", "public function reset()\n\t{\n\t\tupdate_option($this->filterName, array());\n\t}", "public function setFilter(\\FilterIterator $filter)\n\t{\n\t\t$this->filter = $filter;\n\t}", "function mFILTER(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$FILTER;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:211:3: ( 'filter' ) \n // Tokenizer11.g:212:3: 'filter' \n {\n $this->matchString(\"filter\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "private function setFilter()\n\t{\n\t\t// get filter values\n\t\t$this->filter['language'] = ($this->getParameter('language', 'array') != '') ? $this->getParameter('language', 'array') : BL::getWorkingLanguage();\n\t\t$this->filter['application'] = $this->getParameter('application');\n\t\t$this->filter['module'] = $this->getParameter('module');\n\t\t$this->filter['type'] = $this->getParameter('type', 'array');\n\t\t$this->filter['name'] = $this->getParameter('name');\n\t\t$this->filter['value'] = $this->getParameter('value');\n\n\t\t// build query for filter\n\t\t$this->filterQuery = BackendLocaleModel::buildURLQueryByFilter($this->filter);\n\t}", "protected function setFilter(callable $filter)\n {\n $this->filter = $filter;\n\n return $this;\n }", "function setCompanyFilter($value) {\n return $this->setAdditionalProperty('company_filter', $value);\n }", "public function setChannel($var)\n {\n GPBUtil::checkString($var, True);\n $this->Channel = $var;\n\n return $this;\n }", "public function setChannel($var)\n {\n GPBUtil::checkString($var, True);\n $this->Channel = $var;\n\n return $this;\n }", "public function setFilter(Zend_Filter_Interface $filter)\n\t{\n\t\tself::$_filter = $filter;\n\t\treturn $this;\n\t}", "public function setChannelCode($value)\n {\n if (!array_key_exists('channel_code', $this->fieldsModified)) {\n $this->fieldsModified['channel_code'] = $this->data['fields']['channel_code'];\n } elseif ($value === $this->fieldsModified['channel_code']) {\n unset($this->fieldsModified['channel_code']);\n }\n\n $this->data['fields']['channel_code'] = $value;\n }", "public final function resetFilter()\n {\n $this->filter = '';\n $this->param = array();\n return $this;\n }", "public function setMiracastChannel(?MiracastChannel $value): void {\n $this->getBackingStore()->set('miracastChannel', $value);\n }", "public function resetFilters()\n {\n unset($this->options['AmazonOrderId']);\n unset($this->options['FinancialEventGroupId']);\n $this->resetTimeLimits();\n }", "public function resetFilters() {\n $this->filters = array();\n }", "protected function setFilter(array $filter) {\n $this->filter = array_flip($filter);\n }", "public function action_filter()\n\t{\n\t\tif (Input::post()){\n\t\t\tif (Input::post('filter')){\n\n\t\t\t\trequire APPPATH.'likestv.php';\n\n\t\t\t\ttry {\n\n\t\t\t\t// Retrieve profile information since user is logged in\n\t\t\t\t\t$user_profile = $facebook->api('/me');\n\t\t\t\t \n\t\t\t\t \n\t\t\t\t} catch (FacebookApiException $e) {\n\n\t\t\t\t error_log($e);\n\t\t\t\t $user = null;\n\n\t\t\t\t}\n\t\t\t\t$addfilter = Input::post('filter');\n\n\t\t\t\t// Creates database entry to be added to the database\n\t\t\t\t$preference = Model_Preference::forge(array(\n\t\t\t\t\t'username' => $user_profile[\"username\"],\n\t\t\t\t\t'filter' => $addfilter,\n\t\t\t\t));\n\t\t\t\t$preference and $preference->save();\n\t\t\t\t$this->template->title = 'Channel Filter';\n\t\t\t\t$this->template->content = View::forge('channels/filter');\n\t\t\t\tResponse::redirect('channels/');\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t// Filter redirects to channels if there is no post\n\t\t\tResponse::redirect('channels/');\n\t\t}\n\t}", "public function testEditFulfillmentChannel()\n {\n }", "public function setChannel($value)\n {\n return $this->set(self::channel, $value);\n }", "public function setChannel($value)\n {\n return $this->set(self::_CHANNEL, $value);\n }", "public function setChannel($value)\n {\n return $this->set(self::_CHANNEL, $value);\n }", "public function setChannel($value)\n {\n return $this->set(self::_CHANNEL, $value);\n }", "public function setChannel($value)\n {\n return $this->set(self::_CHANNEL, $value);\n }", "public function setSalesChannel($value)\n {\n $this->_fields['SalesChannel']['FieldValue'] = $value;\n return $this;\n }", "function ts3client_setChannelVariableAsInt($serverConnectionHandlerID, $channelID, $flag, $value) {}", "public function setFilter($filter)\n\t{\n\t\tparent::setFilter($filter);\n\n\t\t$this->userOptions['value'] = $this->getOption('value') === '' ? null : $this->getOption('value');\n\t}", "public function setChannel($channelName = 'none') {\n $this->channelName = $channelName;\n }", "#[CustomOpenApi\\Operation(id: 'userSetDefaultChannel', tags: [Tags::User, Tags::V1])]\n #[OpenApi\\Parameters(factory: DefaultHeaderParameters::class)]\n #[OpenApi\\Response(factory: GenericSuccessMessageResponse::class)]\n #[CustomOpenApi\\ErrorResponse(exception: UnauthorisedTenantAccessException::class)]\n public function channel(Channel $channel)\n {\n if (!tenancy()->hasTenantId($channel->id)) {\n throw new UnauthorisedTenantAccessException();\n }\n\n auth('sanctum')->user()->update(['channel_id' => $channel->id]);\n\n return GenericSuccessMessageResponse::getResponse();\n }", "public function setChannel($channel)\n {\n return $this->setData(self::CHANNEL, $channel);\n }", "public function set($channel = null)\n {\n if (! $channel) {\n $channel = $this->service->getDefaultRecord();\n }\n $this->setChannel($channel);\n }", "public function setFilter($filter)\n {\n $validFilters = self::NO_FILTER |\n self::FILTER_NONE | self::FILTER_SUB |\n self::FILTER_UP | self::FILTER_AVG |\n self::FILTER_PAETH | self::ALL_FILTERS;\n\n $filter = $filter & $validFilters;\n\n $this->filter = (integer) $filter;\n\n return $this;\n }", "public function setChannel(string $channel): self\n {\n $this->channel = $channel;\n return $this;\n }", "public function setFilter($filter)\n {\n $this->filter = $filter;\n\n return $this;\n }", "public function registerFilter(Chainr_Filter $filter) {\n\t\t$this->filterChain->register($filter);\n\t}", "public function actionSetFilter()\n {\n $filter = $this->module->filter;\n\n //make css class for checkbox\n foreach ($filter as $key => $property) {\n if (isset($property['class'])) {\n if (is_array($property['class'])) {\n $filter[$key]['class'] = implode(' ', $property['class']);\n }\n } else {\n $filter[$key]['class'] = '';\n }\n }\n\n //set value for js ajax variable\n $useAjax = $this->module->useAjax ? 'true' : 'false';\n\n return $this->renderPartial('filter-list', ['filter' => $filter, 'useAjax' => $useAjax]);\n }", "public function setFilter(Elastica_Filter_Abstract $filter)\n {\n return $this->_setFacetParam('filter', $filter->toArray());\n }", "public function setScope(?Filter $value): void {\n $this->getBackingStore()->set('scope', $value);\n }", "public function reset()\n {\n $this->values[self::_CHANNEL] = null;\n $this->values[self::_CONTENTS] = array();\n }", "function switchChannel($ch)\n {\n exec( $this->arfilelocation['iwpriv'] . ' '\n . escapeshellarg($this->interface) . ' set Channel='.$ch);\n }", "public function setFilter(Elastica_Filter_Abstract $filter)\n {\n return $this->_setFacetParam('facet_filter', $filter->toArray());\n }", "protected function deckApplyFilters()\n {\n // show card pool after applying filters\n $this->result()\n ->changeRequest('card_pool', 'yes')\n ->setCurrent('Decks_edit');\n }", "public function setFilter(array $filter)\n {\n return $this->setArgs(['filter' => $filter]);\n }", "public function setFilter($arrFilter);", "public function setFilters($filters)\r\n\t{\r\n\t\t$this->_filters=$filters;\r\n\t}", "public function configureReplicationFilter() {\n $filter['field_channel'] = [\n // Food.\n 'e4da9222-c270-43b7-abb9-2f83b1ad8716',\n ];\n $filter['field_tags'] = [\n // Quantum.\n '92af4c88-0b17-41be-b6d8-306766ae3377',\n // Cuba.\n '02c8cbd9-15b7-4231-b9ef-46c1ef37b233',\n ];\n\n Drupal::configFactory()\n ->getEditable('replication.replication_settings.contentpool')\n ->set('parameters.filter', $filter)\n ->save();\n }", "public function setChannel(Channel $channel = null)\n {\n $this->channel = $channel;\n\n return $this;\n }", "public function setChannel($channel = self::CH0) {\n if ($channel <= 8 && $channel > 0) {\n $channel = constant('self::CH' . ($channel - 1));\n }\n $this->channel = $channel;\n\n return $this;\n }", "public function mockFilter(Filter $filter): Filter\n {\n $filter->withMeta([ 'component' => 'mega-filter-placeholder' ]);\n $filter->withMeta([ 'originalComponent' => $filter->component ]);\n\n return $filter;\n }", "public function setFilterField($filterField)\n {\n $this->addFilterField($filterField);\n }", "public function setFilter($postID, $filter)\n {\n $rsp = new Response();\n\n //Can this profile edit this post\n\t\tif(!isAuthorized::editPost($postID))\n {\n\t\t\t$rsp->setFailure(401, \"You are not authorized to do this action.\")\n\t\t\t ->send();\n\t\t\treturn;\n\t\t}\n\n //Is given filter a supported one\n if(!in_array($filter, FiltR::$availableFilters) && $filter != \"none\")\n {\n\t\t\t$rsp->setFailure(400, \"This filter does not exists\")\n\t\t\t ->send();\n\t\t\treturn;\n\t\t}\n\n\t\tif(!$this->setPost($postID))\n\t\t\treturn;\n\n //Can we change this post's filter\n if($this->model->getState() != 0)\n {\n\t\t\t$rsp->setFailure(401, \"You cannot edit the picture of an already published post.\")\n\t\t\t ->send();\n\t\t\treturn;\n\t\t}\n\n $folder = $this->model->getSaveFolder();\n\n $currentFilter = $this->model->getFilter();\n\n //Are we using the same filter as before?\n if($currentFilter === $filter)\n {\n $rsp->setSuccess(200, \"Filter unchanged\")\n ->bindValue(\"postID\", $postID)\n ->bindValue(\"currentFilter\", $filter);\n\n if($filter == null)\n $rsp->bindValue(\"postPicture\", $folder.$postID.\".jpg\");\n else\n $rsp->bindValue(\"postPicture\", $folder.$postID.\"-\".$filter.\".jpg\");\n\n $rsp->send();\n\n return;\n }\n\n //Remove old one and create copy with filter applied\n if(file_exists($folder.$postID.\"-\".$currentFilter.\".jpg\"))\n {\n unlink($folder.$postID.\"-\".$currentFilter.\".jpg\");\n }\n\n $this->model->updateFilter($filter);\n\n //Are we removing the filter ?\n if($filter == \"none\")\n {\n $rsp->setSuccess(200)\n ->bindValue(\"postID\", $postID)\n ->bindValue(\"currentFilter\", null)\n ->bindValue(\"originalPicture\", $folder.$postID.\".jpg\")\n ->send();\n\n return;\n }\n\n FiltR::$filter($folder.$postID.\".jpg\", $folder.$postID.\"-\".$filter.\".jpg\");\n\n $rsp->setSuccess(200)\n ->bindValue(\"postID\", $postID)\n ->bindValue(\"currentFilter\", $filter)\n ->bindValue(\"editedPicture\", $folder.$postID.\"-\".$filter.\".jpg\")\n ->send();\n\n }", "public static function channelling(): void\n {\n self::$isChannel = true;\n }", "public function filter ($filter, array $options=[])\n {\n $this->filters[$filter] = $options;\n return $this;\n }", "public function setFilters($filters = false)\n {\n ($filters && ($this->filters = $filters));\n }", "public function resetMarketplaceFilter()\n {\n foreach ($this->options as $op => $junk) {\n if (preg_match(\"#MarketplaceId#\", $op)) {\n unset($this->options[$op]);\n }\n }\n }", "public function setFilter($filter)\n {\n $filters = array();\n parse_str($filter, $filters);\n foreach ($filters as $key => $val) {\n $this->addFilter($key, $val);\n }\n \n return $this;\n }", "private function setFilters($filters)\n {\n $this->filters = $filters;\n }", "protected function filterRestore()\n\t{\n\t\tif ($this->arParams[\"SAVE_IN_SESSION\"] == \"Y\" && !strlen($_REQUEST[\"filter\"]))\n\t\t{\n\t\t\tif (intval($_SESSION[\"spo_filter_id\"]))\n\t\t\t\t$_REQUEST[\"filter_id\"] = $_SESSION[\"spo_filter_id\"];\n\t\t\tif (strlen($_SESSION[\"spo_filter_date_from\"]))\n\t\t\t\t$_REQUEST[\"filter_date_from\"] = $_SESSION[\"spo_filter_date_from\"];\n\t\t\tif (strlen($_SESSION[\"spo_filter_date_to\"]))\n\t\t\t\t$_REQUEST[\"filter_date_to\"] = $_SESSION[\"spo_filter_date_to\"];\n\t\t\tif (strlen($_SESSION[\"spo_filter_status\"]))\n\t\t\t\t$_REQUEST[\"filter_status\"] = $_SESSION[\"spo_filter_status\"];\n\t\t\tif (strlen($_SESSION[\"spo_filter_payed\"]))\n\t\t\t\t$_REQUEST[\"filter_payed\"] = $_SESSION[\"spo_filter_payed\"];\n\t\t\tif (strlen($_SESSION[\"spo_filter_canceled\"]))\n\t\t\t\t$_REQUEST[\"filter_canceled\"] = $_SESSION[\"spo_filter_canceled\"];\n\t\t\tif ($_SESSION[\"spo_filter_history\"] == \"Y\")\n\t\t\t\t$_REQUEST[\"filter_history\"] = \"Y\";\n\t\t}\n\t}", "public function setValue( $value )\n {\n /* @var $filter OW_IFilter */\n foreach ( $this->filters as $filter )\n {\n $value = $filter->filter($value);\n }\n\n $this->value = $value;\n\n return $this;\n }", "public function resetFilters()\n {\n $this->filters = array();\n\n return $this;\n }", "function ts3client_flushChannelUpdates($serverConnectionHandlerID, $channelID) {}", "public function setFilters($filters)\n\t{\n\t\t$this->filters = $filters;\n\t}", "function acf_enable_filters($filters = array())\n{\n}", "public function __set($name, $value) \r\n {\r\n $this->filterFields[$name] = $value;\r\n }", "public function setChannel($channel)\n {\n if (is_string($channel)) {\n try {\n $channel = $this->service->getByHandle($channel);\n } catch (ModelNotFoundException $e) {\n $channel = $this->set();\n }\n }\n $this->channel = $channel;\n\n return $this;\n }", "public function reset()\n {\n $this->values[self::_CHANNEL] = null;\n $this->values[self::_CHAT_ID] = null;\n $this->values[self::_ACCESSORY] = null;\n }", "public function setDeploymentChannel(?AppleDeploymentChannel $value): void {\n $this->getBackingStore()->set('deploymentChannel', $value);\n }", "function channelUpdate(ChannelInterface $new, ?ChannelInterface $old);", "public function replaceFilter(FilterInterface $filter, $index)\n {\n if ($index < 0 or $index >= count($this->filters))\n {\n throw new \\InvalidArgumentException(sprintf(\"No such index '%d' in filter chain.\\nFilter chain definition is:\\n%s\\n\", $index, print_r($this->dumpDefinition(), true)));\n }\n\n $this->filters[$index] = $filter;\n\n return $this;\n }", "public function setFilterType($filter_type){\n $this->filter_type = $filter_type;\n return $this;\n }", "public function testPutChangeFilterValue() {\n $data = ['nid' => 1, 'delta' => 0];\n $filter = Filter::fromArray(['test' => 'unchanged', 'type' => 'test']);\n $r1 = new Redirect(['label' => 'First', 'filters' => [$filter]] + $data);\n $r1->save();\n\n $fakenode = (object) ['nid' => 1];\n $endpoint = new Endpoint($fakenode, 0);\n\n $data = $endpoint->get();\n $data['redirects'][0]['filters'][0]['test'] = 'changed';\n $new_data = $endpoint->put($data);\n $this->assertEqual($data, $new_data);\n }", "protected function filter()\n {\n $request = $this->getRequest();\n $session = $request->getSession();\n $filterForm = $this->createForm(new ChoferFilterType());\n $em = $this->getDoctrine()->getManager();\n $queryBuilder = $em->getRepository('ChoferesBundle:Chofer')\n ->createQueryBuilder('e')\n ->andWhere('e.estaActivo = TRUE');\n\n // Reset filter\n $session->remove('ChoferControllerFilter');\n\n\n // Filter action\n if ($request->get('filter_action') == 'filter') {\n // Bind values from the request\n $filterForm->bind($request);\n\n if ($filterForm->isValid()) {\n // Build the query from the given form object\n $this->get('lexik_form_filter.query_builder_updater')->addFilterConditions($filterForm, $queryBuilder);\n // Save filter to session\n $filterData = $filterForm->getData();\n $session->set('ChoferControllerFilter', $filterData);\n }\n } else {\n // Get filter from session\n if ($session->has('ChoferControllerFilter')) {\n $filterData = $session->get('ChoferControllerFilter');\n $filterForm = $this->createForm(new ChoferFilterType(), $filterData);\n $this->get('lexik_form_filter.query_builder_updater')->addFilterConditions($filterForm, $queryBuilder);\n }\n }\n\n return array($filterForm, $queryBuilder);\n }", "public function setScopeFilter($scope);", "function filterReset(){\n\treturn setcookie('filter', '', (time()-(60*60*24*30)), '/');\n}", "public function channel()\n {\n }", "public function getFulfillmentChannel()\n {\n return $this->_fields['FulfillmentChannel']['FieldValue'];\n }", "public function addFilter($filter) {\n $this->filters[] = $filter;\n $this->rewind();\n }", "public function setCf($_cf)\n {\n $this->cf = $_cf;\n }", "public function setFilter($extension, $filterName)\n\t{\n\t\tif (isset($this->filters[$extension]) && in_array($filterName, $this->filters[$extension])) {\n\t\t\treturn $this;\n\t\t}\n\t\t$this->filters[$extension][] = $filterName;\n\t\treturn $this;\n\t}", "function _setAllFilters( $objKey )\n {\n $this->_activateFilterLevel($objKey);\n\n // add all pre and post filters, dont use references here, so the filters are each an instance of its own\n // this is necessary since the options might be changed by any xml-config!\n if( sizeof($this->_preFilters) )\n foreach( $this->_preFilters as $aFilter )\n $this->_objectPool[$objKey]->registerPrefilter($aFilter[0],$aFilter[1]);\n if( sizeof($this->_postFilters) )\n foreach( $this->_postFilters as $aFilter )\n $this->_objectPool[$objKey]->registerPostfilter($aFilter[0],$aFilter[1]);\n }", "public function setFilters($filters)\n {\n $this->filters = $filters;\n }", "public static function setDefaultEncodingFilter(InterfaceEncodingFilter $filter)\n {\n Form::$defaultEncodingFilter = $filter;\n }", "public function addFilter(Swift_StreamFilter $filter, $key);", "public function setFiltersAttribute($value) {\n $this->attributes['filters'] = json_encode($value);\n }", "function setStatusFilter($value) {\n return $this->setAdditionalProperty('payment_status_filter', $value);\n }", "public function setDataFilter($filter)\n {\n // TODO: improve logging when we finally have a central Tesseract debugging workflow\n if (TYPO3_DLOG) {\n t3lib_div::devLog('Data filters are currently not supported!', 'tagpackprovider', 2);\n }\n }", "public function filter($filter)\n {\n $this->data['filter'] = $filter;\n\n return $this;\n }", "private function setSearchFilters()\n\t{\n\t\tif(sizeof($this->searchFilters) > 0)\n\t\t{\n\t\t\t$this->taskSearchHelperDA->setSearchFilters($this->searchFilters);\n\t\t}\n\t}", "public function resetFilter()\n {\n if (Session::has('admin_child_filter_name')) Session::forget('admin_child_filter_name');\n\n return Redirect::route('admin.child.index');\n }" ]
[ "0.61961734", "0.5955313", "0.5824731", "0.58120114", "0.56129915", "0.5586905", "0.5460962", "0.54503554", "0.5344645", "0.5330844", "0.5325333", "0.532207", "0.5275709", "0.5268247", "0.5257941", "0.52456856", "0.52384704", "0.51895267", "0.51863277", "0.51833105", "0.51833105", "0.51475936", "0.5142208", "0.51311547", "0.5101075", "0.50998616", "0.5097063", "0.5083025", "0.5072461", "0.5058467", "0.5056483", "0.50542456", "0.50542456", "0.50542456", "0.50542456", "0.50334644", "0.50294596", "0.5028387", "0.5027647", "0.5015645", "0.49959254", "0.49958616", "0.49957412", "0.49858546", "0.49792594", "0.4967505", "0.4894523", "0.48833266", "0.48584253", "0.48566386", "0.4848772", "0.48385853", "0.48299274", "0.4820195", "0.48171687", "0.48154566", "0.48147768", "0.48116022", "0.48039111", "0.47904372", "0.47777367", "0.47717145", "0.47677952", "0.47666597", "0.4764523", "0.47634146", "0.47602347", "0.4749593", "0.4743794", "0.4741258", "0.47323403", "0.47288868", "0.47282067", "0.47269765", "0.47243527", "0.47161642", "0.47112894", "0.4708091", "0.47063285", "0.47038502", "0.46986738", "0.46962097", "0.46926144", "0.46842542", "0.46763024", "0.4674484", "0.4672571", "0.4659777", "0.46556705", "0.46524227", "0.4632128", "0.4628559", "0.46170494", "0.4613102", "0.4607175", "0.4606974", "0.46054572", "0.4597346", "0.4590791", "0.45906848" ]
0.6905573
0
Sets the payment method(s). (Optional) This method sets the list of Payment Methods to be sent in the next request. Setting this parameter tells Amazon to only return Orders with payment methods that match those in the list. If this parameter is not set, Amazon will return Orders with any payment method.
public function setPaymentMethodFilter($list) { if (is_string($list)) { //if single string, set as filter $this->resetPaymentMethodFilter(); $this->options['PaymentMethod.1'] = $list; } else if (is_array($list)) { //if array of strings, set all filters $this->resetPaymentMethodFilter(); $i = 1; foreach ($list as $x) { $this->options['PaymentMethod.' . $i++] = $x; } } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setPaymentMethod($paymentMethod = 'CC') {\n $method = array(\n 'x_method'=>strtoupper($paymentMethod),\n );\n $this->NVP = array_merge($this->NVP, $method); \n }", "public function setPaymentMethod($method)\n {\n $this->_data['MediosPago'] = $method;\n }", "public function setPaymentMethod($payment) {\n if (!isset($payment['method'])) {\n Mage::throwException(Mage::helper('checkout')->__('Payment method is not defined'));\n }\n\n $quote = $this->getQuote();\n $quote->getPayment()->importData($payment);\n // shipping totals may be affected by payment method\n if (!$quote->isVirtual() && $quote->getShippingAddress()) {\n $quote->getShippingAddress()->setCollectShippingRates(true);\n $quote->setTotalsCollectedFlag(false)->collectTotals();\n }\n\n $quote->save();\n return $this;\n }", "public function setPaymentMethods(array $payment_methods)\n {\n $this->payment_methods = $payment_methods;\n\n return $this;\n }", "public function setPaymentMethod($paymentMethod){\n return $this->setData(self::PAYMENT_METHOD, $paymentMethod);\n }", "public function setPaymentMethod($value) \n {\n $this->_fields['PaymentMethod']['FieldValue'] = $value;\n return $this;\n }", "public function method($method): self {\n\t\tif (in_array($method, $this->methods)) {\n\t\t\t$this->params['method'] = $method;\n\t\t\treturn $this;\n\t\t} else {\n\t\t\t// throw exception if not set payment method from array\n\t\t\tthrow new \\Exception('Set payment Method ' . implode(',', $this->methods));\n\t\t}\n\n\t}", "public function setPayments($payments)\n {\n $this->payments = $payments;\n }", "public function setPaymentMethod($payment_method)\n {\n $this->payment_method = $payment_method;\n return $this;\n }", "public function paymentMethod($payment_method) {\n $this->data['attachment']['payload']['payment_method'] = $payment_method;\n\n return $this;\n }", "public function setPaymentMethod($paymentMethod)\n {\n $this->paymentMethod = $paymentMethod;\n return $this;\n }", "public function setPaymentMethod($paymentMethod)\n {\n $validValues = [\n PaymentMethod::CREDIT_CARD,\n PaymentMethod::BANK_TRANSFER,\n PaymentMethod::DIRECT_DEBIT,\n PaymentMethod::WECHAT,\n PaymentMethod::LINE,\n PaymentMethod::ALIPAY\n ];\n\n if (in_array($paymentMethod, $validValues)) {\n $this->paymentMethod = $this->limitLength($paymentMethod, 32);\n } else {\n Utils::error(\"Invalid paymentMethod provided: \" . $paymentMethod);\n }\n\n return $this;\n }", "public function setPaymentMethod($value)\n {\n return $this->set(self::payment_method, $value);\n }", "public function initPaymentMethod()\n {\n $helper = Mage::helper('onestepcheckout/payment');\n // check if payment saved to quote\n if (!$this->getQuote()->getPayment()->getMethod()) {\n $data = array();\n $paymentMethods = $helper->getPaymentMethods();\n if ((count($paymentMethods) == 1)) {\n $currentPaymentMethod = current($paymentMethods);\n $data['method'] = $currentPaymentMethod->getCode();\n } elseif ($lastPaymentMethod = $helper->getLastPaymentMethod()) {\n $data['method'] = $lastPaymentMethod;\n } elseif ($defaultPaymentMethod = Mage::helper('onestepcheckout/config')->getDefaultPaymentMethod()) {\n $data['method'] = $defaultPaymentMethod;\n }\n if (!empty($data)) {\n try {\n $this->getOnepage()->savePayment($data);\n } catch (Exception $e) {\n // catch this exception\n }\n }\n }\n }", "public function setPaymentMethod($paymentMethod)\n {\n $this->paymentMethod = $paymentMethod;\n\n return $this;\n }", "public function setPaymentMethod($paymentMethod)\n {\n $this->paymentMethod = $paymentMethod;\n\n return $this;\n }", "public function withPaymentMethod($value)\n {\n $this->setPaymentMethod($value);\n return $this;\n }", "public function setPayment($payment);", "public function setPayments($payments)\n {\n $this->payments = $payments;\n\n return $this;\n }", "function updatePaymentMethodOptions() {\n try {\n $payments_table = TABLE_PREFIX . 'payments';\n\n if (!in_array('method', $this->listTableFields($payments_table))) {\n DB::execute(\"ALTER TABLE $payments_table ADD method VARCHAR(100) DEFAULT '' AFTER comment\");\n } // if\n\n DB::execute('INSERT INTO ' . TABLE_PREFIX . \"config_options (name, module, value) VALUES ('payment_methods_common', 'payments', ?)\", serialize(array('Bank Deposit','Check','Cash','Credit','Debit')));\n DB::execute('INSERT INTO ' . TABLE_PREFIX . \"config_options (name, module, value) VALUES ('payment_methods_credit_card', 'payments', ?)\", serialize(array('Credit Card','Credit Card (Visa)','Credit Card (Mastercard)','Credit Card (Discover)','Credit Card (American Express)','Credit Card (Diners)')));\n DB::execute('INSERT INTO ' . TABLE_PREFIX . \"config_options (name, module, value) VALUES ('payment_methods_online', 'payments', ?)\", serialize(array('Online Payment', 'Online Payment (PayPal)', 'Online Payment (Authorize)')));\n\n } catch(Exception $e) {\n return $e->getMessage();\n } // try\n\n return true;\n }", "public function setPaymentMethod(PaymentMethodInterface $method, $amount = null);", "private function registerPaymentMethods()\n {\n $pPosition = 0;\n foreach ($this->paymentMethods as $pValue => $pSub) {\n if ($this->isAboveShopwareVersion52()) {\n $action = 'payment_processor_csrf/process';\n } else {\n $action = 'payment_processor/process';\n }\n $this->createPayment(array(\n 'name' => $pValue,\n 'description' => $pSub['description'],\n 'action' => $action,\n 'active' => 0,\n 'position' => $pPosition,\n 'additionalDescription' => ''\n ));\n $pPosition++;\n }\n }", "public function setMethod(BankPaymentType $method): self\n {\n $this->method = $method;\n\n return $this;\n }", "public function setDefaultActivePaymentMethod()\n {\n $criteria = new CDbCriteria;\n $criteria->select = 't.name, t.value';\n $criteria->condition = \"t.name LIKE 'payment_method_%' AND t.value = 1\";\n\n $data = Option::model()->findAll($criteria);\n\n $payment_method_options = array();\n\n foreach($data as $option) {\n if($option->name == 'payment_method_paypal') $payment_method_options[] = self::PAYMENT_METHOD_PAY_PAL;\n if($option->name == 'payment_method_skrill') $payment_method_options[] = self::PAYMENT_METHOD_MONEY_BOOKERS;\n if($option->name == 'payment_method_wiretransfer') $payment_method_options[] = self::PAYMENT_METHOD_WIRE_TRANSFER;\n if($option->name == 'payment_method_check') $payment_method_options[] = self::PAYMENT_METHOD_CHECK;\n if($option->name == 'payment_method_no_payment') $payment_method_options[] = self::PAYMENT_METHOD_NO_PAYMENT;\n }\n\n if(empty($payment_method_options))\n $payment_method_options[] = self::PAYMENT_METHOD_PAY_PAL;\n\n if(!in_array($this->payment_method, $payment_method_options))\n $this->payment_method = $payment_method_options[0];\n }", "public function setPaymentType($payment_type){\n $this->payment_type = $payment_type;\n }", "public function getPaymentMethods()\n {\n return $this->payment_methods;\n }", "public static function getPaymentMethods()\n {\n return [\n static::MAIL,\n static::DIRECT_DEPOSIT,\n ];\n }", "public function resetPaymentMethodFilter()\n {\n foreach ($this->options as $op => $junk) {\n if (preg_match(\"#PaymentMethod#\", $op)) {\n unset($this->options[$op]);\n }\n }\n }", "public function setOrderMethod($value)\n {\n $this->order_method = $value;\n $this->setSettingValue('retailcrm_order_method', $value);\n }", "public function applyPaymentMethod($methodCode = null)\n {\n if (false === $methodCode) {\n return $this->getQuote()->removePayment();\n }\n\n $store = $this->getQuote() ? $this->getQuote()->getStoreId() : null;\n $methods = Mage::helper('payment')->getStoreMethods($store, $this->getQuote());\n $availablePayments = array();\n foreach ($methods as $key => $method) {\n if (!$method || !$method->canUseCheckout()) {\n continue;\n }\n if ($this->_canUsePaymentMethod($method)) {\n $availablePayments[] = $method;\n }\n }\n\n $found = false;\n $count = count($availablePayments);\n if (1 === $count) {\n $methodCode = $availablePayments[0]->getCode();\n $found = true;\n } elseif ($count) {\n if (!$methodCode) {\n $methodCode = $this->getQuote()->getPayment()->getMethod();\n }\n if ($methodCode) {\n foreach ($availablePayments as $payment) {\n if ($methodCode == $payment->getCode()) {\n $found = true;\n break;\n }\n }\n }\n if (!$found || !$methodCode) {\n $methodCode = Mage::getStoreConfig('firecheckout/general/payment_method');\n foreach ($availablePayments as $payment) {\n if ($methodCode == $payment->getCode()) {\n $found = true;\n break;\n }\n }\n }\n }\n\n if (!$found) {\n $this->getQuote()->removePayment();\n } elseif ($methodCode) {\n $payment = $this->getQuote()->getPayment();\n $payment->setMethod($methodCode);\n $payment->setMethodInstance(null); // fix for billmate payments\n $method = $payment->getMethodInstance();\n try {\n $data = new Varien_Object(array('method' => $methodCode));\n $method->assignData($data);\n } catch (Exception $e) {\n // Adyen HPP extension fix\n }\n\n if ($this->getQuote()->isVirtual()) { // discount are looking for method inside address\n $this->getQuote()->getBillingAddress()->setPaymentMethod($methodCode);\n } else {\n $this->getQuote()->getShippingAddress()->setPaymentMethod($methodCode);\n }\n }\n\n return $this;\n }", "public function setPaymentButton($payment_button = 'pay')\n {\n if (in_array($payment_button, ['buy', 'pay'])) {\n $this->payment_button = $payment_button;\n }\n }", "public function setPayment($value) {\n $this->payment = $value;\n }", "public function getSupportedPaymentTypes()\n {\n return [PaymentMethod::PAYPAL];\n }", "protected function _initPaymentMethod($paymentMethod)\n {\n /**\n *\n * @note Check if quote is free\n *\n */\n if ($this->_isFreeQuote()) {\n /**\n *\n * @note If it is a free quote then use free payment method\n *\n */\n $paymentMethod = Free::PAYMENT_METHOD_FREE_CODE;\n }\n\n /**\n *\n * @note Add payment method\n *\n */\n $data[PaymentInterface::KEY_METHOD] = $paymentMethod;\n\n /**\n *\n * @note Save payment information\n *\n */\n $this->savePayment($data);\n }", "function choosePaymentMethod() {\n $booking = $this->Session->read('booking');\n // find all unpaid bookings\n $unpaid = $this->Payment->Booking->User->findUnpaid($this->Auth->user('id'));\n if ($booking) {\n // it's probably appropriate to save it at this point\n if ($this->Session->read('booking.saved') == false) {\n $bid = $this->Payment->Booking->saveBooking($booking, $this->Auth->user('id'));\n if ($bid === false) {\n $this->setFlash('Error: Could Not Save Booking');\n } else {\n $this->Session->write('booking.saved', true);\n $newbooking = $this->Payment->Booking->find('first', array(\n 'conditions' => array('Booking.id' => $bid),\n 'recursive' => '2'\n ));\n array_push($unpaid, $newbooking);\n }\n }\n }\n $this->set('unpaid', $unpaid);\n $this->set('allowedPaymentTypes', $this->allowedPaymentTypes);\n }", "public function getListPaymentMethod(ListPaymentMethodRequest $request)\n {\n $this->apiData = $this->paymentMethodService->getListPaymentMethod($request);\n\n return $this->success();\n }", "public function setPaymentOptions(?array $paymentOptions): self\n {\n $this->initialized['paymentOptions'] = true;\n $this->paymentOptions = $paymentOptions;\n\n return $this;\n }", "public static function getPaymentMethods() {\n\n // return array(\n // self::PAYMENT_METHOD_PAY_PAL => 'Pay Pal',\n // self::PAYMENT_METHOD_MONEY_BOOKERS => 'Skrill',\n // self::PAYMENT_METHOD_WIRE_TRANSFER => 'Wiretransfer',\n // );\n\n $payment_methods = array();\n\n if(Option::getByName('payment_method_paypal')) \n $payment_methods[self::PAYMENT_METHOD_PAY_PAL] = 'Pay Pal';\n\n if(Option::getByName('payment_method_skrill')) \n $payment_methods[self::PAYMENT_METHOD_MONEY_BOOKERS] = 'Skrill';\n\n if(Option::getByName('payment_method_wiretransfer') && Option::getByName('wiretransfer_doc_path')) \n $payment_methods[self::PAYMENT_METHOD_WIRE_TRANSFER] = 'Wiretransfer';\n\n if(Option::getByName('payment_method_check')) \n $payment_methods[self::PAYMENT_METHOD_CHECK] = 'Check';\n\n if(Option::getByName('payment_method_no_payment')) \n $payment_methods[self::PAYMENT_METHOD_NO_PAYMENT] = 'No Payment';\n\n return $payment_methods;\n }", "public function getSellingPaymentMethods()\n {\n return $this->hasMany(PaymentMethod::className(), ['id' => 'payment_method_id'])\n ->viaTable('{{%currency_exchange_order_selling_payment_method}}', ['order_id' => 'id']);\n }", "public function setShippingMethods($methods)\n {\n $addresses = $this->getQuote()->getAllShippingAddresses();\n foreach ($addresses as $address) {\n if (isset($methods[$address->getId()])) {\n $address->setShippingMethod($methods[$address->getId()]);\n } elseif (!$address->getShippingMethod()) {\n Mage::throwException(Mage::helper('checkout')->__('Please select shipping methods for all addresses'));\n }\n }\n $this->save();\n return $this;\n }", "public function setPayer($payment_method){\n\n $this->paypalHttpRequest['payer']['payment_method'] = $payment_method;\n\n return $this;\n }", "public function setMethods($methods)\n {\n $this->methods = $methods;\n }", "public function set_payment_method($id = null) {\n\t\tif ($id) {\n\t\t\ttry {\n\t\t\t\tif ($this->{$this->modelClass}->setPaymentMethod($id)) {\n\t\t\t\t\t$this->notice(__d('shop', 'Payment method has been changed'), array(\n\t\t\t\t\t\t'redirect' => true\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t} catch (Exception $e) {\n\t\t\t\t$this->notice($e);\n\t\t\t}\n\t\t}\n\n\t\t$this->notice(__d('shop', 'No payment method selected'), array(\n\t\t\t'redirect' => true,\n\t\t\t'level' => 'warning'\n\t\t));\n\t}", "public function changePaymentMethod(Checkout $checkout, Request $request)\n {\n $paymentMethod = $request->get('paymentMethod');\n if (isset($paymentMethod) && $paymentMethod > 0)\n {\n $checkout->setPaymentMethodId($paymentMethod);\n }\n }", "public function setMethods($methods) {\n $this->methods = is_array($methods) ? $methods : array($methods);\n }", "public function selectPaymentAction()\n {\n /* @var $fetcher \\SclZfCartPayment\\Method\\MethodFetcherInterface */\n $fetcher = $this->getServiceLocator()->get('SclZfCartPayment\\Method\\MethodFetcherInterface');\n\n /* @var $selector \\SclZfCartPayment\\Method\\MethodSelectorInterface */\n $selector = $this->getServiceLocator()->get('SclZfCartPayment\\Method\\MethodSelectorInterface');\n\n /* @var $form \\SclZfCartPayment\\Form\\PaymentMethods */\n $form = $this->getServiceLocator()->get('SclZfCartPayment\\Form\\PaymentMethods');\n\n $form->setAttribute('action', $this->url()->fromRoute('payment/select-payment'));\n\n $form->addMethods($fetcher->listMethods());\n\n if ($this->formSubmitted($form)) {\n $selector->setSelectedMethod($form->get($form::ELEMENT_METHOD)->getValue());\n return $this->redirect()->toRoute('cart/checkout');\n }\n\n return array('form' => $form);\n }", "public function getPaymentMethod()\n {\n return $this->paymentMethod;\n }", "public function getPaymentMethod()\n {\n return $this->paymentMethod;\n }", "public function get_supported_payment_methods() {\n\t\treturn array(\n\t\t\tPronamic_WP_Pay_PaymentMethods::BANCONTACT,\n\t\t\tPronamic_WP_Pay_PaymentMethods::BANK_TRANSFER,\n\t\t\tPronamic_WP_Pay_PaymentMethods::CREDIT_CARD,\n\t\t\tPronamic_WP_Pay_PaymentMethods::IDEAL,\n\t\t\tPronamic_WP_Pay_PaymentMethods::SOFORT,\n\t\t);\n\t}", "protected function getPaymentMethod(){\n return $this->method;\n }", "public static function getPaymentMethods($config = NULL)\n {\n if ($config == NULL) {\n WebPay::throwMissingConfigException();\n }\n\n return new GetPaymentMethods($config);\n }", "public function setPaymentDate($payment_date);", "public static function payment_methods() {\n return array(\n CheckfrontModule::PaymentPayNow => 'Pay now',\n CheckfrontModule::PaymentPayLater => 'Pay later'\n );\n }", "public function getPaymentMethod()\n {\n return $this->payment_method;\n }", "public function setEnforcePaymentMethod($value)\n {\n return $this->setParameter('enforcePaymentMethod', $value);\n }", "public function get_payment_methods() {\n\t\treturn $this->get_supported_payment_methods();\n\t}", "public function getPaymentMethodType() {\r\r\n return $this->_paymentMethod;\r\r\n }", "public function getAllPaymentMethods($asArray = false) {\r\n $jsonMethods = array();\r\n $methods = array();\r\n $model = new Mage_Checkout_Block_Onepage_Payment_Methods();\r\n $quote = Mage::getSingleton('checkout/cart')->getQuote();\r\n try {\r\n $selectedPaymentMethod = $quote->getPayment()->getData('method');\r\n } catch (Exception $e) {\r\n $this->logException($e, 'Get payment method');\r\n $this->_JSONencodeAndRespond(array(\"title\" => \"Error\", \"content\" => $e->getMessage()));\r\n return;\r\n }\r\n foreach ($model->getMethods() as $method) {\r\n $methodTitle = $method->getTitle();\r\n $methodCode = $method->getCode();\r\n if ($methodCode == \"paypal_express\") { // PayPal. Has logo and strange label text, override\r\n $methodTitle = \"PayPal\";\r\n }\r\n\r\n //eLabelz specific fix\r\n if ($methodCode == 'msp_cashondelivery') {\r\n $methodTitle .= \" – \" . Mage::helper('core')->currency($quote->getMspCashondeliveryInclTax(), true, false);\r\n }\r\n\r\n $m = array(\r\n 'type' => 'option',\r\n 'title' => $methodTitle,\r\n 'code' => $methodCode,\r\n 'price' => $this->getPaymentMethodPrice($methodCode),\r\n // Payment fee (price) is not available for standard payment methods, for extensions this need to be individualy coded\r\n 'image' => null,\r\n 'options' => $this->_getSuboptionsForPaymentMethod($methodCode),\r\n );\r\n $methods[] = $m;\r\n }\r\n if ($asArray)\r\n return $methods;\r\n $jsonMethods['payment_methods'] = $methods;\r\n\r\n return $jsonMethods;\r\n }", "public function savePaymentAction()\n {\n\t\tif( !Mage::helper('repay/checkout')->enabled() )\n\t\t\treturn parent::savePaymentAction();\n\t\t\n\t\t\n\t\tif ($this->_expireAjax()) {\n return;\n }\n try {\n if (!$this->getRequest()->isPost()) {\n $this->_ajaxRedirectResponse();\n return;\n }\n\n // set payment to quote\n $result = array();\n $data = $this->getRequest()->getPost('payment', array());\n $result = $this->getOnepage()->savePayment($data);\n if( !Mage::getSingleton('checkout/session')->getLastRealOrderId() ){\n\t\t\t\t$this->saveOrder();\n }\n\t\t\t$order = Mage::getModel('sales/order')->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId());\n // get section and redirect data\n $redirectUrl = $this->getOnepage()->getQuote()->getPayment()->getCheckoutRedirectUrl();\n if (empty($result['error']) && !$redirectUrl) {\n $this->loadLayout('checkout_onepage_review');\n $result['goto_section'] = 'review';\n $result['update_section'] = array(\n 'name' => 'review',\n 'html' => '<div class=\"order-tips\">'.Mage::Helper('repay/checkout')->getOrderCreateDesc($order).'</div>'.$this->_getReviewHtml()\n );\n }\n if ($redirectUrl) {\n $result['redirect'] = $redirectUrl;\n }\n\t\t\t\n } catch (Mage_Payment_Exception $e) {\n if ($e->getFields()) {\n $result['fields'] = $e->getFields();\n }\n $result['error'] = $e->getMessage();\n } catch (Mage_Core_Exception $e) {\n $result['error'] = $e->getMessage();\n } catch (Exception $e) {\n Mage::logException($e);\n $result['error'] = $this->__('Unable to set Payment Method.');\n }\n $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));\n }", "public static function listPaymentMethods()\n {\n return [\n [\n 'id' => self::PAYMENT_BY_CASH,\n 'name' => 'Tiền mặt',\n ],\n [\n 'id' => self::PAYMENT_BY_CONTRACT,\n 'name' => 'Hợp đồng',\n ],\n ];\n }", "public function filterPaymentMethods($payments, $value) {\n foreach ((array)$payments as $id => $payment) {\n if (isset($payment['settlement'])) {\n if ($payment['settlement'] === $this->module->getActingFlag()) {\n if ($this->module->canProcessCart() === false) {\n array_splice($payments, $id, 1);\n }\n }\n }\n }\n\n return $payments;\n }", "public function getBuyingPaymentMethods()\n {\n return $this->hasMany(PaymentMethod::className(), ['id' => 'payment_method_id'])\n ->viaTable('{{%currency_exchange_order_buying_payment_method}}', ['order_id' => 'id']);\n }", "public function getAvailablePaymentMethods ();", "public function setPaymentRequest(string $payment_request);", "public function set_sess_cart_payment_method()\n {\n $std = new stdClass();\n $std->payment_option = $this->input->post('payment_option', true);\n $std->terms_conditions = $this->input->post('terms_conditions', true);\n $this->session->set_userdata('mds_cart_payment_method', $std);\n }", "public function setMethod($method)\n {\n $this->method = $method;\n }", "public function setMethod($method);", "public function setMethod($method);", "protected function updatePaymentMethodConfigurations($paymentMethods)\n {\n foreach ($paymentMethods as $paymentMethod) {\n $this->_paymentMethodConfigurationManagement->update($paymentMethod);\n }\n }", "public function setPaymentInfoToQuote()\n {\n $expercashCode = Mage::getModel('expercash/expercashmpf')->getCode();\n $quote = Mage::getSingleton('checkout/session')->getQuote();\n\n if ($quote->isVirtual()) {\n $quote->getBillingAddress()->setPaymentMethod($expercashCode);\n } else {\n $quote->getShippingAddress()->setPaymentMethod($expercashCode);\n }\n\n // shipping totals may be affected by payment method\n if (!$quote->isVirtual() && $quote->getShippingAddress()) {\n $quote->getShippingAddress()->setCollectShippingRates(true);\n }\n\n $payment = $quote->getPayment();\n $payment->importData(array('method' => $expercashCode));\n $quote->save();\n }", "public function add_payment( $methods ) {\r\n\t\t\t$methods['payir'] = 'LP_Gateway_Payir';\r\n\r\n\t\t\treturn $methods;\r\n\t\t}", "public function setMethod($method)\n {\n $this->method = $method;\n }", "public function setMethod($method)\n {\n $this->method = $method;\n }", "public function setMethod($method)\n {\n $this->method = $method;\n }", "public function setMethod($method)\n {\n $this->method = $method;\n }", "public function __construct(PaymentMethod $paymentMethod)\n {\n $this->paymentMethod = $paymentMethod;\n }", "public function get_payment_methods()\n\t{\n\t\t//retrieve all orders\n\t\t$this->db->from('payment_method');\n\t\t$this->db->select('*');\n\t\t$this->db->order_by('payment_method_name');\n\t\t$query = $this->db->get();\n\t\t\n\t\treturn $query;\n\t}", "public function setMethods($methods)\n {\n $this->methods = $methods;\n return $this;\n }", "public function setMethod($method)\n {\n $this->method = strtolower($method);\n }", "public function getShippingMethods($countryID, $paymentID)\n {\n }", "public function setPaymentIndex($payment_index);", "public function setPaymentMode($payment_mode)\n {\n $this->payment_mode = $payment_mode;\n return $this;\n }", "static function listPaymentMethods($config)\n {\n if ($config == NULL) {\n WebPay::throwMissingConfigException();\n }\n\n return new ListPaymentMethods($config);\n }", "public function setMethod($method)\n {\n $this->setAttribute('method', strtolower($method));\n }", "public static function getPaymentTypes()\n\t{\n\t\t$types = array('' => 'Any');\n\t\treturn array_merge($types, PaymentMethod::getPaymentMethods());\n\t}", "public function setPaymentString(string $paymentString): void\n {\n $this->paymentString = $paymentString;\n }", "public function getPaymentMethods()\n {\n $obj = new stdClass();\n\n // Must be in specific order for checksum --\n $obj->Timestamp = $this->getTimeStamp();\n $obj->SessionID = $this->getSessionID();\n $obj->PinCode = $this->getPinCode();\n $obj->UserAgent = $this->getUserAgent();\n // -----------------------------------------\n // Generate Checksum\n $obj->Checksum = $this->generateChecksum($obj);\n\n // Ask for GetPaymentMethods and get response\n $result = $this->client->GetPaymentMethods($obj);\n $result = $result->GetPaymentMethodsResult;\n $methods = isset($result->PaymentMethods->PaymentMethod) ? $result->PaymentMethods->PaymentMethod : null;\n\n $obj->Timestamp = $result->Timestamp;\n\n if (!is_null($methods)) {\n // Assign all properties of the PaymentMethods object as property of mainObject\n $obj = $this->parseForChecksum($obj, $methods);\n }\n\n // Unset properties for new Checksum\n unset($obj->Checksum);\n\n // Verify response data by making a new Checksum\n $CheckSum = $this->generateChecksum($obj);\n\n // Compare Checksums\n if ($result->Checksum != $CheckSum)\n throw new Exception('Data could not be verified');\n\n return (array) $methods;\n }", "public function setPayment($payment)\n {\n $this->payment = $payment;\n\n return $this;\n }", "public function toOptionArray()\n {\n $methods = [];\n\n //default empty value\n $methods[] = [\"value\" => \"\", \"label\" => __(\"Accept all payment methods\")];\n $accessToken = $this->scopeConfig->getValue(\\MercadoPago\\Core\\Helper\\ConfigData::PATH_ACCESS_TOKEN, \\Magento\\Store\\Model\\ScopeInterface::SCOPE_WEBSITE, $this->_switcher->getWebsiteId());\n\n if (empty($accessToken)) {\n return $methods;\n }\n\n $this->coreHelper->log(\"GET /v1/payment_methods\", 'mercadopago');\n\n try {\n $response = \\MercadoPago\\Core\\Lib\\RestClient::get(\"/v1/payment_methods\", null, [\"Authorization: Bearer \" . $accessToken]);\n } catch (\\Exception $e) {\n $this->coreHelper->log(\"PaymentMethodsTicket:: An error occurred at the time of obtaining the ticket payment methods: \" . $e);\n return [];\n }\n\n if (isset($response['error']) || (isset($response['status']) && ($response['status'] != '200' && $response['status'] != '201'))) {\n return $methods;\n }\n\n $response = $response['response'];\n\n foreach ($response as $pm) {\n if (isset($pm['payment_type_id']) && $pm['payment_type_id'] == \"ticket\" || $pm['payment_type_id'] == \"atm\") {\n $methods[] = [\n 'value' => $pm['id'],\n 'label' => __($pm['name'])\n ];\n }\n }\n\n $this->coreHelper->log(\"PaymentMethodsTicket:: Displayed\", 'mercadopago', $methods);\n\n return $methods;\n }", "public function savePaymentAction()\n {\n if ($this->_expireAjax()) {\n return;\n }\n try {\n if (!$this->getRequest()->isPost()) {\n $this->_ajaxRedirectResponse();\n return;\n }\n\n // set payment to quote\n $result = array();\n $data = $this->getRequest()->getPost('payment', array());\n\n $paymentMethod = Payiteasy_Onlinepayment_Model_Method_Abstract::factory($data['method']);\n if (null !== $paymentMethod) {\n $data['onlinepayment_action_mode'] = $paymentMethod->getActionMode();\n }\n\n if ($data['method'] == Payiteasy_Onlinepayment_Model_Method_Creditcard::METHOD_CODE) {\n $data['cc_number_enc'] = Mage::getModel('onlinepayment/method_creditcard')->buildRequestCreatePanalias($data);\n } elseif ($data['method'] == Payiteasy_Onlinepayment_Model_Method_Debit::METHOD_CODE) {\n Mage::getSingleton('checkout/session')->paymentData = $data;\n }\n $result = $this->getOnepage()->savePayment($data);\n\n // get section and redirect data\n $redirectUrl = $this->getOnepage()->getQuote()->getPayment()->getCheckoutRedirectUrl();\n if (empty($result['error']) && !$redirectUrl) {\n $this->loadLayout('checkout_onepage_review');\n $result['goto_section'] = 'review';\n $result['update_section'] = array(\n 'name' => 'review',\n 'html' => $this->_getReviewHtml()\n );\n }\n if ($redirectUrl) {\n $result['redirect'] = $redirectUrl;\n }\n } catch (Mage_Payment_Exception $e) {\n if ($e->getFields()) {\n $result['fields'] = $e->getFields();\n }\n $result['error'] = $e->getMessage();\n } catch (Mage_Core_Exception $e) {\n $result['error'] = $e->getMessage();\n } catch (Exception $e) {\n Mage::logException($e);\n $result['error'] = $this->__('Unable to set Payment Method.');\n }\n $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));\n }", "public function edit(PaymentMethod $paymentMethod)\n {\n //\n }", "public function getPaymentMethodAllowableValues()\n {\n return [\n self::PAYMENT_METHOD_NONE,\n self::PAYMENT_METHOD_DOMESTIC_BANK_TRANSFER,\n self::PAYMENT_METHOD_ABROAD_BANK_TRANSFER,\n self::PAYMENT_METHOD_ACCOUNT_TRANSFER,\n self::PAYMENT_METHOD_CREDIT_CARD,\n ];\n }", "public function setAllowedRequestMethods(string ...$methods): void\n {\n $this->allowedRequestMethods = array_merge(\n $this->allowedRequestMethods, array_fill_keys($methods, \"allowed\")\n );\n }", "private function _proceedPayment()\n {\n $paymentInitModel = $this->_modelFactory->getModel(\n new Shopware_Plugins_Frontend_RpayRatePay_Component_Model_PaymentInit()\n );\n\n $result = $this->_service->xmlRequest($paymentInitModel->toArray());\n if (Shopware_Plugins_Frontend_RpayRatePay_Component_Service_Util::validateResponse(\n 'PAYMENT_INIT',\n $result\n )\n ) {\n Shopware()->Session()->RatePAY['transactionId'] = $result->getElementsByTagName('transaction-id')->item(\n 0\n )->nodeValue;\n $this->_modelFactory->setTransactionId(Shopware()->Session()->RatePAY['transactionId']);\n $paymentRequestModel = $this->_modelFactory->getModel(\n new Shopware_Plugins_Frontend_RpayRatePay_Component_Model_PaymentRequest()\n );\n $result = $this->_service->xmlRequest($paymentRequestModel->toArray());\n if (Shopware_Plugins_Frontend_RpayRatePay_Component_Service_Util::validateResponse(\n 'PAYMENT_REQUEST',\n $result\n )\n ) {\n $uniqueId = $this->createPaymentUniqueId();\n $orderNumber = $this->saveOrder(Shopware()->Session()->RatePAY['transactionId'], $uniqueId, 17);\n $paymentConfirmModel = $this->_modelFactory->getModel(\n new Shopware_Plugins_Frontend_RpayRatePay_Component_Model_PaymentConfirm()\n );\n $matches = array();\n preg_match(\"/<descriptor.*>(.*)<\\/descriptor>/\", $this->_service->getLastResponse(), $matches);\n $dgNumber = $matches[1];\n $result = $this->_service->xmlRequest($paymentConfirmModel->toArray());\n if (Shopware_Plugins_Frontend_RpayRatePay_Component_Service_Util::validateResponse(\n 'PAYMENT_CONFIRM',\n $result\n )\n ) {\n if (Shopware()->Session()->sOrderVariables['sBasket']['sShippingcosts'] > 0) {\n $this->initShipping($orderNumber);\n }\n try {\n $orderId = Shopware()->Db()->fetchOne(\n 'SELECT `id` FROM `s_order` WHERE `ordernumber`=?',\n array($orderNumber)\n );\n Shopware()->Db()->update(\n 's_order_attributes',\n array(\n 'RatePAY_ShopID' => Shopware()->Shop()->getId(),\n 'attribute5' => $dgNumber,\n 'attribute6' => Shopware()->Session()->RatePAY['transactionId']\n ),\n 'orderID=' . $orderId\n );\n } catch (Exception $exception) {\n Shopware()->Log()->Err($exception->getMessage());\n }\n\n //set payments status to payed\n $this->savePaymentStatus(\n Shopware()->Session()->RatePAY['transactionId'],\n $uniqueId,\n 155\n );\n\n /**\n * unset DFI token\n */\n if (Shopware()->Session()->RatePAY['devicefinterprintident']['token']) {\n unset(Shopware()->Session()->RatePAY['devicefinterprintident']['token']);\n }\n\n /**\n * if you run into problems with the redirect method then use the forwarding\n * return $this->forward('finish', 'checkout', null, array('sUniqueID' => $uniqueId));\n **/\n \n $this->redirect(\n Shopware()->Front()->Router()->assemble(\n array(\n 'controller' => 'checkout',\n 'action' => 'finish',\n 'forceSecure' => true\n )\n )\n );\n } else {\n $this->_error();\n }\n } else {\n $this->_error();\n }\n } else {\n $this->_error();\n }\n }", "public function get_payment_methods()\n\t{\n\t\t//retrieve all invoice\n\t\t$this->db->from('payment_method');\n\t\t$this->db->select('*');\n\t\t$this->db->order_by('payment_method_name');\n\t\t$query = $this->db->get();\n\t\t\n\t\treturn $query;\n\t}", "public function setPaymentFields($fields)\n\t{\n\t\t$array = (array)$fields;\n\t\tforeach ($array as $key => $value) {\n\t\t\t$this->setPaymentField($key, $value);\n\t\t}\n\t}", "protected function setMethod($method) {\n $this->_method = $method;\n }", "public function getPaymentMethod(){\n return $this->_getData(self::PAYMENT_METHOD);\n }", "function woocommerce_add_paycoingateway_gateway($methods) {\n\t\t\t$methods[] = 'WC_Gateway_PaycoinGateway';\n\t\t\treturn $methods;\n\t\t}", "public function getPaymentMethodAllowableValues()\n {\n return [\n self::PAYMENT_METHOD_COD,\n self::PAYMENT_METHOD_CVS,\n self::PAYMENT_METHOD_OTHER,\n ];\n }" ]
[ "0.69143283", "0.6708846", "0.66641176", "0.6631584", "0.660766", "0.66071033", "0.6375148", "0.6364247", "0.63342315", "0.6289773", "0.62782013", "0.6266037", "0.62542796", "0.62093276", "0.6098647", "0.6098647", "0.6079241", "0.5935154", "0.5889609", "0.58831525", "0.58677447", "0.5857605", "0.57941145", "0.5788323", "0.57778805", "0.5757718", "0.5751105", "0.57312685", "0.57263297", "0.5724498", "0.5712229", "0.570071", "0.56312835", "0.56066483", "0.559155", "0.55501014", "0.55453914", "0.55442756", "0.5539074", "0.5535007", "0.5526674", "0.55126786", "0.5501312", "0.5500693", "0.547931", "0.54712516", "0.5468603", "0.5468603", "0.5467982", "0.5446727", "0.54411644", "0.54407424", "0.53988785", "0.53797334", "0.5369874", "0.5362138", "0.5347935", "0.5345433", "0.5334985", "0.533083", "0.5325716", "0.5316005", "0.52210134", "0.52177835", "0.52130306", "0.5199831", "0.519945", "0.519945", "0.51921976", "0.5185116", "0.51848215", "0.51804763", "0.51804763", "0.51804763", "0.51804763", "0.51596016", "0.51533204", "0.51367", "0.51289713", "0.5121309", "0.51110655", "0.5103543", "0.51026505", "0.5088943", "0.5087812", "0.5077873", "0.50507987", "0.5042457", "0.50229114", "0.5015218", "0.5013246", "0.5007041", "0.50032437", "0.5003", "0.5000448", "0.4999091", "0.49984998", "0.49880216", "0.49612", "0.49522895" ]
0.5870936
20
Removes payment method options. Use this in case you change your mind and want to remove the Payment Method parameters you previously set.
public function resetPaymentMethodFilter() { foreach ($this->options as $op => $junk) { if (preg_match("#PaymentMethod#", $op)) { unset($this->options[$op]); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function remove_options()\n {\n }", "public function destroy(PaymentMethod $paymentMethod)\n {\n //\n }", "public function destroy(PaymentMethod $paymentMethod)\n {\n //\n }", "public function destroy(PaymentMethod $paymentMethod)\n {\n //\n }", "function realanswers_uninstall_options() {\r\n delete_option('real_apikey');\r\n delete_option('real_max_results');\r\n delete_option('real_custom_css');\r\n delete_option('real_captcha_public');\r\n delete_option('real_captcha_private');\r\n delete_option('real_location_count');\r\n delete_option('real_location_value');\r\n}", "function updatePaymentMethodOptions() {\n try {\n $payments_table = TABLE_PREFIX . 'payments';\n\n if (!in_array('method', $this->listTableFields($payments_table))) {\n DB::execute(\"ALTER TABLE $payments_table ADD method VARCHAR(100) DEFAULT '' AFTER comment\");\n } // if\n\n DB::execute('INSERT INTO ' . TABLE_PREFIX . \"config_options (name, module, value) VALUES ('payment_methods_common', 'payments', ?)\", serialize(array('Bank Deposit','Check','Cash','Credit','Debit')));\n DB::execute('INSERT INTO ' . TABLE_PREFIX . \"config_options (name, module, value) VALUES ('payment_methods_credit_card', 'payments', ?)\", serialize(array('Credit Card','Credit Card (Visa)','Credit Card (Mastercard)','Credit Card (Discover)','Credit Card (American Express)','Credit Card (Diners)')));\n DB::execute('INSERT INTO ' . TABLE_PREFIX . \"config_options (name, module, value) VALUES ('payment_methods_online', 'payments', ?)\", serialize(array('Online Payment', 'Online Payment (PayPal)', 'Online Payment (Authorize)')));\n\n } catch(Exception $e) {\n return $e->getMessage();\n } // try\n\n return true;\n }", "function jigoshop_upgrade_145() {\n\t\n\tJigoshop_Base::get_options()->delete_option( 'jigoshop_paypal_send_shipping' );\n\tdelete_option( 'jigoshop_paypal_send_shipping' );\n\tJigoshop_Base::get_options()->delete_option( 'jigoshop_display_totals_tax' );\n\tdelete_option( 'jigoshop_display_totals_tax' );\n\t\n}", "public function clearOptions()\n {\n $this->_options = array();\n }", "protected function maybe_update_options() {\n $current_version = get_option( 'laterpay_version' );\n\n if ( version_compare( $current_version, '0.9.8.1', '>=' ) ) {\n delete_option( 'laterpay_plugin_is_activated' );\n }\n }", "function wooadmin_remove_contactmethods($contactmethods ) {\n\n unset($contactmethods['aim']);\n\n unset($contactmethods['website']);\n\n unset($contactmethods['yim']);\n\n unset($contactmethods['jabber']);\n\n unset($contactmethods['googleplus']);\n\n unset($contactmethods['twitter']);\n\n unset($contactmethods['url']);\n\n return $contactmethods;\n\n}", "static function pmpro_payment_options($options)\n\t\t{\n\t\t\t//get stripe options\n\t\t\t$paypal_options = PMProGateway_paypalexpress::getGatewayOptions();\n\n\t\t\t//merge with others.\n\t\t\t$options = array_merge($paypal_options, $options);\n\n\t\t\treturn $options;\n\t\t}", "public function hookPaymentOptions($params)\n {\n if (!$this->active) {\n return;\n }\n if (!$this->checkCurrency($params['cart'])) {\n return;\n }\n $payments_options = [];\n $ifthenpayGateway = GatewayFactory::build('gateway');\n foreach ((array) unserialize($this->ifthenpayConfig['IFTHENPAY_USER_PAYMENT_METHODS']) as $paymentMethod) {\n if (PrestashopModelFactory::buildCurrency($params['cart']->id_currency)->iso_code === 'EUR' || $paymentMethod === 'ccard') {\n if (Configuration::get('IFTHENPAY_' . Tools::strtoupper($paymentMethod))) {\n $option = PrestashopFactory::buildPaymentOption();\n if ($paymentMethod === 'mbway') {\n $this->context->smarty->assign('mbwaySvg', Media::getMediaPath(\n _PS_MODULE_DIR_ . $this->name . '/views/svg/mbway.svg' \n )\n );\n $this->context->smarty->assign(\n [\n 'action' => $this->context->link->getModuleLink(\n $this->name,\n 'validation',\n [\n 'paymentOption' => $paymentMethod,\n ],\n true\n ),\n ]\n );\n $option->setForm(\n $this->context->smarty->fetch(\n $this->local_path .\n 'views/templates/front/mbwayPhone.tpl'\n )\n );\n }\n $option->setCallToActionText($this->l('Pay by ') . $ifthenpayGateway->getAliasPaymentMethods(\n $paymentMethod, $this->context->language->iso_code)\n )\n ->setLogo(Media::getMediaPath(\n _PS_MODULE_DIR_ . $this->name . '/views/img/' . $paymentMethod . '_option.png'\n ))\n ->setAction(\n $this->context->link->getModuleLink(\n $this->name,\n 'validation',\n [\n 'paymentOption' => $paymentMethod,\n ],\n true\n )\n )\n ->setModuleName($this->name);\n $payments_options[] = $option;\n }\n }\n \n }\n return $payments_options;\n }", "public function setPaymentMethod($paymentMethod = 'CC') {\n $method = array(\n 'x_method'=>strtoupper($paymentMethod),\n );\n $this->NVP = array_merge($this->NVP, $method); \n }", "public function resetOptions()\n {\n $this->options = array();\n }", "static function pmpro_payment_options($options)\n\t\t{\n\t\t\t//get fondy options\n\t\t\t$fondy_options = PMProGateway_fondy::getGatewayOptions();\n\n\t\t\t//merge with others.\n\t\t\t$options = array_merge($fondy_options, $options);\n\n\t\t\treturn $options;\n\t\t}", "public function destroy(BusinessPaymentMethod $businessPaymentMethod)\n {\n //\n }", "public function unset_sess_cart_payment_method()\n {\n if (!empty($this->session->userdata('mds_cart_payment_method'))) {\n $this->session->unset_userdata('mds_cart_payment_method');\n }\n }", "protected function removeConfigOptions() {\r\n\t\t$definition = $this->getDefinition();\r\n\r\n\t\t$definition->setOptions(array_diff_key($definition->getOptions(), array('db-configuration' => '', 'configuration' => '')));\r\n\t}", "private function unsetSessionData($paymentMethod)\n {\n foreach (Mage::getSingleton('payone_core/session')->getData() as $key => $value) {\n if (!is_array($value)) {\n $sessionNameBeginning = substr($key, 0, strlen($paymentMethod));\n if ($sessionNameBeginning == $paymentMethod && $key[strlen($paymentMethod)] == \"_\") {\n $unsetFunction = \"uns\" . $key;\n Mage::getSingleton('payone_core/session')->$unsetFunction();\n }\n }\n }\n }", "function myplugin_deactivate_options( $options )\n{\n\tforeach ($options as $option => $default_value) {\n\t\tdelete_option( $option );\n\t}\n\n\tdelete_option( MYPLUGIN_NAME );\n\n}", "public function resetOptions()\n {\n $this->options = [];\n $this->configure();\n }", "function commerce_marketplace_payment_method_form_submit($form, &$form_state) {\n $store = $form_state['build_info']['args'][0];\n $payment_method_id = $form_state['build_info']['args'][1];\n\n $keys_to_remove = array_flip(array('form_build_id', 'form_token', 'form_id', 'submit', 'op'));\n $store->data['payment_methods']['settings'][$payment_method_id] = array_diff_key($form_state['values'], $keys_to_remove);\n\n // Save the payment method settings.\n commerce_store_save($store);\n drupal_set_message(t('Payment method settings saved.'));\n}", "public function maybe_clean_api_key_options() {\n $current_version = get_option( 'laterpay_version' );\n if ( version_compare( $current_version, '0.9.11', '<' ) ) {\n return;\n }\n\n $options = array(\n 'laterpay_sandbox_backend_api_url' => 'https://api.sandbox.laterpaytest.net',\n 'laterpay_sandbox_dialog_api_url' => 'https://web.sandbox.laterpaytest.net',\n 'laterpay_live_backend_api_url' => 'https://api.laterpay.net',\n 'laterpay_live_dialog_api_url' => 'https://web.laterpay.net',\n );\n\n foreach ( $options as $option_name => $correct_value ) {\n $option_value = get_option( $option_name );\n if ( $option_value != $correct_value ) {\n update_option( $option_name, $correct_value );\n }\n }\n }", "public function uninstall() {\n\t\tdelete_option( $this->options_key );\n\t}", "public function testPaymentMethodDeletion() {\n $payment_method = $this->createEntity('commerce_payment_method', [\n 'uid' => $this->user->id(),\n 'type' => 'credit_card',\n 'payment_gateway' => 'example',\n ]);\n\n $details = [\n 'type' => 'visa',\n 'number' => '4111111111111111',\n 'expiration' => ['month' => '01', 'year' => date(\"Y\") + 1],\n ];\n $this->paymentGateway->getPlugin()->createPaymentMethod($payment_method, $details);\n $this->paymentGateway->save();\n\n $this->drupalGet($this->collectionUrl . '/' . $payment_method->id() . '/delete');\n\n $this->getSession()->getPage()->pressButton('Delete');\n $this->assertSession()->addressEquals($this->collectionUrl);\n\n $payment_gateway = PaymentMethod::load($payment_method->id());\n $this->assertNull($payment_gateway);\n }", "function cmh_delete_plugin_options() {\r\n\tdelete_option('cmh_options');\r\n}", "public function hookPaymentOptions($params)\n {\n if (!$this->active || !self::getKeysInfo() || !class_exists('PrestaShop\\PrestaShop\\Core\\Payment\\PaymentOption')) {\n return;\n }\n\n $this->smarty->assign(\n $this->getPaymentVars($params)\n );\n\n $this->smarty->assign(array(\n 'logos_folder' => _PS_BASE_URL_SSL_.__PS_BASE_URI__.'modules/'.$this->name.'/views/img/',\n ));\n\n $this->smarty->assign(array(\n 'isIframe' => Configuration::get('TWISPAY_IFRAME_FORM'),\n 'iframeScriptUrl' => $this->getPaymentFormActionUrl() . '/assets/script'\n\n ));\n\n $newOption = new PrestaShop\\PrestaShop\\Core\\Payment\\PaymentOption();\n $newOption->setModuleName($this->name)\n ->setCallToActionText($this->l('Pay by credit or debit card'))\n ->setForm($this->fetch('module:twispay/views/templates/hook/twispay_payment_form.tpl'))\n ->setAdditionalInformation($this->fetch('module:twispay/views/templates/hook/twispay_payment_extra.tpl'));\n\n if (Configuration::get('TWISPAY_IFRAME_FORM')) {\n $newOption->setBinary(true);\n }\n\n $payment_options = array(\n $newOption\n );\n\n return $payment_options;\n }", "function remove() \r\n {\r\n $tbl = new Payment_Config;\r\n $tbl->delete('where `module_key`=?', array($this->module_key()));\r\n }", "public function applyPaymentMethod($methodCode = null)\n {\n if (false === $methodCode) {\n return $this->getQuote()->removePayment();\n }\n\n $store = $this->getQuote() ? $this->getQuote()->getStoreId() : null;\n $methods = Mage::helper('payment')->getStoreMethods($store, $this->getQuote());\n $availablePayments = array();\n foreach ($methods as $key => $method) {\n if (!$method || !$method->canUseCheckout()) {\n continue;\n }\n if ($this->_canUsePaymentMethod($method)) {\n $availablePayments[] = $method;\n }\n }\n\n $found = false;\n $count = count($availablePayments);\n if (1 === $count) {\n $methodCode = $availablePayments[0]->getCode();\n $found = true;\n } elseif ($count) {\n if (!$methodCode) {\n $methodCode = $this->getQuote()->getPayment()->getMethod();\n }\n if ($methodCode) {\n foreach ($availablePayments as $payment) {\n if ($methodCode == $payment->getCode()) {\n $found = true;\n break;\n }\n }\n }\n if (!$found || !$methodCode) {\n $methodCode = Mage::getStoreConfig('firecheckout/general/payment_method');\n foreach ($availablePayments as $payment) {\n if ($methodCode == $payment->getCode()) {\n $found = true;\n break;\n }\n }\n }\n }\n\n if (!$found) {\n $this->getQuote()->removePayment();\n } elseif ($methodCode) {\n $payment = $this->getQuote()->getPayment();\n $payment->setMethod($methodCode);\n $payment->setMethodInstance(null); // fix for billmate payments\n $method = $payment->getMethodInstance();\n try {\n $data = new Varien_Object(array('method' => $methodCode));\n $method->assignData($data);\n } catch (Exception $e) {\n // Adyen HPP extension fix\n }\n\n if ($this->getQuote()->isVirtual()) { // discount are looking for method inside address\n $this->getQuote()->getBillingAddress()->setPaymentMethod($methodCode);\n } else {\n $this->getQuote()->getShippingAddress()->setPaymentMethod($methodCode);\n }\n }\n\n return $this;\n }", "public function delete_payment_method( $token ) {\n\n\t\t$this->set_resource( 'paymentMethod' );\n\t\t$this->set_callback( 'delete' );\n\n\t\t$this->request_data = $token;\n\t}", "public function setDefaultActivePaymentMethod()\n {\n $criteria = new CDbCriteria;\n $criteria->select = 't.name, t.value';\n $criteria->condition = \"t.name LIKE 'payment_method_%' AND t.value = 1\";\n\n $data = Option::model()->findAll($criteria);\n\n $payment_method_options = array();\n\n foreach($data as $option) {\n if($option->name == 'payment_method_paypal') $payment_method_options[] = self::PAYMENT_METHOD_PAY_PAL;\n if($option->name == 'payment_method_skrill') $payment_method_options[] = self::PAYMENT_METHOD_MONEY_BOOKERS;\n if($option->name == 'payment_method_wiretransfer') $payment_method_options[] = self::PAYMENT_METHOD_WIRE_TRANSFER;\n if($option->name == 'payment_method_check') $payment_method_options[] = self::PAYMENT_METHOD_CHECK;\n if($option->name == 'payment_method_no_payment') $payment_method_options[] = self::PAYMENT_METHOD_NO_PAYMENT;\n }\n\n if(empty($payment_method_options))\n $payment_method_options[] = self::PAYMENT_METHOD_PAY_PAL;\n\n if(!in_array($this->payment_method, $payment_method_options))\n $this->payment_method = $payment_method_options[0];\n }", "public function cleanup() {\n\t\tforeach ( array(\n\t\t\t'leadin_portal_domain',\n\t\t\t'leadin_portalId',\n\t\t\t'leadin_pluginVersion',\n\t\t\t'hubspot_affiliate_code',\n\t\t\t'hubspot_acquisition_attribution',\n\t\t) as $option_name\n\t\t) {\n\t\t\tif ( get_option( $option_name ) ) {\n\t\t\t\tdelete_option( $option_name );\n\t\t\t}\n\t\t}\n\t}", "public function reset()\n {\n $this->values[self::payment_method] = null;\n $this->values[self::wechat_pay] = null;\n $this->values[self::alipay_express] = null;\n $this->values[self::order_id] = array();\n $this->values[self::order] = array();\n }", "public function removePayment($payID) {\n // remove it\n }", "public function uninstall(UninstallContext $context): void\n {\n // cause data consistency issues, since the payment method might have been used in several orders\n $this->setPaymentMethodIsActive(false, $context->getContext());\n parent::uninstall($context);\n\n if ($context->keepUserData()) {\n return;\n }\n\n $this->removeConfiguration($context->getContext());\n }", "public static function mo_api_authentication_deactivate() {\n\t\tdelete_option( 'host_name' );\n\t\tdelete_option( 'new_registration' );\n\t\tdelete_option( 'mo_api_authentication_admin_phone' );\n\t\tdelete_option( 'mo_api_authentication_verify_customer' );\n\t\tdelete_option( 'mo_api_authentication_admin_customer_key' );\n\t\tdelete_option( 'mo_api_authentication_admin_api_key' );\n\t\tdelete_option( 'mo_api_authentication_new_customer' );\n\t\tdelete_option( 'customer_token' );\n\t\tdelete_option( 'mo_api_auth_message' );\n\t\tdelete_option( 'mo_api_authentication_registration_status' );\n\t\tdelete_option( 'mo_api_authentication_current_plugin_version' );\n\t}", "public function resetMarketplaceFilter()\n {\n foreach ($this->options as $op => $junk) {\n if (preg_match(\"#MarketplaceId#\", $op)) {\n unset($this->options[$op]);\n }\n }\n }", "public function testPaymentMethodDeletionNoGateway() {\n $payment_method = $this->createEntity('commerce_payment_method', [\n 'uid' => $this->user->id(),\n 'type' => 'credit_card',\n 'payment_gateway' => 'example',\n ]);\n $details = [\n 'type' => 'visa',\n 'number' => '4111111111111111',\n 'expiration' => ['month' => '01', 'year' => date(\"Y\") + 1],\n ];\n $this->paymentGateway->getPlugin()->createPaymentMethod($payment_method, $details);\n $this->paymentGateway->delete();\n\n $this->drupalGet($this->collectionUrl . '/' . $payment_method->id() . '/delete');\n $this->getSession()->getPage()->pressButton('Delete');\n $this->assertSession()->addressEquals($this->collectionUrl);\n\n $payment_gateway = PaymentMethod::load($payment_method->id());\n $this->assertNull($payment_gateway);\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 unsetHostedPaymentSettings($index)\n {\n unset($this->hostedPaymentSettings[$index]);\n }", "public function remove()\n {\n // MODULE_PAYMENT_SHOPGATE_ORDER_STATUS_ID - Keep this on removing for old installation\n xtc_db_query(\n \"delete from \" . TABLE_CONFIGURATION\n . \" where configuration_key in ('MODULE_PAYMENT_SHOPGATE_STATUS', 'MODULE_PAYMENT_SHOPGATE_ALLOWED', 'MODULE_PAYMENT_SHOPGATE_SORT_ORDER', 'MODULE_PAYMENT_SHOPGATE_ORDER_STATUS_ID')\"\n );\n }", "public function unsetPaymentField($name)\n\t{\n\t\tunset($this->_payment_fields[$name]);\n\t}", "public static function deactivate() {\n\t\tif (Plus_admin::gs('resetsettings_status')){\n\t\t\tdelete_option('cs_plusadmin_settings');\n\t\t\tdelete_option('cs_plus_admin_lpm_settings');\n\t\t\tdelete_option('cs_plus_admin_amm_settings');\n\t\t\tdelete_option('cs_plusadmin_adminmenu');\n\t\t\tdelete_option('cs_plusadmin_adminsubmenu');\n\t\t\tdelete_option('cs_plusadmin_status');\n\t\t}\n\t}", "public function remove_license_data() {\r\n\t$license_data = $this->get_license_options();\r\n\tforeach($license_data as $key => $value) {\r\n\t\t//delete_site_option($this->plugin_config['plugin_prefix'].'_'.$key);\r\n\t\t$this->remove_license_option($key);\r\n\t}\r\n}", "public function hookPaymentOptions()\n {\n $payseraOption = new PaymentOption();\n\n $payseraOption->setCallToActionText($this->l('Pay by Paysera'));\n $payseraOption->setAction($this->context->link->getModuleLink($this->name, 'redirect'));\n\n $displayPaymentMethods = (bool) Configuration::get('PAYSERA_DISPLAY_PAYMENT_METHODS');\n if ($displayPaymentMethods) {\n $projectID = Configuration::get('PAYSERA_PROJECT_ID');\n $defaultCountry = Configuration::get('PAYSERA_DEFAULT_COUNTRY');\n\n $currencyISO = $this->context->currency->iso_code;\n $amount = $this->context->cart->getOrderTotal() * 100;\n $langISO = strtolower($this->context->language->iso_code);\n $langISO = in_array($langISO, ['lt', 'en', 'ru', 'lv', 'ee', 'et', 'pl', 'bg']) ? $langISO : 'en';\n\n $methods = WebToPay::getPaymentMethodList($projectID, $currencyISO)\n ->filterForAmount($amount, $currencyISO)\n ->setDefaultLanguage($langISO)\n ->getCountries();\n\n $this->context->smarty->assign([\n 'defaultCountry' => $defaultCountry,\n 'payMethods' => $methods,\n ]);\n\n $additionalInfo = $this->context->smarty->fetch('module:paysera/views/templates/hook/payment-options.tpl');\n $payseraOption->setAdditionalInformation($additionalInfo);\n $payseraOption->setInputs([\n 'paysera_payment_method' => [\n 'name' => 'paysera_payment_method',\n 'type' => 'hidden',\n 'value' => '',\n ],\n ]);\n }\n\n return [$payseraOption];\n }", "private function delete_all_plugin_options() {\n\t\t// Deletes all options from the options table.\n\t\t$this->options->delete( Activation::OPTION_SHOW_ACTIVATION_NOTICE );\n\t\t$this->options->delete( Activation::OPTION_NEW_SITE_POSTS );\n\t\t$this->options->delete( Credentials::OPTION );\n\t\t$this->options->delete( 'googlesitekit-active-modules' );\n\t\t$this->options->delete( Search_Console::PROPERTY_OPTION );\n\t\t$this->options->delete( AdSense::OPTION );\n\t\t$this->options->delete( Analytics::OPTION );\n\t\t$this->options->delete( 'googlesitekit_analytics_adsense_linked' );\n\t\t$this->options->delete( PageSpeed_Insights::OPTION );\n\t\t$this->options->delete( Optimize::OPTION );\n\t\t$this->options->delete( Tag_Manager::OPTION );\n\t\t$this->options->delete( First_Admin::OPTION );\n\t\t$this->options->delete( OAuth_Client::OPTION_PROXY_NONCE );\n\t\t$this->options->delete( Beta_Migration::OPTION_IS_PRE_PROXY_INSTALL );\n\n\t\t// Clean up old site verification data, moved to user options.\n\t\t// Also clean up other old unused options.\n\t\t// @todo remove after RC.\n\t\t$this->options->delete( Verification::OPTION );\n\t\t$this->options->delete( Verification_Tag::OPTION );\n\t\t$this->options->delete( 'googlesitekit_api_key' );\n\t\t$this->options->delete( 'googlesitekit_available_modules' );\n\t\t$this->options->delete( 'googlesitekit_secret_token' );\n\t\t$this->options->delete( 'googlesitekit_project_id' );\n\t\t$this->options->delete( 'googlesitekit_gcp_project' );\n\t}", "public function setPaymentMethod($value) \n {\n $this->_fields['PaymentMethod']['FieldValue'] = $value;\n return $this;\n }", "function remove_allowed_options($del_options, $options = '')\n {\n }", "public function getPaymentMethod()\n {\n return $this->paymentMethod;\n }", "public function getPaymentMethod()\n {\n return $this->paymentMethod;\n }", "public static function getPaymentMethods() {\n\n // return array(\n // self::PAYMENT_METHOD_PAY_PAL => 'Pay Pal',\n // self::PAYMENT_METHOD_MONEY_BOOKERS => 'Skrill',\n // self::PAYMENT_METHOD_WIRE_TRANSFER => 'Wiretransfer',\n // );\n\n $payment_methods = array();\n\n if(Option::getByName('payment_method_paypal')) \n $payment_methods[self::PAYMENT_METHOD_PAY_PAL] = 'Pay Pal';\n\n if(Option::getByName('payment_method_skrill')) \n $payment_methods[self::PAYMENT_METHOD_MONEY_BOOKERS] = 'Skrill';\n\n if(Option::getByName('payment_method_wiretransfer') && Option::getByName('wiretransfer_doc_path')) \n $payment_methods[self::PAYMENT_METHOD_WIRE_TRANSFER] = 'Wiretransfer';\n\n if(Option::getByName('payment_method_check')) \n $payment_methods[self::PAYMENT_METHOD_CHECK] = 'Check';\n\n if(Option::getByName('payment_method_no_payment')) \n $payment_methods[self::PAYMENT_METHOD_NO_PAYMENT] = 'No Payment';\n\n return $payment_methods;\n }", "public function unsetPaymentIds(): void\n {\n $this->paymentIds = [];\n }", "public function uninstall()\n {\n // when it becomes available, all the MobileMessaging settings (API credentials, phone numbers, etc..) should be removed from the option table\n return;\n }", "function f3d_payment_method_filter($available_gateways)\n{\n\tglobal $wp, $current_user;\n\n\t$isDistributor = ($current_user && $current_user->roles && in_array('distributor', $current_user->roles));\n\t$disallow = $isDistributor\n\t\t? ['paypal']\n\t\t: ['bacs'];\n\n\tforeach($available_gateways as $gateway_id => $gateway)\n\t{\n\t\tif (in_array($gateway_id, $disallow))\n\t\t{\n\t\t\tunset($available_gateways[$gateway_id]);\n\t\t}\n\t}\n\n\treturn $available_gateways;\n}", "protected function getPaymentMethod(){\n return $this->method;\n }", "public function setPaymentMethod($paymentMethod)\n {\n $this->paymentMethod = $paymentMethod;\n return $this;\n }", "function resetOptions()\n {\n $this->options = $this->_defaultOptions;\n }", "public function reset_shipping() {\n\t\tunset( WC()->session->chosen_shipping_methods );\n\t\t$this->shipping_total = null;\n\t\t$this->shipping_taxes = array();\n\t\t$this->packages = array();\n\t}", "public function getPaymentMethod()\n {\n return $this->payment_method;\n }", "public function setPaymentMethod($paymentMethod)\n {\n $validValues = [\n PaymentMethod::CREDIT_CARD,\n PaymentMethod::BANK_TRANSFER,\n PaymentMethod::DIRECT_DEBIT,\n PaymentMethod::WECHAT,\n PaymentMethod::LINE,\n PaymentMethod::ALIPAY\n ];\n\n if (in_array($paymentMethod, $validValues)) {\n $this->paymentMethod = $this->limitLength($paymentMethod, 32);\n } else {\n Utils::error(\"Invalid paymentMethod provided: \" . $paymentMethod);\n }\n\n return $this;\n }", "public function unsetOptions()\n {\n $this->options = [];\n\n return $this;\n }", "function deactivate()\n {\n delete_option( 'ultimosPostPorAutor' );\n }", "public function remove_option($option)\n {\n }", "public function __destruct()\n {\n unset($this->options);\n }", "public function setPaymentMethod(PaymentMethodInterface $method, $amount = null);", "public function paymentOptions(?PaymentOptions $value): self\n {\n $this->instance->setPaymentOptions($value);\n return $this;\n }", "function remove_billing_checkout_fields( $fields ) {\n $shipping_method = 'local_pickup:18'; \n // change below for the list of fields\n $hide_fields = array('billing_address_1', 'billing_last_name', 'billing_city', 'billing_state', 'billing_postcode', 'billing_country', 'billing_phone');\n\n $chosen_methods = WC()->session->get( 'chosen_shipping_methods' );\n $chosen_shipping = $chosen_methods[0];\n\n foreach($hide_fields as $field ) {\n if ($chosen_shipping == $shipping_method) {\n $fields['billing'][$field]['required'] = false;\n $fields['billing'][$field]['class'][] = 'hide';\n }\n $fields['billing'][$field]['class'][] = 'billing-dynamic';\n }\n\n return $fields;\n}", "public function setPaymentOptions(?array $paymentOptions): self\n {\n $this->initialized['paymentOptions'] = true;\n $this->paymentOptions = $paymentOptions;\n\n return $this;\n }", "public function toOptionArray()\n {\n $options = parent::toOptionArray();\n\n $paymentAction = $this->scopeConfig->getValue('payment/ewayrapid/payment_action');\n\n foreach ($options as $key => $option) {\n if ($paymentAction == PaymentAction::ACTION_AUTHORIZE_CAPTURE) {\n if ($option['value'] == self::STATUS_EWAY_AUTHORISED) {\n unset($options[$key]);\n }\n } else {\n if ($option['value'] == self::STATUS_EWAY_CAPTURED) {\n unset($options[$key]);\n }\n }\n }\n\n return $options;\n }", "public function getPaymentMethod() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn $this->paymentMethod;\r\n\t}", "Public Function clearPerformanceConnectorPromoMethod()\n\t{\n\t\t$this->_db->delete('bevomedia_user_performanceconnector_promomethod', 'user__Id = ' . $this->id);\n\t}", "public function setPaymentMethod($paymentMethod){\n return $this->setData(self::PAYMENT_METHOD, $paymentMethod);\n }", "function deactivate() {\r\n delete_option(\"bvd_post_version\");\t\r\n delete_option(\"bvd_post_type\");\r\n delete_option(\"bvd_connection\");\r\n delete_option(\"bvd_show_version\");\r\n delete_option(\"bvd_favorites\");\r\n }", "public function setPaymentMethod($paymentMethod)\n {\n $this->paymentMethod = $paymentMethod;\n\n return $this;\n }", "public function setPaymentMethod($paymentMethod)\n {\n $this->paymentMethod = $paymentMethod;\n\n return $this;\n }", "private function getPaymentOptions()\n {\n $this->setVersionStrings();\n\n $this->load->language('extension/payment/svea_partpayment');\n\n $this->load->model('extension/payment/svea_partpayment');\n $this->load->model('checkout/order');\n\n $order = $this->model_checkout_order->getOrder($this->session->data['order_id']);\n $countryCode = $order['payment_iso_code_2'];\n\n $result = array();\n\n if ($this->config->get($this->paymentString . 'svea_partpayment_testmode_' . $countryCode) !== null) {\n $svea = $this->model_extension_payment_svea_partpayment->getPaymentPlanParams($countryCode);\n } else {\n $result = array(\"error\" => $this->responseCodes(40001, \"The country is not supported for this paymentmethod\"));\n\n return $result;\n }\n\n if (!isset($svea)) {\n $result = array(\"error\" => 'Svea error: '.$this->language->get('response_27000'));\n } else {\n $currency = $order['currency_code'];\n\n $this->load->model('localisation/currency');\n\n $currencies = $this->model_localisation_currency->getCurrencies();\n $decimals = \"\";\n\n foreach ($currencies as $key => $val) {\n if ($key == $currency) {\n if ($key == 'EUR') {\n $decimals = 2;\n } else {\n $decimals = 0;\n }\n }\n }\n\n $formattedPrice = round($this->currency->format(($order['total']), $currency, false, false), $decimals);\n\n try {\n $campaigns = PaymentPlanCalculator::getAllCalculationsFromCampaigns($formattedPrice, $svea->campaignCodes, false, $decimals);\n\n foreach ($campaigns as $campaign) {\n foreach ($svea->campaignCodes as $cc) {\n if ($campaign['campaignCode'] == $cc->campaignCode) {\n $result[] = array(\n \"campaignCode\" => $campaign['campaignCode'],\n \"description\" => $campaign['description'],\n \"monthlyAmountToPay\" => $campaign['monthlyAmountToPay'] . \" \" . $currency . \"/\" . $this->language->get('month'),\n \"paymentPlanType\" => $campaign['paymentPlanType'],\n \"contractLengthInMonths\" => $this->language->get('contractLengthInMonths') . \": \" . $campaign['contractLengthInMonths'] . \" \" . $this->language->get('unit'),\n \"monthlyAnnuityFactor\" => $campaign['monthlyAnnuityFactor'],\n \"initialFee\" => $this->language->get('initialFee') . \": \" . $campaign['initialFee'] . \" \" . $currency,\n \"notificationFee\" => $this->language->get('notificationFee') . \": \" . $campaign['notificationFee'] . \" \" . $currency,\n \"interestRatePercent\" => $this->language->get('interestRatePercent') . \": \" . $campaign['interestRatePercent'] . \"%\",\n \"numberOfInterestFreeMonths\" => $campaign['numberOfInterestFreeMonths'] != 0 ? $this->language->get('numberOfInterestFreeMonths') . \": \" . $campaign['numberOfInterestFreeMonths'] . \" \" . $this->language->get('unit') : 0,\n \"numberOfPaymentFreeMonths\" => $campaign['numberOfPaymentFreeMonths'] != 0 ? $this->language->get('numberOfPaymentFreeMonths') . \": \" . $campaign['numberOfPaymentFreeMonths'] . \" \" . $this->language->get('unit') : 0,\n \"totalAmountToPay\" => $this->language->get('totalAmountToPay') . \": \" . $campaign['totalAmountToPay'] . \" \" . $currency,\n \"effectiveInterestRate\" => $this->language->get('effectiveInterestRate') . \": \" . $campaign['effectiveInterestRate'] . \"%\"\n );\n break;\n }\n }\n }\n } catch (Exception $exception) {\n $this->log->write('Svea: Unable to fetch calculations for campaigns. Exception: ' . $exception->getMessage());\n }\n }\n return $result;\n }", "public function destroy(Payment $payment)\n {\n //\n }", "public function destroy(Payment $payment)\n {\n //\n }", "public function destroy(Payment $payment)\n {\n //\n }", "public function destroy(Payment $payment)\n {\n //\n }", "public function destroy(Payment $payment)\n {\n //\n }", "public function destroy(Payment $payment)\n {\n //\n }", "public function destroy(Payment $payment)\n {\n //\n }", "public function destroy(Payment $payment)\n {\n //\n }", "public function destroy(Payment $payment)\n {\n //\n }", "public function destroy(Payment $payment)\n {\n //\n }", "function projectpentagon_remove() {\n\ndelete_option('projectpentagon_title');\n\ndelete_option('projectpentagon_name1');\n\ndelete_option('projectpentagon_name2');\n\ndelete_option('projectpentagon_name3');\n\ndelete_option('projectpentagon_name4');\n\ndelete_option('projectpentagon_name5');\n\ndelete_option('projectpentagon_color1');\n\ndelete_option('projectpentagon_color2');\n\ndelete_option('projectpentagon_color3');\n\ndelete_option('projectpentagon_color4');\n\ndelete_option('projectpentagon_color5');\n\ndelete_option('projectpentagon_category');\ndelete_option('projectpentagon-titleonpages');\n\n}", "public function clearParameters ()\n {\n\n $this->parameters = null;\n $this->parameters = array();\n\n }", "public function paymentMethod($payment_method) {\n $this->data['attachment']['payload']['payment_method'] = $payment_method;\n\n return $this;\n }", "public function toOptionArray()\n {\n $methods = [];\n\n //default empty value\n $methods[] = [\"value\" => \"\", \"label\" => __(\"Accept all payment methods\")];\n $accessToken = $this->scopeConfig->getValue(\\MercadoPago\\Core\\Helper\\ConfigData::PATH_ACCESS_TOKEN, \\Magento\\Store\\Model\\ScopeInterface::SCOPE_WEBSITE, $this->_switcher->getWebsiteId());\n\n if (empty($accessToken)) {\n return $methods;\n }\n\n $this->coreHelper->log(\"GET /v1/payment_methods\", 'mercadopago');\n\n try {\n $response = \\MercadoPago\\Core\\Lib\\RestClient::get(\"/v1/payment_methods\", null, [\"Authorization: Bearer \" . $accessToken]);\n } catch (\\Exception $e) {\n $this->coreHelper->log(\"PaymentMethodsTicket:: An error occurred at the time of obtaining the ticket payment methods: \" . $e);\n return [];\n }\n\n if (isset($response['error']) || (isset($response['status']) && ($response['status'] != '200' && $response['status'] != '201'))) {\n return $methods;\n }\n\n $response = $response['response'];\n\n foreach ($response as $pm) {\n if (isset($pm['payment_type_id']) && $pm['payment_type_id'] == \"ticket\" || $pm['payment_type_id'] == \"atm\") {\n $methods[] = [\n 'value' => $pm['id'],\n 'label' => __($pm['name'])\n ];\n }\n }\n\n $this->coreHelper->log(\"PaymentMethodsTicket:: Displayed\", 'mercadopago', $methods);\n\n return $methods;\n }", "public function unsetPaymentFormPref($index)\n {\n unset($this->paymentFormPref[$index]);\n }", "public function destroy(PaymentMethod $paymentMethod)\n {\n $paymentMethod->delete();\n return redirect(route('payment-methods.index'))->with('success', 'Item Deleted Successfully');\n }", "function remove_option_whitelist($del_options, $options = '')\n {\n }", "function timezonecalculator_uninstall() {\r\n\tdelete_option('widget_timezonecalculator');\r\n\r\n\t$fieldsPre=\"timezones_\";\r\n\t$sectionPost=\"_Section\";\r\n\r\n\t$csstags=array(\"before_List\", \"after_List\", \"before_Tag\", \"after_Tag\", \"Time_Format\");\r\n\r\n\t$sections=array('Instructions' => '1', 'Content' => '1', 'CSS_Tags' => '1', 'Administrative_Options' => '1', 'Calculation' => '1');\r\n\r\n\tforeach ($csstags as $csstag) {\r\n\t\tdelete_option($fieldsPre.$csstag);\r\n\t}\r\n\r\n\tdelete_option(\"TimeZones\");\r\n\r\n\tdelete_option($fieldsPre.'Use_Ajax_Refresh');\r\n\tdelete_option($fieldsPre.'Refresh_Time');\r\n\r\n\tforeach ($sections as $key => $section) {\r\n\t\tdelete_option($fieldsPre.$key.$sectionPost);\r\n\t}\r\n}", "public function clear()\n {\n unset($this->_params);\n }", "public function filterPaymentMethods($payments, $value) {\n foreach ((array)$payments as $id => $payment) {\n if (isset($payment['settlement'])) {\n if ($payment['settlement'] === $this->module->getActingFlag()) {\n if ($this->module->canProcessCart() === false) {\n array_splice($payments, $id, 1);\n }\n }\n }\n }\n\n return $payments;\n }", "public function clear_recurring_period(){\n\t\t$this->payment['recurring_period'] = null;\n\t\t$this->payment['recurring_period_type'] = null;\n\t\t$this->update_meta( 'recurring_period', $this->payment['recurring_period'] );\n\t\t$this->update_meta( 'recurring_period_type', $this->payment['recurring_period_type'] );\n\t}", "public function declinePayment() {\n return array('#markup' => iish_t('Unfortunately, your payment has been declined. Please try to finish your final registration ' .\n 'at a later moment or try a different payment method.'));\n }", "public function testAllowedPaymentMethods()\n {\n $expected = [\n 'ideal',\n 'bancontact',\n 'sofort',\n 'eps',\n 'giropay',\n 'belfius',\n 'creditcard',\n 'paypal',\n 'directdebit',\n ];\n\n $this->assertEquals($expected, SubscriptionRemover::ALLOWED_METHODS);\n }", "function bt_custom_shipping_fields( $fields = array() ) {\n unset($fields['shipping_company']);\n // unset($fields['shipping_address_1']);\n // unset($fields['shipping_address_2']);\n // unset($fields['shipping_state']);\n // unset($fields['shipping_city']);\n // unset($fields['shipping_phone']);\n // unset($fields['shipping_postcode']);\n // unset($fields['shipping_country']);\n return $fields;\n}" ]
[ "0.63440245", "0.60570025", "0.60570025", "0.60570025", "0.60083455", "0.5933615", "0.589471", "0.58008677", "0.57883877", "0.578534", "0.57775605", "0.5743149", "0.57117593", "0.5624674", "0.56147015", "0.55963993", "0.5595249", "0.559016", "0.55611193", "0.54527384", "0.5451741", "0.5420978", "0.53889036", "0.53569746", "0.5342715", "0.5336667", "0.53340024", "0.53149265", "0.5313319", "0.5312471", "0.53070337", "0.52990687", "0.5290365", "0.5264167", "0.52419585", "0.52343684", "0.52079284", "0.5206234", "0.5203188", "0.5199804", "0.51844114", "0.5161096", "0.51595604", "0.5125988", "0.5123417", "0.51130307", "0.5099539", "0.50945956", "0.5085232", "0.5085232", "0.50823325", "0.5073545", "0.5066668", "0.506437", "0.5057381", "0.5055676", "0.50414836", "0.503982", "0.5029504", "0.5011329", "0.5007888", "0.5006778", "0.49966142", "0.499292", "0.4992075", "0.4990661", "0.4982254", "0.49701127", "0.49673495", "0.49629077", "0.49519262", "0.49512273", "0.49507713", "0.49404716", "0.49404716", "0.4936322", "0.49361613", "0.49361613", "0.49361613", "0.49361613", "0.49361613", "0.49361613", "0.49361613", "0.49361613", "0.49361613", "0.49361613", "0.49327546", "0.4931692", "0.49121648", "0.49029002", "0.48925656", "0.48906118", "0.4886935", "0.48824662", "0.48609173", "0.4856164", "0.48527208", "0.48503914", "0.48402405", "0.48282877" ]
0.79133016
0
Sets (or resets) the email address. (Optional) This method sets the email address to be sent in the next request. Setting this parameter tells Amazon to only return Orders with email addresses that match the email address given. If this parameter is set, the following options will be removed: SellerOrderId, OrderStatus, PaymentMethod, FulfillmentChannel, LastUpdatedAfter, LastUpdatedBefore.
public function setEmailFilter($filter) { if (is_string($filter)) { $this->options['BuyerEmail'] = $filter; //these fields must be disabled unset($this->options['SellerOrderId']); $this->resetOrderStatusFilter(); $this->resetPaymentMethodFilter(); $this->setFulfillmentChannelFilter(null); unset($this->options['LastUpdatedAfter']); unset($this->options['LastUpdatedBefore']); } else if (is_null($filter)) { unset($this->options['BuyerEmail']); } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setEmail($var)\n {\n GPBUtil::checkString($var, True);\n $this->email = $var;\n\n return $this;\n }", "public function setEmail($var)\n {\n GPBUtil::checkString($var, True);\n $this->email = $var;\n\n return $this;\n }", "public function setEmail($var)\n {\n GPBUtil::checkString($var, True);\n $this->email = $var;\n\n return $this;\n }", "public function setEmail($var)\n {\n GPBUtil::checkString($var, True);\n $this->email = $var;\n\n return $this;\n }", "public function setEmailAddress($emailAddress)\n {\n $this->emailAddress = $emailAddress;\n }", "public function setEmail($value) {\r\n $this->email = $value;\r\n }", "public function setEmail($email) {\n $this->email = $email;\n }", "public function setEmail($email) {\n $this->email = $email;\n }", "public function setEmail($email) {\n $this->email = $email;\n }", "function setEmail( $email )\n {\n $this->setValueByFieldName( 'person_email', $email );\n return;\n }", "function setEmail($newEmail){\n $this->email = $newEmail;\n }", "public function setEmail($value)\n {\n $this->_email = $value;\n }", "public function setEmailToAddress($value) { $this->_emailToAddress = $value; }", "public function setEmail($email)\n {\n $this->email = $email;\n }", "public function setEmail($email)\n {\n $this->email = $email;\n }", "public function setEmail($email)\n {\n $this->email = $email;\n }", "public function setEmail($email)\n {\n $this->email = $email;\n }", "public function setEmail($email)\n {\n $this->email = $email;\n }", "public function setEmail($email)\n {\n $this->email = $email;\n }", "public function setEmail($email)\n {\n $this->email = $email;\n }", "public function setEmailAddress($email);", "public function setEmail($email) {\n $this->getlead()->setEmail($email);\n }", "public function setEmail($email) {\n\t\t$this->email = $email;\n\t}", "public function setEmail($email) {\n\t\t$this->email = $email;\n\t}", "public function setEmail($email) {\n\t\t$this->email = $email;\n\t}", "public function setEmail($email) {\n $this->user_email = $email;\n }", "public function _setEmail($Email)\n {\n $this->Email = $Email;\n\n }", "public function setEmail($email) {\n $this->set('email', $email, 'user');\n }", "public function setEmail(string $email) {\n\n $this->email = $email;\n\n }", "public function setEmail(string $email): void\n {\n $this->email = $email;\n }", "public function setEmail($Email)\n {\n $this->__set(\"email\", $Email);\n }", "public function setEmail(string $email): void\n {\n $this->_email = $email;\n }", "public function setEmail($email){\n\t\t\t$this->email = $email;\n\t\t}", "public function setEmail($email) {\n\t\t$this->_email = $email;\n\t}", "public function setEmail($strEmail) {\n\t\t$this->email = $strEmail;\n\t}", "public function setEmail($email)\n\t{\n\t\t$this->email = $email;\n\t}", "public function setEmail($email)\n\t{\n\t\t$this->email = $email;\n\t}", "public function setEmail(string $email)\n {\n $this->email = $email;\n }", "public function setEmail(string $email){\n $this->email = $email;\n }", "public function setEmail($value) {\n\t\tif(!check($value)) throw new Exception(lang('error_9'));\n\t\tif(!Validator::AccountEmail($value)) throw new Exception(lang('error_9'));\n\t\t\n\t\t$this->_email = $value;\n\t}", "public function setEmail($email){\n\t\t$this->email = $email;\n\t}", "public function setEmail($anEmail) {\n\t\t$this->_email = $anEmail;\n\t}", "public function setEmailFromAddress($value) { $this->_emailFromAddress = $value; }", "public function setEmail(String $email)\n {\n $this->email = $email;\n }", "protected function setEmail(string $email) {\n $this->email = $email;\n }", "public function setEmail(?string $email): self\n {\n $this->initialized['email'] = true;\n $this->email = $email;\n\n return $this;\n }", "public function setEmailOrder($email_order)\n {\n $this->email_order = $email_order;\n\n return $this;\n }", "public function setEmail($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->email !== $v) {\n $this->email = $v;\n $this->modifiedColumns[OrdrhedTableMap::COL_EMAIL] = true;\n }\n\n return $this;\n }", "public static function setEmail($email)\n {\n self::$email = $email;\n }", "protected function setEmail(string $email)\r\n\t{\r\n\t\t$this->email = $email;\r\n\t}", "public function setEmail($value)\n {\n return $this->set('Email', $value);\n }", "public function setEmail($value)\n {\n return $this->set('Email', $value);\n }", "public function setEmail($value)\n {\n return $this->set('Email', $value);\n }", "public function setEmail($email) {\n $this->setUsername($email);\n $this->email = $email;\n }", "public function setEmail(?CustomerTextFilter $email): void\n {\n $this->email = $email;\n }", "public function setEmail(string $email): self\n {\n $this->options['email'] = $email;\n return $this;\n }", "public function setEmailAddress(string $emailAddress) : self\n {\n $this->emailAddress = $emailAddress;\n return $this;\n }", "public function setEmail($newEmail){\n\t}", "public function setEmail($email);", "public function setEmail($email);", "public function setEmail($email);", "public function setEmail($value)\n {\n \t$this->email = $value;\n \treturn $this;\n }", "public function setEmail(array $email)\n {\n $this->email = $email;\n return $this;\n }", "function setEmail($email) {\n\t\treturn $this->setData('email', $email);\n\t}", "public function setEmail($email)\n\t\t{\n\t\t$this->email = $email;\n\t\treturn true;\n\t\t}", "public function set_email( $email ) {\n\t\treturn $this->set_field( 'EMAIL', $email );\n\t}", "public function setEmail(?string $email): void;", "public function setEmail(?string $email): void;", "public function setEmail( $email ) {\n\t\t$this->container['emails'] = isset( $email ) ? array( $email ) : null;\n\n\t\treturn $this;\n\t}", "public function setEmail($newEmail) {\n //first, trim the input of excess whitespace\n $newEmail = trim($newEmail);\n \n //second, sanitize the email of all invalid email characters\n $newEmail = filter_var($newEmail, FILTER_SANITIZE_EMAIL);\n \n //finally, bring the email out of quarantine\n $this->email = $newEmail;\n }", "public function setEmail($email)\n {\n $this->email = $email;\n \n return $this;\n }", "public function setEmail($email)\r\n {\r\n $this->email = $email;\r\n\r\n return $this;\r\n }", "public function setContactEmail(?string $contactEmail): void\n {\n $this->contactEmail = $contactEmail;\n }", "public function setEmail($email)\n {\n $this->email = $email;\n\n return $this;\n }", "public function setEmail($email)\n {\n $this->email = $email;\n\n return $this;\n }", "public function setEmail($email)\n {\n $this->email = $email;\n\n return $this;\n }", "public function setEmail($email)\n {\n $this->email = $email;\n\n return $this;\n }", "public function setEmail($email)\n {\n $this->email = $email;\n\n return $this;\n }", "public function setEmail($email) {\n $this->email = $email;\n\n return $this;\n }", "public function setEmail($email)\n {\n $this->email = $email;\n\n return $this;\n }", "public function setEmail($email)\r\n {\r\n $this->email = $email;\r\n return $this;\r\n }", "public function setEmail(string $email)\n {\n $this->email = $email;\n\n return $this;\n }", "public function setEmail(string $email)\n {\n $this->email = $email;\n\n return $this;\n }", "public function setEmail(string $email)\n {\n $this->email = $email;\n\n return $this;\n }", "public function setADEmail($email)\n\t{\n\t\t$this->email = $email;\n\t}", "public function setEmail($email)\n {\n $this->email = $email;\n\n return $this;\n }", "public function SetFromEmail($fromEmail) {\n // from directly in headers here.\n $this->fromEmail = $fromEmail;\n }", "public function setEmail(?string $email): self\n {\n $this->email = $email;\n return $this;\n }", "public function setEmail(?string $email): self\n {\n $this->email = $email;\n\n return $this;\n }", "public function setEmail(?string $value): void {\n $this->getBackingStore()->set('email', $value);\n }", "public function setToAddress($emailAddress)\n {\n if (filter_var($emailAddress, FILTER_VALIDATE_EMAIL) !== $emailAddress) {\n throw new \\InvalidArgumentException('Invalid email address: '.$emailAddress);\n }\n $this->toAddress = $emailAddress;\n }", "public function setEmail($email) {\n\t\t$this->email = $email;\n\t\treturn $this;\n\t}", "public function setEmail($email)\r\n {\r\n $this->email = $email;\r\n\r\n return $this;\r\n }", "public function set_email($_email)\n {\n $this->_email = $_email;\n\n return $this;\n }", "public function set_email($_email)\n {\n $this->_email = $_email;\n\n return $this;\n }", "public function set_email($_email)\n {\n $this->_email = $_email;\n\n return $this;\n }", "public function setEmail($_email)\n {\n $this->_email = $_email;\n\n return $this;\n }", "public function setEmail($Email)\n {\n $this->Email = $Email;\n\n return $this;\n }", "private function setEmail()\n {\n\t if ( empty( $_POST['email'] ) ) {\n\t\t\t$this->data['error']['email'] = 'Please provide a valid email address.';\n $this->error = true;\n return;\n }\n \n $e = trim( $_POST['email'] );\n \n\t\tif ( ! filter_var( $e, FILTER_VALIDATE_EMAIL ) ) {\n\t\t\t$this->data['error']['email'] = 'Please provide a valid email address.';\n $this->error = true;\n return;\n\t\t}\n \n\t\t$this->data['email'] = $e;\n }", "public function setEmail($email)\n {\n $this->email = $email;\n return $this;\n }", "public function setEmail($email)\n {\n $this->email = $email;\n return $this;\n }" ]
[ "0.7117752", "0.7117752", "0.7117752", "0.7117752", "0.71112126", "0.7104797", "0.6964029", "0.6964029", "0.6964029", "0.6942451", "0.69296724", "0.6920619", "0.6919207", "0.687174", "0.687174", "0.687174", "0.687174", "0.687174", "0.687174", "0.687174", "0.68658817", "0.6860607", "0.68505204", "0.68505204", "0.68505204", "0.68499637", "0.68365735", "0.6829245", "0.68124986", "0.68052065", "0.6801107", "0.6796602", "0.678954", "0.67894155", "0.67532486", "0.6733893", "0.6733893", "0.67003506", "0.6694033", "0.6692829", "0.66856724", "0.66806287", "0.6676239", "0.6644033", "0.6626548", "0.657873", "0.65672106", "0.6541393", "0.6533581", "0.6530975", "0.6529193", "0.6529193", "0.6528964", "0.6508017", "0.6498992", "0.6472712", "0.646552", "0.6462427", "0.6443641", "0.6443641", "0.6443641", "0.644165", "0.6437214", "0.64199436", "0.6413624", "0.64134175", "0.63875264", "0.63875264", "0.63782626", "0.6370535", "0.63573503", "0.6351692", "0.63477564", "0.6336102", "0.6336102", "0.6336102", "0.6336102", "0.6336102", "0.63328", "0.6303508", "0.6303437", "0.63020694", "0.63020694", "0.63020694", "0.6289584", "0.6278681", "0.62719625", "0.6269871", "0.6257398", "0.6251658", "0.6250682", "0.62459713", "0.62376446", "0.62317413", "0.62317413", "0.62317413", "0.62308663", "0.62200683", "0.62195253", "0.6210047", "0.6210047" ]
0.0
-1
Sets (or resets) the seller order ID(s). (Optional) This method sets the list of seller order ID to be sent in the next request. Setting this parameter tells Amazon to only return Orders with seller order IDs that match the seller order ID given. If this parameter is set, the following options will be removed: BuyerEmail, OrderStatus, PaymentMethod, FulfillmentChannel, LastUpdatedAfter, LastUpdatedBefore.
public function setSellerOrderIdFilter($filter) { if (is_string($filter)) { $this->options['SellerOrderId'] = $filter; //these fields must be disabled unset($this->options['BuyerEmail']); $this->resetOrderStatusFilter(); $this->resetPaymentMethodFilter(); $this->setFulfillmentChannelFilter(null); unset($this->options['LastUpdatedAfter']); unset($this->options['LastUpdatedBefore']); } else if (is_null($filter)) { unset($this->options['SellerOrderId']); } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setSellerOrderId($value)\n {\n $this->_fields['SellerOrderId']['FieldValue'] = $value;\n return $this;\n }", "public function withSellerOrderId($value)\n {\n $this->setSellerOrderId($value);\n return $this;\n }", "public function setSellerProductIdList(?\\SengentoBV\\CdiscountMarketplaceSdk\\Arrays\\CdiscountArrayOfstring $sellerProductIdList = null): self\n {\n if (is_null($sellerProductIdList) || (is_array($sellerProductIdList) && empty($sellerProductIdList))) {\n unset($this->SellerProductIdList);\n } else {\n $this->SellerProductIdList = $sellerProductIdList;\n }\n \n return $this;\n }", "public function setOrder($ids);", "function getSellerOrders($params = array()){\n\t\tMpApi::sleep(); \n\t\treturn json_decode($this->callCurl(MpApi::GET , '/multivendor/seller/'.(int)$params['seller_id'].'/orders.json',$params),true);\n\t}", "public function setSellerId($value)\n {\n $this->_fields['SellerId']['FieldValue'] = $value;\n return $this;\n }", "public function setAmazonOrderId(array $amazonOrderIds)\n {\n return $this->set('amazon_order_id', array(\n 'Id' => $amazonOrderIds\n ));\n }", "public function getOfferSellerId()\n {\n return $this->offer_seller_id;\n }", "public function setOrderById($orderId, $orderData)\n {\n }", "public function setOrderId(?string $orderId): void\n {\n $this->orderId['value'] = $orderId;\n }", "public function getSellerOffers($sellerId);", "public function getSellerOrderId()\n {\n return $this->_fields['SellerOrderId']['FieldValue'];\n }", "public function getSellerId()\n {\n return $this->seller_id;\n }", "public function setOrderID(array $orderID)\n {\n $this->orderID = $orderID;\n return $this;\n }", "public function withSellerId($value)\n {\n $this->setSellerId($value);\n return $this;\n }", "public function setOrderId($orderId)\n {\n $this->setParam('order-id', (int)$orderId, 'order');\n }", "public function getSellerId()\n {\n return $this->driver->seller_id;\n }", "public function getSellerOrderId()\n {\n if (isset($this->data['SellerOrderId'])) {\n return $this->data['SellerOrderId'];\n } else {\n return false;\n }\n }", "public function add_seller_id_meta( $booking_id ) {\n $product_id = get_post_meta( $booking_id, '_booking_product_id', true );\n $seller_id = get_post_field( 'post_author', $product_id );\n update_post_meta( $booking_id, '_booking_seller_id', $seller_id );\n }", "public function getSellerID()\n {\n return $this->sellerID;\n }", "public static function order_set($orderId, $options) {\n //Modify the parameters of an order\n\t\t\treturn self::patch(self::order_index() . '/' . $orderId, $options);\n\t\t}", "public function isSetSellerOrderId()\n {\n return !is_null($this->_fields['SellerOrderId']['FieldValue']);\n }", "public function setSellerProductId(?string $sellerProductId = null): self\n {\n // validation for constraint: string\n if (!is_null($sellerProductId) && !is_string($sellerProductId)) {\n throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($sellerProductId, true), gettype($sellerProductId)), __LINE__);\n }\n if (is_null($sellerProductId) || (is_array($sellerProductId) && empty($sellerProductId))) {\n unset($this->SellerProductId);\n } else {\n $this->SellerProductId = $sellerProductId;\n }\n \n return $this;\n }", "public function setIdOrders($idOrders)\n {\n $this->idOrders = $idOrders;\n\n return $this;\n }", "public function setOrders($value) \n {\n $this->_fields['Orders']['FieldValue'] = $value;\n return;\n }", "public function updateOrderStatusForSellerItems($itemsArr, $orderId)\r\n {\r\n foreach ($itemsArr as $item) {\r\n /**\r\n * Get status based on order item\r\n */\r\n $status = Mage::helper('marketplace/vieworder')->getOrderStatusForSellerItemsBased($item);\r\n\r\n /**\r\n * Inilize product id\r\n */\r\n $itemProductId = $item->getProductId();\r\n\r\n /**\r\n * Load commission collection\r\n */\r\n $products = Mage::getModel('marketplace/commission')->getCollection();\r\n $products->addFieldToSelect('*');\r\n\r\n /**\r\n * Filter by order id and product id\r\n */\r\n $products->addFieldToFilter('order_id', $orderId);\r\n $products->addFieldToFilter('product_id', $itemProductId);\r\n $collectionId = $products->getFirstItem()->getId();\r\n\r\n /**\r\n * Checking for collection id exist or not\r\n */\r\n if (!empty($collectionId)) {\r\n /**\r\n * Initilize order item status\r\n */\r\n $data = array('item_order_status' => $status);\r\n $model = Mage::getModel('marketplace/commission')->load($collectionId)->addData($data);\r\n\r\n /**\r\n * Save model\r\n */\r\n $model->setId($collectionId)->save();\r\n }\r\n }\r\n }", "public function getSellerId()\n {\n return $this->_fields['SellerId']['FieldValue'];\n }", "public function setOrder($params)\n\t{\n\t\treturn $this->request('set-order', $params);\n\t}", "public function setOrderId($orderId){\n return $this->setData(self::ORDER_ID, $orderId);\n }", "public function setAmazonOrderId($value)\n {\n $this->_fields['AmazonOrderId']['FieldValue'] = $value;\n return $this;\n }", "public function setOffers($offers)\n {\n $this->setValue('offers', $offers);\n }", "public function setSellerID($sellerID)\n {\n $this->sellerID = $sellerID;\n return $this;\n }", "public function setSellerId($seller_id)\n {\n $this->seller_id = $seller_id;\n\n return $this;\n }", "public function setOrders($orders)\n {\n $this->orders = (int)$orders;\n\n return $this;\n }", "public function setOrder(\\Magento\\Sales\\Model\\Order $order);", "public function sellerOrderList(Request $request){\n $orders = \\App::call('App\\Http\\Controllers\\OrderController@viewBySeller', [$request->user()->seller->id]);\n return view('seller.order-list', compact('orders'));\n }", "public function forSeller(string $seller) : OffersRequestBuilder {\n $this->queryParameters[OffersRequestBuilder::SELLER_PARAMETER_NAME] = $seller;\n return $this;\n }", "public function setOrder($orderAttributes)\n {\n $this->email = $orderAttributes['email'];\n $this->orderId = $orderAttributes['orderId'];\n }", "public static function disableSeller($idSeller){\n Product_Seller::where('id_seller', $idSeller)->update(['status' => Seller::disabled]);\n }", "public function seller($value)\n {\n $this->setProperty('seller', $value);\n return $this;\n }", "public function setOrdersId($value, $key, $type) {\r\n\t\tif ($type == 'single') {\r\n\t\t\t$this->ordersId = $value;\r\n\t\t} else if ($type == 'array') {\r\n\t\t\t$this->ordersId [$key] = $value;\r\n\t\t} else {\r\n\t\t\techo json_encode(array(\"success\" => false, \"message\" => \"Cannot Identifiy Type String Or Array:setOrdersId ?\"));\r\n\t\t\texit();\r\n\t\t}\r\n\t}", "public function setVendorOrderId($vendorOrderId){\n return $this->setData(self::VENDOR_ORDER_ID, $vendorOrderId);\n }", "public function getIdOrders()\n {\n return $this->idOrders;\n }", "public function setOrderId($orderId)\n {\n return $this->setData(self::ORDER_ID, $orderId);\n }", "public function setCredentials(array $credentials)\n {\n if (!empty($credentials['merchantId']))\n {\n $this->_merchantId = (int)$credentials['merchantId'];\n }\n\n if (!empty($credentials['merchantLicenseSandbox']))\n {\n $this->_merchantLicenseSandbox = (string)$credentials['merchantLicenseSandbox'];\n }\n\n if (!empty($credentials['merchantLicenseLive']))\n {\n $this->_merchantLicenseLive = (string)$credentials['merchantLicenseLive'];\n }\n\n if (!empty($credentials['applicationSignature']))\n {\n $this->_applicationSignature = (string)$credentials['applicationSignature'];\n }\n\n if (!empty($credentials['applicationVersion']))\n {\n $this->_applicationVersion = (string)$credentials['applicationVersion'];\n }\n }", "static public function validateOrderBySeller($iIdOrder, $iIdSeller) {\n\n $sRq = \"UPDATE \" . PREFIX . \"sales.`order` \n SET `is_validated`=1,\n `date_updated` = NOW(), \n `is_cancelled`=0 \n WHERE `id`=\" . (int) $iIdOrder . \" \n AND `id_seller`=\" . (int) $iIdSeller . \" \n AND `is_validated`=0 \n AND `is_cancelled`=0 \n LIMIT 1\";\n\n if (Sql::Set($sRq)) {\n $_SESSION['submit'] = 1;\n if (mysql_affected_rows() < 1) {\n return false;\n }\n return true;\n }\n\n return false;\n }", "public function setOrderFilter($s)\n {\n if ($s && is_string($s)) {\n $this->resetFilters();\n $this->options['AmazonOrderId'] = $s;\n } else {\n return false;\n }\n }", "public function updateSellerRequest($itemProductId, $orderId, $loggedInCustomerId, $sellerId, $value)\r\n {\r\n /**\r\n * Checking for product id , order id and customer d\r\n */\r\n if (!empty($itemProductId) && !empty($orderId) && !empty($loggedInCustomerId)) {\r\n /**\r\n * Get product from commission model\r\n */\r\n $products = Mage::getModel('marketplace/commission')->getCollection();\r\n $products->addFieldToSelect('*');\r\n\r\n /**\r\n * Filter by value\r\n */\r\n if ($value == 2) {\r\n $products->addFieldToFilter('seller_id', $loggedInCustomerId);\r\n } else {\r\n $products->addFieldToFilter('seller_id', $sellerId);\r\n $products->addFieldToFilter('customer_id', $loggedInCustomerId);\r\n }\r\n $products->addFieldToFilter('order_id', $orderId);\r\n $products->addFieldToFilter('product_id', $itemProductId);\r\n\r\n /**\r\n * Getting first data id\r\n */\r\n $collectionId = $products->getFirstItem()->getId();\r\n\r\n /**\r\n * Checking for first data exist or not\r\n */\r\n if (!empty($collectionId)) {\r\n if ($value == 2) {\r\n $data = array('refund_request_seller' => 1);\r\n } elseif ($value == 1) {\r\n $data = array('refund_request_customer' => 1);\r\n } else {\r\n $data = array('cancel_request_customer' => 1);\r\n }\r\n\r\n /**\r\n * Update date for commission model\r\n */\r\n $model = Mage::getModel('marketplace/commission')->load($collectionId)->addData($data);\r\n\r\n /**\r\n * Save model\r\n */\r\n $model->setId($collectionId)->save();\r\n }\r\n }\r\n }", "public function set_order_id( $value ) {\n\t\t$this->set_prop( 'order_id', absint( $value ) ) ;\n\t}", "function setOrder($order);", "public function setCancelbyseller($id){\n $rma = Mage::getModel(\"mprmasystem/rmarequest\")->load($id);\n $rma->setStatus(\"Cancelled\")->save();\n Mage::getModel(\"mprmasystem/rmamail\")->CancelRMAMailbyseller($id);\n }", "protected function setShopOrderIdResolver(OptionsResolver $resolver)\n {\n }", "public function setOffers(array $offers)\n {\n $this->offers = $offers;\n\n return $this;\n }", "public function store(Request $request)\n {\n $this->validate(request(),[\n 'user_id'=>'required',\n 'product_id'=>'required',\n 'product_price'=>'required',\n 'seller_id'=>'required',\n ]);\n \n $orders = Order::where('user_id', Auth::user()->id)\n ->where('order_status_id', 1)->get();\n if(!count($orders)){\n $seller = User::find($request->seller_id);\n $order = new Order();\n $order->user_id = $request->user_id;\n $order->order_status_id = 1;\n $order->order_number = mt_rand();\n\n if( $order->save() ){\n $order_id = $order->id;\n }\n\n $seller->addCart()->attach($order_id);\n $orderitem = new OrderItem();\n $orderitem->order_id=$order_id;\n $orderitem->product_id = $request->product_id;\n $orderitem->product_price = $request->product_price;\n $orderitem->quantity = 1;\n $orderitem->save();\n return redirect('/buyers');\n }\n else{\n $order = Order::where('user_id', Auth::user()->id)\n ->where('order_status_id', 1)->first();\n $order_id = $order->id;\n\n $orderInCart = OrderUser::where('user_id',$request->seller_id)\n ->where('order_id',$order_id)->get();\n\n if( !count($orderInCart) ) {\n $seller = User::find($request->seller_id);\n $seller->addCart()->attach($order_id);\n }\n \n $orderitem = new OrderItem();\n $orderitem->order_id=$order_id;\n $orderitem->product_id = $request->product_id;\n $orderitem->product_price = $request->product_price;\n $orderitem->quantity = 1;\n $orderitem->save();\n return redirect('/buyers');\n }\n \n return back();\n }", "function setOrder($order){\n\t\t$this->order=$order;\n\t}", "static public function cancelOrderBySeller($iIdOrder, $iIdSeller) {\n\n $sRq = \"UPDATE \" . PREFIX . \"sales.`order` \n SET `is_validated`=0,\n `date_updated`= NOW(), \n `is_cancelled`=1 \n WHERE `id`=\" . (int) $iIdOrder . \" \n AND `id_seller`=\" . (int) $iIdSeller . \" \n LIMIT 1\";\n\n if (Sql::Set($sRq)) {\n $_SESSION['submit'] = 1;\n if (mysql_affected_rows() < 1) {\n return false;\n }\n return true;\n }\n\n return false;\n }", "public function setIds($arrIds);", "public function setOrder(?string $order): void\n {\n $this->order = $order;\n }", "public function setOrder(?string $order): void\n {\n $this->order = $order;\n }", "public function setOrder($order);", "public function sendOrderEmail($orderEmailData) {\r\n\r\n\r\n $sellerIds = array();\r\n $displayProductCommission = Mage::helper('marketplace')->__('Seller Commission Fee');\r\n $displaySellerAmount = Mage::helper('marketplace')->__('Seller Amount');\r\n $displayProductImage = Mage::helper('marketplace')->__('Product Image');\r\n $displayProductName = Mage::helper('marketplace')->__('Product Name');\r\n $displayProductQty = Mage::helper('marketplace')->__('Product QTY');\r\n $displayProductAmt = Mage::helper('marketplace')->__('Product Amount');\r\n $displayProductStatus = Mage::helper('marketplace')->__('Product Status');\r\n foreach ($orderEmailData as $data) {\r\n if (!in_array($data ['seller_id'], $sellerIds)) {\r\n $sellerIds [] = $data ['seller_id'];\r\n }\r\n }\r\n\r\n foreach ($sellerIds as $key => $id) {\r\n $totalProductAmt = $totalCommissionFee = $totalSellerAmt = 0;\r\n $productDetails = '<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"650\" style=\"border:1px solid #eaeaea\">';\r\n $productDetails .= '<thead><tr>';\r\n $productDetails .= '<th align=\"left\" bgcolor=\"#EAEAEA\" style=\"font-size:13px;padding:3px 9px;\">' . $displayProductImage . '</th><th align=\"left\" bgcolor=\"#EAEAEA\" style=\"font-size:13px;padding:3px 9px;\">' . $displayProductName . '</th><th align=\"center\" bgcolor=\"#EAEAEA\" style=\"font-size:13px;padding:3px 9px;\">' . $displayProductQty . '</th><th align=\"center\" bgcolor=\"#EAEAEA\" style=\"font-size:13px;padding:3px 9px;\">' . $displayProductAmt . '</th>';\r\n $productDetails .= '<th align=\"center\" bgcolor=\"#EAEAEA\" style=\"font-size:13px;padding:3px 9px;\">' . $displayProductCommission . '</th><th align=\"center\" bgcolor=\"#EAEAEA\" style=\"font-size:13px;padding:3px 9px;\">' . $displaySellerAmount . '</th><th align=\"center\" bgcolor=\"#EAEAEA\" style=\"font-size:13px;padding:3px 9px;\">' . $displayProductStatus . '</th></tr></thead>';\r\n $productDetails .= '<tbody bgcolor=\"#F6F6F6\">';\r\n $currencySymbol = Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol();\r\n foreach ($orderEmailData as $data) {\r\n if ($id == $data ['seller_id']) {\r\n $sellerId = $data ['seller_id'];\r\n $incrementId = $data ['increment_id'];\r\n $groupId = Mage::helper('marketplace')->getGroupId();\r\n $productId = $data ['product_id'];\r\n $simpleProductId = $data ['product_id_simple'];\r\n $product = Mage::helper('marketplace/marketplace')->getProductInfo($productId);\r\n $productGroupId = $product->getGroupId();\r\n $productName = $product->getName();\r\n $productamt = $data ['product_amt'] * $data ['product_qty'];\r\n $productStatus = $data['is_buyer_confirmation'];\r\n //$product_img = $product->getImageUrl();\r\n\r\n $content = \"order Details\\n Seller Id \".$sellerId.\"\\n\";\r\n $content .= \"Order Increment Id \".$incrementId.\"\\n\";\r\n $content .= \"Product Name \".$productName.\"\\n\";\r\n $content .= \"Product Amount \".$productamt.\"\\n\";\r\n\r\n\r\n $products_new = Mage::getModel('catalog/product')->load($productId);\r\n $product_img = $products_new->getImageUrl();\r\n if($products_new->getTypeId() == \"configurable\"){\r\n $products_new = Mage::getModel('catalog/product')->load($productId);\r\n if($products_new->getSupplierSku() != \"\"){\r\n $product_sku = $products_new->getSupplierSku();\r\n }else{\r\n $product_sku = $products_new->getSku();\r\n }\r\n $product_img = $products_new->getImageUrl();\r\n $product_color = $products_new->getAttributeText('color');\r\n $product_size = $products_new->getAttributeText('size');\r\n }\r\n else{\r\n if($products_new->getSupplierSku() != \"\"){\r\n $product_sku = $products_new->getSupplierSku();\r\n }else{\r\n $product_sku = $products_new->getSku();\r\n }\r\n $product_color = $products_new->getAttributeText('color');\r\n $product_size = $products_new->getAttributeText('size');\r\n }\r\n if ($product_sku) {\r\n $product_sku = \"<br/>SKU:&nbsp;\" . $product_sku;\r\n }else{\r\n $product_sku=\"\";\r\n }\r\n\r\n if ($product_size) {\r\n $product_size = \"<br/>Size:&nbsp;\" . $product_size;\r\n }else{\r\n $product_size=\"\";\r\n }\r\n\r\n if ($product_color) {\r\n $product_color = \"<br/>Color:&nbsp;\" . $product_color;\r\n\r\n }else{\r\n $product_color=\"\";\r\n }\r\n\r\n //removed echo\r\n $productOptions = $product_sku.$product_size.$product_color;\r\n $productDetails .= '<tr>';\r\n $productDetails .= '<td align=\"cenetr\" valign=\"center\" style=\"font-size:11px;padding:3px 9px;border-bottom:1px dotted #cccccc;\"><img src=\"' . $product_img . '\" width=\"70px\"></td><td align=\"left\" valign=\"top\" style=\"font-size:11px;padding:3px 9px;border-bottom:1px dotted #cccccc;\">' . $productName . '<br/>'. $productOptions.'</td><td align=\"center\" valign=\"top\" style=\"font-size:11px;padding:3px 9px;border-bottom:1px dotted #cccccc;\">' . round($data ['product_qty']) . '</td>';\r\n $productDetails .= '<td align=\"center\" valign=\"top\" style=\"font-size:11px;padding:3px 9px;border-bottom:1px dotted #cccccc;\">' . $currencySymbol . round($productamt, 2) . '</td><td align=\"center\" valign=\"top\" style=\"font-size:11px;padding:3px 9px;border-bottom:1px dotted #cccccc;\">' . $currencySymbol . round($data ['commission_fee'], 2) . '</td>';\r\n $productDetails .= '<td align=\"center\" valign=\"top\" style=\"font-size:11px;padding:3px 9px;border-bottom:1px dotted #cccccc;\">' . $currencySymbol . round($data ['seller_amount'], 2) . '</td>';\r\n $productDetails .= '<td align=\"center\" valign=\"top\" style=\"font-size:11px;padding:3px 9px;border-bottom:1px dotted #cccccc;\">' . $productStatus . '</td>';\r\n\r\n $totalProductAmt = $totalProductAmt + $productamt;\r\n $totalCommissionFee = $totalCommissionFee + $data ['commission_fee'];\r\n $totalSellerAmt = $totalSellerAmt + $data ['seller_amount'];\r\n $orderTotal = $data ['order_total'];\r\n\r\n $customerEmail = $data ['customer_email'];\r\n $customerFirstname = $data ['customer_firstname'];\r\n $productDetails .= '</tr>';\r\n }\r\n }\r\n $productDetails .= '</tbody><tfoot>\r\n <tr><td colspan=\"4\" align=\"right\" style=\"padding:3px 9px\">Seller Commision Fee</td><td align=\"center\" style=\"padding:3px 9px\"><span>' . $currencySymbol . round($totalCommissionFee, 2) . '</span></td></tr>\r\n <tr><td colspan=\"4\" align=\"right\" style=\"padding:3px 9px\">Total Amount</td><td align=\"center\" style=\"padding:3px 9px\"><span>' . $currencySymbol . round($totalProductAmt, 2) . '</span></td></tr>';\r\n $productDetails .= '</tfoot></table>';\r\n\r\n if ($groupId == $productGroupId) {\r\n $templateId = (int) Mage::getStoreConfig('marketplace/admin_approval_seller_registration/sales_notification_template_selection');\r\n\r\n $adminEmailId = Mage::getStoreConfig('marketplace/marketplace/admin_email_id');\r\n $toName = Mage::getStoreConfig(\"trans_email/ident_$adminEmailId/name\");\r\n $toMailId = Mage::getStoreConfig(\"trans_email/ident_$adminEmailId/email\");\r\n\r\n if ($templateId) {\r\n $emailTemplate = Mage::helper('marketplace/marketplace')->loadEmailTemplate($templateId);\r\n } else {\r\n $emailTemplate = Mage::getModel('core/email_template')->loadDefault('marketplace_admin_approval_seller_registration_sales_notification_template_selection');\r\n }\r\n $customer = Mage::helper('marketplace/marketplace')->loadCustomerData($sellerId);\r\n $sellerName = $customer->getName();\r\n $sellerEmail = $customer->getEmail();\r\n $recipient = $toMailId;\r\n $sellerStore = Mage::app()->getStore()->getName();\r\n $recipientSeller = $sellerEmail;\r\n $emailTemplate->setSenderName($toName);\r\n $emailTemplate->setSenderEmail($toMailId);\r\n $emailTemplateVariablesValue = (array(\r\n 'ownername' => $toName,\r\n 'productdetails' => $productDetails,\r\n 'order_id' => $incrementId,\r\n 'seller_store' => $sellerStore,\r\n 'customer_email' => $customerEmail,\r\n 'customer_firstname' => $customerFirstname\r\n ));\r\n $emailTemplate->setDesignConfig(array(\r\n 'area' => 'frontend'\r\n ));\r\n $emailTemplate->getProcessedTemplate($emailTemplateVariablesValue);\r\n /**\r\n * Send email to the recipient\r\n */\r\n $emailTemplate->send($recipient, $toName, $emailTemplateVariablesValue);\r\n $emailTemplateVariablesValue = (array(\r\n 'ownername' => $sellerName,\r\n 'productdetails' => $productDetails,\r\n 'order_id' => $incrementId,\r\n 'seller_store' => $sellerStore,\r\n 'customer_email' => $customerEmail,\r\n 'customer_firstname' => $customerFirstname\r\n ));\r\n\r\n $content .= \"Seller Name \".$sellerName.\"\\n\";\r\n $content .= \"Seller Name \".$sellerName.\"\\n\";\r\n $content .= \"Seller Email \".$sellerEmail.\"\\n\";\r\n $content .= \"Seller Store \".$sellerStore.\"\\n\";\r\n $content .= \"Email Recepient \".$recipientSeller.\"\\n\";\r\n\r\n $emailTemplate->send($recipientSeller, $sellerName, $emailTemplateVariablesValue);\r\n }\r\n }\r\n\r\n }", "public function setOrderid( $orderid ) {\n\t\t$this->orderid = $orderid;\n\t}", "private function SetOrderData()\n\t\t{\n\t\t\t// doesn't factor in cookies stored by Interspire Shopping Cart, so we have to pass back the\n\t\t\t// order token manually from those payment providers. We do this by taking the\n\t\t\t// cart ID passed back from the provider which stores the order's unique token.\n\t\t\tif(isset($_COOKIE['SHOP_ORDER_TOKEN'])) {\n\t\t\t\t$this->orderToken = $_COOKIE['SHOP_ORDER_TOKEN'];\n\t\t\t}\n\t\t\telse if(isset($_REQUEST['provider'])) {\n\t\t\t\tGetModuleById('checkout', $this->paymentProvider, $_REQUEST['provider']);\n\n\t\t\t\tif(in_array(\"GetOrderToken\", get_class_methods($this->paymentProvider))) {\n\t\t\t\t\t$this->orderToken = $this->paymentProvider->GetOrderToken();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tob_end_clean();\n\t\t\t\t\theader(sprintf(\"Location:%s\", $GLOBALS['ShopPath']));\n\t\t\t\t\tdie();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Load the pending orders from the database\n\t\t\t$this->pendingData = LoadPendingOrdersByToken($this->orderToken, true);\n\t\t\tif(!$this->orderToken || $this->pendingData === false) {\n\t\t\t\t$this->BadOrder();\n\t\t\t\texit;\n\t\t\t}\n\n\t\t\tif($this->paymentProvider === null) {\n\t\t\t\tGetModuleById('checkout', $this->paymentProvider, $this->pendingData['paymentmodule']);\n\t\t\t}\n\n\t\t\tif($this->paymentProvider) {\n\t\t\t\t$this->paymentProvider->SetOrderData($this->pendingData);\n\t\t\t}\n\t\t}", "public function updateSellerOrderItemsBasedOnSellerItems($savedQtys, $orderId, $value)\r\n {\r\n /**\r\n * Load order by order id\r\n */\r\n $order = Mage::getModel('sales/order')->load($orderId);\r\n $itemsArr = array();\r\n\r\n /**\r\n * Getting order items\r\n */\r\n foreach ($order->getAllItems() as $item) {\r\n $itemId = $item->getItemId();\r\n /**\r\n * Checking for seller order items\r\n */\r\n if (array_key_exists($itemId, $savedQtys) && $value != 1) {\r\n $itemsArr[] = $item;\r\n }\r\n /**\r\n * Prepare items for seller order status\r\n */\r\n if (in_array($itemId, $savedQtys) && $value == 1) {\r\n $itemsArr[] = $item;\r\n }\r\n }\r\n\r\n /**\r\n * Update seller order item status\r\n */\r\n Mage::getModel('marketplace/order')->updateOrderStatusForSellerItems($itemsArr, $orderId);\r\n }", "function setOrder($array)\n\t{\n\t\t$this->table->order = $array;\n\t}", "public function setOrder(\\Magento\\Sales\\Model\\Order $order)\n {\n return $this->setData(self::ORDER_ID, $order->getId());\n }", "protected function set_product_ids() {\n\n\t\t// get the products selected for the report\n\t\t$this->product_ids = isset( $_GET['product_ids'] ) ? array_filter( array_map( 'absint', (array) $_GET['product_ids'] ) ) : array();\n\t}", "public function change()\n {\n $sellersTable = TableRegistry::get('Sellers');\n $sellerDataTable = TableRegistry::get('ProductSellerData');\n $sellers = $sellersTable->find()->toArray();\n foreach($sellers as $seller){\n\n $sellerData = $sellerDataTable->find()->where(['seller_id'=>$seller['id']])->order(['updated_on'=>'DESC'])->first();\n\n $query = $sellersTable->query();\n $query->update()\n ->set(['rating' => $sellerData->rating,'rating_count' => $sellerData->rating_count])\n ->where(['id' => $seller['id']])\n ->execute();\n }\n\n }", "public function orderUpdate()\n {\n $this->helper->logOrder('Beginning Order Update.');\n $stores = $this->storeManager->getStores();\n\n $enabledStores = [];\n\n foreach ($stores as $store) {\n if ($store->isActive() && $this->helper->isEnabled($store->getId())) {\n $enabledStores[] = $store->getId();\n }\n }\n\n if ($enabledStores) {\n $ordersToProcess = null;\n\n $ordersToProcess = $this->orderCollectionFactory\n ->create()\n ->addFieldToSelect('*')\n ->addFieldToFilter(\n 'store_id',\n [\n 'in' => [$enabledStores],\n ]\n )\n ->addFieldToFilter(\n 'state',\n [\n 'in' => [\n \\Magento\\Sales\\Model\\Order::STATE_NEW,\n \\Magento\\Sales\\Model\\Order::STATE_PROCESSING,\n ],\n ]\n )\n ->addFieldToFilter('fulfilled_by_amazon', true)\n ->addFieldToFilter(\n 'amazon_order_status',\n [\n 'in' => [\n $this->helper::ORDER_STATUS_RECEIVED,\n $this->helper::ORDER_STATUS_PLANNING,\n $this->helper::ORDER_STATUS_PROCESSING,\n ],\n ]\n );\n\n if (!empty($ordersToProcess) && $ordersToProcess->count()) {\n $this->helper->logOrder('Beginning Order Update for ' . $ordersToProcess->count() . ' orders.');\n\n foreach ($ordersToProcess as $order) {\n $this->helper->logOrder('Updating order #' . $order->getIncrementId());\n\n $result = $this->outbound->getFulfillmentOrder($order);\n if ($result) {\n $fulfillmentOrderResult = $result->getGetFulfillmentOrderResult();\n\n // Amazon Statuses: RECEIVED / INVALID / PLANNING / PROCESSING / CANCELLED / COMPLETE\n // / COMPLETE_PARTIALLED / UNFULFILLABLE\n $amazonStatus = $fulfillmentOrderResult->getFulfillmentOrder()\n ->getFulfillmentOrderStatus();\n\n $amazonOrderId = $fulfillmentOrderResult->getFulfillmentOrder()\n ->getDisplayableOrderId();\n\n $id = $order->getIncrementId();\n if ($order->getIncrementId() == $amazonOrderId) {\n $this->helper->logOrder(\n 'Status of order #' . $order->getIncrementId() . ': ' . $amazonStatus\n );\n\n if ($amazonStatus) {\n switch ($amazonStatus) {\n case 'COMPLETE':\n case 'COMPLETE_PARTIALLED':\n $this->magentoOrderUpdate($order, $fulfillmentOrderResult);\n break;\n case 'INVALID':\n case 'CANCELLED':\n case 'UNFULFILLABLE':\n $this->cancelFBAShipment($order, $fulfillmentOrderResult);\n break;\n }\n }\n }\n }\n }\n\n $this->helper->logOrder(__('Get Order status called. Orders to process: ') . $ordersToProcess->count());\n } else {\n $this->helper->logOrder(__('Get Order status called. No orders to process'));\n }\n }\n }", "public function setStoreIds($storeIds);", "public function setProductIDs($productIDs)\n {\n $parameters = $this->request->getParameters();\n $parameters['id'] = $productIDs;\n $this->recommendationsUpToDate = false;\n }", "function setOrder( $order )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n if ( get_class( $order ) == \"ezorder\" )\n {\n $this->OrderID = $order->id();\n } \n }", "public function getSellerGroupId()\n {\n return $this->seller_group_id;\n }", "public function setSellerOfferDiscountByProductId($sellerId,$productId,$offerAmount, $offer_comment) {\n try {\n $rmaHelper = $this->_objectManager->create('Webkul\\MpRmaSystem\\Helper\\Data');\n $productSellerId = $rmaHelper->getSellerIdByproductid($productId);\n $response = [];\n $i = 0;\n if($sellerId == $productSellerId) {\n $likesByProductId = $this->_objectManager->create('Seasia\\Customapi\\Helper\\Data')->getLikesByProductId($productId);\n\n //echo '<pre>'; print_r($likesByProductId);die;\n if(is_array($likesByProductId)) {\n foreach($likesByProductId as $value) {\n $offerCollection = $this->_offerFactory->create();\n $offerCollection->setProductId($productId);\n $offerCollection->setSellerId($sellerId);\n $offerCollection->setBuyerId($value['entity_id']);\n $offerCollection->setOrderId(null);\n $offerCollection->setOfferAmount($offerAmount);\n $offerCollection->setStatus('pending');\n $offerCollection->setComment($offer_comment);\n $offerCollection->setCreatedAt(date(\"Y-m-d H:i:s\"));\n $offerCollection->setStripeToken(null);\n $offerCollection->setExpired(null);\n $offerCollection->setOfferUsed(null);\n $offerCollection->setOfferType('productOffer');\n $offerCollection->save();\n if($offerCollection->save()) {\n $offerId = $offerCollection->getId();\n $offer = $this->getOfferById($offerId);\n if($this->sendOfferMail(\"sent\", $offer)) {\n\n $notification_helper = $this->_objectManager->create(\n 'Seasia\\Customnotifications\\Helper\\Data'\n );\n\n $offerId = $offer->getId();\n $type = \"offer_received\";\n $buyer = $offer->getBuyerId();\n $seller = $offer->getSellerId();\n $message = 'Test';\n\n $notification_helper->setNotification($offerId,$type,$buyer,$seller,$message);\n // Send Notification To Buyer\n $i++;\n }\n }\n }\n }\n $response['status'] = \"Success \";\n $response['message'] = \"Discount set to offer successfully\";\n }\n return $this->getResponseFormat($response);\n } catch(\\Exception $e) {\n return $this->errorMessage($e);\n }\n }", "public function setPaymentIds(?array $paymentIds): void\n {\n $this->paymentIds['value'] = $paymentIds;\n }", "public function setOrder($Order)\n {\n $this->__set(\"order\", $Order);\n }", "private function setSoldIndividually() {\n $this->product->set_sold_individually($this->wcData->isSoldIndividually());\n }", "public function getSellerField()\n {\n $sellerId = $this->getProductSeller();\n return [\n 'arguments' => [\n 'data' => [\n 'config' => [\n 'label' => __('Select Seller'),\n 'componentType' => Field::NAME,\n 'formElement' => Select::NAME,\n 'dataScope' => 'seller_id',\n 'dataType' => Text::NAME,\n 'sortOrder' => 10,\n 'options' => $this->helper->getSellerList(),\n 'value' => $sellerId,\n 'disabled' => $sellerId ? true : false\n ],\n ],\n ],\n ];\n }", "function getSeller($params = array()){\n\t\tMpApi::sleep(); \n\t\treturn json_decode($this->callCurl(MpApi::GET , '/multivendor/seller/id/'.(int)$params['id'].'.json'),true);\n\t}", "public function offerreceivedbyid($sellerId, $offerId){\n try{\n $response = array();\n $response['products'] = array();\n $response['buyer'] = array();\n $offerModel = $this->_offerFactory->create();\n $store = $this->_storemanager->getStore();\n $offerCollection = $offerModel->getCollection()\n ->addFieldToFilter('seller_id', array('eq' => $sellerId))\n ->addFieldToFilter('product_id', array('eq' => $offerId))\n //->addFieldToFilter('expired', array('eq' => '0'))\n //->addFieldToFilter('offer_used', array('eq' => '1'))\n ;\n $offerCollection->getSelect()->where(\"(offer_used = '1' OR status = 'counter_offer') AND status != 'counter' \");\n\n\n if($offerCollection->getSize() > 0){\n $productsArray = array();\n\n\n $productData = array();\n $product = $this->_productModel->load($offerId);\n $productData['name'] = $product->getName();\n $productData['description'] = $product->getDescription();\n $productData['original_price'] = $product->getCost();\n $productData['price'] = $product->getPriceInfo()->getPrice('regular_price')->getValue();\n $productData['imageUrl'] = $store->getBaseUrl(\\Magento\\Framework\\UrlInterface::URL_TYPE_MEDIA) . 'catalog/product' . $product->getImage();\n\n $productData['productUrl'] = $product->getProductUrl();\n\n array_push($productsArray, $productData);\n\n $buyerCollection = $offerModel->getCollection()\n ->addFieldToFilter('main_table.seller_id', array('eq' => $sellerId))\n ->addFieldToFilter('product_id', array('eq' => $offerId))\n //->addFieldToFilter('offer_used', array('eq' => '1'))\n ;\n $buyerCollection->getSelect()->where(\"(offer_used = '1' OR status = 'counter_offer') AND status != 'counter'\");\n $joinTable = $this->_objectManager->create(\n 'Webkul\\Agorae\\Model\\ResourceModel\\Mpfavouriteseller\\Collection'\n )->getTable('customer_entity');\n\n $buyerCollection->getSelect()->join(\n $joinTable.' as cgf',\n 'main_table.buyer_id = cgf.entity_id',\n array('firstname','lastname')\n );\n\n $sellerjoinTable = $this->_objectManager->create(\n 'Webkul\\Agorae\\Model\\ResourceModel\\Mpfavouriteseller\\Collection'\n )->getTable('marketplace_userdata');\n\n $buyerCollection->getSelect()->joinLeft(\n $sellerjoinTable.' as sgf',\n 'main_table.buyer_id = sgf.seller_id',\n array('shop_url as username')\n );\n $buyerCollection->setOrder(\"offer_amount\", \"desc\");\n\n\n\n $allBuyers = array();\n foreach ($buyerCollection as $eachBuyer) {\n $partner = $this->_marketplacehelper->getSellerDataBySellerId($eachBuyer->getBuyerId())->getFirstItem();\n $eachBuyerArray = array();\n $eachBuyerArray = $eachBuyer->getData();\n\n $now = date('Y-m-d H:i:s');\n $expiredDate = $this->offerhelper->getExpiredDate($eachBuyerArray['created_at']);\n $t1 = strtotime( $expiredDate );\n $t2 = strtotime($now);\n\n $diff = $t1 - $t2;\n $hours = $diff / ( 60 * 60 );\n\n if($hours > 0){\n $status = $eachBuyerArray['status'];\n }else{\n $status = \"expired\";\n }\n $eachBuyerArray['status'] = $status;\n $eachBuyerArray['shop_url'] =\"\";\n if($partner->getId()){\n $eachBuyerArray['shop_url'] = $this->_marketplacehelper->getRewriteUrl(\n 'marketplace/seller/collection/shop/'.\n $partner->getShopUrl()\n );\n }\n\n $eachBuyerArray['expired_at'] = $this->offerhelper->getExpiredDate($eachBuyer->getCreatedAt());\n\n\n array_push($allBuyers, $eachBuyerArray);\n }\n\n\n $response['products'] = $productsArray;\n $response['buyer'] = $allBuyers;\n\n\n\n }\n return $this->getResponseFormat($response);\n } catch(\\Exception $e) {\n return $this->errorMessage($e);\n }\n }", "public function getSeller()\n {\n return $this->seller;\n }", "public function setOrder(array $order)\n {\n $this->order = $order;\n return $this;\n }", "public function setSellerNoteToBuyer($sellerNoteToBuyer)\n {\n $this->sellerNoteToBuyer = $sellerNoteToBuyer;\n return $this;\n }", "public function getSellerProductIdList(): ?\\SengentoBV\\CdiscountMarketplaceSdk\\Arrays\\CdiscountArrayOfstring\n {\n return isset($this->SellerProductIdList) ? $this->SellerProductIdList : null;\n }", "public function update_sales_order() {\n\t\t$rowIndex = $_POST['row_index'];\n\t\t$values=array(\"customer_name\"=>$_POST['customer_name'],\"product_id\"=>$_POST['inv_id'],\"sell_price\"=>$_POST['selling_price'],\"sell_date\"=>$_POST['selling_date'],\"prod_qty\"=>$_POST['selling_qty'],\"comments\"=>$_POST['comments']);\n\t\t$where =array(\"id\"=>$_POST['so_id']);\n\t\tif($this->update(\"sales_order\",$values,$where)) {\t\t\t\n\t\t\techo '{\"salesOrderList\":{\"updateFlag\":true,\"rowIndex\":'.$rowIndex.'}}';\n\t\t}\n\t\telse\n\t\t\techo 'Error while updating';\n\t}", "public function orders()\n {\n return $this->hasMany(Order::class, 'buyer_id');\n }", "public function sellItem($seller){\r\n\t}", "public function withAmazonOrderId($value)\n {\n $this->setAmazonOrderId($value);\n return $this;\n }", "public function setIdRedesSociales($idRedesSociales){\n $this->idRedesSociales = $idRedesSociales;\n }", "public function setOrderDate($date)\n {\n $this->order_date = $date;\n }", "public function actualizeSellOrders()\n {\n $orders = $this->orderService->getOpenSellOrders();\n\n if (is_array($orders)) {\n $this->msg[] = $this->timestamp . ' .... <info>actualizeSellOrders</info>';\n foreach ($orders as $order) {\n $gdaxOrder = $this->gdaxService->getOrder($order['order_id']);\n $status = $gdaxOrder->getStatus();\n\n if ($status) {\n $this->orderService->updateOrderStatus($order['id'], $gdaxOrder->getStatus());\n } else {\n $this->orderService->updateOrderStatus($order['id'], $gdaxOrder->getMessage());\n }\n }\n }\n }", "public function insertSellerId()\n {\n $font_options = $this->getFontOptions();\n\n $this->sticker->text('ID: ' . $this->getSellerId(), $this->textXPosition, $this->textYPosition, function ($font) use ($font_options) {\n $font->file($font_options['file']);\n $font->color($font_options['color']);\n $font->size($font_options['size']);\n $font->align($font_options['align']);\n $font->valign($font_options['valign']);\n });\n\n return $this;\n }", "public function setOrderIncrementId($orderIncrementID){\n return $this->setData(self::ORDER_INCREMENT_ID, $orderIncrementID);\n }", "public function handleESDOrder($basketRow, $orderID, $orderDetailsID)\n {\n $quantity = $basketRow['quantity'];\n $basketRow['assignedSerials'] = [];\n\n // Check if current order number is an esd variant.\n $esdProduct = $this->getVariantEsd($basketRow['ordernumber']);\n\n if (!$esdProduct['id']) {\n return $basketRow;\n }\n\n if (!$esdProduct['serials']) {\n // No serial number is needed\n $this->db->insert('s_order_esd', [\n 'serialID' => 0,\n 'esdID' => $esdProduct['id'],\n 'userID' => $this->sUserData['additional']['user']['id'],\n 'orderID' => $orderID,\n 'orderdetailsID' => $orderDetailsID,\n 'datum' => new Zend_Db_Expr('NOW()'),\n ]);\n\n return $basketRow;\n }\n\n $availableSerials = $this->getAvailableSerialsOfEsd($esdProduct['id']);\n\n if ((count($availableSerials) <= $this->config->get('esdMinSerials')) || count($availableSerials) <= $quantity) {\n // Not enough serial numbers anymore, inform merchant\n $context = [\n 'sArticleName' => $basketRow['articlename'],\n 'sMail' => $this->sUserData['additional']['user']['email'],\n ];\n\n $mail = Shopware()->TemplateMail()->createMail('sNOSERIALS', $context);\n\n if ($this->config->get('sESDMAIL')) {\n $mail->addTo($this->config->get('sESDMAIL'));\n } else {\n $mail->addTo($this->config->get('sMAIL'));\n }\n\n $mail->send();\n }\n\n // Check if enough serials are available, if not, an email has been sent, and we can return\n if (count($availableSerials) < $quantity) {\n return $basketRow;\n }\n\n for ($i = 1; $i <= $quantity; ++$i) {\n // Assign serial number\n $serialId = $availableSerials[$i - 1]['id'];\n\n // Update basket row\n $basketRow['assignedSerials'][] = $availableSerials[$i - 1]['serialnumber'];\n\n $this->db->insert('s_order_esd', [\n 'serialID' => $serialId,\n 'esdID' => $esdProduct['id'],\n 'userID' => $this->sUserData['additional']['user']['id'],\n 'orderID' => $orderID,\n 'orderdetailsID' => $orderDetailsID,\n 'datum' => new Zend_Db_Expr('NOW()'),\n ]);\n }\n\n return $basketRow;\n }", "public function setSeller(Seller $seller)\n {\n $this->seller = $seller;\n\n return $this;\n }", "public function getBuyerId()\n {\n return $this->buyer_id;\n }", "public function setSellerGroupId($seller_group_id)\n {\n $this->seller_group_id = $seller_group_id;\n\n return $this;\n }", "public function getSellerNoteToBuyer()\n {\n return $this->sellerNoteToBuyer;\n }", "public function isSeller() {\n $response = array (\n 'is_seller' => 1,\n 'msg' => '',\n 'redirect' => '' \n );\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance ();\n $customerSession = $objectManager->get ( 'Magento\\Customer\\Model\\Session' );\n if (! $customerSession->isLoggedIn ()) {\n $response = array (\n 'is_seller' => 0,\n 'msg' => 'You must have a Seller Account to access this page',\n 'redirect' => 'marketplace/seller/login' \n );\n } else {\n $customerGroupSession = $objectManager->get ( 'Magento\\Customer\\Model\\Group' );\n $customerGroupData = $customerGroupSession->load ( 'Marketplace Seller', 'customer_group_code' );\n $sellerGroupId = $customerGroupData->getId ();\n \n $currentCustomerGroupId = $customerSession->getCustomerGroupId ();\n \n if ($currentCustomerGroupId != $sellerGroupId) {\n $response = array (\n 'is_seller' => 0,\n 'msg' => 'Admin Approval is required. Please wait until admin confirms your Seller Account',\n 'redirect' => 'marketplace/seller/changebuyer' \n );\n }\n }\n return $response;\n }", "public function setSellerAssignedID(\\horstoeko\\zugferd\\entities\\en16931\\udt\\IDType $sellerAssignedID)\n {\n $this->sellerAssignedID = $sellerAssignedID;\n return $this;\n }" ]
[ "0.6359571", "0.5966119", "0.5622372", "0.5559373", "0.5506158", "0.5500821", "0.543005", "0.53384763", "0.5337009", "0.5335075", "0.53035873", "0.52805144", "0.5245622", "0.52326137", "0.5158248", "0.5145946", "0.5143545", "0.5098057", "0.5051394", "0.49714354", "0.493405", "0.48981377", "0.4894911", "0.4875152", "0.48406893", "0.48292524", "0.48224267", "0.4817883", "0.4817289", "0.48090047", "0.4801849", "0.47683296", "0.4756247", "0.4752269", "0.47437954", "0.47250646", "0.47118288", "0.4697278", "0.4690954", "0.46684688", "0.4663263", "0.46571127", "0.46428648", "0.4634243", "0.46337333", "0.4609056", "0.45989832", "0.45636293", "0.45556095", "0.45402458", "0.45355535", "0.4522597", "0.45178226", "0.45141447", "0.45123753", "0.4508273", "0.4499785", "0.4498959", "0.4498959", "0.4495797", "0.44942385", "0.44930336", "0.4483495", "0.44816005", "0.44789565", "0.44744918", "0.44740924", "0.44551128", "0.44538915", "0.44508392", "0.4449158", "0.44481584", "0.4444605", "0.44402227", "0.4439042", "0.44356582", "0.44280648", "0.4427273", "0.4424654", "0.44229507", "0.44223514", "0.44218388", "0.44118285", "0.4409797", "0.4408496", "0.44080624", "0.43977898", "0.43910298", "0.43879676", "0.43770167", "0.4376885", "0.43663207", "0.4363071", "0.4348759", "0.4344917", "0.43373066", "0.43317014", "0.4329573", "0.43271735", "0.43263525" ]
0.5645708
2
Sets the maximum response per page count. (Optional) This method sets the maximum number of Feed Submissions for Amazon to return per page. If this parameter is not set, Amazon will send 100 at a time.
public function setMaxResultsPerPage($num) { if (is_int($num) && $num <= 100 && $num >= 1) { $this->options['MaxResultsPerPage'] = $num; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _getMaxResultsPerPage() {\r\n return 500;\r\n }", "public function SetMaxCount ($maxCount);", "public function setMaxcount($count)\n {\n $this->maxCount = $count;\n }", "public function setMaxResults($maxResults);", "public function setElementsPerPage($count);", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($var)\n {\n GPBUtil::checkInt32($var);\n $this->max_results = $var;\n\n return $this;\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setPageLimit($number = null);", "public function setMaxCount($s)\n {\n if (is_int($s) && $s >= 1 && $s <= 100) {\n $this->options['MaxCount'] = $s;\n } else {\n return false;\n }\n }", "public function limit(): int\n {\n return $this->per_page;\n }", "function setRecordsPerPage($count) {\n $this->records_per_page = $count;\n}", "public function setMaxPageSize($amount)\n {\n $this->maxPageSize = $amount;\n \n return $this;\n }", "private function setNumberOfPages(): void\n {\n $this->number_of_pages = (int)ceil($this->number_of_records / $this->per_page);\n }", "private function set_per_page($intCount = 10)\n {\n $this->arrPayload['count'] = $intCount;\n\n if (isset($this->arrSearch['count'])) {\n $this->arrPayload['count'] = $this->arrSearch['count'];\n }\n\n return $this;\n }", "public function setLimit($x) { $this->limit = $x; }", "public function set_posts_per_page(int $number) {\n\t\t$this->posts_per_page = $number;\n\t}", "public function maxRedirects($n) {\n\t\t$this->max_redirects = $n;\n\t}", "function setPageSize($value)\n {\n $this->_props['PageSize'] = $value;\n }", "public function getLimit()\n {\n return $this->number_of_items_per_page;\n }", "protected function getMaxItemsCount()\n {\n return $this->getParam(self::PARAM_MAX_ITEMS_TO_DISPLAY) ?: $this->getMaxCountInBlock();\n }", "public function setPerPage($perPage);", "private function setNumResults()\n\t{\n\t\t$this->numResults = (int) count($this->data);\n\t}", "function setMaxPages(){ \n\t\t \n\t\t if($this->pages == \"\") \n\t\t {\n\t\t global $wp_query;\n\t\t $this->pages = $wp_query->max_num_pages;\n\t\t if(!$this->pages)\n\t\t {\n\t\t $this->pages = 1;\n\t\t }\n\t\t } \n\t\t\t return $this;\n\t}", "public function getResultsetLimit() {\n $resultset_limit = variable_get($this->module . '_resultset_limit');\n\n // Override:\n // parameter pageSize provided, use the value, otherwise, use\n // value set in the configuration.\n\n if (isset($this->call_asset['parameter']['pageSize'])\n && $this->call_asset['parameter']['pageSize'] > 0) {\n\n $resultset_limit = $this->call_asset['parameter']['pageSize'];\n }\n\n return $resultset_limit;\n }", "function wpfme_search_results_per_page( $query ) {\n global $wp_the_query;\n if ( ( ! is_admin() ) && ( $query === $wp_the_query ) && ( $query->is_search() ) ) {\n $query->set( 'wpfme_search_results_per_page', 100 );\n }\n return $query;\n}", "public function filter_posts_per_page() {\n\t\treturn 50;\n\t}", "public function setLimit ($value)\r\n\t{\r\n\t\t$this->limit = $value;\r\n\t}", "public function getMaxPageSize()\n {\n return $this->maxPageSize;\n }", "public function setMaximumAttendeesCount($val)\n {\n $this->_propDict[\"maximumAttendeesCount\"] = intval($val);\n return $this;\n }", "public function setMaxResultsPerPage($num)\n {\n if (is_numeric($num) && $num <= 100 && $num >= 1) {\n $this->options['MaxResultsPerPage'] = $num;\n } else {\n return false;\n }\n }", "public function maxPerPage($context = null);", "public function getPerPage()\n {\n return intval(request()->query('page_count', 0) < 0 ? $this->count() : request()->query('page_count') ?: $this->perPage);\n }", "public function setMaxResults()\n {\n return $this;\n }", "public function perPage($itemCount)\n {\n if ( $itemCount === null || !is_numeric( $itemCount ) )\n return $this->perPageDefault;\n\n return min($itemCount, $this->requestLimit);\n }", "public function setResultsPerPage($resultsPerPage) {\n $this->resultsPerPage = $resultsPerPage;\n }", "private function setPageCount($pageCount) {\n $this->pageCount = $pageCount;\n }", "public function SetNumPages()\n\t\t{\n\t\t\t$this->_pricenumpages = ceil($this->GetNumProducts() / GetConfig('CategoryProductsPerPage'));\n\t\t}", "private function setTotalPages()\n {\n $this->totalPages = ceil($this->totalData / $this->limit);\n }", "function email_manage_mailsperpage() {\n\tglobal $SESSION;\nprint_object($_POST);\n\tif ( ! empty( $_POST['perpage'] ) and is_int($_POST['perpage']) ) {\n\t\t$SESSION->email_mailsperpage = $_POST['perpage'];\n\t\techo 'Change for: '.$_POST['perpage'];\n\t} else {\n\t\t$SESSION->email_mailsperpage = 10; // Default value\n\t}\n}", "private function getNumPages() {\n //display all in one page\n if (($this->limit < 1) || ($this->limit > $this->itemscount)) {\n $this->numpages = 1;\n } else {\n //Calculate rest numbers from dividing operation so we can add one\n //more page for this items\n $restItemsNum = $this->itemscount % $this->limit;\n //if rest items > 0 then add one more page else just divide items\n //by limit\n $restItemsNum > 0 ? $this->numpages = intval($this->itemscount / $this->limit) + 1 : $this->numpages = intval($this->itemscount / $this->limit);\n }\n }", "public function setItemsPerPage($items);", "function MyMod_Paging_NPages_Set()\n {\n if ($this->NumberOfItems>$this->NItemsPerPage)\n {\n $this->MyMod_Paging_N=intval($this->NumberOfItems/$this->NItemsPerPage);\n $res=$this->NumberOfItems % $this->NItemsPerPage;\n if ($res>0) { $this->MyMod_Paging_N++; }\n }\n elseif ($this->NumberOfItems>0)\n {\n $this->MyMod_Paging_N=1;\n }\n else\n {\n $this->MyMod_Paging_N=0;\n }\n }", "public function set_max_checked_feeds($max = 10)\n {\n }", "public function setMaxItems($var)\n {\n GPBUtil::checkUint64($var);\n $this->max_items = $var;\n\n return $this;\n }", "public function per_page($number) {\n $number = (int) $number;\n if($number < 1)\n $number = 1;\n if($number > 500)\n $number = 500;\n $this->param[\"per_page\"] = $number;\n return $this;\n }", "public function setMaxBatchSize($value) \n {\n $this->_fields['MaxBatchSize']['FieldValue'] = $value;\n return $this;\n }", "public function setPageResults($results,$resultsCount) {\n $this->calculatePageCount($resultsCount);\n $this->pageResults = $results;\n }", "public function setItemCountPerPage($itemCountPerPage)\n\t{\n\t\t$this->itemCountPerPage = (integer) $itemCountPerPage;\n\n\t\tif ($this->itemCountPerPage < 1) {\n\t\t\t$this->itemCountPerPage = 1;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function limit()\n {\n if ($response = $this->request('limit')) {\n if (isset($response->limit) && $response->limit == true) {\n return $response->limit;\n }\n }\n return false;\n }", "public function setMax( int $max ): void {\n\t\t\t$this->maximum = $max;\n\t\t}", "public function setNumResults($count)\n {\n $this->numResults = (int)$count;\n\n return $this;\n }", "protected function perPage(): int\n {\n return $this->perPage;\n }", "function MyMod_Paging_NItemsPerPage_Set()\n {\n $val=$this->CGI_VarValue($this->ModuleName.\"_NItemsPerPage\");;\n if (!empty($val) && preg_match('/^\\d+$/',$val))\n {\n $this->NItemsPerPage=$val;\n }\n }", "public function setMaximumItemCount($maximumItemCount)\n {\n $this->maximumItemCount = $maximumItemCount;\n return $this;\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }" ]
[ "0.6807092", "0.6657158", "0.6647547", "0.6623299", "0.63853025", "0.6235321", "0.6235321", "0.6235321", "0.6235321", "0.6234689", "0.6234689", "0.6234648", "0.6234648", "0.6234648", "0.6234648", "0.62345505", "0.623415", "0.623415", "0.623415", "0.623415", "0.623415", "0.623415", "0.623415", "0.623415", "0.623415", "0.623415", "0.623415", "0.623415", "0.623415", "0.623415", "0.623415", "0.623415", "0.623415", "0.623415", "0.623415", "0.623415", "0.623415", "0.623415", "0.623415", "0.623415", "0.623415", "0.623415", "0.623415", "0.623415", "0.623415", "0.623415", "0.61903954", "0.61435664", "0.6083668", "0.6081266", "0.60591567", "0.6041991", "0.6022817", "0.59854746", "0.5963875", "0.59092134", "0.5899978", "0.5871691", "0.5856117", "0.582939", "0.58162117", "0.5795123", "0.5793787", "0.5780926", "0.57805675", "0.5764723", "0.57555693", "0.57455534", "0.5740948", "0.572544", "0.57118595", "0.5709415", "0.5692746", "0.56823367", "0.56681144", "0.56516516", "0.5649361", "0.5645813", "0.56404275", "0.5631875", "0.5627344", "0.5622991", "0.5621837", "0.56193995", "0.5603954", "0.55999494", "0.5594049", "0.5588112", "0.55880815", "0.5578654", "0.5565386", "0.5560607", "0.55551255", "0.55434525", "0.55434525", "0.55434525", "0.55434525", "0.55434525", "0.55434525", "0.55434525" ]
0.58064663
61
Sets the TFM shipment status(es). (Optional) This method sets the list of TFM Shipment Statuses to be sent in the next request. Setting this parameter tells Amazon to only return TFM Orders with statuses that match those in the list. If this parameter is not set, Amazon will return Orders of any status, including nonTFM orders.
public function setTfmShipmentStatusFilter($list) { if (is_string($list)) { //if single string, set as filter $this->resetTfmShipmentStatusFilter(); $this->options['TFMShipmentStatus.Status.1'] = $list; } else if (is_array($list)) { //if array of strings, set all filters $this->resetTfmShipmentStatusFilter(); $i = 1; foreach ($list as $x) { $this->options['TFMShipmentStatus.Status.' . $i] = $x; $i++; } } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setShipmentStatus($value)\n {\n $this->_fields['ShipmentStatus']['FieldValue'] = $value;\n return $this;\n }", "public function resetTfmShipmentStatusFilter()\n {\n foreach ($this->options as $op => $junk) {\n if (preg_match(\"#TFMShipmentStatus#\", $op)) {\n unset($this->options[$op]);\n }\n }\n }", "public function withShipmentStatus($value)\n {\n $this->setShipmentStatus($value);\n return $this;\n }", "protected function _fcpoSetOrderStatus() {\n $blIsAmazonPending = $this->_oFcpoHelper->fcpoGetSessionVariable('fcpoAmazonPayOrderIsPending');\n $blOrderOk = $this->_fcpoValidateOrderAgainstProblems();\n\n if ($blIsAmazonPending) {\n $this->_setOrderStatus('PENDING');\n $this->oxorder__oxfolder = new oxField('ORDERFOLDER_PROBLEMS', oxField::T_RAW);\n $this->save();\n } elseif ($blOrderOk === true) {\n // updating order trans status (success status)\n $this->_setOrderStatus('OK');\n } else {\n $this->_setOrderStatus('ERROR');\n }\n }", "public function setOrderStatusFilter($list)\n {\n if (is_string($list)) {\n //if single string, set as filter\n $this->resetOrderStatusFilter();\n $this->options['OrderStatus.Status.1'] = $list;\n } else if (is_array($list)) {\n //if array of strings, set all filters\n $this->resetOrderStatusFilter();\n $i = 1;\n foreach ($list as $x) {\n $this->options['OrderStatus.Status.' . $i] = $x;\n $i++;\n }\n } else {\n return false;\n }\n }", "public function setStatuses(&$var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::ENUM, \\Salesorders\\V1\\Status::class);\n $this->statuses = $arr;\n }", "public function setTransactionStatus($orderId, string $status);", "public function setShippingStatusService(ShippingStatusService $service)\n {\n $this->shippingStatusService = $service;\n }", "public function setOrderStatus($orderStatus){\n return $this->setData(self::ORDER_STATUS, $orderStatus);\n }", "public function setShippingStatus($status, $updateTime = null)\n {\n /** @var TimeProvider $timeProvider */\n $timeProvider = ServiceRegister::getService(TimeProvider::CLASS_NAME);\n\n $this->status = $status;\n\n if ($updateTime === null) {\n $this->lastStatusUpdateTime = $timeProvider->getCurrentLocalTime();\n } else {\n $this->lastStatusUpdateTime = $timeProvider->getDateTime($updateTime);\n }\n }", "protected function _setDefaultOrderStatuses() {\n $completedOrderStatusId = $this->registry->get('model_extension_payment_' . $this->_getPaymentMethodCode())->getOrderStatusByName($this->language->get('completed_order_status'));\n $failedOrderStatusId = $this->registry->get('model_extension_payment_' . $this->_getPaymentMethodCode())->getOrderStatusByName($this->language->get('cancelled_order_status'));\n $partialRefundedOrderStatusId = $this->registry->get('model_extension_payment_' . $this->_getPaymentMethodCode())->getOrderStatusByName($this->language->get('partial_refunded_order_status'));\n $refundedOrderStatusId = $this->registry->get('model_extension_payment_' . $this->_getPaymentMethodCode())->getOrderStatusByName($this->language->get('refunded_order_status'));\n\n if ($completedOrderStatusId) {\n $this->registry->get('model_extension_payment_' . $this->_getPaymentMethodCode())->addSettingValue('payment_'.$this->_getPaymentMethodCode(), 'payment_'.$this->_getPaymentMethodCode().'_order_completed_status_id', $completedOrderStatusId, $this->config->get('config_store_id'));\n }\n if ($failedOrderStatusId) {\n $this->registry->get('model_extension_payment_' . $this->_getPaymentMethodCode())->addSettingValue('payment_'.$this->_getPaymentMethodCode(), 'payment_'.$this->_getPaymentMethodCode().'_order_failed_status_id', $failedOrderStatusId, $this->config->get('config_store_id'));\n }\n if ($partialRefundedOrderStatusId) {\n $this->registry->get('model_extension_payment_' . $this->_getPaymentMethodCode())->addSettingValue('payment_'.$this->_getPaymentMethodCode(), 'payment_'.$this->_getPaymentMethodCode().'_order_partial_refunded_status_id', $partialRefundedOrderStatusId, $this->config->get('config_store_id'));\n }\n if ($refundedOrderStatusId) {\n $this->registry->get('model_extension_payment_' . $this->_getPaymentMethodCode())->addSettingValue('payment_'.$this->_getPaymentMethodCode(), 'payment_'.$this->_getPaymentMethodCode().'_order_refunded_status_id', $refundedOrderStatusId, $this->config->get('config_store_id'));\n }\n $this->cache->delete(\"order_status.\" . (int)$this->config->get('config_language_id'));\n }", "public function change_order_status_post()\n {\n $pdata = file_get_contents(\"php://input\");\n $data = json_decode($pdata,true);\n $id = $data['order_id'];\n $status = $data['status'];\n $user_id = $data['user_id'];\n // $this->response($user_id);\n $data = array(\n 'status' => $status\n );\n \n $where = array(\n 'id' => $id\n );\n $this->model->update('orders', $data, $where);\n $message = \"Your Order is $status\";\n \n $resp = array('rccode' => 200,'message' => $message);\n $this->response($resp);\n //}\n \n \n }", "function setStatus($bstatus = 'f')\n {\n $this->bstatus = $bstatus;\n }", "function setStatus($bstatus = 'f')\n {\n $this->bstatus = $bstatus;\n }", "public function setPendingShipped($value)\n {\n return $this->set(self::pending_shipped, $value);\n }", "public function setStatus($status);", "public function setStatus($status);", "public static function rac_change_cart_list_mailstatus() {\n check_ajax_referer('mailstatus-cartlist', 'rac_security');\n\n if (isset($_POST['row_id']) && isset($_POST['status'])) {\n $status = $_POST['status'];\n update_post_meta($_POST['row_id'], 'rac_cart_sending_status', $status);\n echo '1';\n }\n exit();\n }", "public function add_valid_order_statuses( $statuses, $order ) {\n\t\t$payment_method = $order->get_payment_method();\n\t\tif ( in_array( $payment_method, WC_Swedbank_Plugin::PAYMENT_METHODS, true ) ) {\n\t\t\t$statuses = array_merge(\n\t\t\t\t$statuses,\n\t\t\t\tarray(\n\t\t\t\t\t'processing',\n\t\t\t\t\t'completed',\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\treturn $statuses;\n\t}", "function foxpost_status($status)\r\n {\r\n $res = \"\";\r\n if ($status==1) {\r\n $res = __( 'Sended', 'woocommerce-foxpost-shipping' );\r\n } else {\r\n $res = __( 'Not send', 'woocommerce-foxpost-shipping' );\r\n }\r\n return $res;\r\n }", "public function saveGlsOrderStatus($observer) {\n $invoice = Mage::registry('current_invoice');\n $order = $invoice->getOrder();\n $glsShipments = Mage::getModel('synergeticagency_gls/shipment')->getCollection();\n $glsShipments->addFieldToFilter('order_id',array('eq' => $order->getId()));\n if($glsShipments->count()) {\n $helper = Mage::helper('synergeticagency_gls');\n $helper->setOrderStatus($order,$helper->__('Order with GLS-Shipment'));\n }\n }", "public function set_status( $order, $reset_status = false ) {\n\n\t\t\t/**\n\t\t\t * Post meta table.\n\t\t\t */\n\t\t\t$post_status = get_post_meta( $order['post_id'], self::LANGUAGE_POST_STATUS, true );\n\n\t\t\tif ( ! is_array( $post_status ) ) {\n\t\t\t\t// Meta value is invalid. Reset to an empty array.\n\t\t\t\t$post_status = array();\n\t\t\t}\n\n\t\t\t$result_meta = true;\n\t\t\t$message = '';\n\t\t\t$status_changed = false;\n\n\t\t\tif ( 'draft' === $order['status'] ) {\n\t\t\t\tif ( empty( $post_status[ $order['language'] ] ) || $post_status[ $order['language'] ] != $order['status'] ) {\n\t\t\t\t\t$post_status[ $order['language'] ] = $order['status'];\n\t\t\t\t\t$status_changed = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tunset( $post_status[ $order['language'] ] );\n\t\t\t\t$status_changed = true;\n\t\t\t}\n\n\t\t\tif ( empty( $post_status ) ) :\n\t\t\t\t$result_meta = delete_post_meta( $order['post_id'], self::LANGUAGE_POST_STATUS );\n\t\t\telse:\n\t\t\t\tif ( $status_changed ) {\n\t\t\t\t\t$result_meta = update_post_meta( $order['post_id'], self::LANGUAGE_POST_STATUS, $post_status );\n\t\t\t\t}\n\t\t\tendif;\n\n\t\t\tif ( $status_changed ) {\n\t\t\t\tif ( $result_meta ) {\n\t\t\t\t\t$message = esc_html( sprintf( __( 'Successfully set to \"%s\"', 'wpglobus-plus' ), ucfirst( $order['status'] ) ) );\n\t\t\t\t} else {\n\t\t\t\t\t$message = esc_html( sprintf( __( 'Setting to \"%s\" FAILED!', 'wpglobus-plus' ), ucfirst( $order['status'] ) ) );\n\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$message = esc_html( sprintf( __( 'Already set to \"%s\". Not changing.', 'wpglobus-plus' ), ucfirst( $order['status'] ) ) );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Options table.\n\t\t\t */\n\t\t\t$result_option = true;\n\t\t\t$lang_status = get_option( self::LANGUAGE_STATUS );\n\n\t\t\tif ( empty( $post_status ) ) {\n\n\t\t\t\tif ( ! empty( $lang_status[ $order['language'] ] ) && isset( $lang_status[ $order['language'] ][ $order['post_id'] ] ) ) {\n\t\t\t\t\tunset( $lang_status[ $order['language'] ][ $order['post_id'] ] );\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif ( 'draft' === $order['status'] ) {\n\t\t\t\t\t$lang_status[ $order['language'] ][ $order['post_id'] ] = $order['post_id'];\n\t\t\t\t} else {\n\t\t\t\t\tif ( ! empty( $lang_status[ $order['language'] ] ) && isset( $lang_status[ $order['language'] ][ $order['post_id'] ] ) ) {\n\t\t\t\t\t\tunset( $lang_status[ $order['language'] ][ $order['post_id'] ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t};\n\n\t\t\tif ( isset( $lang_status[ $order['language'] ] ) && empty( $lang_status[ $order['language'] ] ) ) {\n\t\t\t\tunset( $lang_status[ $order['language'] ] );\n\t\t\t}\n\n\t\t\tif ( empty( $lang_status ) ) {\n\t\t\t\t$result_option = delete_option( self::LANGUAGE_STATUS );\n\t\t\t} else {\n\n\t\t\t\t$result_option = update_option( self::LANGUAGE_STATUS, $lang_status, false );\n\t\t\t\tif ( $reset_status ) {\n\t\t\t\t\t$result_option = $this->reset_status();\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t$return = array();\n\t\t\t$return['action'] \t= $order['action'];\n\t\t\t$return['post_id'] \t= $order['post_id'];\n\t\t\t$return['language'] = $order['language'];\n\t\t\t$return['status'] \t= $order['status'];\n\t\t\t$return['message'] \t= $message;\n\n\t\t\treturn $return;\n\n\t\t}", "public function changeStatus($orderId=null,$status=null){\n $allowedStatuses = ShopCore::$orderStatuses;\n if(!$orderId){\n $orderId = (int)$_POST['id'];\n }\n if(!$status){\n $status = $_POST['status'];\n }\n $order = new DBObject('sr_shop_order',$orderId);\n\n if(!$order->id){\n $this->sendJSON(array('success'=>false,'message'=>'Product not found'));\n }\n if(!$allowedStatuses[$status]){\n $this->sendJSON(array('success'=>false,'message'=>'Product not found'));\n }\n if($order->get('status')==$status){\n $this->get($orderId);\n return;\n }\n switch ($order->get('status')){\n case 'new':\n case 'processing':\n switch($status){\n case 'shipped':\n case 'done':\n // -w\n //-r\n $this->updateWarehouse($orderId,-1,-1);\n if($status=='done' && $order->get('customer_id')!='0'){\n $this->updateDiscount($order->get('customer_id'),$order->get('total'));\n }\n break;\n case 'cancelled':\n //-r\n $this->updateWarehouse($orderId,0,-1);\n break;\n }\n break;\n case 'shipped':\n case 'done':\n if($order->get('status')=='done' && $order->get('customer_id')!='0'){\n $this->updateDiscount($order->get('customer_id'),$order->get('total'),true);\n }\n switch($status){\n case 'new':\n case 'processing':\n // +w\n // +r\n $this->updateWarehouse($orderId,1,1);\n break;\n case 'cancelled':\n //+w\n $this->updateWarehouse($orderId,1,0);\n break;\n }\n break;\n\n case 'cancelled':\n switch($status){\n case 'new':\n case 'processing':\n // +r\n $this->updateWarehouse($orderId,0,1);\n break;\n default:\n if(!$allowedStatuses[$status]){\n $this->sendJSON(array('success'=>false,'message'=>'Action denied'));\n }\n break;\n }\n break;\n }\n $order->set('status',$status);\n $order->save();\n $this->get($orderId);\n }", "public function _setStatus($status) {\n\t\t$this->_status = $status;\n\t}", "public function setStatus($status)\n {\n $this->feedbackFields['status'] = $status;\n }", "public function getOrderStatuses()\n {\n $response = $this->client->request('GET', '/v1/settings/orderstatuses');\n return new GetOrderStatusesResponse($response);\n }", "public function changeStatusAjaxAction()\n\t{\n\t\t$data = $this->getRequest()->getPost();\n\t\tif($data){\n\t\t\tif($data['lb_item_status']!=\"\"){\n\t\t\t\t$order = Mage::getModel('sales/order')->load($data['order_id']);\n\t\t\t\t$orderStatus = $order->getStatus();\n\t\t\t\t$lbOrderItemInstance = Mage::getModel('dropship360/orderitems')->getCollection()->addFieldToFilter('item_id', $data['lb_item_id']);\n\t\t\t\ttry{\n\t\t\t\t\tif($lbOrderItemInstance->count() > 0){\t\t\t\n\t\t\t\t\t\tforeach($lbOrderItemInstance as $item){\n\t\t\t\t\t\t\t$itemStatusHistory = Mage::helper('dropship360')->getSerialisedData($item, $data['lb_item_status'], $orderStatus);\n\t\t\t\t\t\t\t$item->setLbItemStatus($data['lb_item_status']);\n\t\t\t\t\t\t\t$item->setItemStatusHistory($itemStatusHistory);\n\t\t\t\t\t\t\t$item->setUpdatedBy('User');\n\t\t\t\t\t\t\t$item->setUpdatedAt(Mage::getModel('core/date')->gmtDate());\n\t\t\t\t\t\t\t$item->save();\t\n\t\t\t\t\t\t\tif($data['lb_item_status']==$item->getLbItemStatus()){\n\t\t\t\t\t\t\t\t$data['msg'] = $item->getSku().' status successfully changed to '.$data['lb_item_status'];\n\t\t\t\t\t\t\t\tMage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('dropship360')->__($data['msg']));\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$data['msg'] = $item->getSku().' status unable to change to '.$data['lb_item_status'];\n\t\t\t\t\t\t\t\tMage::getSingleton('adminhtml/session')->addError(Mage::helper('dropship360')->__($data['msg']));\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\n\t\t\t\t\tif($data['lb_item_status'] == 'Transmitting'){\n\t\t\t\t\t\tMage::getModel('dropship360/logicbroker')->setupNotification();\n\t\t\t\t\t}\t\t\t\n\t\t\t\t\t$result = Mage::helper('core')->jsonEncode($data);\n\t\t\t\t\tMage::app()->getResponse()->setBody($result);\n\t\t\t\t}catch(Exception $e){\t\t\t\n\t\t\t\t\tMage::getSingleton('adminhtml/session')->addError($e->getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\t$data['msg'] = 'Unable to perform the required operation';\n\t\t}\t\n\t}", "function setStatus( $status )\n {\n if ( $status instanceof eZOrderStatus )\n $this->StatusID = $status->attribute( 'id' );\n else\n $this->StatusID = $status;\n $this->setStatusModified( time() );\n }", "public function updateOrderStatus($orders = 0, $order_id = 0, $order_status = 0)\n {\n $total = 1;\n if (empty($orders)) {\n $orders = array();\n\n $orderslist = vRequest::getVar('orders', array());\n $total = 0;\n // Get the list of orders in post to update\n foreach ($orderslist as $key => $order) {\n if ($orderslist[$key]['order_status'] !== $orderslist[$key]['current_order_status']) {\n $orders[$key] = $orderslist[$key];\n $total++;\n }\n }\n }\n\n if (!is_array($orders)) {\n $orders = array($orders);\n }\n\n /* Process the orders to update */\n $updated = 0;\n $error = 0;\n if ($orders) {\n // $notify = vRequest::getVar('customer_notified', array()); // ???\n // $comments = vRequest::getVar('comments', array()); // ???\n foreach ($orders as $virtuemart_order_id => $order) {\n if ($order_id > 0) $virtuemart_order_id = $order_id;\n $this->useDefaultEmailOrderStatus = false;\n if ($this->updateStatusForOneOrder($virtuemart_order_id, $order, true)) {\n $updated++;\n } else {\n $error++;\n }\n }\n }\n $result = array('updated' => $updated, 'error' => $error, 'total' => $total);\n return $result;\n }", "public function set_mms_status($_status = NULL)\n {\n if ($_status && is_array($_status)) {\n \n // Set supplied _status argument as the available status options\n $this->_mms_status = array(\n $_status\n );\n } else \n if (isset($this->_config['data']['mms']['customer_codes'])) {\n \n // If no supplied argument then check if config customer_codes exist and use that\n $this->_mms_status = $this->_config['data']['mms']['status'];\n } else {\n \n // Else set default fallback value if none specified in the config and or given in method argument\n $this->_mms_status = explode(',', self::DEFAULT_MMS_STATUS);\n }\n }", "protected function setOrderStatusProcessing($uuid = '')\n {\n $request = $this->getRequest();\n \n if ($uuid == '') {\n $uuid = $request->getParameter('uuid');\n }\n \n $orderItem = $this->getOrderItemObjectByIdOrUuid($uuid);\n $orderItem->setStatusId(OrderStatusPeer::STATUS_PROCESSING);\n $orderItem->setPaymentAt(time());\n $orderItem->save();\n }", "public function getShipmentStatus()\n {\n return $this->_fields['ShipmentStatus']['FieldValue'];\n }", "public function updateStatuses()\n {\n $affected = DB::update('UPDATE los_orders SET status_code=1 WHERE status_code=0 AND order_date IN (SELECT provide_date FROM los_lunchdates WHERE orders_placed IS NOT NULL)');\n $affected = DB::update('UPDATE los_orders SET status_code=0 WHERE status_code=1 AND order_date IN (SELECT provide_date FROM los_lunchdates WHERE orders_placed IS NULL)');\n }", "public function getPendingOrders($status) {\r\n if($status != \"all\"):\r\n $orders = Mage::getModel('marketplace/commission')->getCollection();\r\n $orders->addFieldToSelect('*');\r\n $orders->addFieldToFilter('seller_id', Mage::getSingleton('customer/session')->getCustomer()->getId());\r\n $orders ->getSelect()\r\n ->columns('SUM(seller_amount) as seller_amount')\r\n ->group('order_id'); \r\n /**\r\n * Set order for manage order\r\n */\r\n $orders->setOrder('order_id', 'desc');\r\n /**\r\n * Return orders\r\n */\r\n $condition = new Zend_Db_Expr(\"sales.entity_id = main_table.order_id AND sales.status = '$status'\");\r\n $orders->getSelect()->join(array('sales' => $orders->getTable('sales/order')),\r\n $condition,\r\n array('status' => 'sales.status'));\r\n elseif($status == \"all\"):\r\n $orders = Mage::getModel('marketplace/commission')->getCollection();\r\n $orders->addFieldToSelect('*');\r\n $orders->addFieldToFilter('seller_id', Mage::getSingleton('customer/session')->getCustomer()->getId());\r\n $orders ->getSelect()\r\n ->columns('SUM(seller_amount) as seller_amount')\r\n ->group('order_id'); \r\n /**\r\n * Set order for manage order\r\n */\r\n $orders->setOrder('order_id', 'desc');\r\n /**\r\n * Return orders\r\n */\r\n endif;\r\n return $orders; \r\n }", "public function massStatusAction()\n {\n $scheduleIds = $this->getRequest()->getParam('schedule');\n if (!is_array($scheduleIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_schedule')->__('Please select schedule.')\n );\n } else {\n try {\n foreach ($scheduleIds as $scheduleId) {\n $schedule = Mage::getSingleton('bs_schedule/schedule')->load($scheduleId)\n ->setStatus($this->getRequest()->getParam('status'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d schedule were successfully updated.', count($scheduleIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_schedule')->__('There was an error updating schedule.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }", "public function setStatus(?array $status): void\n {\n $this->status['value'] = $status;\n }", "public function setStatus($status)\n {\n \n $this->status = $status;\n }", "protected function _applyOrderStatusFilter()\n {\n if (is_null($this->_orderStatus)) {\n return $this;\n }\n $orderStatus = $this->_orderStatus;\n if (!is_array($orderStatus)) {\n $orderStatus = array($orderStatus);\n }\n $this->getSelect()->where('status IN(?)', $orderStatus);\n return $this;\n }", "public function setStatus($status)\n {\n $this->_status = $status;\n }", "public function setStatus($status)\n {\n $this['status'] = $status;\n }", "public function setShippingMethod() {\n\t\t$json = array();\n\t\t$json['status'] = false;\n\t\t\n\t\tif (isset($this->request->post['code'])) {\n\t\t\t$code=$this->request->post['code'];\n\t\t\t$shipping_method=$this->session->data['shipping_methods'][$code]; \n\t\t\tif ($shipping_method) {\n\t\t\t\tunset($this->session->data['shipping_method']);\n\t\t\t\t$this->session->data['shipping_method'] = $shipping_method;\n\t\t\t\t\n\t\t\t\t$json['status'] = true;\n\t\t\t\t$json['delivery'] = $shipping_method['delivery'];\n\n\t\t\t} else {\n\t\t\t\t$json['error'] = 'Неизвестный способ доставки';\n\t\t\t}\n\t\t} else {\n\t\t\t$json['error'] = 'Не указан тип доставки';\n\t\t}\n\t\t$this->response->addHeader('Content-Type: application/json');\n\t\t$this->response->setOutput(json_encode($json));\n\t}", "public function salesOrderShipmentSaveAfter($observer)\n {\n\n // Get the settings\n $settings = Mage::helper('smsnotifications/data')->getSettings();\n $arr = $settings['order_status'];\n $a = explode(',', $settings['order_status']);\n $b = explode(',', $settings['order_status']);\n $final_array = array_combine($a, $b);\n \n if (!$settings['shipment_notification_message']) {\n return;\n }\n $order = $observer->getEvent()->getShipment()->getOrder();\n \n $billingAdress = $order->getBillingAddress();\n $shippingAdress = $order->getShippingAddress();\n\n if ($order->getCustomerFirstname()) {\n $customer_name = $order->getCustomerFirstname();\n $customer_name .= ' '.$order->getCustomerLastname();\n } elseif ($billingAdress->getFirstname()) {\n $customer_name = $billingAdress->getFirstname();\n $customer_name .= ' '.$billingAdress->getLastname();\n } else {\n $customer_name = $shippingAdress->getFirstname();\n $customer_name .= ' '.$shippingAdress->getLastname();\n }\n\n $order_id = $order->getIncrementId();\n $order_amount = $order->getBaseCurrencyCode();\n $order_amount .= ' '.$order->getBaseGrandTotal();\n\n $telephoneNumber = trim($shippingAdress->getTelephone());\n\n $shipment = $order->getShipmentsCollection()->getFirstItem();\n $shipId = $shipment->getIncrementId();\n\n // Check if a telephone number has been specified\n if(in_array('shippment', $final_array)){\n if ($telephoneNumber) {\n // Send the shipment notification to the specified telephone number\n $text = $settings['shipment_notification_message'];\n $text = str_replace('{{name}}', $customer_name, $text);\n $text = str_replace('{{order}}', $order_id, $text);\n $text = str_replace('{{amount}}', $order_amount, $text);\n $text = str_replace('{{shipmentno}}', $shipId, $text);\n\n array_push($settings['order_noficication_recipients'], $telephoneNumber);\n\n $result = Mage::helper('smsnotifications/data')->sendSms($text, $settings['order_noficication_recipients']);\n // Display a success or error message\n if ($result) {\n $recipients_string = implode(',', $settings['order_noficication_recipients']);\n Mage::getSingleton('adminhtml/session')->addSuccess(sprintf('The shipment notification has been sent via SMS to: %s', $recipients_string));\n } else {\n Mage::getSingleton('adminhtml/session')->addError('There has been an error sending the shipment notification SMS.');\n }\n }\n } \n}", "public function setStatus(Status $status);", "public function massStatusAction()\n {\n $kstitemIds = $this->getRequest()->getParam('kstitem');\n if (!is_array($kstitemIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_kst')->__('Please select items.')\n );\n } else {\n try {\n foreach ($kstitemIds as $kstitemId) {\n $kstitem = Mage::getSingleton('bs_kst/kstitem')->load($kstitemId)\n ->setStatus($this->getRequest()->getParam('status'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d items were successfully updated.', count($kstitemIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_kst')->__('There was an error updating items.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }", "public function set_status ($status) {\n $this->status = $status;\n }", "public function setStatuses(array $statuses)\n {\n $this->statuses = array();\n\n $this->addStatuses($statuses);\n\n return $this;\n }", "public function setStatus($status)\r\n {\r\n $this->status = $status;\r\n }", "public function updateStatus()\n {\n $this->status = Cart::CART_STATUS_ORDERED;\n $this->save();\n }", "function wcfm_wcfmmarketplace_order_mark_shipped() {\r\n\t\tglobal $WCFM, $WCFMu, $woocommerce, $wpdb;\r\n\t\t\r\n\t\t$user_id = apply_filters( 'wcfm_current_vendor_id', get_current_user_id() );\r\n\t\t\r\n\t\tif ( !empty( $_POST['orderid'] ) ) {\r\n\t\t\t$order_id = $_POST['orderid']; \r\n\t\t\t$order = wc_get_order( $order_id );\r\n\t\t\t$product_id = absint( $_POST['productid'] );\r\n\t\t\t$tracking_url = $_POST['tracking_url'];\r\n\t\t\t$tracking_code = $_POST['tracking_code'];\r\n $order_item_id = $_POST['orderitemid'];\r\n \r\n $tracking_url = apply_filters( 'wcfm_tracking_url', $tracking_url, $tracking_code, $order_id );\r\n \r\n if( wcfm_is_vendor() ) {\r\n\t\t\t\t$wpdb->query(\"UPDATE {$wpdb->prefix}wcfm_marketplace_orders SET commission_status = 'shipped', shipping_status = 'shipped' WHERE order_id = $order_id and vendor_id = $user_id and item_id = $order_item_id\");\r\n\t\t\t\t$shop_name = $WCFM->wcfm_vendor_support->wcfm_get_vendor_store_by_vendor( absint($user_id) );\r\n\t\t\t\t$wcfm_messages = sprintf( __( 'Vendor <b>%s</b> has shipped <b>%s</b> to customer.<br/>Tracking Code : %s <br/>Tracking URL : <a class=\"wcfm_dashboard_item_title\" target=\"_blank\" href=\"%s\">%s</a>', 'wc-frontend-manager-ultimate' ), $shop_name, get_the_title( $product_id ), $tracking_code, $tracking_url, $tracking_url );\r\n \t$WCFM->wcfm_notification->wcfm_send_direct_message( $user_id, 0, 0, 1, $wcfm_messages, 'shipment_tracking' );\r\n \t$comment_id = $order->add_order_note( $wcfm_messages, '1');\r\n\t\t\t\tadd_comment_meta( $comment_id, '_vendor_id', $user_id );\r\n\t\t\t} else {\r\n\t\t\t\t$comment_id = $order->add_order_note( sprintf( __( 'Product <b>%s</b> has been shipped to customer.<br/>Tracking Code : %s <br/>Tracking URL : <a href=\"%s\">%s</a>', 'wc-frontend-manager-ultimate' ), get_the_title( $product_id ), $tracking_code, $tracking_url, $tracking_url ), '1');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Update Shipping Tracking Info\r\n\t\t\t$this->updateShippingTrackingInfo( $order_id, $order_item_id, $tracking_code, $tracking_url, $product_id );\r\n\t\t\t\r\n\t\t\tdo_action( 'wcfm_after_order_mark_shipped', $order_id, $order_item_id, $tracking_code, $tracking_url, $product_id );\r\n\t\t}\r\n\t\tdie;\r\n\t}", "function hook_commerce_invoice_statuses_alter(&$statuses) {\n // Remove a status.\n unset($statuses[Invoice::STATUS_REFUND_PENDING]);\n // Add a status.\n $statuses['past_due'] = t('Past due');\n}", "public function status($status)\n {\n $ids = Request::get(\"id\");\n\n $ids = is_array($ids) ? $ids : [$ids];\n\n foreach ($ids as $id) {\n\n $activity = TenderActivity::findOrFail($id);\n\n // Fire saving action\n Action::fire(\"activity.saving\", $activity);\n\n $activity->status = $status;\n $activity->save();\n\n // Fire saved action\n\n Action::fire(\"activity.saved\", $activity);\n }\n\n if ($status) {\n $message = trans(\"tenders::activities.events.activated\");\n } else {\n $message = trans(\"tenders::activities.events.deactivated\");\n }\n\n return Redirect::back()->with(\"message\", $message);\n }", "public function updateStatus(Request $request, Order $order)\n {\n $this->authorize('update', $order);\n $input = $request->input();\n\n $status = $order->fulfillment_status;\n\n foreach (Order::FULFILLMENT_STATUS_ARRAY as $key => $value) {\n if ($value === $input['status']) {\n $status = $key;\n }\n }\n\n //$order->history()->create(['order_id' => $order->id, 'old_status' => $order->fulfillment_status, 'new_status' => $status]);\n $order->fulfillment_status = $status;\n\n $order->save();\n\n $order = $order->fresh(['user', 'history']);\n\n return $this->respond($order);\n }", "public function setStatus($status) {\n if (is_string($status) && in_array($status, $this->_headers)) {\n $headers = array_flip($this->_headers);\n $this->_status = $headers[$status];\n } else if (is_int($status) && array_key_exists($status, $this->_headers)) {\n $this->_status = $status;\n }\n\n return $this;\n }", "public function setOrderStatus($transactionId, $statusId)\n {\n\n /**\n * TODO creates config for sending email\n */\n// $config = Shopware()->Plugins()->Frontend()->PilibabaPilipaySystem()->Config();\n// $sendStatusMail = (bool)$config->paymentStatusMail;\n\n $order = Shopware()->Modules()->Order();\n\n $sql = 'SELECT id\n FROM s_order\n WHERE transactionID=?\n AND status>=0';\n $orderId = Shopware()->Db()->fetchOne($sql, array(\n $transactionId\n ));\n\n $order = Shopware()->Modules()->Order();\n// $order->setOrderStatus($orderId, $statusId, $sendStatusMail);\n $order->setOrderStatus($orderId, $statusId);\n }", "abstract public function setStatus($status);", "function updatestatus() {\n global $_lib;\n\n $dataH = array();\n $dataH['ID'] = $this->transaction->ID;\n $dataH['RemittanceSequence'] = $this->transaction->RemittanceSequence;\n $dataH['RemittanceDaySequence'] = $this->transaction->RemittanceDaySequence;\n $dataH['RemittanceSendtDateTime'] = $_lib['sess']->get_session('Datetime');\n $dataH['RemittanceSendtPersonID'] = $_lib['sess']->get_person('PersonID');\n $dataH['RemittanceStatus'] = 'sent';\n \n #Disse mŒ fjernes nŒr vi har en godkjenningsprosess\n $dataH['RemittanceApprovedDateTime'] = $_lib['sess']->get_session('Datetime');\n $dataH['RemittanceApprovedPersonID'] = $_lib['sess']->get_person('PersonID');\n\n $_lib['storage']->store_record(array('data' => $dataH, 'table' => 'invoicein', 'debug' => false));\n }", "public function setStatus($status)\n {\n $this->status = $status;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n }", "function ostUpdateOrderStatus( $statusID, $status_name, $sort_order, $color, $bold, $italic ){\r\n\r\n\tdb_phquery('\r\n\t\tUPDATE ?#ORDER_STATUSES_TABLE SET '.LanguagesManager::sql_prepareFieldUpdate('status_name', $status_name).',sort_order=?, color=?, bold=?, italic=? \r\n\t\tWHERE statusID=?', $sort_order, $color, (int)$bold, (int)$italic, $statusID);\r\n}", "public function fetchShippingOrders($status, $date) {\n $f = $this->find('list', array(\n 'conditions' => array ('status' => $status, 'modified > ' => $date),\n 'fields' => array('id', 'id')\n ));\n return new ArrayIterator($f);\n }", "protected function setReceivedTransactionStatuses(): void\n {\n $txId = $this->postData['brq_transactions'];\n $statusCode = $this->postData['brq_statuscode'];\n\n if (empty($txId) || empty($statusCode)) {\n return;\n }\n\n $payment = $this->order->getPayment();\n\n $receivedTxStatuses = $payment->getAdditionalInformation(self::BUCKAROO_RECEIVED_TRANSACTIONS_STATUSES) ?? [];\n $receivedTxStatuses[$txId] = $statusCode;\n\n $payment->setAdditionalInformation(self::BUCKAROO_RECEIVED_TRANSACTIONS_STATUSES, $receivedTxStatuses);\n }", "public function setStatus(NostoOrderStatusInterface $status)\n {\n $this->status = $status;\n }", "function update_status()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t\n\t\tif(!empty($data['t']) && !empty($data['list'])) $response = $this->_tender->update_status($data['t'], explode('--',$data['list']));\n\t\t\n\t\t# all good\n\t\tif(!empty($response) && $response['boolean']){\n\t\t\t$data['msg'] = 'The Invitation for Bids/Quotations status has been updated.';\n\t\t\t$data['area'] = 'refresh_list_msg';\n\t\t} \n\t\t# there was an error\n\t\telse {\n\t\t\t$data['msg'] = (!empty($data['t']) && !empty($data['list']))? 'ERROR: There was an error updating the Invitation for Bids/Quotations status.': 'ERROR: This action can not be resolved';\n\t\t\t$data['area'] = 'basic_msg';\n\t\t}\n\t\t\n\t\t$this->load->view('addons/basic_addons', $data);\n\t}", "protected function setStatus($status)\n {\n $this->file->set('status', $status);\n }", "public function getOrdersByStatus($stt){\n $selected_status = self::parseOrderStatusName($stt);\n \n $data = Orders::where('status', $selected_status)->paginate(10);\n return view('dashboard.orders',['orders' => $data, 'list_status' => $this->order->list_status, 'selected_status' => $selected_status]);\n }", "public function setStatus($status)\n {\n if (!is_null($status))\n $this->status = $status;\n }", "public function setMapOrderStatuses(array $data)\n {\n $data = array_filter($data);\n\n $this->map_order_statuses = $data;\n $this->setSettingValue('retailcrm_map_order_statuses', $data, true);\n }", "public function massStatusAction()\n {\n $offermanagerIds = $this->getRequest()->getParam('offermanager');\n if (!is_array($offermanagerIds)) {\n Mage::getSingleton('adminhtml/session')->addError($this->__('Please select Offer(s)'));\n } else {\n try {\n foreach ($offermanagerIds as $offermanagerId) {\n $offermanager = Mage::getSingleton('offermanager/offermanager')\n ->load($offermanagerId)\n ->setStatus($this->getRequest()->getParam('status'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d record(s) were successfully updated', count($offermanagerIds))\n );\n } catch (Exception $e) {\n $this->_getSession()->addError($e->getMessage());\n }\n }\n $this->_redirect('*/*/index');\n }", "public function setHistoryStatuses(array $statuses)\n {\n $this->historyStatuses = array();\n foreach ($statuses as $status) {\n $this->addHistoryStatus($status);\n }\n }", "function jx_mark_delivered_status_for_courier_traspost()\r\n\t{\r\n\t\t$user=$this->erpm->auth();\r\n\t\t\r\n\t\tif(!$_POST)\r\n\t\t\tdie();\r\n\t\t\r\n\t\t$send_log_id=$this->input->post('send_log_id');\r\n\t\t$invoices_list=$this->input->post('delivered');\r\n\t\t$received_by=$this->input->post('received_by');\r\n\t\t$received_on=$this->input->post('received_on');\r\n\t\t$contact_no=$this->input->post('contact_no');\r\n\t\t\r\n\t\tif($invoices_list)\r\n\t\t{\r\n\t\t\tforeach($invoices_list as $i=>$incoice)\r\n\t\t\t{\r\n\t\t\t\t$param=array();\r\n\t\t\t\t$param['sent_log_id']=$send_log_id;\r\n\t\t\t\t$param['invoice_no']=$incoice;\r\n\t\t\t\t$param['status']=3;\r\n\t\t\t\t$param['received_by']=$received_by[$i];\r\n\t\t\t\t$param['received_on']=$received_on[$i];\r\n\t\t\t\t$param['contact_no']=$contact_no[$i];\r\n\t\t\t\t$param['logged_on']=cur_datetime();\r\n\t\t\t\t$param['logged_by']=$user['userid'];\r\n\t\t\t\t\r\n\t\t\t\t$already=$this->db->query(\"select count(*) as ttl from pnh_invoice_transit_log where invoice_no=? and status=3\",array($incoice))->row()->ttl;\r\n\t\t\t\tif(!$already)\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->db->insert('pnh_invoice_transit_log',$param);\r\n\t\t\t\t\t$this->session->set_flashdata(\"erp_pop_info\",\"Selected invoices status to be updated\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$this->session->set_flashdata(\"erp_pop_info\",\"Selected invoices status already updated\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tredirect($_SERVER['HTTP_REFERER']);\r\n\t}", "public function getShippingStatus()\n {\n return $this->status ?: '';\n }", "public function setStatus( $status ) {\n\t\t$this->status = $status;\n\t}", "function wcfm_wcmarketplace_order_mark_shipped() {\r\n\t\tglobal $WCFM, $WCFMu, $woocommerce, $wpdb;\r\n\t\t\r\n\t\t$user_id = apply_filters( 'wcfm_current_vendor_id', get_current_user_id() );\r\n\t\t\r\n\t\tif ( !empty( $_POST['orderid'] ) ) {\r\n\t\t\t$order_id = $_POST['orderid']; \r\n\t\t\t$order = wc_get_order( $order_id );\r\n\t\t\t$product_id = absint( $_POST['productid'] );\r\n\t\t\t$tracking_url = $_POST['tracking_url'];\r\n\t\t\t$tracking_code = $_POST['tracking_code'];\r\n $order_item_id = $_POST['orderitemid'];\r\n \r\n $tracking_url = apply_filters( 'wcfm_tracking_url', $tracking_url, $tracking_code, $order_id );\r\n \r\n if( wcfm_is_vendor() ) {\r\n \t$vendor = get_wcmp_vendor($user_id);\r\n\t\t\t\t$user_id = apply_filters('wcmp_mark_as_shipped_vendor', $user_id);\r\n\t\t\t\t$shippers = (array) get_post_meta($order_id, 'dc_pv_shipped', true);\r\n\t\t\t\t\r\n\t\t\t\tif (!in_array($user_id, $shippers)) {\r\n\t\t\t\t\t$shippers[] = $user_id;\r\n\t\t\t\t\t//$mails = WC()->mailer()->emails['WC_Email_Notify_Shipped'];\r\n\t\t\t\t\t//if (!empty($mails)) {\r\n\t\t\t\t\t\t//$customer_email = get_post_meta($order_id, '_billing_email', true);\r\n\t\t\t\t\t\t//$mails->trigger($order_id, $customer_email, $vendor->term_id, array( 'tracking_code' => $tracking_code, 'tracking_url' => $tracking_url ) );\r\n\t\t\t\t\t//}\r\n\t\t\t\t\tdo_action('wcmp_vendors_vendor_ship', $order_id, $vendor->term_id);\r\n\t\t\t\t\tarray_push($shippers, $user_id);\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t$wpdb->query(\"UPDATE {$wpdb->prefix}wcmp_vendor_orders SET shipping_status = '1' WHERE order_id = $order_id and vendor_id = $user_id and order_item_id = $order_item_id\");\r\n\t\t\t\t$shop_name = $WCFM->wcfm_vendor_support->wcfm_get_vendor_store_by_vendor( absint($user_id) );\r\n\t\t\t\t$wcfm_messages = sprintf( __( 'Vendor <b>%s</b> has shipped <b>%s</b> to customer.<br/>Tracking Code : %s <br/>Tracking URL : <a class=\"wcfm_dashboard_item_title\" target=\"_blank\" href=\"%s\">%s</a>', 'wc-frontend-manager-ultimate' ), $shop_name, get_the_title( $product_id ), $tracking_code, $tracking_url, $tracking_url );\r\n \t$WCFM->wcfm_notification->wcfm_send_direct_message( $user_id, 0, 0, 1, $wcfm_messages, 'shipment_tracking' );\r\n \t$comment_id = $order->add_order_note( $wcfm_messages, '1');\r\n\t\t\t\tadd_comment_meta( $comment_id, '_vendor_id', $user_id );\r\n\t\t\t\t\r\n\t\t\t\tupdate_post_meta($order_id, 'dc_pv_shipped', $shippers);\r\n\t\t\t} else {\r\n\t\t\t\t$comment_id = $order->add_order_note( sprintf( __( 'Product <b>%s</b> has been shipped to customer.<br/>Tracking Code : %s <br/>Tracking URL : <a href=\"%s\">%s</a>', 'wc-frontend-manager-ultimate' ), get_the_title( $product_id ), $tracking_code, $tracking_url, $tracking_url ), '1');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Update Shipping Tracking Info\r\n\t\t\t$this->updateShippingTrackingInfo( $order_id, $order_item_id, $tracking_code, $tracking_url, $product_id );\r\n\t\t\t\r\n\t\t\tdo_action( 'wcfm_after_order_mark_shipped', $order_id, $order_item_id, $tracking_code, $tracking_url, $product_id );\r\n\t\t}\r\n\t\tdie;\r\n\t}", "protected function setShipment(array $value)\n {\n $this->shipment = $value;\n }", "public function massStatusAction()\n {\n $reviewsIds = $this->getRequest()->getParam('salesreport');\n if(!is_array($reviewsIds)) {\n Mage::getSingleton('adminhtml/session')->addError($this->__('Please select item(s)'));\n } else {\n try {\n foreach ($reviewsIds as $reviewId) {\n $review = Mage::getSingleton('salesreport/review')\n ->load($reviewId)\n ->setStatusId($this->getRequest()->getParam('status'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d record(s) were successfully updated', count($reviewsIds))\n );\n } catch (Exception $e) {\n $this->_getSession()->addError($e->getMessage());\n }\n }\n $this->_redirect('*/*/index');\n }", "public function changeOrderStatus(){\r\n $cookies = new CookieModel();\r\n $cookie_id = $cookies -> read();\r\n $Form = M('userinfo');\r\n $condition_in['stuid'] = $cookie_id;\r\n $data = $Form->where($condition_in)->find();\r\n if (! $data['manager']) $this->redirect('/');\r\n \t$key = $_REQUEST['id'];\r\n \t//$key = 2;\r\n \t$condition['id'] = $key;\r\n \t$form = M(\"orderinfo\");\r\n \t$data = $form->where($condition)->find();\r\n \t//echo $data;\r\n \tif ($data['status'] == \"下单成功\") $data['status'] = \"烹饪中\";\r\n \telse if ($data['status'] == \"烹饪中\") $data['status'] = \"送餐途中\"; \r\n \telse if ($data['status'] == \"送餐途中\") $data['status'] = \"餐已收到\";\r\n \t$form->save($data);\r\n \t//$this->display();\r\n }", "public function admin_changestatus($id, $status) {\n $this->checkadmin();\n $this->request->data['Shippingrate']['sid'] = $id;\n $this->request->data['Shippingrate']['status'] = $status;\n $this->Shippingrate->save($this->request->data);\n $this->Session->setFlash('<div class=\"success msg\">' . __('Status updated successfully') . '.</div>', '');\n $this->redirect(array('action' => 'index'));\n }", "public function setStatus($status)\n\t{\n\t\t$this->status = $status;\n\t}", "function setStatus($status) {\n\t\treturn $this->setData('status', $status);\n\t}", "public function shippingOrder()\n {\n $order = Order::where('id', request()->order_id)->firstOrFail();\n $order->update([\n 'status' => 3,\n 'tracking_number' => request()->tracking_number,\n ]);\n Mail::to($order->customer->email)->send(new OrderMail($order));\n\n return back()->withToastSuccess('Mail Sent');\n }", "public function _update_order_status( $order, $timeline ) {\n\t\t$prev_status = $order->get_meta( '_coinbase_status' );\n\n\t\t$last_update = end( $timeline );\n\t\t$status = $last_update['status'];\n\t\tif ( $status !== $prev_status ) {\n\t\t\t$order->update_meta_data( '_coinbase_status', $status );\n\n\t\t\tif ( 'EXPIRED' === $status && 'pending' == $order->get_status() ) {\n\t\t\t\t$order->update_status( 'cancelled', __( 'Coinbase payment expired.', 'coinbase' ) );\n\t\t\t} elseif ( 'CANCELED' === $status ) {\n\t\t\t\t$order->update_status( 'cancelled', __( 'Coinbase payment cancelled.', 'coinbase' ) );\n\t\t\t} elseif ( 'UNRESOLVED' === $status ) {\n\t\t\t\tif ('OVERPAID' === $last_update['context']) {\n\t\t\t\t\t$order->update_status( 'processing', __( 'Coinbase payment was successfully processed.', 'coinbase' ) );\n\t\t\t\t\t$order->payment_complete();\n\t\t\t\t} else {\n\t\t\t\t\t// translators: Coinbase error status for \"unresolved\" payment. Includes error status.\n\t\t\t\t\t$order->update_status( 'failed', sprintf( __( 'Coinbase payment unresolved, reason: %s.', 'coinbase' ), $last_update['context'] ) );\n\t\t\t\t}\n\t\t\t} elseif ( 'PENDING' === $status ) {\n\t\t\t\t$order->update_status( 'blockchainpending', __( 'Coinbase payment detected, but awaiting blockchain confirmation.', 'coinbase' ) );\n\t\t\t} elseif ( 'RESOLVED' === $status ) {\n\t\t\t\t// We don't know the resolution, so don't change order status.\n\t\t\t\t$order->add_order_note( __( 'Coinbase payment marked as resolved.', 'coinbase' ) );\n\t\t\t} elseif ( 'COMPLETED' === $status ) {\n\t\t\t\t$order->update_status( 'processing', __( 'Coinbase payment was successfully processed.', 'coinbase' ) );\n\t\t\t\t$order->payment_complete();\n\t\t\t}\n\t\t}\n\n\t\t// Archive if in a resolved state and idle more than timeout.\n\t\tif ( in_array( $status, array( 'EXPIRED', 'COMPLETED', 'RESOLVED' ), true ) &&\n\t\t\t$order->get_date_modified() < $this->timeout ) {\n\t\t\tself::log( 'Archiving order: ' . $order->get_order_number() );\n\t\t\t$order->update_meta_data( '_coinbase_archived', true );\n\t\t}\n\t}", "function setStatus($status) \n {\n return $this->instance->setStatus($status);\n }", "private function shipping_batch()\n\t{\n\t\t// load the sync db\n\t\tee()->sync_db = ee()->load->database('sync_db', true);\n\n\t\t// find the most recent unprocessed shipments\n\t\t$query = ee()->sync_db->where('processed !=', '1')->order_by('id', 'asc')->get('orders_shipping', 200);\n\n\t\t// create arrays for shipment ids and tracking numbers\n\t\t$ids_processed = array();\n\n\t\t// find our shipped status\n\t\t$status = Store\\Model\\Status::where('name', 'Shipped')->first();\n\n\t\t// load the order_map config file\n\t\tinclude_once dirname(dirname(__FILE__)).'/bmi_custom/config/order_map.php';\n\n\t\t// loop through each shipment\n\t\tforeach($query->result() as $shipment)\n\t\t{\n\t\t\t// add id to the processed array\n\t\t\t$ids_processed[] = $shipment->id;\n\n\t\t\tif(!empty($shipping_carriers[$shipment->carrier]))\n\t\t\t{\n\t\t\t\t$tracking = $shipping_carriers[$shipment->carrier] .'|'. $shipment->tracking_number;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$tracking = $shipment->tracking_number;\n\t\t\t}\t\n\n\t\t\t// update the status of each order with the tracking numbers\n\t\t\t$order_object = Store\\Model\\Order::find($shipment->order_id);\n\t\t\t$order_object->updateStatus($status, 0, $tracking);\n\n\t\t}\n\n\t\t// update the shipment records to indicate they've been processed\n\t\tif(count($ids_processed) > 0)\n\t\t{\n\t\t\tee()->sync_db->where_in('id', $ids_processed)->set('processed', 1)->update('orders_shipping');\n\t\t}\t\n\t\t\n\t\t\n\t}", "private function setStatus($status)\n {\n $this->status = $status;\n }", "public function massStatusAction()\n {\n $aircraftIds = $this->getRequest()->getParam('aircraft');\n if (!is_array($aircraftIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_misc')->__('Please select aircraft.')\n );\n } else {\n try {\n foreach ($aircraftIds as $aircraftId) {\n $aircraft = Mage::getSingleton('bs_misc/aircraft')->load($aircraftId)\n ->setStatus($this->getRequest()->getParam('status'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d aircraft were successfully updated.', count($aircraftIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_misc')->__('There was an error updating aircraft.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }", "public function setShipped($id){\n $this->upd(\"orders\", array(\"shipped\" => \"yes\"), array(\"order_id\" => $id));\n }", "public function setStatus($value)\n {\n $this->validateInt('Status', $value);\n $this->validateNotNull('Status', $value);\n\n if ($this->data['status'] === $value) {\n return;\n }\n\n $this->data['status'] = $value;\n $this->setModified('status');\n }", "public function setStatus($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->status !== $v) {\n $this->status = $v;\n $this->modifiedColumns[OrdrhedTableMap::COL_STATUS] = true;\n }\n\n return $this;\n }", "function setStatus($status) {\n $this->checkChange();\n\n // Check allowed values.\n if (!in_array($status, array(UserpointsTransaction::STATUS_APPROVED, UserpointsTransaction::STATUS_DECLINED, UserpointsTransaction::STATUS_PENDING))) {\n $this->abort();\n throw new UserpointsChangeException(t('Invalid status'));\n }\n\n if ($this->txn_id > 0) {\n // Preserve the original status to be able to check if changes in this\n // transaction are still allowed.\n $this->orig_status = $this->getStatus();\n }\n\n $this->status = $status;\n return $this;\n }", "public function byStatus($status = false) {\n $result = new \\StdClass;\n $result->items = array();\n $query = $this->shipsList->orderBy('created_at', 'desc');\n if (!$status) {\n $query->where('status', 1);\n }\n $ship = $query->with();\n $result->items = $ships->all();\n\n return $result;\n }", "public function update_shipping_status(){\n\t\t\t\n\t\t\t$this->load->library('form_validation');\n\t\t\t\t\n\t\t\t$this->form_validation->set_error_delimiters('<div class=\"alert alert-danger text-danger text-center\"><i class=\"fa fa-exclamation-triangle\" aria-hidden=\"true\"></i> ', '</div>');\n\t\t\t\n\t\t\t$this->form_validation->set_rules('status_description','Status Description','required|trim|xss_clean');\n\t\t\t\n\t\t\t$this->form_validation->set_rules('location','Location','required|trim|xss_clean');\n\t\t\t$this->form_validation->set_rules('customer_email','Customer Email','required|trim|xss_clean|valid_email');\n\t\t\t//$this->form_validation->set_rules('status_date','Status Date','required|trim|xss_clean');\n\t\t\t\n\t\t\t\t\t\t\n\t\t\t$this->form_validation->set_message('required', '%s cannot be blank!');\n\t\t\t\n\t\t\t\t\n\t\t\tif ($this->form_validation->run()){\n\t\t\t\t\n\t\t\t\t//escaping the post values\n\t\t\t\t$status_id = html_escape($this->input->post('status_id'));\n\t\t\t\t$id = preg_replace('#[^0-9]#i', '', $status_id); // filter everything but numbers\n\t\t\t\t\n\t\t\t\t//SHIPPING DATA FROM POST\n\t\t\t\t$update = array(\n\t\t\t\t\t'status_description' => $this->input->post('status_description'),\n\t\t\t\t\t'location' => $this->input->post('location'),\n\t\t\t\t\t'customer_email' => $this->input->post('customer_email'),\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t//IF TRUE, UPDATE DB\n\t\t\t\tif ($this->Shipping_status->update_status($update, $id)){\n\t\t\t\t\t\t\n\t\t\t\t\t$username = $this->session->userdata('admin_username');\n\t\t\t\t\t$user_array = $this->Admin->get_user($username);\n\t\t\t\t\t\t\n\t\t\t\t\t$fullname = '';\n\t\t\t\t\tif($user_array){\n\t\t\t\t\t\tforeach($user_array as $user){\n\t\t\t\t\t\t\t$fullname = $user->admin_name;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//update page metadata table\n\t\t\t\t\t$description = 'updated shipping status';\n\t\t\t\t\t\n\t\t\t\t\t$activity = array(\t\t\t\n\t\t\t\t\t\t'name' => $fullname,\n\t\t\t\t\t\t'username' => $username,\n\t\t\t\t\t\t'description' => $description,\n\t\t\t\t\t\t'keyword' => 'Shipping',\n\t\t\t\t\t\t'activity_time' => date('Y-m-d H:i:s'),\n\t\t\t\t\t);\n\t\t\t\t\t\t\t\n\t\t\t\t\t$this->Site_activities->insert_activity($activity);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t$data['success'] = true;\n\t\t\t\t\t$data['notif'] = '<div class=\"alert alert-success text-center\" role=\"alert\"> <i class=\"fa fa-check-circle\"></i><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">&times;</button> Shipping status has been updated!</div>';\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}else {\n\t\t\t\t\n\t\t\t\t$data['success'] = false;\n\t\t\t\t$data['notif'] = '<div class=\"alert alert-danger text-center\" role=\"alert\"><i class=\"fa fa-ban\"></i><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">&times;</button> There are errors on the form!'.validation_errors().'</div>';\n\t\t\t}\n\t\t\t\n\t\t\t// Encode the data into JSON\n\t\t\t$this->output->set_content_type('application/json');\n\t\t\t$data = json_encode($data);\n\n\t\t\t// Send the data back to the client\n\t\t\t$this->output->set_output($data);\n\t\t\t//echo json_encode($data);\t\t\t\n\t\t}", "public static function set_email_template_status() {\n\n check_ajax_referer('email-template-status', 'rac_security');\n\n if (isset($_POST['row_id']) && isset($_POST['status'])) {\n $requesting_state = $_POST['status'];\n $post_id = $_POST['row_id'];\n $status = $requesting_state != 'ACTIVE' ? 'racactive' : 'racinactive';\n $new_status = $requesting_state != 'ACTIVE' ? 'ACTIVE' : 'NOTACTIVE';\n $args = array(\n 'ID' => $post_id,\n 'post_status' => $status\n );\n\n wp_update_post($args);\n echo $new_status;\n }\n exit();\n }", "public function setStatus(string $status): void;", "public function setStatus($var)\n {\n GPBUtil::checkString($var, True);\n $this->status = $var;\n\n return $this;\n }", "public function setStatus($var)\n {\n GPBUtil::checkString($var, True);\n $this->status = $var;\n\n return $this;\n }", "public static function onSaleDeliveryOrderHandler($orderId, $status)\n\t{\n\t\tif ($status == 'Y')\n\t\t{\n\t\t\t$statusName = \"F_DELIVERY\";\n\t\t\tstatic::addOrderProcessing($orderId, $statusName);\n\t\t}\n\t}", "public function massStatusAction()\n {\n $offerIds = $this->getRequest()->getParam('offer');\n if (!is_array($offerIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('mfb_myflyingbox')->__('Please select offers.')\n );\n } else {\n try {\n foreach ($offerIds as $offerId) {\n $offer = Mage::getSingleton('mfb_myflyingbox/offer')->load($offerId)\n ->setStatus($this->getRequest()->getParam('status'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d offers were successfully updated.', count($offerIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('mfb_myflyingbox')->__('There was an error updating offers.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }", "public function setStatus(bool $status);" ]
[ "0.6481788", "0.63824666", "0.6179867", "0.5871015", "0.579246", "0.576576", "0.57303244", "0.57077485", "0.5579207", "0.554815", "0.55355406", "0.5423476", "0.5419731", "0.5419731", "0.5372429", "0.53558856", "0.53558856", "0.53139114", "0.5309346", "0.52811223", "0.5279696", "0.526628", "0.5239815", "0.52391654", "0.5229757", "0.5229591", "0.522724", "0.52180624", "0.5197679", "0.5197071", "0.51866555", "0.5166484", "0.515859", "0.5148438", "0.51404315", "0.51248646", "0.51228595", "0.5121269", "0.5118599", "0.51174474", "0.51158017", "0.5098481", "0.50958896", "0.5089925", "0.50878185", "0.5085191", "0.5083471", "0.5080336", "0.5077695", "0.50743675", "0.50725746", "0.50717574", "0.5071673", "0.5067759", "0.50639886", "0.50625265", "0.50561595", "0.50561595", "0.50561595", "0.50561595", "0.5047521", "0.5047266", "0.50407815", "0.50405973", "0.5039972", "0.5033722", "0.5033399", "0.50258136", "0.5024815", "0.5003522", "0.5001226", "0.50008535", "0.4996875", "0.4994689", "0.49926716", "0.49888185", "0.49812904", "0.4975019", "0.49721992", "0.4965912", "0.49648568", "0.49565604", "0.4954825", "0.49541163", "0.4952337", "0.4950686", "0.49478036", "0.49449763", "0.49418557", "0.49413309", "0.49316055", "0.4930265", "0.492996", "0.49288276", "0.49200118", "0.49120268", "0.49120268", "0.49103516", "0.49099633", "0.4904113" ]
0.7217934
0
Removes order status options. Use this in case you change your mind and want to remove the TFM Shipment Status parameters you previously set.
public function resetTfmShipmentStatusFilter() { foreach ($this->options as $op => $junk) { if (preg_match("#TFMShipmentStatus#", $op)) { unset($this->options[$op]); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function resetOrderStatusFilter()\n {\n foreach ($this->options as $op => $junk) {\n if (preg_match(\"#OrderStatus#\", $op)) {\n unset($this->options[$op]);\n }\n }\n }", "public function remove_status( $order, $status ) {\n\n\t\treturn delete_post_meta( SV_WC_Order_Compatibility::get_prop( $order, 'id' ), '_wc_avatax_status', $status );\n\t}", "public function deleteStatus()\n {\n $order_status = new OrderState((int)ConfPPM::getConf('status_paysto'));\n if (Validate::isLoadedObject($order_status)) {\n $order_status->delete();\n }\n }", "public function resetReportStatuses()\n {\n foreach ($this->options as $op => $junk) {\n if (preg_match('#ReportProcessingStatusList#', $op)) {\n unset($this->options[$op]);\n }\n }\n }", "public function unsetStatus(): void\n {\n $this->status = [];\n }", "function gf_remove_processing_status($statuses){\n if(isset($statuses['wc-processing'])){\n unset($statuses['wc-processing']);\n }\n if(isset($statuses['wc-pending'])){\n unset($statuses['wc-pending']);\n }\n if(isset($statuses['wc-cancelled'])){\n unset($statuses['wc-cancelled']);\n }\n if(isset($statuses['wc-failed'])){\n unset($statuses['wc-failed']);\n }\n return $statuses;\n}", "public function destroy(OrderStatus $orderStatus)\n {\n //\n }", "public function destroy(StatusOrder $statusOrder)\n {\n //\n }", "public function deletePreOrderStatus()\n {\n $connection = $this->getConnection();\n $connection->delete(\n $this->getTable('sales_order_status'),\n ['status = ?' => \"pending_preorder\"]\n );\n $connection->delete(\n $this->getTable('sales_order_status'),\n ['status = ?' => \"processing_preorder\"]\n );\n }", "public function remove()\n {\n // MODULE_PAYMENT_SHOPGATE_ORDER_STATUS_ID - Keep this on removing for old installation\n xtc_db_query(\n \"delete from \" . TABLE_CONFIGURATION\n . \" where configuration_key in ('MODULE_PAYMENT_SHOPGATE_STATUS', 'MODULE_PAYMENT_SHOPGATE_ALLOWED', 'MODULE_PAYMENT_SHOPGATE_SORT_ORDER', 'MODULE_PAYMENT_SHOPGATE_ORDER_STATUS_ID')\"\n );\n }", "public static function deactivate() {\n\t\tif (Plus_admin::gs('resetsettings_status')){\n\t\t\tdelete_option('cs_plusadmin_settings');\n\t\t\tdelete_option('cs_plus_admin_lpm_settings');\n\t\t\tdelete_option('cs_plus_admin_amm_settings');\n\t\t\tdelete_option('cs_plusadmin_adminmenu');\n\t\t\tdelete_option('cs_plusadmin_adminsubmenu');\n\t\t\tdelete_option('cs_plusadmin_status');\n\t\t}\n\t}", "protected function _setDefaultOrderStatuses() {\n $completedOrderStatusId = $this->registry->get('model_extension_payment_' . $this->_getPaymentMethodCode())->getOrderStatusByName($this->language->get('completed_order_status'));\n $failedOrderStatusId = $this->registry->get('model_extension_payment_' . $this->_getPaymentMethodCode())->getOrderStatusByName($this->language->get('cancelled_order_status'));\n $partialRefundedOrderStatusId = $this->registry->get('model_extension_payment_' . $this->_getPaymentMethodCode())->getOrderStatusByName($this->language->get('partial_refunded_order_status'));\n $refundedOrderStatusId = $this->registry->get('model_extension_payment_' . $this->_getPaymentMethodCode())->getOrderStatusByName($this->language->get('refunded_order_status'));\n\n if ($completedOrderStatusId) {\n $this->registry->get('model_extension_payment_' . $this->_getPaymentMethodCode())->addSettingValue('payment_'.$this->_getPaymentMethodCode(), 'payment_'.$this->_getPaymentMethodCode().'_order_completed_status_id', $completedOrderStatusId, $this->config->get('config_store_id'));\n }\n if ($failedOrderStatusId) {\n $this->registry->get('model_extension_payment_' . $this->_getPaymentMethodCode())->addSettingValue('payment_'.$this->_getPaymentMethodCode(), 'payment_'.$this->_getPaymentMethodCode().'_order_failed_status_id', $failedOrderStatusId, $this->config->get('config_store_id'));\n }\n if ($partialRefundedOrderStatusId) {\n $this->registry->get('model_extension_payment_' . $this->_getPaymentMethodCode())->addSettingValue('payment_'.$this->_getPaymentMethodCode(), 'payment_'.$this->_getPaymentMethodCode().'_order_partial_refunded_status_id', $partialRefundedOrderStatusId, $this->config->get('config_store_id'));\n }\n if ($refundedOrderStatusId) {\n $this->registry->get('model_extension_payment_' . $this->_getPaymentMethodCode())->addSettingValue('payment_'.$this->_getPaymentMethodCode(), 'payment_'.$this->_getPaymentMethodCode().'_order_refunded_status_id', $refundedOrderStatusId, $this->config->get('config_store_id'));\n }\n $this->cache->delete(\"order_status.\" . (int)$this->config->get('config_language_id'));\n }", "public function statusOptions()\n\t{\n\t\treturn array('pending', 'processing', 'complete', 'on_hold');\n\t}", "public function update_status($_order)\n {\n $note = __('Status via reminder plugin automatisch geändert', 'bbb-bac-reminder');\n\n return $_order->update_status('cancelled', $note);\n }", "private function deletePaymentStatus()\n {\n $sql = \"DELETE FROM s_core_states WHERE `group` = 'payment' AND\n id IN (1750, 1751, 1752, 1753)\";\n Shopware()->Db()->query($sql);\n $sql = \"DELETE FROM s_core_snippets WHERE name in ('in_review',\"\n . \"'pre_authorization_of_payment', 'payment_accepted', \"\n . \"'refund')\";\n Shopware()->Db()->query($sql);\n }", "public function remove_options()\n {\n }", "public function delete(OrderStatus $orderStatus): JsonResponse\n {\n\n try {\n\n $item = $this->orderStatusService->find($orderStatus);\n\n return $this->sendResource(new OrderStatusResource($item));\n\n } catch (Exception $exception) {\n\n return $this->sendError('Server Error.', $exception);\n\n }\n }", "public function delete() {\n $this->load->auto('localisation/orderstatus');\n if (($this->request->server['REQUEST_METHOD'] == 'POST')) {\n foreach ($this->request->post['selected'] as $id) {\n $this->modelOrderstatus->delete($id);\n }\n } else {\n $this->modelOrderstatus->delete($_GET['id']);\n }\n }", "public function actionAjaxServiceTypeStatusDeactivate()\n {\n $id=$_REQUEST['id'];\n \t $rec=ServiceTypes::model()->findByPk($id);\n \t $status=$rec->status;\n \n if($status==1)\n {\n \t $rec->status=0;\n \t $rec->save(false);\n\n }\t\n else\n {\n \t $rec->status=1;\n \t $rec->save();\n\n }\n\n\n }", "public function changeStatus($orderId=null,$status=null){\n $allowedStatuses = ShopCore::$orderStatuses;\n if(!$orderId){\n $orderId = (int)$_POST['id'];\n }\n if(!$status){\n $status = $_POST['status'];\n }\n $order = new DBObject('sr_shop_order',$orderId);\n\n if(!$order->id){\n $this->sendJSON(array('success'=>false,'message'=>'Product not found'));\n }\n if(!$allowedStatuses[$status]){\n $this->sendJSON(array('success'=>false,'message'=>'Product not found'));\n }\n if($order->get('status')==$status){\n $this->get($orderId);\n return;\n }\n switch ($order->get('status')){\n case 'new':\n case 'processing':\n switch($status){\n case 'shipped':\n case 'done':\n // -w\n //-r\n $this->updateWarehouse($orderId,-1,-1);\n if($status=='done' && $order->get('customer_id')!='0'){\n $this->updateDiscount($order->get('customer_id'),$order->get('total'));\n }\n break;\n case 'cancelled':\n //-r\n $this->updateWarehouse($orderId,0,-1);\n break;\n }\n break;\n case 'shipped':\n case 'done':\n if($order->get('status')=='done' && $order->get('customer_id')!='0'){\n $this->updateDiscount($order->get('customer_id'),$order->get('total'),true);\n }\n switch($status){\n case 'new':\n case 'processing':\n // +w\n // +r\n $this->updateWarehouse($orderId,1,1);\n break;\n case 'cancelled':\n //+w\n $this->updateWarehouse($orderId,1,0);\n break;\n }\n break;\n\n case 'cancelled':\n switch($status){\n case 'new':\n case 'processing':\n // +r\n $this->updateWarehouse($orderId,0,1);\n break;\n default:\n if(!$allowedStatuses[$status]){\n $this->sendJSON(array('success'=>false,'message'=>'Action denied'));\n }\n break;\n }\n break;\n }\n $order->set('status',$status);\n $order->save();\n $this->get($orderId);\n }", "public function add_valid_order_statuses( $statuses, $order ) {\n\t\t$payment_method = $order->get_payment_method();\n\t\tif ( in_array( $payment_method, WC_Swedbank_Plugin::PAYMENT_METHODS, true ) ) {\n\t\t\t$statuses = array_merge(\n\t\t\t\t$statuses,\n\t\t\t\tarray(\n\t\t\t\t\t'processing',\n\t\t\t\t\t'completed',\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\treturn $statuses;\n\t}", "public static function getOrderFormStatusChoices(): array\n {\n //====================================================================//\n // Load Prestashop Status List\n return array_merge_recursive(\n array(array(\n \"id_order_state\" => 0,\n \"name\" => \"Use Generic Status\",\n )),\n OrderState::getOrderStates(SLM::getDefaultLangId())\n );\n }", "public function removeHistoryStatusFilter()\n {\n $status = $this->helper()->getConfigData('sro_status_delayed');\n $trackList = $this->getRequestCollection();\n \n foreach ($trackList as $key => $track) {\n foreach ($track->getShipment()->getOrder()->getAllStatusHistory() as $history) {\n if ($status == $history->getData('status')) {\n Mage::log(\"{$track->getNumber()}: history found ({$status}) / ignored status\");\n $trackList->removeItemByKey($key);\n break;\n }\n }\n }\n \n $this->setLog(\"{$trackList->count()} never-delayed of {$this->getLog()}\");\n return $this->setRequestCollection($trackList);\n }", "public function getOrderStatuses()\n {\n $response = $this->client->request('GET', '/v1/settings/orderstatuses');\n return new GetOrderStatusesResponse($response);\n }", "function ostDeleteOrderStatus( $statusID )\r\n{\r\n\t$statusID = intval($statusID);\r\n\t$q = db_query(\"select count(*) from \".ORDERS_TABLE.\" where statusID=\".$statusID );\r\n\t$r = db_fetch_row( $q );\r\n\tif ( $r[0] != 0 )\r\n\treturn false;\r\n\tdb_query(\"delete from \".ORDER_STATUSES_TABLE.\r\n\t\t\" where statusID=$statusID\" );\r\n\treturn true;\r\n}", "public function _update_order_status( $order, $timeline ) {\n\t\t$prev_status = $order->get_meta( '_coinbase_status' );\n\n\t\t$last_update = end( $timeline );\n\t\t$status = $last_update['status'];\n\t\tif ( $status !== $prev_status ) {\n\t\t\t$order->update_meta_data( '_coinbase_status', $status );\n\n\t\t\tif ( 'EXPIRED' === $status && 'pending' == $order->get_status() ) {\n\t\t\t\t$order->update_status( 'cancelled', __( 'Coinbase payment expired.', 'coinbase' ) );\n\t\t\t} elseif ( 'CANCELED' === $status ) {\n\t\t\t\t$order->update_status( 'cancelled', __( 'Coinbase payment cancelled.', 'coinbase' ) );\n\t\t\t} elseif ( 'UNRESOLVED' === $status ) {\n\t\t\t\tif ('OVERPAID' === $last_update['context']) {\n\t\t\t\t\t$order->update_status( 'processing', __( 'Coinbase payment was successfully processed.', 'coinbase' ) );\n\t\t\t\t\t$order->payment_complete();\n\t\t\t\t} else {\n\t\t\t\t\t// translators: Coinbase error status for \"unresolved\" payment. Includes error status.\n\t\t\t\t\t$order->update_status( 'failed', sprintf( __( 'Coinbase payment unresolved, reason: %s.', 'coinbase' ), $last_update['context'] ) );\n\t\t\t\t}\n\t\t\t} elseif ( 'PENDING' === $status ) {\n\t\t\t\t$order->update_status( 'blockchainpending', __( 'Coinbase payment detected, but awaiting blockchain confirmation.', 'coinbase' ) );\n\t\t\t} elseif ( 'RESOLVED' === $status ) {\n\t\t\t\t// We don't know the resolution, so don't change order status.\n\t\t\t\t$order->add_order_note( __( 'Coinbase payment marked as resolved.', 'coinbase' ) );\n\t\t\t} elseif ( 'COMPLETED' === $status ) {\n\t\t\t\t$order->update_status( 'processing', __( 'Coinbase payment was successfully processed.', 'coinbase' ) );\n\t\t\t\t$order->payment_complete();\n\t\t\t}\n\t\t}\n\n\t\t// Archive if in a resolved state and idle more than timeout.\n\t\tif ( in_array( $status, array( 'EXPIRED', 'COMPLETED', 'RESOLVED' ), true ) &&\n\t\t\t$order->get_date_modified() < $this->timeout ) {\n\t\t\tself::log( 'Archiving order: ' . $order->get_order_number() );\n\t\t\t$order->update_meta_data( '_coinbase_archived', true );\n\t\t}\n\t}", "public function destroy(status $status)\n {\n //\n }", "protected function _fcpoSetOrderStatus() {\n $blIsAmazonPending = $this->_oFcpoHelper->fcpoGetSessionVariable('fcpoAmazonPayOrderIsPending');\n $blOrderOk = $this->_fcpoValidateOrderAgainstProblems();\n\n if ($blIsAmazonPending) {\n $this->_setOrderStatus('PENDING');\n $this->oxorder__oxfolder = new oxField('ORDERFOLDER_PROBLEMS', oxField::T_RAW);\n $this->save();\n } elseif ($blOrderOk === true) {\n // updating order trans status (success status)\n $this->_setOrderStatus('OK');\n } else {\n $this->_setOrderStatus('ERROR');\n }\n }", "public function hookpostUpdateOrderStatus($params)\n {\n $orderid = $params['id_order'];\n $order = new Order((int)$orderid);\n $statusid = ($order)? $order->current_state : '';\n if ($statusid == Configuration::get('PS_OS_SHIPPING') || $statusid == Configuration::get('PS_OS_DELIVERED')) {\n // For Shipment confirmation\n if ($statusid == Configuration::get('PS_OS_SHIPPING')) {\n $isActivate = $this->isRulesetActive('shipment_confirmation');\n }\n // For On Delivery confirmation\n if ($statusid == Configuration::get('PS_OS_DELIVERED')) {\n $isActivate = $this->isRulesetActive('on_delivery_confirmation');\n }\n if ($isActivate != null && $isActivate != '' && $this->smsAPI != null && $this->smsAPI != '') {\n $address = new Address((int)$order->id_address_delivery);\n if ($order) {\n $address = new Address((int)$order->id_address_delivery);\n $legendstemp = $this->replaceOrderLegends(\n $isActivate[0]['template'],\n $order,\n $address\n );\n // Use send SMS API here\n $legendstemp = preg_replace('/<br(\\s+)?\\/?>/i', \"\\n\", $legendstemp);\n $postAPIdata = array(\n 'label' => $isActivate[0]['label'],\n 'sms_text' => $legendstemp,\n 'source' => '21000',\n 'sender_id' => $isActivate[0]['senderid'],\n 'mobile_number' => $address->phone_mobile\n );\n $this->sendSMSByAPI($postAPIdata);\n Onehopsmsservice::onehopSaveLog($statusid, $legendstemp, $address->phone_mobile);\n }\n }\n }\n }", "function mfcs_get_request_status_list_options($option = NULL, $hidden = FALSE, $disabled = FALSE) {\n $options = array();\n $options_all = array();\n\n if ($hidden) {\n $options_all[MFCS_REQUEST_STATUS_NONE] = 'None';\n }\n\n $options_all[MFCS_REQUEST_STATUS_DELETED] = 'Deleted';\n $options_all[MFCS_REQUEST_STATUS_UNLOCKED] = 'Queued (Unlocked)';\n $options_all[MFCS_REQUEST_STATUS_LOCKED] = 'Queued (Locked)';\n $options_all[MFCS_REQUEST_STATUS_CLOSED_ACCEPTED] = 'Accepted';\n $options_all[MFCS_REQUEST_STATUS_CLOSED_DENIED] = 'Denied';\n $options_all[MFCS_REQUEST_STATUS_CLOSED_UNAVAILABLE] = 'Room Unavailable';\n $options_all[MFCS_REQUEST_STATUS_CLOSED_DUE_TO_LOCK] = 'Room Unavailable (due to lock)';\n $options_all[MFCS_REQUEST_STATUS_CANCELLED] = 'Cancelled';\n $options_all[MFCS_REQUEST_STATUS_CLOSED_ACCEPTED_CANCELLED] = 'Accepted (Cancelled)';\n\n if ($option == 'select') {\n $options[''] = '- Select -';\n }\n\n foreach ($options_all as $option_id => $option_name) {\n $options[$option_id] = $option_name;\n }\n\n if ($option == 'search') {\n unset($options[MFCS_REQUEST_STATUS_DELETED]);\n }\n\n asort($options);\n\n return $options;\n}", "public function resetOriginalStatus() {\n $this->orig_status = $this->getStatus();\n }", "function statusMessagesOff()\n\t{\n\t\t$this->bStatusMessages = false;\n\t}", "public function setOrderStatus($orderStatus){\n return $this->setData(self::ORDER_STATUS, $orderStatus);\n }", "protected function resetStatuses()\n {\n $this->pubDirectory->delete($this->getRelativeFilePath(self::IMPORT_STATUS_READY));\n $this->pubDirectory->delete($this->getRelativeFilePath(self::IMPORT_STATUS_BUSY));\n $this->pubDirectory->delete($this->getRelativeFilePath(self::IMPORT_STATUS_FAILED));\n }", "protected function reset_post_statuses()\n {\n foreach (get_post_stati(array('_builtin' => false)) as $post_status) {\n _unregister_post_status($post_status);\n }\n }", "function removeHistory()\n {\n $db = eZDB::instance();\n $orderID = (int)$this->OrderNr;\n $db->query( \"DELETE FROM ezorder_status_history WHERE order_id=$orderID\" );\n }", "public function unsetOrderVersion(): void\n {\n $this->orderVersion = [];\n }", "public function edit(OrderStatus $orderStatus)\n {\n //\n }", "function _correctOrderStatusName( &$orderStatus ){\r\n\r\n\tif ( $orderStatus[\"statusID\"] == ostGetCanceledStatusId() )\r\n\t$orderStatus[\"status_name\"] = translate(\"ordr_status_cancelled\");\r\n}", "public function set_status( $order, $reset_status = false ) {\n\n\t\t\t/**\n\t\t\t * Post meta table.\n\t\t\t */\n\t\t\t$post_status = get_post_meta( $order['post_id'], self::LANGUAGE_POST_STATUS, true );\n\n\t\t\tif ( ! is_array( $post_status ) ) {\n\t\t\t\t// Meta value is invalid. Reset to an empty array.\n\t\t\t\t$post_status = array();\n\t\t\t}\n\n\t\t\t$result_meta = true;\n\t\t\t$message = '';\n\t\t\t$status_changed = false;\n\n\t\t\tif ( 'draft' === $order['status'] ) {\n\t\t\t\tif ( empty( $post_status[ $order['language'] ] ) || $post_status[ $order['language'] ] != $order['status'] ) {\n\t\t\t\t\t$post_status[ $order['language'] ] = $order['status'];\n\t\t\t\t\t$status_changed = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tunset( $post_status[ $order['language'] ] );\n\t\t\t\t$status_changed = true;\n\t\t\t}\n\n\t\t\tif ( empty( $post_status ) ) :\n\t\t\t\t$result_meta = delete_post_meta( $order['post_id'], self::LANGUAGE_POST_STATUS );\n\t\t\telse:\n\t\t\t\tif ( $status_changed ) {\n\t\t\t\t\t$result_meta = update_post_meta( $order['post_id'], self::LANGUAGE_POST_STATUS, $post_status );\n\t\t\t\t}\n\t\t\tendif;\n\n\t\t\tif ( $status_changed ) {\n\t\t\t\tif ( $result_meta ) {\n\t\t\t\t\t$message = esc_html( sprintf( __( 'Successfully set to \"%s\"', 'wpglobus-plus' ), ucfirst( $order['status'] ) ) );\n\t\t\t\t} else {\n\t\t\t\t\t$message = esc_html( sprintf( __( 'Setting to \"%s\" FAILED!', 'wpglobus-plus' ), ucfirst( $order['status'] ) ) );\n\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$message = esc_html( sprintf( __( 'Already set to \"%s\". Not changing.', 'wpglobus-plus' ), ucfirst( $order['status'] ) ) );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Options table.\n\t\t\t */\n\t\t\t$result_option = true;\n\t\t\t$lang_status = get_option( self::LANGUAGE_STATUS );\n\n\t\t\tif ( empty( $post_status ) ) {\n\n\t\t\t\tif ( ! empty( $lang_status[ $order['language'] ] ) && isset( $lang_status[ $order['language'] ][ $order['post_id'] ] ) ) {\n\t\t\t\t\tunset( $lang_status[ $order['language'] ][ $order['post_id'] ] );\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif ( 'draft' === $order['status'] ) {\n\t\t\t\t\t$lang_status[ $order['language'] ][ $order['post_id'] ] = $order['post_id'];\n\t\t\t\t} else {\n\t\t\t\t\tif ( ! empty( $lang_status[ $order['language'] ] ) && isset( $lang_status[ $order['language'] ][ $order['post_id'] ] ) ) {\n\t\t\t\t\t\tunset( $lang_status[ $order['language'] ][ $order['post_id'] ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t};\n\n\t\t\tif ( isset( $lang_status[ $order['language'] ] ) && empty( $lang_status[ $order['language'] ] ) ) {\n\t\t\t\tunset( $lang_status[ $order['language'] ] );\n\t\t\t}\n\n\t\t\tif ( empty( $lang_status ) ) {\n\t\t\t\t$result_option = delete_option( self::LANGUAGE_STATUS );\n\t\t\t} else {\n\n\t\t\t\t$result_option = update_option( self::LANGUAGE_STATUS, $lang_status, false );\n\t\t\t\tif ( $reset_status ) {\n\t\t\t\t\t$result_option = $this->reset_status();\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t$return = array();\n\t\t\t$return['action'] \t= $order['action'];\n\t\t\t$return['post_id'] \t= $order['post_id'];\n\t\t\t$return['language'] = $order['language'];\n\t\t\t$return['status'] \t= $order['status'];\n\t\t\t$return['message'] \t= $message;\n\n\t\t\treturn $return;\n\n\t\t}", "public function updateOrderStatus($orders = 0, $order_id = 0, $order_status = 0)\n {\n $total = 1;\n if (empty($orders)) {\n $orders = array();\n\n $orderslist = vRequest::getVar('orders', array());\n $total = 0;\n // Get the list of orders in post to update\n foreach ($orderslist as $key => $order) {\n if ($orderslist[$key]['order_status'] !== $orderslist[$key]['current_order_status']) {\n $orders[$key] = $orderslist[$key];\n $total++;\n }\n }\n }\n\n if (!is_array($orders)) {\n $orders = array($orders);\n }\n\n /* Process the orders to update */\n $updated = 0;\n $error = 0;\n if ($orders) {\n // $notify = vRequest::getVar('customer_notified', array()); // ???\n // $comments = vRequest::getVar('comments', array()); // ???\n foreach ($orders as $virtuemart_order_id => $order) {\n if ($order_id > 0) $virtuemart_order_id = $order_id;\n $this->useDefaultEmailOrderStatus = false;\n if ($this->updateStatusForOneOrder($virtuemart_order_id, $order, true)) {\n $updated++;\n } else {\n $error++;\n }\n }\n }\n $result = array('updated' => $updated, 'error' => $error, 'total' => $total);\n return $result;\n }", "private function cancelFBAShipment(\n \\Magento\\Sales\\Model\\Order $order,\n \\FBAOutboundServiceMWS_Model_GetFulfillmentOrderResult $fulfillmentResult,\n $amazonStatus\n ) {\n\n if ($order->canCancel()) {\n $shipment = $fulfillmentResult->getFulfillmentOrderItem();\n $skus = [];\n // Get skus from cancelled order\n foreach ($shipment->getmember() as $amazonShipment) {\n $skus[] = $amazonShipment->getSellerSKU();\n }\n\n // if there are skus, match them to products in the order. We want to cancel specific\n // items not the entire order.\n if ($skus) {\n $canceledSku = [];\n foreach ($order->getAllItems() as $item) {\n $product = $item->getProduct();\n if (in_array($product->getSku(), $skus) || in_array($product->getAmazonMcfMerchantSku(), $skus)) {\n // check to make sure the item hasn't already been canceled\n if ($item->getQtyOrdered() != $item->getQtyCanceled()) {\n $qty = $item->getQtyOrdered();\n\n $item->setQtyCanceled($qty);\n $item->save();\n $canceledSku[] = $product->getSku();\n }\n }\n }\n\n // If we have canceled items, add a comment.\n if ($canceledSku) {\n $this->helper->logOrder(\n 'FBA order canceled - items set to canceled with SKUs: ' . implode(\", \", $canceledSku)\n );\n $order->addStatusHistoryComment(\n \"FBA items with Magento SKUs: \" . implode(\", \", $canceledSku)\n . \" are unable to be fulfilled. Check your seller central account for more information.\"\n );\n $order->save();\n }\n }\n }\n }", "private function changeOrderStatus( $builder, $status )\n {\n return $builder->update([\n 'is_order_disable' => $status,\n ]);\n }", "protected function _applyOrderStatusFilter()\n {\n if (is_null($this->_orderStatus)) {\n return $this;\n }\n $orderStatus = $this->_orderStatus;\n if (!is_array($orderStatus)) {\n $orderStatus = array($orderStatus);\n }\n $this->getSelect()->where('status IN(?)', $orderStatus);\n return $this;\n }", "public function hookActionOrderStatusUpdate($params)\n {\n $status = $params['newOrderStatus']?$params['newOrderStatus']->id:false;\n\n if ($status === 7/** Refund status id */) {\n /** If transaction is registred in twispay transactions list */\n $transaction = Twispay_Transactions::getTransactionByCartId($params['cart']->id);\n if ($transaction) {\n if ($transaction['status'] == Twispay_Status_Updater::$RESULT_STATUSES['REFUND_OK']) {\n Twispay_Logger::api_log($this->l('Order already refunded.'));\n $this->context->cookie->redirect_error = $this->l('Order already refunded.');\n } else {\n $keys = self::getKeysInfo();\n if (!$keys) {\n $this->context->cookie->redirect_error = $this->l('Twispay refund error: ').$this->l('Invalid API Keys.');\n /** Redirect to order page */\n /** Skip the part when the status is set */\n Tools::redirect($_SERVER['HTTP_REFERER']);\n die();\n }\n $refund = Twispay_Transactions::refundTransaction($transaction, $keys, $this);\n if ($refund['refunded']) {\n Twispay_Logger::api_log($this->l('Successfully refunded ').json_encode($refund));\n } else {\n Twispay_Logger::api_log($this->l('Twispay refund error: ').json_encode($refund));\n $this->context->cookie->redirect_error = $this->l('Twispay refund error: ').$refund['status'];\n /** Redirect to order page */\n /** Skip the part when the status is set */\n Tools::redirect($_SERVER['HTTP_REFERER']);\n die();\n }\n }\n /** If the order was not payed via twispay */\n } else {\n Twispay_Logger::api_log($this->l('Twispay refund error: ').$this->l('No transactions were found for order with id ').$params['id_order']);\n $this->context->cookie->redirect_error = $this->l('Twispay refund error: ').$this->l('No transactions were found for this order.');\n }\n }\n }", "public function set_pre_orders_list_option( $status, $option, $value ) {\n\t\tif ( 'wc_pre_orders_edit_pre_orders_per_page' == $option )\n\t\t\treturn $value;\n\n\t\treturn $status;\n\t}", "public function toOptionArray()\n {\n /** @var $orderConfig Mage_Sales_Model_Order_Config */\n $orderConfig = Mage::getSingleton('sales/order_config');\n if ($this->_stateStatuses) {\n $statuses = $orderConfig->getStateStatuses($this->_stateStatuses);\n }\n else {\n $statuses = $orderConfig->getStatuses();\n }\n $options = array();\n $options[] = array(\n 'value' => '',\n 'label' => Mage::helper('adminhtml')->__('-- Please Select --')\n );\n foreach ($statuses as $code=>$label) {\n $options[] = array(\n 'value' => $code,\n 'label' => $label\n );\n }\n return $options;\n }", "function hook_commerce_invoice_statuses_alter(&$statuses) {\n // Remove a status.\n unset($statuses[Invoice::STATUS_REFUND_PENDING]);\n // Add a status.\n $statuses['past_due'] = t('Past due');\n}", "public function change_order_status_post()\n {\n $pdata = file_get_contents(\"php://input\");\n $data = json_decode($pdata,true);\n $id = $data['order_id'];\n $status = $data['status'];\n $user_id = $data['user_id'];\n // $this->response($user_id);\n $data = array(\n 'status' => $status\n );\n \n $where = array(\n 'id' => $id\n );\n $this->model->update('orders', $data, $where);\n $message = \"Your Order is $status\";\n \n $resp = array('rccode' => 200,'message' => $message);\n $this->response($resp);\n //}\n \n \n }", "public static function ResetMarkOrderProcessAsCompleted()\n {\n if (array_key_exists(self::SESSION_KEY_NAME_ORDER_SUCCESS, $_SESSION)) {\n unset($_SESSION[self::SESSION_KEY_NAME_ORDER_SUCCESS]);\n }\n }", "function updateStatusForOneOrder($virtuemart_order_id, $inputOrder, $useTriggers = true)\n {\n\n //vmdebug('updateStatusForOneOrder', $inputOrder);\n\n /* Update the order */\n $data = $this->getTable('orders');\n $data->load($virtuemart_order_id);\n $old_order_status = $data->order_status;\n $old_o_hash = $data->o_hash;\n if (empty($inputOrder['virtuemart_order_id'])) {\n unset($inputOrder['virtuemart_order_id']);\n }\n\n $data->bind($inputOrder);\n\n $cp_rm = VmConfig::get('cp_rm', array('C'));\n if (!is_array($cp_rm)) $cp_rm = array($cp_rm);\n\n if (in_array((string) $data->order_status, $cp_rm)) {\n if (!empty($data->coupon_code)) {\n CouponHelper::RemoveCoupon($data->coupon_code);\n }\n }\n //First we must call the payment, the payment manipulates the result of the order_status\n if ($useTriggers) {\n\n\n $_dispatcher = JDispatcher::getInstance(); //Should we add this? $inputOrder\n $_returnValues = $_dispatcher->trigger('plgVmOnUpdateOrderShipment', array(&$data, $old_order_status, $inputOrder));\n\n // Payment decides what to do when order status is updated\n $_returnValues = $_dispatcher->trigger('plgVmOnUpdateOrderPayment', array(&$data, $old_order_status, $inputOrder));\n foreach ($_returnValues as $_returnValue) {\n if ($_returnValue === true) {\n break; // Plugin was successfull\n } elseif ($_returnValue === false) {\n return false; // Plugin failed\n }\n // Ignore null status and look for the next returnValue\n }\n\n /**\n * If an order gets cancelled, fire a plugin event, perhaps\n * some authorization needs to be voided\n */\n if ($data->order_status == \"X\") {\n\n $_dispatcher = JDispatcher::getInstance();\n //Should be renamed to plgVmOnCancelOrder\n $_dispatcher->trigger('plgVmOnCancelPayment', array(&$data, $old_order_status));\n }\n }\n\n if (empty($data->delivery_date)) {\n $del_date_type = VmConfig::get('del_date_type', 'm');\n if (strpos($del_date_type, 'os') !== FALSE) { //for example osS\n $os = substr($del_date_type, 2);\n if ($data->order_status == $os) {\n $date = JFactory::getDate();\n $data->delivery_date = $date->toSQL();\n }\n } else {\n vmLanguage::loadJLang('com_virtuemart_orders', true);\n $data->delivery_date = vmText::_('COM_VIRTUEMART_DELDATE_INV');\n }\n }\n\n //if ($data->store()) {\n\n $task = vRequest::getCmd('task', 0);\n $view = vRequest::getCmd('view', 0);\n\n //The item_id of the request is already given as inputOrder by the calling function (controller). inputOrder could be manipulated by the\n //controller and so we must not use the request data here.\n $upd_items = vRequest::getVar('item_id', false);\n if ($upd_items) {\n\n //get tax calc_value of product VatTax\n $db = JFactory::getDBO();\n $sql = 'SELECT * FROM `#__virtuemart_order_calc_rules` WHERE `virtuemart_order_id` = \"' . $virtuemart_order_id . '\" ORDER BY virtuemart_order_item_id';\n $db->setQuery($sql);\n $orderCalcs = $db->loadObjectList();\n //vmdebug('$orderCalcs',$orderCalcs);\n $allTaxes = array();\n //$taxes = array();\n //$taxes['VatTax'] = array();\n $orderCalcRulesTable = $this->getTable('order_calc_rules');\n\n $data->order_salesPrice = 0.0;\n foreach ($inputOrder as $item_id => $order_item_data) {\n\n if (!empty($item_id) and !is_integer($item_id) and strpos($item_id, '0-') !== 0) continue; //Attention, we need the check against empty, else it continues for \"0\"\n //vmdebug('$order_item_data',$order_item_data);\n $order_item_data['current_order_status'] = $order_item_data['order_status'];\n if (!isset($order_item_data['comments'])) $order_item_data['comments'] = '';\n $order_item_data = (object)$order_item_data;\n $order_item_data->virtuemart_order_id = $virtuemart_order_id;\n $order_item_data->virtuemart_order_item_id = $item_id;\n //$this->updateSingleItem($order_item->virtuemart_order_item_id, $data->order_status, $order['comments'] , $virtuemart_order_id, $data->order_pass);\n if (empty($item_id)) {\n $inputOrder['comments'] .= ' ' . vmText::sprintf('COM_VIRTUEMART_ORDER_PRODUCT_ADDED', $order_item_data->order_item_name);\n }\n\n\n $toRemove = array();\n $taxes = array();\n if (empty($order_item_data->product_tax_id)) {\n $order_item_data->product_tax_id = array();\n } else if (!is_array($order_item_data->product_tax_id)) {\n $order_item_data->product_tax_id = array($order_item_data->product_tax_id);\n }\n\n foreach ($orderCalcs as $i => $calc) {\n\n if ($calc->virtuemart_order_item_id == $item_id) {\n $k = array_search($calc->virtuemart_calc_id, $order_item_data->product_tax_id);\n if ($k !== FALSE) {\n $calc->product_quantity = $order_item_data->product_quantity; //We need it later in the updateBill\n $taxes[$calc->calc_kind][$calc->virtuemart_calc_id] = $calc;\n unset($order_item_data->product_tax_id[$k]);\n } else if ($calc->calc_kind == 'VatTax' or $calc->calc_kind == 'Tax') {\n $toRemove[] = $calc->virtuemart_order_calc_rule_id;\n } else {\n $taxes[$calc->calc_kind][$calc->virtuemart_calc_id] = $calc;\n }\n }\n }\n\n if (!empty($order_item_data->product_tax_id)) {\n //$orderCalcRulesTable = $this->getTable('order_calc_rules');\n foreach ($order_item_data->product_tax_id as $pTaxId) {\n if (empty($pTaxId)) continue;\n $sql = 'SELECT * FROM `#__virtuemart_calcs` WHERE `virtuemart_calc_id` = \"' . $pTaxId . '\" ';\n $db->setQuery($sql);\n $newCalc = $db->loadObject();\n $newCalc->virtuemart_order_calc_rule_id = 0;\n $newCalc->virtuemart_order_id = $order_item_data->virtuemart_order_id;\n //$newCalc->virtuemart_vendor_id = $order_item_data->virtuemart_vendor_id;\n $newCalc->virtuemart_order_item_id = $item_id;\n $newCalc->calc_rule_name = $newCalc->calc_name;\n if (!empty($order_item_data->product_item_price)) {\n $newCalc->calc_amount = $order_item_data->product_item_price * $newCalc->calc_value * 0.01;\n } else {\n $newCalc->calc_amount = $order_item_data->product_final_price * (1 - 1 / ($newCalc->calc_value * 0.01 + 1));\n }\n $newCalc->calc_mathop = '+%';\n\n $orderCalcRulesTable->bindChecknStore($newCalc);\n vmdebug('added new tax', $newCalc->calc_amount, $newCalc);\n $taxes[$newCalc->calc_kind][$orderCalcRulesTable->virtuemart_calc_id] = $orderCalcRulesTable->loadFieldValues(false);\n\n vmdebug('added new tax', $taxes);\n }\n }\n\n\n foreach ($toRemove as $virtuemart_order_calc_rule_id) {\n\n $orderCalcRulesTable->delete($virtuemart_order_calc_rule_id);\n vmdebug('To remove ', $virtuemart_order_calc_rule_id);\n }\n\n $orderItemTable = $this->updateSingleItem($item_id, $order_item_data, true, $taxes, $data->virtuemart_user_id);\n //vmdebug('AFter updateSingleItem, my product_subtotal_with_tax',$order_item_data,$orderItemTable);\n\n foreach ($taxes as $kind) {\n foreach ($kind as $tax) {\n $allTaxes[] = $tax;\n }\n }\n\n $data->order_salesPrice += $orderItemTable->product_final_price * $orderItemTable->product_quantity;\n //vmdebug('update Order new order_salesPrice',$data->order_salesPrice,$order_item_data->product_final_price);\n $inputOrder[$item_id] = $order_item_data;\n }\n\n //$pre = &$allTaxes;\n $pseudoOrder = array('items' => $inputOrder, 'calc_rules' => $allTaxes);\n $pseudoOrder['details']['BT'] = $data;\n //vmdebug('my summarized rules $inputOrder before summarize',$inputOrder );\n $summarizedRules = shopFunctionsF::summarizeRulesForBill($pseudoOrder, false);\n //vmdebug('my summarized rules',$summarizedRules );\n\n //Determine ship/payment tax\n $idWithMax = 0;\n $maxValue = 0.0;\n if (!empty($summarizedRules['taxBill'])) {\n foreach ($summarizedRules['taxBill'] as $rule) {\n if ($rule->calc_kind == 'taxRulesBill' or $rule->calc_kind == 'VatTax') {\n if (empty($idWithMax) or $maxValue <= $rule->subTotal) {\n $idWithMax = $rule->virtuemart_calc_id;\n $maxValue = $rule->subTotal;\n }\n }\n }\n }\n\n $undhandled = array('shipment', 'payment');\n foreach ($undhandled as $calc_kind) {\n $keyN = 'order_' . $calc_kind;\n $keyNTax = $keyN . '_tax';\n //vmdebug('ShipPay Rules handling',$orderCalcs);\n\n //Find existing rule\n $rule = false;\n foreach ($orderCalcs as $i => $rul) {\n if ($rul->calc_kind == $calc_kind) {\n $rule = $rul;\n }\n }\n\n //Seems there was no rule set\n if (!$rule) {\n $ocrTable = $this->getTable('order_calc_rules');\n $rule = $ocrTable->loadFieldValues(false);\n\n $r = $summarizedRules['taxBill'][$idWithMax];\n $rule->virtuemart_calc_id = $r->virtuemart_calc_id;\n $rule->virtuemart_vendor_id = $r->virtuemart_vendor_id;\n $rule->calc_rule_name = $r->calc_rule_name;\n $rule->virtuemart_order_id = $r->virtuemart_order_id;\n $rule->calc_value = $r->calc_value;\n $rule->calc_mathop = $r->calc_mathop;\n $rule->calc_currency = $r->calc_currency;\n //$rule->virtuemart_calc_id = $r->virtuemart_calc_id;\n $rule->calc_kind = $calc_kind;\n vmdebug('ShipPay Rules handling rule missing', $orderCalcs, $rule, $r);\n\n //$ocrTable = $this->getTable('order_calc_rules');\n //$ocrTable->bindChecknStore($rule);\n }\n //$allTaxes[] = $rule;\n $data->{$keyN} = vRequest::getString($keyN, 0.0);\n\n //There is a VAT available\n /*\t\t\t\tif( (/*count($summarizedRules['taxBill'])==1 or * VmConfig::get('radicalShipPaymentVat',true)) and isset($summarizedRules['taxBill'][$idWithMax])){\n\t\t\t\t\t$r = $summarizedRules['taxBill'][$idWithMax];\n\n\t\t\t\t\t$rule->calc_amount = $data->$keyN * ($r->calc_value * 0.01 ) ;\n\t\t\t\t\t$data->$keyNTax = round(floatval($data->$keyNTax),5);\n\t\t\t\t\t$rule->calc_amount = round(floatval($rule->calc_amount), 5);\n\n\t\t\t\t\tif($data->$keyNTax != $rule->calc_amount or $rule->virtuemart_calc_id != $r->virtuemart_calc_id){\n\t\t\t\t\t\t//$data->$keyNTax = $rule->calc_amount;\n\t\t\t\t\t\t$rule->calc_rule_name = $r->calc_rule_name;\n\t\t\t\t\t\t$rule->virtuemart_order_id = $r->virtuemart_order_id;\n\t\t\t\t\t\t$rule->calc_value = $r->calc_value;\n\t\t\t\t\t\t$rule->calc_mathop = $r->calc_mathop;\n\t\t\t\t\t\t$rule->virtuemart_calc_id = $r->virtuemart_calc_id;\n\t\t\t\t\t\t//vmdebug('Updating rule '.$keyNTax,$data->$keyNTax,$rule,$r);\n\t\t\t\t\t\t$ocrTable = $this->getTable('order_calc_rules');\n\t\t\t\t\t\t$ocrTable->bindChecknStore($rule);\n\n\t\t\t\t\t}\n\n\t\t\t\t\t//$summarizedRules['taxBill'][$idWithMax]->subTotal += $rule->calc_amount;\n\t\t\t\t\t$data->$keyNTax = $rule->calc_amount;\n\t\t\t\t\t//vmdebug('Use radicalShipPaymentVat with $idWithMax '.$idWithMax,$summarizedRules['taxBill'][$idWithMax]->subTotal,$data->$keyNTax, $rule);\n\t\t\t\t} else { */\n $data->{$keyNTax} = 0.0;\n $t1 = 0.0;\n if (VmConfig::get('radicalShipPaymentVat', true)) {\n $r = $summarizedRules['taxBill'][$idWithMax];\n\n /*$rule->calc_amount = $data->$keyN * ($r->calc_value * 0.01 ) ;\n\t\t\t\t\t\t$data->$keyNTax = round(floatval($data->$keyNTax),5);\n\t\t\t\t\t\t$rule->calc_amount = round(floatval($rule->calc_amount), 5);\n\t\t\t\t\t\t$data->$keyNTax = $rule->calc_amount;*/\n $t1 = 0.0;\n $data->{$keyNTax} = $r->calc_value * 0.01 * $data->{$keyN};\n } else {\n foreach ($summarizedRules['taxBill'] as $in => $vatrule) {\n\n if (!empty($data->order_salesPrice)) {\n $t1 = $vatrule->calc_value * 0.01 * $vatrule->subTotal / $data->order_salesPrice;\n } else {\n $t1 = 0.0;\n }\n\n //vmdebug('ShipPay Rules store '.$vatrule->calc_value * 0.01.' * '. $vatrule->subTotal.'/'.$data->order_salesPrice.' = '.$t1);\n $data->{$keyNTax} += $t1 * $data->{$keyN};\n //$summarizedRules['taxBill'][$in]->calc_amount += $data->$keyNTax ;\n\n }\n }\n\n if ($data->{$keyNTax} != $rule->calc_amount) {\n $rule->calc_amount = $data->{$keyNTax};\n $rule->calc_value = $t1 * 100.0;\n //vmdebug('ShipPay Rules set',$rule);\n\n $ocrTable = $this->getTable('order_calc_rules');\n $ocrTable->bindChecknStore($rule);\n }\n // }\n //vmdebug('Add rule to $allTaxes',$rule);\n $allTaxes[] = $rule;\n //}\n\n } //*/\n\n $pseudoOrder = array('items' => $inputOrder, 'calc_rules' => $allTaxes);\n $pseudoOrder['details']['BT'] = $data;\n //vmdebug('my summarized rules $inputOrder before summarize',$inputOrder );\n $summarizedRules = shopFunctionsF::summarizeRulesForBill($pseudoOrder, true);\n\n $ocrTable = $this->getTable('order_calc_rules');\n foreach ($summarizedRules['taxBill'] as $r) {\n if ($r->calc_kind == 'payment' or $r->calc_kind == 'shipment') {\n $ocrTable->bindChecknStore($r);\n }\n }\n\n\n $this->calculatePaidByOS($data, $inputOrder);\n\n //prevents sending of email\n $inputOrder['customer_notified'] = 0;\n // invoice_locked should depend ideally on the existence of the invoice, but it would just be an extra query later, we do a new invoice anyway.\n if (VirtueMartModelInvoice::needInvoiceByOrderstatus($data->order_status) or VirtueMartModelInvoice::needInvoiceByOrderstatus($data->order_status, 'inv_osr', array('R'))) {\n $data->invoice_locked = 1;\n //vmdebug('SET LOCK');\n }\n\n $data->store();\n $this->updateBill($virtuemart_order_id, /*$vatTaxes,*/ $summarizedRules['taxBill']);\n } else {\n\n $update_lines = 1;\n if ($task === 'updatestatus' and $view === 'orders') {\n $lines = vRequest::getVar('orders');\n $update_lines = $lines[$virtuemart_order_id]['update_lines'];\n }\n\n if ($update_lines == 1) {\n\n $q = 'SELECT virtuemart_order_item_id\n\t\t\t\t\t\t\t\t\t\t\tFROM #__virtuemart_order_items\n\t\t\t\t\t\t\t\t\t\t\tWHERE virtuemart_order_id=\"' . $virtuemart_order_id . '\"';\n $db = JFactory::getDBO();\n $db->setQuery($q);\n $order_items = $db->loadObjectList();\n if ($order_items) {\n foreach ($order_items as $item_id => $order_item) {\n $this->updateSingleItem($order_item->virtuemart_order_item_id, $data);\n }\n }\n\n $this->calculatePaidByOS($data, $inputOrder);\n }\n //$data->invoice_locked = 0;\n $data->store();\n vmdebug('Going to store the order', $old_o_hash, $data->o_hash);\n }\n vmdebug('Update order status ');\n\n //Must be below the handling of the order items, else we must add an except as for \"customer_notified\"\n if (empty($inputOrder['comments'])) {\n $inputOrder['comments'] = '';\n } else {\n $inputOrder['comments'] = trim($inputOrder['comments']);\n }\n $invM = VmModel::getModel('invoice');\n //TODO use here needNewInvoiceNumber\n $inputOrder['order_status'] = $data->order_status;\n\n vmdebug('updateStatusForOneOrder, a new invoice needed? ', (int)$data->invoice_locked, $old_order_status, $data->order_status, $old_o_hash, $data->o_hash);\n\n if (!$data->invoice_locked and ($old_order_status != $data->order_status or $old_o_hash != $data->o_hash) and VirtueMartModelInvoice::isInvoiceToBeAttachByOrderstats($inputOrder['order_status'])) {\n\n $layout = 'invoice';\n $checkHash = true;\n //$refundOrderStatus = VmConfig::get('inv_osr',array('R'));\n //if(!in_array($old_order_status, $refundOrderStatus) and VirtueMartModelInvoice::needInvoiceByOrderstatus($inputOrder['order_status'],'inv_osr', array('R') )){\n if ($old_order_status != $data->order_status) {\n $checkHash = false;\n }\n\n if (VirtueMartModelInvoice::needInvoiceByOrderstatus($inputOrder['order_status'], 'inv_osr', array('R'))) {\n $layout = 'refund';\n }\n\n $inputOrder['o_hash'] = $data->o_hash;\n\n vmdebug('We need a new invoice ', $layout);\n $inputOrder['invoice_number'] = $invM->createReferencedInvoiceNumber($data->virtuemart_order_id, $inputOrder, $layout, $checkHash);\n }\n\n //We need a new invoice, therefore rename the old one.\n /*$inv_os = VmConfig::get('inv_os',array('C'));\n\t\tif(!is_array($inv_os)) $inv_os = array($inv_os);\n\t\tif($old_order_status!=$data->order_status and in_array($data->order_status,$inv_os)){\n\t\t\t//$this->renameInvoice($data->virtuemart_order_id);\n\t\t\tvmdebug('my input order here',$inputOrder);\n\t\t\t$inputOrder['invoice_number'] = $this->createReferencedInvoice($data->virtuemart_order_id);\n\t\t}*/\n\n /* Update the order history */\n //update order histories needs the virtuemart_order_id\n $inputOrder['virtuemart_order_id'] = $virtuemart_order_id;\n $this->updateOrderHistory($inputOrder);\n // When the plugins did not already notified the user, do it here (the normal way)\n //Attention the ! prevents at the moment that an email is sent. But it should used that way.\n // \t\t\tif (!$inputOrder['customer_notified']) {\n $this->notifyCustomer($data->virtuemart_order_id, $inputOrder);\n // \t\t\t}\n\n //VmConfig::importVMPlugins('vmcoupon');\n $dispatcher = JDispatcher::getInstance();\n $returnValues = $dispatcher->trigger('plgVmCouponUpdateOrderStatus', array($data, $old_order_status));\n if (!empty($returnValues)) {\n foreach ($returnValues as $returnValue) {\n if ($returnValue !== null) {\n return $returnValue;\n }\n }\n }\n\n\n return true;\n /*} else {\n\t\t\treturn false;\n\t\t}*/\n }", "protected function showPaymentStatusUpdater(jshopOrder $order)\r\n {\r\n JFactory::getSession()->set('jshop_send_end_form', 0);\r\n $formAction = $this->getActionUrl('', $order->order_id, 6) . '&payment_stage=status';\r\n\r\n require_once __DIR__ . '/status_form.php';\r\n }", "function jigoshop_upgrade_145() {\n\t\n\tJigoshop_Base::get_options()->delete_option( 'jigoshop_paypal_send_shipping' );\n\tdelete_option( 'jigoshop_paypal_send_shipping' );\n\tJigoshop_Base::get_options()->delete_option( 'jigoshop_display_totals_tax' );\n\tdelete_option( 'jigoshop_display_totals_tax' );\n\t\n}", "abstract public function removeState(array $options);", "function get_all_woo_status_ps_sms()\n{\n if (!function_exists('wc_get_order_statuses'))\n return;\n $statuses = wc_get_order_statuses() ? wc_get_order_statuses() : array();\n $opt_statuses = array();\n foreach ((array) $statuses as $status_val => $status_name) {\n $opt_statuses[substr($status_val, 3)] = $status_name;\n }\n return $opt_statuses;\n}", "public function changeOrderStatus(Order $order, Request $request)\n\t{\n\n\t\ttry\n\t\t{\n\t\t\t$data = request()->all();\n\t\t\t\t\n\t\t\t \n\t\t\tif(isset($data['id']))\n\t\t\t{\n\t\t\t\tif($data['value'] == 5) {\n\t\t\t\t\tfor ($i=0; $i<count($request->id); $i++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->Order->where('id',$request->id[$i])->update(['order_status_id' => $data['value'],'delivered_date'=>date('Y-m-d')]);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tfor ($i=0; $i<count($request->id); $i++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->Order->where('id',$request->id[$i])->update(['order_status_id' => $data['value']]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t\t$message = $this->success($this->updated,'Oder');\n\t\t\t\t$cnt = $this->orderCount();\n\t\t\t\treturn response()->json(['orderStatus' => $status ,'pId'=> $request->id,'cnt' => $cnt ,'message' => $message]);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tcatch (\\Exception $e) {\n\t\t\tdd($e);\n\t\t\treturn $this->debugLog($e->getMessage());\n\t\t}\n\t}", "public function hookActionOrderStatusUpdate($params)\n {\n if (!empty($params['id_order'])) {\n $lastOrderStatus = OrderHistory::getLastOrderState($params['id_order']);\n $config = Tools::jsonDecode(Configuration::get('KB_PUSH_NOTIFICATION'), true);\n if (!empty($config) && isset($config['module_config']['enable'])) {\n if (!empty($lastOrderStatus)) {\n $order = new Order($params['id_order']);\n $current_order_status = $params['newOrderStatus']->id;\n $old_order_status = $order->current_state;\n $module_config = $config['module_config'];\n $id_shop = $params['cart']->id_shop;\n $id_lang = $params['cart']->id_lang;\n if ($module_config['enable'] && $module_config['enable_order_status']) {\n $orderStatus_old = new OrderState($old_order_status, $id_lang);\n $orderStatus_new = new OrderState($current_order_status, $id_lang);\n $current_status = $orderStatus_new->name;\n $old_status = $orderStatus_old->name;\n $id_guest = Db::getInstance()->getValue('SELECT id_guest FROM `'._DB_PREFIX_.'guest` WHERE `id_customer` ='.(int)$params['cart']->id_customer);\n $reg_id = KbPushSubscribers::getSubscriberRegIDs($id_guest, $id_shop);\n\n if (empty($reg_id)) {\n $id_guest = $params['cart']->id_guest;\n $reg_id = KbPushSubscribers::getSubscriberRegIDs($id_guest, $id_shop);\n }\n if (!empty($reg_id) && count($reg_id) > 0) {\n $reg_id = $reg_id[count($reg_id)-1]['reg_id'];\n $fcm_setting = Tools::jsonDecode(Configuration::get('KB_PUSH_FCM_SERVER_SETTING'), true);\n if (!empty($fcm_setting)) {\n $fcm_server_key = $fcm_setting['server_key'];\n $headers = array(\n 'Authorization:key=' . $fcm_server_key,\n 'Content-Type:application/json'\n );\n $id_template = KbPushTemplates::getNotificationTemplateIDByType(self::KBPN_ORDER_STATUS_UPDATE);\n if (!empty($id_template)) {\n $fields = array();\n $fields = $this->getNotificationPushData($id_template, $id_lang, $id_shop);\n if (!empty($fields)) {\n $kbTemplate = new KbPushTemplates($id_template, false, $id_shop);\n $message = '';\n if (isset($fields['data']['body'])) {\n $message = $fields['data']['body'];\n if ($kbTemplate->notification_type == self::KBPN_ORDER_STATUS_UPDATE) {\n $orderTotal = $order->getOrdersTotalPaid();\n $orderTotal = Tools::displayPrice($orderTotal);\n $message = str_replace('{{kb_order_reference}}', $order->reference, $message);\n $message = str_replace('{{kb_order_amount}}', $orderTotal, $message);\n $message = str_replace('{{kb_order_before_status}}', $old_status, $message);\n $message = str_replace('{{kb_order_after_status}}', $current_status, $message);\n $fields['data']['body'] = $message;\n }\n }\n $is_sent = 1;\n $push_id = $this->savePushNotification($kbTemplate, $is_sent, array($reg_id));\n if (!empty($push_id)) {\n $fields['to'] = $reg_id;\n $fields[\"data\"][\"base_url\"] = $this->getBaseUrl();\n $fields[\"data\"][\"click_url\"] = $this->context->link->getModuleLink($this->name, 'serviceworker', array('action' => 'updateClickPush'), (bool) Configuration::get('PS_SSL_ENABLED'));\n $fields[\"data\"]['push_id'] = $push_id;\n $result = $this->sendPushRequestToFCM($headers, $fields);\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }", "public function getListOrderStatus(){\n\n return $this->client->makeRequest('orderstatus', 'GET');\n }", "public function getPendingOrders($status) {\r\n if($status != \"all\"):\r\n $orders = Mage::getModel('marketplace/commission')->getCollection();\r\n $orders->addFieldToSelect('*');\r\n $orders->addFieldToFilter('seller_id', Mage::getSingleton('customer/session')->getCustomer()->getId());\r\n $orders ->getSelect()\r\n ->columns('SUM(seller_amount) as seller_amount')\r\n ->group('order_id'); \r\n /**\r\n * Set order for manage order\r\n */\r\n $orders->setOrder('order_id', 'desc');\r\n /**\r\n * Return orders\r\n */\r\n $condition = new Zend_Db_Expr(\"sales.entity_id = main_table.order_id AND sales.status = '$status'\");\r\n $orders->getSelect()->join(array('sales' => $orders->getTable('sales/order')),\r\n $condition,\r\n array('status' => 'sales.status'));\r\n elseif($status == \"all\"):\r\n $orders = Mage::getModel('marketplace/commission')->getCollection();\r\n $orders->addFieldToSelect('*');\r\n $orders->addFieldToFilter('seller_id', Mage::getSingleton('customer/session')->getCustomer()->getId());\r\n $orders ->getSelect()\r\n ->columns('SUM(seller_amount) as seller_amount')\r\n ->group('order_id'); \r\n /**\r\n * Set order for manage order\r\n */\r\n $orders->setOrder('order_id', 'desc');\r\n /**\r\n * Return orders\r\n */\r\n endif;\r\n return $orders; \r\n }", "public function updateStatusFinish()\n {\n $this->resetStatuses();\n }", "function attendance_remove_status($status, $context = null, $cm = null) {\n global $DB;\n if (empty($context)) {\n $context = context_system::instance();\n }\n $DB->set_field('attendance_statuses', 'deleted', 1, array('id' => $status->id));\n $event = \\mod_attendance\\event\\status_removed::create(array(\n 'objectid' => $status->id,\n 'context' => $context,\n 'other' => array(\n 'acronym' => $status->acronym,\n 'description' => $status->description\n )));\n if (!empty($cm)) {\n $event->add_record_snapshot('course_modules', $cm);\n }\n $event->add_record_snapshot('attendance_statuses', $status);\n $event->trigger();\n}", "public function filter_orders_by_export_status() {\n\t\tglobal $typenow;\n\n\t\tif ( 'shop_order' === $typenow ) {\n\n\t\t\t$count = $this->get_order_count();\n\n\t\t\t$terms = array(\n\t\t\t\t0 => (object) array( 'count' => $count['not_exported'], 'term' => __( 'Not Exported to CSV', 'woocommerce-customer-order-csv-export' ) ),\n\t\t\t\t1 => (object) array( 'count' => $count['exported'], 'term' => __( 'Exported to CSV', 'woocommerce-customer-order-csv-export' ) )\n\t\t\t);\n\n\t\t\t?>\n\t\t\t<select name=\"_shop_order_csv_export_status\" id=\"dropdown_shop_order_csv_export_status\">\n\t\t\t\t<option value=\"\"><?php _e( 'Show all orders', 'woocommerce-customer-order-csv-export' ); ?></option>\n\t\t\t\t<?php foreach ( $terms as $value => $term ) : ?>\n\t\t\t\t<option value=\"<?php echo esc_attr( $value ); ?>\" <?php echo esc_attr( isset( $_GET['_shop_order_csv_export_status'] ) ? selected( $value, $_GET['_shop_order_csv_export_status'], false ) : '' ); ?>>\n\t\t\t\t\t<?php printf( '%1$s (%2$s)', esc_html( $term->term ), esc_html( $term->count ) ); ?>\n\t\t\t\t</option>\n\t\t\t\t<?php endforeach; ?>\n\t\t\t</select>\n\t\t\t<?php\n\t\t}\n\t}", "function get_allowed_woo_status_ps_sms()\n{\n if (!function_exists('wc_get_order_statuses'))\n return;\n $statuses = wc_get_order_statuses() ? wc_get_order_statuses() : array();\n $order_status_settings = ps_sms_options('order_status', 'sms_buyer_settings', array());\n $allowed_statuses = array();\n foreach ((array) $statuses as $status_val => $status_name) {\n if (in_array(substr($status_val, 3), $order_status_settings))\n $allowed_statuses[substr($status_val, 3)] = $status_name;\n }\n return $allowed_statuses;\n}", "public function orderStatusManager(Mage_Sales_Model_Order $order, $paymentStatus = null)\n {\n $this->_getPaymentHelper()->orderStatusManager($order, $paymentStatus);\n $order->setShopgateStatusSet(true);\n\n return $order;\n }", "protected function patchOrderStatusRequest($body, $order_status_id)\n {\n // verify the required parameter 'body' is set\n if ($body === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling patchOrderStatus'\n );\n }\n // verify the required parameter 'order_status_id' is set\n if ($order_status_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $order_status_id when calling patchOrderStatus'\n );\n }\n if ($order_status_id < 1) {\n throw new \\InvalidArgumentException('invalid value for \"$order_status_id\" when calling DefaultApi.patchOrderStatus, must be bigger than or equal to 1.');\n }\n $resourcePath = '/order-statuses/{orderStatusId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // path params\n if ($order_status_id !== null) {\n $resourcePath = str_replace(\n '{' . 'orderStatusId' . '}',\n ObjectSerializer::toPathValue($order_status_id),\n $resourcePath\n );\n }\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\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 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 'PATCH',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function cancelOrder(Mage_Sales_Model_Order $order)\n {\n try {\n // works for 1.8 and 1.9\n $order->registerCancellation();\n } catch (Mage_Core_Exception $e) {\n // exist for backward compatibility with Magento 1.7\n $cancelState = Mage_Sales_Model_Order::STATE_CANCELED;\n /** @var Mage_Sales_Model_Order_Item $item */\n foreach ($order->getAllItems() as $item) {\n if ($cancelState != Mage_Sales_Model_Order::STATE_PROCESSING && $item->getQtyToRefund()) {\n if ($item->getQtyToShip() > $item->getQtyToCancel()) {\n $cancelState = Mage_Sales_Model_Order::STATE_PROCESSING;\n } else {\n $cancelState = Mage_Sales_Model_Order::STATE_COMPLETE;\n }\n }\n $item->cancel();\n }\n\n $order->setSubtotalCanceled($order->getSubtotal() - $order->getSubtotalInvoiced());\n $order->setBaseSubtotalCanceled($order->getBaseSubtotal() - $order->getBaseSubtotalInvoiced());\n\n $order->setTaxCanceled($order->getTaxAmount() - $order->getTaxInvoiced());\n $order->setBaseTaxCanceled($order->getBaseTaxAmount() - $order->getBaseTaxInvoiced());\n\n $order->setShippingCanceled($order->getShippingAmount() - $order->getShippingInvoiced());\n $order->setBaseShippingCanceled($order->getBaseShippingAmount() - $order->getBaseShippingInvoiced());\n\n $order->setDiscountCanceled(abs($order->getDiscountAmount()) - $order->getDiscountInvoiced());\n $order->setBaseDiscountCanceled(\n abs($order->getBaseDiscountAmount()) - $order->getBaseDiscountInvoiced()\n );\n\n $order->setTotalCanceled($order->getGrandTotal() - $order->getTotalPaid());\n $order->setBaseTotalCanceled($order->getBaseGrandTotal() - $order->getBaseTotalPaid());\n\n $order->setState($cancelState, true);\n }\n\t $order->save();\n }", "protected function deleteOrderStatusRequest($order_status_id)\n {\n // verify the required parameter 'order_status_id' is set\n if ($order_status_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $order_status_id when calling deleteOrderStatus'\n );\n }\n if ($order_status_id < 1) {\n throw new \\InvalidArgumentException('invalid value for \"$order_status_id\" when calling DefaultApi.deleteOrderStatus, must be bigger than or equal to 1.');\n }\n $resourcePath = '/order-statuses/{orderStatusId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // path params\n if ($order_status_id !== null) {\n $resourcePath = str_replace(\n '{' . 'orderStatusId' . '}',\n ObjectSerializer::toPathValue($order_status_id),\n $resourcePath\n );\n }\n // body params\n $_tempBody = null;\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n \n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n \n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function setTransactionStatus($orderId, string $status);", "public function status_filter() {\n\n\t\tglobal $typenow;\n\n\t\tif ( ('ticket' != $typenow ) || isset( $_GET['post_status'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this_sort = isset( $_GET['dev_status'] ) ? filter_input( INPUT_GET, 'dev_status', FILTER_SANITIZE_STRING ) : '';\n\t\t$all_selected = ( '' === $this_sort ) ? 'selected=\"selected\"' : '';\n\t\t$open_selected = ( ! isset( $_GET['dev_status'] ) && true === (bool) dev_get_option( 'hide_closed' ) || 'open' === $this_sort ) ? 'selected=\"selected\"' : '';\n\t\t$closed_selected = ( 'closed' === $this_sort ) ? 'selected=\"selected\"' : '';\n\t\t$dropdown = '<select id=\"dev_status\" name=\"dev_status\">';\n\t\t$dropdown .= \"<option value='' $all_selected>\" . __( 'Any Status', TEXTDOMAIN ) . \"</option>\";\n\t\t$dropdown .= \"<option value='open' $open_selected>\" . __( 'Open', TEXTDOMAIN ) . \"</option>\";\n\t\t$dropdown .= \"<option value='closed' $closed_selected>\" . __( 'Closed', TEXTDOMAIN ) . \"</option>\";\n\t\t$dropdown .= '</select>';\n\n\t\techo $dropdown;\n\n\t}", "public function getOrderStatus()\n {\n return $this->status;\n }", "public function completeIssueFee($status)\n {\n $this->status = $status;\n }", "public function updating(Order $order): void\n\t{\n\t\tif ($order->status == 'pending') {\n\t\t\t$order->booster_id = null;\n\t\t}\n\t}", "function getTenantStatusListBasedOnStatus($status_id)\n{\n $status_list = getTenantStatuses();\n unset($status_list[$status_id]);\n if($status_id == 2) {\n unset($status_list[1]); unset($status_list[4]);\n }\n else if($status_id == 3) {\n unset($status_list[1]); unset($status_list[2]);\n }\n return $status_list;\n}", "public function sendStatusUpdateNotifications(OrderEvent $event)\n {\n $order = $event->getOrder();\n switch ($order->getStatus()) {\n\n case Order::STATUS_AWAITING_SEPA:\n // send customer e-mail\n $customerEmailVars = array(\n 'customerName' => $order->getCustomer()->getFullname(),\n 'orderReference' => $order->getReference(),\n 'orderDate' => $order->getCreatedAt()->setTimezone(new \\DateTimeZone('Europe/Paris'))->format('d/m/Y à H:i'),\n 'shippingType' => Shipping::getReadableShippingType($order->getShippingType()),\n 'accountUrl' => $this->router->generate('order_customer_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL),\n 'orderTotalAmountTaxIncl' => number_format(($order->getTotalAmountTaxIncl() / 100), 2)\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_AWAITING_SEPA,\n $order->getCustomer()->getEmail(),\n $order->getCustomer()->getFullname(),\n $customerEmailVars\n );\n\n break;\n\n case Order::STATUS_NEW:\n // get payment\n $payment = $order->getPayments()->first();\n\n // is transport\n $isTransport = true;\n if (Shipping::TYPE_NOT_SHIPPED === $order->getShippingType()) {\n $isTransport = false;\n }\n\n // send customer e-mail\n $customerEmailVars = array(\n 'customerName' => $order->getCustomer()->getFullname(),\n 'invoiceUrl' => $this->router->generate('order_invoice_download', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL),\n 'orderReference' => $order->getReference(),\n 'orderDate' => $order->getCreatedAt()->setTimezone(new \\DateTimeZone('Europe/Paris'))->format('d/m/Y à H:i'),\n 'paymentId' => $payment->getChargeId(),\n 'shippingType' => Shipping::getReadableShippingType($order->getShippingType()),\n 'BoolTransport' => $isTransport,\n 'shippingAddress' => $order->getShippingAddress()->getFlatAddress(),\n 'accountUrl' => $this->router->generate('order_customer_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL),\n 'expectedDeliveryDate' => null !== $order->getExpectedDeliveryDate() ? $order->getExpectedDeliveryDate()->setTimezone(new \\DateTimeZone('Europe/Paris'))->format('d/m/Y') : '',\n 'orderTotalAmountTaxIncl' => number_format(($order->getTotalAmountTaxIncl() / 100), 2)\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_CONFIRMATION_CUSTOMER,\n $order->getCustomer()->getEmail(),\n $order->getCustomer()->getFullname(),\n $customerEmailVars\n );\n\n // send maker e-mail\n $makerEmailVars = array(\n 'makerName' => $order->getMaker()->getFullname(),\n 'orderReference' => $order->getReference(),\n 'orderDate' => $order->getCreatedAt()->setTimezone(new \\DateTimeZone('Europe/Paris'))->format('d/m/Y à H:i'),\n 'shippingType' => Shipping::getReadableShippingType($order->getShippingType()),\n 'BoolTransport' => $isTransport,\n 'accountUrl' => $this->router->generate('order_maker_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL),\n 'shippingLimitDate' => null !== $order->getShouldBeReadyAt() ? $order->getShouldBeReadyAt()->setTimezone(new \\DateTimeZone('Europe/Paris'))->format('d/m/Y') . ' avant 17h' : '',\n 'orderTotalAmountTaxIncl' => number_format(($order->getTotalAmountForMakerTaxIncl() / 100), 2)// only display production amount - coupon amount to maker\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_CONFIRMATION_MAKER,\n $order->getMaker()->getUser()->getEmail(),\n $order->getMaker()->getFullname(),\n $makerEmailVars\n );\n\n break;\n\n case Order::STATUS_CANCELED:\n // order has been canceled by the customer\n if (OrderEvent::ORIGIN_CUSTOMER === $event->getOrigin()) {\n\n // get order payment id\n $paymentId = 'n/a';\n $payments = $order->getPayments();\n if (0 < count($payments)) {\n /** @var Payment $payment */\n $payment = $payments[0];\n $paymentId = $payment->getChargeId();\n }\n\n // send customer e-mail\n $customerEmailVars = array(\n 'customerName' => $order->getCustomer()->getFullname(),\n 'orderReference' => $order->getReference(),\n 'orderDate' => $order->getCreatedAt()->setTimezone(new \\DateTimeZone('Europe/Paris'))->format('d/m/Y à H:i'),\n 'paymentId' => $paymentId,\n 'accountUrl' => $this->router->generate('order_customer_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL),\n 'orderTotalAmountTaxIncl' => number_format(($order->getTotalAmountTaxIncl() / 100), 2)\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_CANCELLATION_CUSTOMER,\n $order->getCustomer()->getEmail(),\n $order->getCustomer()->getFullname(),\n $customerEmailVars\n );\n\n // send maker e-mail\n $makerEmailVars = array(\n 'makerName' => $order->getMaker()->getFullname(),\n 'orderReference' => $order->getReference(),\n 'orderDate' => $order->getCreatedAt()->setTimezone(new \\DateTimeZone('Europe/Paris'))->format('d/m/Y à H:i'),\n 'orderTotalAmountTaxIncl' => number_format(($order->getTotalAmountForMakerTaxIncl() / 100), 2)// only display production amount - coupon amount to maker\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_CANCELLATION_MAKER,\n $order->getMaker()->getUser()->getEmail(),\n $order->getMaker()->getFullname(),\n $makerEmailVars\n );\n }\n break;\n\n case Order::STATUS_TRANSIT:\n\n // get shipment\n $shipments = $order->getShipments();\n /** @var Shipment $shipment */\n $shipment = $shipments[0];\n\n // send customer e-mail\n $emailVars = array(\n 'customerName' => $order->getCustomer()->getFullname(),\n 'orderReference' => $order->getReference(),\n 'shippingType' => Shipping::getReadableShippingType($order->getShippingType()),\n 'shippingAddress' => $order->getShippingAddress()->getFlatAddress(),\n 'trackingUrl' => $shipment->getTrackingUrl(),\n 'trackingNumber' => $shipment->getParcelNumber(),\n 'accountUrl' => $this->router->generate('order_customer_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL),\n 'orderTotalAmountTaxIncl' => number_format(($order->getTotalAmountTaxIncl() / 100), 2)\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_SHIPPED,\n $order->getCustomer()->getEmail(),\n $order->getCustomer()->getFullname(),\n $emailVars\n );\n\n break;\n\n case Order::STATUS_READY_FOR_PICKUP:\n\n // send customer e-mail\n $emailVars = array(\n 'customerName' => $order->getCustomer()->getFullname(),\n 'orderReference' => $order->getReference(),\n 'orderDate' => $order->getCreatedAt()->setTimezone(new \\DateTimeZone('Europe/Paris'))->format('d/m/Y à H:i'),\n 'shippingType' => Shipping::getReadableShippingType($order->getShippingType()),\n 'shippingAddress' => $order->getShippingAddress()->getFlatAddress(),\n 'accountUrl' => $this->router->generate('order_customer_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL),\n 'orderTotalAmountTaxIncl' => number_format(($order->getTotalAmountTaxIncl() / 100), 2)\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_READY_FOR_PICKUP,\n $order->getCustomer()->getEmail(),\n $order->getCustomer()->getFullname(),\n $emailVars\n );\n\n break;\n\n case Order::STATUS_REFUNDED:\n\n // get order payment id\n $paymentId = 'n/a';\n $payments = $order->getPayments();\n if (0 < count($payments)) {\n /** @var Payment $payment */\n $payment = $payments[0];\n $paymentId = $payment->getChargeId();\n }\n\n // get order refund id\n $refundId = 'n/a';\n $refunds = $order->getRefunds();\n if (0 < count($refunds)) {\n /** @var Refund $refund */\n $refund = $refunds[0];\n $refundId = $refund->getRefundId();\n }\n\n // send customer e-mail\n $customerEmailVars = array(\n 'customerName' => $order->getCustomer()->getFullname(),\n 'orderReference' => $order->getReference(),\n 'orderDate' => $order->getCreatedAt()->setTimezone(new \\DateTimeZone('Europe/Paris'))->format('d/m/Y à H:i'),\n 'paymentId' => $paymentId,\n 'refundId' => $refundId,\n 'orderTotalAmountTaxIncl' => number_format(($order->getTotalAmountTaxIncl() / 100), 2)\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_REFUNDED,\n $order->getCustomer()->getEmail(),\n $order->getCustomer()->getFullname(),\n $customerEmailVars\n );\n\n break;\n\n case Order::STATUS_DELIVERED:\n\n // send customer e-mail\n /* There is no longer any immediate notification sending when the order is delivered. The notification is made on D + 1 via the reminder system\n $customerEmailVars = array(\n 'customerName' => $order->getCustomer()->getFullname(),\n 'orderReference' => $order->getReference(),\n //'ratingUrl' => $this->router->generate('order_customer_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL) . '#rating'\n 'ratingUrl' => $this->router->generate('order_rating', array('token' => $order->getToken()), $this->router::ABSOLUTE_URL) . '#rating'\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_RATING,\n $order->getCustomer()->getEmail(),\n $order->getCustomer()->getFullname(),\n $customerEmailVars\n );\n */\n break;\n\n case Order::STATUS_CLOSED:\n\n if ($order->getRating()->getEnabled() == True ) {\n // send maker e-mail\n $makerEmailVars = array(\n 'makerName' => $order->getMaker()->getFullname(),\n 'orderReference' => $order->getReference(),\n 'orderDate' => $order->getCreatedAt()->setTimezone(new \\DateTimeZone('Europe/Paris'))->format('d/m/Y à H:i'),\n 'orderRateValue' => $order->getRating()->getRate(),\n 'orderRateValue' => $order->getRating()->getComment(),\n 'accountUrl' => $this->router->generate('order_maker_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL)\n\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_RATE,\n $order->getMaker()->getUser()->getEmail(),\n $order->getMaker()->getFullname(),\n $makerEmailVars\n );\n }\n break;\n\n\n\n\n case Order::STATUS_FILE_AVAILABLE:\n\n // send customer e-mail\n $customerEmailVars = array(\n 'customerName' => $order->getCustomer()->getFullname(),\n 'orderReference' => $order->getReference(),\n 'accountUrl' => $this->router->generate('order_customer_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL)\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_FILE_AVAILABLE_CUSTOMER,\n $order->getCustomer()->getEmail(),\n $order->getCustomer()->getFullname(),\n $customerEmailVars\n );\n\n break;\n\n case Order::STATUS_FILE_REJECTED:\n\n // send maker e-mail\n $makerEmailVars = array(\n 'makerName' => $order->getMaker()->getFullname(),\n 'orderReference' => $order->getReference(),\n 'accountUrl' => $this->router->generate('order_maker_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL)\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_FILE_REJECTED_MAKER,\n $order->getMaker()->getUser()->getEmail(),\n $order->getMaker()->getFullname(),\n $makerEmailVars\n );\n\n break;\n\n case Order::STATUS_FILE_VALIDATED:\n\n // send maker e-mail\n $makerEmailVars = array(\n 'makerName' => $order->getMaker()->getFullname(),\n 'orderReference' => $order->getReference(),\n 'BoolTransport' => $order->getQuotation()->getProject()->getType()->isShipping(),\n 'accountUrl' => $this->router->generate('order_maker_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL)\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_FILE_VALIDATED_MAKER,\n $order->getMaker()->getUser()->getEmail(),\n $order->getMaker()->getFullname(),\n $makerEmailVars\n );\n\n break;\n }\n }", "public function edit(StatusOrder $statusOrder)\n {\n //\n }", "function &getStatusOptions() {\n\t\t$statusOptions = array(\n\t\t\tSUBSCRIPTION_STATUS_ACTIVE => 'subscriptions.status.active',\n\t\t\tSUBSCRIPTION_STATUS_NEEDS_INFORMATION => 'subscriptions.status.needsInformation',\n\t\t\tSUBSCRIPTION_STATUS_NEEDS_APPROVAL => 'subscriptions.status.needsApproval',\n\t\t\tSUBSCRIPTION_STATUS_AWAITING_MANUAL_PAYMENT => 'subscriptions.status.awaitingManualPayment',\n\t\t\tSUBSCRIPTION_STATUS_AWAITING_ONLINE_PAYMENT => 'subscriptions.status.awaitingOnlinePayment',\n\t\t\tSUBSCRIPTION_STATUS_OTHER => 'subscriptions.status.other'\n\t\t);\n\n\t\treturn $statusOptions;\n\t}", "private function getOrderStatus(OrderModel $order)\n {\n $orderItems = $order->getAllItems();\n $status = [];\n foreach ($orderItems as $orderItem) {\n if (!$orderItem->getParentItemId()) {\n $status[] = $this->getItemStatus($orderItem);\n }\n }\n \n if (count(array_unique($status)) == 1) {\n return current($status);\n }\n \n if (in_array($this->orderStatusHelper->getOrderedStatus(), $status)) {\n return $this->orderStatusHelper->getPartialStatus();\n }\n \n if (in_array($this->orderStatusHelper->getPartialStatus(), $status)) {\n return $this->orderStatusHelper->getPartialStatus();\n }\n \n if (in_array($this->orderStatusHelper->getCancelledStatus(), $status)\n && in_array($this->orderStatusHelper->getShippedStatus(), $status)) {\n return $this->orderStatusHelper->getShippedStatus();\n }\n \n return $this->orderStatusHelper->getPartialStatus();\n }", "public function listsstatusdelete($status_id)\r\n {\r\n $deleted_status = Status::destroy($status_id);\r\n if($deleted_status){\r\n return response()->json(['msg' => 'Deleted status']);\r\n }\r\n }", "public function displayAjaxGetSystemOrderStatuses()\n {\n $result = array();\n $states = OrderState::getOrderStates($this->context->language->id);\n\n foreach ($states as $state) {\n $result[] = array('code' => $state['id_order_state'], 'label' => $state['name']);\n }\n\n PacklinkPrestaShopUtility::dieJson($result);\n }", "public function setStatusesForRemoving(array $statuses = [])\n {\n $this->statusesForRemoving = $statuses;\n\n return $this;\n }", "public function set_mms_status($_status = NULL)\n {\n if ($_status && is_array($_status)) {\n \n // Set supplied _status argument as the available status options\n $this->_mms_status = array(\n $_status\n );\n } else \n if (isset($this->_config['data']['mms']['customer_codes'])) {\n \n // If no supplied argument then check if config customer_codes exist and use that\n $this->_mms_status = $this->_config['data']['mms']['status'];\n } else {\n \n // Else set default fallback value if none specified in the config and or given in method argument\n $this->_mms_status = explode(',', self::DEFAULT_MMS_STATUS);\n }\n }", "private function deleteOrderInformation()\n {\n if (version_compare(Shopware()->Config()->get( 'Version' ), '5.2.0', '<')) {\n $sql = \"UPDATE `s_core_snippets`\n SET `value` = CASE\n WHEN `value` = 'Transaction ID' THEN 'Free text 4'\n WHEN `value` = 'Transaktions-ID' THEN 'Freitextfeld 4'\n ELSE `value`\n END\n WHERE `namespace` = 'backend/order/main'\n AND `value` IN ('Transaction ID','Transaktions-ID')\";\n } elseif (version_compare(Shopware()->Config()->get( 'Version' ), '5.2.0', '>=')) {\n $sql = \"DELETE FROM s_attribute_configuration WHERE `table_name` = 's_order_attributes' AND\n `column_name` IN ('attribute4') AND\n `label` IN ('Transaction ID')\";\n }\n Shopware()->Db()->query($sql);\n }", "public function getTaskStatusOptions() {\n return $this->taskStatusOptions;\n }", "public function setStatuses(&$var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::ENUM, \\Salesorders\\V1\\Status::class);\n $this->statuses = $arr;\n }", "function ostGetCompletedOrderStatus(){\r\n\r\n\treturn CONF_ORDSTATUS_DELIVERED;\r\n}", "public function destroy(User_status $userstatus)\n {\n //\n }", "public function destroy(Status $status)\n {\n $this->authorize('delete', $status);\n $status->delete();\n }", "public function setOrderStatusFilter($list)\n {\n if (is_string($list)) {\n //if single string, set as filter\n $this->resetOrderStatusFilter();\n $this->options['OrderStatus.Status.1'] = $list;\n } else if (is_array($list)) {\n //if array of strings, set all filters\n $this->resetOrderStatusFilter();\n $i = 1;\n foreach ($list as $x) {\n $this->options['OrderStatus.Status.' . $i] = $x;\n $i++;\n }\n } else {\n return false;\n }\n }", "public function updateOrderStatus($orderStatus, $comment = '')\n {\n $this->openCart->load->model('extension/payment/mundipagg_order_processing');\n $model = $this->openCart->model_extension_payment_mundipagg_order_processing;\n\n $model->addOrderHistory(\n $this->openCart->session->data['order_id'],\n $orderStatus,\n $comment,\n true\n );\n\n $model->setOrderStatus(\n $this->openCart->session->data['order_id'],\n $orderStatus\n );\n }", "public function reset()\n {\n $this->values[self::_STATUS] = null;\n $this->values[self::_REWARDS] = array();\n }", "public function process_admin_options() {\n\t\t$method_order = isset( $_POST['method_order'] ) ? $_POST['method_order'] : '';\n\t\t$method_priority = isset( $_POST['method_priority'] ) ? $_POST['method_priority'] : '';\n\t\t$order = array();\n\t\t$selection_priority = array();\n\n\t\tif ( is_array( $method_order ) && sizeof( $method_order ) > 0 ) {\n\t\t\t$loop = 0;\n\t\t\tforeach ( $method_order as $method_id ) {\n\t\t\t\t$order[ $method_id ] = $loop;\n\t\t\t\t$selection_priority[ $method_id ] = absint( $method_priority[ $method_id ] );\n\t\t\t\t$loop ++;\n\t\t\t}\n\t\t}\n\n\t\tupdate_option( 'woocommerce_shipping_method_selection_priority', $selection_priority );\n\t\tupdate_option( 'woocommerce_shipping_method_order', $order );\n\t}", "function amt_wsc_team_deactivate() {\n\t// -- delete options\n\t// -- delete_option('total_columns');\n}", "public function update(Request $request, OrderStatus $orderStatus)\n {\n //\n }", "public function options(Request $request): array\n {\n return OrderStatusType::getNovaStatusList();\n }", "public function prune($rOperationStatusRequiredOptions = null)\n {\n if ($rOperationStatusRequiredOptions) {\n $this->addCond('pruneCond0', $this->getAliasedColName(ROperationStatusRequiredOptionsPeer::R_OPERATION_STATUS_REQUIRED_OPTIONS_R_OPERATION_STATUS_OS_ID), $rOperationStatusRequiredOptions->getROperationStatusRequiredOptionsROperationStatusOsId(), Criteria::NOT_EQUAL);\n $this->addCond('pruneCond1', $this->getAliasedColName(ROperationStatusRequiredOptionsPeer::R_OPERATION_STATUS_REQUIRED_OPTIONS_R_OPERATION_OPTION_ID), $rOperationStatusRequiredOptions->getROperationStatusRequiredOptionsROperationOptionId(), Criteria::NOT_EQUAL);\n $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR);\n }\n\n return $this;\n }", "public function update_status($order_id, $payment_status)\n\t{\n\t\t$new_status_id = static::get_status_id($payment_status);\n\n\t\t$order_updated = false;\n\t\t$check_status_query = tep_db_query(\"select customers_name, customers_email_address, orders_status, date_purchased from \" . TABLE_ORDERS . \" where orders_id = '\" . intval($order_id) . \"'\");\n\t\t$check_status = tep_db_fetch_array($check_status_query);\n\t\t$customer_notified = '0';\n\n\t\tif ( $new_status_id && $check_status['orders_status'] != $new_status_id ) \n\t\t{\n\t\t\tif ( $this->get_status_notify($payment_status) ) \n\t\t\t{\n\t\t\t\t$internal_status = $this->get_internal_status_name_from_id($new_status_id);\n\n\t\t\t\t$email = STORE_NAME . \"\\n\" .\n\t\t\t\t\t\"------------------------------------------------------\\n\" .\n\t\t\t\t\t'Order Number: ' . $order_id . \"\\n\" .\n\t\t\t\t\t'Detailed Invoice: ' . tep_href_link(\"account_history_info.php\", 'order_id=' . $order_id, 'SSL') . \"\\n\" .\n\t\t\t\t\t'Date Ordered: ' . tep_date_long($check_status['date_purchased']) . \"\\n\\n\" .\n\t\t\t\t\t'Your order has been updated to the following status.' . \"\\n\\n\" .\n\t\t\t\t\t'New status: ' . $internal_status . \"\\n\\n\" .\n\t\t\t\t\t'Please reply to this email if you have any questions.' . \"\\n\";\n\n\t\t\t\ttep_mail($check_status['customers_name'], $check_status['customers_email_address'], \"Order Update\", $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);\n\t\t\t\t$customer_notified = '1';\n\t\t\t}\n\n\t\t\t// Only update order status when order_status is different then the saved order_status\n\t\t\ttep_db_query(\"UPDATE orders SET orders_status = '\" . $new_status_id . \"', last_modified = now() WHERE orders_id = \" . intval($order_id));\n\t\t\t$this->add_order_history($order_id, $payment_status, $customer_notified);\n\t\t}\n\t}", "public function updateStatus(Request $request, Order $order)\n {\n $this->authorize('update', $order);\n $input = $request->input();\n\n $status = $order->fulfillment_status;\n\n foreach (Order::FULFILLMENT_STATUS_ARRAY as $key => $value) {\n if ($value === $input['status']) {\n $status = $key;\n }\n }\n\n //$order->history()->create(['order_id' => $order->id, 'old_status' => $order->fulfillment_status, 'new_status' => $status]);\n $order->fulfillment_status = $status;\n\n $order->save();\n\n $order = $order->fresh(['user', 'history']);\n\n return $this->respond($order);\n }", "public function toOptionArray()\n {\n $returnArray = array();\n $returnArray[] = array('value' => '', 'label' => Mage::helper('fooman_ordermanager')->__('Default'));\n foreach (Mage::getModel('sales/order_config')->getStatuses() as $status => $statusLabel) {\n $returnArray[] = array('value' => $status, 'label' => Mage::helper('sales')->__($statusLabel));\n }\n return $returnArray;\n }", "public function set_status( $status ) {\n\t\t$this->ryte_option[ self::STATUS ] = $status;\n\t}", "public function change_promocode_status_global(){\n\t\tif(count($_POST['checkbox_id']) > 0 && $_POST['statusMode'] != ''){\n\t\t\t$this->promocode_model->activeInactiveCommon(PROMOCODE,'_id');\n\t\t\tif (strtolower($_POST['statusMode']) == 'delete'){\n\t\t\t\t$this->setErrorMessage('success','Coupon Code deleted successfully','admin_coupon_code_delete_success');\n\t\t\t}else {\n\t\t\t\t$this->setErrorMessage('success','Coupon Code status changed successfully','admin_coupon_code_status_change');\n\t\t\t}\n\t\t\tredirect(ADMIN_ENC_URL.'/promocode/display_promocode');\n\t\t}\n\t}" ]
[ "0.7200157", "0.6744555", "0.6386438", "0.628041", "0.6238296", "0.6193706", "0.61807716", "0.6041361", "0.58759105", "0.5735232", "0.5657046", "0.5610992", "0.5541782", "0.553637", "0.54069424", "0.5340629", "0.5330095", "0.5291634", "0.52896494", "0.52878654", "0.5211265", "0.52075124", "0.52047735", "0.51841784", "0.51760113", "0.5144125", "0.51435786", "0.51078963", "0.51072925", "0.5072964", "0.5062893", "0.5061977", "0.50603026", "0.5053128", "0.5053012", "0.503488", "0.502412", "0.5016238", "0.501158", "0.50114673", "0.5006579", "0.49922502", "0.49791476", "0.49725628", "0.49709862", "0.49652508", "0.4961512", "0.49240768", "0.49110124", "0.49101985", "0.49085075", "0.48776984", "0.4859955", "0.48346114", "0.4829845", "0.4829054", "0.48201254", "0.4816872", "0.4816097", "0.48088074", "0.48072863", "0.48035634", "0.47916627", "0.47899655", "0.47869584", "0.47850645", "0.477876", "0.47761032", "0.47690845", "0.47662702", "0.47638798", "0.4753759", "0.47473562", "0.47113532", "0.47081852", "0.4702509", "0.46923745", "0.4692139", "0.4686707", "0.4678471", "0.46754697", "0.4669211", "0.46652", "0.46601048", "0.46576878", "0.46496853", "0.46477872", "0.4645683", "0.46423164", "0.4639407", "0.4636444", "0.4633709", "0.4632038", "0.4631097", "0.46304187", "0.46298867", "0.46270895", "0.46199733", "0.4614442", "0.46114838" ]
0.71136445
1
Returns the storage name/identifier.
public function getName() { return 'posts'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStorageId()\n {\n return $this->_getField(self::$STORAGE_ID);\n }", "public function getStorageId(): string\n {\n return sprintf('$%s', $this->getData());\n }", "public function getStorageId() {\n return $this->configuration['storage_id'] ?: NULL;\n }", "private function _getStorageName() {\n\t\tif($this->_rememberMe) {\n\t\t\treturn self::TOKEN_COOKIE_STORAGE;\n\t\t}\n\n\t\treturn self::TOKEN_SESSION_STORAGE;\n\t}", "public function getStorageUid();", "public static function getStorageName()\n {\n return 'nb_icontact_prospect';\n }", "protected function getStoragePID() {\r\n\t\t$tsConf = tx_pttools_div::typoscriptRegistry('plugin.tx_ptgsaconfmgm.');\r\n\t\t$persDataStorage = $tsConf['persDataStorage'];\r\n\t\treturn $persDataStorage;\r\n\t}", "public function getStorage($identifier) {\n\t\t\n\t\t$storage_folder = getStorageFolder($identifier);\n\t\t\n\t\t$storage_folder = str_replace(WWW_ROOT, '', $storage_folder);\n\t\t\n\t\treturn $storage_folder;\n\t\t\n\t}", "public static function getStorageName()\n {\n return 'nb_domain_zone';\n }", "public function getStoragePrimaryKey();", "public function getStorageInfo()\n\t{\n\t\treturn 'table=`'.$this->getTable().'\\'';\n\t}", "public function getCurrentStorage() {\n return @$this->attributes['current_storage'];\n }", "public static function getStorageName()\n {\n return 'nb_catalog_item_lang';\n }", "public function getStorageNode()\n {\n return $this->get('storagenode');\n }", "protected function getStorageInfo() {\n\t\t$dirInfo = \\OC\\Files\\Filesystem::getFileInfo('/', false);\n\t\treturn \\OC_Helper::getStorageInfo('/', $dirInfo);\n\t}", "public function getStorageGroup()\n {\n return $this->get('storagegroup');\n }", "public function getStorage()\n {\n return $this->get(self::_STORAGE);\n }", "public function getStorageDir() : string\n {\n return $this->storageDir;\n }", "public static function getStorage() {}", "public static function getStorageTableName() {}", "public function storageType();", "public function get_storage_unit()\n {\n return $this->storage_unit;\n }", "protected function getStorageFile()\n\t{\n\t\t$this->createDirectory();\n\t\treturn $this->storagePath.$this->storageFileName;\n\t}", "public function getStorage()\r\n {\r\n return $this->storage;\r\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function getStorage() {}", "public function getStorage() {}", "public function getStorage() {}", "public function getStorageService()\n {\n $class = $this->app['config']->get('shoppingcart.storage','session');\n\n switch ($class)\n {\n case 'session':\n return 'session';\n break;\n case 'database':\n return 'database';\n break;\n default:\n return 'session';\n break;\n }\n }", "public function getStorageType()\n\t{\n\t\treturn \"db\";\n\t}", "public function getStoragePath(){\n return $this->storageEngine->getStoragePath();\n }", "public function getStorage();", "public function getStorage();", "protected function getStorage($storageName)\n {\n return Config::get('mysql_dump.storage.' . $storageName);\n }", "function getStorage() ;", "public function getStoragePath()\n {\n return $this->storagePath;\n }", "public function getStoragePath()\n {\n return $this->storagePath;\n }", "public function getStoreName();", "protected function getStorageDetails($identifier) {\n $storage = $this->_config->get('storage');\n\n if (isset($storage[$identifier])) {\n return $storage[$identifier];\n }\n\n throw new \\Exception('Storage identifier ' . $identifier . ' was not found');\n }", "public function getStoragePath(): string;", "public function getStorage() {\n\t\treturn $this->_storage;\n\t}", "function getStorage();", "public function getStorage()\n {\n return $this->_storage;\n }", "public function getDistriStoreName()\n {\n return $this->distri_store_name;\n }", "public function getIdentity()\n {\n if (empty($this->storage[$this->storageKey])) {\n return null;\n }\n return $this->storage[$this->storageKey];\n }", "public function getIdentifier()\n {\n return $this->getAttribute('metadata.name', null);\n }", "public function key()\n {\n $currentRecord = $this->storage->current();\n return $currentRecord['uid'];\n }", "public function getDefaultBackendStoragePid() {}", "public function getDefaultBackendStoragePid() {}", "public function getStoragePid(): array;", "private function getCacheKey($storage_name){\n return $storage_name.'_'.$this->media_type.'_'.$this->media_id;\n }", "public function getUserStorageId(): ?int\n\t{\n\t\treturn $this->session->get('istorage');\n\t}", "function getStorageEngine() {\n \treturn $this->storage_engine;\n }", "public static function getStorageName()\n {\n return 'nb_commerce_product_category';\n }", "public function getStoreName(): string\n {\n return $this->storeName;\n }", "public function getStoreName()\n {\n return $this->store_name;\n }", "public function getStoreName()\n {\n return $this->store_name;\n }", "public function storagePath()\n {\n return $this->storagePath ?: $this->basePath . DIRECTORY_SEPARATOR . 'storage';\n }", "static function getHandlerName ()\n {\n return __('Internal storage');\n }", "public function getRootStorage() {\n return @$this->attributes['root_storage'];\n }", "public function getStorageType() {\n return $this->configuration['storage_type'] ?: NULL;\n }", "public function getStorageEndpoint()\n\t{\n\t\treturn $this->storageEndpoint;\n\t}", "public function storageKey()\n\t{\n\t\treturn md5($this->product->storageKey() . \"combination:{$this->getKey()}\");\n\t}", "public function getStorageClass()\n {\n return $this->data['storage_class'];\n }", "public function getStorageClass()\n {\n return $this->storage_class;\n }", "public function getStorageService();", "public function getStorage(): StorageInterface\n {\n return $this->configuration[ConfigurationInterface::STORAGE];\n }", "public function getStorage()\n {\n if (NULL === $this->_storage) {\n $this->setStorage(new Auth\\Storage\\MultipleIdentities());\n }\n \n return $this->_storage;\n }", "public function storagePath()\n {\n return $this->basePath . DIRECTORY_SEPARATOR . 'storage';\n }", "private function _getStoreId() {\n $store_id = 1;\n return $store_id;\n }", "public static function get(string $name): IdStorage {\n if (!isset(self::$instances[$name])) {\n static::$instances[$name] = new static();\n }\n return static::$instances[$name];\n }", "public function getStoreName()\n {\n return $this->_fields['StoreName']['FieldValue'];\n }", "public function getAzureFilesStorageShareName() {\n return @$this->attributes['azure_files_storage_share_name'];\n }", "public function getStorageClass()\n {\n return $this->_storageClass;\n }", "private function _getStorageFilename($storageGroup, $storageId, $createPath) {\n return $this->_getFileLocation(\n $this->_storageDirectory.DIRECTORY_SEPARATOR.$storageGroup,\n $storageId,\n $createPath\n );\n }", "function storage_path()\n {\n return base_path() . '/storage';\n }", "protected function getInstanceIdentifierName(): string\n\t{\n\t\treturn (string) $this->getKeyName();\n\t}", "public function getStorage()\n {\n if (null === $this->storage) {\n $this->setStorage();\n }\n return $this->storage;\n }", "public function getStoreId(){\n return $this->_getData(self::STORE_ID);\n }", "public function getInstanceIdentifier(): string\n\t{\n\t\treturn (string) $this->getKey();\n\t}", "public function getStorageRecord() {}", "public static function getStorageDescriptorPath()\n {\n return preg_replace('/.php$/', '.json', __FILE__);\n }", "public static function getStorageDescriptorPath()\n {\n return preg_replace('/.php$/', '.json', __FILE__);\n }", "public static function getStorageDescriptorPath()\n {\n return preg_replace('/.php$/', '.json', __FILE__);\n }", "public static function getStorageDescriptorPath()\n {\n return preg_replace('/.php$/', '.json', __FILE__);\n }", "protected function getImagePoolStorageUid(): int\n {\n if ($this->imagePoolStorageUid) {\n return $this->imagePoolStorageUid;\n }\n\n $con = $this->getConnectionPool()->getConnectionForTable('sys_file_storage');\n\n $res = $con->select(['uid'], 'sys_file_storage', ['name' => static::IMAGE_POOL_STORAGE_NAME])->fetch();\n\n if ($res) {\n $this->imagePoolStorageUid = (int) $res['uid'];\n } else {\n throw new RuntimeException(sprintf(\n 'Storage with name \"%s\" was not found.',\n static::IMAGE_POOL_STORAGE_NAME\n ));\n }\n\n return $this->imagePoolStorageUid;\n }", "public function describeStorage(array $context = []): string;", "public function getStorage() {\n return $this->sectionStorage;\n }", "public function getAzureFilesStorageAccount() {\n return @$this->attributes['azure_files_storage_account'];\n }", "abstract public function getStorageName(Carbon $referenceDate): string;", "public function getIdentifier(): string\n {\n return $this->identifier;\n }", "public function getIdentifier(): string\n {\n return $this->identifier;\n }", "public function getIdentifier(): string\n {\n return $this->identifier;\n }" ]
[ "0.84715825", "0.81487834", "0.80814475", "0.7584611", "0.75733274", "0.7295246", "0.72181445", "0.7213224", "0.7157246", "0.7135782", "0.70886123", "0.6855157", "0.6830804", "0.68037504", "0.67813414", "0.67291063", "0.670305", "0.6688197", "0.6674771", "0.6669729", "0.6652491", "0.6638926", "0.66312975", "0.66117245", "0.66057485", "0.66057485", "0.66057485", "0.66057485", "0.66057485", "0.66057485", "0.66057485", "0.66057485", "0.66057485", "0.6600108", "0.6599648", "0.6599589", "0.6588456", "0.6585023", "0.6572987", "0.6572714", "0.6572714", "0.65273076", "0.6515645", "0.649953", "0.649953", "0.6475293", "0.64733845", "0.6472776", "0.64667726", "0.6459208", "0.645466", "0.6452137", "0.64457184", "0.64312416", "0.6422289", "0.64143366", "0.64143366", "0.6408436", "0.63910633", "0.636211", "0.63331926", "0.631022", "0.6304916", "0.6298066", "0.6298066", "0.6291661", "0.6286285", "0.628424", "0.6274452", "0.62736124", "0.62608397", "0.622721", "0.62161744", "0.6205029", "0.61882997", "0.6171781", "0.61633474", "0.6158831", "0.6152637", "0.61449313", "0.61098444", "0.6109799", "0.61027515", "0.6082694", "0.6072578", "0.6067611", "0.6055485", "0.6049168", "0.602363", "0.6010286", "0.6010286", "0.6010286", "0.6010286", "0.59974575", "0.5982631", "0.5982488", "0.59709257", "0.5961508", "0.59585905", "0.59585905", "0.59585905" ]
0.0
-1
Locates and returns multiple records.
public function find(array $where) { $posts = get_posts($where); return empty($posts) ? array() : array_map('WordPress\Model\Post\Post::forgeObject', $posts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMultipleRecords() {\n $i = 0;\n $output = [];\n $_this = $this;\n while($row = $_this->fetchAssoc()){\n $output[\"data\"][$i] = $row;\n $i++;\n }\n return $output;\n }", "public function getMultipleData();", "public static function getMultiRecord(){\n $sql = \"SELECT user_id, user_name, email, password, phone, address, type, signup_day, del_flag FROM user_t\";\n $records = Database::currentDb()->getMultiRecord($sql, $total_row);\n return $records;\n }", "protected final function fetchRecords()\n {\n $this->query->setLimit(\n (($this->parameters->getCurrentPage() - 1) * $this->parameters->getResultsPerPage()),\n $this->parameters->getResultsPerPage()\n );\n\n $this->data = $this->query->execute()->getAssociative();\n }", "public function get_records(){\n\t\t$records = array();\n\t\t$this->do_db();\n\t\t$tmps\t = $this->last_result;\n\t\t$db\t\t = $this->db;\n\t\twhile($record\t = $db->fetch_array($tmps)){\n\t\t\t$records[] = $record;\n\t\t}\n\t\treturn $records;\n\t}", "public function fetch_multi($s_where=null,$i_start=null,$i_limit=null)\r\n {\r\n \r\n }", "private function get_recs() {\n\tglobal $_DB;\n\n\t$sql = \"SELECT e00.name, e00.property_id AS name_id,\n\t\t\t\te02.name AS value, e02.prop_value_id AS value_id\n\t\t\tFROM (\n\t\t\t\tSELECT property_id, name FROM \".$_DB->prefix.\"e00_property\n\t\t\t\tWHERE organization_idref = \".$_SESSION[\"organization_id\"].\"\n\t\t\t) AS e00\n\t\t\tJOIN \".$_DB->prefix.\"e02_prop_value AS e02 ON e02.property_idref = e00.property_id\n\t\t\tORDER BY name, value;\";\n\t$stmt = $_DB->query($sql);\n\t$this->records = array();\n\twhile ($row = $stmt->fetchObject()) {\n\t\t$record = array(\n\t\t\t\t\"name\" =>\t\t$row->name,\n\t\t\t\t\"name_id\" =>\t$row->name_id,\n\t\t\t\t\"value\" =>\t\t$row->value,\n\t\t\t\t\"value_id\" =>\t$row->value_id,\n\t\t);\n\t\t$this->records[] = $record;\n\t}\n\t$stmt->closeCursor();\n}", "public function fetchRecords() {\n return self::all();\n }", "public function records() { return $this->_m_records; }", "public function populate()\n\t{\n\t\tif (!$this->index)\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\t$records = $this->model->find(array_keys($this->index));\n\n\t\tforeach ($records as $nid => $record)\n\t\t{\n\t\t\t$this->index[$nid]->record = $record;\n\t\t}\n\n\t\treturn $records;\n\t}", "function fetchAll($var){\n //Create an array variable to hold list of search records\n $result_array = array();\n\n //create an instance of the product class\n $object = new API();\n\n //run the search product method\n $records = $object->fetchOne($var);\n\n //check if the method worked\n if ($records) {\n\n while ($one_record = $object->db_fetch()) {\n\n //Assign each result to the array\n $result_array[] = $one_record;\n }\n }\n //return the array\n return $result_array;\n}", "public function getAllRecords();", "public function read()\n {\n $query = $this->queryBuilder->new($this->entityName)\n ->select()\n ->get();\n\n return $this->executeQueryForMultipleResults($query);\n }", "public function fetchAll()\n\t{\n\t\t$aReturn = Array();\n\t\twhile( $oRecord = $this->next() )\n\t\t\tarray_push( $aReturn, $oRecord );\n\t\t$this->rewind();\n\t\treturn $aReturn;\n\t}", "public function getRecords(){\n // Get the sql statement\n $sql = $this->getSql($this->filters);\n // Prepare the query\n $stmt = $this->db->query($sql);\n // Fetch values from PDO array\n return $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n }", "public function getRecords()\n {\n $result = $this->fetchAll($this->select()->order('id ASC'))->toArray();\n return $result;\n }", "public function getRecordsAt($offset)\n {\n return $this->get(self::_RECORDS, $offset);\n }", "public function getQueryRecords()\n {\n return $this->get(self::_QUERY_RECORDS);\n }", "public function load()\n\t{\n\t\tif ( !is_array( $this->_id ) )\n\t\t\tthrow new \\RuntimeException( 'item does not exist (anymore)' );\n\n\t\tif ( !is_array( $this->_record ) )\n\t\t{\n\t\t\tstatic::updateSchema( $this->_source );\n\n\t\t\t$query = $this->_source->createQuery( static::set() );\n\n\t\t\tforeach ( $this->_id as $name => $value )\n\t\t\t\t$query->addCondition( $this->_source->quoteName( $name ) . '=?', true, $value );\n\n\t\t\t$matches = $query->limit( 2 )->execute();\n\n\t\t\tif ( $matches->count() !== 1 )\n\t\t\t\tthrow new datasource_exception( $this->_source, 'item missing in datasource' );\n\n\t\t\t$this->_record = $matches->row();\n\t\t}\n\n\t\treturn $this->_record;\n\t}", "function getRecords($columnParameterArray){\n\t\t\t\n\t\t}", "public function findRecord()\n {\n $sql = \"SELECT Cubans.Id, FirstName, LastName, Gender, YearOfBirth, \n `Name`, IsInGroup FROM Cubans\n JOIN Genre ON Cubans.IdGenre=Genre.id WHERE Name LIKE '%$this->genre%' \";\n $statement = $this->connect->prepare($sql);\n $statement->execute();\n return $statement->fetchAll();\n }", "public function get_all() {\n $where = func_get_args();\n $this->_set_where($where);\n\n $this->_callbacks('before_get', array($where));\n\n if ($this->result_mode == 'object') {\n $result = $this->db->get($this->_table())->result();\n } else {\n $result = $this->db->get($this->_table())->result_array();\n }\n\n foreach ($result as &$row) {\n $row = $this->_callbacks('after_get', array($row));\n }\n\n return $result;\n }", "function get_records($recordType, $params = array(), $limit = 10)\n{\n return get_db()->getTable($recordType)->findBy($params, $limit);\n}", "function fetch_records($dont_get_more = false)\n\t{\n\t\t//echo $this->sql.'<br>';\n\t\t$recs = db_getAll($this->sql, $this->use_db);\n\t\tif ($recs === false) return array();\n\n\t\t$res = array();\n\t\t$single_el = new $this->single_element_class;\n\t\tforeach ($recs as $rec) {\n\t\t\t$single_el->from_raw($rec);\n\t\t\t$res[] = $single_el->to_array($dont_get_more);\n\t\t}\n\t\treturn $res;\n\t}", "function get_multi_info( $ids = array()) {\n\t\t\n\t\t// from table\n\t\t$this->db->from( $this->table_name );\n\n\t\t// where clause\n\t\t$this->db->where_in( $this->primary_key, $ids );\n\n\t\t// returns\n\t\treturn $this->db->get();\n\t}", "abstract public function get_rows();", "function getRecords() {\n\t\treturn $this->records;\n\t}", "public function getMultiple() {}", "protected function fetch()\n\t{\n\t\tif(isset($this->total_record_count) && !$this->valid())\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\tlist($page, $total_record_count) = $this->resource->fetchAll($this->url, array(\n\t\t\t'page_number' => $this->key(),\n\t\t\t'page_size' => $this->page_size,\n\t\t\t'sort' => $this->sort,\n\t\t\t'filters' => $this->filters\n\t\t));\n\n\t\tif(is_null($this->total_record_count))\n\t\t{\n\t\t\t$this->total_record_count = $total_record_count;\n\t\t}\n\n\t\tif($this->total_record_count != $total_record_count)\n\t\t{\n\t\t\tthrow new Exception('Concurrent Modification Occurred! The number of remote records changed.');\n\t\t}\n\n\t\treturn $page;\n\t}", "function doBatchLookups() {\n\t\t$this->mResult->seek( 0 );\n\t\t$revIds = array();\n\t\t$batch = new LinkBatch();\n\t\t# Give some pointers to make (last) links\n\t\tforeach ( $this->mResult as $row ) {\n\t\t\tif ( isset( $row->rev_parent_id ) && $row->rev_parent_id ) {\n\t\t\t\t$revIds[] = $row->rev_parent_id;\n\t\t\t}\n\t\t\tif ( isset( $row->rev_id ) ) {\n\t\t\t\tif ( $this->contribs === 'newbie' ) { // multiple users\n\t\t\t\t\t$batch->add( NS_USER, $row->user_name );\n\t\t\t\t\t$batch->add( NS_USER_TALK, $row->user_name );\n\t\t\t\t}\n\t\t\t\t$batch->add( $row->page_namespace, $row->page_title );\n\t\t\t}\n\t\t}\n\t\t$this->mParentLens = Revision::getParentLengths( $this->mDbSecondary, $revIds );\n\t\t$batch->execute();\n\t\t$this->mResult->seek( 0 );\n\t}", "public function getIterator() {\n\t\t// Load related records for current row\n\t\t$data = $this->execute();\n\t\treturn $data ? $data : array();\n\t}", "public function getRecords()\n\t{\n\t\treturn $this->records['data'];\n\t}", "public function take() {\n\n $records = self::query();\n\n if ($records) {\n $table_name = $this->_table;\n\n foreach ($records as $record) {\n $object = $table_name::find((int)$record[\"id\"]);\n $object->_fields = $record;\n $objects[] = $object;\n }\n return $objects;\n }\n return null;\n }", "public function findEntities($params) {\r\n\t\t$allResults = array();\r\n\t\r\n\t\tprint_r($params);\r\n\r\n\t\t//\techo 'POSTDATA:'; print_r($params);\techo '\\n';\r\n\t\r\n\t\tif (!$result = $this->sendRequest('GET', $params)) {\r\n\t\t\t\r\n\t\t\techo \"\\nERROR FETCHING NEW DATA\";\r\n\t\t\techo \"\\nPROCEEDING TO PROCESSING EXISTING DATA\";\r\n\t\r\n\t\t} else if ($result && intval($result['status']) == 200 && count($data = json_decode($result['body'])) > 0) {\r\n\t\t\t\t\t\r\n\t\t\tfor ($j = 0; $j < count($data); $j++) {\r\n\t\t\t\tarray_push($allResults, $data[$j]);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\techo \"Retrieved \" . count($allResults) . \" records\\n\";\r\n\t\treturn $allResults;\r\n\t}", "function _read($criteria, $ids, $owner, $fields)\n {\n $results = $this->_getEntry($ids, $fields);\n return $results;\n }", "public function Records()\r\n\t{\r\n\t\treturn $this->last_result;\r\n\t}", "#[\\ReturnTypeWillChange]\n function records()\n {\n return $this->getArrayCopy();\n }", "function all($offset = 0, $rowcount = 0, $sort = NULL, $includeContactIDs = FALSE, $justIDs = FALSE) {\n//echo ($this->sql($this->select(), $offset, $rowcount, $sort, $includeContactIDs, NULL));\n return $this->sql($this->select(), $offset, $rowcount, $sort, $includeContactIDs, NULL);\n\n }", "public function get_many() {\n return $this->get_all();\n }", "public function getFoundRows();", "public function getRecords()\n {\n return $this->records;\n }", "public function getRecords()\n {\n return $this->records;\n }", "function seekPageInRecSet()\n\t{\n\t\t\n\t\t$this->resultData = $this->plugin->getGroupList( $this->searchClauseObj->getAllFieldsSearchValue() );\n\t\t$this->numRowsFromSQL = $this->resultData ? count( $this->resultData ) : 0;\n\t\t$this->recSet = $this->numRowsFromSQL;\n\t}", "function readByIds($ids){\r\n\r\n\t$ids_arr = str_repeat('?,', count($ids) - 1) . '?';\r\n\r\n\t// query to select products\r\n\t$query = \"SELECT id, name, price FROM \" . $this->table_name . \" WHERE id IN ({$ids_arr}) ORDER BY name\";\r\n\r\n\t// prepare query statement\r\n\t$stmt = $this->conn->prepare($query);\r\n\r\n\t// execute query\r\n\t$stmt->execute($ids);\r\n\r\n\t// return values from database\r\n\treturn $stmt;\r\n}", "public function get_record(string $record_id):array\n{ \n\n // Get record\n $row = array();\n\n // Return\n return $row;\n\n}", "protected function _retrieveData()\n\t{\n\t\t/**\n\t\t * sql has been specified\n\t\t */\n\t\tif ($this->_sql !== NULL) {\n\n\t\t\tif ($this->_offset !== NULL &&\n\t\t\t\t$this->_limit !== NULL) {\n\t\t\t\t$this->_data = $this->_database->fetchAll($this->_sql . ' LIMIT ' . $this->_offset . ', ' . $this->_limit);\n\t\t\t} else {\n\t\t\t\t$this->_data = $this->_database->fetchAll($this->_sql);\n\t\t\t}\n\n\t\t\t$message = 'queried database with'\n\t\t\t\t\t . L8M_Geshi::parse(preg_replace('/\\s+/', ' ', $this->_sql), 'mysql')\n\t\t\t;\n\t\t\t$this->addMessage($message, 'database');\n\n\t\t\t$message = 'retrieved <code>'\n\t\t\t\t\t . $this->getTotalRecords()\n\t\t\t\t\t . ' '\n\t\t\t\t\t . $this->getModelClassName()\n\t\t\t\t\t . '</code> records from <code>database</code>'\n\t\t\t;\n\t\t\t$this->addMessage($message, 'database');\n\n\t\t} else\n\n\t\t/**\n\t\t * file has been specified\n\t\t */\n\t\tif ($this->_file !== NULL) {\n\t\t\tif ($this->_offset !== NULL &&\n\t\t\t\t$this->_limit !== NULL) {\n\n\t\t\t\t$rows = array_slice(\n\t\t\t\t\t$this->_file,\n\t\t\t\t\t$this->_offset,\n\t\t\t\t\t$this->_limit\n\t\t\t\t);\n\n\t\t\t} else {\n\n\t\t\t\t$rows = $this->_file;\n\n\t\t\t}\n\n\t\t\t$this->_data = array();\n\t\t\tforeach($rows as $row) {\n\t\t\t\t$this->_data[] = $this->_convertFileRowIntoData($row);\n\t\t\t}\n\n\t\t\t$message = 'retrieved <code>'\n\t\t\t\t\t . $this->getTotalRecords()\n\t\t\t\t\t . ' '\n\t\t\t\t\t . $this->getModelClassName()\n\t\t\t\t\t . '</code> records from <code>file</code>'\n\t\t\t;\n\t\t\t$this->addMessage($message, 'file');\n\n\t\t} else\n\n\t\t/**\n\t\t * array has been specified\n\t\t */\n\t\tif ($this->_array !== NULL) {\n\t\t\tif ($this->_offset !== NULL &&\n\t\t\t\t$this->_limit !== NULL) {\n\n\t\t\t\t$this->_data = array_slice(\n\t\t\t\t\t$this->_array,\n\t\t\t\t\t$this->_offset,\n\t\t\t\t\t$this->_limit\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\t$this->_data = $this->_array;\n\t\t\t}\n\n\t\t\t$message = 'retrieved <code>'\n\t\t\t\t\t . $this->getTotalRecords()\n\t\t\t\t\t . ' '\n\t\t\t\t\t . $this->getModelClassName()\n\t\t\t\t\t . '</code> records from <code>array</code>'\n\t\t\t;\n\t\t\t$this->addMessage($message, 'page-code');\n\n\t\t}\n\n\t\treturn $this;\n\t}", "protected function fetchStorageRecords() {}", "function get_all_records(){\n\t\tglobal $db;\n\t\t$sql=\"SELECT * FROM $this->table order by id asc\";\n\t\t$db->query($sql);\n\t\t$row=$db->fetch_assoc_all();\n\t\treturn $row;\n\t}", "public function fetch_multi($s_where=null,$i_start=null,$i_limit=null)\r\n {\r\n try\r\n {\r\n \t$ret_=array();\r\n \t$s_qry=\"SELECT * \r\n\t\t\t\t\tFROM \".$this->tbl.\" n \"\r\n\t\t\t\t\t.($s_where!=\"\"?$s_where:\"\" ).(is_numeric($i_start) && is_numeric($i_limit)?\r\n\t\t\t\t\t\"Limit \".intval($i_start).\",\".intval($i_limit):\"\" );\r\n $rs=$this->db->query($s_qry);\r\n $i_cnt=0;\r\n if($rs->num_rows()>0)\r\n {\r\n foreach($rs->result() as $row)\r\n {\r\n $ret_[$i_cnt][\"id\"]\t\t\t\t=\t$row->i_id;////always integer\r\n $ret_[$i_cnt][\"s_title\"]\t\t\t=\tstripslashes($row->s_title); \r\n\t\t\t\t $s_desc \t\t\t\t\t\t\t= \tstrip_tags(stripslashes($row->s_description));\r\n\t\t\t\t if(strlen($s_desc)>197)\r\n\t\t\t\t \t$s_desc \t\t\t\t\t\t= \tsubstr_replace($s_desc,'...',200);\r\n $ret_[$i_cnt][\"s_description\"]\t= \t$s_desc ; \r\n $ret_[$i_cnt][\"s_photo\"]\t\t\t=\tstripslashes($row->s_photo); \r\n $ret_[$i_cnt][\"dt_created_on\"]\t=\tdate($this->conf[\"site_date_format\"],intval($row->dt_cr_date)); \r\n $ret_[$i_cnt][\"i_is_active\"]\t\t=\tintval($row->i_is_active); \r\n\t\t\t\t $ret_[$i_cnt][\"s_is_active\"]\t\t=\t(intval($row->i_is_active)==1?\"Active\":\"Inactive\");\r\n \r\n $i_cnt++;\r\n } \r\n $rs->free_result(); \r\n }\r\n unset($s_qry,$rs,$row,$i_cnt,$s_where,$i_start,$i_limit, $s_desc);\r\n return $ret_;\r\n \r\n }\r\n catch(Exception $err_obj)\r\n {\r\n show_error($err_obj->getMessage());\r\n } \r\n }", "protected function _find_results() {\n\n\t\tif( $this->_page < 0 )\n\t\t{\n\t\t\tthrow new Exception(\"Invalid page - must be greater than or equal to 0.\");\n\t\t}\n\t\telseif( $this->_page_size < 1 )\n\t\t{\n\t\t\tthrow new Exception(\"Invalid page size - must be greater than or equal to 1.\");\n\t\t}\n\n\t\t$this->_playgrounds = $this->_playgrounds->limit($this->_page_size)->offset($this->_page*$this->_page_size);\n\t\t\n\t\tif( $this->sort_by_field OR\n\t\t\t$this->sort_by_direction )\n\t\t{\n\t\t\tif( ! in_array($this->sort_by_field, array('id','name','latitude','longitude')) )\n\t\t\t{\n\t\t\t\tthrow new Exception(\"Invalid sort field.\");\n\t\t\t}\n\t\t\telseif( ! in_array($this->sort_by_direction, array('asc','desc')) )\n\t\t\t{\n\t\t\t\tthrow new Exception(\"Invalid sort direction.\");\n\t\t\t}\n\t\t\t$this->_playgrounds = $this->_playgrounds->order_by($this->sort_by_field,$this->sort_by_direction);\n\t\t}\n\n\t\treturn $this->_playgrounds->find_all();\n\n\t}", "protected function compute_get_records($recordid, $arguments, $multiple=true) {\n if ($database = $this->compute($recordid, array_shift($arguments), 'CURRENT_DATABASE')) {\n if ($field = $this->compute($recordid, array_shift($arguments))) {\n $value = $this->compute($recordid, array_shift($arguments));\n return $this->valid_recordids($database, $field, $value, $multiple);\n }\n }\n return null;\n }", "public function findAll()\n {\n $this->ensureIsConfigured();\n $classname = $this->getRecordClassname();\n return $classname::find();\n }", "public function testMultipleResultQuery() {\r\n $records = [\r\n ['UUID' => 'uuid1tRMR1', 'bool' => false, 'int' => 10, 'string' => 'testReadMultipleRecords 1'],\r\n ['UUID' => 'uuid1tRMR2', 'bool' => true, 'int' => 20, 'string' => 'testReadMultipleRecords 2'],\r\n ['UUID' => 'uuid1tRMR3', 'bool' => false, 'int' => 30, 'string' => 'testReadMultipleRecords 3']\r\n ];\r\n // Write data to the database\r\n foreach ($records as $record) {\r\n $this->executeQuery('insert into POTEST (UUID, BOOLEAN_VALUE, INT_VALUE, STRING_VALUE) values (\\''.$record['UUID'].'\\','.($record['bool'] ? 1:0).','.$record['int'].', \\''.$record['string'].'\\')');\r\n }\r\n // Read data out and cast it to persistent object\r\n $query = 'select * from POTEST where UUID in (\\'uuid1tRMR1\\',\\'uuid1tRMR2\\',\\'uuid1tRMR3\\')';\r\n $pos = $this->getPersistenceAdapter()->executeMultipleResultQuery($query, 'test_persistence_AbstractPersistenceAdapterTestPersistentObject');\r\n $this->assertEquals(count($records), count($pos), 'Wrong number of database records found.');\r\n for($i = 0; $i < count($pos); $i++) {\r\n $this->assertEquals($records[$i]['UUID'], $pos[$i]->uuid, 'Uuid value from persistent object differs from the UUID value of the database.');\r\n $this->assertEquals($records[$i]['bool'], $pos[$i]->booleanValue, 'Boolean value from persistent object differs from the boolean value of the database.');\r\n $this->assertEquals($records[$i]['int'], $pos[$i]->intValue, 'Integer value from persistent object differs from the int value of the database.');\r\n $this->assertEquals($records[$i]['string'], $pos[$i]->stringValue, 'String value from persistent object differs from the string value of the database.');\r\n }\r\n }", "function getNextRecord() { return mysql_fetch_array( $this->recordSet ); }", "public function fetchResults(){\n $resultsValues = $this->data;\n return $resultsValues;\n }", "public function getOneRecord(array $identifiers);", "public function nextRecordsOnList() {\n if (isset($this->acts_as_list)) {\n $field = $this->acts_as_list[\"field\"];\n if (vazio($this->acts_as_list[\"scope\"])) {\n return self::collection($field . \" > '\" . $this->get($field) . \"'\");\n } else {\n return self::collection($field . \" > '\" . $this->get($field) . \"' AND \" . $this->whereClauseFromScope());\n }\n }\n return array();\n }", "public function getAll()\n\t{\n\t\t$args = array('order' => 't.id');\n \t$records = $this->record->findAll($args);\n \treturn $this->model->populateModels($records, 'id');\n\t}", "public function records() : array {\n return $this->records;\n }", "function getRows() {\n if ($this->_recordset === null) {\n // begin processing result into recordset\n $this->_entries = ldap_get_entries($this->dbh->connection, $this->result);\n $this->row_counter = $this->_entries['count'];\n $i = 1;\n $rs_template = array();\n if (count($this->dbh->attributes) > 0) {\n reset($this->dbh->attributes);\n while (list($a_index, $a_name) = each($this->dbh->attributes)) $rs_template[$a_name] = '';\n }\n while (list($entry_idx, $entry) = each($this->_entries)) {\n // begin first loop, iterate through entries\n if (!empty($this->dbh->limit_from) && ($i < $this->dbh->limit_from)) continue;\n if (!empty($this->dbh->limit_count) && ($i > $this->dbh->limit_count)) break;\n $rs = $rs_template;\n if (!is_array($entry)) continue;\n while (list($attr, $attr_values) = each($entry)) {\n // begin second loop, iterate through attributes\n if (is_int($attr) || $attr == 'count') continue;\n if (is_string($attr_values)) $rs[$attr] = $attr_values;\n else {\n $value = '';\n while (list($value_idx, $attr_value) = each($attr_values)) {\n // begin third loop, iterate through attribute values\n if (!is_int($value_idx)) continue;\n if (empty($value)) $value = $attr_value;\n else {\n if (is_array($value)) $value[] = $attr_value;\n else $value = array($value, $attr_value);\n }\n// else $value .= \"\\n$attr_value\";\n // end third loop\n }\n $rs[$attr] = $value;\n }\n // end second loop\n }\n reset($rs);\n $this->_recordset[$entry_idx] = $rs;\n $i++;\n // end first loop\n }\n $this->_entries = null;\n if (!is_array($this->_recordset))\n $this->_recordset = array();\n if (!empty($this->dbh->sorting)) {\n $sorting_method = (!empty($this->dbh->sorting_method) ? $this->dbh->sorting_method : 'cmp');\n uksort($this->_recordset, array(&$this, $sorting_method));\n }\n reset($this->_recordset);\n // end processing result into recordset\n }\n return DB_OK;\n }", "public function liste(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n return $this->db->getRows(array(\"return_type\"=>\"many\"));\n\t\t\t\t\t }", "public function liste(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n return $this->db->getRows(array(\"return_type\"=>\"many\"));\n\t\t\t\t\t }", "public function liste(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n return $this->db->getRows(array(\"return_type\"=>\"many\"));\n\t\t\t\t\t }", "public function getBatch(){\n $Voters = Voter::where('mailing_street_address_1', '=', '')\n ->skip($this->offset)\n ->take($this->batch_size)\n ->get();\n\n $this->offset += $this->batch_size;\n\n return ($Voters->count() > 0)? $Voters: false;\n }", "public function fetch()\n {\n static $currentLine = 0;\n $dataResult = array();\n\n if (isset($this->options['skipHeader']) && $this->options['skipHeader'] === true) {\n $skipLines = 1;\n } elseif (isset($this->options['skipHeader']) && \\is_numeric($this->options['skipHeader'])) {\n $skipLines = (int)$this->options['skipHeader'];\n } else {\n $skipLines = 0;\n }\n if (($handle = fopen($this->csvFilePath, 'r')) !== false) {\n while (($data = fgetcsv($handle, 65534, $this->csvDelimiter, $this->csvEnclosure)) !== false) {\n // skip header (maybe is better to set the first offset position instead)\n if ($currentLine < $skipLines) {\n $currentLine++;\n continue;\n }\n if ($currentLine >= $this->offset && $currentLine < ($this->offset + $this->limit)) {\n if (isset($data[0]) && $data[0] !== '') {\n $this->preProcessRecordData($data);\n $dataResult[] = $data;\n }\n }\n $currentLine++;\n }\n fclose($handle);\n }\n $this->logger->debug(sprintf('%s: read %s lines and found %s records.', $this->csvFilePath, $currentLine, count($dataResult)));\n return $dataResult;\n }", "function &getAllRecords($start, $limit, $order = null, $date_ini = '2009-01-01 00:00:00', $date_fin = NOW){\n global $db;\n\n if($order == null){\n $sql = \"SELECT * FROM products OFFSET $start LIMIT $limit \".$_SESSION['ordering'];\n }else{\n $sql = \"SELECT * FROM products ORDER BY $order \".$_SESSION['ordering'].\" OFFSET $start LIMIT $limit \";\n }\n $_SESSION['query'] = $sql;\n $_SESSION['query2Excel'] = $sql;\n //Basic::EventLog(\"products->getAllRecords: \".$sql);\n $res =& $db->query($sql);\n return $res;\n }", "function records($hookName, $params) {\n\t\t$journalOAI =& $params[0];\n\t\t$from = $params[1];\n\t\t$until = $params[2];\n\t\t$set = $params[3];\n\t\t$offset = $params[4];\n\t\t$limit = $params[5];\n\t\t$total = $params[6];\n\t\t$records =& $params[7];\n\t\t\n\t\t$records = array();\n\t\tif (isset($set) && strpos($set, 'ec_fundedresources') != false) {\n\t\t\t$journalId = $journalOAI->journalId;\n\t\t\t$openAIREDao =& DAORegistry::getDAO('OpenAIREDAO');\n\t\t\t$openAIREDao->setOAI($journalOAI);\n\t\t\t$records = $openAIREDao->getOpenAIRERecords($journalId, $from, $until, $offset, $limit, $total);\n\t\t\treturn true;\n\t\t} \n\t\t\n\t\treturn false;\n\t}", "function get ()\n\t{\n\t\t$ ret = array ();\n\t\t\n\t\t// Loop por todos os registros no banco de dados\n\t\tfor ( $ x = 0 ; ( $ x < $ this -> num_records () && count ( $ ret ) < $ this -> _limit ); $ x ++)\n\t\t{\t\t\t\n\t\t\t$ row = $ this -> _px -> retrieve_record ( $ x );\n\t\t\t\n\t\t\tif ( $ this -> _test ( $ row ))\n\t\t\t{\n\t\t\t\tforeach ( $ row as $ key => $ val )\n\t\t\t\t{\n\t\t\t\t\t// Encontre todos os campos que não estão na matriz selecionada\n\t\t\t\t\tif (! in_array ( $ key , $ this -> _select ) &&! empty ( $ this -> _select )) unset ( $ row [ $ key ]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$ ret [] = $ linha ;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $ ret ;\n\t}", "public function get(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n\t\t\t\t\t $condition = array(\"IDP\" =>$this->IDP);\n return $this->db->getRows(array(\"where\"=>$condition,\"return_type\"=>\"single\"));\n\t\t\t\t\t }", "protected function fetchData()\n\t{\n\t\t$this->addScopes();\n\t\t$criteria=$this->getCriteria();\n\t\tif(($pagination=$this->getPagination())!==false)\n\t\t{\n\t\t\t$pagination->setItemCount($this->getTotalItemCount());\n\t\t\t$pagination->applyLimit($criteria);\n\t\t}\n\t\tif(($sort=$this->getSort())!==false)\n\t\t\t$sort->applyOrder($criteria);\n\t\treturn CActiveRecord::model($this->modelClass)->findAll($criteria);\n\t}", "function fetchList($limit, $offset);", "public function readAll(){\n $rq = \"SELECT * FROM Objets\";\n $stmt = $this->pdo->prepare($rq);\n $data = array();\n if(!$stmt->execute($data)){\n throw new Exception($pdo->errorInfo());\n }\n return $result = $stmt->fetchAll();\n }", "function getAllData($start, $limit, $sidx, $sord, $where, $table) {\r\n $this->db->select('*');\r\n $this->db->limit($limit);\r\n if ($where != NULL)\r\n $this->db->where($where, NULL, FALSE);\r\n $this->db->order_by($sidx, $sord);\r\n $query = $this->db->get($table, $limit, $start);\r\n if ($query->num_rows() > 0) {\r\n return $query->result();\r\n }\r\n return null;\r\n }", "public function getItems(ResultRow $values) {\n }", "function GetLocations(){\n\t// Preparing query\n\t$query = GetDatabaseConnection()->prepare(\"SELECT location_id, name FROM location\");\n\t$query->execute();\n\t$result = $query->fetchAll(); //Fetching it\n\treturn $result;\n}", "public function fetch_multi($s_where=null,$i_start=null,$i_limit=null)\r\n {\r\n try\r\n {\t\r\n \t$ret_=array();\r\n\t\t\t$s_qry=\"SELECT * FROM \".$this->tbl_recom.\" n \"\r\n .($s_where!=\"\"?$s_where:\"\" ).(is_numeric($i_start) && is_numeric($i_limit)?\" Limit \".intval($i_start).\",\".intval($i_limit):\"\" );\r\n\t\t\t//\techo $s_qry;\r\n $rs=$this->db->query($s_qry);\r\n $i_cnt=0;\r\n if($rs->num_rows()>0)\r\n {\r\n foreach($rs->result() as $row)\r\n {\r\n $ret_[$i_cnt][\"id\"]=$row->id;////always integer\r\n $ret_[$i_cnt][\"s_email\"]\t\t\t=\tget_unformatted_string($row->s_referred_email); \r\n\t\t\t\t $ret_[$i_cnt][\"s_name\"]\t\t\t=\tget_unformatted_string($row->s_referred_name); \r\n $ret_[$i_cnt][\"dt_recommend_on\"]\t=\tdate($this->conf[\"site_date_format\"],intval($row->i_created_date)); \r\n\t\t\t\t $ret_[$i_cnt][\"i_is_active\"]\t\t=\tintval($row->i_is_active); \r\n\t\t\t\t //$ret_[$i_cnt][\"s_is_active\"]\t\t=\t(intval($row->i_is_active)==1?\"Accepted\":\"Pending\");\r\n\t\t\t\t $ret_[$i_cnt][\"s_is_active\"]\t\t=\t(intval($row->i_is_active)==1?addslashes(t(\"Accepted\")):addslashes(t(\"Pending\")));\r\n \r\n $i_cnt++;\r\n } \r\n $rs->free_result(); \r\n }\r\n unset($s_qry,$rs,$row,$i_cnt,$s_where,$i_start,$i_limit, $s_desc);\r\n return $ret_;\r\n \r\n }\r\n catch(Exception $err_obj)\r\n {\r\n show_error($err_obj->getMessage());\r\n } \r\n }", "public function getByList() {\n return $this->_get(4);\n }", "public function resultSet()\n\t{\n\t\t$this->execute();\n\t\treturn $this->stm->fetchAll(PDO::FETCH_OBJ);\n\t}", "public function getForRecord($record);", "function chat_iterator() {\n $chatrooms = get_records('chat');\n return $chatrooms;\n}", "public function testReadMultipleRecords() {\r\n $records = [\r\n ['UUID' => 'uuid1tRMR1', 'bool' => false, 'int' => 10, 'string' => 'testReadMultipleRecords 1'],\r\n ['UUID' => 'uuid1tRMR2', 'bool' => true, 'int' => 20, 'string' => 'testReadMultipleRecords 2'],\r\n ['UUID' => 'uuid1tRMR3', 'bool' => false, 'int' => 30, 'string' => 'testReadMultipleRecords 3']\r\n ];\r\n // Write data to the database\r\n foreach ($records as $record) {\r\n $this->executeQuery('insert into POTEST (UUID, BOOLEAN_VALUE, INT_VALUE, STRING_VALUE) values (\\''.$record['UUID'].'\\','.($record['bool'] ? 1:0).','.$record['int'].', \\''.$record['string'].'\\')');\r\n }\r\n // Read data out and cast it to persistent object\r\n $pos = $this->getPersistenceAdapter()->getAll('test_persistence_AbstractPersistenceAdapterTestPersistentObject');\r\n $this->assertEquals(count($records), count($pos), 'Wrong number of database records found.');\r\n for($i = 0; $i < count($pos); $i++) {\r\n $this->assertEquals($records[$i]['UUID'], $pos[$i]->uuid, 'Uuid value from persistent object differs from the UUID value of the database.');\r\n $this->assertEquals($records[$i]['bool'], $pos[$i]->booleanValue, 'Boolean value from persistent object differs from the boolean value of the database.');\r\n $this->assertEquals($records[$i]['int'], $pos[$i]->intValue, 'Integer value from persistent object differs from the int value of the database.');\r\n $this->assertEquals($records[$i]['string'], $pos[$i]->stringValue, 'String value from persistent object differs from the string value of the database.');\r\n }\r\n }", "private function CreateRecordSet($rows){\n\t\t$set = array();\n\t\tforeach($rows as $row) \n\t\t\t$set[] = $row['recordID'];\n\t\treturn $set;\n\t}", "protected function _readRecords() {}", "public function get_listspficemore2($tbname,$selectfield,$data,$limit,$offset){\n\t$this->db->flush_cache();\n\t$this->db->from($tbname);\n $this->db->select($selectfield);\n $this->db->where($data)->limit($limit,$offset);\n return $this->db->get()->result();\n \n }", "public function all()\n {\n $records = R::findAll( $this->table_name(), \" order by id \");\n\n $object = array_map( function($each_record) {\n return $this->map_reford_to_object( $each_record );\n },\n $records\n );\n\n return array_values( $object );\n }", "public function getall()\r\n {\r\n $locations = array();\r\n $count = 0;\r\n \r\n foreach($this->all() as $location)\r\n {\r\n $location = (array)$location;\r\n \r\n $locations[] = array('id' => $location['id'], 'name' => $location['name'],\r\n 'caption' => $location['caption'], 'description' => $location['description'],\r\n 'address' => $location['address'],\r\n 'contact' => $location['contact'],\r\n 'image1' => $location['image1'], 'image2' => $location['image2'],\r\n 'image3' => $location['image3'], 'image4' => $location['image4']);\r\n $count++;\r\n \r\n }\r\n \r\n if ($count > 0)\r\n {\r\n return $locations;\r\n }\r\n else\r\n {\r\n return null;\r\n } \r\n }", "public function resultSet(){\n\t\t$this->execute();\n\t\treturn $this->stmt->fetchAll(PDO::FETCH_OBJ);\n\t}", "private function getSearchJobRecords() {\n $response = $this->client->request('GET', \"search/jobs/{$this->jobId}/records\", [\n 'query' => [\n 'offset' => 0,\n 'limit' => $this->limit\n ]\n ]);\n $data = json_decode($response->getBody());\n $records = $data->records;\n\n $return = [\n 'sites' => [],\n ];\n\n foreach ($records as $key => $record) {\n $return['sites'][] = (array) $record->map;\n }\n\n return $return;\n }", "public function getMultiple($key)\n {\n return $this->doFetch($key);\n }", "public function queryBatch($SOQL = NULL) {\n $resultSet = array();\n $done = false;\n\n $queryResult = $this->query($SOQL);\n\n if ($queryResult->size > 0) {\n while (!$done) {\n foreach ($queryResult->records as $record) {\n $sObject = new SObject($record);\n $result = get_object_vars($sObject->fields);\n $result['Id'] = $sObject->Id;\n $resultSet[] = $result;\n }\n if ($queryResult->done != true) {\n $this->queryMore($queryResult);\n } else {\n $done = true;\n }\n }\n }\n \n return $resultSet;\n }", "function getList($fieldName='', $searchValue='', $orderByField='', $orderByValue='', $offset ='', $limit ='')\r\n\t\t{\r\n\t\t\t$sqlRecord = $this->getTableRecordList($this->table, $fieldName, $searchValue, $orderByField, $orderByValue, $offset, $limit);\r\n\t\t\treturn $sqlRecord;\r\n\t\t\r\n\t\t}", "function getList($fieldName='', $searchValue='', $orderByField='', $orderByValue='', $offset ='', $limit ='')\r\n\t\t{\r\n\t\t\t$sqlRecord = $this->getTableRecordList($this->table, $fieldName, $searchValue, $orderByField, $orderByValue, $offset, $limit);\r\n\t\t\treturn $sqlRecord;\r\n\t\t\r\n\t\t}", "function getRecords( $sql ) {\r\n\t\t\t$result = $this->_connectAndExec( $sql );\r\n\t\t\t$dataset = array();\r\n\t\t\twhile ( ocifetchinto( $result, $line, OCI_ASSOC ) ) {\r\n\t\t\t\tarray_push( $dataset, $this->_lowerKeyNames( $line ) );\r\n\t\t\t}\r\n\t\t\tOCIFreeStatement( $result );\r\n\t\t\treturn $dataset;\r\n\t\t}", "public function fetchRowset()\n\t{\n\t\t$this->_query();\n\n\t\treturn $this->stmt->fetchAll(\\PDO::FETCH_ASSOC);\n\t}", "function getRecords($limit = false)\n\t{\n\t\tif ($limit !== false)\n\t\t\t$this->setParam(\"limit\", $limit);\n\n\t\t$this->table->getRecords();\n\t}", "function get_all_batch($params = array())\n {\n $this->db->order_by('batch_id', 'desc');\n if(isset($params) && !empty($params))\n {\n $this->db->limit($params['limit'], $params['offset']);\n }\n return $this->db->get('batch')->result_array();\n }", "public function results()\r\n\t{\r\n\t\treturn $this->model->get($this->select);\r\n\t}", "public function records() {\n if( ! property_exists($this->response(), 'records') ) return [];\n\n return $this->response()->records;\n }", "public function find($params=''){\n\t\t$this->_connect();\n\t\t$numberArguments = func_num_args();\n\t\t$params = Utils::getParams(func_get_args(), $numberArguments);\n\t\t$select = $this->_createSQLSelect($params);\n\t\t$resultResource = $this->_db->query($select['sql']);\n\t\treturn $this->_createResultset($select, $resultResource);\n\t}", "public function findAll()\r\n {\r\n $event = $this->getEventManager()->trigger(__FUNCTION__.'.pre', $this);\r\n if ($event->stopped()) {\r\n return $event->last();\r\n }\r\n\r\n $result = $this->mapper->findAll();\r\n\r\n $params['__RESULT__'] = $result;\r\n $this->getEventManager()->trigger(__FUNCTION__.'.post', $this, $params);\r\n\r\n return $result;\r\n }", "function LoadRecordset($offset = -1, $rowcnt = -1) {\r\n\t\tglobal $conn;\r\n\r\n\t\t// Call Recordset Selecting event\r\n\t\t$this->Recordset_Selecting($this->CurrentFilter);\r\n\r\n\t\t// Load List page SQL\r\n\t\t$sSql = $this->SelectSQL();\r\n\t\tif ($offset > -1 && $rowcnt > -1)\r\n\t\t\t$sSql .= \" LIMIT $rowcnt OFFSET $offset\";\r\n\r\n\t\t// Load recordset\r\n\t\t$rs = ew_LoadRecordset($sSql);\r\n\r\n\t\t// Call Recordset Selected event\r\n\t\t$this->Recordset_Selected($rs);\r\n\t\treturn $rs;\r\n\t}" ]
[ "0.6149726", "0.6113991", "0.6089794", "0.6073457", "0.6048241", "0.60258526", "0.6002014", "0.5993959", "0.5931621", "0.59060663", "0.5882407", "0.58811814", "0.5807347", "0.57838887", "0.57500994", "0.5707503", "0.570487", "0.5693648", "0.5685252", "0.56744784", "0.56697726", "0.5647729", "0.5632128", "0.5631144", "0.5584011", "0.55739075", "0.55523694", "0.55390406", "0.5534842", "0.5531332", "0.55312294", "0.54960406", "0.5490103", "0.5489524", "0.5488968", "0.5478303", "0.5473041", "0.54721117", "0.54711777", "0.54688424", "0.54641885", "0.54641885", "0.54568607", "0.54537386", "0.5435591", "0.54322094", "0.54303056", "0.5422207", "0.54163015", "0.541373", "0.53934914", "0.5378412", "0.53773755", "0.5377331", "0.5374407", "0.53713506", "0.53618646", "0.5357196", "0.5355276", "0.5329157", "0.53210723", "0.53210723", "0.53210723", "0.53153807", "0.53104484", "0.52900755", "0.5281509", "0.52774596", "0.52666783", "0.52627647", "0.5259877", "0.5259303", "0.5256176", "0.52467704", "0.5245771", "0.5244937", "0.524452", "0.5241942", "0.52288383", "0.52279776", "0.52246267", "0.52238554", "0.52179646", "0.5216347", "0.5216281", "0.5213966", "0.52112174", "0.52066475", "0.5203518", "0.52031255", "0.52024716", "0.52024716", "0.5201052", "0.5192558", "0.51915675", "0.5191428", "0.51880926", "0.5183213", "0.5182348", "0.5177233", "0.51633173" ]
0.0
-1
Locates and returns a single record.
public function findOne(array $where) { if ($postId = $this->extractPostId($where)) { return Post::forgeObject(get_post($postId)); } $posts = get_posts($where); return empty($posts) ? null : Post::forgeObject(reset($posts)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findOne()\r\n {\r\n $records = $this->find(1);\r\n \r\n return isset($records[0]) ? $records[0] : null;\r\n }", "private function findRecord()\n {\n /** If the request is a read record request, we need to do this so eager loading occurs. */\n if ($this->jsonApiRequest->isReadResource()) {\n return $this->store->readRecord(\n $this->jsonApiRequest->getResourceType(),\n $this->jsonApiRequest->getResourceId(),\n $this->jsonApiRequest->getParameters()\n );\n }\n\n return $this->store->find($this->jsonApiRequest->getResourceIdentifier());\n }", "public function getRecord()\n {\n $entry = $this->getEntry();\n if ($entry) {\n return $entry->getRecord();\n }\n }", "public function getRecord()\n {\n return $this->get(self::_RECORD);\n }", "static function first() {\n list($record) = self::collection(null, \"id LIMIT 1\");\n return isset($record) ? $record : null;\n }", "public function getForRecord($record);", "public function getRecord();", "protected function get_record()\n\t{\n\t\treturn $this->key ? parent::get_record() : null;\n\t}", "public function getRecord()\n {\n return $this->options['peoplefinder']->getByNUID($this->nu_id);\n }", "public function current(): Record\n {\n return $this->data[0];\n }", "public function single()\n\t{\n\t\t$this->execute();\n\t\treturn $this->stm->fetch(PDO::FETCH_OBJ);\n\t}", "public function getRecord()\r\n\t{\r\n\t\treturn $this->record;\r\n\t}", "public function single()\n {\n $this->executeQuery($this->statement);\n return $this->fetch($this->statement);\n }", "public function firstOrFail()\n {\n $entity = $this->first();\n if ($entity) {\n return $entity;\n }\n /** @psalm-suppress UndefinedInterfaceMethod */\n throw new RecordNotFoundException(sprintf(\n 'Record not found in endpoint \"%s\"',\n $this->getRepository()->getName()\n ));\n }", "public function getRecord() {}", "public function getRecord() {}", "public function getRecord() {}", "public function single() {\n $this->execute();\n return $this->stmt->fetch(PDO::FETCH_OBJ);\n }", "public function findOne() {\n return parent::findOne();\n }", "public static function first()\n\t{\n\t\treturn self::new_instance_records()->first();\n\t}", "public function getRecordAt($offset)\n {\n return $this->get(self::_RECORD, $offset);\n }", "public function get_record($row) {\n return null;\n }", "protected function getOne()\n {\n $statement = $this->connection->query($this->sqlToString());\n return $this->fetch($statement);\n }", "public function findRecordById($id)\n {\n $rowset = $this->select(['id' => $id]);\n $row = $rowset->current();\n\n return $row;\n }", "public function single(){\n\t\t$this->execute();\n\t\treturn $this->stmt->fetch(PDO::FETCH_OBJ);\n\t}", "public function getRecord($id = null);", "function single_rec( $sql, $binds = '' ){\n $cur = $this->exec_sql( $sql, $binds );\n return oci_fetch_object( $cur );\n }", "public function fetchSingle() {\n $this->execute();\n return $this->stmt->fetch(PDO::FETCH_OBJ);\n }", "public function getRecord(){\n \n return $this->record;\n }", "public function fetchRecord()\n {\n $ret = $this->readCurrentRecord();\n if ($ret !== false) {\n $this->next();\n }\n return $ret;\n }", "function get_record($recordType, $params = array())\n{\n $record = get_records($recordType, $params, 1);\n return reset($record);\n}", "public function show(Record $record)\n {\n return $record;\n }", "public function findOne($params = array()) {\n\n\t\t$datas = $this->find($params);\n\n\t\tif ($datas){\n\t\t\treturn $datas[0];\n\t\t}\n\t\treturn FALSE;\n\t}", "function GetRecord($restr = false)\n {\n $rec = $this->GetRecords($restr,0,1);\n if ( is_array($rec) && isset($rec[0]) )\n {\n return $rec[0];\n }\n return null;\n }", "function readOne(){\n \n // query to read single record\n $query = \"SELECT * FROM \" . $this->table_name . \" WHERE ROId = ? LIMIT 0,1\";\n \n // prepare query statement\n $stmt = $this->conn->prepare( $query );\n \n // bind id of roUnit to be updated\n $stmt->bindParam(1, $this->ROId);\n \n // execute query\n $stmt->execute();\n \n // get retrieved row\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n \n // set values to object properties\n $this->ROId = $row['ROId'];\n $this->unit = $row['unit'];\n $this->created_on = $row['created_on'];\n $this->modified_on = $row['modified_on'];\n }", "public function single(){\r\n $this->execute();\r\n return $this->stmt->fetch(PDO::FETCH_OBJ);\r\n }", "public function getRecord($id){\n\t\t$req = \"SELECT * FROM $this->table WHERE mdr_id = '$id' LIMIT 1\";\n\t\t$res = $this->select($req);\n\t\treturn $res[0];\n\t}", "public function getRecord(){\n return $this->record;\n }", "public function getCurrentRecord()\n {\n if ($this->currentRecord) {\n return $this->currentRecord;\n }\n return $this->currentRecord = $this->loadRecord();\n }", "public function first() {\n\t\treturn $this->execute()->first();\n\t}", "public function getOneRecord(array $identifiers);", "public static function get($id) {\n if (!$id = (int) $id) {\n throw new NotFoundException('Invalid id for ' . get_called_class() . '.');\n }\n\n if (!$record = self::find(array('where' => array('id' => $id)))) {\n throw new NotFoundException(get_called_class() . \" with '{$id}' can't be found.\");\n }\n\n return $record;\n }", "public function getOne($identifier) {\n\t\t$identifier = is_numeric($identifier) ? ((int) $identifier) : $this -> quote($identifier);\n\t\treturn $this -> get() -> where($this -> _primary . '=' . $identifier) -> queryOne();\n\t}", "public function findOne(PDO $con)\n\t{\n\t\t$class = $this->resultClass;\n\t\t$stmt = $this->doExecute($con);\n\t\tif ($row = $stmt->fetch(PDO::FETCH_NUM)) {\n\t\t\t$record = new $class();\n\t\t\t$record->load($row);\n\t\t\treturn $record;\n\t\t} \n\t}", "public function single()\n {\n $this->execute();\n return $this->stmt->fetch(PDO::FETCH_ASSOC);\n }", "public function first()\n {\n return $this->retrieveOrCreateQueryInstance()->firstOrFail();\n }", "public function first(){\n return $this->find(1);\n }", "public function findOne() {\n $this->buildSql();\n $rows = $this->db->findOne($this->sql);\n return $rows;\n }", "public function get( int $id ) : IEmployerIncentive\n {\n if ( !isset( self::DB[$id] ))\n throw new RecordNotFoundException();\n \n return self::DB[$id]; \n }", "public function fetchOne() {\r\n\t\t$data = $this->fetch();\r\n\r\n\t\t$this->freeResult();\r\n\r\n\t\treturn $data ? current($data) : null;\r\n\t}", "public function findFirst() {\r\n\t\t$aux = $this->fetchAllPg(1);\r\n\t\tif($aux == null)\r\n\t\t\treturn null;\r\n\t\treturn $aux[0];\r\n\t}", "public function read_single()\n {\n // Create query\n $query = \"\n SELECT\n id,\n name\n FROM\n $this->table\n WHERE \n id = ?\n LIMIT 1;\";\n\n //Prepare statement\n $stmt = $this->conn->prepare($query);\n \n // Bind ID\n $stmt->bindParam(1, $this->id);\n \n // Execute query\n $stmt->execute();\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n \n // set properties\n $this->id = $row['id'];\n $this->name = $row['name'];\n }", "function singleRecord() {\n $this->Record = mysqli_fetch_array($this->result, MYSQLI_ASSOC);\n $this->rs = $this->Record;\n $stat = is_array($this->Record);\n return $stat;\n }", "public function getCurrentRecord()\n {\n return $this->current_record;\n }", "public function getForRecord($record)\n {\n $native_field = $this->native_field;\n return $this->foreign_type->getRecordByField(\n $this->foreign_field,\n $record->$native_field\n );\n }", "function getFirstRecord() {\n mysql_data_seek( $this->recordSet, 0 );\n return mysql_fetch_array( $this->recordSet ); }", "public function getRecordById($id) {\n if ($id) {\n return $this->getRecord($id);\n }\n return false;\n }", "function findOne(\n\t\t$criteria=NULL,$order=NULL,$limit=NULL,$offset=NULL,$ttl=0) {\n\t\tlist($result)=\n\t\t\t$this->find($criteria,$order,$limit,$offset,$ttl)?:array(NULL);\n\t\treturn $result;\n\t}", "function getRecord($params=array()){\n\n\t\t$data = $this->_parseSQL();\n\t\t$wrapper =& new SQL_Parser_wrapper($data);\n\t\t$where = array();\n\t\tforeach ( $params as $key=>$value ){\n\t\t\t$tablename = $this->getTableName($key);\n\t\t\tif ( isset($tablename) ) $where[] = '`'.addslashes($tablename).'`.`'.$key.'`=\\''.addslashes($params[$key]).'\\'';\n\t\t}\n\t\t$where = implode(' AND ', $where);\n\t\t$wrapper->addWhereClause($where);\n\t\t$compiler =& $this->_getCompiler();\n\t\t$sql = $compiler->compile($data);\n\t\t$db =& Dataface_DB::getInstance();\n\t\t$res = $db->query($sql);\n\t\tif ( PEAR::isError($res) ) return $res;\n\t\tif ( !$res ) return PEAR::raiseError(mysql_error($this->app->_db));\n\t\tif ( mysql_num_rows($res) == 0 ) return null;\n\t\t\n\t\t$vals = mysql_fetch_assoc($res);\n\t\tmysql_free_result($res);\n\t\treturn $this->newRecord($vals);\n\t\t\n\t}", "public function findById($id)\n {\n $this->ensureIsConfigured();\n $classname = $this->getRecordClassname();\n return $classname::findById($id);\n }", "public function read_single() {\n // Create query\n $query = \"SELECT * FROM \" . $this->table . \n \" WHERE MID = :mid AND Spot = :spot \";\n\n // Prepare the statement\n $stmt = $this->conn->prepare($query);\n\n // Clean the query\n $this->attr[\"mid\"] = htmlspecialchars(strip_tags($this->attr[\"mid\"]));\n $this->attr[\"spot\"] = htmlspecialchars(strip_tags($this->attr[\"spot\"]));\n\n // Bind the data\n $stmt->bindValue(\":mid\", $this->attr[\"mid\"]);\n $stmt->bindValue(\":spot\", $this->attr[\"spot\"]);\n \n // Execute the prepared statement and check for errors in running it\n if ($this->runPrepStmtChkErr($stmt) === false) {\n return false;\n }\n\n // Get the result of reading one of the rows of the relation\n return $row_res = $stmt->fetch(PDO::FETCH_ASSOC);\n }", "public function first()\n\t{\n\t\treturn $this->find()->first();\n\t}", "public function findOne($id)\n {\n return $this->model->find($id);\n }", "public function findFirst();", "function singleRecord() {\r\n $this->Record = mysql_fetch_assoc( $this->Query_ID );\r\n $stat = is_array( $this->Record );\r\n return $stat;\r\n }", "public function fetchSingleById($id);", "public function fetchSingleById($id);", "public function first()\n {\n foreach ($this->lists as $list) {\n foreach ($list as $record) {\n return $record;\n }\n }\n return null;\n }", "public function get($which)\n {\n // iterate over the data until we find the one we want\n foreach ($this->all() as $record)\n if ($record->id == $which)\n return $record;\n return null;\n }", "public function findOne(int $id);", "public function one($id);", "function singleRecord()\n {\n $this->Record = mysql_fetch_array( $this->Query_ID );\n $stat = is_array( $this->Record );\n return $stat;\n }", "public function getRecord($slug){\n return $this->where(\"slug\", $slug)->first();\n }", "function get_current_record($recordVar, $throwException = true)\n{\n return get_view()->getCurrentRecord($recordVar, $throwException);\n}", "public static function getInstanceById($record)\n\t{\n\t\t$row = (new \\App\\Db\\Query())->from('vtiger_trees_templates')->where(['templateid' => $record])\n\t\t\t->one();\n\t\tif ($row) {\n\t\t\t$instance = new self();\n\t\t\t$instance->setData($row);\n\n\t\t\treturn $instance;\n\t\t}\n\t\treturn null;\n\t}", "public function getOne()\n\t{\n\t\tif ($this->count() > 0)\n\t\t{\n\t\t\t$this->seek(0);\n\t\t\treturn $this->current();\n\t\t} else\n\t\t\treturn null;\n\t}", "public function get($primaryKeyValue = 0)\n\t{\n\t\t// Create new row object\n\t\tif(!$primaryKeyValue) {\n\t\t\t$row = new $this->rowClass();\n\t\t\treturn $row;\n\t\t\n\t\t// Find record by primary key\n\t\t} else {\n\t\t\treturn $this->first(array($this->getPrimaryKeyField() => $primaryKeyValue));\n\t\t}\n\t}", "public function getOne($id)\n {\n $sql = \"SELECT * FROM \".$this->table.\" WHERE id =\" . $id;\n $req = Database::getBdd()->prepare($sql);\n $req->execute();\n return $req->fetch(PDO::FETCH_OBJ);\n }", "public function testReadSingleRecord() {\r\n $uuid = 'abcdefg';\r\n $bool = true;\r\n $int = 1234567;\r\n $string = 'avorium';\r\n // Write data to the database\r\n $this->executeQuery('insert into POTEST (UUID, BOOLEAN_VALUE, INT_VALUE, STRING_VALUE) values (\\''.$uuid.'\\','.($bool ? 1:0).','.$int.', \\''.$string.'\\')');\r\n // Read data out and cast it to persistent object\r\n $po = $this->getPersistenceAdapter()->get('test_persistence_AbstractPersistenceAdapterTestPersistentObject', $uuid);\r\n // Compare properties\r\n $this->assertEquals($uuid, $po->uuid, 'Uuid value from persistent object differs from the UUID value of the database.');\r\n $this->assertEquals($bool, $po->booleanValue, 'Boolean value from persistent object differs from the boolean value of the database.');\r\n $this->assertEquals($int, $po->intValue, 'Integer value from persistent object differs from the int value of the database.');\r\n $this->assertEquals($string, $po->stringValue, 'String value from persistent object differs from the string value of the database.');\r\n }", "public function returnDetailFindByPK($id);", "private function lookupARecord()\n {\n\n /**\n * Sample output:\n *\n * [\n * {\n * \"Name\": \"domain.com.\",\n * \"Type\": \"A\",\n * \"AliasTarget\": {\n * \"HostedZoneId\": \"HostedZoneId\",\n * \"DNSName\": \"DNSName.cloudfront.net.\",\n * \"EvaluateTargetHealth\": false\n * }\n * }\n * ]\n */\n $response = shell_exec(\n vsprintf(\n '%s %s %s --hosted-zone-id %s --query \"ResourceRecordSets[?Name == \\'%s.\\']\"',\n [\n $this->aws,\n 'route53',\n 'list-resource-record-sets',\n $this->hosted_zone_id,\n $this->real_domain,\n ]\n )\n );\n $response = json_decode($response);\n\n if (count($response) == 0) {\n $this->error('No A records found for \"%s\"', [$this->real_domain]);\n }\n\n $this->alias_target = $response[0]->AliasTarget->DNSName;\n\n $this->message('Looked up the A record for \"%s\":', [$this->real_domain], 1);\n $this->message('Alias Target: %s', [$this->alias_target], 2);\n }", "protected function getRecordById(int $id): object\n {\n return $this->db->query(\"SELECT * FROM \" . $this->db_table . \" WHERE id = '\" . $id . \"'\");\n\n }", "function readOne(){\n\n\t\t// query to read single record\n\t\t$query = \"SELECT\n\t\t\t\t\ttype, color, price\n\t\t\t\tFROM\n\t\t\t\t\t\" . $this->table_name . \"\n\t\t\t\tWHERE\n\t\t\t\t\tclothe_id = ?\n\t\t\t\tLIMIT\n\t\t\t\t\t0,1\";\n\n\t\t// prepare query statement\n\t\t$stmt = $this->conn->prepare( $query );\n\n\t\t// bind id of product to be updated\n\t\t$stmt->bindParam(1, $this->clothe_id);\n\n\t\t// execute query\n\t\t$stmt->execute();\n\n\t\t// get retrieved row\n\t\t$row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n\t\t// set values to object properties\n\t\t$this->type = $row['type'];\n\t\t$this->color = $row['color'];\n\t\t$this->price = $row['price'];\n\t}", "function readOne()\n {\n // query to read single record\n $query = \"SELECT\n s.id, s.email, s.name, s.state\n FROM\n \" . $this->table_name . \" s\n WHERE\n s.id = ?\n LIMIT\n 0,1\";\n \n // prepare query statement\n $stmt = $this->conn->prepare( $query );\n \n // bind id of subscriber to be updated\n $stmt->bindParam(1, $this->id);\n \n // execute query\n $stmt->execute();\n \n // get retrieved row\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n \n // set values to object properties\n $this->email = $row['email'];\n $this->name = $row['name'];\n $this->state = $row['state'];\n }", "public function singleRow(){\n $this->execute();\n return $this->statement->fetch(PDO::FETCH_OBJ);\n }", "public function first() {\n\n\t\treturn $this->search[0];\n\n\t}", "public function find($id)\n\t{\n\t\treturn $this->model->where(\"id\", \"=\", $id)->first();\n\t}", "public function getOne($id)\n {\n return $this->repository->find($id);\n }", "public static function findOne($params=''){\n\t\t$activeModel = EntityManager::getEntityInstance(get_called_class());\n\t\t$arguments = func_get_args();\n\t\treturn call_user_func_array(array($activeModel, 'findFirst'), $arguments);\n\t}", "public function getOne($id)\n {\n return $this->find(\"id\", $id);\n }", "function record( $table_name, $record, $id_field = 'id', $output = OBJECT ) {\n global $wpdb;\n\n if ( is_numeric( $record ) ) {\n $id_record = $record;\n } elseif ( is_object( $record ) ) {\n $id_record = $record->$id_field;\n } elseif ( is_array( $record ) ) {\n $id_record = $record[$id_field];\n }\n\n $sql = <<< SQL\nSELECT * FROM `{$table_name}`\nWHERE `{$id_field}` = {$id_record}\nSQL;\n $result = $wpdb->get_row( $sql, $output );\n return $result;\n }", "public function findOne(array $where);", "protected function findByLocation($path)\n {\n return $this->model->where('location', '=', $path)->first();\n }", "public static function find($primary_key)\n {\n return static::select()\n ->where(static::getPrimaryKey(), $primary_key)\n ->fetchOne();\n }", "function GetRecordByPrimaryKey($unirecid)\n {\n return $this->GetRecordByPk($unirecid);\n }", "function find($entity, $model = FALSE)\n {\n $retval = NULL;\n // Get primary key of the entity\n $pkey = $this->object->get_primary_key_column();\n if (!is_numeric($entity)) {\n $entity = isset($entity->{$pkey}) ? intval($entity->{$pkey}) : FALSE;\n }\n // If we have an entity ID, then get the record\n if ($entity) {\n $results = $this->object->select()->where_and(array(\"{$pkey} = %d\", $entity))->limit(1, 0)->run_query();\n if ($results) {\n $retval = $model ? $this->object->convert_to_model($results[0]) : $results[0];\n }\n }\n return $retval;\n }", "public function selectRecord()\n {\n $sql = \"SELECT * FROM Cubans WHERE Id = :Id\";\n $statement = $this->connect->prepare($sql);\n $statement->bindValue(':Id', $this->id);\n $statement->execute();\n return $statement->fetch(PDO::FETCH_ASSOC);\n }", "public function GetSingleRecord($sid)\n {\n $sql = \"select * from student where sid = '$sid'\";\n $result = $this->pdo->query($sql);\n $row = $result->fetch();\n $student = new Student($row['sid'], $row['name'], $row['email'], $row['address'], $row['phone'], $row['emergencyNo'], $row['activities']);\n\n return $student;\n }", "function get_one_by( $conds = array()) {\n\n\t\t// where clause\n\t\t$this->custom_conds( $conds );\n\n\t\t// query the record\n\t\t$query = $this->db->get( $this->table_name );\n\n\t\tif ( $query->num_rows() == 1 ) {\n\t\t// if there is one row, return the record\n\t\t\treturn $query->row();\n\t\t} else {\n\t\t// if there is no row or more than one, return the empty object\n\t\t\t return $this->get_empty_object( $this->table_name );\n\t\t\t\n\t\t}\n\n\t}", "public function getRecordLocator()\n {\n return isset($this->RecordLocator) ? $this->RecordLocator : null;\n }", "public function get_single_record($table_name,$id)\n\t{\n\t\t\n\t\t$sql = \"SELECT * FROM \".$table_name.\" WHERE id=\".$id;\n\t\t$query = $this->db->query($sql);\n\t\treturn $query->result();\n\t\t\n\t}" ]
[ "0.7619536", "0.7357105", "0.71219707", "0.69580376", "0.68801737", "0.6865376", "0.68512046", "0.68377894", "0.673828", "0.6701625", "0.6693036", "0.66716933", "0.666559", "0.6652076", "0.6626356", "0.6625063", "0.6625063", "0.6591243", "0.6516882", "0.6516241", "0.64745337", "0.6471014", "0.6468726", "0.64579016", "0.64430815", "0.64312845", "0.64153194", "0.6404636", "0.6385667", "0.63856155", "0.6372166", "0.6347198", "0.6327583", "0.6306351", "0.63055587", "0.6291179", "0.62813437", "0.62735474", "0.62699044", "0.6255337", "0.62280834", "0.6226543", "0.62234455", "0.62058747", "0.6198674", "0.61852914", "0.6162952", "0.61445224", "0.6144089", "0.61421406", "0.61295575", "0.612227", "0.6114687", "0.60467494", "0.60410273", "0.60396606", "0.6034937", "0.6033204", "0.6027257", "0.6024965", "0.6024459", "0.60206586", "0.60136175", "0.6011868", "0.60103846", "0.6008356", "0.6008356", "0.6003026", "0.5992694", "0.5992034", "0.598641", "0.5971013", "0.5966207", "0.5956393", "0.5950318", "0.59477586", "0.5939211", "0.59379023", "0.59364694", "0.59351575", "0.59301853", "0.5924335", "0.5921307", "0.5919726", "0.59168565", "0.591351", "0.590688", "0.5899316", "0.5898867", "0.5883048", "0.5877593", "0.5873623", "0.58694977", "0.58691347", "0.58654904", "0.5863111", "0.58622897", "0.5861197", "0.5859381", "0.5853255", "0.5837927" ]
0.0
-1
Locates and returns a record by a field.
public function findOneBy($column, $value, array $where = array()) { $where[$column] = $value; return static::findOne($where); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function returnFindByField($field);", "function getRecordByField($fieldName, $searchKey, $orderByField='', $orderByValue='')\r\n\t\t{\r\n\t\t\t$sqlRecord = $this->getTableRecordByField($this->table, $fieldName , $searchKey, $orderByField, $orderByValue );\r\n\t\t\treturn $sqlRecord;\r\n\t\t\t\r\n\t\t}", "function getRecordByField($fieldName, $searchKey, $orderByField='', $orderByValue='')\r\n\t\t{\r\n\t\t\t$sqlRecord = $this->getTableRecordByField($this->table, $fieldName , $searchKey, $orderByField, $orderByValue );\r\n\t\t\treturn $sqlRecord;\r\n\t\t\t\r\n\t\t}", "function getfield($field){\n\n\t\treturn($this->record[$field]);\n\t}", "public function get($field);", "public function get($field);", "function getByField ( $field,$value){\n\t\t $result=$this->fetchRow(\"$field= '$value' \"); //order by id?\n\t\t if($result==null)\n\t\t\t return;\n\t\t if(is_array($result))\n\t\t\t return $result[0];\n\t\t return $result;\n\t}", "function getRecordByField($fieldName, $searchKey, $searchStatus='', $orderByField='', $orderByValue='')\r\n\t\t{\r\n\t\t\t$sqlRecord = $this->getTableRecordByField($this->table, $fieldName , $searchKey, $searchStatus, $orderByField, $orderByValue );\r\n\t\t\treturn $sqlRecord;\r\n\t\t\t\r\n\t\t}", "function get($field) {\n\t\tif(!is_string($field)) {\n\t\t\ttrigger_error(\"Parameter for model->get() must be a string\", E_USER_WARNING);\n\t\t\treturn null;\n\t\t}\n\n\t\tif (method_exists($this, 'get_'.$field)) {\n\t\t\t$args = func_get_args();\n\t\t\tarray_shift($args);\n\n\t\t\treturn call_user_func_array(array(& $this, 'get_'.$field), $args);\n\t\t}\n\n\t\t$result = $this->find_associated($field);\n\n\t\tif (!is_null($result)) {\n\t\t\treturn $result;\n\t\t}\n\n\t\tif (isset($this->data[$field])) {\n\t\t\treturn $this->data[$field];\n\t\t}\n\n\t}", "public function record($field)\n\t{\n\t\tif (isset($this->_record[$field]) && is_null($this->_record[$field]))\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\tif (!isset($this->_record[$field]) || $this->_record[$field] == '')\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->_record[$field];\n\t}", "public function findBy($field, $value)\n {\n return $this->model->where($field, $value)->firstOrFail();\n }", "public function __get($field) {\n\t\tif(array_key_exists($field, $this->_data)) {\n\t\t\treturn $this->_data[$field];\n\t\t}\n\t\telse {\n\t\t\tthrow new \\Bedrock\\Model\\Record\\Exception('The specified field \"' . $field . '\" was not found.');\n\t\t}\n\t}", "function get_field($field, $where_field, $where_value, $debug = FALSE)\r\n {\r\n \t\r\n \t$this->db->select($field)->from($this->table)->where($where_field, $where_value);\r\n \t$query_db = $this->db->get();\r\n \t\r\n \tif($debug)\r\n \t{\r\n \t\tprint_a('Arguments~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');\r\n \t\tprint_a($field);\r\n \t\tprint_a($where_field);\r\n \t\tprint_a($where_value);\r\n \t\t\r\n \t\tprint_a('SQL returned handle ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');\r\n \t\tprint_a($query_db);\r\n \t\t\r\n \t\tprint_a('DB data~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');\r\n \t\tprint_a($query_db->row_array());\r\n \t}\r\n \telse\r\n \t{\r\n \t\tif($query_db->num_rows)\r\n \t\t{\r\n \t\t\t$results = $query_db->row_array(); \r\n \t\t\treturn $results[$field];\r\n \t\t\t\r\n \t\t}\r\n \t\treturn FALSE;\r\n \t}\r\n \t\r\n }", "public function getByField($field, $value)\n {\n }", "public function getByField($field, $value)\n {\n }", "public static function findBy($field, $value)\n {\n return static::select()\n ->where($field, $value)\n ->fetchOne();\n }", "public function GetIn($field,$id)\r\n {\r\n $query = mysql_query(\"SELECT * FROM info WHERE id_info = '$id' \");\r\n $row = mysql_fetch_array($query);\r\n if($field == $field)\r\n return $row[$field];\r\n }", "function getFieldValue($field);", "function get_field( $field, $query = null ){\r\n\t\tif( $row = $this->get_row( $query ) and isset( $row[$field] ) )\r\n\t\t\treturn $row[$field];\r\n\r\n\t}", "public function Get ($field) {\n if ($this->structuredResult === null) return null;\n foreach ($this->structuredResult as $info) {\n if ($info['field'] == $field) {\n return $info['data'];\n }\n }\n return null;\n }", "public function findBy($field, $value);", "public function get($field) {\r\n\t\treturn $this -> fields[$field];\r\n\t}", "function f($field) {\n\t\treturn($this->fetchfield($field));\n\t}", "protected function getBy($field, $identifier)\n {\n if ($this->debugEnabled) {\n\n $metadata = $this->db->get_results(sprintf('SHOW COLUMNS FROM %s', $this->table));\n $fields = array();\n\n foreach ($metadata as $column) {\n $fields[] = $column->Field;\n }\n\n if (!in_array($field, $fields)) {\n wp_die (sprintf('The field \\'%s\\' is does not exists in the table \\'%s\\'', $field, $this->table));\n }\n }\n\n $query = $this->getQueryBuilder()->select('*')\n ->from($this->table)\n ->where($field, '=', $identifier);\n\n if ($photo = $this->db->get_row($query->build())) {\n $photo = $this->extend($photo);\n }\n\n return $photo;\n }", "protected function findField($field) {\n if ($field == 'union_name') {\n $field = 'organization_name';\n }\n #converts phone field so it's found in union's telecommunication_number\n if ($field == 'union_phone_no') {\n $field = 'contact_number';\n }\n return parent::findField($field);\n }", "public function fetchSingleByField( $field, $value )\n\t{\n\t\t$select = $this->table->select()->where( $field . ' = ?', $value );\n\t\t\n\t\tif (! $row = $this->table->fetchRow( $select ))\n\t\t\treturn false;\n\t\n\t\t$this->_dataMerge($row);\n\n\t\treturn $row->toArray();\n\t}", "public function getField($field_name);", "function lookup($prj_id, $field, $value)\n {\n $backend =& self::_getBackend($prj_id);\n return $backend->lookup($field, $value);\n }", "public function getField($fieldName) {}", "public function findBy($value, $field = 'id')\n {\n return call_user_func_array([$this->modelClass, 'where'], [$field, $value])->first();\n }", "public function fetchField();", "public function getForRecord($record);", "public function getSearchField($class, $field);", "public abstract function FetchField();", "public function getFieldByName($field) {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (isset($this->_resultFields[$field]) && isset($this->_result[$this->_resultFields[$field]])) return $this->_result[$this->_resultFields[$field]];\n\t\t\telse parent::throwGetColException('trying to get non existing data ('.$field.') in ProjectsListingsModel::getFieldByName', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('trying to get non existing data ('.$field.') in ProjectsListingsModel::getFieldByName', __LINE__, __FILE__);\n\t}", "function getSelectedFieldsRecordByField($selectedFields, $fieldName, $searchKey, $orderByField='', $orderByValue='')\r\n\t\t{\r\n\t\t\t$sqlRecord = $this->getSelectedTableRecordByField($this->table, $selectedFields, $fieldName , $searchKey, $orderByField, $orderByValue );\r\n\t\t\treturn $sqlRecord;\r\n\t\t\t\r\n\t\t}", "function FetchField($fieldOffset = -1) \n\t{\n\t\tif ($fieldOffset != -1) {\n\t\t\t$this->fieldmeta_offset = $fieldOffset;\n\t\t}\n\t\t$fieldObject = false;\n\t\t$i=0;\n\t\tforeach($this->fieldmeta as $o) {\n\t\t\tif($i==$this->fieldmeta_offset) {\n\t\t\t\t$fieldObject = $o;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\t$this->fieldmeta_offset++;\n\t\treturn $fieldObject;\n\t}", "function record( $table_name, $record, $id_field = 'id', $output = OBJECT ) {\n global $wpdb;\n\n if ( is_numeric( $record ) ) {\n $id_record = $record;\n } elseif ( is_object( $record ) ) {\n $id_record = $record->$id_field;\n } elseif ( is_array( $record ) ) {\n $id_record = $record[$id_field];\n }\n\n $sql = <<< SQL\nSELECT * FROM `{$table_name}`\nWHERE `{$id_field}` = {$id_record}\nSQL;\n $result = $wpdb->get_row( $sql, $output );\n return $result;\n }", "function selectRecord($table,$field,$where) {\n\t\tif($where!='')\n\t\t\t$where= ' WHERE '.$where;\n \t$query = \"SELECT \".$field.\"\n \t FROM \".$this->tablePrefix .$table.$where ;\n\t\t // echo $query.'<br>';exit;\n $res = $this->execute($query);\n \treturn $this->fetchRow($res);\n }", "function find_associated($field, $params = null) {\n\t\tif (isset($this->associations[$field])) {\n\t\t\treturn $this->associations[$field]->get($this, $params);\n\t\t}\n\n\t\treturn null;\n\t}", "function get_field($type, $type_id = '', $field = 'name')\n {\n if ($type_id != '') {\n $l = $this->db->get_where($type, array(\n $type . '_id' => $type_id\n ));\n $n = $l->num_rows();\n if ($n > 0) {\n return $l->row()->$field;\n }\n }\n }", "public function findBy(string $field, string $value)\n {\n return $this->makeQuery()->where(\"$field = :field\")->params(['field' => $value])->fetchOrException();\n }", "public function __get($field) {\n\n if (array_key_exists($field, $this->_fields)) {\n return $this->_fields[$field];\n } else if (in_array($field, ApplicationSql::tablenames())) { // Büyükten -> Küçüğe\n\n $belong_table = $field; // user\n $foreign_key = $field . \"_id\"; //user_id\n\n if (!in_array($foreign_key, ApplicationSql::fieldnames($this->_table)))\n throw new BelongNotFoundException(\"Tabloya ait olan böyle foreign key yok\", $foreign_key);\n\n return $belong_table::find($this->_fields[$foreign_key]);\n } else {\n preg_match_all(\"/all_of_.*/\", $field, $matches);\n $matches = $matches[0];\n\n if ($matches) {\n $field = substr($field, 7);\n if (in_array($field, ApplicationSql::tablenames())) {\n\n $owner_table = ucfirst($field); // model name\n $owner_key = strtolower($this->_table) . \"_id\";\n\n // return $owner_table::load()->where([$owner_key => $this->_fields[\"id\"]])->take();\n return $owner_table::load()->where($owner_key, $this->_fields[\"id\"])->take();\n }\n }\n }\n\n throw new FieldNotFoundException(\"Tabloda getirilecek böyle bir anahtar mevcut değil\", $field);\n }", "function getValue(int $field);", "public static function get_data_by($field, $value)\n {\n }", "function field($id, $field, $default=null) {\n\t\tif(array_key_exists($field, $this->schema())) {\n\t\t\t$res = $this->query('SELECT `'.$field.'` FROM `'.$this->table.'` WHERE `'.$this->primaryKey.'` = \\''.$this->escape($id).'\\' LIMIT 1');\n\t\t\tif($row = $res->fetch_row()) {\n\t\t\t\t$res->free();\n\t\t\t\treturn $row[0];\n\t\t\t}\n\t\t} else { /* throw error? */ }\n\t\treturn $default;\n\t}", "public function selectField($a_szQuery, $a_szField) {\n\t\t$oResult = $this->dbquery($a_szQuery);\n\t\tif($this->numRows($oResult) == 0) return null;\n\t\t$aryData = $this->fetchArray($oResult);\n\t\t$this->freeResult($oResult);\n\t\treturn $aryData[$a_szField];\n\t}", "public function getLookupField() {}", "function get_field($id=false, $field=false) {\n\t\tif(!$id && !$field) return false;\n\t\tglobal $wpdb;\n\t\t$query = \"SELECT wposts.$field FROM $wpdb->posts wposts WHERE wposts.ID=$id\";\n\t\t$results = $this->query($query);\n\t\tif(isset($results[0])) return $results[0]->$field;\n\t}", "function getFieldValue($fieldName){\n\n\t\tif( isset($this->record[$fieldName]) ) return $this->record[$fieldName];\n\t\telse return false;\n\n\t}", "public function getValue($field) {\n if (array_key_exists($field, $this->data)) {\n return $this->data[$field];\n } else {\n die(\"Campo no encontrado\");\n }\n}", "public function findOneByField($field, $value = null, $model = null)\n {\n $table = $this->getDbTable();\n $select = $table->select();\n\n if (is_array($field)) {\n // Check if $field is an associative array\n if (isset($field[0]) && is_array($value)) {\n // If field and value are arrays, match them up\n foreach ($field as $column) {\n if (isset($value[$column])) {\n $select->where(\"{$column} = ?\", $value[$column]);\n } else {\n $select->where(\"{$column} = ?\", array_shift($value));\n }\n }\n } else {\n // field is an associative array, use the values from the field\n foreach ($field as $column => $value) {\n $select->where(\"{$column} = ?\", $value);\n }\n }\n } else {\n $select->where(\"{$field} = ?\", $value);\n }\n\n $row = $table->fetchRow($select);\n if (count($row) === 0) {\n return null;\n }\n\n $model = $this->loadModel($row, $model);\n\n return $model;\n }", "function _get_by($field, $value = array())\r\n\t{\r\n\t\tif (isset($value[0]))\r\n\t\t{\r\n\t\t\t$this->where($field, $value[0]);\r\n\t\t}\r\n\r\n\t\treturn $this->get();\r\n\t}", "public function getField($field)\n\t{\n//TODO call query\n//\t\tOLIVDatabase\n\t\tif ($this->sqlResource)\n\t\t{\n\t\t\treturn mysql_fetch_array($this->sqlResource);\n\t\t}\n\t\treturn FALSE;\n\t}", "public function get(string $field)\n {\n return $this->getArray()[$field] ?? null;\n }", "function getSelectedFieldsRecordByField($selectedFields, $fieldName, $searchKey, $searchStatus='', $orderByField='', $orderByValue='')\r\n\t\t{\r\n\t\t\t$sqlRecord = $this->getSelectedTableRecordByField($this->table, $selectedFields, $fieldName , $searchKey, $searchStatus, $orderByField, $orderByValue );\r\n\t\t\treturn $sqlRecord;\r\n\t\t\t\r\n\t\t}", "public function getFieldByName($field) {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (isset($this->_resultFields[$field]) && isset($this->_result[$this->_resultFields[$field]])) return $this->_result[$this->_resultFields[$field]];\n\t\t\telse parent::throwGetColException('trying to get non existing data ('.$field.') in PollTemplatesModel::getFieldByName', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('trying to get non existing data ('.$field.') in PollTemplatesModel::getFieldByName', __LINE__, __FILE__);\n\t}", "private function findRecord()\n {\n /** If the request is a read record request, we need to do this so eager loading occurs. */\n if ($this->jsonApiRequest->isReadResource()) {\n return $this->store->readRecord(\n $this->jsonApiRequest->getResourceType(),\n $this->jsonApiRequest->getResourceId(),\n $this->jsonApiRequest->getParameters()\n );\n }\n\n return $this->store->find($this->jsonApiRequest->getResourceIdentifier());\n }", "public function getFieldByName($field) {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (isset($this->_resultFields[$field]) && isset($this->_result[$this->_resultFields[$field]])) return $this->_result[$this->_resultFields[$field]];\n\t\t\telse parent::throwGetColException('trying to get non existing data ('.$field.') in CampaignDefinitionsModel::getFieldByName', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('trying to get non existing data ('.$field.') in CampaignDefinitionsModel::getFieldByName', __LINE__, __FILE__);\n\t}", "public function retrieveFieldValue(Field $field, $model);", "public function __get($field)\n\t{\n\t\treturn $this->get($field);\n\t}", "function get($field)\r\n {\r\n $userID = session::get(\"user\");\r\n \r\n if ($userID)\r\n {\r\n $tempArray = fetch_to_array(database::query(\"SELECT * FROM user,`group` WHERE user.group=group.ID and user.ID='$userID'\"),\"\");\r\n if (is_array($tempArray)) $tempArray = current($tempArray);\r\n\r\n return($tempArray[$field]);\r\n }\r\n else return(FALSE);\r\n }", "public function select($field);", "public function get_member_row_field($member, $field)\n {\n $row = $this->get_member_row($member);\n return is_null($row) ? null : $row[$field];\n }", "function GetField($field=0){\n\t\t\treturn @mysql_result($this->result,0,$field);\n\t\t}", "public function getForRecord($record)\n {\n $native_field = $this->native_field;\n return $this->foreign_type->getRecordByField(\n $this->foreign_field,\n $record->$native_field\n );\n }", "public function singleRecord($table_name, $table_field_name_with_value) {\n return $this->db->where($table_field_name_with_value)->get($table_name)->row();\n }", "public function mxdGetOne($strField,$strWhere = \"\") {\n $sql = \"SELECT \".$strField.\" FROM \".$this->_strView;\n if($strWhere) $sql .= \" WHERE \".$strWhere;\n $mxd = $this->objDb->mxdGetOne($sql);\n if(!$this->intCountErrors($this->objDb,true)) return $mxd;\n return false;\n }", "public function __get($field)\n {\n if ($field == 'userId')\n {\n return $this->uid;\n }\n else \n {\n return $this->fields[$field];\n }\n }", "function getByID($table,$field,$value);", "function getDBData($field, $search = ID, $where = 'user_id', $table = 'users')\n{\n\tglobal $db;\n\n\t$ret = $db->query('select ' . $field . ' from ' . $table . ' where ' . $where . '=\\'' . $search . '\\'');\n\n\tif(count($ret) > 0)\n\t\treturn $ret[0][$field];\n\telse\n\t\treturn '';\n}", "public function _get($field) {\n\t\tif(property_exists($this, $field)) return $this->{$field}; \n\t\telse return NULL;\n\t}", "public function getField($pk = null)\n\t{\n\t\treturn parent::getRecord($pk);\n\t}", "public function getDataFieldValue($record, $fieldName)\n {\n // Custom callbacks\n if (isset($this->customDataFields[$fieldName])) {\n $callback = $this->customDataFields[$fieldName];\n\n return $callback($record);\n }\n\n // Links\n if ($fieldName == \"Link\") {\n return $record->AbsoluteLink();\n }\n\n // URLSegments\n if ($fieldName == \"URL\" || $fieldName == \"URLSegment\") {\n return $record->RelativeLink();\n }\n\n // Default implementation\n if ($record->hasMethod(\"relField\")) {\n $value = $record->relField($fieldName);\n if ($fieldName == \"isPublished\") {\n $value = ($value) ? _t(\"SitewideContentReport.Published\", \"Published\") : _t(\"SitewideContentReport.Draft\", \"Draft\");\n } elseif ($fieldName == \"Subsite.Title\") {\n $value = ($value) ? $value : _t(\"SitewideContentReport.MainSite\", \"Main Site\");\n }\n return $value;\n } elseif ($record->hasMethod($fieldName)) {\n return $record->$fieldName();\n } else {\n return $record->$fieldName;\n }\n }", "public function getFieldValue(/*string*/ $fieldName);", "public function retrieve($id)\n {\n return Field::find($id);\n }", "public function findBy($field, $value, $columns = ['*'])\n {\n return $this->model->where($field, '=', $value)->first($columns);\n }", "function get_gp_field($gid, $field) {\n global $db;\n $results = $db->select(tbl($this->gp_tbl), $field, \"group_id='$gid'\");\n\n if ($db->num_rows > 0) {\n return $results[0];\n } else {\n return false;\n }\n }", "public function findEntry($path, $country, $field, $value);", "function getField($field){\n\t\t$query = \"SELECT `$field` FROM `mkombo_university`.`staff` WHERE `username`='\".$_SESSION['username'].\"'\";\n\t\tif($query_run = @mysql_query($query)){\n\t\t\tif($query_result = @mysql_result($query_run,0, $field)){\n\t\t\t\treturn $query_result;\n\t\t\t}\n\t\t}\t\t\n\t}", "public function getFieldByName($field) {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (isset($this->_resultFields[$field]) && isset($this->_result[$this->_resultFields[$field]])) return $this->_result[$this->_resultFields[$field]];\n\t\t\telse parent::throwGetColException('trying to get non existing data ('.$field.') in DiscussCategoriesModel::getFieldByName', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('trying to get non existing data ('.$field.') in DiscussCategoriesModel::getFieldByName', __LINE__, __FILE__);\n\t}", "public function __get($field)\n {\n // Throw an error because the field was not defined in the index\n if (!$this->hasFieldInIndex($field)) {\n if ($this->model) {\n trigger_error(\"\\\"$field\\\" was not found in \\\"\" . get_class($this->model) . \"\\\".\");\n } else {\n trigger_error(\"Trying to access the field \\\"$field\\\", but no model was provided.\");\n }\n }\n\n // If the field is present in the field index, retrieve and cache its value\n $data = $this->getFieldFromModel($field);\n $this->{$data[\"key\"]} = $data[\"value\"];\n return $this->{$data[\"key\"]};\n }", "function getValueFromField()\r\n\t{\r\n\t\treturn $this->row[ key( $this->mapping ) ];\r\n\t}", "public static function getFirst($field = null)\n {\n return static::select()\n ->getFirst(($field ?? static::getPrimaryKey()));\n }", "public function findBy($field, $value, $columns = array('*'))\n {\n return $this->model->where($field, '=', $value)->first($columns);\n }", "public function findOneByField($field, $value, $cls)\n {\n $table = $this->getDbTable();\n $select = $table->select();\n\n $row = $table->fetchRow($select->where(\"{$field} = ?\", $value));\n if (0 == count($row)) {\n return;\n }\n\n $cls->setId($row->id)\n\t\t\t\t->setUserId($row->user_id)\n\t\t\t\t->setAttributeSetId($row->attribute_set_id)\n\t\t\t\t->setDateCreated($row->date_created)\n\t\t\t\t->setDateModified($row->date_modified)\n\t\t\t\t->setFlagged($row->flagged)\n\t\t\t\t->setGpsLatitude($row->gps_latitude)\n\t\t\t\t->setGpsLongitude($row->gps_longitude)\n\t\t\t\t->setFolderId($row->folder_id)\n\t\t\t\t->setPrimaryCurrencyId($row->primary_currency_id)\n\t\t\t\t->setLinks($row->links)\n\t\t\t\t->setViews($row->views)\n\t\t\t\t->setArchived($row->archived);\n\t return $cls;\n }", "public function fetchByField( $field, $value )\n\t{\n\t\t$select = $this->table->select()->where( $field . ' = ?', $value );\n\n\t\t$rowSet = $this->table->fetchAll( $select );\n\n\t\treturn $rowSet->toArray();\n\t}", "public static function findBy($field, $value = null, $columns = ['*'])\n {\n return static::where($field, '=', $value)->first($columns);\n }", "public function getValueByField($fieldName, $where){\n\t\t$customerDetailVo = new CustomerDetailVo();\n\t\t$whereLog = [];\n\t\tforeach ($where as $k => $v){\n\t\t\t$customerDetailVo->{$k} = $v;\n\t\t\t$whereLog[] = \"$k -> $v\"; \n\t\t}\n\t\t\n\t\t//debug\n LogUtil::sql('(getValueByField) ... where = ' . '(' .join(', ', $whereLog). ')');\n \n\t\t$customerDetailVos = $this->selectByFilter($customerDetailVo);\n \n\t\tif($customerDetailVos){\n\t\t\t$customerDetailVo = $customerDetailVos[0];\n\t\t\treturn $customerDetailVo->$fieldName;\n\t\t}\n\t\telse{\n\t\t\treturn null;\n\t\t}\n\t}", "public function find_by($field = 'folder', $match = 'english')\n\t{\n\t\tforeach($this->languages as $lang)\n\t\t{\n\t\t\tif (isset($lang[$field]) && $lang[$field] === $match)\n\t\t\t{\n\t\t\t\treturn $lang;\n\t\t\t}\n\t\t}\n\n\t\treturn NULL;\n\t}", "public function findByField($field, $value = null, $columns = array('*'))\n {\n $model = $this->model->where($field, '=', $value)->get($columns)->first();\n\n return $this->parserResult($model);\n }", "public function getOneBy(string $field, $value) : ActiveRecordInterface\n\t{\n\t\ttry\n\t\t{\n\t\t\t$requireByField = 'requireOneBy' . ucfirst($field);\n\n\t\t\treturn $this->$requireByField($value);\n\t\t}\n\t\tcatch (EntityNotFoundException $e)\n\t\t{\n\t\t\tthrow new ResourceNotFoundException(($this->getTableMap())->getName() . ' with id ' . $id);\n\t\t}\n\t}", "public function getRecordWhere($table_name, $table_field_name_with_value) {\n return $this->db->where($table_field_name_with_value)->get($table_name)->result();\n }", "public function offsetGet($field)\n {\n $method = 'get' . ucfirst($field);\n if ($method === 'getIterator') { // getIterator() is reserved by \\IteratorAggregate\n $method = '_getIterator';\n }\n if (strpos($method, ':') !== false) {\n $args = explode(':', $method);\n $method = array_shift($args);\n if (!method_exists($this, $method)) {\n return null;\n }\n return $this->$method(...$args);\n } elseif (method_exists($this, $method)) {\n return $this->$method();\n }\n if ($this->data === null && !$this->new) {\n throw new Exceptions\\InvalidStateException;\n }\n if (isset($this->joinedData[$field])) {\n return $this->joinedData[$field];\n }\n return $this->data[$field] ?? null;\n }", "public function get(string $key, string $field = null)\n {\n if(!$field) {\n return $this->getTable()->get($key);\n }\n \n return $this->getTable()->get($key, $field);\n }", "public static function getFieldFromRow($row, $field) {\r\n if (isset($row[$field])) {\r\n $value = $row[$field];\r\n if (is_string($value)) {\r\n return /* utf8_encode */(trim($row[$field]));\r\n } else {\r\n return $row[$field];\r\n }\r\n } else {\r\n return null;\r\n }\r\n }", "function FetchOneRowDataByOneField($tableName,$fieldName,$fieldValue)\n{\n $query = $this->db->query(\"Select * from $tableName where $fieldName='\".$fieldValue.\"'\");\n $totalRowsUnique = $query->num_rows();\n if($totalRowsUnique > 0)\n {\n return $query->row();\n }\n \n}", "public function GetPn($field,$id)\r\n {\r\n $query = mysql_query(\"SELECT * FROM panduan WHERE id_panduan = '$id' \");\r\n $row = mysql_fetch_array($query);\r\n if($field)\r\n return $row[$field];\r\n }", "function news_get_field( $p_news_id, $p_field_name ) {\r\n\t\t$row = news_get_row( $p_news_id );\r\n\t\treturn ( $row[$p_field_name] );\r\n\t}", "public function getField($field, $default = \"\", $filter = false)\n {\n return Data::get($field, static::FIELD_PREFIX . $this->getID(), $default, $filter);\n }", "public function firstByField($field, $value, $columns = ['*']);" ]
[ "0.7806392", "0.7106426", "0.7106426", "0.70381033", "0.70268565", "0.70268565", "0.6875818", "0.6781313", "0.67061704", "0.66652185", "0.65904516", "0.656981", "0.6526176", "0.65252846", "0.65252846", "0.64884377", "0.6473933", "0.64567", "0.64313453", "0.6411037", "0.639486", "0.6373025", "0.6348488", "0.6346025", "0.6335679", "0.62694335", "0.62626684", "0.62178886", "0.61985606", "0.6192161", "0.618364", "0.6174898", "0.6174734", "0.61669457", "0.6150518", "0.61450773", "0.6136903", "0.6132388", "0.60950947", "0.60784876", "0.60761666", "0.60421526", "0.6012548", "0.6009217", "0.60082656", "0.6004827", "0.59914994", "0.59853804", "0.59808713", "0.59801424", "0.59775895", "0.5968961", "0.59587485", "0.59380317", "0.5935032", "0.5934603", "0.592712", "0.5926832", "0.5918675", "0.5906477", "0.5906091", "0.5904298", "0.58911693", "0.58715886", "0.58620757", "0.58608633", "0.5842735", "0.5835673", "0.5823915", "0.5820576", "0.580233", "0.5795293", "0.57858527", "0.57828313", "0.57812107", "0.57785004", "0.57750463", "0.576137", "0.57609165", "0.5746475", "0.57384324", "0.5729191", "0.5721116", "0.5718751", "0.57159024", "0.5710463", "0.57037956", "0.569542", "0.5686297", "0.56821924", "0.56811464", "0.5677495", "0.5676939", "0.5671241", "0.5660855", "0.5652219", "0.56499463", "0.5649822", "0.56482196", "0.56453204", "0.56436026" ]
0.0
-1
Insert a record into storage.
public function insert(array $data) { if (isset($data['ID'])) { throw new RuntimeException("Cannot insert: post already exists."); } return (int)wp_insert_post($data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function insertRecord($tableName, $record);", "public function insertRecord()\n\t{\n\t\tif($this->user->hasRight($this->getHandler()->getAddRight()))\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$record = $this->getHandler()->getRecord();\n\t\t\t\t$record->import($this->getRequest());\n\n\t\t\t\t// check captcha\n\t\t\t\t$this->handleCaptcha($record);\n\n\t\t\t\t// insert\n\t\t\t\t$this->getHandler()->create($record);\n\n\n\t\t\t\t$msg = new Message('You have successful create a ' . $record->getName(), true);\n\n\t\t\t\t$this->setResponse($msg);\n\t\t\t}\n\t\t\tcatch(\\Exception $e)\n\t\t\t{\n\t\t\t\t$msg = new Message($e->getMessage(), false);\n\n\t\t\t\t$this->setResponse($msg);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$msg = new Message('Access not allowed', false);\n\n\t\t\t$this->setResponse($msg, null, $this->user->isAnonymous() ? 401 : 403);\n\t\t}\n\t}", "public function store()\n {\n if( $this->isPersistent() )\n {\n $this->update();\n }\n else\n {\n $this->insert();\n }\n }", "public function insert(&$key, $record, $flags = 0) {\n return UPS_SUCCESS;\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "function add($record)\n\t{\n\t\t// convert object from associative array, if needed\n\t\t$record = (is_array($record)) ? (object) $record : $record;\n\n\t\t// update the DB table appropriately\n\t\t$key = $record->{$this->_keyfield};\n\t\t$this->_data[$key] = $record;\n\n\t\t$this->store();\n\t}", "public function pushRecord()\r\n {\r\n\r\n }", "public abstract function insert();", "abstract public function insert();", "public function persist()\n {\n $uid = $this->getIdentifier() == 0 ? 'NEW' . rand(100000, 999999) : $this->getIdentifier();\n $data = [\n trim(static::$storageTableName) => [\n $uid => $this->getPersistableDataArray()\n ]\n ];\n // New records always must have a pid\n if ($this->getIdentifier() == 0) {\n $data[trim(static::$storageTableName)][$uid]['pid'] = 0;\n }\n /** @var \\TYPO3\\CMS\\Core\\DataHandling\\DataHandler $tce */\n $tce = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance(\\TYPO3\\CMS\\Core\\DataHandling\\DataHandler::class);\n $tce->start($data, []);\n $tce->process_datamap();\n }", "public function recInsert($record) {\n $conn = Query::connect();\n $col = $conn->SelectLimit(\"select*from \".static::getTable(),1);\n $sql = $conn->GetInsertSQL($col,$record);\n $rs = $conn->Execute($sql);\n return $conn->ErrorNo();\n }", "public function storeRecord(&$record)\n {\n $atkstoretype = '';\n $sessionmanager = SessionManager::getInstance();\n if ($sessionmanager) {\n $atkstoretype = $sessionmanager->stackVar('atkstore');\n }\n switch ($atkstoretype) {\n case 'session':\n return $this->storeRecordInSession($record);\n default:\n return $this->storeRecordInDb($record);\n }\n }", "public function store($record, $filename)\n {\n try {\n $client = $this->createLocalStorageDriver();\n\n if ( ! $client->exists(\"$filename.json\")) {\n $client->put(\"$filename.json\", json_encode($record));\n } else {\n $client->append(\"$filename.json\", json_encode($record));\n }\n }\n catch (Exception $e) {\n throw $e;\n }\n }", "public function insert($data);", "public function insert() {\r\n\t\t$this->getMapper()->insert($this);\r\n\t}", "function dbase_add_record($dbase_identifier, $record)\n{\n}", "public function insert()\n {\n $this->_checkItem();\n $service = $this->getService();\n $entry = $service->newItemEntry();\n $this->setEntry($entry);\n $this->_prepareEnrtyForSave();\n $this->getEntry()->setItemType($this->_getItemType());\n $entry = $service->insertGbaseItem($this->getEntry());\n $this->setEntry($entry);\n $entryId = $this->getEntry()->getId();\n $published = $this->gBaseDate2DateTime($this->getEntry()->getPublished()->getText());\n $this->getItem()\n ->setGbaseItemId($entryId)\n ->setPublished($published);\n\n if ($expires = $this->_getAttributeValue('expiration_date')) {\n $expires = $this->gBaseDate2DateTime($expires);\n $this->getItem()->setExpires($expires);\n }\n }", "public function insert()\n {\n $this->id = insert($this);\n }", "public abstract function Insert();", "public function insert() {\n \n }", "public function insert(stubObject $entity);", "public function testInsertingNewDataToStorage()\n {\n unlink(TESTING_STORE);\n\n // create new instance\n $store = new Storage(TESTING_STORE);\n\n // insert the data into store\n $store->insert($this->single_dummy);\n\n // fetch the data and count the result\n // since we insert only one new data, so the test result must be === 1\n $this->assertEquals(1, count($store->read()));\n }", "protected function _insert()\n {\n \t$metadata = $this->_table->info(Zend_Db_Table_Abstract::METADATA);\n \t\n \tif(isset($metadata['created_at']))\n\t\t\t$this->_data['created_at'] = new Zend_Date ();\n \tif(isset($metadata['updated_at']))\n\t\t\t$this->_data['updated_at'] = new Zend_Date ();\n }", "public function insertRecord ($sqlString);", "public function insert($txn = null, &$key, $record, $flags) {\n return UPS_SUCCESS;\n }", "protected function storeRecordInDb(&$record)\n {\n if (!$this->m_node->addDb($record, true, 'add')) {\n return false;\n }\n\n $this->m_node->getDb()->commit();\n $this->notify('save', $record);\n $this->clearCache();\n\n return true;\n }", "public static function insert()\n {\n }", "public function createRecord();", "public function record() {\n $data = array(\n \"name\" => $this->name,\n \"description\" => $this->description,\n \"image\" => $this->image,\n \"type\" => $this->type,\n \"discount\" => $this->discount_offer,\n \"code\" => $this->coupon_code,\n \"expiration\" => $this->expiration\n );\n return $this->db->insert(\"trade\", $data);\n }", "protected function _insert()\n {\n \n }", "protected function _insert()\n {\n \n }", "public function add(Record $record)\n {\n $this->list[] = $record;\n }", "public function insert()\n {\n \n }", "protected function saveInsert()\n {\n }", "protected function _insert()\n\t{\n\t\t$this->date_added = \\Core\\Date::getInstance(null,\\Core\\Date::SQL_FULL, true)->toString();\n\t\t$this->date_modified = $this->date_added;\n\t\t$this->last_online = $this->date_modified;\n\t\t$this->activity_open = $this->date_modified;\n\t\t$this->language_id = \\Core\\Base\\Action::getModule('Language')->getLanguageId();\n\t}", "public function insert($zone, $file, $datasource = null);", "public function insert()\n {\n }", "public function insert()\n {\n }", "public function insert($medAccount);", "public function insert(DataObject $entity){\n }", "public function insert_() {\n\n\n\t\t\t$podcast = Model\\Podcast::get_instance();\n\n\t\t}", "public function testStore_Insert()\n {\n \t$id1 = $this->conn->store('test', array(null, 'new1', 'new row ONE', 'NEW'));\n \t$id2 = $this->conn->store('test', array('key'=>'new2', 'title'=>'new row TWO'));\n \t\n \t$result = $this->conn->query('SELECT * FROM test where status=\"NEW\"');\n \t$this->assertEquals(array($id1, 'new1', 'new row ONE', 'NEW'), $result->fetchOrdered());\n \t$this->assertEquals(array($id2, 'new2', 'new row TWO', 'NEW'), $result->fetchOrdered());\n\t}", "public function insert(Tag $tag);", "public function insert()\n {\n # code...\n }", "public function _insert($data)\n {\n $this->insert($data);\n }", "public function insert(){\r\n\t\tif (!$this->new){\r\n\t\t\tMessages::msg(\"Cannot insert {$this->getFullTableName()} record: already exists.\",Messages::M_CODE_ERROR);\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t\r\n\t\t$this->beforeCommit();\r\n\t\t\r\n\t\t$vals = array();\r\n\t\t$error = false;\r\n\t\tforeach ($this->values as $name=>$value){\r\n\t\t\tif ($value->isErroneous()){\r\n\t\t\t\tFramework::reportErrorField($name);\r\n\t\t\t\t$error = true;\r\n\t\t\t}\r\n\t\t\t$vals[\"`$name`\"] = $value->getSQLValue();\r\n\t\t}\r\n\t\tif ($error){\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t\r\n\t\t$sql = 'INSERT INTO '.$this->getFullTableName().' ('.implode(', ',array_keys($vals)).') VALUES ('.implode(', ',$vals).')';\r\n\t\tif (!SQL::query($sql)->success()){\r\n\t\t\tMessages::msg('Failed to insert record into '.$this->getFullTableName().'.',Messages::M_CODE_ERROR);\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t\r\n\t\t// Get this here, because getPrimaryKey can call other SQL queries and thus override this value\r\n\t\t$auto_id = SQL::getInsertId();\r\n\t\t\r\n\t\t$table = $this->getTable();\r\n\t\t// Load the AUTO_INCREMENT value, if any, before marking record as not new (at which point primary fields cannot be changed)\r\n\t\tforeach ($table->getPrimaryKey()->getColumns() as $name){\r\n\t\t\tif ($table->getColumn($name)->isAutoIncrement()){\r\n\t\t\t\t$this->$name = $auto_id;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->new = false;\r\n\t\t$this->hasChanged = false;\r\n\t\tforeach ($this->values as $value){\r\n\t\t\t$value->setHasChanged(false);\r\n\t\t}\r\n\t\t\r\n\t\t$this->afterCommit();\r\n\t\t\t\r\n\t\treturn self::RES_SUCCESS;\r\n\t}", "public static function insertRecord(string $table, array $data)\n {\n try {\n return Capsule::table($table)->insert($data);\n } catch (Exception $ex) {\n logActivity(\"Can not insert data into {$table}, error: {$ex->getMessage()}\");\n }\n }", "public function insert(){\n // Access-controlled resource\n if (!$this->_app->user->checkAccess('uri_drone_insert')){\n $this->_app->notFound();\n }\n // do something here\n }", "public function insert($entity){\n\t\ttry {\n\t\t\t$data = $entity->toArray();\n\t\t\t$this->callBehavior('beforeInsert',$data);\n\t\t\t$this->convertId($data);\n\t\t\t$result = $this->collection->insertOne($data);\n\t\t\t$data['_id'] = $result->getInsertedId();\n\t\t\t//$this->doIntegrateIn($data);\n\t\t\t$this->callBehavior('afterInsert',$data);\n\t\t} catch (Exception $e) {\n\t\t\tthrow $e;\n\t\t}\n\t}", "protected function insert()\n\t{\n\t\t$this->autofill();\n\n\t\tparent::insert();\n\n\t}", "public function store( $id, $data );", "protected function _insert()\n\t{\n\t}", "public function insert() {\n\t\tif ( !$this->content || !$this->resource ) {\n\t\t\tthrow new UnexpectedValueException( \"Provide at least a comment, rating or tag and a resource.\" );\n\t\t}\n\t\tif ( empty( $this->smoValues[\"simple\"][\"dtreviewed\"] ) ) {\n\t\t\t$this->setParameter( \"dtreviewed\", date('c') );\n\t\t}\n\n\t\t$this->action = \"insert\";\n\t\t$this->createSmoRequest();\n\t\t$xmlVar = new SoapVar( \"<ns1:insertSMO>\".$this->smo.\"</ns1:insertSMO>\", XSD_ANYXML );\n\t\t$this->insertSMO( $xmlVar );\n\t\t$this->processResponse( $this->__getLastResponse() );\n\t}", "protected function performInsert()\n {\n $attributes = $this->getAttributes();\n $updatedField = $this->getApi()->{'create'.ucfirst($this->getEntity())}($attributes);\n $this->fill($updatedField);\n $this->exists = true;\n $this->wasRecentlyCreated = true;\n\n return true;\n }", "public function insert($recording)\n {\n $query=\"INSERT INTO recording ( \".\n\t \"id,\".\n \"gid,\".\n \"name,\".\n \"artist_credit,\".\n \"length,\".\n \"comment,\".\n \"edits_pending,\".\n \"last_updated,\".\n \"video \". \n \")\".\n \"VALUES (\".\n \"null,\".\n \"'\".$this->sqlSafe($recording->gid).\"',\".\n \"'\".$this->sqlSafe($recording->name).\"',\".\n \" \".$recording->artist_credit.\" ,\".\n \" \".$recording->length.\" ,\".\n \"'\".$this->sqlSafe($recording->comment).\"',\".\n \" \".$recording->edits_pending.\" ,\".\n \"'\".$this->sqlSafe($recording->last_updated).\"',\".\n \"'\".$this->sqlSafe($recording->video).\"' \". \n \")\"; \n\n $this->executeQuery($query);\n }", "public function insert($data)\r\n {\r\n \r\n }", "public function addChild(Doctrine_Record $record);", "public function store();", "public function store();", "public function store();", "public function insert(array $params);", "public function insertProduct(Product $product);", "public function insert(Table $table, $row);", "protected function insert() {\n $dbh = $this->getDbh();\n $table = $this->tableName;\n $data = [];\n\n foreach ($this->fillable as $key => $value) {\n $data[$key] = $this->$key;\n }\n\n $query = 'INSERT INTO `' . $table . '` VALUES (NULL,';\n $first = true;\n foreach ($data AS $k => $value) {\n if (!$first)\n $query .= ', ';\n else\n $first = false;\n $query .= ':'.$k;\n }\n $query .= ')';\n\n $msc = microtime(true);\n\n $sth = $dbh->prepare($query);\n $sth->execute($data);\n\n $msc = microtime(true) - $msc;\n $line = \"insert() => \" . $query . \" with \" . implode(\"', '\", $data);\n $this->writeRequestLog($line, $msc);\n\n return true;\n }", "public function insert()\n\t{\n\t\treturn $this->getModel()->insert($this);\n\t}", "public function insert() {\n\t\t$insert_array = $this->toDbArray(true, true);\n\t\tif (array_key_exists('_id', $insert_array)) { unset($insert_array['_id']); }\n\t\t$ret_val = $this->getCollection()->save($insert_array);\n\t\tif (isset($insert_array['_id'])) {\n\t\t\t$this->setId($insert_array['_id']);\n\t\t}\n\t\treturn $this->getId();\n\t}", "protected function write(array $record)\n {\n $data = $record['formatted'];\n $meta = $data['meta'];\n unset($data['meta']);\n\n $this->client->insert($meta['key'], $data, $meta['expireTime']);\n }", "public function insert($item): void;", "public function insert(array $info) {\n\n // Insert record\n return parent::_insert($info);\n }", "public function insert(array $info) {\n\n // Insert record\n return parent::_insert($info);\n }", "public function store()\n\t{\n\t\treturn $this->repo->saveRecord($this->storeInput());\n\t}", "public function insert($tableName, $data);", "protected function storeRecordInSession(&$record)\n {\n Tools::atkdebug('STORING RECORD IN SESSION');\n $result = SessionStore::getInstance()->addDataRow($record, $this->m_node->primaryKeyField());\n\n return $result !== false;\n }", "public function insert($techHit);", "public function insert($attributes);", "public function insert( $storageLocal, array $data ){\n $stmt = new Insert( $this->pdo, $this->sqlGenerator, $storageLocal, $data );\n return $stmt;\n }", "private function insertTrack(){\n\n $query = \"INSERT INTO \" . $this->prefix . \"track (`track_name`, `track_primary_color`, `track_secondary_color`, `track_date_insert`) values ('\" . $this->track_name . \"','\" . $this->track_primary_color . \"','\" . $this->track_secondary_color . \"','\" . $this->track_date_insert . \"')\";\n $this->track_id = db_query_return_id($query);\n\n #return error\n return;\n }", "public function insert($newrecord)\n {\n global $debug;\n global $warn;\n global $connection;\n\n if ($this->list === null)\n $this->list = array($newrecord->getId() => $newrecord);\n else\n { // list is not empty\n $offset = 0;\n foreach($this->list as $key => $record)\n {\n if ($newrecord->compare($record) < 0)\n { // new record sorts before current record\n $before = array_slice($this->list, 0, $offset, true);\n $after = array_slice($this->list, $offset, null, true);\n $this->list = $before +\n array($newrecord->getId() => $newrecord) +\n $after;\n $newrecord = null;\n break;\n }\n $offset++;\n }\n if ($newrecord)\n { // add to end\n $this->list[$newrecord->getId()] = $newrecord;\n } // add to end\n } // list is not empty\n $this->information['count'] = count($this->list);\n }", "public function insert(array $data);", "public function insert(array $data);", "public function insert($metricaevotranspiracion);", "public function addRecord()\n {\n $rec = new Record($this, true);\n $rec->markForInsert();\n $this->records[] = $rec;\n return $rec;\n }", "public function insert($attributes = null)\r\n\t{\r\n\t\tif(!$this->getIsNewRecord()){\r\n\t\t\tthrow new Exception(Yii::t('yii','The active record cannot be inserted to database because it is not new.'));\r\n\t\t}\r\n\t\tif(!$this->beforeSave()){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$this->trace(__FUNCTION__);\r\n\t\tif($attributes === null){\r\n\t\t\t$document=$this->getRawDocument();\r\n\t\t}else{\r\n\t\t\t$document=$this->filterRawDocument($this->getAttributes($attributes));\r\n\t\t}\r\n\r\n\t\tif(YII_DEBUG){\r\n\t\t\t// we're actually physically testing for Yii debug mode here to stop us from\r\n\t\t\t// having to do the serialisation on the update doc normally.\r\n\t\t\tYii::trace('Executing storeFile: {$document:' . json_encode($document) . '}', 'extensions.MongoYii.EMongoDocument');\r\n\t\t}\r\n\t\tif($this->getDbConnection()->enableProfiling){\r\n\t\t\t$this->profile('extensions.MongoYii.EMongoFile.insert({$document:' . json_encode($document) . '})', 'extensions.MongoYii.EMongoFile.insert');\r\n\t\t}\r\n\r\n\t\tif($_id = $this->getCollection()->storeFile($this->getFilename(), $document)){ // The key change\r\n\t\t\t$this->_id = $_id;\r\n\t\t\t$this->afterSave();\r\n\t\t\t$this->setIsNewRecord(false);\r\n\t\t\t$this->setScenario('update');\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public function insert() {\n $this->data['creation_datetime']=date('Y-m-d H:i:s');\n $this->data['last_login_datetime']=date('Y-m-d H:i:s');\n if (array_key_exists('expiresIn', $this->rawData) && $this->rawData['expiresIn'] != '') {\n $this->data['expires_datetime']=date('Y-m-d H:i:s', time()+$this->rawData['expiresIn']); \n }\n parent::insert();\n }", "public function create($insert)\n\t\t{\n\t\t\t$ret = $this->db->insert($this->record, $insert);\n\t\t\treturn $ret;\n\t\t}", "public function insert() {\r\n\r\n\t\t// Does the Genre object already have an ID?\r\n\t\tif ( !is_null( $this->id ) ) trigger_error ( \"Genre::insert(): Attempt to insert an Genre object that already has its ID property set (to $this->id).\", E_USER_ERROR );\r\n\r\n\t\t// Insert the Genre\r\n\t\t$conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\r\n\t\t$sql = \"INSERT INTO :table ( id, name ) VALUES ( :id, :name )\";\r\n\t\t$st = $conn->prepare ( $sql );\r\n\t\t$st->bindValue( \":table\", DB_TBL_GENRE, PDO::PARAM_STR );\r\n\t\t$st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\r\n\t\t$st->bindValue( \":name\", $this->name, PDO::PARAM_STR );\r\n\t\t$st->execute();\r\n\t\t$this->id = $conn->lastInsertId();\r\n\t\t$conn = null;\r\n\t}", "public function _insert()\n\t {\n\t \t$this->notifyObservers(__FUNCTION__);\n\t }", "function insert_record () {\n // validate input\n $valid = true;\n if (empty($this->name)) {\n $this->nameError = 'Please enter Name';\n $valid = false;\n }\n\n if (empty($this->email)) {\n $this->emailError = 'Please enter Email Address';\n $valid = false;\n } \n\n if (empty($this->mobile)) {\n $this->mobileError = 'Please enter Mobile Number';\n $valid = false;\n }\n\n // insert data\n if ($valid) {\n $pdo = Database::connect();\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $sql = \"INSERT INTO customers (name,email,mobile) values(?, ?, ?)\";\n $q = $pdo->prepare($sql);\n $q->execute(array($this->name,$this->email,$this->mobile));\n Database::disconnect();\n header(\"Location: customer.php\");\n }\n else {\n $this->create_record();\n }\n }", "function insertRecord($ID, $info)\n{\n\tglobal $sitePosition, $currTime;\n\tglobal $shopID, $adminID, $adminIP;\n\n\tquery('Insert into `' . $sitePosition . '.ShopRecord` values (NULL, ' . $ID . ', \"' . escapeStr($info) . '\", ' . $adminID . ', ' . $shopID . ', ' . $adminIP . ', ' . $currTime . ')', false);\n}", "public function insert($attream);", "public function store()\n\t {\n\t //\n\t }", "public final function insert()\n {\n // Run beforeCreate event methods and stop when one of them return bool false\n if ($this->runBefore('create') === false)\n return false;\n\n // Create tablename\n $tbl = '{db_prefix}' . $this->tbl;\n\n // Prepare query and content arrays\n $fields = array();\n $values = array();\n $keys = array();\n\n // Build insert fields\n foreach ( $this->data as $fld => $val )\n {\n // Skip datafields not in definition\n if (!$this->isField($fld))\n continue;\n\n // Regardless of all further actions, check and cleanup the value\n $val = $this->checkFieldvalue($fld, $val);\n\n // Put fieldname and the fieldtype to the fields array\n $fields[$fld] = $this->getFieldtype($fld);\n\n // Object or array values are stored serialized to db\n $values[] = is_array($val) || is_object($val) ? serialize($val) : $val;\n }\n\n // Add name of primary key field\n $keys[0] = $this->pk;\n\n // Run query and store insert id as pk value\n $this->data->{$this->pk} = $this->db->insert('insert', $tbl, $fields, $values, $keys);\n\n return $this->data->{$this->pk};\n }", "public final function _addInstance(AutoRecord $record)\n {\n $this->_recordInstances[$record->getTableName()][$record->getPrimaryKeyValue()] = $record;\n }", "public function insert(DataObject $insertObject, Database_Config $databaseConfig = NULL);", "public function store($id);", "public function testBlobInsert()\n {\n $fixture = new Mad_Test_Fixture_Base($this->_conn, 'unit_tests');\n $fixture->load();\n $record = $fixture->getRecord('unit_test_6');\n\n $ut = $this->_getRecord(6);\n $this->assertEquals($record['blob_value'], $ut['blob_value']);\n }", "public function insertRow($row);", "public function insert(array $options);", "public function store_insert($data) {\n //Transfering data to Model\n\t\t$this->db->trans_start();\n\t\t$this->db->insert('store_info', $data);\n\t\t$insert_id = $this->db->insert_id();\n\t\t$this->db->trans_complete();\n\t\treturn $insert_id;\t\t\n \t}", "function insert_record($data){\n\t$this->db->insert('tblname', $data);\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}" ]
[ "0.6832303", "0.6806585", "0.64915276", "0.64476174", "0.6446913", "0.64310676", "0.64097035", "0.6323734", "0.62523353", "0.6233798", "0.6197234", "0.61779076", "0.61731446", "0.6144302", "0.6142425", "0.61337835", "0.6113294", "0.6093674", "0.604536", "0.60317534", "0.6015307", "0.60094285", "0.59475666", "0.5934866", "0.5924523", "0.5865234", "0.5863288", "0.585718", "0.58551544", "0.58392215", "0.58392215", "0.5804452", "0.57775646", "0.5764056", "0.57583946", "0.57583946", "0.57527107", "0.57527107", "0.57509184", "0.57424825", "0.5720768", "0.57199275", "0.57174116", "0.57002586", "0.56978786", "0.5688675", "0.5686931", "0.5681801", "0.568128", "0.5679118", "0.5668963", "0.5657088", "0.56552964", "0.5654637", "0.56530553", "0.56528276", "0.5642836", "0.56379074", "0.56379074", "0.56379074", "0.5636222", "0.56113744", "0.5610822", "0.56051326", "0.556762", "0.5566965", "0.55588233", "0.55412835", "0.5537481", "0.5537481", "0.5534836", "0.55221945", "0.551921", "0.5516235", "0.5511263", "0.55109817", "0.5501371", "0.5498165", "0.5474381", "0.5474381", "0.54705685", "0.54691374", "0.54659563", "0.54629874", "0.54561716", "0.545516", "0.5449237", "0.54488593", "0.54487157", "0.5448651", "0.54385144", "0.54196066", "0.5416641", "0.54136884", "0.5410659", "0.53984153", "0.53951246", "0.5394164", "0.5388223", "0.5387205", "0.5384271" ]
0.0
-1
Update a record in storage.
public function update(array $data, array $where) { if (! isset($where['ID']) && ! isset($data['ID'])) { throw new RuntimeException("Missing Post ID"); } return (bool)wp_update_post(array_merge(array(), $where, $data)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update($record);", "function update($record)\n\t{\n\t\t// convert object from associative array, if needed\n\t\t$record = (is_array($record)) ? (object) $record : $record;\n\t\t// update the collection appropriately\n\t\t$key = $record->{$this->_keyfield};\n\t\tif (isset($this->_data[$key]))\n\t\t{\n\t\t\t$this->_data[$key] = $record;\n\t\t\t$this->store();\n\t\t}\n\t}", "public function update(Request $request, Record $record)\n {\n //\n }", "public function update(Tinebase_Record_Interface $_record) {\n }", "public function update($entity){ \n //TODO: Implement update record.\n }", "public function updateRecord() \n {\n $str = \"Id = :Id\";\n array_walk($this->arrayKeysValues(), function ($value, $key) use (&$str) {\n $str .= \", $key = :$key\";\n });\n $sql = sprintf(\"UPDATE Cubans SET %s WHERE Id = :Id\", $str);\n $statement = $this->connect->prepare($sql);\n $statement->execute(array_merge([\":Id\" => $this->id], $this->arrayKeysValues()));\n }", "public function updateRecord()\n\t{\n\t\tif($this->user->hasRight($this->getHandler()->getEditRight()))\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$record = $this->getHandler()->getRecord();\n\t\t\t\t$record->import($this->getRequest());\n\n\t\t\t\t// check owner\n\t\t\t\tif(!$this->isOwner($record))\n\t\t\t\t{\n\t\t\t\t\tthrow new Exception('You are not the owner of the record');\n\t\t\t\t}\n\n\t\t\t\t// check captcha\n\t\t\t\t$this->handleCaptcha($record);\n\n\t\t\t\t// update\n\t\t\t\t$this->getHandler()->update($record);\n\n\n\t\t\t\t$msg = new Message('You have successful edit a ' . $record->getName(), true);\n\n\t\t\t\t$this->setResponse($msg);\n\t\t\t}\n\t\t\tcatch(\\Exception $e)\n\t\t\t{\n\t\t\t\t$msg = new Message($e->getMessage(), false);\n\n\t\t\t\t$this->setResponse($msg);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$msg = new Message('Access not allowed', false);\n\n\t\t\t$this->setResponse($msg, null, $this->user->isAnonymous() ? 401 : 403);\n\t\t}\n\t}", "public function update($data) {}", "public function update($data) {}", "public function update(Request $request, QualityRecord $qualityRecord)\n {\n //\n }", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update(Record $record)\n {\n request()->validate([\n 'title' => 'required',\n 'content' => 'required',\n ]);\n\n $success = $record->update([\n 'title' => request('title'),\n 'content' => request('content'),\n ]);\n\n return [\n 'success' => $success\n ];\n }", "public function update(Request $request, ReadingRecord $readingRecord)\n {\n //\n }", "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "function update($idMedicalRecord) // Implementation \r\n\t\t{\r\n\t\t\t$this->idMedicalRecord = $idMedicalRecord;\r\n\t\t\t$dbo = database::getInstance(); // pass back that database object already created perhaps\r\n\t\t\t$sql = $this->buildQuery('update'); // what we want to do (update records)\r\n\r\n\t\t\t$dbo->doQuery($sql); // execute query statement\r\n\t\t}", "public function update($entity);", "public function update($entity);", "public function update(UpdatePatientRecordRequest $request, PatientRecord $patientRecord)\n {\n //\n }", "private function crud_put($record = null)\n {\n $key = $record['id'];\n // Make sure the new record has an ID\n if (!isset($key))\n {\n $this->response(array('error' => 'Update: No item specified'), 406);\n return;\n }\n // make sure the item is real\n if (!$this->supplies->exists($key))\n {\n $this->response(array('error' => 'Update: Item ' . $key . ' not found'), 406);\n return;\n }\n // proceed with update\n $this->supplies->update($record);\n // check for DB errors\n $oops = $this->db->error();\n if (empty($oops['code']))\n $this->response(array('ok'), 200);\n else\n $this->response($oops, 400);\n }", "public function update(Entity $entity);", "public function update(UpdateRecordRequest $request, Record $record)\n {\n $input = $request->all();\n $record->update($input);\n return response()->json([\n 'res' => true,\n 'message' => 'Registro actualizado correctamente'\n ], 201);\n }", "public function testUpdateStore()\n {\n\n }", "public function update()\n {\n $this->_checkItem();\n $service = $this->getService();\n $entry = $service->getGbaseItemEntry( $this->getItem()->getGbaseItemId() );\n $this->setEntry($entry);\n $this->_prepareEnrtyForSave();\n $entry = $service->updateGbaseItem($this->getEntry());\n\n }", "abstract public function updateRecord($tableName, $record, $where = '');", "public function update()\n {\n return $this->save();\n }", "public function updateRecord(){\n\t\tglobal $db;\n $data = array('email'=>$this->email);\n\t\t\t\t$response = $db->update($this->table,$data,\"id = $this->id\");\n\t\treturn $response;\n\t}", "public function onUpdateRecord()\n {\n $this->updated = new \\DateTime();\n $this->rev++;\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function db_update() {}", "public function update($entity)\n {\n \n }", "public function testUpdateSingleRecord() {\r\n // Create record\r\n $po = new test_persistence_AbstractPersistenceAdapterTestPersistentObject();\r\n $po->booleanValue = true;\r\n $po->intValue = 2147483647;\r\n $po->stringValue = 'Hallo Welt!';\r\n // Store new record\r\n $this->getPersistenceAdapter()->save($po);\r\n // Remember UUID\r\n $uuid = $po->uuid;\r\n // Update values;\r\n $po->booleanValue = false;\r\n $po->intValue = -2147483646;\r\n $po->stringValue = 'Guten Morgen!';\r\n // Update record\r\n $this->getPersistenceAdapter()->save($po);\r\n // Get record back from database\r\n $result = $this->executeQuery('select * from POTEST where UUID=\\''.$uuid.'\\'');\r\n // Records must be unique\r\n $this->assertEquals($po->booleanValue, (bool)$result[0]['BOOLEAN_VALUE'], 'Boolean value from database differs from the boolean value of the persistent object.');\r\n $this->assertEquals($po->intValue, intval($result[0]['INT_VALUE']), 'Integer value from database differs from the int value of the persistent object.');\r\n $this->assertEquals($po->stringValue, $result[0]['STRING_VALUE'], 'String value from database differs from the string value of the persistent object.');\r\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(Request $request, BookRecord $bookRecord)\n {\n //\n }", "public function update(IEntity $entity);", "public function update(Request $request, Record $record)\n {\n $request->data && $request->merge([\n 'data' => Crypt::encrypt(json_encode($request->data)),\n ]);\n\n $record->update([\n 'name' => $request->name ?? $record->name,\n 'data' => $request->data ?? $record->data,\n ]);\n\n return new Resource($record);\n }", "public function update($medAccount);", "private function update(){\n\t\t$id = $this->objAccessCrud->getId();\n\t\tif (empty ( $id )) return;\n\t\t// Check permission to update.\n\t\t$result = $this->clsAccessPermission->toUpdate();\n\t\tif(!$result){\n\t\t\t$this->msg->setWarn(\"You don't have permission to update!\");\n\t\t\treturn;\n\t\t}\n\t\t// Execute Update.\n\t\tif (! $this->objAccessCrud->update ()) {\n\t\t\t$this->msg->setError (\"There were issues on update the record!\");\n\t\t\treturn;\n\t\t}\n\t\t$this->msg->setSuccess (\"Updated the record with success!\");\n\t\treturn;\n\t}", "protected function update() {}", "function UpdateRecord($values)\n {\n $databasename = $this->databasename;\n $tablename = $this->tablename;\n $path = $this->path;\n //dprint_r($_FILES);\n if ( !isset($values[$this->primarykey]) )\n return false;\n $unirecid = $values[$this->primarykey];\n return $this->UpdateRecordBypk($values,$this->primarykey,$values[$this->primarykey]);\n }", "public abstract function update($object);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($identifier, array $values, $flush = true);", "public function update(){\r\n\t\tif (!$this->hasChanged) return self::RES_UNCHANGED;\r\n\t\t$table = $this->getTable();\r\n\t\tif ($this->new){\r\n\t\t\tMessages::msg(\"Cannot update record in {$this->getFullTableName()}, because the record doesn't exist.\",Messages::M_CODE_ERROR);\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\tif (!$table->hasPrimaryKey()){\r\n\t\t\tMessages::msg(\"Cannot update record in {$this->getFullTableName()}, because the table does not have a primary key.\",Messages::M_CODE_ERROR);\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t\r\n\t\t$this->beforeCommit();\r\n\t\t\r\n\t\t$vals = array();\r\n\t\t$where = array();\r\n\t\t$changeCount = 0;\r\n\t\t$error = false;\r\n\t\tforeach ($this->values as $name=>$value){\r\n\t\t\tif ($value->isErroneous()){\r\n\t\t\t\tFramework::reportErrorField($name);\r\n\t\t\t\t$error = true;\r\n\t\t\t}\r\n\t\t\tif ($value->hasChanged()){\r\n\t\t\t\t$vals[] = \"`$name` = \".$value->getSQLValue();\r\n\t\t\t\t$changeCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($error){\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t\r\n\t\tforeach ($table->getPrimaryKey()->getColumns() as $name){\r\n\t\t\t$where[] = \"`$name` = \".$this->values[$name]->getSQLValue();\r\n\t\t}\r\n\t\t$sql = 'UPDATE '.$this->getFullTableName().' SET '.implode(', ',$vals).' WHERE '.implode(' AND ',$where).' LIMIT 1';\r\n\t\tif (!SQL::query($sql)->success()){\r\n\t\t\tMessages::msg('Failed to update record in '.$this->getFullTableName().'.',Messages::M_CODE_ERROR);\r\n\t\t\treturn self::RES_FAILED;\r\n\t\t}\r\n\t\t$this->hasChanged = false;\r\n\t\tforeach ($this->values as $value){\r\n\t\t\t$value->setHasChanged(false);\r\n\t\t}\r\n\t\t\r\n\t\t$this->afterCommit();\r\n\t\t\r\n\t\treturn self::RES_SUCCESS;\r\n\t}", "public function update($data)\n {\n }", "public function update($data)\n {\n }", "public function update($data)\n {\n }", "public function update($data)\n {\n }", "public function update($recording)\n {\n $query=\"UPDATE recording \".\n\t \"SET \".\n \"id= \".$recording->id.\" ,\".\n \"gid='\".$this->sqlSafe($recording->gid).\"',\".\n \"name='\".$this->sqlSafe($recording->name).\"',\".\n \"artist_credit= \".$recording->artist_credit.\" ,\".\n \"length= \".$recording->length.\" ,\".\n \"comment='\".$this->sqlSafe($recording->comment).\"',\".\n \"edits_pending= \".$recording->edits_pending.\" ,\".\n \"last_updated='\".$this->sqlSafe($recording->last_updated).\"',\".\n \"video='\".$this->sqlSafe($recording->video).\"' \". \n\t \"WHERE id=\".$recording->id;\n\n $this->executeQuery($query);\n }", "private function update(){\n\t\t$q = Queries::update($this->authkey);\n\t\t$this->internalQuery($q);\n\t}", "function update(IContract $entity);", "public function Update($entry) {\n $sql_entries_helper = new VCFF_Reports_Helper_SQL_Entries();\n // Add the entry\n $sql_entries_helper\n ->Add_Entry($entry['store_entry']);\n // If there is meta to store\n if (isset($entry['store_fields']) && is_array($entry['store_fields'])) {\n // Loop through each field\n foreach ($entry['store_fields'] as $machine_code => $field_data) { \n // Add the entry\n $sql_entries_helper->Add_Field_Item($field_data);\n }\n }\n // If there is meta to store\n if (isset($entry['store_meta']) && is_array($entry['store_meta'])) {\n // Loop through each field\n foreach ($entry['store_meta'] as $meta_code => $meta_data) {\n // Add the entry\n $sql_entries_helper->Add_Meta_Item($meta_data);\n }\n }\n // Store the changes\n $sql_entries_helper->Store();\n }", "public function modifyRecord($record)\n {\n return $record;\n }", "abstract public function updateData();", "public function updateOrCreateRecord(array $record) {\n /** @var CmfDbModel|KeyValueModelHelpers $this */\n if (empty($record['key'])) {\n throw new DbModelException($this, '$record does not contain [key] key or its value is empty');\n } else if (!array_key_exists('value', $record)) {\n throw new DbModelException($this, '$record does not contain [value] key');\n }\n $conditions = [\n 'key' => $record['key']\n ];\n $fkName = $this->getMainForeignKeyColumnName();\n if (!empty($fkName)) {\n if (empty($record[$fkName])) {\n throw new DbModelException($this, \"\\$record does not contain [{$fkName}] key or its value is empty\");\n }\n $conditions[$fkName] = $record[$fkName];\n }\n $object = $this->getOwnDbObject()->find($conditions);\n if ($object->exists()) {\n return $object\n ->begin()\n ->_setFieldValue('value', $record['value'])\n ->commit();\n } else {\n return $object\n ->reset()\n ->fromData($record)\n ->save();\n }\n }", "function update_record () {\n\t\t\n\t\t// validate input\n $valid = true;\n if (empty($this->name)) {\n $this->nameError = 'Please enter Name';\n $valid = false;\n }\n\n if (empty($this->email)) {\n $this->emailError = 'Please enter Email Address';\n $valid = false;\n } \n\n\n if (empty($this->mobile)) {\n $this->mobileError = 'Please enter Mobile Number';\n $valid = false;\n }\n\n // update data\n if ($valid) {\n $pdo = Database::connect();\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $sql = \"UPDATE customers SET name = ?, email = ?, mobile = ? WHERE id=\".$_GET['id'];\n $q = $pdo->prepare($sql);\n $q->execute(array($this->name,$this->email,$this->mobile));\n Database::disconnect();\n header(\"Location: customer.php\");\n }\n else {\n $this->update();\n }\n\t\n\t}", "public function update()\n\t{\n\t\t$this->getModel()->update($this);\n\t}", "public function update()\n {\n update($this->id, $article);\n }", "public function Update($data) {\n\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function testUpdate()\n {\n $model = $this->makeFactory();\n $model->save();\n\n $newModel = $this->makeFactory();\n\n $this->json('PUT', static::ROUTE . '/' . $model->id, $newModel->toArray(), [\n 'Authorization' => 'Token ' . self::getToken()\n ])\n ->seeStatusCode(JsonResponse::HTTP_OK) \n ->seeJson($newModel->toArray());\n }", "public function update(Request $request, Store $store)\n {\n //\n }", "public function update(Request $request, Store $store)\n {\n //\n }", "public function update($attream);", "public function updateRecord() {\r\n\t\tif (isset($_POST['level']) && $_POST['level']=='header') $this->updateHeader();\r\n\t\tif (isset($_POST['level']) && $_POST['level']=='detail') $this->updateDetail();\r\n\t}", "public function update(DataObject $entity){\n }", "public function update($id);", "public function update($id);", "public function update(stubObject $entity);", "public function updateProduct(Product $product);", "public function updated(Patient $patient)\n {\n\n }", "public function setRecord($record){\n $this->record = $record;\n }", "public function update(): void\n {\n $this->updateQuality();\n $this->updateSellIn();\n $this->expiresAfterSale();\n }", "protected function update() {\n $this->db->updateRows($this->table_name, $this->update, $this->filter);\n storeDbMsg($this->db,ucwords($this->form_ID) . \" successfully updated!\");\n }", "public function edit(Record $record)\n {\n //\n }", "public function testUpdate(): void { }", "public function Update($entity) {\n }", "public function update()\n {\n }", "public function update(string $key, $newData);", "public function update() {\n\t\tif (isset($this->params['updated'])) {\n\t\t\t$this->params['updated'] = null;\n\t\t} // 'updated' is an auto timestamp\n\n\t\t$columns = array();\n\t\tforeach (array_keys($this->params) as $key) {\n\t\t\tarray_push($columns, $key . ' = ?');\n\t\t}\n\t\t$bindings = implode(', ', $columns);\n\t\t$sql = 'UPDATE ' . static::$table . ' SET ' . $bindings . ' WHERE id = ' . $this->get('id') . ' ;';\n\t\t$query = DBH()->prepare($sql);\n\t\t$query->execute(array_values($this->params));\n\t}", "public function update($id) {\n \n }", "public function update($id) {\n \n }", "public function update($obj)\n {\n }", "public function update(Request $request, $id)\n {\n // New & Update made in the store function above\n }", "protected function updateEntity($entity)\n {\n }", "public function update(array $data);", "public function update(array $data);", "public function update(array $data);", "public function update($object): void;", "public function update() {\n\t\tTournamentDBClient::update($this);\n\t}", "function updateRecord($id, $name, $position, $team, $age, $dateofarticle, $projdraftround, $injsus, $href, $newssrc, $notes, $status)\n\t {\n\t\t //open database connection\n\t\t $conn = $this->openDBConnection();\n\t\t\t\n\t\t\t//update record in database\n\t\t\t$query = \"UPDATE players SET\n \t\tname='$name', \n\t\t\t\t\tposition='$position',\n\t\t\t\t\tteam='$team',\n\t\t\t\t\tage='$age',\n\t\t\t\t\tdateofarticle='$dateofarticle',\n\t\t\t\t\tprojdraftround='$projdraftround',\n\t\t\t\t\tinjsus='$injsus',\n\t\t\t\t\thref='$href',\n\t\t\t\t\tnewssrc='$newssrc',\n\t\t\t\t\tnotes='$notes',\n\t\t\t\t\tstatus='$status'\n\t\t WHERE id = {$id}\";\n\t\t\n\t\t \n\t\t\tif(mysqli_query($conn, $query))\n\t\t\t{\n\t\t\t\t//echo '<script type=\"text/javascript\">eval(alert(\"Success, '.$name.'\\'s record has been updated. You will be notified on '.$this->createTargetDate($timespan).' to contact this person!\"));</script>';\n\t\t\t\t//header('Location: http://localhost/FantasyFootballDraft/');\n\t\t\t} else {\n\t\t\t echo 'Error: '. mysqli_error($conn);\t\n\t\t\t}\n\t\t\t\n\t\t\t//close connection\n\t\t mysqli_close($conn);\n\t\t \n\t }", "public function update( string $key, $value );", "public function updateRow($row);", "public function update() {\n // Get the values that are currently in the database\n $curr_vals = $this->read_single();\n\n // Set the values that will be added to the table\n foreach ($curr_vals as $key => $value) {\n // Convert key from the Database's capitalization to\n // this model's attribute capitalization style (all lowercase)\n $local_key = strtolower($key);\n // If user didn't specify property\n if (($this->attr[$local_key] === \"\") || ($this->attr[$local_key] === null)){\n // Then use the value that's already in the database\n $this->attr[$local_key] = $curr_vals[$key];\n }\n }\n\n // Create query\n $query = \"UPDATE \" . $this->table .\n \" SET = \" .\n \" WHERE MID = :mid AND Spot = :spot \";\n\n // Prepare statement\n $stmt = $this->conn->prepare($query);\n\n // Clean the data (reduce malicious SQL injection, etc.)\n foreach ($this->attr as $key => $value) {\n $this->attr[$key] = htmlspecialchars(strip_tags($value));\n }\n \n // Bind the data to a variable for an SQL attribute\n foreach ($this->attr as $key => $value) {\n $stmt->bindValue((\":\" . $key), $value);\n }\n\n // Execute the prepared statement and check for errors in running it\n return $this->runPrepStmtChkErr($stmt);\n }", "function editRecord($rec)\r\n\t\t{\r\n\t\t\t// Create associative array of key fields and data values\r\n\t\t\t$data = array(\"idMedicalRecord\"=>$rec[0],\"medicalRec_weight\"=>$rec[1],\"medicalRec_height\"=>$rec[2],\"medicalRec_bloodPressure\"=>$rec[3],\"medicalRec_temperature\"=>$rec[4],\"medicalRec_bloodIronLevel\"=>$rec[5],\"medicalRec_time\"=>$rec[6],\"medicalRec_date\"=>$rec[7],\"medicalRec_medicalHistory\"=>$rec[8],\"medicalRec_rejectionReason\"=>$rec[9]);\r\n\t\t\t// Bind values to object's attributes\r\n\t\t\t$this->bind($data);\r\n\t\t\t// Add new updated values to table in database to location of given Primary key\r\n\t\t\t$this->update($rec[0]);\r\n\t\t}" ]
[ "0.7743315", "0.71022606", "0.6714534", "0.6670716", "0.6608962", "0.6525827", "0.6446804", "0.62830096", "0.62830096", "0.62777144", "0.6245808", "0.62408036", "0.62205887", "0.6211787", "0.6208674", "0.6162885", "0.6070428", "0.6070428", "0.6056093", "0.6040369", "0.60226434", "0.6009875", "0.60088897", "0.597369", "0.5967006", "0.59200287", "0.5910091", "0.5906795", "0.59039134", "0.58589363", "0.58401984", "0.5835422", "0.58306265", "0.5824967", "0.5821123", "0.58191496", "0.58168876", "0.5804899", "0.58017546", "0.57783365", "0.5763192", "0.57520306", "0.5730439", "0.5730439", "0.5730439", "0.5730439", "0.5730439", "0.5712839", "0.57097644", "0.57022405", "0.57022405", "0.57022405", "0.57022405", "0.5698615", "0.56901175", "0.5677932", "0.5668088", "0.56401044", "0.5633101", "0.563253", "0.56322324", "0.5628346", "0.56199753", "0.5611608", "0.5605914", "0.5601752", "0.55976254", "0.5591751", "0.5591751", "0.55822366", "0.5581706", "0.5575628", "0.55697954", "0.55697954", "0.5569677", "0.556561", "0.55484116", "0.5540601", "0.55376005", "0.55350447", "0.55199724", "0.55156857", "0.5513801", "0.5513028", "0.5508418", "0.5508177", "0.55058134", "0.55058134", "0.54982436", "0.5497641", "0.54898626", "0.54888433", "0.54888433", "0.54888433", "0.5486957", "0.5482401", "0.5480602", "0.5476408", "0.5472645", "0.54686767", "0.5463446" ]
0.0
-1
Delete a record from storage.
public function delete(array $where) { if (! isset($where['ID'])) { throw new RuntimeException("Missing Post 'ID'."); } return (bool)wp_delete_post($where['ID']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete() {\n\t\ttry {\n\t\t\tif($this->_state == self::STATE_UNCHANGED) {\n\t\t\t\t$sql = 'DELETE FROM ' . self::sanitize($this->_table->getProperty('name')) . ' WHERE ' . self::sanitize($this->_key_primary->name) . ' = ' . self::sanitize($this->_data[$this->_key_primary->name]);\n\t\t\t\t\\Bedrock\\Common\\Logger::info('Deleting record with query: ' . $sql); echo $sql;\n\t\t\t\t$this->_connection->exec($sql);\n\t\t\t}\n\t\t\telseif($this->_state == self::STATE_CHANGED) {\n\t\t\t\tthrow new \\Bedrock\\Model\\Record\\Exception('Unsaved changes found, cannot delete record.');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new \\Bedrock\\Model\\Record\\Exception('Record not found in database.');\n\t\t\t}\n\t\t}\n\t\tcatch(\\PDOException $ex) {\n\t\t\t\\Bedrock\\Common\\Logger::exception($ex);\n\t\t\tthrow new \\Bedrock\\Model\\Record\\Exception('A database error was encountered, the record could not be deleted.');\n\t\t}\n\t\tcatch(\\Exception $ex) {\n\t\t\t\\Bedrock\\Common\\Logger::exception($ex);\n\t\t\tthrow new \\Bedrock\\Model\\Record\\Exception('The record could not be deleted.');\n\t\t}\n\t}", "public function deleteRecord()\n\t{\n\t\tif($this->user->hasRight($this->getHandler()->getDeleteRight()))\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$record = $this->getHandler()->getRecord();\n\t\t\t\t$record->import($this->getRequest());\n\n\t\t\t\t// check owner\n\t\t\t\tif(!$this->isOwner($record))\n\t\t\t\t{\n\t\t\t\t\tthrow new Exception('You are not the owner of the record');\n\t\t\t\t}\n\n\t\t\t\t// check captcha\n\t\t\t\t$this->handleCaptcha($record);\n\n\t\t\t\t// delete\n\t\t\t\t$this->getHandler()->delete($record);\n\n\n\t\t\t\t$msg = new Message('You have successful delete a ' . $record->getName(), true);\n\n\t\t\t\t$this->setResponse($msg);\n\t\t\t}\n\t\t\tcatch(\\Exception $e)\n\t\t\t{\n\t\t\t\t$msg = new Message($e->getMessage(), false);\n\n\t\t\t\t$this->setResponse($msg);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$msg = new Message('Access not allowed', false);\n\n\t\t\t$this->setResponse($msg, null, $this->user->isAnonymous() ? 401 : 403);\n\t\t}\n\t}", "public function destroy(Record $record)\n {\n //\n }", "public function delete($entity){ \n //TODO: Implement remove record.\n }", "public function deleteRecord ($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete() {\n // Fail due to double delete\n assert(!$this->hasBeenDeleted);\n\n // Initialize delete record cache, if nonextant\n if (!isset(self::$deleteRecordPreparedStatementCache)) {\n self::$deleteRecordPreparedStatementCache = array();\n }\n \n // Initiate implicit tx, if nonextant explicit tx \n $is_implicit_tx = false;\n if (self::$numTransactions == 0) {\n $is_implicit_tx = true; \n self::beginTx();\n }\n\n // Fail due to invalid database connection\n assert(isset(self::$databaseHandle));\n\n // Delete this record and all child records \n $table_name = static::getFullyQualifiedTableName();\n \n try {\n // Fetch prepared statement from cache, if present. Otherwise, create it.\n if (isset(self::$deleteRecordPreparedStatementCache[$table_name])) {\n // Fetch delete query from cache\n $delete_record_stmt = self::$deleteRecordPreparedStatementCache[$table_name];\n } else {\n $fully_qualified_table_name = static::getFullyQualifiedTableName();\n $delete_query = \"DELETE FROM {$fully_qualified_table_name} \"\n . $this->genPrimaryKeyWhereClause();\n\n $delete_record_stmt = self::$databaseHandle->prepare($delete_query);\n self::$deleteRecordPreparedStatementCache[$table_name] = $delete_record_stmt;\n }\n \n // Delete children, schedule assets for deletion\n $this->deleteChildren();\n self::$assetDeletors = array_merge(self::$assetDeletors, $this->getAssets());\n\n // Bind record's 'id' to delete-query\n $this->bindId($delete_record_stmt);\n\n // Remove record\n $delete_record_stmt->execute();\n } catch (PDOException $e) {\n self::$databaseHandle->rollback();\n die(\"\\nERROR: \" . $e->getMessage() . \"\\n\");\n }\n\n // Close implicit transaction\n if ($is_implicit_tx) {\n self::endTx();\n }\n\n // Indicate object's deletion\n $this->hasBeenDeleted = true;\n }", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function deleteRecord($id){\n\t}", "public function destroy($id)\n {\n //delete specific record\n }", "public function delete() {\n global $DB;\n $DB->delete_records($this->get_table_name(), array('id' => $this->id));\n }", "public function delete()\n {\n $this->db->delete($this->table, $this->data['id'], $this->key);\n }", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public final function delete() {\n }", "public function delete() {\n\t\t$this->deleted = true;\n\t}", "public abstract function delete();", "public function deleteAction(Request $request, Record $record)\n {\n $form = $this->createDeleteForm($record);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->remove($record);\n $em->flush();\n }\n\n return $this->redirectToRoute('eval_record_index');\n }", "public function delete() {\n\t\tif ($this->checkDependencies() == true ) {\n\t\t\t$sql = \"DELETE FROM \".$this->tablename.\" where \".$this->idcol.\" = \".$this->page->ctrl['record'];\n\t\t\t$this->dbc->exec($sql);\n\t\t}\n\t}", "public function delete()\n {\n $this->repository->delete($this->id);\n }", "public function delete()\r\n {\r\n $recordId = $this->getRecId();\r\n $command = static::getDb()->newDeleteCommand(static::$defaultLayout, $recordId);\r\n try {\r\n $command->execute();\r\n return 1;\r\n } catch (FileMakerException $e) {\r\n $this->addError('delete', $e->getMessage());\r\n return 0;\r\n }\r\n }", "public function delete($entity);", "public function delete()\n\t{\n\t\t$this->hard_delete();\n\t}", "public function delete()\n {\n \n }", "public function delete()\n {\n self::deleteById( $this->db, $this->id, $this->prefix );\n\n if( $this->inTransaction )\n {\n //$this->db->commit();\n $this->inTransaction = false;\n }\n }", "abstract public function delete();", "abstract public function delete();", "abstract public function delete();", "abstract public function delete();", "protected function entityDelete(){\n // TODO: deal with errors\n // delete from api\n $deleted = $this->resourceService()->delete($this->getId());\n }", "public function delete(): void;", "public function delete()\n {\n Db::getInstance()->delete($this->getTableName(), ['id' => $this->getId()]);\n }", "public function deleteRecord()\n { \n $sql = \"DELETE FROM Cubans WHERE Id = :Id\";\n $statement = $this->connect->prepare($sql);\n $statement->bindValue(':Id', $this->id);\n $statement->execute();\n }", "public function delete(){\n $record = actualite::find($this->selectedId);\n $record->delete();\n\n /* update image file */\n Storage::delete('public/_actualite/'.$this->selectedId.'.png');\n /* $this->photo->storePubliclyAs('public/_actualite/'.$this->selectedId.'.png'); */\n\n session()->flash('message', 'actualite modifié avec succès');\n $this->emit('Deleted');\n $this->dispatchBrowserEvent('Deleted');\n $this->resetFields();\n }", "public function delete()\n {\n \n }", "public function delete()\n {\n // TODO: Implement delete() method.\n }", "function delete() {\n $this->that->delete($this->id, $this->name);\n $this->put_id();\n }", "public function delete($entity) {\n $this->deleteRecord([\n 'id' => $entity->getId(),\n ]);\n }", "public function delete() {\r\n }", "public function destroy(PatientRecord $patientRecord)\n {\n //\n }", "public function delete() {\r\n\t\t$this->getMapper()->delete($this);\r\n\t}", "public function delete($entity) {\r\n\t\tif($entity instanceof Model_Abstract) {\r\n\t\t\t$id = $entity->getIdentityValue();\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$id = $entity;\r\n\t\t}\r\n\t\t// Need to unset the entity in the identity map if it exists\r\n\t\t$this->_unsetIdentity($id);\r\n\t\t \r\n\t\t$rowset = $this->_getGateway()->find($id);\r\n\t\tif($rowset->count() > 0) {\r\n\t\t\t$row = $rowset->current();\r\n\t\t\t$result = $row->delete();\r\n\t\t}\r\n\t}", "public function destroy(Request $request, Record $record)\n {\n if ($record->password) {\n if (! Hash::check($request->password, $record->password)) {\n abort(403);\n }\n }\n\n $record->delete();\n\n return response(null, 204);\n }", "public function delete()\n {\n $this->_validateModifiable();\n\n $this->_getDataSource()->delete($this);\n }", "public function deleteRecord(/** @noinspection PhpUnusedParameterInspection */ $id = null) {\n\t\tthrow new Exception\\UnsupportedOperation('TODO');\n\t}", "function deleteRecord()\t{\n\t\tif ($this->conf['delete'])\t{\t// If deleting is enabled\n\t\n\t\t\t$origArr = $GLOBALS['TSFE']->sys_page->getRawRecord($this->theTable, $this->recUid);\n\t\t\tif (($GLOBALS['TSFE']->loginUser && $this->conf['requireLogin']) || ( $this->aCAuth($origArr)&& $this->conf['requireLogin'])||!$this->conf['requireLogin'])\t{\t// Must be logged in OR be authenticated by the aC code in order to delete\n\t\t\t\t\t// If the recUid selects a record.... (no check here)\n\t\t\t\tif (is_array($origArr))\t{\n\t\t\t\t\tif ($this->aCAuth($origArr) || $this->metafeeditlib->DBmayFEUserEdit($this->theTable,$origArr, $GLOBALS['TSFE']->fe_user->user,$this->conf['allowedGroups'],$this->conf['fe_userEditSelf'],$this->conf))\t{\t// Display the form, if access granted.\n\t\t\t\t\t\tif (!$GLOBALS['TCA'][$this->theTable]['ctrl']['delete'])\t{\t// If the record is fully deleted... then remove the image (or any file) attached.\n\t\t\t\t\t\t\t$this->deleteFilesFromRecord($this->recUid);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->cObj->DBgetDelete($this->theTable, $this->recUid, TRUE);\n\t\t\t\t\t\t$this->currentArr = $origArr;\n\t\t\t\t\t\t$this->saved = 1;\n\t\t\t\t\t\t$this->userProcess_alt($conf['edit.']['userFunc_afterDelete'],$conf['edit.']['userFunc_afterDelete.'],array('rec'=>$this->currentArr, 'origRec'=>$origArr));\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->error = '###TEMPLATE_NO_PERMISSIONS###';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t\t\t$this->error = '###TEMPLATE_NO_PERMISSIONS###';\n\t\t }\n\t\t}\n\t}", "public function delete($record_id, Request $request){\n if(Ahkam::findOrFail($record_id)->first() != \" \" ) { \n $file = Ahkam::findOrFail($record_id);\n $deleted = new AhkamDeleted;\n\n \n /////////////////////////////////////////////\n\n\n $deleted->crida_number = $file->crida_number;\n $deleted->database_id = $file->id;\n $deleted->date_of_archiving = $file->date_of_archiving; \n $deleted->type_of_document = $file->type_of_document; \n $deleted->number_of_document = $file->number_of_document;\n $deleted->date_of_document = $file->date_of_document; \n $deleted->kholasmatlab = $file->kholasmatlab;\n $deleted->molahezat = $file->molahezat; \n $deleted->more = $file->more; \n $deleted->file = $file->file; \n $deleted->uuid = $file->uuid; \n\n\n $del_comment = AhkamComment::where('ahkam_id', $record_id);\n $del_access = AhkamUser::where('ahkam_id',$record_id);\n $del_notis = Noti::where('file_id', $record_id);\n \n DB::beginTransaction();\n try {\n $deleted->save();\n\n //to move a file in the (deleted) folder\n if(file_exists(storage_path('app/files/Ahkam/'. $file->file))){ \n $old = storage_path('app/files/Ahkam/'. $file->file);\n $new = storage_path('app/deleted/Ahkam/'. $file->file);\n $move = File::move($old, $new);\n }\n\n //to delete its comments\n if($del_comment){\n $del_comment->delete();\n } \n \n //to delete its user access\n if($del_access){\n $del_access->delete();\n }\n //to delete its notifications\n if($del_notis){\n $del_notis->delete();\n }\n $file->delete();\n DB::commit();\n $result = \"success\";\n } catch (\\Exception $e) {\n $result = \"failed\";\n DB::rollback();\n }\n\n return response()->json(['result' => $result]);\n }\n }", "public function destroy(Record $record)\n {\n $success = $record->delete();\n\n return [\n 'success' => $success\n ];\n }", "public function delete() {\n\t\t$this->getConnection()->delete( $this );\n\t\t$this->clear();\n\t}", "public function delete( $oid=null );", "public function delete()\n {\n if (!$this->id) {\n throw new \\RuntimeException('You cannot delete a device without id');\n }\n\n\t\tPersistentSession::getInstance()->delete($this);\n }", "public function delete()\n {\n //\n }", "public function delete()\n\t{\n\t\t// Pass on the request to the driver\n\t\treturn $this->backend->delete('', array());\n\t}", "public function deleteRecord() {\n\n $permissions = $this->permission();\n $access = FALSE;\n foreach ($permissions as $per) {\n if ($per->permission == 'user-delete') {\n $access = TRUE;\n break;\n }\n }\n if ($access) {\n \n $id = $this->uri->segment(3);\n\n if ($id != $this->user()->id) {\n $result = $this->UserModel->deleteRecordData($id);\n $this->UserModel->deleteUserType($id);\n if ($result == 1) {\n $this->session->set_flashdata('message', '2');\n redirect('UserCon/showAllRecordsPage');\n } else {\n echo \"Database error!\";\n }\n } else {\n $this->session->set_flashdata('message', '3');\n redirect('UserCon/showAllRecordsPage');\n }\n } else {\n echo \"access denied\";\n }\n }", "public function deleteById($id);", "public function deleteById($id);", "public function deleteById($id);", "public function deleteById($id);", "public function deleteById($id);", "public function deleteById($id);", "public function delete(): void\n {\n }", "protected function delete() {\n\t}", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete()\n {\n }", "public function delete($entity)\n {\n \n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete() {\n\n }", "public function delete()\r\n\t{\r\n\t}", "public function delete()\n {\n $database = cbSQLConnect::adminConnect('object');\n if (isset($database))\n {\n return ($database->SQLDelete(self::$table_name, 'id', $this->id));\n }\n }", "public function delete() {\n\n $input_data = $this->request->getJsonRawBody();\n $id = isset($input_data->id) ? $input_data->id : '';\n if (empty($id)):\n return $this->response->setJsonContent(['status' => false, 'message' => 'Id is null']);\n else:\n $kidphysical_delete = NidaraKidPhysicalInfo::findFirstByid($id);\n if ($kidphysical_delete):\n if ($kidphysical_delete->delete()):\n return $this->response->setJsonContent(['status' => true, 'Message' => 'Record has been deleted succefully ']);\n else:\n return $this->response->setJsonContent(['status' => false, 'Message' => 'Data could not be deleted']);\n endif;\n else:\n return $this->response->setJsonContent(['status' => false, 'Message' => 'ID doesn\\'t']);\n endif;\n endif;\n }", "public function delete(DimeEntityInterface $entity);", "public function delete($identifier, $flush = true);", "public function DeleteRecord()\n {\n // TODO: support delete multiple records\n // read the id array from the check box list _REQUEST['row_selections']\n global $g_BizSystem;\n $values = $g_BizSystem->GetClientProxy()->GetFormInputs('row_selections',false);\n if ($values)\n {\n foreach ($values as $id)\n {\n $recArray = $this->GetDataObj()->FetchById($id);\n $dataRec = new DataRecord($recArray, $this->GetDataObj());\n // take care of exception\n try {\n $dataRec->Delete();\n }\n catch (BDOException $e)\n {\n // call $this->ProcessBDOException($e);\n $this->ProcessBDOException($e);\n return;\n }\n }\n }\n else // delete current focused record\n {\n $rec = $this->GetActiveRecord();\n if (!$rec) return;\n global $g_BizSystem;\n //$recId = $this->m_ActiveRecord[\"Id\"];\n $ok = $this->GetDataObj()->DeleteRecord($rec);\n if (!$ok)\n return $this->ProcessDataObjError($ok);\n }\n $this->m_RecordId = null; // clean the current record id\n // TODO: adjust current page. if current page return no record, goto prev page\n \n return $this->ReRender();\n }", "public function delete()\n {\n $this->job->delete();\n }", "public function delete()\n {\n try {\n parent::delete(null, $this->data['id']);\n } catch (Exception $e) {\n die('ERROR');\n }\n }" ]
[ "0.7222025", "0.7132223", "0.70361644", "0.70240664", "0.6964709", "0.6963203", "0.689951", "0.6829722", "0.6829722", "0.6829722", "0.6829722", "0.6829722", "0.6829722", "0.6829722", "0.6829722", "0.6829722", "0.6829722", "0.6829722", "0.6829722", "0.6829722", "0.6829722", "0.6829722", "0.678114", "0.6747833", "0.67476827", "0.67476827", "0.6746261", "0.6697005", "0.6647124", "0.66238326", "0.661972", "0.6616745", "0.66145796", "0.65912277", "0.65727127", "0.6550683", "0.6513235", "0.6495948", "0.6489551", "0.64778835", "0.64255613", "0.63966256", "0.6378743", "0.63724005", "0.63724005", "0.63724005", "0.63724005", "0.636777", "0.636197", "0.6355629", "0.6355316", "0.6339258", "0.63302237", "0.6324977", "0.6314095", "0.63112104", "0.63111985", "0.6293622", "0.6280498", "0.6270661", "0.62615937", "0.62480736", "0.6226404", "0.6212427", "0.6209864", "0.61869484", "0.6179298", "0.617191", "0.61717474", "0.61436343", "0.6141888", "0.6134763", "0.61324054", "0.61324054", "0.61324054", "0.61324054", "0.61324054", "0.61324054", "0.6130251", "0.61293036", "0.6125107", "0.6125107", "0.6125107", "0.6125107", "0.6125107", "0.6125107", "0.6125107", "0.6125107", "0.6125107", "0.6125107", "0.6116184", "0.61112654", "0.61087734", "0.61069983", "0.6104947", "0.6104258", "0.6083511", "0.6075882", "0.60736847", "0.6072215", "0.60711783" ]
0.0
-1
Display a listing of the resource.
public function index(Role $role, Request $request) { $roles = Role::orderBy('created_at', 'desc')->paginate(5); if($request->ajax()){ return view('roles.table', compact('roles')); } return view('roles.index', compact('roles')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { return view('roles.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request, Role $role) { $this->validateInputs($request); $role['password_policy'] = $request->input('password_policy'); $role['name'] = $request->input('name'); $result = $role->save(); if($result){ return redirect('/roles')->with('success', trans('general.role_created')); } else { return redirect()->back(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { $role = Role::find($id); return view('roles.show', compact('role')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { $role = Role::find($id); return view('roles.create', compact('role')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.7855196", "0.76957726", "0.7273917", "0.7241426", "0.71717227", "0.7064183", "0.70528984", "0.69836885", "0.694763", "0.69469565", "0.6941572", "0.69301945", "0.6903868", "0.68989486", "0.68989486", "0.68787694", "0.68641657", "0.6860115", "0.6857286", "0.68464494", "0.6834566", "0.68116575", "0.68075293", "0.6805924", "0.6801357", "0.6796291", "0.67915684", "0.67915684", "0.67874014", "0.678544", "0.67787844", "0.6777662", "0.67675763", "0.676299", "0.6746726", "0.6745706", "0.67450166", "0.67450166", "0.6739429", "0.6734577", "0.6725992", "0.67127997", "0.6694406", "0.6692487", "0.6689421", "0.66884303", "0.6687299", "0.6685663", "0.6682167", "0.66701853", "0.66697115", "0.6666091", "0.6666091", "0.66627705", "0.6661716", "0.6661522", "0.6657919", "0.6656454", "0.6653187", "0.6642113", "0.66332614", "0.66324973", "0.66275465", "0.66275465", "0.6619777", "0.6619387", "0.6617973", "0.66154003", "0.66110945", "0.6607966", "0.66065043", "0.6596376", "0.65953517", "0.65941286", "0.6591486", "0.6590759", "0.6588404", "0.658161", "0.6580548", "0.6579757", "0.6577171", "0.65761065", "0.657386", "0.65686774", "0.6567784", "0.65672046", "0.6566417", "0.65615803", "0.65615714", "0.65615714", "0.65592474", "0.65586483", "0.65568006", "0.6556628", "0.65564895", "0.6555322", "0.65551996", "0.6555016", "0.654888", "0.65477645", "0.65451735" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { $this->validateInputs($request); $role = Role::find($id); $role['name'] = $request->input('name'); $role['password_policy'] = $request->input('password_policy'); $result = $role->save(); if($result){ return redirect('/roles')->with('success', trans('general.role_updated')); } else { return redirect()->back(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy(Role $role) { $role->delete(); return response()->json([ 'success' => 'Role deleted' ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
set the rotation, added via laravelpostgres module
public function setRotation(array $value) { $this->rotation = self::mutateToPgArray($value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setRotation($rotation) {}", "public function setRotation($rotation) {}", "public function rotate()\n {\n // not possible in php?\n }", "public function rotateBy($rotation) {}", "function setRotation( $r ) {\n\n // only 0,90,180,270\n if ( $r > 270 ) return;\n if ( $r % 90 != 0 ) return;\n\n $this->rotate = $r;\n $this->vertical = ( $r == 90 or $r == 270 );\n}", "public function getRotation() {}", "public function getRotation() {}", "public function rotation($value) {\n return $this->setProperty('rotation', $value);\n }", "public function __construct($rotation)\n {\n $this->rotation = $rotation;\n }", "abstract protected function initRotues();", "function setImageOrientation()\n\t{\n\n\t\tif ($this->width < $this->height) {\n\t\t\t$this->orientation = 'portrait';\n\t\t}\n\n\t\tif ($this->width > $this->height) {\n\t\t\t$this->orientation = 'landscape';\n\t\t}\n\n\t\tif ($this->width == $this->height) {\n\t\t\t$this->orientation = 'square';\n\t\t}\n\t}", "public function rotation($direction)\n\t{\n \n $direction = strtoupper($direction);\n\n $data[\"queen\"]= $this->queen_model->get_queen();\n if($data['queen']==null) {\n //error_no_queen_yet : 405\n $this->respond_errors(\"error no queen yet\",405);\n return;\n }\n $queen=$this->queen_model->mapper($data['queen']);\n\n $errors=$queen->rotate($direction);\n\n if (sizeof($errors)>0){\n //error_bad_direction_value :1\n $this->respond_errors($errors,100);\n\n }else{\n $this->queen_model->update_queen_facing($queen);\n $this->respond($queen,200);\n \n }\n\n }", "public function setOrientation($orientation);", "public function setOrientation($orientation);", "public function set_orientation($mode){\n $this->orient=$mode;\n }", "public function getRotation()\n {\n return self::accessPgArray($this->rotation);\n }", "function image_rotate()\n\t{\n\t\t// Allowed rotation values\n\t\t\n\t\t$degs = array(90, 180, 270, 'vrt', 'hor');\t\n\t\n\t\t\tif ($this->rotation == '' OR ! in_array($this->rotation, $degs))\n\t\t\t{\n\t\t\t$this->set_error('imglib_rotation_angle_required');\n\t\t\treturn FALSE;\t\t\t\n\t\t\t}\n\t\n\t\t/** -------------------------------------\n\t\t/** Reassign the width and height\n\t\t/** -------------------------------------*/\n\t\n\t\tif ($this->rotation == 90 OR $this->rotation == 270)\n\t\t{\n\t\t\t$this->dst_width\t= $this->src_height;\n\t\t\t$this->dst_height\t= $this->src_width;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->dst_width\t= $this->src_width;\n\t\t\t$this->dst_height\t= $this->src_height;\n\t\t}\n\t\n\t\t/** -------------------------------------\n\t\t/** Choose resizing function\n\t\t/** -------------------------------------*/\n\t\t\n\t\tif ($this->resize_protocol == 'imagemagick' OR $this->resize_protocol == 'netpbm')\n\t\t{\n\t\t\t$protocol = 'image_process_'.$this->resize_protocol;\n\t\t\n\t\t\treturn $this->$protocol('rotate');\n\t\t}\n\t\t\n \t\tif ($this->rotation == 'hor' OR $this->rotation == 'vrt')\n \t\t{\n\t\t\treturn $this->image_mirror_gd();\n \t\t}\n\t\telse\n\t\t{\t\t\n\t\t\treturn $this->image_rotate_gd();\n\t\t}\n\t}", "function rotation($angle)\n\t{\n\t\t$this->rotation = $angle;\n\t\treturn $this;\n\t}", "public function autoRotate() {\n $this->thumb->rotateJpg();\n return $this;\n }", "public function setOrientation(?int $value): void {\n $this->getBackingStore()->set('orientation', $value);\n }", "public function landscape() {\n\t}", "public function rotateLeft();", "public function rotate($angle) {\n\t\t$this->angle = $angle;\n\t\tparent::rotate($angle);\n\t}", "public function setOrientation($o)\n {\n $this->orientation = $o;\n }", "abstract public function rotate($amount);", "public function rotate(int $rotations);", "public function rotate()\n\t{\n\t\t// Allowed rotation values\n\t\t$degs = array(90, 180, 270, 'vrt', 'hor');\n\n\t\tif ($this->rotation_angle === '' OR ! in_array($this->rotation_angle, $degs))\n\t\t{\n\t\t\t$this->set_error('imglib_rotation_angle_required');\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// Reassign the width and height\n\t\tif ($this->rotation_angle === 90 OR $this->rotation_angle === 270)\n\t\t{\n\t\t\t$this->width\t= $this->orig_height;\n\t\t\t$this->height\t= $this->orig_width;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->width\t= $this->orig_width;\n\t\t\t$this->height\t= $this->orig_height;\n\t\t}\n\n\t\t// Choose resizing function\n\t\tif ($this->image_library === 'imagemagick' OR $this->image_library === 'netpbm')\n\t\t{\n\t\t\t$protocol = 'image_process_'.$this->image_library;\n\t\t\treturn $this->$protocol('rotate');\n\t\t}\n\n\t\treturn ($this->rotation_angle === 'hor' OR $this->rotation_angle === 'vrt')\n\t\t\t? $this->image_mirror_gd()\n\t\t\t: $this->image_rotate_gd();\n\t}", "public static function change_image_type(){\n/**\n*\n*This function change the image type like convert png to jpg or bmp or gif\n*\n*/\npublic static function rotate()\n}", "public function rotateRight();", "public function rot()\n {\n $this->status = APPLE_DECAYED;\n $this->color = APPLE_DECAYED_COLOR;\n\n return $this->save();\n }", "public function setRotation($rotation)\n {\n $this->rotation = $rotation;\n return $this;\n }", "function rotate_tables($table_name) {\n\n global $dbconfig;\n $db = DB::getInstance($dbconfig->job->host, $dbconfig->job->name, $dbconfig->job->user, $dbconfig->job->password);\n $allowed_tables = array('jobs', 'logs');\n if (!in_array($table_name, $allowed_tables)) {\n Log::write(ERROR, 'Try to rotate a table not logs or jobs in job db', true);\n return false;\n }\n\n Log::write(INFO, \"rotate table: $table_name\", true);\n\n $renamed_table_name = $table_name . '_' . get_timestamp();\n $sql = \"rename table $table_name to $renamed_table_name\";\n if (!$db->query($sql)) {\n Log::write(ERROR, \"fail on rename the table from $table_name to $renamed_table_name\", true);\n return false;\n }\n\n Log::write(INFO, \"renamed the table from $table_name to $renamed_table_name\");\n\n $sql = DB::show_create_table('job', $table_name);\n if (!$db->query($sql)) {\n Log::write(ERROR, \"fail on creating the table $table_name\", true);\n return false;\n }\n\n Log::write(INFO, \"created the table $table_name\", true);\n\n return $renamed_table_name;\n}", "public function execute()\n {\n $lastRotationFlag = $this->_flagFactory->create()->loadSelf();\n $lastRotationTime = $lastRotationFlag->getFlagData();\n $rotationFrequency = 3600 * 24 * (int)$this->_coreConfig->getValue('system/rotation/frequency', 'default');\n if (!$lastRotationTime || $lastRotationTime < time() - $rotationFrequency) {\n $this->eventFactory->create()->rotate(\n 3600 * 24 * (int)$this->_coreConfig->getValue('system/rotation/lifetime', 'default')\n );\n }\n $lastRotationFlag->setFlagData(time())->save();\n }", "public function orientation($value) {\n return $this->setProperty('orientation', $value);\n }", "public function orientation($value) {\n return $this->setProperty('orientation', $value);\n }", "public function orientation($value) {\n return $this->setProperty('orientation', $value);\n }", "protected function adjustImageOrientation()\n { \n $exif = @exif_read_data($this->file);\n \n if($exif && isset($exif['Orientation'])) {\n $orientation = $exif['Orientation'];\n \n if($orientation != 1){\n $img = imagecreatefromjpeg($this->file);\n \n $mirror = false;\n $deg = 0;\n \n switch ($orientation) {\n \n case 2:\n $mirror = true;\n break;\n \n case 3:\n $deg = 180;\n break;\n \n case 4:\n $deg = 180;\n $mirror = true; \n break;\n \n case 5:\n $deg = 270;\n $mirror = true; \n break;\n \n case 6:\n $deg = 270;\n break;\n \n case 7:\n $deg = 90;\n $mirror = true; \n break;\n \n case 8:\n $deg = 90;\n break;\n }\n \n if($deg) $img = imagerotate($img, $deg, 0); \n if($mirror) $img = $this->mirrorImage($img);\n \n $this->image = str_replace('.jpg', \"-O$orientation.jpg\", $this->file); \n imagejpeg($img, $this->file, $this->quality);\n }\n }\n }", "public function setRotateControl()\n {\n $args = func_get_args();\n\n if (isset($args[0]) && ($args[0] instanceof RotateControl)) {\n $this->rotateControl = $args[0];\n $this->mapOptions['rotateControl'] = true;\n } elseif (isset($args[0]) && is_string($args[0])) {\n if ($this->rotateControl === null) {\n $this->rotateControl = new RotateControl();\n }\n\n $this->rotateControl->setControlPosition($args[0]);\n $this->mapOptions['rotateControl'] = true;\n } elseif (!isset($args[0])) {\n $this->rotateControl = null;\n\n if (isset($this->mapOptions['rotateControl'])) {\n unset($this->mapOptions['rotateControl']);\n }\n } else {\n throw MapException::invalidRotateControl();\n }\n }", "private static function _rotate() {\n $config = Mirage::app()->getConfig();\n if(!isset($config['logs']))\n throw new Exception('Please set key \"logs\" in config');\n \n if(!is_array($config['logs']))\n throw new Exception('\"logs\" should be array');\n \n $logs = $config['logs'];\n \n if(!isset($logs['log_path']))\n throw new Exception('Please set log_path in config');\n \n if(!file_exists($logs['log_path']))\n throw new Exception ('Directory not exist' . $logs['log_path']);\n \n if(!is_dir($logs['log_path']))\n throw new Exception($logs['log_path'] . ' should be directory');\n \n $log_file = $logs['log_path'] . DIRECTORY_SEPARATOR . self::$file_name;\n $log_path = $logs['log_path'] . DIRECTORY_SEPARATOR;\n \n// if(!chmod($logs['log_path'], 775))\n// throw new Exception('Can\\'t change permission of ' . $logs['log_path']); \n \n if(MIRAGE_DEBUG) {\n return true;\n } \n \n // dont rotate if log file not exist\n if(!file_exists($log_file))\n return true;\n \n if(!isset($logs['rotate_by']))\n throw new Exception('Please set rotate_by');\n \n if($logs['rotate_by'] == 'filesize') {\n if(!isset($logs['filesize']))\n throw new Exception('Please configure log filesize');\n\n $new_name = self::$file_name;\n\n if((filesize($log_file) / 1048576) > $logs['filesize'])\n $new_name = date(\"Y_m_d\",filemtime($log_path . self::$file_name)) .'.log';\n \n // if new name exist dont rotate\n if(file_exists($log_path . $new_name))\n return true;\n \n // rename log file\n if(!rename($log_path . self::$file_name, $log_path . $new_name))\n throw new Exception($log_path . self::$file_name . ' is not writable');\n } else {\n if(!isset($logs['interval']))\n throw new Exception ('Please configure log interval');\n \n $filetime = filemtime($log_path . self::$file_name);\n if($filetime != false) {\n $new_name = date(\"Y_m_d\",$filetime) . '.log';\n } else {\n $new_name = self::$file_name;\n }\n \n // do not rotate if file is already exist\n if(file_exists($log_path . $new_name))\n return true;\n\n $content = file($log_file);\n\n // do not rotate if file is empty\n if(!isset($content[0]))\n return true;\n \n $date = substr($content[0], 1, 10);\n $d = explode('-',$date);\n $new_name = $d[0] . '_' . $d[1] . '_' . $d[2] . '.log';\n if(file_exists($log_path . $new_name)) {\n unlink($log_path . $new_name);\n }\n $interval = $logs['interval'];\n \n $max_date = strtotime(\"+$interval day\",strtotime($date));\n $date_today = strtotime(date('Y-m-d'));\n if($max_date <= $date_today) {\n // rename log file\n if(!rename($log_path . self::$file_name, $log_path . $new_name))\n throw new Exception($log_path . self::$file_name . ' is not writable'); \n }\n \n }\n }", "public function rotateRight(): Orientation\n {\n return new South();\n }", "public function setNoRotateFlag($noRotate = true) {}", "public function VwASignacionRotacionJs(){\n \n ?>\n <script type=\"text/javascript\">\n //inicializar tablas\n \t$(document).ready( function () {\n \t\t\t\n \t\t\t\n $('#asignacionrot').dataTable({\n \"sDom\": '<\"H\"Cfrltip>',\n \"bJQueryUI\": true,\n \"bPaginate\": true,\n \"sPaginationType\": \"full_numbers\",\n \"oColVis\": {\n \"buttonText\": \"Ver/Ocultar Columns\",\n //\"aiExclude\": [ 0 ]\n }\n });\n \n \n //$('#demo').before( oTableTools.dom.container );\n \t\t} );\n \n \n function calendario(form,campo){\n window.open('/funciones/calendario/index.php?formulario='+form+'&nomcampo='+id,'_blank');\n \n \n }\n \n \t</script>\n <title>Distribucion de Rotaciones</title>\n </head>\n \n <?php }", "private function setSequence(): void\n {\n $this->sequence = $this->getSequence();\n }", "function AutoRotateImage($src_image, $ref = false) \n {\n # from a non-ingested image to properly rotate a preview image\n global $imagemagick_path, $camera_autorotation_ext, $camera_autorotation_gm;\n \n if (!isset($imagemagick_path)) \n {\n return false;\n # for the moment, this only works for imagemagick\n # note that it would be theoretically possible to implement this\n # with a combination of exiftool and GD image rotation functions.\n }\n\n # Locate imagemagick.\n $convert_fullpath = get_utility_path(\"im-convert\");\n if ($convert_fullpath == false) \n {\n return false;\n }\n \n $exploded_src = explode('.', $src_image);\n $ext = $exploded_src[count($exploded_src) - 1];\n $triml = strlen($src_image) - (strlen($ext) + 1);\n $noext = substr($src_image, 0, $triml);\n \n if (count($camera_autorotation_ext) > 0 && (!in_array(strtolower($ext), $camera_autorotation_ext))) \n {\n # if the autorotation extensions are set, make sure it is allowed for this extension\n return false;\n }\n\n $exiftool_fullpath = get_utility_path(\"exiftool\");\n $new_image = $noext . '-autorotated.' . $ext;\n \n if ($camera_autorotation_gm) \n {\n $orientation = get_image_orientation($src_image);\n if ($orientation != 0) \n {\n $command = $convert_fullpath . ' ' . escapeshellarg($src_image) . ' -rotate +' . $orientation . ' ' . escapeshellarg($new_image);\n run_command($command);\n }\n $command = $exiftool_fullpath . ' Orientation=1 ' . escapeshellarg($new_image);\n } \n else\n {\n if ($ref != false) \n {\n # use the original file to get the orientation info\n $extension = sql_value(\"select file_extension value from resource where ref=$ref\", '');\n $file = get_resource_path($ref, true, \"\", false, $extension, -1, 1, false, \"\", -1);\n # get the orientation\n $orientation = get_image_orientation($file);\n if ($orientation != 0) \n {\n $command = $convert_fullpath . ' -rotate +' . $orientation . ' ' . escapeshellarg($src_image) . ' ' . escapeshellarg($new_image);\n run_command($command);\n # change the orientation metadata\n $command = $exiftool_fullpath . ' Orientation=1 ' . escapeshellarg($new_image);\n }\n } \n else\n {\n $command = $convert_fullpath . ' ' . escapeshellarg($src_image) . ' -auto-orient ' . escapeshellarg($new_image);\n run_command($command);\n }\n }\n\n if (!file_exists($new_image)) \n {\n return false;\n }\n\n if (!$ref) \n {\n # preserve custom metadata fields with exiftool \n # save the new orientation\n # $new_orientation=run_command($exiftool_fullpath.' -s -s -s -orientation -n '.$new_image);\n $old_orientation = run_command($exiftool_fullpath . ' -s -s -s -orientation -n ' . escapeshellarg($src_image));\n \n $exiftool_copy_command = $exiftool_fullpath . \" -TagsFromFile \" . escapeshellarg($src_image) . \" -all:all \" . escapeshellarg($new_image);\n run_command($exiftool_copy_command);\n \n # If orientation was empty there's no telling if rotation happened, so don't assume.\n # Also, don't go through this step if the old orientation was set to normal\n if ($old_orientation != '' && $old_orientation != 1) \n {\n $fix_orientation = $exiftool_fullpath . ' Orientation=1 -n ' . escapeshellarg($new_image);\n run_command($fix_orientation);\n }\n }\n \n unlink($src_image);\n rename($new_image, $src_image);\n return true; \n }", "function rotateImage($width, $height, $rotation, $quality = 8) {\n\t\tif (!is_numeric($quality)) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tif ($quality > 10) {\n\t\t\t\t$quality = 10;\n\t\t\t} else if ($quality < 0) {\n\t\t\t\t$quality = 0;\n\t\t\t}\n\n\t\t\t$quality = $quality * 10;\n\n\t\t\t$dataPath = TMP_DIR.\"/\".weFile::getUniqueId();\n\t\t\t$_resized_image = we_image_edit::edit_image($this->getElement(\"data\"), $this->getGDType(), $dataPath, $quality, $width, $height, false, true, 0, 0, -1, -1, $rotation);\n\n\t\t\t$this->setElement(\"data\", $dataPath);\n\n\t\t\t$this->setElement(\"width\", $_resized_image[1]);\n\t\t\t$this->setElement(\"origwidth\", $_resized_image[1], \"attrib\");\n\n\t\t\t$this->setElement(\"height\", $_resized_image[2]);\n\t\t\t$this->setElement(\"origheight\", $_resized_image[2], \"attrib\");\n\n\t\t\t$this->DocChanged = true;\n\t\t}\n\t}", "function writeOrientation($value)\r\n {\r\n if (($this->ControlState & csDesigning) == csDesigning)\r\n {\t\t\t\t\r\n\t\t\t\r\n global $allowupdates;\r\n\r\n //This mean this property is being updated in the IDE, specifically\r\n //so we need to switch coordinates\r\n if ($allowupdates)\r\n {\r\n $this->switchDimensions();\r\n }\t\t\t\r\n\t\t\t\r\n }\r\n else\r\n {\r\n //If not, we need to check if the value has changed before switching dimensions\r\n if ($this->_orientation!=$value) $this->switchDimensions();\r\n }\r\n $this->_orientation=$value;\r\n }", "function rotateImage($width, $height, $rotation, $quality = 8){\n\t\tif(!is_numeric($quality)){\n\t\t\treturn false;\n\t\t}\n\t\t$quality = max(min($quality, 10), 0) * 10;\n\n\t\t$dataPath = TEMP_PATH . we_base_file::getUniqueId();\n\t\t$_resized_image = we_base_imageEdit::edit_image($this->getElement('data'), $this->getGDType(), $dataPath, $quality, $width, $height, false, true, 0, 0, -1, -1, $rotation);\n\n\t\tif(!$_resized_image[0]){\n\t\t\treturn false;\n\t\t}\n\t\t$this->setElement('data', $dataPath);\n\n\t\t$this->setElement('width', $_resized_image[1], 'attrib');\n\t\t$this->setElement('origwidth', $_resized_image[1], 'attrib');\n\n\t\t$this->setElement('height', $_resized_image[2], 'attrib');\n\t\t$this->setElement('origheight', $_resized_image[2], 'attrib');\n\n\t\t$this->DocChanged = true;\n\t\treturn true;\n\t}", "public function setOrientation($orientation)\n {\n $this->fields['options']['orientation'] = $orientation;\n }", "function autoRotateImage($image) {\n $orientation = $image->getImageOrientation();\n\n switch($orientation) {\n case imagick::ORIENTATION_BOTTOMRIGHT:\n $image->rotateimage(\"#000\", 180); // rotate 180 degrees\n break;\n\n case imagick::ORIENTATION_RIGHTTOP:\n $image->rotateimage(\"#000\", 90); // rotate 90 degrees CW\n break;\n\n case imagick::ORIENTATION_LEFTBOTTOM:\n $image->rotateimage(\"#000\", -90); // rotate 90 degrees CCW\n break;\n }\n\n // Now that it's auto-rotated, make sure the EXIF data is correct in case the EXIF gets saved with the image!\n $image->setImageOrientation(imagick::ORIENTATION_TOPLEFT);\n}", "function __rotate(&$tmp, $angle, $color) {\r\r\n\t\tasido::trigger_abstract_error(\r\r\n\t\t\t__CLASS__,\r\r\n\t\t\t__FUNCTION__\r\r\n\t\t\t);\r\r\n\t\t}", "public function change()\n {\n $table = $this->table('backupDish', ['id'=>false, 'primary_key'=>['sequenceNumber']]);\n $table\n ->addColumn('sequenceNumber', 'integer', ['limit'=>8])\n ->addColumn('dishNumber', 'integer', ['limit' => 8])\n ->addColumn('dishName', 'string', ['limit' => 32])\n ->addColumn('createDate', 'date')\n ->addColumn('price', 'integer', ['limit' => 12])\n ->addColumn('description', 'string', ['limit' => 1000])\n ->addColumn('userName', 'string', ['limit' => 32])\n ->addColumn('deleteOn', 'date')\n ->addColumn('imageName', 'string', ['limit' => 32])\n ->create();\n $sql = 'ALTER TABLE backupDish MODIFY COLUMN sequenceNumber int auto_increment';\n $this->execute($sql);\n }", "public function setLandscape($value) {\n\t}", "public function setOrientationPeriod($period)\n {\n $payload = '';\n $payload .= pack('V', $period);\n\n $this->sendRequest(self::FUNCTION_SET_ORIENTATION_PERIOD, $payload);\n }", "function create() {\n Comparrot::create();\n}", "protected function setMigrator()\n {\n $this->migrator = App::make('migrator');\n }", "function rotate ($arr)\n{//rotate function is called in the right sidebar - an example of rotation (on day of month)\n\tif(is_array($arr))\n\t{//Generate item in array using date and modulus of count of the array\n\t\treturn $arr[((int)date(\"j\")) % count($arr)];\n\t}else{\n\t\treturn $arr;\n\t}\n}", "function rotate ($arr)\n{//rotate function is called in the right sidebar - an example of rotation (on day of month)\n\tif(is_array($arr))\n\t{//Generate item in array using date and modulus of count of the array\n\t\treturn $arr[((int)date(\"j\")) % count($arr)];\n\t}else{\n\t\treturn $arr;\n\t}\n}", "public function rotate($degrees);", "public function GuardarNuevaRotacion($arrayRotacion){\n global $userid,$db;\n $SQL_NuevaRotacion = \"INSERT INTO Rotaciones(Nombre,\n \tMaxEstudiantes,\n \tStatus ,\n \tcodigomateria ,\n \tIdsiq_convenio,\n \tTipoServicioRotacionId,\n \tIdsiq_institucionconvenio,\n \tFechaCreacion ,\n \tUsuarioCreacion )\n VALUES('\".$arrayRotacion[\"nombrerotacion\"].\"','\".$arrayRotacion[\"max_estudiantes\"].\"','\".$arrayRotacion[\"status\"].\"','\".$arrayRotacion[\"codigomateria\"].\"','\".$arrayRotacion[\"idconvenio\"].\"','\".$arrayRotacion[\"tiporotacion\"].\"','\".$arrayRotacion[\"idlugarrotacion\"].\"',\n NOW(),'\".$arrayRotacion[\"idusuario\"].\"')\";\n\t\t\t\t\t\t\n\t\tif($NuevaRotacion=$db->Execute($SQL_NuevaRotacion)===false){\n\t\t\t\t$a_vectt['val'] = 'FALSE';\n $a_vectt['descrip'] = 'ERROR '.$SQL_NuevaRotacion;\n echo json_encode($a_vectt);\n die;\n\t\t}\n return $db->Insert_ID();\n }", "public function getOrientation();", "function RotatedImage($file,$x,$y,$w,$h,$angle)\n{\n $this->Rotate($angle,$x,$y);\n $this->Image($file,$x,$y,$w,$h);\n $this->Rotate(0);\n}", "public function regenerate()\n {\n $this->storage->regenerate();\n }", "public function change(): void\n {\n $this->table('filestore')\n ->addColumn('uuid', 'uuid', ['null' => false])\n ->addColumn('hash', 'string', ['length' => 32, 'null' => false])\n ->addColumn('filename', 'string', ['length' => 100, 'null' => false])\n ->addColumn('bytes', 'integer', ['signed' => false, 'null' => false])\n ->addColumn('parent', 'uuid', ['null' => true])\n ->addColumn('meta', 'json', ['null' => false])\n ->addColumn('created', 'biginteger', ['signed' => false, 'null' => false])\n ->addColumn('created_by', 'uuid', ['null' => false])\n ->addIndex(['uuid'], ['unique' => true])\n ->addIndex(['hash'])\n ->addIndex(['filename'])\n ->addIndex(['parent'])\n ->addForeignKey(['created_by'], 'user', ['uuid'])\n ->create();\n }", "public function __construct()\n {\n //$this->middleware('auth');\n $this->expiresAt = Carbon::now()->addDay(15);\n }", "public function tipo()\n {\n return $this->belongsTo(TipoRota::class, 'id_perm_tipo_rota', 'id');\n }", "function image_fix_orientation($path){\n\t\t$exif = exif_read_data($path);\n\n\t\t//fix the Orientation if EXIF data exist\n\t\tif(!empty($exif['Orientation'])) {\n\t\t switch($exif['Orientation']) {\n\t\t case 8:\n\t\t $createdImage = imagerotate($image,90,0);\n\t\t break;\n\t\t case 3:\n\t\t $createdImage = imagerotate($image,180,0);\n\t\t break;\n\t\t case 6:\n\t\t $createdImage = imagerotate($image,-90,0);\n\t\t break;\n\t\t }\n\t\t}\n\t}", "function rang_autoriser(){}", "function acadp_exif_rotate( $file ){\n\n\tif( ! function_exists( 'exif_read_data' ) ) {\n\t\treturn $file;\n\t}\n\n\t$exif = @exif_read_data( $file['tmp_name'] );\n\t$exif_orient = isset( $exif['Orientation'] ) ? $exif['Orientation'] : 0;\n\t$rotate_image = 0;\n\n\tif( 6 == $exif_orient ) {\n\t\t$rotate_image = 90;\n\t} else if ( 3 == $exif_orient ) {\n\t\t$rotate_image = 180;\n\t} else if ( 8 == $exif_orient ) {\n\t\t$rotate_image = 270;\n\t}\n\n\tif( $rotate_image ) {\n\n\t\tif( class_exists( 'Imagick' ) ) {\n\n\t\t\t$imagick = new Imagick();\n\t\t\t$imagick_pixel = new ImagickPixel();\n\t\t\t$imagick->readImage( $file['tmp_name'] );\n\t\t\t$imagick->rotateImage( $imagick_pixel, $rotate_image );\n\t\t\t$imagick->setImageOrientation( 1 );\n\t\t\t$imagick->writeImage( $file['tmp_name'] );\n\t\t\t$imagick->clear();\n\t\t\t$imagick->destroy();\n\n\t\t} else {\n\n\t\t\t$rotate_image = -$rotate_image;\n\n\t\t\tswitch( $file['type'] ) {\n\t\t\t\tcase 'image/jpeg' :\n\t\t\t\t\tif( function_exists( 'imagecreatefromjpeg' ) ) {\n\t\t\t\t\t\t$source = imagecreatefromjpeg( $file['tmp_name'] );\n\t\t\t\t\t\t$rotate = imagerotate( $source, $rotate_image, 0 );\n\t\t\t\t\t\timagejpeg( $rotate, $file['tmp_name'] );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'image/png' :\n\t\t\t\t\tif( function_exists( 'imagecreatefrompng' ) ) {\n\t\t\t\t\t\t$source = imagecreatefrompng( $file['tmp_name'] );\n\t\t\t\t\t\t$rotate = imagerotate( $source, $rotate_image, 0 );\n\t\t\t\t\t\timagepng( $rotate, $file['tmp_name'] );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'image/gif' :\n\t\t\t\t\tif( function_exists( 'imagecreatefromgif' ) ) {\n\t\t\t\t\t\t$source = imagecreatefromgif( $file['tmp_name'] );\n\t\t\t\t\t\t$rotate = imagerotate( $source, $rotate_image, 0 );\n\t\t\t\t\t\timagegif( $rotate, $file['tmp_name'] );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\treturn $file;\n\n}", "function getOrientation() { return $this->readOrientation(); }", "private function rotor($rotor) {\r\n $system = $this->getSystem();\r\n $enigma = $system->getEnigma();\r\n\r\n $setting = $enigma->getRotorSetting($rotor);\r\n $wheel = $enigma->getRotor($rotor);\r\n\r\n $html = <<<HTML\r\n<p><label for=\"rotor-$rotor\">Rotor $rotor:</label>\r\n<select id=\"rotor-$rotor\" name=\"rotor-$rotor\">\r\nHTML;\r\n\r\n $rotors = ['', 'I', 'II', 'III', 'IV', 'V'];\r\n for($i=1; $i<=5; $i++) {\r\n $id = $rotors[$i];\r\n $selected = $wheel == $i ? \" selected\" : \"\";\r\n $html .= <<<HTML\r\n<option value=\"$i\"$selected>$id</option>\r\nHTML;\r\n\r\n }\r\n $html .= <<<HTML\r\n</select>&nbsp;&nbsp;\r\n<label for=\"initial-$rotor\">Setting:</label>\r\n<input class=\"initial\" id=\"initial-$rotor\" name=\"initial-$rotor\" type=\"text\" value=\"$setting\">\r\n</p>\r\nHTML;\r\n\r\n return $html;\r\n }", "function _rotateImageGD1($file, $desfile, $degrees, $imgobj) {\r\n // GD can only handle JPG & PNG images\r\n if ($imgobj->_type !== \"jpg\" && $imgobj->_type !== \"jpeg\" && $imgobj->_type !== \"png\") {\r\n return false;\r\n }\r\n if ($imgobj->_type == \"jpg\" || $imgobj->_type == \"jpeg\") {\r\n $src_img = imagecreatefromjpeg($file);\r\n } else {\r\n $src_img = imagecreatefrompng($file);\r\n }\r\n if (!$src_img) {\r\n return false;\r\n }\r\n // The rotation routine...\r\n $dst_img = imagerotate($src_img, $degrees, 0);\r\n if ($imgobj->_type == \"jpg\" || $imgobj->_type == \"jpeg\") {\r\n imagejpeg($dst_img, $desfile, $this->_JPEG_quality);\r\n } else {\r\n imagepng($dst_img, $desfile);\r\n }\r\n imagedestroy($src_img);\r\n imagedestroy($dst_img);\r\n return true; \r\n }", "public function actionUpdatePostgresIdSeq()\n {\n HBackup::updatePostgresIdSeq();\n }", "public function setTransformer() {\n\t\tif ($this->isPassword()) {\n\t\t\t$this->addTransformer('password');\n\t\t} else {\n\t\t\t$dbType = $this->getDbType();\n\t\t\tif ($dbType == 'datetime') {\n\t\t\t\t$this->addTransformer('datetime');\n\t\t\t}\n\t\t}\n\t}", "function rotate($img_name,$rotated_image,$direction){\n\t\t$image = $img_name;\n\t\t$extParts=explode(\".\",$image);\n\t\t$ext=end($extParts);\n\t\t$filename=$rotated_image;\n\t\t//How many degrees you wish to rotate\n\t\t$degrees = 0;\n\t\tif($direction=='R'){\n\t\t\t$degrees = 90;\n\t\t}\n\t\tif($direction=='L'){\n\t\t\t$degrees = -90;\n\t\t}\n\t\t\n\t\tif($ext==\"jpg\" || $ext== \"jpeg\" || $ext==\"JPG\" || $ext== \"JPEG\"){\n\t\t\t$source = imagecreatefromjpeg($image) ;\n\t\t\t$rotate = imagerotate($source, $degrees, 0) ;\n\t\t\timagejpeg($rotate,$filename) ;\n\t\t}\n\t\t\n\t\t\n\t\tif($ext==\"GIF\" || $ext== \"gif\"){\n\t\t\t$source = imagecreatefromgif($image) ;\n\t\t\t$rotate = imagerotate($source, $degrees, 0) ;\n\t\t\timagegif($rotate,$filename) ;\n\t\t\t\n\t\t}\n\t\t\n\t\tif($ext==\"png\" || $ext== \"PNG\"){\n\t\t\t$source = imagecreatefrompng($image) ;\n\t\t\t$rotate = imagerotate($source, $degrees, 0) ;\n\t\t\timagepng($rotate,$filename) ;\n\t\t\t\n\t\t}\n\t\treturn $rotate;\t\n\t\t\n\t}", "public function makeVerticalRotation() {\n\t\t$this->addMakeVerticalRotationJs = true;\n\n\t\treturn $this;\n\t}", "public static function rotate($baseURL, $name, $image)\r\n {\r\n $exif = exif_read_data($image);\r\n\r\n if (array_key_exists('Orientation', $exif))\r\n {\r\n $jpg = imagecreatefromjpeg($image);\r\n $orientation = $exif['Orientation'];\r\n switch ($orientation)\r\n {\r\n case 3:\r\n $jpg = imagerotate($jpg, 180, 0);\r\n break;\r\n case 6:\r\n $jpg = imagerotate($jpg, -90, 0);\r\n break;\r\n case 8:\r\n $jpg = imagerotate($jpg, 90, 0);\r\n break;\r\n default: \t\r\n }\r\n imagejpeg($jpg, $baseURL.'computed/'.$name, 90);\r\n }\r\n\t\t else\r\n\t\t {\r\n\t\t\t copy($image, $baseURL.'computed/'.$name);\r\n\t\t }\r\n }", "function getOrientation() { return $this->readOrientation(); }", "public function restore_permissions(){\n\t\t$this->db->query(\"UPDATE __sessions SET :params WHERE session_id = '\".$this->sid.\"'\", array(\n\t\t\t\t'session_perm_id'\t\t\t\t\t=> ANONYMOUS,\n\t\t));\n\t}", "public function change()\n {\n $members = $this->table('members');\n $members->addColumn('password', 'string')\n ->addColumn('com_trading_name_vie', 'string')\n ->addColumn('com_trading_name_eng', 'string')\n ->addColumn('com_trading_name_jpn', 'string')\n ->addColumn('com_short_name_vie', 'string')\n ->addColumn('com_short_name_eng', 'string')\n ->addColumn('com_short_name_jpn', 'string')\n ->addColumn('com_country', 'integer', ['comment' => '1: VN, 2: JP'])\n ->addColumn('com_lang_chosen', 'string', ['comment' => '1: VIE, 2: ENG, 3: JPN'])\n ->addColumn('com_established', 'date')\n ->addColumn('com_tax_code', 'string')\n ->addColumn('com_capital', 'string')\n ->addColumn('com_staff', 'integer')\n ->addColumn('gender', 'integer')\n ->addColumn('image', 'string',['null' =>true])\n ->addColumn('com_business_vie', 'text')\n ->addColumn('com_business_eng', 'text')\n ->addColumn('com_business_jpn', 'text')\n ->addColumn('com_note_vie','text')\n ->addColumn('com_note_eng','text')\n ->addColumn('com_note_jpn','text')\n ->addColumn('address_vie', 'string')\n ->addColumn('address_eng', 'string')\n ->addColumn('address_jpn', 'string')\n ->addColumn('com_pic_department_vie', 'string')\n ->addColumn('com_pic_department_eng', 'string')\n ->addColumn('com_pic_department_jpn', 'string')\n ->addColumn('type_company_id', 'integer')\n ->addColumn('type_business_id', 'integer')\n ->addColumn('mobile', 'string')\n ->addColumn('com_rate', 'string')\n ->addColumn('cooperation_id', 'integer')\n ->addColumn('need_id', 'integer')\n ->addColumn('com_status', 'integer')\n ->addColumn('com_inquiry_vie', 'text')\n ->addColumn('com_inquiry_eng', 'text')\n ->addColumn('com_inquiry_jpn', 'text')\n ->addColumn('com_level', 'integer', ['default' => 2,'comment' => '1: vip member, 2: default member'])\n ->addColumn('com_view', 'integer')\n ->addColumn('com_send_email','integer')\n ->addColumn('com_name_jpn','string')\n ->addColumn('com_name_eng', 'string')\n ->addColumn('manager_eng', 'string')\n ->addColumn('manager_jpn', 'string')\n ->addColumn('created', 'datetime')\n ->addColumn('modified', 'datetime', ['null' => true, 'default' => null])\n ->save();\n\n }", "function setTransformation($transformation){\n\t\tif($transformation){\n\t\t\t$transformation = clone $transformation;\n\t\t}\n\t\t$this->transformation = $transformation;\n\t}", "public function rotaciones(){\n return $this->hasMany('App\\RotacionInsumo');\n }", "public function getRotateControl()\n {\n return $this->rotateControl;\n }", "function d3jspie_generateur_autoriser(){}", "public function rotate($rotation = null)\n {\n if (is_null($rotation)) {\n $rotation = $this->rotation;\n }\n $cipher = $this->getSubstitutions();\n $this->setSubstitutions(\n array(Helper::rotate($cipher[0], $rotation))\n );\n return $this;\n }", "public function change(): void\n {\n //$users = $this->table('users', array('id' => false, 'primary_key' => ['uuid']));\n $users = $this->table('users');\n $users->addColumn('uuid', 'binary', ['limit' => 16])\n ->addColumn('username', 'string', ['limit' => 20])\n ->addColumn('password', 'string', ['limit' => 255])\n ->addColumn('email', 'string', ['limit' => 100])\n ->addColumn('first_name', 'string', ['limit' => 30])\n ->addColumn('last_name', 'string', ['limit' => 30])\n ->addTimestamps()\n ->addIndex(['uuid', 'username', 'email'], ['unique' => true])\n ->create();\n }", "public function rotateLeft(): Orientation\n {\n return new North();\n }", "private static function setRota( $url ) {\n\t\t\n\t\tif( is_array( $url ) ) {\n\n\t\t\tif( !empty( $url['path'] ) )\n\t\t\t\tself::$rota = explode( \"/\", trim( $url['path'] , '/') );\n\t\t}\t\t\n\t}", "public function run()\n {\n $p=Permission::create([\n 'slug'=>'admin_access',\n 'label' => 'Acceso usuario administrador',\n 'created_at' => '2018-10-29 00:00:00',\n \t\t 'updated_at' => '2018-10-29 00:00:00'\n ]);\n $p->roles()->sync(['1']);\n $p=Permission::create([\n 'slug'=>'manage_users',\n 'label' => 'Gestión de usuarios',\n 'created_at' => '2018-10-29 00:00:00',\n \t\t 'updated_at' => '2018-10-29 00:00:00'\n ]);\n $p->roles()->sync(['1']);\n \t $p=Permission::create([\n 'slug'=>'student_access',\n 'label' => 'Acceso usuario estudiante',\n 'created_at' => '2018-10-29 00:00:00',\n \t\t 'updated_at' => '2018-10-29 00:00:00'\n ]);\n $p->roles()->sync(['2']);\n $p=Permission::create([\n 'slug'=>'parent_access',\n 'label' => 'Acceso usuario padre',\n 'created_at' => '2018-10-29 00:00:00',\n \t\t 'updated_at' => '2018-10-29 00:00:00'\n ]);\n $p->roles()->sync(['3']);\n\n\n\n //factory(Permission::class)->times(20)->create();\n }", "function setEncryption( DBFile_Encryption $encryption )\n {//--------------->> setEncryption()\n $this->_encryption = $encryption;\n }", "protected static function lockVersionColumn()\n {\n return 'lock_version';\n }", "protected function _rotateImage(&$photo, $path)\n {\n \t$exif = @exif_read_data($path);\n \t\n \tif (!empty($exif['Orientation']))\n \t\tswitch ($exif['Orientation'])\n \t\t{\n \t\t\tcase 8:\n \t\t\t\t$photo->rotateImageNDegrees(90)->save($path);\n \t\t\t\tbreak;\n \t\t\tcase 3:\n \t\t\t\t$photo->rotateImageNDegrees(180)->save($path);\n \t\t\t\tbreak;\n \t\t\tcase 6:\n \t\t\t\t$photo->rotateImageNDegrees(-90)->save($path);\n \t\t\t\tbreak;\n \t}\n }", "function regenerar()\n\t{\n\t\t$this->manejador_interface->titulo( \"Regenerando PROYECTO {$this->identificador}\" );\n\t\ttoba_logger::instancia()->debug( \"Regenerando PROYECTO {$this->identificador}\");\n\t\ttry {\n\t\t\t$this->db->abrir_transaccion();\n\t\t\t$this->db->retrasar_constraints();\n\t\t\t$this->instancia->exportar_local_proyecto($this->identificador);\n\t\t\t$this->eliminar();\n\t\t\t$this->cargar();\n\t\t\t$this->instancia->cargar_informacion_instancia_proyecto( $this->identificador );\n\t\t\t$this->instancia->actualizar_secuencias();\n\t\t\t$this->generar_roles_db();\n\t\t\t$this->db->cerrar_transaccion();\n\t\t} catch ( toba_error $e ) {\n\t\t\t$this->db->abortar_transaccion();\n\t\t\tthrow $e;\n\t\t}\n\t}", "function setAuthSignature($AuthSignature)\n {\n \t$this->_authSignature =$AuthSignature;\n }", "function RotatedImage($file,$x,$y,$w,$h,$angle) {\n\t\t$this->Rotate($angle,$x,$y);\n\t\t$this->Image($file,$x,$y,$w,$h);\n\t\t$this->Rotate(0);\n\t}", "function RotatedImage($file,$x,$y,$w,$h,$angle) {\n\t\t$this->Rotate($angle,$x,$y);\n\t\t$this->Image($file,$x,$y,$w,$h);\n\t\t$this->Rotate(0);\n\t}", "function reset_versions() {\n\t\tcalldpc_method('database.droptable use versions');\n \t //$sSQL = \"drop table if exists versions\";\n //$db->Execute($sSQL);\n\t\t$sSQL = \"create table versions \" .\n \"(\" .\n\t \"recid integer auto_increment primary key,\" .\n\t \"id varchar(255),\" .\n\t \"section varchar(64),\" .\t\t\t\t\t\n\t \"cdate varchar(64),\" .\t\t\t\t\t\n\t \"mkey varchar(255),\" .\t\t\t\t\t\n\t \"type varchar(64),\" .\n\t \"ver varchar(64),\" .\t\t\t\t\t\t\t\t\t\t\t\n\t \"data text,\" .\n\t \"comments text,\" .\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t \"UNIQUE (id)\" .\t\t\t\t\t\n \")\";\n //$db->Execute($sSQL); \n\t\tcalldpc_method_use_pointers('database.exesql',array(0=>&$sSQL));\t\t\n\t\t\t\n\t\tsetInfo(\" Reset successfully!\");\n }", "public function rotate($angle)\n {\n $this->setForceAlpha(true);\n $this\n ->addConvertOption('background', 'none')\n ->addConvertOption('alpha', 'set')\n ->addConvertOption('rotate', $angle);\n\n //an image size has changed after the rotate action, it's required to save it and reinit resource\n $this->saveIfRequired('after_rotate');\n $this->resource = null;\n $this->initResource();\n\n return $this;\n }", "public function getOrientation()\n {\n return $this->orientation;\n }", "public function getOrientation()\n {\n return $this->orientation;\n }", "public function DAOModulosxRol() {\n }" ]
[ "0.73458827", "0.73446494", "0.6547661", "0.65194905", "0.61397964", "0.5802929", "0.58019084", "0.57643586", "0.56851083", "0.5580343", "0.55761445", "0.55710083", "0.5553005", "0.5553005", "0.551491", "0.54839563", "0.5450881", "0.5441643", "0.5430857", "0.53952724", "0.5378225", "0.53574556", "0.5306875", "0.523392", "0.52237564", "0.5218935", "0.52152735", "0.5202041", "0.5136539", "0.51343024", "0.511821", "0.50600237", "0.49727932", "0.49656358", "0.49656358", "0.49656358", "0.49589238", "0.4912269", "0.489419", "0.48851135", "0.4846054", "0.48337036", "0.4822327", "0.4819487", "0.47943774", "0.479205", "0.47864708", "0.47538596", "0.47376925", "0.4732087", "0.47081462", "0.4698513", "0.46718207", "0.46663615", "0.46504724", "0.46058232", "0.46058232", "0.45900455", "0.45830783", "0.45760858", "0.4575834", "0.4575801", "0.45707983", "0.45622605", "0.4560732", "0.45473742", "0.4546798", "0.45369914", "0.45361122", "0.451921", "0.45152554", "0.45133725", "0.45091504", "0.45072377", "0.45067298", "0.45045057", "0.44988686", "0.44957915", "0.4485362", "0.44775274", "0.44764385", "0.4475433", "0.44738623", "0.44660914", "0.44609493", "0.44567302", "0.44525623", "0.44491762", "0.44483736", "0.44407457", "0.443208", "0.44184023", "0.44148612", "0.44127738", "0.44127738", "0.4396454", "0.43923637", "0.43880016", "0.43880016", "0.43613282" ]
0.63221383
4
get the rotation, added via laravelpostgres module
public function getRotation() { return self::accessPgArray($this->rotation); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRotation() {}", "public function getRotation() {}", "public function rotate()\n {\n // not possible in php?\n }", "public function rotateBy($rotation) {}", "function getOrientation() { return $this->readOrientation(); }", "function getOrientation() { return $this->readOrientation(); }", "public function setRotation($rotation) {}", "public function setRotation($rotation) {}", "public function getOrientation();", "public function fetchRotator($id)\n\t{\n \tif ($id != NULL && is_numeric($id)) :\n\t $select = $this->registry->db->select()\n \t ->from(array('r' => 'rotators'))\n \t ->where('r.rot_id = ?', $id)\n \t ->limit(1,0);\n\n\t\t $rotator = $this->registry->db->fetchall($select);\n return $rotator['0'];\n else :\n throw new Exception('Invalid rotator id');\n endif;\n\t}", "function image_rotate()\n\t{\n\t\t// Allowed rotation values\n\t\t\n\t\t$degs = array(90, 180, 270, 'vrt', 'hor');\t\n\t\n\t\t\tif ($this->rotation == '' OR ! in_array($this->rotation, $degs))\n\t\t\t{\n\t\t\t$this->set_error('imglib_rotation_angle_required');\n\t\t\treturn FALSE;\t\t\t\n\t\t\t}\n\t\n\t\t/** -------------------------------------\n\t\t/** Reassign the width and height\n\t\t/** -------------------------------------*/\n\t\n\t\tif ($this->rotation == 90 OR $this->rotation == 270)\n\t\t{\n\t\t\t$this->dst_width\t= $this->src_height;\n\t\t\t$this->dst_height\t= $this->src_width;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->dst_width\t= $this->src_width;\n\t\t\t$this->dst_height\t= $this->src_height;\n\t\t}\n\t\n\t\t/** -------------------------------------\n\t\t/** Choose resizing function\n\t\t/** -------------------------------------*/\n\t\t\n\t\tif ($this->resize_protocol == 'imagemagick' OR $this->resize_protocol == 'netpbm')\n\t\t{\n\t\t\t$protocol = 'image_process_'.$this->resize_protocol;\n\t\t\n\t\t\treturn $this->$protocol('rotate');\n\t\t}\n\t\t\n \t\tif ($this->rotation == 'hor' OR $this->rotation == 'vrt')\n \t\t{\n\t\t\treturn $this->image_mirror_gd();\n \t\t}\n\t\telse\n\t\t{\t\t\n\t\t\treturn $this->image_rotate_gd();\n\t\t}\n\t}", "function readOrientation() { return $this->_orientation;}", "public function getRotateControl()\n {\n return $this->rotateControl;\n }", "public function getQuaternion()\n {\n return self::accessPgArray($this->quaternion);\n }", "public function getOrientation()\n {\n return $this->orientation;\n }", "public function getOrientation()\n {\n return $this->orientation;\n }", "public function getOrientation() {\n\t\treturn $this->orientation;\n\t}", "public function getOrientation()\r\n {\r\n return $this->_orientation;\r\n }", "public function rotaciones(){\n return $this->hasMany('App\\RotacionInsumo');\n }", "function readOrientation() { return $this->_orientation; }", "public function getRW() {}", "public function getOrientation()\n {\n $result = array();\n\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_ORIENTATION, $payload);\n\n $payload = unpack('v1roll/v1pitch/v1yaw', $data);\n\n $result['roll'] = IPConnection::fixUnpackedInt16($payload['roll']);\n $result['pitch'] = IPConnection::fixUnpackedInt16($payload['pitch']);\n $result['yaw'] = IPConnection::fixUnpackedInt16($payload['yaw']);\n\n return $result;\n }", "public function rotation($value) {\n return $this->setProperty('rotation', $value);\n }", "public function rotate()\n\t{\n\t\t// Allowed rotation values\n\t\t$degs = array(90, 180, 270, 'vrt', 'hor');\n\n\t\tif ($this->rotation_angle === '' OR ! in_array($this->rotation_angle, $degs))\n\t\t{\n\t\t\t$this->set_error('imglib_rotation_angle_required');\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// Reassign the width and height\n\t\tif ($this->rotation_angle === 90 OR $this->rotation_angle === 270)\n\t\t{\n\t\t\t$this->width\t= $this->orig_height;\n\t\t\t$this->height\t= $this->orig_width;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->width\t= $this->orig_width;\n\t\t\t$this->height\t= $this->orig_height;\n\t\t}\n\n\t\t// Choose resizing function\n\t\tif ($this->image_library === 'imagemagick' OR $this->image_library === 'netpbm')\n\t\t{\n\t\t\t$protocol = 'image_process_'.$this->image_library;\n\t\t\treturn $this->$protocol('rotate');\n\t\t}\n\n\t\treturn ($this->rotation_angle === 'hor' OR $this->rotation_angle === 'vrt')\n\t\t\t? $this->image_mirror_gd()\n\t\t\t: $this->image_rotate_gd();\n\t}", "public function tipo()\n {\n return $this->belongsTo(TipoRota::class, 'id_perm_tipo_rota', 'id');\n }", "public function rotation($direction)\n\t{\n \n $direction = strtoupper($direction);\n\n $data[\"queen\"]= $this->queen_model->get_queen();\n if($data['queen']==null) {\n //error_no_queen_yet : 405\n $this->respond_errors(\"error no queen yet\",405);\n return;\n }\n $queen=$this->queen_model->mapper($data['queen']);\n\n $errors=$queen->rotate($direction);\n\n if (sizeof($errors)>0){\n //error_bad_direction_value :1\n $this->respond_errors($errors,100);\n\n }else{\n $this->queen_model->update_queen_facing($queen);\n $this->respond($queen,200);\n \n }\n\n }", "public function getJWTIdentifier() {\n return $this->getKey(); // Eloquent Model method\n }", "public function getStoragePrimaryKey();", "public function getCurrentTransformationMatrix() {}", "function rotate_tables($table_name) {\n\n global $dbconfig;\n $db = DB::getInstance($dbconfig->job->host, $dbconfig->job->name, $dbconfig->job->user, $dbconfig->job->password);\n $allowed_tables = array('jobs', 'logs');\n if (!in_array($table_name, $allowed_tables)) {\n Log::write(ERROR, 'Try to rotate a table not logs or jobs in job db', true);\n return false;\n }\n\n Log::write(INFO, \"rotate table: $table_name\", true);\n\n $renamed_table_name = $table_name . '_' . get_timestamp();\n $sql = \"rename table $table_name to $renamed_table_name\";\n if (!$db->query($sql)) {\n Log::write(ERROR, \"fail on rename the table from $table_name to $renamed_table_name\", true);\n return false;\n }\n\n Log::write(INFO, \"renamed the table from $table_name to $renamed_table_name\");\n\n $sql = DB::show_create_table('job', $table_name);\n if (!$db->query($sql)) {\n Log::write(ERROR, \"fail on creating the table $table_name\", true);\n return false;\n }\n\n Log::write(INFO, \"created the table $table_name\", true);\n\n return $renamed_table_name;\n}", "public function rotateLeft();", "function create() {\n Comparrot::create();\n}", "public function rotateRight();", "public function getRol()\n {\n return $this->rol;\n }", "public function getRol()\n {\n return $this->rol;\n }", "public function getRol()\n {\n return $this->rol;\n }", "public function getTransformationPath()\n {\n return $this->transformationPath;\n }", "public function GuardandoRotaciones($arraydatos){\n global $userid,$db;\n //$arraydatos[\"idrotacion\"]=$this->GuardarNuevaRotacion($arraydatos);\n $a_vectt=$this->GuardarNuevaRotacionEstudiante($arraydatos); \n return $a_vectt;\n }", "public function rot()\n {\n $this->status = APPLE_DECAYED;\n $this->color = APPLE_DECAYED_COLOR;\n\n return $this->save();\n }", "public function __construct($rotation)\n {\n $this->rotation = $rotation;\n }", "public function getPersistenceScheme(): string;", "abstract protected function initRotues();", "function ajan_get_db_version() {\n\t\treturn activitynotifications()->db_version;\n\t}", "public function getSnapshot();", "public static function getRotasPermitidas(){\n $usucpf = $_SESSION['usucpf'];\n $sisid = $_SESSION['sisid'];\n $perfis = $_SESSION['perfil'][$usucpf][$sisid];\n\n $arrTmp = array();\n if(!empty($perfis)){\n $rotas = Rota::select('ds_rota')\n ->join('seguranca.tb_rota_perfil','seguranca.tb_rota_perfil.co_rota','=','seguranca.tb_rota.co_rota')\n ->where('sisid',$sisid)\n ->where('seguranca.tb_rota_perfil.st_habilitado',true)\n ->whereIn('seguranca.tb_rota_perfil.pflcod',$perfis)->get();\n\n\n\n if(!empty($rotas)){\n foreach ($rotas as $rota)\n $arrTmp[] = $rota->ds_rota;\n }\n }\n return $arrTmp;\n }", "public function getOrientationPeriod()\n {\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_ORIENTATION_PERIOD, $payload);\n\n $payload = unpack('V1period', $data);\n\n return IPConnection::fixUnpackedUInt32($payload['period']);\n }", "public function getVersion(): string\n {\n throw_if(! defined('LARAVEL_DATABASE_ENCRYPTION_VERSION'), RuntimeException::class,\n 'The provider did not boot.');\n\n return LARAVEL_DATABASE_ENCRYPTION_VERSION;\n }", "public function getRandomOrientation() {\n\t\treturn self::$orientation[rand(0,1)];\n\t}", "public function VwASignacionRotacionJs(){\n \n ?>\n <script type=\"text/javascript\">\n //inicializar tablas\n \t$(document).ready( function () {\n \t\t\t\n \t\t\t\n $('#asignacionrot').dataTable({\n \"sDom\": '<\"H\"Cfrltip>',\n \"bJQueryUI\": true,\n \"bPaginate\": true,\n \"sPaginationType\": \"full_numbers\",\n \"oColVis\": {\n \"buttonText\": \"Ver/Ocultar Columns\",\n //\"aiExclude\": [ 0 ]\n }\n });\n \n \n //$('#demo').before( oTableTools.dom.container );\n \t\t} );\n \n \n function calendario(form,campo){\n window.open('/funciones/calendario/index.php?formulario='+form+'&nomcampo='+id,'_blank');\n \n \n }\n \n \t</script>\n <title>Distribucion de Rotaciones</title>\n </head>\n \n <?php }", "public function getDatabase(): string;", "function ajan_get_db_version_raw() {\n\t\t$ajan = activitynotifications();\n\t\treturn !empty( $ajan->db_version_raw ) ? $ajan->db_version_raw : 0;\n\t}", "function rotate($img_name,$rotated_image,$direction){\n\t\t$image = $img_name;\n\t\t$extParts=explode(\".\",$image);\n\t\t$ext=end($extParts);\n\t\t$filename=$rotated_image;\n\t\t//How many degrees you wish to rotate\n\t\t$degrees = 0;\n\t\tif($direction=='R'){\n\t\t\t$degrees = 90;\n\t\t}\n\t\tif($direction=='L'){\n\t\t\t$degrees = -90;\n\t\t}\n\t\t\n\t\tif($ext==\"jpg\" || $ext== \"jpeg\" || $ext==\"JPG\" || $ext== \"JPEG\"){\n\t\t\t$source = imagecreatefromjpeg($image) ;\n\t\t\t$rotate = imagerotate($source, $degrees, 0) ;\n\t\t\timagejpeg($rotate,$filename) ;\n\t\t}\n\t\t\n\t\t\n\t\tif($ext==\"GIF\" || $ext== \"gif\"){\n\t\t\t$source = imagecreatefromgif($image) ;\n\t\t\t$rotate = imagerotate($source, $degrees, 0) ;\n\t\t\timagegif($rotate,$filename) ;\n\t\t\t\n\t\t}\n\t\t\n\t\tif($ext==\"png\" || $ext== \"PNG\"){\n\t\t\t$source = imagecreatefrompng($image) ;\n\t\t\t$rotate = imagerotate($source, $degrees, 0) ;\n\t\t\timagepng($rotate,$filename) ;\n\t\t\t\n\t\t}\n\t\treturn $rotate;\t\n\t\t\n\t}", "function rotate ($arr)\n{//rotate function is called in the right sidebar - an example of rotation (on day of month)\n\tif(is_array($arr))\n\t{//Generate item in array using date and modulus of count of the array\n\t\treturn $arr[((int)date(\"j\")) % count($arr)];\n\t}else{\n\t\treturn $arr;\n\t}\n}", "function rotate ($arr)\n{//rotate function is called in the right sidebar - an example of rotation (on day of month)\n\tif(is_array($arr))\n\t{//Generate item in array using date and modulus of count of the array\n\t\treturn $arr[((int)date(\"j\")) % count($arr)];\n\t}else{\n\t\treturn $arr;\n\t}\n}", "function AutoRotateImage($src_image, $ref = false) \n {\n # from a non-ingested image to properly rotate a preview image\n global $imagemagick_path, $camera_autorotation_ext, $camera_autorotation_gm;\n \n if (!isset($imagemagick_path)) \n {\n return false;\n # for the moment, this only works for imagemagick\n # note that it would be theoretically possible to implement this\n # with a combination of exiftool and GD image rotation functions.\n }\n\n # Locate imagemagick.\n $convert_fullpath = get_utility_path(\"im-convert\");\n if ($convert_fullpath == false) \n {\n return false;\n }\n \n $exploded_src = explode('.', $src_image);\n $ext = $exploded_src[count($exploded_src) - 1];\n $triml = strlen($src_image) - (strlen($ext) + 1);\n $noext = substr($src_image, 0, $triml);\n \n if (count($camera_autorotation_ext) > 0 && (!in_array(strtolower($ext), $camera_autorotation_ext))) \n {\n # if the autorotation extensions are set, make sure it is allowed for this extension\n return false;\n }\n\n $exiftool_fullpath = get_utility_path(\"exiftool\");\n $new_image = $noext . '-autorotated.' . $ext;\n \n if ($camera_autorotation_gm) \n {\n $orientation = get_image_orientation($src_image);\n if ($orientation != 0) \n {\n $command = $convert_fullpath . ' ' . escapeshellarg($src_image) . ' -rotate +' . $orientation . ' ' . escapeshellarg($new_image);\n run_command($command);\n }\n $command = $exiftool_fullpath . ' Orientation=1 ' . escapeshellarg($new_image);\n } \n else\n {\n if ($ref != false) \n {\n # use the original file to get the orientation info\n $extension = sql_value(\"select file_extension value from resource where ref=$ref\", '');\n $file = get_resource_path($ref, true, \"\", false, $extension, -1, 1, false, \"\", -1);\n # get the orientation\n $orientation = get_image_orientation($file);\n if ($orientation != 0) \n {\n $command = $convert_fullpath . ' -rotate +' . $orientation . ' ' . escapeshellarg($src_image) . ' ' . escapeshellarg($new_image);\n run_command($command);\n # change the orientation metadata\n $command = $exiftool_fullpath . ' Orientation=1 ' . escapeshellarg($new_image);\n }\n } \n else\n {\n $command = $convert_fullpath . ' ' . escapeshellarg($src_image) . ' -auto-orient ' . escapeshellarg($new_image);\n run_command($command);\n }\n }\n\n if (!file_exists($new_image)) \n {\n return false;\n }\n\n if (!$ref) \n {\n # preserve custom metadata fields with exiftool \n # save the new orientation\n # $new_orientation=run_command($exiftool_fullpath.' -s -s -s -orientation -n '.$new_image);\n $old_orientation = run_command($exiftool_fullpath . ' -s -s -s -orientation -n ' . escapeshellarg($src_image));\n \n $exiftool_copy_command = $exiftool_fullpath . \" -TagsFromFile \" . escapeshellarg($src_image) . \" -all:all \" . escapeshellarg($new_image);\n run_command($exiftool_copy_command);\n \n # If orientation was empty there's no telling if rotation happened, so don't assume.\n # Also, don't go through this step if the old orientation was set to normal\n if ($old_orientation != '' && $old_orientation != 1) \n {\n $fix_orientation = $exiftool_fullpath . ' Orientation=1 -n ' . escapeshellarg($new_image);\n run_command($fix_orientation);\n }\n }\n \n unlink($src_image);\n rename($new_image, $src_image);\n return true; \n }", "public function getRol_id()\n {\n return $this->rol_id;\n }", "private static function get_db_expires(int $delta) {\n\t\treturn self::$ctrl::$admin::$store->time() + $delta;\n\t}", "private function _createTransformQuery()\n\t{\n\t\treturn craft()->db->createCommand()\n\t\t\t->select('id, name, handle, mode, position, height, width, format, quality, dimensionChangeTime')\n\t\t\t->from('assettransforms')\n\t\t\t->order('name');\n\t}", "private static function _rotate() {\n $config = Mirage::app()->getConfig();\n if(!isset($config['logs']))\n throw new Exception('Please set key \"logs\" in config');\n \n if(!is_array($config['logs']))\n throw new Exception('\"logs\" should be array');\n \n $logs = $config['logs'];\n \n if(!isset($logs['log_path']))\n throw new Exception('Please set log_path in config');\n \n if(!file_exists($logs['log_path']))\n throw new Exception ('Directory not exist' . $logs['log_path']);\n \n if(!is_dir($logs['log_path']))\n throw new Exception($logs['log_path'] . ' should be directory');\n \n $log_file = $logs['log_path'] . DIRECTORY_SEPARATOR . self::$file_name;\n $log_path = $logs['log_path'] . DIRECTORY_SEPARATOR;\n \n// if(!chmod($logs['log_path'], 775))\n// throw new Exception('Can\\'t change permission of ' . $logs['log_path']); \n \n if(MIRAGE_DEBUG) {\n return true;\n } \n \n // dont rotate if log file not exist\n if(!file_exists($log_file))\n return true;\n \n if(!isset($logs['rotate_by']))\n throw new Exception('Please set rotate_by');\n \n if($logs['rotate_by'] == 'filesize') {\n if(!isset($logs['filesize']))\n throw new Exception('Please configure log filesize');\n\n $new_name = self::$file_name;\n\n if((filesize($log_file) / 1048576) > $logs['filesize'])\n $new_name = date(\"Y_m_d\",filemtime($log_path . self::$file_name)) .'.log';\n \n // if new name exist dont rotate\n if(file_exists($log_path . $new_name))\n return true;\n \n // rename log file\n if(!rename($log_path . self::$file_name, $log_path . $new_name))\n throw new Exception($log_path . self::$file_name . ' is not writable');\n } else {\n if(!isset($logs['interval']))\n throw new Exception ('Please configure log interval');\n \n $filetime = filemtime($log_path . self::$file_name);\n if($filetime != false) {\n $new_name = date(\"Y_m_d\",$filetime) . '.log';\n } else {\n $new_name = self::$file_name;\n }\n \n // do not rotate if file is already exist\n if(file_exists($log_path . $new_name))\n return true;\n\n $content = file($log_file);\n\n // do not rotate if file is empty\n if(!isset($content[0]))\n return true;\n \n $date = substr($content[0], 1, 10);\n $d = explode('-',$date);\n $new_name = $d[0] . '_' . $d[1] . '_' . $d[2] . '.log';\n if(file_exists($log_path . $new_name)) {\n unlink($log_path . $new_name);\n }\n $interval = $logs['interval'];\n \n $max_date = strtotime(\"+$interval day\",strtotime($date));\n $date_today = strtotime(date('Y-m-d'));\n if($max_date <= $date_today) {\n // rename log file\n if(!rename($log_path . self::$file_name, $log_path . $new_name))\n throw new Exception($log_path . self::$file_name . ' is not writable'); \n }\n \n }\n }", "function rotation($angle)\n\t{\n\t\t$this->rotation = $angle;\n\t\treturn $this;\n\t}", "public function getJWTIdentifier(){\n return $this->getKey();\n }", "function acadp_exif_rotate( $file ){\n\n\tif( ! function_exists( 'exif_read_data' ) ) {\n\t\treturn $file;\n\t}\n\n\t$exif = @exif_read_data( $file['tmp_name'] );\n\t$exif_orient = isset( $exif['Orientation'] ) ? $exif['Orientation'] : 0;\n\t$rotate_image = 0;\n\n\tif( 6 == $exif_orient ) {\n\t\t$rotate_image = 90;\n\t} else if ( 3 == $exif_orient ) {\n\t\t$rotate_image = 180;\n\t} else if ( 8 == $exif_orient ) {\n\t\t$rotate_image = 270;\n\t}\n\n\tif( $rotate_image ) {\n\n\t\tif( class_exists( 'Imagick' ) ) {\n\n\t\t\t$imagick = new Imagick();\n\t\t\t$imagick_pixel = new ImagickPixel();\n\t\t\t$imagick->readImage( $file['tmp_name'] );\n\t\t\t$imagick->rotateImage( $imagick_pixel, $rotate_image );\n\t\t\t$imagick->setImageOrientation( 1 );\n\t\t\t$imagick->writeImage( $file['tmp_name'] );\n\t\t\t$imagick->clear();\n\t\t\t$imagick->destroy();\n\n\t\t} else {\n\n\t\t\t$rotate_image = -$rotate_image;\n\n\t\t\tswitch( $file['type'] ) {\n\t\t\t\tcase 'image/jpeg' :\n\t\t\t\t\tif( function_exists( 'imagecreatefromjpeg' ) ) {\n\t\t\t\t\t\t$source = imagecreatefromjpeg( $file['tmp_name'] );\n\t\t\t\t\t\t$rotate = imagerotate( $source, $rotate_image, 0 );\n\t\t\t\t\t\timagejpeg( $rotate, $file['tmp_name'] );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'image/png' :\n\t\t\t\t\tif( function_exists( 'imagecreatefrompng' ) ) {\n\t\t\t\t\t\t$source = imagecreatefrompng( $file['tmp_name'] );\n\t\t\t\t\t\t$rotate = imagerotate( $source, $rotate_image, 0 );\n\t\t\t\t\t\timagepng( $rotate, $file['tmp_name'] );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'image/gif' :\n\t\t\t\t\tif( function_exists( 'imagecreatefromgif' ) ) {\n\t\t\t\t\t\t$source = imagecreatefromgif( $file['tmp_name'] );\n\t\t\t\t\t\t$rotate = imagerotate( $source, $rotate_image, 0 );\n\t\t\t\t\t\timagegif( $rotate, $file['tmp_name'] );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\treturn $file;\n\n}", "public function GuardarNuevaRotacion($arrayRotacion){\n global $userid,$db;\n $SQL_NuevaRotacion = \"INSERT INTO Rotaciones(Nombre,\n \tMaxEstudiantes,\n \tStatus ,\n \tcodigomateria ,\n \tIdsiq_convenio,\n \tTipoServicioRotacionId,\n \tIdsiq_institucionconvenio,\n \tFechaCreacion ,\n \tUsuarioCreacion )\n VALUES('\".$arrayRotacion[\"nombrerotacion\"].\"','\".$arrayRotacion[\"max_estudiantes\"].\"','\".$arrayRotacion[\"status\"].\"','\".$arrayRotacion[\"codigomateria\"].\"','\".$arrayRotacion[\"idconvenio\"].\"','\".$arrayRotacion[\"tiporotacion\"].\"','\".$arrayRotacion[\"idlugarrotacion\"].\"',\n NOW(),'\".$arrayRotacion[\"idusuario\"].\"')\";\n\t\t\t\t\t\t\n\t\tif($NuevaRotacion=$db->Execute($SQL_NuevaRotacion)===false){\n\t\t\t\t$a_vectt['val'] = 'FALSE';\n $a_vectt['descrip'] = 'ERROR '.$SQL_NuevaRotacion;\n echo json_encode($a_vectt);\n die;\n\t\t}\n return $db->Insert_ID();\n }", "public function rotateRight(): Orientation\n {\n return new South();\n }", "abstract public function getSnapshot();", "public static function change_image_type(){\n/**\n*\n*This function change the image type like convert png to jpg or bmp or gif\n*\n*/\npublic static function rotate()\n}", "public function getAngle()\n\t{\n\t\treturn $this->angle;\n\t}", "public function getAngle()\n {\n return $this->angle;\n }", "function getGenerateTableID(){\n\t\t \n\t\t if(!$this->tableID){\n\t\t\t\t\n\t\t\t\t$db = $this->startDB();\n\t\t\t\t$where = \"source_id = '\".$this->penelopeTabID.\"' \";\t \n\t\t\t\t$metadataString = Zend_Json::encode($this->metadata);\n\t\t\t\t$this->tableID = md5($this->penelopeTabID.$metadataString);\n\t\t\t\t\n\t\t\t\t$data = array(\"tableID\" => $this->tableID);\n\t\t\t\t$db->update(\"export_tabs_meta\", $data, $where);\n\t\t }\n\t\t \n\t\t return $this->tableID;\n\t }", "public function rotate(int $rotations);", "public function sequence() {\n\t\t\treturn $this->getClient()->get($this->sequenceName());\n\t\t}", "public function getJWTIdentifier(){\n\n return $this->getKey();\n\n }", "public function getTransformations()\n {\n return $this->transformations;\n }", "public function setRotation(array $value)\n {\n $this->rotation = self::mutateToPgArray($value);\n }", "function rotateImage($width, $height, $rotation, $quality = 8){\n\t\tif(!is_numeric($quality)){\n\t\t\treturn false;\n\t\t}\n\t\t$quality = max(min($quality, 10), 0) * 10;\n\n\t\t$dataPath = TEMP_PATH . we_base_file::getUniqueId();\n\t\t$_resized_image = we_base_imageEdit::edit_image($this->getElement('data'), $this->getGDType(), $dataPath, $quality, $width, $height, false, true, 0, 0, -1, -1, $rotation);\n\n\t\tif(!$_resized_image[0]){\n\t\t\treturn false;\n\t\t}\n\t\t$this->setElement('data', $dataPath);\n\n\t\t$this->setElement('width', $_resized_image[1], 'attrib');\n\t\t$this->setElement('origwidth', $_resized_image[1], 'attrib');\n\n\t\t$this->setElement('height', $_resized_image[2], 'attrib');\n\t\t$this->setElement('origheight', $_resized_image[2], 'attrib');\n\n\t\t$this->DocChanged = true;\n\t\treturn true;\n\t}", "public function getEncryptMetadata() {}", "public function getJWTIdentifier()\n {\n return $this->getUuidKey();\n }", "public function autoRotate() {\n $this->thumb->rotateJpg();\n return $this;\n }", "public function lastAddedRole()\n {\n return $this->tableGateway->lastInsertValue;\n }", "public function getReverseEngineeringDecryptorID()\n {\n return $this->reverseEngineeringDecryptorID;\n }", "function getAuthTimestamp()\n {\n \treturn $this->_authTimestamp;\n }", "public static function createDatabaseDriver(){\n return \\Illuminate\\Auth\\AuthManager::createDatabaseDriver();\n }", "public function getIdRol()\n {\n return $this->id_rol;\n }", "public function permissions()\n {\n return $this->belongsToMany(Permission::class, 'user_permissions')\n ->withTimestamps()\n ->withPivot(['expires_at']);\n }", "public function getPaymentAuthExpiration();", "function getDatabaseId();", "protected static function lockVersionColumn()\n {\n return 'lock_version';\n }", "public function getSequenceStrategy()\n {\n return $this->sequenceStrategy;\n }", "public function get_rol_moodle()\n { \n \n \n $this->db_encuestas->select(\"id, name\");\n\n $this->db_encuestas->order_by('name','asc');\n $query = $this->db_encuestas->get('public.mdl_role');\n \n $data_cat=0;\n $data_cat = array();\n foreach ($query->result_array() as $row)\n {\n \n $data_cat[$row['id']] = $row['name']; \n }\n $query->free_result();\n\n return $data_cat; \n }", "public function getCompressedDigitalVideoOpl()\n {\n return $this->_compressedDigitalVideoOpl;\n }", "public function setRotation($rotation)\n {\n $this->rotation = $rotation;\n return $this;\n }", "function getAuthSignature()\n {\n return $this->_authSignature;\n }", "protected function getDatabase() {}", "public function getAuth() {\r\n\t\treturn $this->_autenticacao->getIdentity();\r\n\t}", "public function index ()\n {\n $json = $this->publisher->orderByRaw('RAND()')->with(['orientation'])->get();\n $json = $json->groupBy('orientation.type');\n\n return $json;\n }", "public function Rotate($angle){\n\t\t\t$rgba = \\backbone\\Color::HexToRGBA(\"#FFFFFF\", 0);\n\t\t\t$color = $this->AllocateColor($rgba[0]['r'], $rgba[0]['g'], $rgba[0]['b'], $rgba[0]['alpha']);\n\n\t\t\t$img = new \\backbone\\Image();\n\t\t\t$img->handle = imagerotate($this->handle, $angle, $color);\n\t\t\treturn $img;\n\t\t}", "function attendance_return_passwords($session) {\n global $DB;\n\n $sql = 'SELECT * FROM {attendance_rotate_passwords} WHERE attendanceid = ? AND expirytime > ? ORDER BY expirytime ASC';\n return json_encode($DB->get_records_sql($sql, ['attendanceid' => $session->id, time()], $strictness = IGNORE_MISSING));\n}", "abstract public function rotate($amount);", "function getLastAccess()\n\t{\n\t\t$lastAccess = (int) $this->query(\"SELECT created\n\t\t\tFROM files\n\t\t\tWHERE queueID = '\" . sqlite_escape_string($this->getQueueID()) . \"'\n\t\t\tORDER BY created DESC\")->fetchSingle();\n\t\treturn $lastAccess;\n\t}", "public function get_migration_log_key(): string {\n\t\treturn $this->migration_log_key;\n\t}" ]
[ "0.71239984", "0.7122745", "0.58892494", "0.5814341", "0.570675", "0.5661033", "0.5640859", "0.5637897", "0.5549309", "0.54435694", "0.5432767", "0.54020494", "0.53324956", "0.5314636", "0.53025734", "0.53025734", "0.5269016", "0.5234195", "0.518322", "0.51822793", "0.51427394", "0.51160014", "0.51152927", "0.508188", "0.50304455", "0.50266445", "0.50132406", "0.49707952", "0.49277648", "0.4871242", "0.48546344", "0.4843162", "0.4829924", "0.4815593", "0.4815593", "0.4815593", "0.47926483", "0.47655097", "0.4750183", "0.4741816", "0.4727881", "0.47129938", "0.47021213", "0.46950078", "0.4677692", "0.4672217", "0.46715426", "0.4664916", "0.46497232", "0.46444476", "0.46306175", "0.46264714", "0.46221757", "0.46221757", "0.46188322", "0.46113312", "0.46085736", "0.46081248", "0.4607814", "0.46073472", "0.45753512", "0.45730957", "0.45717385", "0.4571341", "0.45693725", "0.45664293", "0.45642173", "0.45582524", "0.45472807", "0.45441332", "0.45427707", "0.4534943", "0.45315352", "0.45256323", "0.45212758", "0.4512264", "0.45035675", "0.4501435", "0.44799453", "0.4466789", "0.44658354", "0.445554", "0.44545263", "0.44523278", "0.44513658", "0.44477677", "0.44465715", "0.44459084", "0.44364116", "0.4429776", "0.4425637", "0.44249234", "0.44238776", "0.44235203", "0.44221243", "0.44198817", "0.44176945", "0.4416808", "0.4416405", "0.44121197" ]
0.7553048
0
set the Quaternion, added via laravelpostgres module
public function setQuaternion(array $value) { $this->quaternion = self::mutateToPgArray($value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getQuaternion()\n {\n return self::accessPgArray($this->quaternion);\n }", "public static function isQuaternion ($q) /*{{{*/\n {\n\n return $q instanceof Quaternion;\n }", "public function setQuaternionPeriod($period)\n {\n $payload = '';\n $payload .= pack('V', $period);\n\n $this->sendRequest(self::FUNCTION_SET_QUATERNION_PERIOD, $payload);\n }", "public function getQuaternion()\n {\n $result = array();\n\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_QUATERNION, $payload);\n\n $payload = unpack('f1x/f1y/f1z/f1w', $data);\n\n $result['x'] = $payload['x'];\n $result['y'] = $payload['y'];\n $result['z'] = $payload['z'];\n $result['w'] = $payload['w'];\n\n return $result;\n }", "public function setRotation($rotation) {}", "public function setRotation($rotation) {}", "public static function multReal ($q, $realnum) /*{{{*/\n {\n if (!QuaternionOp::isQuaternion($q) || !is_numeric($realnum)) {\n throw new Quaternion\\Exception(\n \"A Quaternion object and a real number are needed\"\n );\n }\n\n return new Quaternion(\n $realnum * $q->getReal(),\n $realnum * $q->getI(),\n $realnum * $q->getJ(),\n $realnum * $q->getK()\n );\n }", "public static function add ($q1, $q2) /*{{{*/\n {\n if (!QuaternionOp::isQuaternion($q1)\n || !QuaternionOp::isQuaternion($q2)\n ) {\n throw new Quaternion\\Exception(\"Parameters need to be Quaternion objects\");\n }\n\n return new Quaternion(\n $q1->getReal() + $q2->getReal(),\n $q1->getI() + $q2->getI(),\n $q1->getJ() + $q2->getJ(),\n $q1->getK() + $q2->getK()\n );\n }", "function setRotation( $r ) {\n\n // only 0,90,180,270\n if ( $r > 270 ) return;\n if ( $r % 90 != 0 ) return;\n\n $this->rotate = $r;\n $this->vertical = ( $r == 90 or $r == 270 );\n}", "public static function mult ($q1, $q2) /*{{{*/\n {\n if (!QuaternionOp::isQuaternion($q1)\n || !QuaternionOp::isQuaternion($q2)\n ) {\n throw new Quaternion\\Exception(\"Parameters need to be Quaternion objects\");\n }\n // uses the fast multiplication algorithm\n $a = $q1->getReal();\n $q1im = $q1->getAllIm();\n $b = $q1im[\"i\"];\n $c = $q1im[\"j\"];\n $d = $q1im[\"k\"];\n\n $x = $q2->getReal();\n $q2im = $q2->getAllIm();\n $y = $q2im[\"i\"];\n $z = $q2im[\"j\"];\n $w = $q2im[\"k\"];\n\n $t0 = ($d - $c) * ($z - $w);\n $t1 = ($a + $b) * ($x + $y);\n $t2 = ($a - $b) * ($z + $w);\n $t3 = ($c + $d) * ($x - $y);\n $t4 = ($d - $b) * ($y - $z);\n $t5 = ($d + $b) * ($y + $z);\n $t6 = ($a + $c) * ($x - $w);\n $t7 = ($a - $c) * ($x + $w);\n $t8 = $t5 + $t6 + $t7;\n $t9 = 0.5 * ($t4 + $t8);\n\n $r = $t0 + $t9 - $t5;\n $i = $t1 + $t9 - $t8;\n $j = $t2 + $t9 - $t7;\n $k = $t3 + $t9 - $t6;\n\n return new Quaternion($r, $i, $j, $k);\n }", "public static function inverse ($q) /*{{{*/\n {\n if (!QuaternionOp::isQuaternion($q)) {\n throw new Quaternion\\Exception(\"Parameter needs to be a Quaternion object\");\n }\n $c = QuaternionOp::conjugate($q);\n $norm = $q->norm();\n if ($norm == 0) {\n throw new Quaternion\\Exception(\n 'Quaternion norm is zero, cannot calculate inverse'\n );\n }\n $invmult = 1/$norm;\n\n return QuaternionOp::multReal($c, $invmult);\n }", "public function setRotation(array $value)\n {\n $this->rotation = self::mutateToPgArray($value);\n }", "public function rotate()\n {\n // not possible in php?\n }", "public function quartal()\n {\n \n return Carbon::$this->created_at->quarter;\n\n // $a = Carbon::now();\n // $a->month($a->month);\n // $Quarter = $a->quarter;\n \n // $date = new \\Carbon\\Carbon('-3 months');\n // $firstOfQuarter = $date->firstOfQuarter();\n // $lastOfQuarter = $date->lastOfQuarter();\n }", "public static function negate($q) /*{{{*/\n {\n if (!QuaternionOp::isQuaternion($q)) {\n throw new Quaternion\\Exception(\"Parameter needs to be a Quaternion object\");\n }\n $q2 = clone $q;\n $q2->negate();\n\n return $q2;\n }", "public function setQ($q)\n {\n $this->q = $q;\n }", "public function setQuantite($quantite)\n{\n$this->quantite = $quantite;\n\nreturn $this;\n}", "public function rotation($direction)\n\t{\n \n $direction = strtoupper($direction);\n\n $data[\"queen\"]= $this->queen_model->get_queen();\n if($data['queen']==null) {\n //error_no_queen_yet : 405\n $this->respond_errors(\"error no queen yet\",405);\n return;\n }\n $queen=$this->queen_model->mapper($data['queen']);\n\n $errors=$queen->rotate($direction);\n\n if (sizeof($errors)>0){\n //error_bad_direction_value :1\n $this->respond_errors($errors,100);\n\n }else{\n $this->queen_model->update_queen_facing($queen);\n $this->respond($queen,200);\n \n }\n\n }", "public static function conjugate($q) /*{{{*/\n {\n if (!QuaternionOp::isQuaternion($q)) {\n throw new Quaternion\\Exception(\n \"Parameter needs to be a Quaternion object\"\n );\n }\n $q2 = clone $q;\n $q2->conjugate();\n\n return $q2;\n }", "public function getQuarter()\n {\n return $this->quarter;\n }", "public function __construct($rotation)\n {\n $this->rotation = $rotation;\n }", "public function setQuotationQuote($quote)\n {\n return $this->traitSetQuotationQuote($quote);\n }", "public function getQuaternionPeriod()\n {\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_QUATERNION_PERIOD, $payload);\n\n $payload = unpack('V1period', $data);\n\n return IPConnection::fixUnpackedUInt32($payload['period']);\n }", "public function testSetSignQualite() {\n\n $obj = new AttestationCacm();\n\n $obj->setSignQualite(10);\n $this->assertEquals(10, $obj->getSignQualite());\n }", "public function set_orientation($mode){\n $this->orient=$mode;\n }", "public function pseudoinverse() : self\n {\n throw new NotImplemented('Pseudoinverse is not implemented in Tensor PHP.');\n }", "public function rotation($value) {\n return $this->setProperty('rotation', $value);\n }", "public static function sub ($q1, $q2) /*{{{*/\n {\n if (!QuaternionOp::isQuaternion($q1)\n || !QuaternionOp::isQuaternion($q2)\n ) {\n throw new Quaternion\\Exception(\"Parameters need to be Quaternion objects\");\n }\n\n return QuaternionOp::add($q1, QuaternionOp::negate($q2));\n }", "public function getRotation() {}", "public function getRotation() {}", "function rotation($angle)\n\t{\n\t\t$this->rotation = $angle;\n\t\treturn $this;\n\t}", "public function setRealations(){\n\n }", "public static function areEqual ($q1, $q2) /*{{{*/\n {\n if (!QuaternionOp::isQuaternion($q1)\n || !QuaternionOp::isQuaternion($q2)\n ) {\n throw new Quaternion\\Exception(\"Parameters need to be Quaternion objects\");\n }\n\n return ( $q1->getReal() === $q2->getReal()\n && $q1->getI() === $q2->getI()\n && $q1->getJ() === $q2->getJ()\n && $q1->getK() === $q2->getK() );\n }", "private function setSequence(): void\n {\n $this->sequence = $this->getSequence();\n }", "public function setQuantity(float $quantity)\n\t{\n\t\t$this->addKeyValue('quantity', $quantity); \n\n\t}", "public function getQuartier()\n {\n return $this->Quartier;\n }", "public function store(QustionRequest $request)\n {\n $qu = new QustionModel($request->all());\n\n $qu->qu_user=Auth::User()->id;\n $qu->qu_state='0';\n\n if( $qu->save() )\n {\n return redirect('user/panel');\n }\n }", "protected function setQ($q)\n {\n $this->q = $q;\n return $this;\n }", "public function setOrientationPeriod($period)\n {\n $payload = '';\n $payload .= pack('V', $period);\n\n $this->sendRequest(self::FUNCTION_SET_ORIENTATION_PERIOD, $payload);\n }", "public function setType( Quantifier $type ): void {\n\t\t\t$this->type = $type;\n\t\t}", "public function setMatrix($matrix) {}", "public function setMagia3Attribute($value) {\n $this->attributes['magia3'] = $this->verificaAtributo($value, true);\n }", "public function headquarter()\n {\n return $this->belongsTo(Headquarter::class, 'headquarter_id');\n }", "function insert_quartermile($data)\n\t{\n\t\tglobal $cid, $db;\n\n\t\t$sql = \"INSERT INTO \". GARAGE_QUARTERMILE_TABLE .\"\n\t\t\tSET garage_id = '$cid', rt = '\".$data['rt'].\"', sixty = '\".$data['sixty'].\"', three = '\".$data['three'].\"', eight = '\".$data['eight'].\"', eightmph = '\".$data['eightmph'].\"', thou = '\".$data['thou'].\"', quart = '\".$data['quart'].\"', quartmph = '\".$data['quartmph'].\"', date_created = '\".$data['time'].\"', rr_id = '\".$data['rr_id'].\"', date_updated = '\".$data[time].\"', pending = '\".$data['pending'].\"'\";\n\t\t\n\t\tif(!$result = $db->sql_query($sql))\n\t\t{\n\t\t\tmessage_die(GENERAL_ERROR, 'Could Not Insert Vehicle', '', __LINE__, __FILE__, $sql);\n\t\t}\n\t\n\t\t$qmid = $db->sql_nextid();\n\n\t\treturn $qmid;\n\t}", "public function getQuarter(): string\n {\n return $this->toLocalizedString('Q');\n }", "public function rotateBy($rotation) {}", "public function volumeSphere()\n { // 4/3 PI R3\n return number_format(((pow(parent::getDiametre()/2,3)*pi()*4)/3),2);\n }", "public function createQuizQuestion()\r\n{\r\n $query_string = \"INSERT INTO questions \";\r\n $query_string .= \"SET \";\r\n $query_string .= \"quizid = :quizid, \";\r\n $query_string .= \"question = :question, \";\r\n $query_string .= \"choice1 = :choice1, \";\r\n $query_string .= \"choice2 = :choice2, \";\r\n $query_string .= \"choice3 = :choice3, \";\r\n $query_string .= \"choice4 = :choice4, \";\r\n $query_string .= \"ans = :ans \";\r\n\r\n return $query_string;\r\n}", "public function qtype() \n {\n return 'scripted';\n }", "public function getMotor():float{\n\t\treturn $this->motor;\n\t}", "public function &setQuand($quand) {\n\t\t$this->notifyChanged(self::FIELD_QUAND,$this->quand,$quand);\n\t\t$this->quand=$quand;\n\t\treturn $this;\n\t}", "public function setQty($qty);", "abstract protected function initRotues();", "public function rank_math() {\n\n\t\t\tif ( ! is_admin() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( ! apply_filters( 'mts_disable_rmu', false ) ) {\n\t\t\t\tif ( ! defined( 'RMU_ACTIVE' ) ) {\n\t\t\t\t\tinclude_once $this->includes_path() . 'admin/class-mts-rmu.php';\n\t\t\t\t\tinclude_once $this->includes_path() . 'admin/class-rank-math-notice.php';\n\t\t\t\t}\n\t\t\t\t$mts_rmu = MTS_RMU::init();\n\t\t\t}\n\t\t}", "public function setOrientation($o)\n {\n $this->orientation = $o;\n }", "public static function div($q1, $q2) /*{{{*/\n {\n if (!QuaternionOp::isQuaternion($q1)\n || !QuaternionOp::isQuaternion($q2)\n ) {\n throw new Quaternion\\Exception(\"Parameters need to be Quaternion objects\");\n }\n $i2 = QuaternionOp::inverse($q2);\n\n return QuaternionOp::mult($i2, $q1);\n }", "public function set_quote(String $_quote){\n $this->_quote = $_quote;\n\n return $this;\n }", "public function testSetDroitSyncQProp() {\n\n $obj = new Collaborateurs();\n\n $obj->setDroitSyncQProp(true);\n $this->assertEquals(true, $obj->getDroitSyncQProp());\n }", "function setImageOrientation()\n\t{\n\n\t\tif ($this->width < $this->height) {\n\t\t\t$this->orientation = 'portrait';\n\t\t}\n\n\t\tif ($this->width > $this->height) {\n\t\t\t$this->orientation = 'landscape';\n\t\t}\n\n\t\tif ($this->width == $this->height) {\n\t\t\t$this->orientation = 'square';\n\t\t}\n\t}", "public function getQr()\n {\n return $this->qr;\n }", "public function setOrientation($orientation);", "public function setOrientation($orientation);", "function setQuestion( &$question )\r\n {\r\n if ( is_a( $question, \"eZQuizQuestion\" ) )\r\n $this->Question = $question;\r\n }", "public function setQr($qr)\n {\n $this->qr = $qr;\n\n return $this;\n }", "function update_quartermile($data)\n\t{\n\t\tglobal $db, $cid, $qmid;\n\n\t\t$sql = \"UPDATE \". GARAGE_QUARTERMILE_TABLE .\"\n\t\t\tSET rt = '\".$data['rt'].\"', sixty = '\".$data['sixty'].\"', three = '\".$data['three'].\"', eight = '\".$data['eight'].\"', eightmph = '\".$data['eightmph'].\"', thou = '\".$data['thou'].\"', quart = '\".$data['quart'].\"', quartmph = '\".$data['quartmph'].\"', rr_id = '\".$data['rr_id'].\"', pending = '\".$data['pending'].\"'\n\t\t\tWHERE id = '$qmid' 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 Quartermile', '', __LINE__, __FILE__, $sql);\n\t\t}\n\n\t\treturn;\n\t}", "public function __construct($instrument=1, $time_signature=\"4/4\", $time_increment=16, $tempo=120, $volume=100) { $this->instrument = $instrument;\n $this->time_signature = $time_signature;\n $this->time_increment = $time_increment;\n $this->tempo = $tempo;\n $this->volume = $volume;\n }", "public function voice()\n {\n return $this->belongsTo(Voice::class);\n }", "public function setNumerator($value): TURational\n\t{\n\t\t$value = min(max(0, $value), TBitHelper::PHP_INT32_UMAX);\n\t\tif (PHP_INT_SIZE > 4 || $value <= PHP_INT_MAX) {\n\t\t\t$this->_numerator = (int) $value;\n\t\t} else {\n\t\t\t$this->_numerator = (float) $value;\n\t\t}\n\t\treturn $this;\n\t}", "public function encodeQ($str, $position = 'text')\n {\n }", "public function setMarque($marque)\n{\n$this->marque = $marque;\n\nreturn $this;\n}", "public function setT3Hashes() {}", "public function snapToQuarter(): self\n {\n return new self(\n DatePoint::fromDate($this->startDate)->quarter()->startDate(),\n DatePoint::fromDate($this->endDate)->quarter()->endDate(),\n $this->bounds\n );\n }", "function __get_motor_torque( $drumEfficiency, $motorEfficiency, $safetyFactor, $totalForce, $driveDrum ){\n\t\t$torque = $totalForce * $driveDrum / 2000;\n\n\t\t// Multiply for drum efficacy\n\t\t$torque /= $drumEfficiency;\n\n\t\t// Multiply for motor efficiency\n\t\t$torque /= $motorEfficiency;\n\n\t\t// Multiply for safety factor\n\t\t$torque *= $safetyFactor;\n\n\t\treturn $torque * 8.850748;\n\t}", "private function RiseSetAngle()\n\t{\n\t\t//var earthRad = 6371009; // in meters\n\t\t//var angle = DegreeMath.Acos(earthRad/(earthRad+ elv));\n\t\t$angle = 0.0347 * sqrt($this->_elv); // an approximation\n\t\treturn 0.833 + $angle;\n\t}", "public function createNewQuiz ()\r\n{\r\n $query_string = \"INSERT INTO quizzes \";\r\n $query_string .= \"SET \";\r\n $query_string .= \"quizname = :quizname, \";\r\n $query_string .= \"quizdescription = :quizdescription\";\r\n\r\n return $query_string;\r\n}", "public function rotateLeft();", "public function orientation($value) {\n return $this->setProperty('orientation', $value);\n }", "public function orientation($value) {\n return $this->setProperty('orientation', $value);\n }", "public function orientation($value) {\n return $this->setProperty('orientation', $value);\n }", "public function getQuand() {\n\t\treturn $this->quand;\n\t}", "public function setUry($ury) {}", "public function setPosition() {\n }", "public function setPrix($prix)\n{\n$this->prix = $prix;\n\nreturn $this;\n}", "public function setTrigger(Duration $duration, array $parameters = null) {\n $this->instance->add($this->calendar->createProperty('TRIGGER', $duration->toString(), $parameters));\n }", "public function setQuantity(float $quantity): bool\n {\n if ($quantity < 0.0) {\n $msg = \"Quantity can not be less than 0.0\";\n \\Logger::getLogger(\\get_class($this))\n ->error(\\sprintf(__METHOD__.\" '%s'\", $msg));\n $return = false;\n $this->getErrorRegistor()->addOnSetValue(\"Quantity_not_valid\");\n } else {\n $return = true;\n }\n $this->quantity = $quantity;\n \\Logger::getLogger(\\get_class($this))\n ->debug(\\sprintf(__METHOD__.\" set to '%s'\", $this->quantity));\n return $return;\n }", "public function setName()\n {\n $this->_role->name = '奥巴马';\n }", "public function setPrix($Prix)\n{\n$this->Prix = $Prix;\nreturn $this;\n}", "public function rotate($angle) {\n\t\t$this->angle = $angle;\n\t\tparent::rotate($angle);\n\t}", "public function destroy(Quze $quze)\n {\n //\n }", "function set_product_sequence($voucher_id, $prod_id, $seq)\n\t{\n\t\t$this->db->where(array('voucher_id'=>$voucher_id, 'product_id'=>$prod_id));\n\t\t$this->db->update('vouchers_products', array('sequence'=>$seq));\n\t}", "public function setAudio($v)\n\t{\n\n\t\tif ($this->audio !== $v || $v === false) {\n\t\t\t$this->audio = $v;\n\t\t\t$this->modifiedColumns[] = MmPeer::AUDIO;\n\t\t}\n\n\t}", "public function setOrientation($orientation)\n {\n $this->fields['options']['orientation'] = $orientation;\n }", "function variant_set($variant, $value) {}", "function setSign( $value )\r\n {\r\n $this->Sign = $value;\r\n }", "public function setQuarter($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\StringValue::class);\n $this->quarter = $var;\n\n return $this;\n }", "public function setVector($vector)\n\t{\n\t\t$this->mVector = $vector;\t\n\t}", "public function setVuesequipe(array $vuesequipe): self\n {\n $this->vuesequipe = $vuesequipe;\n\n return $this;\n }", "public function testSetPrixVente3() {\n\n $obj = new Collaborateurs();\n\n $obj->setPrixVente3(10.092018);\n $this->assertEquals(10.092018, $obj->getPrixVente3());\n }", "public function setName()\n {\n $this->_role->name = '伊泽瑞尔';\n }", "public function EncodeQ ($str, $position = 'text') {\n\t // There should not be any EOL in the string\n\t $encoded = preg_replace('/[\\r\\n]*/', '', $str);\n\t\n\t switch (strtolower($position)) {\n\t case 'phrase':\n\t $encoded = preg_replace(\"/([^A-Za-z0-9!*+\\/ -])/e\", \"'='.sprintf('%02X', ord('\\\\1'))\", $encoded);\n\t break;\n\t case 'comment':\n\t $encoded = preg_replace(\"/([\\(\\)\\\"])/e\", \"'='.sprintf('%02X', ord('\\\\1'))\", $encoded);\n\t case 'text':\n\t default:\n\t // Replace every high ascii, control =, ? and _ characters\n\t //TODO using /e (equivalent to eval()) is probably not a good idea\n\t $encoded = preg_replace('/([\\000-\\011\\013\\014\\016-\\037\\075\\077\\137\\177-\\377])/e',\n\t \"'='.sprintf('%02X', ord('\\\\1'))\", $encoded);\n\t break;\n\t }\n\t\n\t // Replace every spaces to _ (more readable than =20)\n\t $encoded = str_replace(' ', '_', $encoded);\n\t\n\t return $encoded;\n\t}" ]
[ "0.6344536", "0.5792985", "0.5673246", "0.5500293", "0.5443374", "0.54419863", "0.5155063", "0.50179154", "0.49113074", "0.48843318", "0.4859933", "0.48098814", "0.4705739", "0.46259198", "0.4599543", "0.45829996", "0.45746654", "0.45424712", "0.4538877", "0.45154116", "0.446175", "0.44593722", "0.4430714", "0.44054818", "0.440139", "0.43731058", "0.43650246", "0.43614334", "0.43604678", "0.43603802", "0.43574226", "0.43413597", "0.43371966", "0.43032116", "0.42837825", "0.42696974", "0.42599508", "0.42538512", "0.425113", "0.4246685", "0.42396736", "0.42215657", "0.41950896", "0.4187923", "0.4170499", "0.41669", "0.4147541", "0.41433617", "0.4137734", "0.413667", "0.4127916", "0.4123042", "0.41129932", "0.41057494", "0.4105025", "0.4102208", "0.40877718", "0.40875563", "0.40850356", "0.40813968", "0.40740773", "0.40740773", "0.40731946", "0.40601018", "0.4059925", "0.40543884", "0.4054252", "0.40485266", "0.40485114", "0.4046528", "0.40289962", "0.40267628", "0.4010497", "0.39945674", "0.39869058", "0.39832377", "0.3982402", "0.3982402", "0.3982402", "0.39767438", "0.39720964", "0.39635998", "0.39584723", "0.3944399", "0.3943766", "0.39413202", "0.3941265", "0.39365783", "0.3936441", "0.3934916", "0.39330792", "0.39262256", "0.3922559", "0.3922548", "0.39195982", "0.391849", "0.3915863", "0.39114675", "0.391003", "0.39088792" ]
0.67807287
0
get the Quaternion, added via laravelpostgres module
public function getQuaternion() { return self::accessPgArray($this->quaternion); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getQuaternion()\n {\n $result = array();\n\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_QUATERNION, $payload);\n\n $payload = unpack('f1x/f1y/f1z/f1w', $data);\n\n $result['x'] = $payload['x'];\n $result['y'] = $payload['y'];\n $result['z'] = $payload['z'];\n $result['w'] = $payload['w'];\n\n return $result;\n }", "public function getQuaternionPeriod()\n {\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_QUATERNION_PERIOD, $payload);\n\n $payload = unpack('V1period', $data);\n\n return IPConnection::fixUnpackedUInt32($payload['period']);\n }", "public static function isQuaternion ($q) /*{{{*/\n {\n\n return $q instanceof Quaternion;\n }", "public function getRotation()\n {\n return self::accessPgArray($this->rotation);\n }", "public function getRotation() {}", "public function getRotation() {}", "public function quartal()\n {\n \n return Carbon::$this->created_at->quarter;\n\n // $a = Carbon::now();\n // $a->month($a->month);\n // $Quarter = $a->quarter;\n \n // $date = new \\Carbon\\Carbon('-3 months');\n // $firstOfQuarter = $date->firstOfQuarter();\n // $lastOfQuarter = $date->lastOfQuarter();\n }", "public static function inverse ($q) /*{{{*/\n {\n if (!QuaternionOp::isQuaternion($q)) {\n throw new Quaternion\\Exception(\"Parameter needs to be a Quaternion object\");\n }\n $c = QuaternionOp::conjugate($q);\n $norm = $q->norm();\n if ($norm == 0) {\n throw new Quaternion\\Exception(\n 'Quaternion norm is zero, cannot calculate inverse'\n );\n }\n $invmult = 1/$norm;\n\n return QuaternionOp::multReal($c, $invmult);\n }", "public static function add ($q1, $q2) /*{{{*/\n {\n if (!QuaternionOp::isQuaternion($q1)\n || !QuaternionOp::isQuaternion($q2)\n ) {\n throw new Quaternion\\Exception(\"Parameters need to be Quaternion objects\");\n }\n\n return new Quaternion(\n $q1->getReal() + $q2->getReal(),\n $q1->getI() + $q2->getI(),\n $q1->getJ() + $q2->getJ(),\n $q1->getK() + $q2->getK()\n );\n }", "public function getQr()\n {\n return $this->qr;\n }", "public function setQuaternion(array $value)\n {\n $this->quaternion = self::mutateToPgArray($value);\n }", "public function getQtos();", "public static function mult ($q1, $q2) /*{{{*/\n {\n if (!QuaternionOp::isQuaternion($q1)\n || !QuaternionOp::isQuaternion($q2)\n ) {\n throw new Quaternion\\Exception(\"Parameters need to be Quaternion objects\");\n }\n // uses the fast multiplication algorithm\n $a = $q1->getReal();\n $q1im = $q1->getAllIm();\n $b = $q1im[\"i\"];\n $c = $q1im[\"j\"];\n $d = $q1im[\"k\"];\n\n $x = $q2->getReal();\n $q2im = $q2->getAllIm();\n $y = $q2im[\"i\"];\n $z = $q2im[\"j\"];\n $w = $q2im[\"k\"];\n\n $t0 = ($d - $c) * ($z - $w);\n $t1 = ($a + $b) * ($x + $y);\n $t2 = ($a - $b) * ($z + $w);\n $t3 = ($c + $d) * ($x - $y);\n $t4 = ($d - $b) * ($y - $z);\n $t5 = ($d + $b) * ($y + $z);\n $t6 = ($a + $c) * ($x - $w);\n $t7 = ($a - $c) * ($x + $w);\n $t8 = $t5 + $t6 + $t7;\n $t9 = 0.5 * ($t4 + $t8);\n\n $r = $t0 + $t9 - $t5;\n $i = $t1 + $t9 - $t8;\n $j = $t2 + $t9 - $t7;\n $k = $t3 + $t9 - $t6;\n\n return new Quaternion($r, $i, $j, $k);\n }", "public static function conjugate($q) /*{{{*/\n {\n if (!QuaternionOp::isQuaternion($q)) {\n throw new Quaternion\\Exception(\n \"Parameter needs to be a Quaternion object\"\n );\n }\n $q2 = clone $q;\n $q2->conjugate();\n\n return $q2;\n }", "public function getQuarter()\n {\n return $this->quarter;\n }", "public static function negate($q) /*{{{*/\n {\n if (!QuaternionOp::isQuaternion($q)) {\n throw new Quaternion\\Exception(\"Parameter needs to be a Quaternion object\");\n }\n $q2 = clone $q;\n $q2->negate();\n\n return $q2;\n }", "public function getQuartier()\n {\n return $this->Quartier;\n }", "public static function sub ($q1, $q2) /*{{{*/\n {\n if (!QuaternionOp::isQuaternion($q1)\n || !QuaternionOp::isQuaternion($q2)\n ) {\n throw new Quaternion\\Exception(\"Parameters need to be Quaternion objects\");\n }\n\n return QuaternionOp::add($q1, QuaternionOp::negate($q2));\n }", "public static function multReal ($q, $realnum) /*{{{*/\n {\n if (!QuaternionOp::isQuaternion($q) || !is_numeric($realnum)) {\n throw new Quaternion\\Exception(\n \"A Quaternion object and a real number are needed\"\n );\n }\n\n return new Quaternion(\n $realnum * $q->getReal(),\n $realnum * $q->getI(),\n $realnum * $q->getJ(),\n $realnum * $q->getK()\n );\n }", "public function getQuarter(): string\n {\n return $this->toLocalizedString('Q');\n }", "public function getQ()\n {\n return $this->q;\n }", "public function getQuartier($id) {\n $quartier;\n $q = $this->_db->query('SELECT * FROM QUARTIER WHERE ID_QUARTIER = \"'.$id.'\"');\n\n $quartier = $q->fetch();\n return $quartier;\n }", "public function getTransactionValue() {\n return $this->mutation_amount * $this->mutation_price;\n }", "public function getQuand() {\n\t\treturn $this->quand;\n\t}", "public function getQuantity(): float;", "private function getQuarterMission($quarter){\n if(!isset($this->quarterMissions[$quarter])){\n return new QuarterMission($quarter,0,0);\n }\n\n return $this->quarterMissions[$quarter];\n }", "public function getFunction($q){\r\t\t$this->connect();\t//connect if not connected \r\t\t$res=sqlite_fetch_array (sqlite_query($this->handle,$q));\r\t\treturn $res[\"0\"];\r\t}", "public function getMu() : GMP\n {\n return $this->mu;\n }", "public function getM3()\n {\n return $this->m3;\n }", "public function getMotor():float{\n\t\treturn $this->motor;\n\t}", "public function getOrientation();", "public function getZ() : ?float ;", "private function _createTransformQuery()\n\t{\n\t\treturn craft()->db->createCommand()\n\t\t\t->select('id, name, handle, mode, position, height, width, format, quality, dimensionChangeTime')\n\t\t\t->from('assettransforms')\n\t\t\t->order('name');\n\t}", "public static function div($q1, $q2) /*{{{*/\n {\n if (!QuaternionOp::isQuaternion($q1)\n || !QuaternionOp::isQuaternion($q2)\n ) {\n throw new Quaternion\\Exception(\"Parameters need to be Quaternion objects\");\n }\n $i2 = QuaternionOp::inverse($q2);\n\n return QuaternionOp::mult($i2, $q1);\n }", "public function getZ() {}", "public function getCor():string{\n return $this->cor;\n }", "public function getQuantite()\n{\nreturn $this->quantite;\n}", "public function magic3() { return $this->_m_magic3; }", "public function GetLvlQAs()\n {\n return $this->lvlQAs;\n }", "public static function areEqual ($q1, $q2) /*{{{*/\n {\n if (!QuaternionOp::isQuaternion($q1)\n || !QuaternionOp::isQuaternion($q2)\n ) {\n throw new Quaternion\\Exception(\"Parameters need to be Quaternion objects\");\n }\n\n return ( $q1->getReal() === $q2->getReal()\n && $q1->getI() === $q2->getI()\n && $q1->getJ() === $q2->getJ()\n && $q1->getK() === $q2->getK() );\n }", "public function get_degree()\n {\n\n return $this->db->get('ACADEMIC_DEGREES_NEXT')->result();\n\n }", "public function get_quote(){ return $this->_quote;}", "public function volumeSphere()\n { // 4/3 PI R3\n return number_format(((pow(parent::getDiametre()/2,3)*pi()*4)/3),2);\n }", "public function getQSelo()\n {\n return $this->qSelo;\n }", "public function getQuantite()\n {\n return $this->quantite;\n }", "public function getVolPondasiM3()\n {\n return $this->vol_pondasi_m3;\n }", "public function headquarter()\n {\n return $this->belongsTo(Headquarter::class, 'headquarter_id');\n }", "public function getSignatureQualite() {\n return $this->signatureQualite;\n }", "public function getSignatureQualite() {\n return $this->signatureQualite;\n }", "public function getFaqsequence () {\n\t$preValue = $this->preGetValue(\"faqsequence\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->faqsequence;\n\treturn $data;\n}", "public function qtype() \n {\n return 'scripted';\n }", "public function getOrientation()\r\n {\r\n return $this->_orientation;\r\n }", "public function getOrientation() {\n\t\treturn $this->orientation;\n\t}", "public function getMaterial() : ?string ;", "public function getOrientation()\n {\n return $this->orientation;\n }", "public function getOrientation()\n {\n return $this->orientation;\n }", "public function getQtde()\n {\n return $this->qtde;\n }", "public function voice()\n {\n return $this->belongsTo(Voice::class);\n }", "public function getSp3()\n {\n return $this->sp3;\n }", "function sequence_value() {\n\t\treturn $this->data[$this->sequence_field];\n\t}", "public function getOrientation()\n {\n $result = array();\n\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_ORIENTATION, $payload);\n\n $payload = unpack('v1roll/v1pitch/v1yaw', $data);\n\n $result['roll'] = IPConnection::fixUnpackedInt16($payload['roll']);\n $result['pitch'] = IPConnection::fixUnpackedInt16($payload['pitch']);\n $result['yaw'] = IPConnection::fixUnpackedInt16($payload['yaw']);\n\n return $result;\n }", "public function firstQuotation()\n {\n $quotations = (array)$this->quotations();\n\n if (isset($quotations[0])) {\n $this->quotationElected = $quotations[0];\n return $quotations[0];\n }\n\n return null;\n }", "public function getRandomQuiz(){\n // dd('here');\n $quiz = Quiz::inRandomOrder()->first();\n return $quiz;\n }", "public function getQt(){\n\t\tglobal $db;\n\t\t$sql = $db->prepare(\"SELECT COUNT(*) as qt FROM project01_roms\");\n\t\t$sql->execute();\n\t\tif ($sql->rowCount()>0) {\n\t\t\t\t$sql = $sql->fetch();\n\t\t\t\t$this->qt = $sql[0];\n\t\t\t}\n\t\treturn $this->qt;\n\t}", "public function getPriorQuarterData() {\n\t\t$dates = getPeriods('PriorQuarter');\n\t\treturn $this->getDataByInterval($dates['startMonth'], $dates['startYear'], $dates['endMonth'], $dates['endYear'], 3);\n\t}", "public function getQuotationQuote()\n {\n return $this->traitGetQuotationQuote();\n }", "public function getMtPhase(): ?float {\n return $this->mtPhase;\n }", "public function getQuarter()\n {\n if ($this->quarter === null) {\n $this->quarter = RegionReportingDate::ensure($this->center->region, $this->reportingDate)->getQuarter();\n }\n\n return $this->quarter;\n }", "public function getQuote()\n\t{\n\t\treturn $this->quote;\n\t}", "public function luas()\n {\n return $this->panjang * $this->lebar;\n }", "function readOrientation() { return $this->_orientation;}", "public function model()\n {\n return QuotationDestination::class;\n }", "public function getAngle()\n {\n return $this->angle;\n }", "abstract public function getUnitOfMaterial(): string;", "public function getQuote() {\n return $this->quote;\n }", "function getOrientation() { return $this->readOrientation(); }", "public function getQuote() {\n return $this->quote;\n }", "public function getQteEnt() {\n return $this->qteEnt;\n }", "public function getExpr3()\n {\n return $this->expr3;\n }", "public function getQ()\n\t{\n\t\treturn $this->cq;\n\t}", "function getOrientation() { return $this->readOrientation(); }", "public function getRandomOrientation() {\n\t\treturn self::$orientation[rand(0,1)];\n\t}", "public function getAngle(): float\n {\n return $this->angle;\n }", "function unity_query_editor_animation() {\r\n $gender = func_arg(0);\r\n $lilo_mongo = new LiloMongo();\r\n $lilo_mongo->selectDB('Assets');\r\n $lilo_mongo->selectCollection('Animation');\r\n $data = $lilo_mongo->command_values(array(\"distinct\" => \"Animation\", \"key\" => \"animation_file\", \"query\" => array(\"gender\" => $gender, \"permission\" => \"default\")));\r\n $output = array();\r\n foreach ($data['values'] as $dt) {\r\n $output[] = str_replace(\".unity3d\", \"\", $dt);\r\n }\r\n return json_encode($output);\r\n}", "public function getTransactionThreeDomainServerPAREQ()\n {\n return $this->transactionThreeDomainServerPAREQ;\n }", "public function getAngle()\n\t{\n\t\treturn $this->angle;\n\t}", "function readOrientation() { return $this->_orientation; }", "public function getQuantity()\n\t{\n\t\treturn $this->getKeyValue('quantity'); \n\n\t}", "function getMinuteQuarter(int $minute)\n{\n if ($minute >= 60 or $minute < 0) {\n throw new InvalidArgumentException('The value should be from 0 to 59 included. You entered ' . $minute);\n } else if ($minute > 0 and $minute <= 15) {\n $result = 'first';\n } else if ($minute > 15 and $minute <= 30) {\n $result = 'second';\n } else if ($minute > 30 and $minute <= 45) {\n $result = 'third';\n } else {\n $result = 'fourth';\n }\n\n return $result;\n}", "public function quotation()\n {\n return $this->belongsTo('App\\Quotation');\n }", "public function getCurrentTransformationMatrix() {}", "function __get_motor_torque( $drumEfficiency, $motorEfficiency, $safetyFactor, $totalForce, $driveDrum ){\n\t\t$torque = $totalForce * $driveDrum / 2000;\n\n\t\t// Multiply for drum efficacy\n\t\t$torque /= $drumEfficiency;\n\n\t\t// Multiply for motor efficiency\n\t\t$torque /= $motorEfficiency;\n\n\t\t// Multiply for safety factor\n\t\t$torque *= $safetyFactor;\n\n\t\treturn $torque * 8.850748;\n\t}", "public function getSignatureQualiteCode() {\n return $this->signatureQualiteCode;\n }", "public function getQuantity();", "public function getQuantity();", "public function getQuantity();", "public function rotate()\n {\n // not possible in php?\n }", "protected function genQuery(){\n $secretKey = $this->store->getSecretAccessKey();\n \n unset($this->options['Signature']);\n $this->options['Timestamp'] = $this->genTime();\n $this->options['Signature'] = $this->_signParameters($this->options, $secretKey);\n return $this->_getParametersAsString($this->options);\n }", "public function getTrA(): ?float {\n return $this->trA;\n }", "public function qrcode()\n {\n return $this->belongsTo('App\\Qrcode');\n }" ]
[ "0.73574585", "0.59466577", "0.584074", "0.57292306", "0.5579293", "0.55788434", "0.55208576", "0.54182774", "0.53547114", "0.52363765", "0.5175883", "0.51389223", "0.51015633", "0.5082251", "0.5080502", "0.5073387", "0.50435126", "0.5016796", "0.5013673", "0.49547917", "0.49290565", "0.48848283", "0.48139095", "0.4799773", "0.4783857", "0.47212338", "0.47148806", "0.47073427", "0.47054183", "0.47042572", "0.46982783", "0.46818322", "0.4669671", "0.46163887", "0.46116373", "0.45917347", "0.45458558", "0.45306584", "0.4523052", "0.45113093", "0.45106682", "0.4506622", "0.4503017", "0.45023173", "0.45007384", "0.44988805", "0.44741246", "0.4469043", "0.4469043", "0.44675052", "0.44625255", "0.4450877", "0.44491693", "0.4446269", "0.44444424", "0.44444424", "0.44337404", "0.44332516", "0.44330522", "0.4430386", "0.4428654", "0.44193724", "0.44174013", "0.44127592", "0.44069925", "0.43919277", "0.43836", "0.43832925", "0.4381648", "0.43687725", "0.4368247", "0.43600842", "0.43544194", "0.43529987", "0.43402573", "0.43270746", "0.43209487", "0.43208727", "0.43138942", "0.431169", "0.4308948", "0.4304386", "0.43036935", "0.4301419", "0.43006766", "0.42897224", "0.42822978", "0.42755866", "0.42705998", "0.4267538", "0.42672276", "0.42660844", "0.42550096", "0.42535436", "0.42535436", "0.42535436", "0.42488134", "0.4244203", "0.42435977", "0.42422163" ]
0.796481
0
set the objects to hide, added via laravelpostgres module
public function sethiddenObj(array $value) { $this->hiddenbuildings = self::mutateToPgArray($value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setHidden(){\n $this->_hidden = true;\n }", "public function hideExtraField()\n {\n $this->houses=false;\n $this->jobs_training=false;\n $this->motorcycles =false;\n $this->cars = false;\n $this->offices=false;\n $this->lands_plots=false;\n return;\n }", "function hide()\n {\n $this->_hidden = true;\n }", "public function hide();", "public function be_hidden() {\n return $this->belongsToMany('App\\Topic', 'hide_topic', 'topic_id', 'user_id')->withTimestamps();\n }", "public function withHidden($hidden=true);", "public function hide() {\n\t\treturn true;\n\t}", "public function hide() {\n\t\treturn true;\n\t}", "public function setVisibility() {}", "function setTypeAsHidden() {\n\t\t$this->type = \"hidden\";\n\t}", "function hideExhibit(){\n\t\t$this->setVisible('0');\n\t\t$res = requete_sql(\"UPDATE exhibit SET visible = '\".$this->visible.\"' WHERE id = '\".$this->id.\"' \");\n\t\tif ($res) {\n\t\t\treturn TRUE;\n\t\t}\n\t\telse{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function setInvisibleFlag($invisible = true) {}", "public function getHideInList() {}", "protected function hideFieldsForAddEdit()\n\t{\n\t\tif ($this->isAdd() || $this->isCopy() || $this->isGridAdd())\n\t\t\t$this->document_sequence->Visible = FALSE;\n\t}", "public function setHiddenFlag($hidden = true) {}", "public function disableHideMetaboxes()\n\t\t{\n\t\t\techo \"<style type='text/css'>label[for='\" . $this->_id . \"-hide'] { display: none; }</style>\";\n\t\t}", "public function setHidden($value = TRUE);", "function hideField($fieldName){\n\n\t\t$this->hidden[$fieldName] = \"hide\";\n\n\t}", "private function add_model_visibility()\n {\n }", "function isHidden()\r\n\t{\r\n\t\t$db\t\t\t\t=& JFactory::getDBO();\r\n\t\tif ($db != $this->getDb()) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn parent::isHidden();\r\n\t}", "public function isHidden() {\n return false;\n }", "public function onlyOnDetail()\n {\n parent::onlyOnDetail();\n\n $this->showOnIndex = false;\n $this->showOnDetail = true;\n $this->showOnCreation = false;\n $this->showOnUpdate = false;\n $this->showOnReplicate = false;\n $this->showOnAttach = false;\n $this->showOnLens = false;\n $this->showOnDashboard = false;\n\n return $this;\n }", "function unhide_kitchensink( $args ) {\n$args['wordpress_adv_hidden'] = false;\nreturn $args;\n}", "protected function setupShowOperation()\n {\n $this->crud->set('show.setFromDb', false);\n\n CRUD::addColumn([\n 'name' => 'description',\n 'label' => 'Description',\n 'type' => 'string'\n ]);\n\n $this->crud->addColumn([\n 'name' => 'items',\n 'label' => 'Code Items',\n 'type' => 'table',\n 'columns' => [\n 'description' => 'Description',\n 'show_is_visible' => 'Is Visible'\n ]\n ]);\n\n CRUD::addColumn([\n 'name' => 'is_visible',\n 'label' => 'Is Visible',\n 'type' => 'boolean'\n ]);\n }", "public function setHidden($hidden) {\n\t\t$this->hidden = $hidden;\n\t}", "public function setHidden($hidden) {\n\t\t$this->hidden = $hidden;\n\t}", "static function listHiddenExhibit(){\n\t\t$res = requete_sql(\"SELECT id FROM exhibit WHERE visible = FALSE ORDER BY creation_date ASC\");\n\t\t$res = $res->fetchAll(PDO::FETCH_ASSOC);\n\t\t$list = array();\n\t\tforeach ($res as $exhibit) {\n\t\t\t$exhibit = new Exhibit($exhibit['id']);\n\t\t\tarray_push($list, $exhibit);\n\t\t}\n\t\treturn $list;\n\t}", "public static function hidden()\n {\n return [];\n }", "function drush_hide_output_fields($fields_to_hide = array()) {\n $already_hidden = drush_get_context('DRUSH_HIDDEN_OUTPUT_FIELDS');\n if (!is_array($fields_to_hide)) {\n $fields_to_hide = array($fields_to_hide);\n }\n $result = array_merge($already_hidden, $fields_to_hide);\n drush_set_context('DRUSH_HIDDEN_OUTPUT_FIELDS', $result);\n return $result;\n}", "public function hide_arrows() {\n\t\t$this->options['controls'] = array( 'hide_arrows' );\n\t}", "public function getHidden(): bool;", "public function toggleUnVisibleDiscontIdAll()\n {\n $user_id = \\Auth::user()->id;\n $users = User::where('user_id', $user_id)->get();\n foreach($users as $user)\n {\n $user->makeUnVisibleDiscontId();\n\n } \n return redirect()->back();\n \n }", "public function hideFromIndex(): Field\n {\n $this->showOnList = false;\n\n return $this;\n }", "public function isHidden();", "public function isHidden();", "public function isHidden();", "public function isHidden();", "public function exceptOnForms()\n {\n $this->showOnIndex = true;\n $this->showOnDetail = true;\n $this->showOnCreation = false;\n $this->showOnUpdate = false;\n $this->showOnReplicate = false;\n $this->showOnAttach = false;\n $this->showOnLens = true;\n $this->showOnDashboard = true;\n\n return $this;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden() {\r\n return false;\r\n }", "public function isHidden() {\r\n return false;\r\n }", "public function resetBooleans()\n {\n $this->setShowSize(false);\n $this->setShowDescription(false);\n $this->setShowExtension(false);\n $this->setShowLastUpdate(false);\n }", "public function hidden(User $user,$bool = true)\n {\n if($this->isUser($user)) {\n $this->users()->updateExistingPivot($user->id,[\n \"hidden\" => $bool\n ]);\n return $this->save();\n }\n }", "public function isHidden(): bool\n {\n return false;\n }", "public function hide()\n {\n $this->_saveDraft(true);\n return $this;\n }", "public function isHidden()\r\n {\r\n return false;\r\n }", "public function isHidden()\r\n {\r\n return false;\r\n }", "public function isHidden()\r\n {\r\n return false;\r\n }", "function hide_or_show_contributorstalbe($post_type, $post){\n\t\tadd_meta_box('wiki-table-hide-or-show',__('Show / Hide Wiki-Contribution Table'),array($this,'wiki_shown_hidden'),'incsub_wiki','advanced','high');\n\t}", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n {\n return false;\n }", "public function isHidden()\n\t{\n\t\t$hiddenModules = array('servermanager','serverclient','users','groups','modules','postfixadmin');\n\t\treturn in_array($this->name, $hiddenModules);\n\t}", "public function filterVisible(): self;", "public function isBrowsable() {}", "public function setupVisibility();", "protected function unsetHiddenModules() {}", "public static function setNoHideSecrets (){\n self::$hideSecrets = null;\n }", "public function onExtbaseQueryFilter(ModifyQueryBeforeFetchingObjectDataEvent $e): void\n {\n $query = $e->getQuery();\n $source = $query->getSource();\n if (! $source instanceof Selector) {\n return;\n }\n \n if (! $this->visibilityAspect->includeHiddenOfTable($source->getSelectorName())) {\n return;\n }\n \n $settings = $query->getQuerySettings();\n $settings->setIgnoreEnableFields(true);\n $settings->setEnableFieldsToBeIgnored(['disabled']);\n }", "function toggleFieldSets($toggle){\n\n\t\t$this->fieldSets=$toggle;\n\n\t}", "function th_hide_meta_box($hidden, $screen)\n {\n if ('themo_room' == $screen->post_type) {\n\n //lets hide everything\n $hidden = array('postexcerpt', 'slugdiv', 'postcustom', 'trackbacksdiv', 'commentstatusdiv', 'commentsdiv', 'authordiv', 'revisionsdiv');\n //$hidden[] = 'my_custom_meta_box';//for custom meta box, enter the id used in the add_meta_box() function.\n }\n return $hidden;\n }", "public function discardPreviewColumns();", "function is_hidden() {\n trigger_error('Admin class does not implement method <strong>is_hidden()</strong>', E_USER_WARNING);\n return;\n }", "public function isHidden() {\n\t\t// return true to hide this column (used for column appendants)\n\t\treturn false;\n\t}", "public function isHidden() {\n\t\t// return true to hide this column (used for column appendants)\n\t\treturn false;\n\t}", "public function hide(array $fields)\n {\n $this->withoutFields = $fields;\n return $this;\n }", "function ctools_export_crud_disable($table, $object) {\r\n return ctools_export_crud_set_status($table, $object, TRUE);\r\n}", "function th_hide_meta_box($hidden, $screen)\n {\n if ('themo_tour' == $screen->post_type) {\n\n //lets hide everything\n $hidden = array('postexcerpt', 'slugdiv', 'postcustom', 'trackbacksdiv', 'commentstatusdiv', 'commentsdiv', 'authordiv', 'revisionsdiv');\n //$hidden[] = 'my_custom_meta_box';//for custom meta box, enter the id used in the add_meta_box() function.\n }\n return $hidden;\n }", "public function makeHidden(array $attributes): self\n {\n $this->addHidden($attributes);\n\n return $this;\n }", "function unhide_kitchensink( $args ) {\n\t$args['wordpress_adv_hidden'] = false;\n\treturn $args;\n}", "public function addHidden(array $attributes)\n {\n $this->visible = \\array_diff($this->visible, $attributes);\n\n $this->hidden = \\array_unique(\\array_merge($this->hidden, $attributes));\n\n }", "public function hide_content()\n\t{\n\t\t$this->hide_content = true;\n\t\treturn $this;\n\t}", "public function isHidden()\r\n\t{\r\n\t\treturn false;\r\n\t}", "public function hide($hide = false)\n {\n $this->data['hide'] = $hide;\n return $this;\n }", "public function isBrowsable() {\n return true;\n }", "public function disable();", "public function hideUserAction( $header_data, $post_data ){\n if( empty($post_data['user_id']) ) {\n Library::logging('alert',\"API : hideUser : \".ERROR_INPUT.\": user_id : \".$header_data['id']);\n Library::output(false, '0', ERROR_INPUT, null);\n }\n try{\n $user = Users::findById( $header_data[\"id\"] );\n \n $query = \"return db.users.find( { '_id' : ObjectId('\".$post_data['user_id'].\"'), 'is_active' : 1 } ).toArray()\" ;\n $db = Library::getMongo();\n $user_info = $db->execute( $query );\n if($user_info['ok'] == 0) {\n Library::logging('error',\"API : hideUser , mongodb error: \".$user_info['errmsg'].\" \".\": user_id : \".$header_data['id']);\n Library::output(false, '0', ERROR_REQUEST, null);\n }\n if( empty($user_info[\"retval\"][0]) ){\n Library::logging('error',\"API : hideUser : Invalid user to hide : user_id : \".$header_data['id']);\n Library::output(false, '0', \"Invalid user to hide.\", null);\n }\n if( empty($user->hidden_contacts) ){\n $user->hidden_contacts = array();\n }\n if( array_search($post_data['user_id'], $user->hidden_contacts ) === false ){\n $user->hidden_contacts[] = $post_data['user_id'];\n }\n if( $user->save() ){\n Library::output(true, '0', USER_HIDDEN, null);\n }else{\n foreach ($user->getMessages() as $message) {\n $errors[] = $message->getMessage();\n }\n Library::logging('error',\"API : hideUser : \".$errors.\" user_id : \".$header_data['id']);\n Library::output(false, '0', $errors, null);\n }\n } catch (Exception $e) {\n Library::logging('error',\"API : hideUser, error message : \".$e->getMessage(). \": user_id : \".$header_data['id']);\n Library::output(false, '0', ERROR_REQUEST, null);\n }\n }", "public function makeHidden( $attributes )\n\t{\n\t\treturn $this->each( function ( $model ) use ( $attributes )\n\t\t{\n\t\t\t$model->addHidden( $attributes );\n\t\t} );\n\t}", "public function showForAll() {\n $classes = ['hide'];\n foreach ($this->sizes as $size) {\n $classes[] = \"hide-for-$size\";\n $classes[] = \"hide-for-$size-only\";\n $classes[] = \"show-for-$size\";\n $classes[] = \"show-for-$size-only\";\n }\n $this->cssClasses()->remove($classes);\n return $this;\n }", "public function getHidden(){\n return $this->_hidden;\n }", "function hideField($fieldname)\n\t{\n\t\tif (is_array($fieldname))\n\t\t{\n\t\t\tforeach($fieldname as $name)\n\t\t\t{\n\t\t\t\t$this->hideField($fieldname);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (isset($this->table->fields[$fieldname]))\n\t\t\t{\n\t\t\t\t$this->table->fields[$fieldname]->listshow = false;\n\t\t\t\t$this->table->fields[$fieldname]->formshow = false;\n\t\t\t}\n\t\t\telse\n\t\t\t\ttrigger_error(\"No field exists with the name: $fieldname\");\n\t\t}\n\t}", "public function withHidden( $attributes )\n\t{\n\t\treturn $this->makeVisible( $attributes );\n\t}", "function block_editor_meta_box_hidden_fields()\n {\n }", "public function getHiddenFlag() {}", "function forceFields(){\n foreach($this->xset->desc as $fn=>&$fd){\n if (in_array($fn, self::$bfields)){\n $fd->browsable = 1;\n } else {\n $fd->browsable = 0;\n }\n }\n }" ]
[ "0.65488935", "0.6460402", "0.6178803", "0.6092422", "0.59349227", "0.5798503", "0.5689672", "0.5689672", "0.568746", "0.5684192", "0.5659607", "0.55946773", "0.55700934", "0.55563074", "0.55540293", "0.5506603", "0.54227203", "0.54172444", "0.53950393", "0.53776145", "0.533281", "0.5329205", "0.5320592", "0.52999204", "0.5298088", "0.5298088", "0.5274946", "0.52420574", "0.5237814", "0.52377045", "0.52361536", "0.52240634", "0.52199566", "0.5219414", "0.5219414", "0.5219414", "0.5219414", "0.52009684", "0.5197472", "0.5173559", "0.5173559", "0.51614034", "0.51434284", "0.5137568", "0.5134258", "0.51338226", "0.51338226", "0.51338226", "0.51283365", "0.51192904", "0.51192904", "0.51192904", "0.51192904", "0.51192904", "0.51192904", "0.51192904", "0.51192904", "0.51192904", "0.51192904", "0.51192904", "0.51192904", "0.51192904", "0.51192904", "0.51192904", "0.51192904", "0.51192904", "0.51192904", "0.51183045", "0.5117483", "0.511025", "0.51043457", "0.5103187", "0.5090558", "0.508685", "0.50847745", "0.50757575", "0.5075668", "0.50732136", "0.5061389", "0.5061389", "0.5057937", "0.50546086", "0.5052595", "0.5048035", "0.50428015", "0.50372165", "0.5030237", "0.50187933", "0.4997014", "0.49961987", "0.49932998", "0.49899834", "0.49878237", "0.49869776", "0.49845845", "0.49831095", "0.49830735", "0.4972518", "0.4969442", "0.495098" ]
0.51082134
70
get the objects to hide, added via laravelpostgres module
public function gethiddenObj() { return self::accessPgArray($this->hiddenbuildings); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function listHiddenExhibit(){\n\t\t$res = requete_sql(\"SELECT id FROM exhibit WHERE visible = FALSE ORDER BY creation_date ASC\");\n\t\t$res = $res->fetchAll(PDO::FETCH_ASSOC);\n\t\t$list = array();\n\t\tforeach ($res as $exhibit) {\n\t\t\t$exhibit = new Exhibit($exhibit['id']);\n\t\t\tarray_push($list, $exhibit);\n\t\t}\n\t\treturn $list;\n\t}", "public function getHideInList() {}", "public function be_hidden() {\n return $this->belongsToMany('App\\Topic', 'hide_topic', 'topic_id', 'user_id')->withTimestamps();\n }", "public function getRemovedObjects() {}", "public function objects() {\n \t// return call_user_func_array($this->belongsToMany('Object')->withPivot, static::$pivotColumns);\n return $this->belongsToMany('Object')\n ->withPivot('subdivision', 'time', 'place', 'form');\n }", "public static function hidden()\n {\n return [];\n }", "public function getHiddens()\n {\n return $this->filterDatas(function ($data) {\n return isset($data->hidden) && $data->hidden;\n });\n }", "public function getObjects()\n {\n return $this->hasMany(Object::className(), ['address_id' => 'id']);\n }", "function getObjects() {\n return $this->objects;\n }", "public abstract function getObjects();", "public function index()\n {\n return $this->showList(ObjectMuseum::where('deleted','=',ObjectMuseum::ACTIVE)->get());\n }", "public function get_all_exclude_id(){\n $data = get_object_vars($this);\n unset($data[\"id\"]);\n return $data;\n }", "public function getList()\n {\n \treturn $this->model->where('is_base', '=', 0)->get();\n }", "function FindAll( $orderby = \"id ASC\", $exclude=true )\n\t{\n\t\t// Let's speed up this query and exclude the blob fields... too much memory for nothing. \n\t\tif ( $exclude ) {\n\t\t\treturn MyActiveRecord::FindBySql('Items', \"SELECT id, name, display_name, content, template, display_order, sku, price, taxonomy, public, public2, date_created, date_revised FROM items ORDER BY $orderby\");\n\t\t} else {\n\t\t\treturn MyActiveRecord::FindAll('Items'); \n\t\t}\n\t}", "public function get_hidden_columns()\n {\n return array();\n }", "public function get_hidden_columns()\n {\n return array();\n }", "public function get_hidden_columns()\r\n {\r\n return array();\r\n }", "public function index()\n {\n return Plugin::where(['is_deleted' => 0])->get();\n }", "public function get_for_admin()\n\t{\n\t\t$return_array = array();\n\t\t$r = $this->where('deleted',NULL)->get_all();\n\n\t\tforeach($r as $key=>$value)\n\t\t{\n\t\t\t$return_array[$value->id]=$value->name;\n\t\t}\n\n\t\treturn $return_array;\n\n\t}", "public function index()\n {\n $drops = Drop::orderby('created_at', 'desc')->with(['campaign', 'ticket_count', 'question_gate'])->paginate(15);\n return $drops;\n }", "abstract protected function loadExposedObjects();", "function getObjectives() {\n return Engine::send('getObjectives');\n}", "public function get_hidden_columns() {\n\t\treturn array();\n\t}", "public function showMany($pks){\n return $this->model->findMany($pks);\n }", "public function blogs()\n {\n return $this->morphedByMany(Blog::class, 'mediable');\n }", "public function get_hidden_columns()\n\t{\n\t\treturn array();\n\t}", "public function getObjects()\n {\n return $this->objects;\n }", "public function get_instances() {\n\n\n }", "function getAll($hide='')\n\t{\n\t\tif ($hide != '') {\n\t\t\treturn Currency::where('id', '!=', $hide)->orderBy('name', 'asc')->get();\n\t\t}\n\n\t\treturn Currency::orderBy('name', 'asc')->get();\n\t}", "protected function hiddenColumns(): array\n {\n return [];\n }", "public function getAddedObjects() {}", "public function getHiddenFields()\n {\n return [\n 'createdAt',\n 'updatedAt',\n 'version',\n 'locale'\n ];\n }", "public function findForList()\n {\n return $this->findByShowInOverview(true);\n }", "public function imagenes() {\n return $imagenes = ImagenesProducto::where('fk_producto',$this->codigo) -> orderBy('featured','desc') -> get(); //para mostrar las imagenes ordenadas por las destacada\n }", "function get_hidden_columns($screen)\n {\n }", "public function getModels();", "public function getModels();", "public function objects()\n {\n return $this->hasMany(LdapObject::class, 'domain_id');\n }", "public function expose() {\n return get_object_vars($this);\n }", "public function all(){\n return Estoque::orderBy('id', 'asc')->get();\n }", "static public function showOnlyNotTargetVisits(){\n $registro = static::leftJoin(\"users\",\"visitors.user_id\",\"=\",\"users.id\")\n ->join('handling_times',\"visitors.handling_time_id\",\"=\",\"handling_times.id\")\n ->join('direction_tickets',\"visitors.direction_ticket_id\",\"=\",\"direction_tickets.id\")\n ->join('directions',\"direction_tickets.direction_id\",\"=\",\"directions.id\")\n ->join('sectors',\"directions.sector_id\",\"=\",\"sectors.id\")\n ->select('visitors.id','first_name','last_name','identification_card','phone','sector','input')\n ->where('output','=',null)\n ->orderBy('visitors.id', 'DESC')\n ->paginate(30);;\n return $registro;\n }", "public function index()\n {\n $products = ProductsModel::where('is_deleted', 0)->orderBy('inmr_hash', 'desc')->get();\n return Reference::collection($products);;\n }", "public function filterVisible(): self;", "public function exemplars()\n {\n return $this->morphMany(Exemplar::class,'exemplarable');\n }", "public function showAll()\n {\n }", "public function get_hidden_columns()\r\n\t{\r\n\t\treturn [ ];\r\n\t}", "public function shows()\n {\n return $this->belongsToMany(Show::class);\n }", "function listObjects();", "public function index()\n {\n return Gallery::latest()->with('images','user','comments.user')->paginate(6);\n }", "public function index()\n {\n return Article::where('visible',1)->with(['user:id,name','category:id,visible,category_title'])->get();\n }", "public function getModelGalleries($id) {\n\n return GalleryModel::select('galleries.id', 'galleries.name', 'galleries.slug', DB::raw(\"IF(galleries.price, galleries.price, 0) as galleryPrice\"), DB::raw(\"(SELECT a1.mediaMeta FROM attachment a1 WHERE a1.parent_id=galleries.id AND a1.main='yes' AND a1.media_type='\" . GalleryModel::IMAGE . \"' LIMIT 1) as previewMeta\"), DB::raw(\"(SELECT a2.mediaMeta FROM attachment a2 WHERE a2.parent_id=galleries.id AND a2.media_type='\" . GalleryModel::IMAGE . \"' AND a2.status='\".AttachmentModel::ACTIVE.\"' LIMIT 1 ) as subImage\"), 'galleries.type')\n ->where('galleries.ownerId', $id)\n ->where('galleries.status', '!=', GalleryModel::INVISIBLESTATUS)\n ->where('galleries.type', GalleryModel::IMAGE)\n ->paginate(6);\n }", "public function showall()\n {\n }", "public function databaseObjects() {\n \t$out = '';\n \t$objects = Application::availableObjects();\n \tforeach($objects as $object) {\n \t\t$out .= \"[\\\"\".$object.\"\\\"], \";\n \t}\n \treturn substr($out, 0, -2);\n }", "protected function getAllVisible()\n {\n $col = 'visible';\n $result = $this->db->newQuery('select', $this->table)\n ->addWhere()\n ->Equals($col)\n ->makeStatement()\n ->Bind($col, [$col => 1])\n ->FetchAll();\n\n return ($result) ?: null;\n }", "public function viewAll()\n {\n return $this->product->all();\n \n }", "public function getDiagnosaformItems()\n {\n return Yii::app()->db->createCommand('SELECT diagnosa_id, diagnosa_nama FROM diagnosa_m WHERE diagnosa_aktif=TRUE')->queryAll();\n }", "public function list()\n\t{\n\t\treturn $this->widgets()->orderBy('order')->get();\n\t}", "public function all()\n {\n return Product::orderBy('id', 'desc')->get();\n \n }", "public function findAll()\n {\n return DatabaseBackup::where('status', 1)\n ->where('user_id', Auth::user()->id)\n ->orderBy('id','desc')\n ->get();\n }", "protected function getCollectedRecords() {}", "protected function getCollectedRecords() {}", "protected function getCollectedRecords() {}", "public function showcases()\n {\n return $this->morphedByMany(Portfolio::class, 'taggable', 'taxonomy_relationships')->withTimestamps();\n }", "public function getWithViewDetails(): Collection\n {\n return $this->getBuilder()->withCount('databases')->with('node')->get();\n }", "public function getIgnoreItems(): array;", "public function getNovelties( ) {\n\t $novelties = Product::where('ebook', 0)\n\t ->orderBy('created_at', 'desc')\n\t ->take(6)\n\t ->with('image')\n\t ->with('author')\n\t ->where( 'amount', '>', 0 )\n\t ->get();\n\t return $novelties;\n }", "public function getObjects()\n {\n throw new Exception('To be implemented');\n }", "public function views()\n {\n// $database = $cg->getConnection()->getDatabaseName();\n// return $this->hasMany('App\\Models\\Craiglorious\\View', $database.'.views', 'role_id','view_id');\n //can not do this as the system // or should i?\n //return $this->hasMany('App\\Models\\Craiglorious\\View');\n }", "public function index()\n {\n /*$itemPool = ItemPoolName::pluck('CodeName');*/\n $new_items = RefObjCommon::join('_ItemPoolName', '_RefObjCommon.CodeName128', '!=', '_ItemPoolName.CodeName')\n ->where('CodeName128', '!=', 'DUMMY_OBJECT')\n ->get();\n dd($new_items);\n }", "public function videos()\n {\n return $this->morphedByMany('App\\Video', 'taggable');\n }", "public function getWidgetList()\n { \n $widgets = HomePageWidget::where('status', HomePageWidget::ACTIVE)->where('type', HomePageWidget::TYPE_SLIDER)->orderBy('id', 'asc')->take(3)->get();\n return $widgets;\n }", "function getArticleObjects() \t{\n \t\treturn $this->articles;\n \t}", "public function hide();", "function deletableResources(){\n\n return $this->resourcesByPermission('delete');\n }", "public function getHidden(): bool;", "public static function getModules()\n\t{\n\t\treturn (new \\App\\Db\\Query())->select(['vtiger_tab.tabid', 'vtiger_tab.tablabel', 'tabname' => 'vtiger_tab.name'])->from('vtiger_field')\n\t\t\t->innerJoin('vtiger_tab', 'vtiger_field.tabid = vtiger_tab.tabid')->where(['uitype' => [15, 16, 33, 115], 'vtiger_field.presence' => [0, 2], 'vtiger_tab.presence' => 0])\n\t\t\t->distinct('vtiger_tab.tabid')->orderBy(['vtiger_tab.tabid' => SORT_ASC])->createCommand()->queryAllByGroup(1);\n\t}", "public function getObjectivesList() {\n return $this->_get(9);\n }", "public static function getListado(){\n return Dispositivo::model()->findAll();\n }", "function getInspectors($conn){\n\t$sql = \"SELECT * FROM inspector\";\n\t\n\t$sth = $conn->prepare($sql);\n\t$sth->execute();\n\t\n\t$rows = array();\n\t\n\twhile($r = $sth->fetch(PDO::FETCH_ASSOC)) {\n\t\t$rows[] = $r;\n\t}\n\treturn $rows;\n\t\n}", "public function getBlacklistContacts()\n {\n $blacklist = BlackListContact::select(['id', 'numbers'])->where('user_id', Auth::guard('client')->user()->id)->get();\n return Datatables::of($blacklist)\n ->addColumn('action', function ($bl) {\n return '\n <a href=\"#\" class=\"btn btn-danger btn-xs cdelete\" id=\"' . $bl->id . '\"><i class=\"fa fa-trash\"></i> ' . language_data(\"Delete\") . '</a>';\n })\n ->addColumn('id', function ($bl) {\n return \"<div class='coder-checkbox'>\n <input type='checkbox' class='deleteRow' value='$bl->id'/>\n <span class='co-check-ui'></span>\n </div>\";\n\n })\n ->escapeColumns([])\n ->make(true);\n }", "function get_dropins()\n {\n }", "public function admin_get_dbs() {}", "public function getAll()\n {\n // return Addon::orderBy('id','DESC')->get();\n return Addon::where('store_id',Auth::user()->id)->orderBy('id','DESC')->get();\n }", "public function indexProducts() {\n // $prods = Product::all() -> where('deleted', false);\n //secondo modo (ORM Eloquent)\n //$prods = Product::where('deleted', false) -> get();\n // terzo modo (Query builder)\n $prods = DB::table('products') -> where('deleted', false) -> get();\n return view('products.index', compact('prods'));\n }", "protected function getFieldsFromShowItem() {}", "public function getHidden(){\n return $this->_hidden;\n }", "public function getInstances() {\n\t\t$instances = array();\n\t\tforeach ($this->objects as $objectName => $information) {\n\t\t\tif (isset($information['i'])) {\n\t\t\t\t$instances[$objectName] = $information['i'];\n\t\t\t}\n\t\t}\n\t\treturn $instances;\n\t}", "public function listVisuels()\n {\n $result = DB::table('panneauxes')\n ->join('clients', 'clients.code', '=', 'panneauxes.idclient')\n ->join('campagnes', 'campagnes.code', '=', 'panneauxes.idcampagne')\n ->join('coms', 'coms.id', '=', 'panneauxes.idcommune')\n ->join('regies', 'regies.code', '=', 'panneauxes.idregie')\n ->select(\n 'panneauxes.idPanneaux as id',\n 'panneauxes.emplacement as emplacement',\n 'panneauxes.partdevoix as partdevoix',\n 'panneauxes.latittude as latitude',\n 'panneauxes.longitude',\n 'panneauxes.image',\n 'clients.Raison_Soc as client',\n 'campagnes.libelle as campagne',\n 'coms.name as commune',\n 'regies.Raison_Soc as regie'\n )\n ->get();\n return $result;\n }", "function get_hidden_meta_boxes($screen)\n {\n }", "public function getData(){\n return Offer::select('id','name')->get();\n }", "public function get_all(){\n return get_object_vars($this);\n }", "public function posts()\n {\n \treturn $this->morphedByMany(Post::class, 'videoable');\n }", "public function index()\n {\n $barters = \\App\\Product::with('barters')->has('barters', '>', 0)->get();\n\n return $barters;\n }", "public abstract function fetchAllObjects();", "function get_hidden_columns( ) {\r\n\t\t$columns = get_user_option( 'managemedia_page_' . MLACore::ADMIN_PAGE_SLUG . 'columnshidden' );\r\n\r\n\t\tif ( is_array( $columns ) ) {\r\n\t\t\tforeach ( $columns as $index => $value ){\r\n\t\t\t\tif ( empty( $value ) ) {\r\n\t\t\t\t\tunset( $columns[ $index ] );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$columns = self::$default_hidden_columns;\r\n\t\t}\r\n\r\n\t\treturn apply_filters( 'mla_list_table_get_hidden_columns', $columns );\r\n\t}", "public function getAllFieldsExcludingAPI ($toExclude = array()) {\n $obj = $this->owner;\n\n // All Field Names\n $fieldNames = array_merge(\n array_keys($obj->allDatabaseFields()),\n array_keys($obj->hasOne()),\n array_keys($obj->hasMany())\n );\n\n // Removed fields in $toExclude\n $fieldNames = array_diff($fieldNames, $toExclude);\n\n return $obj->getFieldsForAPI($fieldNames);\n }", "public function show(Bookedescort $bookedescort)\n {\n return Bookedescort::with(['tour','escort'])->where('tour_id',$id)->get(); \n }", "public abstract function getObjects():?object ;", "public function index()\n {\n $items = Item::with([\n 'gender:id,name',\n 'type:id,name',\n 'supplier:id,name',\n 'image',\n ])->get()->toArray();\n return $items;\n }", "public function show(){\n\t\t$sql= $this->link->query(\"SELECT * FROM social\");\n\t\treturn $sql;\n\t}" ]
[ "0.6411051", "0.63848597", "0.5919522", "0.59082866", "0.59073645", "0.5786537", "0.57796", "0.5646574", "0.5623248", "0.5618635", "0.56067735", "0.55228066", "0.5508177", "0.5506867", "0.5497145", "0.5497145", "0.54460114", "0.54138184", "0.53985816", "0.53952736", "0.5391586", "0.5341344", "0.533835", "0.5325333", "0.5320295", "0.53177017", "0.52937394", "0.528906", "0.5288529", "0.5283419", "0.52799284", "0.52695787", "0.5264092", "0.52553093", "0.52244395", "0.52149314", "0.52149314", "0.5210666", "0.52015185", "0.5192035", "0.5186088", "0.51830083", "0.5175", "0.51707876", "0.5170783", "0.51653945", "0.5163383", "0.51518565", "0.5143119", "0.514086", "0.5135551", "0.51331824", "0.5121346", "0.51141596", "0.51115555", "0.5093422", "0.5093292", "0.5093022", "0.5092473", "0.50916827", "0.5091272", "0.5091272", "0.5083385", "0.5080126", "0.50800246", "0.50775415", "0.5076104", "0.50717044", "0.5069935", "0.50555843", "0.50440335", "0.5038804", "0.50380945", "0.50361276", "0.50357795", "0.5034421", "0.5029153", "0.5018398", "0.50157917", "0.5014781", "0.50136757", "0.5007172", "0.5003002", "0.49976978", "0.4997096", "0.499462", "0.49932572", "0.49928683", "0.49924627", "0.49860066", "0.49841398", "0.4980245", "0.49785128", "0.49782962", "0.49772263", "0.49767098", "0.49744034", "0.4972465", "0.49687114", "0.49680948" ]
0.5490272
16
set the vector objects to hide , added via laravelpostgres module
public function sethiddenObjLow(array $value) { $this->hiddenbuildingsLow = self::mutateToPgArray($value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hideExtraField()\n {\n $this->houses=false;\n $this->jobs_training=false;\n $this->motorcycles =false;\n $this->cars = false;\n $this->offices=false;\n $this->lands_plots=false;\n return;\n }", "public function setHidden(){\n $this->_hidden = true;\n }", "public function setInvisibleFlag($invisible = true) {}", "public function setVisibility() {}", "function hide()\n {\n $this->_hidden = true;\n }", "protected function addVirtualColumns()\n {\n \n }", "function setVisable() {\n $visable = array(\n //type // length // default // NotNull // Indexed // Sequence/Auto // unique // default value\n 'integer' => array( 1,1,1,1,1,1,0),\n 'decimal' => array( 1,1,1,1,0,1,0.0),\n 'float' => array( 1,1,1,1,0,1,0.0),\n 'double' => array( 1,1,1,1,0,1,0),\n 'text' => array( 1,1,1,1,0,1,''),\n 'cblob' => array( 1,0,0,0,0,0),\n 'blob' => array( 1,0,0,0,0,0),\n 'boolean' => array( 1,1,1,1,0,0),\n 'date' => array( 0,1,1,1,0,1,''),\n 'timestamp'=> array( 0,1,1,1,0,1,''),\n 'time' => array( 0,1,1,1,0,1,'')\n );\n \n $vis = $visable[$this->type];\n foreach(array('length','default','notnull','isIndex','sequence','unique') as $k=>$v) {\n if ($vis[$k]) {\n $this->widgets[$v]->show();\n $this->visable[$v] = 1;\n } else {\n $this->widgets[$v]->hide();\n $this->visable[$v] = 0;\n }\n }\n // hide defaults for sequences.\n //print_r(array($this->sequence,$vis[4]));\n if ($this->sequence && $vis[4]) {\n unset($this->default);\n $this->widgets['default']->hide();\n $this->visable['default'] = 0;\n $this->widgets['notnull']->set_active(true);\n $this->notnull = 1;\n $this->widgets['isIndex']->set_active(true);\n $this->isIndex = 1;\n }\n // set defaults if not null and !sequence and it's empty.\n if ($this->notnull && !$this->sequence && !strlen(@$this->default)) {\n $this->default = $vis[6];\n $this->widgets['default']->set_text($this->default);\n }\n \n if ($this->visable['default'] && \n isset($this->default) && \n $this->default == '' && \n isset($vis[6]) && \n ($this->default !== $vis[6])) \n {\n $this->default = $vis[6];\n $this->widgets['default']->set_text($this->default);\n }\n \n \n }", "private function add_model_visibility()\n {\n }", "public function hide();", "public function getInvisibleFlag() {}", "public function setupVisibility();", "function hideExhibit(){\n\t\t$this->setVisible('0');\n\t\t$res = requete_sql(\"UPDATE exhibit SET visible = '\".$this->visible.\"' WHERE id = '\".$this->id.\"' \");\n\t\tif ($res) {\n\t\t\treturn TRUE;\n\t\t}\n\t\telse{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function videPanier()\n {\n $this->CollProduit->vider();\n }", "function setTypeAsHidden() {\n\t\t$this->type = \"hidden\";\n\t}", "public function sethiddenObj(array $value)\n {\n $this->hiddenbuildings = self::mutateToPgArray($value);\n }", "private function desabilitaPoolIdsObjetosManipulados()\n {\n \t// setando para null o atributo _arrayObjetosManipulados\n \t$this->_arrayObjetosManipulados = null;\n }", "public function initVenueratings()\n\t{\n\t\t$this->collVenueratings = new PropelObjectCollection();\n\t\t$this->collVenueratings->setModel('Venuerating');\n\t}", "public function resetBooleans()\n {\n $this->setShowSize(false);\n $this->setShowDescription(false);\n $this->setShowExtension(false);\n $this->setShowLastUpdate(false);\n }", "protected function hideFieldsForAddEdit()\n\t{\n\t\tif ($this->isAdd() || $this->isCopy() || $this->isGridAdd())\n\t\t\t$this->document_sequence->Visible = FALSE;\n\t}", "public function be_hidden() {\n return $this->belongsToMany('App\\Topic', 'hide_topic', 'topic_id', 'user_id')->withTimestamps();\n }", "function deactivate_one_viewer() {\n\n}", "public function withHidden($hidden=true);", "public function disableHideMetaboxes()\n\t\t{\n\t\t\techo \"<style type='text/css'>label[for='\" . $this->_id . \"-hide'] { display: none; }</style>\";\n\t\t}", "public function setHiddenFlag($hidden = true) {}", "function opensky_islandora_view_object_alter (&$object, &$rendered) {\n // dpm (\"VIEW_OBJECT_ALTER\");\n // dpm ($object->models[0]);\n // dpm ($rendered);\n\n}", "public function hide_arrows() {\n\t\t$this->options['controls'] = array( 'hide_arrows' );\n\t}", "public function getHideInList() {}", "public function filterVisible(): self;", "public function toggleUnVisibleDiscontIdAll()\n {\n $user_id = \\Auth::user()->id;\n $users = User::where('user_id', $user_id)->get();\n foreach($users as $user)\n {\n $user->makeUnVisibleDiscontId();\n\n } \n return redirect()->back();\n \n }", "protected function setupShowOperation()\n {\n $this->crud->set('show.setFromDb', false);\n\n CRUD::addColumn([\n 'name' => 'description',\n 'label' => 'Description',\n 'type' => 'string'\n ]);\n\n $this->crud->addColumn([\n 'name' => 'items',\n 'label' => 'Code Items',\n 'type' => 'table',\n 'columns' => [\n 'description' => 'Description',\n 'show_is_visible' => 'Is Visible'\n ]\n ]);\n\n CRUD::addColumn([\n 'name' => 'is_visible',\n 'label' => 'Is Visible',\n 'type' => 'boolean'\n ]);\n }", "public function addHidden(array $attributes)\n {\n $this->visible = \\array_diff($this->visible, $attributes);\n\n $this->hidden = \\array_unique(\\array_merge($this->hidden, $attributes));\n\n }", "public function removeUnusedObjects()\n {\n // Setze ein Array mit used-Einträgen auf false\n $entries = $this->crossReferenceTable->getAll();\n $used = [];\n foreach ($entries as $objectNumber => $value) {\n $used[$objectNumber] = false;\n }\n $used[0] = true; // Eintrag Nummer 0 muss existieren.\n\n // Laufe alle Referenzen durch\n $this->findIndirectReferences($this->trailerDictionary, $used);\n\n // Entferne nicht genutzte Objekte\n foreach ($used as $objectNumber => $objectUsed) {\n if (!$objectUsed) {\n $this->crossReferenceTable->removeEntry($objectNumber);\n //echo \"Removed Object $objectNumber\\n\";\n }\n }\n }", "public function discardPreviewColumns();", "protected function getHiddenFacets(): array {\n return [];\n }", "function unhide_kitchensink( $args ) {\n$args['wordpress_adv_hidden'] = false;\nreturn $args;\n}", "public static function hidden()\n {\n return [];\n }", "public function disableStaticPreview()\n {\n $this->staticPreview = false;\n }", "public function htheme_remove_default_elements(){\r\n\r\n\t\t/*vc_remove_element(\"vc_row\");*/\r\n\t\tvc_remove_element(\"vc_cta_button2\");\r\n\t\tvc_remove_element(\"vc_button2\");\r\n\t\tvc_remove_element(\"vc_masonry_media_grid\");\r\n\t\tvc_remove_element(\"vc_masonry_grid\");\r\n\t\tvc_remove_element(\"vc_masonry_grid\");\r\n\t\tvc_remove_element(\"vc_media_grid\");\r\n\t\tvc_remove_element(\"vc_basic_grid\");\r\n\t\tvc_remove_element(\"vc_cta\");\r\n\t\tvc_remove_element(\"vc_btn\");\r\n\t\tvc_remove_element(\"vc_custom_heading\");\r\n\t\tvc_remove_element(\"vc_empty_space\");\r\n\t\tvc_remove_element(\"vc_line_chart\");\r\n\t\tvc_remove_element(\"vc_round_chart\");\r\n\t\tvc_remove_element(\"vc_pie\");\r\n\t\tvc_remove_element(\"vc_raw_js\");\r\n\t\tvc_remove_element(\"vc_raw_html\");\r\n\t\tvc_remove_element(\"vc_video\");\r\n\t\tvc_remove_element(\"vc_widget_sidebar\");\r\n\t\tvc_remove_element(\"vc_tta_pageable\");\r\n\t\tvc_remove_element(\"vc_tta_accordion\");\r\n\t\tvc_remove_element(\"vc_tta_tour\");\r\n\t\tvc_remove_element(\"vc_tta_tabs\");\r\n\t\tvc_remove_element(\"vc_gallery\");\r\n\t\tvc_remove_element(\"vc_gallery\");\r\n\t\tvc_remove_element(\"vc_text_separator\");\r\n\t\t//vc_remove_element(\"vc_icon\");\r\n\t\t//vc_remove_element(\"vc_column_text\");\r\n\t\tvc_remove_element(\"vc_button\");\r\n\t\tvc_remove_element(\"vc_posts_slider\");\r\n\t\tvc_remove_element(\"vc_gmaps\");\r\n\t\tvc_remove_element(\"vc_teaser_grid\");\r\n\t\tvc_remove_element(\"vc_progress_bar\");\r\n\t\tvc_remove_element(\"vc_facebook\");\r\n\t\tvc_remove_element(\"vc_tweetmeme\");\r\n\t\tvc_remove_element(\"vc_googleplus\");\r\n\t\tvc_remove_element(\"vc_facebook\");\r\n\t\tvc_remove_element(\"vc_pinterest\");\r\n\t\tvc_remove_element(\"vc_message\");\r\n\t\tvc_remove_element(\"vc_posts_grid\");\r\n\t\tvc_remove_element(\"vc_carousel\");\r\n\t\tvc_remove_element(\"vc_flickr\");\r\n\t\tvc_remove_element(\"vc_tour\");\r\n\t\tvc_remove_element(\"vc_separator\");\r\n\t\tvc_remove_element(\"vc_single_image\");\r\n\t\tvc_remove_element(\"vc_cta_button\");\r\n\t\tvc_remove_element(\"vc_accordion\");\r\n\t\tvc_remove_element(\"vc_accordion_tab\");\r\n\t\tvc_remove_element(\"vc_toggle\");\r\n\t\tvc_remove_element(\"vc_tabs\");\r\n\t\tvc_remove_element(\"vc_tab\");\r\n\t\tvc_remove_element(\"vc_images_carousel\");\r\n\t\tvc_remove_element(\"vc_wp_archives\");\r\n\t\tvc_remove_element(\"vc_wp_calendar\");\r\n\t\tvc_remove_element(\"vc_wp_categories\");\r\n\t\tvc_remove_element(\"vc_wp_custommenu\");\r\n\t\tvc_remove_element(\"vc_wp_links\");\r\n\t\tvc_remove_element(\"vc_wp_meta\");\r\n\t\tvc_remove_element(\"vc_wp_pages\");\r\n\t\tvc_remove_element(\"vc_wp_posts\");\r\n\t\tvc_remove_element(\"vc_wp_recentcomments\");\r\n\t\tvc_remove_element(\"vc_wp_rss\");\r\n\t\tvc_remove_element(\"vc_wp_search\");\r\n\t\tvc_remove_element(\"vc_wp_tagcloud\");\r\n\t\tvc_remove_element(\"vc_wp_text\");\r\n\t\tvc_remove_element(\"woocommerce_cart\");\r\n\t\tvc_remove_element(\"woocommerce_checkout\");\r\n\t\tvc_remove_element(\"woocommerce_order_tracking\");\r\n\t\tvc_remove_element(\"woocommerce_my_account\");\r\n\t\tvc_remove_element(\"recent_products\");\r\n\t\tvc_remove_element(\"featured_products\");\r\n\t\tvc_remove_element(\"product\");\r\n\t\tvc_remove_element(\"products\");\r\n\t\tvc_remove_element(\"add_to_cart\");\r\n\t\tvc_remove_element(\"add_to_cart_url\");\r\n\t\tvc_remove_element(\"product_page\");\r\n\t\tvc_remove_element(\"product_category\");\r\n\t\tvc_remove_element(\"product_categories\");\r\n\t\tvc_remove_element(\"sale_products\");\r\n\t\tvc_remove_element(\"best_selling_products\");\r\n\t\tvc_remove_element(\"top_rated_products\");\r\n\t\tvc_remove_element(\"product_attribute\");/**/\r\n\t}", "public function setHidden($value = TRUE);", "public function fixVisibleButWithoutCategoryAndInConfigurable()\n {\n $visibilityAttribute = $this->eavConfig->getAttribute(Mage_Catalog_Model_Product::ENTITY, 'visibility');\n $select = $this->_getWriteAdapter()->select();\n $select->join(['data_index' => $this->getMainTable()], 'data_index.entity_id = attribute.entity_id', []);\n $select->where('attribute.attribute_id = ?', $visibilityAttribute->getId());\n $select->where('data_index.is_in_configurable = ?', 1);\n $select->where('data_index.is_in_category = ?', 0);\n $select->where('data_index.visibility <> ?', Mage_Catalog_Model_Product_Visibility::VISIBILITY_NOT_VISIBLE);\n $select->columns([\n 'value' => new Zend_Db_Expr(Mage_Catalog_Model_Product_Visibility::VISIBILITY_NOT_VISIBLE)\n ]);\n $this->_getWriteAdapter()->query($select->crossUpdateFromSelect(\n ['attribute' => $visibilityAttribute->getBackendTable()]\n ));\n\n Mage::getSingleton('index/indexer')\n ->getProcessByCode('catalog_category_product')\n ->reindexAll();\n \n Mage::getSingleton('index/indexer')\n ->getProcessByCode('catalog_product_flat')\n ->reindexAll();\n }", "final function velcom(){\n }", "public function onlyOnLens()\n {\n $this->showOnIndex = false;\n $this->showOnDetail = false;\n $this->showOnCreation = false;\n $this->showOnUpdate = false;\n $this->showOnReplicate = false;\n $this->showOnAttach = false;\n $this->showOnLens = true;\n $this->showOnDashboard = false;\n\n return $this;\n }", "public function getHiddenFlag() {}", "public function clearVenueratings()\n\t{\n\t\t$this->collVenueratings = null; // important to set this to NULL since that means it is uninitialized\n\t}", "function th_hide_meta_box($hidden, $screen)\n {\n if ('themo_tour' == $screen->post_type) {\n\n //lets hide everything\n $hidden = array('postexcerpt', 'slugdiv', 'postcustom', 'trackbacksdiv', 'commentstatusdiv', 'commentsdiv', 'authordiv', 'revisionsdiv');\n //$hidden[] = 'my_custom_meta_box';//for custom meta box, enter the id used in the add_meta_box() function.\n }\n return $hidden;\n }", "public function setNoViewFlag($noView = true) {}", "public function setPublic()\n {\n $this->private = false;\n }", "public function negados(): void\n {\n $dados['title'] = 'Negados';\n $dados['procedimentos'] = $this->Procedimentos->porPaciente(['negado_por !=' => NULL]);\n\n $this->view('regulacao/procedimentos/Negados_view', $dados);\n }", "public function setDispFields() {}", "protected function hiddenColumns(): array\n {\n return [];\n }", "function _prepareVertexTypes() {\n\t\t//Load Model of Relations\n\t\t$this->loadModel('VertexType');\n\t\t$this->VertexType = new VertexType();\n\t\t\n\t\t$this->VertexType->contain();\n\t\t$vertexTypes = $this->VertexType->find('list', array('conditions' => array('VertexType.deleted' => '0'), 'order' => 'VertexType.title'));\n\t\t$this->set(compact('vertexTypes',$vertexTypes));\n\t}", "public function init()\r\n {\r\n parent::init();\r\n $this->visible = true;\r\n $this->descriptionashint = true;\r\n $this->active = false;\r\n }", "public function isHidden();", "public function isHidden();", "public function isHidden();", "public function isHidden();", "function free_vietnam_visa($data) {\r\n $data['page_meta'] = get_page_meta(ADVERTISING_PROMOTION_ADS_PAGE, null);\r\n \r\n $data = get_page_navigation($data, $data['is_mobile'], ADVERTISING_PROMOTION_ADS_PAGE);\r\n \r\n $data['countries'] = $this->Visa_Model->get_nationalities(true);\r\n \r\n $data['main_view'] = load_view('advertising/free_visa', $data, $data['is_mobile']);\r\n \r\n return $data;\r\n }", "public function getHidden(): bool;", "function hide_attributes_data_panel( $tabs) {\n\t\n\t// Other default values for 'attribute' are; general, inventory, shipping, linked_product, variations, advanced\n\t$tabs['attribute']['class'][] = 'hide_if_rental hide_if_variable_rental';\n\n\treturn $tabs;\n\n}", "public function hide() {\n\t\treturn true;\n\t}", "public function hide() {\n\t\treturn true;\n\t}", "public function getNoViewFlag() {}", "function hydrate() : void;", "function hide_cv_media_overlay_view( $args ) {\n\t\t// Bail if this is not the admin area.\n\t\tif ( ! is_admin() ) {\n\t\t\treturn $args;\n\t\t}\n\n\t\t$args['meta_query'] = array(\n\t\t\tarray(\n\t\t\t\t'key' => '_part_of_gallery',\n\t\t\t\t'compare' => 'NOT EXISTS',\n\t\t\t)\n\t\t);\n\n\t\treturn $args;\n\t}", "function th_hide_meta_box($hidden, $screen)\n {\n if ('themo_room' == $screen->post_type) {\n\n //lets hide everything\n $hidden = array('postexcerpt', 'slugdiv', 'postcustom', 'trackbacksdiv', 'commentstatusdiv', 'commentsdiv', 'authordiv', 'revisionsdiv');\n //$hidden[] = 'my_custom_meta_box';//for custom meta box, enter the id used in the add_meta_box() function.\n }\n return $hidden;\n }", "function toggleFieldSets($toggle){\n\n\t\t$this->fieldSets=$toggle;\n\n\t}", "public function hidden(User $user,$bool = true)\n {\n if($this->isUser($user)) {\n $this->users()->updateExistingPivot($user->id,[\n \"hidden\" => $bool\n ]);\n return $this->save();\n }\n }", "public function setIsVirtual($isVirtual);", "public static function setNoHideSecrets (){\n self::$hideSecrets = null;\n }", "public function addVisible(array $attributes): void\n {\n $this->hidden = \\array_diff($this->hidden, $attributes);\n\n $this->visible = \\array_unique(\\array_merge($this->visible, $attributes));\n }", "public function withHidden( $attributes )\n\t{\n\t\treturn $this->makeVisible( $attributes );\n\t}", "private function getCleanTables() {\n\t\tunset($this->_vm_product);\n\t\tunset($this->product_id);\n\t\tunset($this->product_sku);\n\t\tunset($this->product_in_stock);\n\t}", "public function disableView(){ \r\n\t\t$this->_auto_render = false;\r\n\t}", "public function isHidden() {\n return false;\n }", "function forceFields(){\n foreach($this->xset->desc as $fn=>&$fd){\n if (in_array($fn, self::$bfields)){\n $fd->browsable = 1;\n } else {\n $fd->browsable = 0;\n }\n }\n }", "public function makeHidden(array $attributes): self\n {\n $this->addHidden($attributes);\n\n return $this;\n }", "static public function showOnlyNotTargetVisits(){\n $registro = static::leftJoin(\"users\",\"visitors.user_id\",\"=\",\"users.id\")\n ->join('handling_times',\"visitors.handling_time_id\",\"=\",\"handling_times.id\")\n ->join('direction_tickets',\"visitors.direction_ticket_id\",\"=\",\"direction_tickets.id\")\n ->join('directions',\"direction_tickets.direction_id\",\"=\",\"directions.id\")\n ->join('sectors',\"directions.sector_id\",\"=\",\"sectors.id\")\n ->select('visitors.id','first_name','last_name','identification_card','phone','sector','input')\n ->where('output','=',null)\n ->orderBy('visitors.id', 'DESC')\n ->paginate(30);;\n return $registro;\n }", "public function extra_voor_verp()\n\t{\n\t}", "public function prepareShow()\n {\n $this->location();\n $this->type;\n $this->amenityIds();\n $this->utilityIds();\n $this->reviewCount();\n $this->user->location();\n $this->user->profilePicture();\n $this->user->reviewCount();\n $this->reviews = $this->reviews()->select('reviews.*')->withReviewer()->get();\n $this->coordinates;\n $this->imageRoutes();\n $this->image_ids = $this->images->pluck('id');\n }", "public function getVotosNegativos()\n {\n return $this->getVotos()->where(['positivo' => false]);\n }", "function __construct()\n {\n $this\n ->setOpacity(1.0)\n ->setUpdatedAt(new \\DateTime('now'))\n ->setActive(false)\n ;\n }", "function block_editor_meta_box_hidden_fields()\n {\n }", "abstract public function hidupkan();", "static function listHiddenExhibit(){\n\t\t$res = requete_sql(\"SELECT id FROM exhibit WHERE visible = FALSE ORDER BY creation_date ASC\");\n\t\t$res = $res->fetchAll(PDO::FETCH_ASSOC);\n\t\t$list = array();\n\t\tforeach ($res as $exhibit) {\n\t\t\t$exhibit = new Exhibit($exhibit['id']);\n\t\t\tarray_push($list, $exhibit);\n\t\t}\n\t\treturn $list;\n\t}", "public function __construct() {\n parent::__construct ();\n $this->setHiddenCustomer ( [ 'id','is_active','creator_id','updator_id','created_at','updated_at' ] );\n }", "public function get_hidden_columns()\n {\n return array();\n }", "public function get_hidden_columns()\n {\n return array();\n }", "public function setConditionallyHidden($flag)\n {\n $this->_isConditionallyHidden = $flag;\n }", "public function isHidden(): bool\n {\n return false;\n }", "public function get_hidden_columns()\r\n {\r\n return array();\r\n }", "function recreateSdeCompatViews() {\n global $LM_EVEDB; \n \n //blueprints\n if (!checkIfTableExists('yamlBlueprintTypes')) db_uquery(\"CREATE OR REPLACE VIEW `$LM_EVEDB`.`yamlBlueprintTypes` AS\n SELECT `typeID` as `blueprintTypeID`, `maxProductionLimit` FROM `$LM_EVEDB`.`industryBlueprints`\");\n \n if (!checkIfTableExists('yamlBlueprintProducts')) db_uquery(\"CREATE OR REPLACE VIEW `$LM_EVEDB`.`yamlBlueprintProducts` AS\n SELECT \n iap.`typeID` AS `blueprintTypeID`,\n iap.`productTypeID`,\n iap.`activityID`,\n iapr.`probability`,\n iac.`time`\n FROM `$LM_EVEDB`.`industryActivityProducts` iap\n LEFT JOIN `$LM_EVEDB`.`industryActivityProbabilities` iapr\n ON iap.`typeID`=iapr.`typeID` AND iap.`activityID`=8\n JOIN `$LM_EVEDB`.`industryActivity` iac\n ON iap.`typeID`=iac.`typeID` AND iac.`activityID`=iap.`activityID`;\");\n \n if (!checkIfTableExists('yamlBlueprintMaterials')) db_uquery(\"CREATE OR REPLACE VIEW `$LM_EVEDB`.`yamlBlueprintMaterials` AS\n SELECT `typeID` AS `blueprintTypeID`,\n `materialTypeID`,\n `quantity`,\n `activityID`,\n 0 AS `consume`\n FROM `$LM_EVEDB`.`industryActivityMaterials`;\");\n \n if (!checkIfTableExists('yamlBlueprintSkills')) db_uquery(\"CREATE OR REPLACE VIEW `$LM_EVEDB`.`yamlBlueprintSkills` AS\n SELECT `typeID` AS `blueprintTypeID`,\n `activityID`,\n `skillID` AS `skillTypeID`,\n `level`\n FROM `$LM_EVEDB`.`industryActivitySkills`;\");\n \n if (!checkIfTableExists('invBlueprintTypes')) recreateLegacyTables();\n if (!checkIfTableExists('ramTypeRequirements')) recreateLegacyTables();\n \n //graphics\n if (!checkIfTableExists('yamlGraphicIDs')) db_uquery(\"CREATE OR REPLACE VIEW `$LM_EVEDB`.`yamlGraphicIDs` AS SELECT\n `graphicID`,\n `description`, \n `graphicFile`, \n `sofFactionName`, \n `sofHullName`,\n `sofRaceName`\n FROM `$LM_EVEDB`.`eveGraphics`;\");\n \n if (!checkIfTableExists('yamlTypeIDs')) db_uquery(\"CREATE OR REPLACE VIEW `$LM_EVEDB`.`yamlTypeIDs` AS SELECT\n `typeID`,\n `graphicID`, \n `iconID`, \n 0 AS `radius`, \n `soundID`\n FROM `$LM_EVEDB`.`invTypes`;\");\n \n if (!checkIfTableExists('yamlInvTraits')) db_uquery(\"CREATE OR REPLACE VIEW `$LM_EVEDB`.`yamlInvTraits` AS SELECT\n `typeID`,\n `skillID`,\n `bonus`,\n `bonusText`,\n `unitID`\n FROM `$LM_EVEDB`.`invTraits`;\");\n \n //skins - SDE tables are compatible - no need to update\n //updateYamlSkins(FALSE);\n //updateYamlSkinLicenses(FALSE);\n //updateYamlSkinMaterials(FALSE);\n if (!checkIfTableExists('skinMaterialSets')) updateYamlSkinMaterialSets(TRUE,'../data/graphicMaterialSets.yaml');\n if (!checkIfTableExists('skinMaterialsRGB')) createSkinMaterialsRGBview();\n return TRUE;\n}", "function deactivate() {\r\n delete_option(\"bvd_post_version\");\t\r\n delete_option(\"bvd_post_type\");\r\n delete_option(\"bvd_connection\");\r\n delete_option(\"bvd_show_version\");\r\n delete_option(\"bvd_favorites\");\r\n }", "abstract protected function loadExposedObjects();", "public function hideXLabels() {\n\t\t$this->Options['xaxis']['show'] = false;\n\t}", "function hideField($fieldName){\n\n\t\t$this->hidden[$fieldName] = \"hide\";\n\n\t}", "public function setHidden($hidden) {\n\t\t$this->hidden = $hidden;\n\t}", "public function setHidden($hidden) {\n\t\t$this->hidden = $hidden;\n\t}", "public function __construct() {\n $this->columnas = new ArrayCollection();\n }", "public function showForAll() {\n $classes = ['hide'];\n foreach ($this->sizes as $size) {\n $classes[] = \"hide-for-$size\";\n $classes[] = \"hide-for-$size-only\";\n $classes[] = \"show-for-$size\";\n $classes[] = \"show-for-$size-only\";\n }\n $this->cssClasses()->remove($classes);\n return $this;\n }", "public function isHidden()\n {\n return false;\n }", "protected function removeCheckboxFieldNamesFromViewHelperVariableContainer() {}" ]
[ "0.6177584", "0.5945084", "0.57093763", "0.54782856", "0.546859", "0.5466725", "0.54365104", "0.5422748", "0.5353198", "0.5289514", "0.52535605", "0.52257276", "0.5211803", "0.5154947", "0.51190627", "0.511504", "0.509258", "0.5065426", "0.5061698", "0.5048389", "0.50386816", "0.50346494", "0.50140285", "0.50064486", "0.49984953", "0.49865946", "0.49800923", "0.49669325", "0.4959351", "0.49534953", "0.49433896", "0.49299848", "0.49228382", "0.49176794", "0.4912354", "0.49073", "0.48863643", "0.488542", "0.4881427", "0.48789087", "0.48770824", "0.48712608", "0.48666117", "0.48625538", "0.48558536", "0.4853451", "0.48360702", "0.48315063", "0.48211154", "0.48149562", "0.48145148", "0.47779167", "0.47768506", "0.47768506", "0.47768506", "0.47768506", "0.47695044", "0.47655582", "0.4763425", "0.47625566", "0.47625566", "0.47422266", "0.47324648", "0.4730086", "0.47287", "0.47284535", "0.4721709", "0.4718812", "0.4717498", "0.47115842", "0.47011676", "0.46974924", "0.46942323", "0.46925193", "0.46881932", "0.4682572", "0.468151", "0.46787852", "0.46751952", "0.4668762", "0.46673456", "0.46607465", "0.4659947", "0.46581587", "0.4651988", "0.46505505", "0.46505505", "0.46496126", "0.462994", "0.46297532", "0.46284312", "0.46232376", "0.46229944", "0.4621361", "0.46152413", "0.4611755", "0.4611755", "0.46106237", "0.46061617", "0.4605721", "0.46029449" ]
0.0
-1