query
stringlengths
11
3.13k
ru_query
stringlengths
9
3.91k
document
stringlengths
18
71k
metadata
dict
negatives
listlengths
0
100
negative_scores
listlengths
0
100
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
Flushes all after and before callbacks
Очищает все после и перед обратные вызовы
public static function flushAfterCallbacks() { static::$after = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function flushAll();", "function flushAll();", "public function flushAll()\n {\n }", "public function flushAll()\n {\n }", "public function flushAll(): void;", "public function flushAll();", "public function finish()\n {\n $this->flushAndClear();\n\n $this->reEnableLogging();\n }", "public function flush()\n {\n @flush();\n }", "public function flush() {}", "public function flush() {}", "public function flush() {}", "public function flush() {}", "public function flush() {}", "public function flush() {}", "public function flush() {}", "public function flush() {}", "public function flush() {}", "public function flush() {}", "public function flush() {}", "public function flush() {}", "public function flush() {}", "public function flush() {}", "public function postFlush(): void\n {\n $this->memoizedNewDomains = [];\n $this->memoizedNewTags = [];\n\n // Release all locks\n invoke($this->tagLocks, 'release');\n invoke($this->domainLocks, 'release');\n $this->tagLocks = [];\n $this->domainLocks = [];\n }", "function flush()\n{\n}", "function flush()\n{\n}", "public static function flush()\n {\n }", "public function flush() {\r\n\t}", "public function after() {}", "function flush()\n\t{}", "public function flush()\n {\n // Noop\n }", "private function finalize()\n {\n foreach ($this->registeredAfterMiddleware as $middleware) {\n $this->app->call($middleware . '@handle');\n }\n }", "public function flush() {\n // no-op\n }", "public function onFinish() {\n\t\t$this->onResponse->executeAll(false);\n\t\tparent::onFinish();\n\t}", "function after() {}", "public function flush()\n {\n $this->cachers()->each->flush();\n }", "function flush() ;", "function flush() ;", "public function deplete(): void {\n\t\t$this->executeQueued(\\true);\n\t}", "private function calllAndFlush()\n {\n $function = $this->function;\n $function($this->batch);\n $this->batch = array();\n }", "public function flush();", "public function flush();", "public function flush();", "public function flush();", "public function flush();", "public function flush();", "public function flush();", "public function flush();", "public function flush();", "public function flush();", "public function flush();", "public function flush();", "public function flush();", "public function flush();", "public function flush();", "public function flush();", "public function flush();", "public function flush();", "public function flush();", "public function flush()\n {\n global $wpdb;\n $this->command_called = 'flush';\n $wpdb->query(\"DELETE FROM {$wpdb->prefix}queue\");\n }", "public function flushing() : void;", "public function flush(): void\n {\n parent::flush();\n\n $this->buildStack = [];\n $this->loadedProviders = [];\n $this->bootedCallbacks = [];\n $this->bootingCallbacks = [];\n $this->deferredServices = [];\n $this->reboundCallbacks = [];\n $this->serviceProviders = [];\n $this->resolvingCallbacks = [];\n $this->terminatingCallbacks = [];\n $this->afterResolvingCallbacks = [];\n $this->globalResolvingCallbacks = [];\n }", "public function flush()\n {\n }", "public function flush()\n {\n }", "public static function flushMacros()\n {\n \\Illuminate\\Events\\Dispatcher::flushMacros();\n }", "protected function flushContainer() {}", "public function flushAllMessages();", "public function finalize()\n {\n SGL::logMessage(null, PEAR_LOG_DEBUG);\n\n $this->sendCompletionNotice();\n if($this->getTotalErrors() != 0) {\n $this->sendErrorNotice();\n }\n $this->reset();\n }", "public function flush()\n {\n parent::flush();\n\n $this->buildStack = [];\n $this->loadedProviders = [];\n $this->bootedCallbacks = [];\n $this->bootingCallbacks = [];\n $this->deferredServices = [];\n $this->reboundCallbacks = [];\n $this->serviceProviders = [];\n $this->resolvingCallbacks = [];\n $this->terminatingCallbacks = [];\n $this->beforeResolvingCallbacks = [];\n $this->afterResolvingCallbacks = [];\n $this->globalBeforeResolvingCallbacks = [];\n $this->globalResolvingCallbacks = [];\n $this->globalAfterResolvingCallbacks = [];\n }", "public function flushAll()\r\n {\r\n $this->flushAllFull();\r\n $this->flushAllParts();\r\n }", "protected function after(){}", "protected function after(){}", "protected function after(){}", "public function flush()\n {\n parent::flush();\n\n $this->loadedProviders = [];\n $this->bootedCallbacks = [];\n $this->bootingCallbacks = [];\n $this->deferredServices = [];\n $this->serviceProviders = [];\n }", "protected function flushDeletes()\n\t{\n\t\t$this->remove($this->queuedForDeletion);\n\t\t$this->queuedForDeletion = [];\n\t}", "public abstract function flush();", "public function pipeline_flush()\r\n\t{\r\n\t\t$this->pipline_queue = array();\r\n\t\t$this->pipeline = false;\r\n\t}", "protected function flush()\n {\n self::$future[$this->id] = null;\n unset(self::$future[$this->id]);\n\n $this->timeout = null;\n $this->id = null;\n $this->pid = null;\n $this->in = null;\n $this->out = null;\n $this->err = null;\n $this->timer = null;\n\n $this->startTime = null;\n $this->showOutput = false;\n $this->isYield = false;\n\n $this->successCallbacks = [];\n $this->errorCallbacks = [];\n $this->timeoutCallbacks = [];\n $this->progressCallbacks = [];\n $this->signalCallbacks = [];\n }", "abstract public function flush();", "abstract public function flush();", "public function flush()\n {\n $this->_transport->finish();\n }", "public function flushAll() {\n foreach (\\System\\Queue::instance()->getInstantMsgList() as $msg) {\n call_user_func_array($msg['callback'], $msg['params']);\n }\n\n // 2. flush all flushables\n foreach ($this->_subscribers as $flushable) {\n if ($flushable->isDirty()) {\n $flushable->save();\n }\n }\n\n $flushTime = (int) (microtime(TRUE) * 1000);\n\n // 3. it's now time to flush queue\n foreach (\\System\\Queue::instance()->getMsgList() as $msg) {\n // pass in current user opTime to MQ worker\n $msg['params']['time'] = $flushTime;\n\n if (!isset($msg['params']['data'])) {\n $msg['params']['data'] = \\System\\ResponseHandler::getInstance()->getAutoCallback();\n }\n if (isset($msg['params']['from'])) {\n $from = $msg['params']['from'];\n } else {\n $from = \\Model\\UserInfoModel::get(\\System\\RequestHandler::getInstance()->getUid())->chat_channel;\n }\n if (!\\Driver\\MQFactory::instance($msg['tube'])\n ->produce($msg['params'], $msg['channels'], $from)) {\n // failed to put to MQ\n }\n }\n\n return $flushTime;\n }", "public function flush() {\n\t\t@ob_flush();\n\t\t@flush();\n\t}", "public abstract function after();", "public function flush()\n {\n // TODO: Implement flush() method.\n }", "protected function _after() {\n\t}", "protected function _after() {\n\t}", "protected function _after() {\n\t}", "protected function after() {}", "public function flush(): void;", "public function flush(): void;", "public function flush(): void;", "public function flush(): void;", "public function flush(): void;", "public function flush()\n {\n // do nothing\n }", "function flush();", "abstract protected function doFlush();", "public function flushAll()\n {\n $this->_flushByLookup(\"*\");\n }", "public function flush()\n\t{\n\t\tdispatcher($this)->onFlushWriteBuffer();\n\t}", "public function flush()\n {\n $this->statsDCollector->flush();\n }", "function flushear() {\n\t\t$this->ult_err = '';\n\t\t$this->ult_sol = '';\n\t\treturn true;\n\t}" ]
[ "0.6776781", "0.6776781", "0.6767633", "0.6767633", "0.6729006", "0.6655772", "0.6590946", "0.65107304", "0.65009797", "0.65009797", "0.65009797", "0.65009797", "0.65009797", "0.6499808", "0.6499808", "0.6499808", "0.6499808", "0.6499808", "0.6499808", "0.6498561", "0.6498561", "0.6498561", "0.6488083", "0.6451776", "0.6451776", "0.6345603", "0.63425136", "0.6318156", "0.62934834", "0.62856686", "0.6274156", "0.6271099", "0.624696", "0.62444365", "0.62298113", "0.6226533", "0.62232584", "0.6215479", "0.62125427", "0.6202493", "0.6202493", "0.6202493", "0.6202493", "0.6202493", "0.6202493", "0.6202493", "0.6202493", "0.6202493", "0.6202493", "0.6202493", "0.6202493", "0.6202493", "0.6202493", "0.6202493", "0.6202493", "0.6202493", "0.6202493", "0.6202493", "0.6176375", "0.6175519", "0.6173551", "0.61729145", "0.6172808", "0.6169841", "0.61695343", "0.6166057", "0.61580133", "0.61478937", "0.61437577", "0.6126623", "0.6126623", "0.6126623", "0.61235666", "0.6122554", "0.6104266", "0.6095237", "0.6094746", "0.6090704", "0.6090704", "0.6076905", "0.60744053", "0.6061643", "0.60477215", "0.60457206", "0.60174245", "0.60174245", "0.60174245", "0.60048324", "0.5986821", "0.5986821", "0.5986821", "0.5986821", "0.5986821", "0.5981384", "0.5979219", "0.59760666", "0.5972025", "0.59699494", "0.5967943", "0.5960996" ]
0.7456281
0
Get Game Set ID Can be used to check if there is a live game
Получить идентификатор набора игры Может использоваться для проверки наличия живой игры
public function get_gameset_id($live_check = false) { return $this->model->gameset_id($live_check); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getGameId()\n {\n return $this->gameId;\n }", "public function getGameId()\n {\n return $this->session->get('gameId');\n }", "public function getId() {\n return $this->gameId;\n }", "protected function getId()\n {\n $setResults = $this->client->request(\"get\", \"/conf/sets\", array(\"q\"=>\"name~\".$this->setName));\n $setId = $setResults[\"set\"][0][\"id\"];\n return $setId;\n }", "public function getGameIds($reset = false) {\n // NULL or empty are both conditions that should trigger a refresh, when\n // an adhock match is created through the gui gameIds gets set to an empty\n // array, and just checking for null was blocking reloading the actual\n // attached games.\n if ($reset || is_null($this->gameIds) || empty($this->gameIds) && isset($this->id)) {\n $this->gameIds = TourneyMatchEntity::fetchGameIds($this->id);\n }\n return $this->gameIds;\n }", "function getGameId($gameName)\r\n{\r\n\t//Get the id of the current game\r\n\t$query = \"SELECT game_id FROM games WHERE name='{$gameName}';\";\r\n\t$result = mysql_query($query)\r\n\tor die(\"&error=\" . mysql_error()); \r\n\t\r\n\t//Do we have a game matching?\r\n\t$gameId = 0;\r\n\tif($row = mysql_fetch_array($result)) \r\n\t{\r\n\t\t$gameId = $row['game_id'];\r\n\t}\r\n\t\r\n\t//Assert\r\n\tif($gameId == 0)\r\n\t{\r\n\t\tdie(\"&error=No game with that name was found.\");\r\n\t}\r\n\t\r\n\treturn $gameId;\r\n}", "public function getPlayerId();", "private function getGame() {\n\t\tif (!isset($this->params['game'])) {\n\t\t\tDooUriRouter::redirect(Doo::conf()->APP_URL);\n\t\t\treturn FALSE;\n\t\t}\n\t\t$key = $this->params['game'];\n\t\t$url = Url::getUrlByName($key, URL_GAME);\n\t\tif ($url) {\n\t\t\t$game = Games::getGameByID($url->ID_OWNER);\n\t\t} else {\n\t\t\tDooUriRouter::redirect(Doo::conf()->APP_URL);\n\t\t\treturn FALSE;\n\t\t}\n\t\tif (!$game) {\n\t\t\tDooUriRouter::redirect(Doo::conf()->APP_URL);\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn $game;\n\t}", "public function setGameTypeId()\n {\n $draftGroupId = $this->getDraftGroupId();\n $gameTypeUrl = $this->buildDraftGroupUrl($draftGroupId, $this->gameTypeUrl);\n $client = new \\GuzzleHttp\\Client();\n $response = $client->request('GET', $gameTypeUrl);\n $gameTypeArray = json_decode($response->getBody(), true);\n\n $this->gameTypeId = $gameTypeArray['draftGroup']['gameTypeId'];\n }", "function flyover_settings_gid()\n{\n\tglobal $db;\n\tstatic $gid;\n\n\tif (!$gid) {\n\n\t\t$query = $db->simple_select(\"settinggroups\", \"gid\", \"name = 'flyover'\", [\n\t\t\t\"limit\" => 1\n\t\t]);\n\t\t$gid = (int) $db->fetch_field($query, \"gid\");\n\n\t}\n\n\treturn $gid;\n}", "private function getAndCheckId()\n\t{\n\t\t$id = JRequest::getInt('id',0);\n\t\t\n\t\tif($id <= 0) return false;\n\n\t\t$statObject = AEPlatform::get_statistics($id);\n\t\tif(empty($statObject) || !is_array($statObject)) return false;\n\n\t\treturn $id;\n\t}", "function get_game_id($request, $team = '') {\n $fivehourslater = time() + (60 * 60 * 5);\n $fivehoursbefore = time() - (60 * 60 * 7);\n switch ($request) {\n case 'current':\n $query = \"SELECT n.nid FROM `node` AS n, content_type_game AS ctg where ((ctg.vid = n.vid) AND (n.type = 'game') AND ctg.field_date_value < $fivehourslater) AND (ctg.field_date_value > $fivehoursbefore) AND (n.status = 1) order by ctg.field_date_value ASC LIMIT 1\";\n break;\n case 'home':\n $query = \"SELECT 'node.nid' FROM `node` where ((`content_type_game.vid` = `node.vid`) AND (n.status = 1) AND (`node.type` = 'game') AND (content_type_game.field_date_value < $fivehourslater) AND (content_type_game.field_home_team_nid = $team)) order by content_type_game.field_date_value desc limit 1\";\n break;\n case 'away':\n $query = \"SELECT 'node.nid' FROM `node` where ((`content_type_game.vid` = `node.vid`) AND (`node.type` = 'game') AND (content_type_game.field_date_value < $fivehourslater) AND (content_type_game.field_visiting_team_nid = $team)) order by content_type_game.field_date_value desc limit 1\";\n break;\n }\n\n //run the query\n $result = mysql_query($query) or die('Error, query failed. ' . mysql_error());\n $row = mysql_fetch_array($result, MYSQL_ASSOC);\n return $row[nid];\n}", "public function get_game() {\n\t\treturn $this->game;\n\t}", "public function getTeamSetContextId()\n {\n return $this->team_set_context_id;\n }", "public function get_gameset_scores_id($gameset_id){\n return $this->model->gameset_scores_id($gameset_id);\n }", "public function getGameId($accountId)\n {\n return $this->getMatchHistory($accountId)['matches'][0]['gameId'] ?: false;\n }", "function getGamerslistIdByPlayerId($con,$player_id,$tm_id)\n{\n\n\t$result = mysqli_query($con,\"SELECT ID FROM tm_gamerslist WHERE player_id = '$player_id' AND tm_id = '$tm_id'\");\n\twhile($row=mysqli_fetch_array($result))\n\t{\n\t\t$gamerslist_id = $row[\"ID\"];\n\t}\n\n\treturn $gamerslist_id;\n}", "public function getSetIdWithUnprocessedEntries() {\n\t\t$db = $this->getDB();\n\t\t$res = $db->exec_SELECTquery(\n\t\t\t'set_id',\n\t\t\t$this->tableName,\n\t\t\t'exec_time = 0 AND scheduled < '.time(),\n\t\t\t'set_id'\n\t\t);\n\t\t$setIds = array();\n\t\twhile ($row = $db->sql_fetch_assoc($res)) {\n\t\t\t$setIds[] = intval($row['set_id']);\n\t\t}\n\t\treturn $setIds;\n\t}", "public function getGymId()\n {\n return $this->gym_id;\n }", "public function getLiveId() {}", "function getID()\n {\n return $this->goalID;\n }", "public function getID () {\n\t\treturn $this->gu_id;\n\t}", "protected function _getGTMId() {\n $Id = Mage::helper ( 'fenomics_gtm' )->getGTMId ();\n \n // Return the container id.\n return $Id;\n }", "private function _getTagSetId()\n\t{\n\t\tif (!isset($this->_tagSetId))\n\t\t{\n\t\t\t$source = $this->getSettings()->source;\n\n\t\t\tif (strncmp($source, 'tagset:', 7) == 0)\n\t\t\t{\n\t\t\t\t$this->_tagSetId = (int) substr($source, 7);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->_tagSetId = false;\n\t\t\t}\n\t\t}\n\n\t\treturn $this->_tagSetId;\n\t}", "function getSinglePlayerIDFromGamerslist($con,$tm_id,$player_id)\n{\n\n\treturn mysqli_num_rows(mysqli_query($con,\"SELECT ID FROM tm_gamerslist WHERE tm_id = '$tm_id' AND player_id = '$player_id'\")) > 0;\n}", "protected function generate_fake_game_id() {\n return sprintf(\"%d%02d\", $this->game_number, $this->move_number);\n }", "public function get_id() {\n\t\tif ( is_object( $this->steam_object ) && $this->steam_object instanceof steam_object )\n\t\t\treturn $this->steam_object->get_id();\n\t\telse return 0;\n\t}", "public function get_current_set()\n {\n $query = $this->db->get_where('set', array('active' => 1));\n $res=$query->row(); \n return $res->id;\n }", "public static function getID(): string;", "public function getGame()\n {\n return $this->game;\n }", "public function getGame()\n {\n return $this->game;\n }", "public function getGame()\n {\n return $this->game;\n }", "public function getGame()\n {\n return $this->game;\n }", "private function getPreviousSetId()\n {\n return (int)$this->request->getParam('prev_set_id', 0);\n }", "function get_game_index( $game_id ) {\r\n\t\tif ( empty( $game_id ) ) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\r\n\t\tfor ( $game_index = 0; $game_index < count( $this->games ); $game_index++ ) {\r\n\t\t\tif ( $this->games[ $game_index ]['id'] == $game_id ) {\r\n\t\t\t\treturn $game_index;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn -1;\r\n\t}", "function wct_talks_the_id() {\n\techo wct_talks_get_id();\n}", "public function getGame() {\r\n\t\treturn $this->_game;\r\n\t}", "public function getIdByMario() {\n return Game::query()->select('id')->where('name', 'like', 'Mario%')->get();\n }", "public function getOptionSetId() {\n\t\t$wombat_obj = (object) $this->data['wombat'];\n\t\t$option_sets = $this->getOptionSets();\n\t\t\n\t\t$output = '';\n\n\t\t//uppercase the Wombat options for matching\n\t\t$options = array_map(\"strtoupper\",$wombat_obj->options);\n\t\tsort($options); //sort the items so we can compare \n\t\t\n\t\tif(count($option_sets)) {\n\t\t\t//for each option set, construct an array of option names to match against the Wombat array\n\t\t\tforeach ($option_sets as $option_set) {\n\t\t\t\t$set_options = array();\n\t\t\t\tif(!empty($option_set->options)) {\n\t\t\t\t\tforeach($option_set->options as $set_option)\t{\n\t\t\t\t\t\t$set_options[] = strtoupper($set_option->display_name);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tsort($set_options);\n\n\t\t\t\t\tif($set_options == $options) {\n\t\t\t\t\t\t$output = $option_set->id;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif(empty($output)) {\n\t\t\t$output = $this->createOptionSet();\n\t\t}\n\t\t\n\t\treturn $output;\t\n\t}", "public function is_gameset_live($gameset_id){\n if(is_array($gameset_id)){\n if(empty($gameset_id)) return false;\n return in_array($this->get_gameset_id(),$gameset_id);\n }\n else if( is_numeric($gameset_id) || is_int($gameset_id) ){\n if( $gameset_id == 0 ) return false;\n return ($gameset_id == $this->get_gameset_id());\n }\n return false;\n }", "function getMapSet($name, $apiid, $freq, $units, $meta=null, $themeid=null, $msKey=null){\n global $db;\n if($msKey){\n $sql = \"select mapsetid from mapsets where apiid=$apiid and mskey=\".safeStringSQL($msKey);\n } else {\n $sql = \"select mapsetid from mapsets where name='\".$db->escape_string($name).\"' and freq='\".$db->escape_string($freq).\"' and apiid=\".$apiid\n .\" and units \". (($units==null)?\" is NULL\":\"=\".safeStringSQL($units));\n }\n $result = runQuery($sql, \"getMapSet select\");\n if($result->num_rows==1){\n $row = $result->fetch_assoc();\n return $row[\"mapsetid\"];\n } else {\n $sql = \"insert into mapsets set name='\".$db->escape_string($name).\"', freq='\".$db->escape_string($freq)\n .\"', units=\".(($units==null)?\"NULL\":safeStringSQL($units)).\", apiid=\".$apiid\n .\", meta=\".safeStringSQL($meta).\", themeid=\".safeStringSQL($themeid).\", mskey=\".safeStringSQL($msKey);\n $result = runQuery($sql, \"getMapSet insert\");\n if($result!==false){\n $mapSetId = $db->insert_id;\n return $mapSetId;\n }\n return false;\n }\n}", "public function getGid()\n {\n $value = $this->get(self::GID);\n return $value === null ? (integer)$value : $value;\n }", "function getMapId()\n {\n return md5(serialize($this->map)) . '_' . $this->map->getMapId();\n }", "public function getGoogleId()\n {\n return $this->google_id;\n }", "function getGamesFromTournament($con,$game_id)\n{\n\n\treturn mysqli_num_rows(mysqli_query($con,\"SELECT ID FROM tm WHERE game_id = '$game_id'\")) > 0;\n}", "private function getGaTrackingId() {\n\t\t$this->trackingId = get_option( 'ic-ga-tracking-id' );\n\t}", "public function get_steamID(){\n return $this->steamID;\n }", "private function _getRunId()\n {\n if (!isset($this->_runId)) {\n $this->_runId = time();\n }\n \n return $this->_runId;\n }", "public function getIdSettings() { \n return $this->id_sett; \n }", "public function getVariantSetId()\n {\n return $this->variant_set_id;\n }", "public function getMapid()\n {\n $value = $this->get(self::MAPID);\n return $value === null ? (integer)$value : $value;\n }", "public function get_steamID_32(){\n return $this->steamID_32;\n }", "private function get_google_analytics_tracking_id() {\n\t\tif ( isset( $this->google_analytics_tracking_id ) ) {\n\t\t\treturn $this->google_analytics_tracking_id;\n\t\t}\n\t\t$this->google_analytics_tracking_id = trim( get_option( 'options_wpc_google_analytics_tracking_id' ) );\n\t\treturn $this->google_analytics_tracking_id;\n\t}", "public static function getGameID($player1ID, $player2ID){\n\t\t\t$database = DataLayer::getGameplayInstance();\n\n\t\t\treturn $database->getGameID($player1ID, $player2ID);\n\n\t\t}", "public function getTeamId(): Snowflake\n {\n return $this->team_id;\n }", "public function getID()\n {\n return $this->geID;\n }", "private function getAndCheckId()\n\t{\n\t\t$id = $this->input->get('id', 0, 'int');\n\n\t\tif ($id <= 0)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$backupRecord = Platform::getInstance()->get_statistics($id);\n\n\t\tif (empty($backupRecord) || !is_array($backupRecord))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Load the correct backup profile. The post-processing engine could rely on the active profile (ie OneDrive).\n\t\tdefine('AKEEBA_PROFILE', $backupRecord['profile_id']);\n\t\tPlatform::getInstance()->load_configuration($backupRecord['profile_id']);\n\n\t\treturn $id;\n\t}", "public function getPlayerID(){\n\t\treturn $this->player->getID();\n\t}", "public function getBindGameIds()\n {\n return $this->bindGameIds;\n }", "function getTournamentVoteId($con,$game_id)\n{\n\n\t$result = mysqli_query($con,\"SELECT ID FROM tm_vote WHERE game_id = '$game_id'\");\n\twhile($row=mysqli_fetch_array($result))\n\t{\n\t\t$voteID = $row[\"ID\"];\n\t}\n\t\n\treturn $voteID;\n}", "function getId() ;", "public function getGid()\n {\n return $this->_gid;\n }", "function getGameKey($con, int $game_id)\n{\n\n\t$result = mysqli_query($con,\"SELECT gamekey FROM gamekeys WHERE (game_id = '$game_id') AND (player_id IS NULL) AND (rejected = '0') LIMIT 1;\");\n\tif(mysqli_num_rows($result) == 0)\n\t\treturn false;\n\telse\n\t\treturn mysqli_fetch_array($result)[\"gamekey\"];\n}", "public function getUniqueId(): string;", "public function getUniqueId(): string;", "public function getGlobalID()\n {\n return $this->globalID;\n }", "public function getIdByGameGroupName($name)\n\t{\n\t\t$conn = Zenfox_Partition::getInstance()->getCommonConnection();\n\t\tDoctrine_Manager::getInstance()->setCurrentConnection($conn);\n\t\t\n\t\t$query = Zenfox_Query::create()\n\t\t\t\t\t->select('id')\n\t\t\t\t\t->from('Gamegroup')\n\t\t\t\t\t->where('name = ?',$name);\n\t\t\t\t\t\n\t\t$result = $query->fetchOne();\n\t\t\n\t\treturn $result['id'];\n\t}", "public function getID();", "public function getID();", "public function getID();", "public function getLeagueId()\n {\n $value = $this->get(self::LEAGUE_ID);\n return $value === null ? (integer)$value : $value;\n }", "public function getLeagueId()\n {\n $value = $this->get(self::LEAGUE_ID);\n return $value === null ? (integer)$value : $value;\n }", "public function hasTeamid(){\n return $this->_has(1);\n }", "private function getBotId(): string\n {\n if ($this->bot === null) {\n $this->bot = $this->getAccountInfo();\n $this->botId = $this->bot->getId();\n }\n\n return $this->botId;\n }", "private function get_match_id(){\n\n $json_player = file_get_contents('https://api.steampowered.com/IDOTA2Match_570/GetMatchHistory/V001/?key=CD44403C3CEDB535EFCEFC7E64F487C6&account_id='.$this->steamID);\n\n $json_decoded_player = (json_decode($json_player, true));\n $hero = 0;\n if($json_decoded_player['result']['matches']){\n foreach($json_decoded_player['result']['matches'] as $matches){\n $int_timestamp = intval($matches['start_time']);\n if($int_timestamp > $this->current_timestamp){\n foreach($matches['players'] as $players){\n $match_id = $matches['match_id'];\n if($players['account_id'] == $this->steamID_32){\n $hero = $players['hero_id'];\n $this->matches_after_timestamp[$match_id] = $hero;\n }\n else{\n continue;\n }\n }\n\n //Set timestamp to now to avoid re-checking previously checked matches\n $this->set_timestamp();\n }\n }\n }\n }", "public function getGooglePid()\n {\n $googlePid = (!empty($this->google_id)\n && $this->google_id != 'null'\n && $this->google_id != '0')?$this->google_id:false;\n \n return $googlePid;\n }", "public function battleNetUrlSafeId()\n\t{\n\t\treturn $this->battleNetUrlSafeId;\n\t}", "public function getMapID()\n {\n return $this->sMapId;\n }", "function getInstanceId() {\n\t\treturn (string)$this->instance->instancesSet->item->instanceId;\n\t}", "public function get_game_data_bm_id(){\n return $this->model->game_data_bm_id();\n }", "function getId();", "function getId();", "function getId();", "function getId();", "function getPilotID()\n\t\t{\n\t\t\tif (isset($_SERVER[\"HTTP_EVE_CHARID\"]))\n\t\t\t\treturn $_SERVER[\"HTTP_EVE_CHARID\"];\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}", "public static function getWinningTeamIDOfGameID($id){\n\t\t$records = getAllRecordsWithGameID($id);\n\n $team1Points = getAllPointsWithRecordID($records[0][\"ID\"]);\n $team2Points = getAllPointsWithRecordID($records[1][\"ID\"]);\n\n return Count($team1Points) > Count($team2Points) ? $records[0][\"TEAMID\"] : $records[1][\"TEAMID\"];\n\t}", "public function fetch_the_id() {}", "public function get_tracking_id() {\n return get_option( $this->field_names['tracking_id'], '' );\n }", "public function getFeedItemSetId()\n {\n return $this->feed_item_set_id;\n }", "public function getPlayerId()\n {\n return $this->getObjectId();\n }", "public function getGrouponId() {\n return $this->get(self::GROUPON_ID);\n }", "function get_id() {\r\n\t\treturn $this->id_ma;\r\n\t}", "public function getGru_id()\n {\n return $this->gru_id;\n }", "public function get_id()\n {\n if (!isset($this->chamber) || !isset($this->name))\n {\n return FALSE;\n }\n\n $sql = 'SELECT id, shortname, name, chamber, meeting_time, url,\n LEVENSHTEIN(\"' . $this->name . '\", name) AS distance\n FROM committees\n WHERE chamber=\"' . $this->chamber . '\"\n ORDER BY distance DESC\n LIMIT 1';\n $result = mysqli_query($GLOBALS['db'], $sql);\n if (mysqli_num_rows($result) == 0)\n {\n return FALSE;\n }\n $committee = mysqli_fetch_assoc($result);\n $this->id = $committee['id'];\n return $this->id;\n }", "function checkId() {\n\t\t$my=$this->db_contact();\n\t\t$query = \"SELECT id FROM poll WHERE vraag = '$this->vraag'\";\n\t\t$r = $my->query($query);\n\t $res = mysqli_fetch_array($r);\n\t\t$cid = $res[0]; #het eerste poll nummer met dezelfde vraag.\n\t\t$my->close();\n\t\treturn $cid;\n\t}", "function mentionMeGetSettingsgroup()\n{\n\tstatic $gid;\n\n\t// if we have already stored the value\n\tif (!isset($gid)) {\n\t\tglobal $db;\n\n\t\t// otherwise we will have to query the db\n\t\t$query = $db->simple_select(\"settinggroups\", \"gid\", \"name='mention_settings'\");\n\t\t$gid = (int) $db->fetch_field($query, 'gid');\n\t}\n\treturn $gid;\n}", "public function id()\n {\n return $this->session->get($this::$key);\n }", "public function getTeamId()\n {\n return $this->teamid;\n }", "function getID() {\n\t\treturn $this->get(\"id\");\n\t}", "public function getUniqueId();" ]
[ "0.7351177", "0.7152395", "0.7030648", "0.6373369", "0.6248603", "0.6100535", "0.6065296", "0.6023046", "0.5946053", "0.5913602", "0.5890497", "0.58894306", "0.58262277", "0.57970715", "0.5787306", "0.578657", "0.5775672", "0.5775381", "0.57751733", "0.5748508", "0.5743295", "0.5712907", "0.5710633", "0.57071847", "0.57023764", "0.5670994", "0.5650401", "0.5650145", "0.56471133", "0.5642077", "0.5642077", "0.5642077", "0.5642077", "0.5639039", "0.56360507", "0.55961704", "0.5587085", "0.5567088", "0.55660486", "0.55638796", "0.55527645", "0.5533974", "0.5530222", "0.55151546", "0.5510568", "0.55018836", "0.54931647", "0.54912204", "0.5485605", "0.5470031", "0.5468372", "0.54546005", "0.5453567", "0.5448641", "0.5447681", "0.54465485", "0.5444159", "0.54411167", "0.5438696", "0.54324853", "0.5421317", "0.54196405", "0.54189515", "0.5417299", "0.5417299", "0.5416852", "0.54149187", "0.5413256", "0.5413256", "0.5413256", "0.54050314", "0.54050314", "0.5398708", "0.5396012", "0.53957283", "0.5385593", "0.5383604", "0.53791666", "0.5378475", "0.5372932", "0.5369712", "0.5369712", "0.5369712", "0.5369712", "0.5366955", "0.5358604", "0.53501135", "0.53416425", "0.5340064", "0.53329396", "0.5332606", "0.5328554", "0.5323826", "0.53232014", "0.5322631", "0.5314801", "0.53055376", "0.53018004", "0.5301196", "0.53008074" ]
0.7806826
0
Get Live Style Bowstyle ID
Получить идентификатор Live Style Bowstyle
public function get_style_bowstyle_id(){ $action_m = $this->model->get_style_bowstyle_id(); $this->has_live_style = $action_m > 0; return $action_m; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_game_bowstyle_id() {\n\n return $this->model->game_bowstyle_id();\n }", "public function style_bowstyle_id(){\n $action_m = $this->model->get_style_bowstyle_id();\n $this->has_live_style = $action_m > 0;\n\n return $action_m;\n }", "public function style_id(){\n $action_m = $this->model->get_style_id();\n $this->has_live_style = $action_m > 0;\n\n return $action_m;\n }", "public function mb_get_id() {\n\t\treturn version_compare( WC_VERSION, '3.0', '>=' ) ? $this->get_id() : $this->id;\n\t}", "function socialwiki_get_currentstyle($swid) {\n Global $DB;\n $sql = 'SELECT style FROM {socialwiki} WHERE id=?';\n return $DB->get_record_sql($sql, array($swid));\n}", "public function getLiveId() {}", "public static function getActiveID()\n {\n $stream = self::where('streaming', true)->first();\n\n return $stream ? $stream->id : null;\n }", "private function get_liveblog_id() {\n\t\treturn elb_is_liveblog() ? get_the_ID() : $this->liveblog_post_id;\n\t}", "public function getId()\n\t{\n\t\treturn $this->_themeExtras['id'];\n\t}", "public function getId()\n {\n if (is_null($this->id))\n $this->id = 'wgtid_'.BuizCore::uniqid();\n\n return $this->id;\n\n }", "function getStyleFileId() {\n\t\treturn $this->getData('styleFileId');\n\t}", "function wct_talks_get_id() {\n\t\t/**\n\t\t * @param int the talk ID to output\n\t\t */\n\t\treturn apply_filters( 'wct_talks_get_id', wct()->query_loop->talk->ID );\n\t}", "function wct_talks_the_id() {\n\techo wct_talks_get_id();\n}", "public function getBCID() {\n\t\t$client = $this->client;\n\t\t$request_data = $this->request_data;\n\t\t$wombat_obj = (object) $this->data['wombat'];\n\n\t\tif(!empty($wombat_obj->bigcommerce_id)) {\n\t\t\treturn $wombat_obj->bigcommerce_id;\n\t\t}\n\n\t\t//if no BCID stored, query BigCommerce for the SKU\n\t\t$sku = $wombat_obj->id;\n\t\t\n\t\ttry {\n\t\t\t$response = $client->get('products',array('query'=>array('sku'=>$sku)));\n\t\t} catch (\\Exception $e) {\n\t\t\t$this->doException($e,'fetching bigcommerce_id');\n\t\t}\n\n\t\tif($response->getStatusCode() == 204) {\n\t\t\t$this->doException(null, \"No product could be found for ID: {$sku}, and no bigcommerce_id was provided.\");\n\t\t}\n\n\t\t$data = $response->json(array('object'=>TRUE));\n\n\t\treturn $data[0]->id;\n\t}", "function getStyleSheetId()\n\t{\n\t\treturn $this->style_id;\n\t}", "function sw_get_main_id() {\n\treturn 'some-id';\n}", "public static function getId() {\n static::$_last_id=(static::$widgetPrefix ? static::$widgetPrefix : \\yii\\base\\Widget::$autoIdPrefix) . static::getAutoIdPrefix() . static::$counter++ . static::$suffix;\n return static::$_last_id;\n }", "public function oeThemeSwitcherGetActiveThemeId()\n {\n }", "public function getCssId() {\n return $this->cssId;\n }", "public function getId(): string\n {\n return 'turnover';\n }", "public function getID()\n {\n return $this->soc_id;\n }", "protected function id ($attachment, $style = '') \n {\n return $this->get_key();\n }", "public function getBannerAssetId(): Snowflake\n {\n return $this->banner_asset_id;\n }", "function getWid() {\n\t\treturn $this->wid;\n\t}", "function bb_widgetId ($widget) {\n\tif (!isset($widget['id'])) {\n\t\t$widget['id'] = $widget['name'];\n\t}\n\t$idName = $widget['id'];\n\t$idName = strtolower ($idName);\n\t$idName = str_replace (' ', '-', $idName);\n\treturn $idName;\n}", "public function get_id() { // Declare \\Markguyver\\LivefyreImporter\\Data\\Livefyre\\Base->get_id() function\n\t\t\treturn $this->id;\n\t\t}", "public function getBSID($site=0){\n\t\t$bsid = $_SESSION[SITE_PREFIX.'bsid'];\n\t\tif(!isset($bsid)){\n\t\t\t$bsid = common::getcookie(SITE_PREFIX.'bsid');\n\t\t}\n/*\n\t\tif(bssystem::isBackend() || $site==1){\n\t\t\t$bsid=$_COOKIE['bs'];\n\t\t}else{\n\t\t $bsid = $_SESSION[SITE_PREFIX.'bsid'];\n\t\t}\n*/\n\t\treturn intval($bsid);\n\t}", "function _lookupContObjIdByStyleId($a_style_id)\n\t{\n\t\tglobal $ilDB;\n\n\t\t$q = \"SELECT id FROM content_object \".\n\t\t\t\" WHERE stylesheet = \".$ilDB->quote($a_style_id, \"integer\");\n\t\t$res = $ilDB->query($q);\n\t\t$obj_ids = array();\n\t\twhile($cont = $ilDB->fetchAssoc($res))\n\t\t{\n\t\t\t$obj_ids[] = $cont[\"id\"];\n\t\t}\n\t\treturn $obj_ids;\n\t}", "public function getId() {\n\t\t$id = $this->getIdBySnowflakeService ();\n\t\tif (! $id) {\n\t\t\t$id = $this->getIdByLocalSnowflake ();\n\t\t}\n\t\t\n\t\treturn $id;\n\t}", "public function getId(): Snowflake\n {\n return $this->id;\n }", "public function getId(): Snowflake\n {\n return $this->id;\n }", "public function id() : int\n\t\t{\n\t\t$parts = \\explode('_', static::class);\n\n\t\treturn (int)$parts[1];\n\t\t}", "public function getWingId()\n\t{\n\t\treturn $this->wing_id;\n\t}", "public static function getID(): string;", "public function getWebId()\n {\n return $this->web_id;\n }", "public function battleNetUrlSafeId()\n\t{\n\t\treturn $this->battleNetUrlSafeId;\n\t}", "public function get_id() {\n\t\tif ( is_object( $this->steam_object ) && $this->steam_object instanceof steam_object )\n\t\t\treturn $this->steam_object->get_id();\n\t\telse return 0;\n\t}", "public function get_block_style_key() : string {\n return 'applicationBlocks.css';\n }", "function get_css_id( $panel_id ){\r\n\r\n // If panel haven't style feature\r\n if( ! isset( Better_Framework::options()->options[$panel_id]['fields']['style'] ) )\r\n return 'css';\r\n\r\n if( get_option( $panel_id . '_current_style' ) == 'default' )\r\n return 'css';\r\n else\r\n return 'css-' . get_option( $panel_id . '_current_style' );\r\n\r\n }", "public function get_id();", "public function get_id();", "public function get_id();", "public function get_id();", "public function getID();", "public function getID();", "public function getID();", "function getClassId() ;", "public function getId()\n\t{\n\t\treturn $this->iblockId;\n\t}", "public function getColorId() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"colorId\");\n\t}", "public function get_game_data_bm_id(){\n return $this->model->game_data_bm_id();\n }", "function the_ID()\n{\n}", "public function getShopId()\n {\n $cookie = Context::getContext()->cookie->getFamily('shopContext');\n\n return (int)Tools::substr($cookie['shopContext'], 2, count($cookie['shopContext']));\n }", "public function getBoardId(): string\n {\n return $this->boardId;\n }", "public function getID(){\n\t\t//echo '<!-- Slider Revolution Notice: Please do not use RevSliderSlider->getID() anymore, use RevSliderSlider->get_id() instead -->'.\"\\n\";\n\t\treturn $this->get_id();\n\t}", "function get_the_ID()\n{\n}", "function getSwimmerId()\r\n {\r\n return $this->_swimmerid ;\r\n }", "function getSwimmerId()\r\n {\r\n return $this->_swimmerid ;\r\n }", "private function getBotId(): string\n {\n if ($this->bot === null) {\n $this->bot = $this->getAccountInfo();\n $this->botId = $this->bot->getId();\n }\n\n return $this->botId;\n }", "public function get_steamID_32(){\n return $this->steamID_32;\n }", "static function getId()\n {\n self::$id += 0x1;\n \n return \"idg_\".dechex(self::$id);\n }", "public function getID() {\n\n\t\t$id = parent::get('id'); \n\t\tif($id) return $id; \n\n\t\t$id = \tparent::get('title') . ',' . \n\t\t\t\tparent::get('created') . ',' . \n\t\t\t\tparent::get('from') . ',' . \n\t\t\t\tparent::get('src_id') . ',' . \n\t\t\t\t($this->page ? $this->page->id : '?'); // . ',' . \n\t\t\t\t//parent::get('flags');\n\n\t\treturn 'noID' . md5($id); \n\t}", "public function getCssIdHtml() {\n return ($this->cssId ? ' id=\"'.$this->cssId.'\"' : '');\n }", "function get_style_name($instance) {\n\t\treturn false;\n\t}", "public function getIdWeb()\n {\n return $this->id_web;\n }", "public function getIdWeb()\n {\n return $this->id_web;\n }", "function _lookupStyleSheetId($a_cont_obj_id)\n\t{\n\t\tglobal $ilDB;\n\n\t\t$q = \"SELECT stylesheet FROM content_object \".\n\t\t\t\" WHERE id = \".$ilDB->quote($a_cont_obj_id, \"integer\");\n\t\t$res = $ilDB->query($q);\n\t\t$sheet = $ilDB->fetchAssoc($res);\n\n\t\treturn $sheet[\"stylesheet\"];\n\t}", "public function getZap2itId()\n\t{\n\n\t\treturn $this['zap2it_id'];\n\n\t}", "public function GetUrlObjectId() {\n\t\n\t\t$_URLObject = FrontIndexController::GetInstance()->GetUrlObject();\n\t\treturn $_URLObject->GetId();\n\t}", "public function getId()\n {\n return $this->_libChannelId;\n }", "public function getHtmlId()\r\n\t{\r\n\t\t$id = method_exists($this, 'id') ? $this->id() : null;\r\n\t\t$prefix = property_exists($this, 'htmlPrefix') ? $this->htmlPrefix : null;\r\n\t\treturn zbase_string_camel_case($prefix . '_' . $id);\r\n\t}", "public function get_id()\n {\n }", "public function get_id()\n {\n }", "public function get_id()\n {\n }", "public function get_id()\n {\n }", "public function get_id()\n {\n }", "public function get_id()\n {\n }", "function get_style_name( $instance ) {\r\n\t\treturn false;\r\n\t}", "public function get_ID() {\n return $this->stig_id;\n }", "public function cohInstanceId() {\n return 'coh-instance-' . crc32($this->uuid->generate());\n }", "protected function getFrameId()\n {\n return $this->getDialogWidgetId('update') . '-frame';\n }", "protected function getPageId()\n {\n // @extensionScannerIgnoreLine\n return $this->getTypoScriptFrontendController()->id;\n }", "public function generateWidgetID(): string\n {\n $uuid = Uuid::uuid4();\n return $uuid->toString();\n }", "function ID()\n {\n #echo \"eZNewsUtility::ID()<br />\\n\";\n $value = 0;\n \n if ( $this->State_ != \"new\" )\n {\n $value = $this->ID;\n }\n \n return $value;\n }", "public function get_id() : string;", "public function getDocliteId(): string\n {\n return $this->id;\n }", "function vidId()\t\t\t{ return $this->dbValue('wf_resources_id'); }", "function getConnectionID () {\n\t//the connection id is a unique 6-letter word that identifies the connection between two browsers. once a connection\n\t//is started the id is returned and the other browser requires this to join the connection and exchange data. the id\n\t//itself is based on the unix time number converted to base 35 (0-9,A-Z)\n\treturn strtoupper (substr(base_convert(time(),10,35),0,6));\n}", "public function get_ID()\n {\n return $this->blockId;\n }", "public function getId() {\n return $this->gameId;\n }", "public function getFontId() {\n\t\treturn $this->_arrInfo[3];\n\t}", "public function getCurrentSiteId();", "public function get_active_theme_id(){\n $this->db->where('is_active', 1);\n $this->db->limit(1);\n $data = parent::get();\n $theme_id = $data[0]->id;\n return $theme_id;\n }", "public function get_id() {\n return str_replace('forumngfeature_', '', get_class($this));\n }", "public function get_id() : string\n {\n }", "public function get_id() : string\n {\n }", "function getId() ;", "public function getWidgetId()\n {\n return $this->widgetId;\n }", "public static function get_gateway_id() {\n\t\treturn self::ID;\n\t}", "public function get_id( ){\n\t\t\t\n\t\t\treturn $this->gate_id;\n\t\t\t\n\t\t}", "public function getWatchId()\n {\n return $this->watch_id;\n }" ]
[ "0.76149577", "0.7450556", "0.6986631", "0.6664956", "0.6282178", "0.6266467", "0.61656356", "0.6101668", "0.6050844", "0.59805983", "0.5943938", "0.5943259", "0.59166026", "0.5847119", "0.58343405", "0.57855916", "0.57278186", "0.5727283", "0.570342", "0.57033193", "0.5686876", "0.564428", "0.56158423", "0.561374", "0.5610771", "0.56013316", "0.55779713", "0.5575199", "0.5563959", "0.55596447", "0.55596447", "0.55563575", "0.5541536", "0.55362767", "0.55344594", "0.5523263", "0.5518252", "0.5515715", "0.54902315", "0.54896295", "0.54896295", "0.54896295", "0.54896295", "0.5487266", "0.5487266", "0.5487266", "0.5478922", "0.5478508", "0.54682374", "0.5454764", "0.5442968", "0.5439049", "0.54362965", "0.5435327", "0.54296297", "0.54293627", "0.54293627", "0.54248554", "0.5414288", "0.54138", "0.5411229", "0.5408256", "0.5396937", "0.53963643", "0.53963643", "0.53955597", "0.53944623", "0.5392835", "0.5390598", "0.53900933", "0.5389089", "0.5389089", "0.5388546", "0.538827", "0.5388192", "0.53876394", "0.53856754", "0.5375802", "0.5374566", "0.5374033", "0.53647333", "0.5363143", "0.5359403", "0.535892", "0.5355828", "0.535483", "0.5351758", "0.53506273", "0.5349849", "0.5349628", "0.53489906", "0.53477657", "0.5346588", "0.53442645", "0.53442645", "0.53413963", "0.53285974", "0.5328062", "0.5324961", "0.5318266" ]
0.7492802
1
Get Live Style ID
Получить ID живого стиля
public function style_id(){ $action_m = $this->model->get_style_id(); $this->has_live_style = $action_m > 0; return $action_m; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_style_bowstyle_id(){\n $action_m = $this->model->get_style_bowstyle_id();\n $this->has_live_style = $action_m > 0;\n\n return $action_m;\n }", "public function style_bowstyle_id(){\n $action_m = $this->model->get_style_bowstyle_id();\n $this->has_live_style = $action_m > 0;\n\n return $action_m;\n }", "function getStyleSheetId()\n\t{\n\t\treturn $this->style_id;\n\t}", "function getStyleFileId() {\n\t\treturn $this->getData('styleFileId');\n\t}", "public function getCssId() {\n return $this->cssId;\n }", "function socialwiki_get_currentstyle($swid) {\n Global $DB;\n $sql = 'SELECT style FROM {socialwiki} WHERE id=?';\n return $DB->get_record_sql($sql, array($swid));\n}", "public function getId()\n\t{\n\t\treturn $this->_themeExtras['id'];\n\t}", "public static function getActiveID()\n {\n $stream = self::where('streaming', true)->first();\n\n return $stream ? $stream->id : null;\n }", "public function get_game_bowstyle_id() {\n\n return $this->model->game_bowstyle_id();\n }", "public function getLiveId() {}", "function get_css_id( $panel_id ){\r\n\r\n // If panel haven't style feature\r\n if( ! isset( Better_Framework::options()->options[$panel_id]['fields']['style'] ) )\r\n return 'css';\r\n\r\n if( get_option( $panel_id . '_current_style' ) == 'default' )\r\n return 'css';\r\n else\r\n return 'css-' . get_option( $panel_id . '_current_style' );\r\n\r\n }", "function _lookupStyleSheetId($a_cont_obj_id)\n\t{\n\t\tglobal $ilDB;\n\n\t\t$q = \"SELECT stylesheet FROM content_object \".\n\t\t\t\" WHERE id = \".$ilDB->quote($a_cont_obj_id, \"integer\");\n\t\t$res = $ilDB->query($q);\n\t\t$sheet = $ilDB->fetchAssoc($res);\n\n\t\treturn $sheet[\"stylesheet\"];\n\t}", "public function oeThemeSwitcherGetActiveThemeId()\n {\n }", "public function getThemeId()\n {\n return $this->theme_id;\n }", "public function getThemeId()\n {\n return $this->theme_id;\n }", "function _lookupContObjIdByStyleId($a_style_id)\n\t{\n\t\tglobal $ilDB;\n\n\t\t$q = \"SELECT id FROM content_object \".\n\t\t\t\" WHERE stylesheet = \".$ilDB->quote($a_style_id, \"integer\");\n\t\t$res = $ilDB->query($q);\n\t\t$obj_ids = array();\n\t\twhile($cont = $ilDB->fetchAssoc($res))\n\t\t{\n\t\t\t$obj_ids[] = $cont[\"id\"];\n\t\t}\n\t\treturn $obj_ids;\n\t}", "public function getColorId() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"colorId\");\n\t}", "public function getStyle(): string\n {\n return $this->style;\n }", "public function getStyle(): string\n {\n return $this->style;\n }", "public function getTheme_id()\n {\n return $this->theme_id;\n }", "public function getCssIdHtml() {\n return ($this->cssId ? ' id=\"'.$this->cssId.'\"' : '');\n }", "protected function get_style() {\n $style = $this->getMapped('style');\n if (false !== $style)\n return $style;\n $q = new Query(\"select\");\n $q->where(\"id = ?\", $this->style_id);\n $style = StyleBean::select($q);\n return $style !== false ? $style : false;\n }", "public function getThemeID()\n {\n return $this->themeID;\n }", "public function getThemeID()\n {\n return $this->pThemeID;\n }", "public function get_style($id)\n\t{\n\t\t$info = array(\n\t\t 'id' => 1,\n\t\t 'theme' => 'green',\n\t\t 'sign' => 'diaocha',\n\t\t 'filename' => 'index.html',\n\t\t);\n\t\treturn $info;\n\t}", "protected function getThemeId() : int\n\t{\n\t\tif ($this->app->user->id && $this->app->user->theme_id) {\n\t\t\treturn $this->app->user->theme_id;\n\t\t}\n\n\t\treturn $this->app->config->theme_default;\n\t}", "public function getIdTheme() {\n return $this->idTheme;\n }", "protected function id ($attachment, $style = '') \n {\n return $this->get_key();\n }", "private function get_liveblog_id() {\n\t\treturn elb_is_liveblog() ? get_the_ID() : $this->liveblog_post_id;\n\t}", "function getStyle()\n\t{\n\t\treturn $this->style;\n\t}", "function sw_get_main_id() {\n\treturn 'some-id';\n}", "protected function getPreviewPid() : int {}", "public function mb_get_id() {\n\t\treturn version_compare( WC_VERSION, '3.0', '>=' ) ? $this->get_id() : $this->id;\n\t}", "protected function getSourceID()\n\t{\n\t\t$source_id = NULL;\n\t\t\n\t\tswitch ($this->call_type)\n\t\t{\n\t\t\tcase self::TYPE_AGEAN_PERF: \t$source_id = 9; break;\n\t\t\tcase self::TYPE_AGEAN_TITLE: \t$source_id = 10; break;\n\t\t}\n\t\t\n\t\treturn $source_id;\n\t}", "private function getTemplateCSSStyleFromDB($template_id){\n\t\t$query = $this->db->query(\"SELECT style FROM wms_template_style WHERE template_id = '$template_id'\");\n\n\t\tif ($query->num_rows() > 0)\n\t\t{\n\t\t\t$result_obj = $query->row() ;\n\t\t\t\n\t\t\t//Return the template ID\n\t\t\treturn $result_obj->style ;\n\t\t}\n\t\treturn false;\n\t}", "function wct_talks_get_id() {\n\t\t/**\n\t\t * @param int the talk ID to output\n\t\t */\n\t\treturn apply_filters( 'wct_talks_get_id', wct()->query_loop->talk->ID );\n\t}", "function getStyle() { return $this->_style; }", "function getStyle() { return $this->_style; }", "function getStyle() { return $this->_style; }", "function getStyle() { return $this->_style; }", "function getStyle() { return $this->_style; }", "public function getID(){\n\t\t//echo '<!-- Slider Revolution Notice: Please do not use RevSliderSlider->getID() anymore, use RevSliderSlider->get_id() instead -->'.\"\\n\";\n\t\treturn $this->get_id();\n\t}", "public function getId() {\n\t\treturn $this->get('rssid');\n\t}", "public function get_active_theme_id(){\n $this->db->where('is_active', 1);\n $this->db->limit(1);\n $data = parent::get();\n $theme_id = $data[0]->id;\n return $theme_id;\n }", "function get_style_name( $instance ) {\r\n\t\treturn false;\r\n\t}", "public function getFontId() {\n\t\treturn $this->_arrInfo[3];\n\t}", "function get_style_name($instance) {\n\t\treturn false;\n\t}", "public function getId() {\n\t\t$id = $this->getIdBySnowflakeService ();\n\t\tif (! $id) {\n\t\t\t$id = $this->getIdByLocalSnowflake ();\n\t\t}\n\t\t\n\t\treturn $id;\n\t}", "function vidId()\t\t\t{ return $this->dbValue('wf_resources_id'); }", "function get_the_ID()\n{\n}", "function get_active_theme( $blog_id ) {\n global $wpdb;\n\n $blog_prefix = self::get_blog_prefix( $blog_id );\n\n $active_theme = $wpdb->get_var( \"SELECT option_value FROM \" . $blog_prefix . \"options WHERE option_name = 'stylesheet'\" );\n\n return $active_theme;\n }", "public function getIdColor()\n {\n return $this->id_color;\n }", "public function get_id() { // Declare \\Markguyver\\LivefyreImporter\\Data\\Livefyre\\Base->get_id() function\n\t\t\treturn $this->id;\n\t\t}", "public function getID() {\n\n\t\t$id = parent::get('id'); \n\t\tif($id) return $id; \n\n\t\t$id = \tparent::get('title') . ',' . \n\t\t\t\tparent::get('created') . ',' . \n\t\t\t\tparent::get('from') . ',' . \n\t\t\t\tparent::get('src_id') . ',' . \n\t\t\t\t($this->page ? $this->page->id : '?'); // . ',' . \n\t\t\t\t//parent::get('flags');\n\n\t\treturn 'noID' . md5($id); \n\t}", "public function getStyleName() { return $this->_style; }", "public static function getId() {\n static::$_last_id=(static::$widgetPrefix ? static::$widgetPrefix : \\yii\\base\\Widget::$autoIdPrefix) . static::getAutoIdPrefix() . static::$counter++ . static::$suffix;\n return static::$_last_id;\n }", "public static function getCurrentStyle()\n {\n // Ceck if request contains chat style\n $style_name = verify_param(\"style\", \"/^\\w+$/\", \"\");\n if (!$style_name) {\n // Use the default style\n $style_name = self::getDefaultStyle();\n }\n\n // Get all style list and make sure that in has at least one style.\n $available_styles = self::getAvailableStyles();\n if (empty($available_styles)) {\n throw new \\RuntimeException('There are no dialog styles in the system');\n }\n\n // Check if selected style exists. If it does not exist try to fall back\n // to \"default\". Finally, if there is no appropriate style in the system\n // throw an exception.\n if (in_array($style_name, $available_styles)) {\n return $style_name;\n } elseif (in_array('default', $available_styles)) {\n return 'default';\n } else {\n throw new \\RuntimeException('There is no appropriate dialog style in the system');\n }\n }", "function wct_talks_the_id() {\n\techo wct_talks_get_id();\n}", "public function getCurrentSiteId();", "protected function getPageId()\n {\n // @extensionScannerIgnoreLine\n return $this->getTypoScriptFrontendController()->id;\n }", "function lookup_style_id( $table, $car_name ) {\n\t\t// if lookup succeeds\n\t\t$query = \"SELECT * FROM \" . $table . \" WHERE model_name='\" . $car_name . \"'\";\n\t\t//echo $query;\n\t\t$resource = mysql_query($query); // returning false. hmmmmm.\n\t\tif ( !$resource ) { echo \"<br/>query resource is false<br/>\"; }\n\t\t// puts the resource into the $info array \n\t\t$info = mysql_fetch_array( $resource ); \n\t\treturn( $info['style_id'] );\n\t\t\n\t}", "public function get_cache_id() {\n\t\t\treturn apply_filters( 'cherry_cached_widget_id', $this->widget_id );\n\t\t}", "function _getNrLMsIndividualStyles()\n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\t// joining with style table (not perfectly nice)\n\t\t$q = \"SELECT count(*) as cnt FROM content_object, style_data \".\n\t\t\t\" WHERE stylesheet = style_data.id \".\n\t\t\t\" AND standard = \".$ilDB->quote(0, \"integer\");\n\t\t$cset = $ilDB->query($q);\n\t\t$crow = $ilDB->fetchAssoc($cset);\n\n\t\treturn (int) $crow[\"cnt\"];\n\t}", "public function getStyle() {\n\t return $this->root->options['style'];\n\t}", "function the_ID()\n{\n}", "function getClassId() ;", "public function id() : int\n\t\t{\n\t\t$parts = \\explode('_', static::class);\n\n\t\treturn (int)$parts[1];\n\t\t}", "public function getID() {\n // returns the ID of the current Score.\n return $this->id;\n }", "public function getId(): string\n {\n return 'turnover';\n }", "protected function getSourceID()\n\t{\n\t\t$source_id = NULL;\n\t\t\n\t\tswitch ($this->call_type)\n\t\t{\n\t\t\tcase self::TYPE_IDVE_IMPACT:\t$source_id = 5; break;\n\t\t\tcase self::TYPE_PDX_REWORK:\t\t$source_id = 6; break;\n\t\t\tcase self::TYPE_IDVE_IFS:\t\t$source_id = 12; break;\n\t\t\tcase self::TYPE_IDVE_IPDL:\t\t$source_id = 13; break;\n\t\t\tcase self::TYPE_IDVE_ICF:\t\t$source_id = 14; break;\n\t\t}\n\t\t\n\t\treturn $source_id;\n\t}", "function _getPublicationFormatId() {\n\t\t$publicationFormat =& $this->getAuthorizedContextObject(ASSOC_TYPE_PUBLICATION_FORMAT);\n\t\treturn $publicationFormat->getId();\n\t}", "public static function getUrlId()\n {\n if (0 === self::$url_id && rex_addon::get('url')->isAvailable() && rex_version::compare(\\rex_addon::get('url')->getVersion(), '2.0', '>=')) {\n // URL Addon 2.x\n $manager = \\Url\\Url::resolveCurrent();\n if ($manager instanceof \\Url\\UrlManager) {\n self::$url_id = (int) $manager->getDatasetId();\n }\n }\n return self::$url_id;\n }", "function avia_get_the_ID()\n\t{\n\t\tglobal $avia_config;\n\t\t$ID = false;\n\n\t\tif(!isset($avia_config['real_ID']))\n\t\t{\n\t\t\tif(!empty($avia_config['new_query']['page_id']))\n\t\t\t{\n\t\t\t\t$ID = $avia_config['new_query']['page_id'];\n\t\t\t\t$avia_config['real_ID'] = $ID;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$post = get_post();\n\t\t\t\tif(isset($post->ID))\n\t\t\t\t{\n\t\t\t\t\t$ID = $post->ID;\n\t\t\t\t\t$avia_config['real_ID'] = $ID;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$ID = false;\n\t\t\t\t}\n\t\t\t\t//$ID = @get_the_ID();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$ID = $avia_config['real_ID'];\n\t\t}\n\n\t\t$ID = apply_filters('avf_avia_get_the_ID', $ID);\n\n\t\treturn $ID;\n\t}", "public function getFlexsliderHtmlId()\n {\n return 'pengo-bannerslider-flex-slider-'.$this->getSlider()->getId().$this->_stdlibDateTime->gmtTimestamp();\n }", "function theme()\n{\n $setting = SiteInformation::query()->first();\n return $setting->theme_id;\n}", "protected function getPageId(): int\r\n {\r\n // @extensionScannerIgnoreLine\r\n return (int) $GLOBALS['TSFE']->id;\r\n }", "public function getPreviewId() {\n return @$this->attributes['preview_id'];\n }", "public static function get_id() {\n return static::$id;\n }", "public function getStyle($type){ }", "public function getID()\n {\n return $this->soc_id;\n }", "function hotel_lux_tribe_events_pro_widget_calendar_stylesheet_url() {\r\n\t$styleUrl = '';\r\n\t\r\n\t\r\n\treturn $styleUrl;\r\n}", "function wpmanual_the_id(){\r\n\techo wpmanual_get_the_id();\r\n}", "function gcse_id() {\n\treturn get_theme_mod('uwmadison_google_cse_id', false);\n}", "public function getStyle(){\r\n if (count($this->T_STYLES) == 0) return '';\r\n $tmp = ' style=\"';\r\n foreach ($this->T_STYLES as $KS => $ST){\r\n $tmp .= $KS.':'.$ST.'; ';\r\n }\r\n return $tmp.'\"';\r\n }", "public function GetUrlObjectId() {\n\t\n\t\t$_URLObject = FrontIndexController::GetInstance()->GetUrlObject();\n\t\treturn $_URLObject->GetId();\n\t}", "public function getHtmlId()\r\n\t{\r\n\t\t$id = method_exists($this, 'id') ? $this->id() : null;\r\n\t\t$prefix = property_exists($this, 'htmlPrefix') ? $this->htmlPrefix : null;\r\n\t\treturn zbase_string_camel_case($prefix . '_' . $id);\r\n\t}", "public function getID();", "public function getID();", "public function getID();", "public function getStylepath()\n {\n return $this->stylepath;\n }", "public function getStyle()\n {\n return $this->SelectedStyle ? $this->SelectedStyle : $this->template_style;\n }", "function ID()\n {\n #echo \"eZNewsUtility::ID()<br />\\n\";\n $value = 0;\n \n if ( $this->State_ != \"new\" )\n {\n $value = $this->ID;\n }\n \n return $value;\n }", "public function get_css()\n\t\t{\n\t\t\treturn ( isset($this->code_secret[\"url_style\"]) ) ? $this->get_secret(\"url_style\"):\"\";\n\t\t}", "public function get_user_style();", "public function getStorableFormat(){\n return $this->_properties['id'];\n }", "public function getStorableFormat(){\n return $this->_properties['id'];\n }", "public function getServiceID() //Get Service ID\n\t{\n\t\treturn $this->serviceID;\n\t}", "function get_counter_text_style() {\n\t$style = '';\n\tglobal $COUNTER_FONT;\n\tif(!empty($COUNTER_FONT)) $style = $style . \"font: $COUNTER_FONT;\";\n\tglobal $COUNTER_COLOR;\n\tif(!empty($COUNTER_COLOR)) $style = $style . \"color: $COUNTER_COLOR;\";\n\t\n\t// Apply inline style to all necessary selectors\n\tif(!empty($style)) {\n\t\t$style = \"{$style} :link, :visited, :active, :link:hover, :visited:hover, :active:hover {$style}\"; \n\t}\n\t\n\treturn $style;\n\t\t\n}", "public function getStyle()\n {\n return Str::of($this->block->className ?? null)\n ->matchAll('/is-style-(\\S+)/')\n ->get(0) ??\n Arr::get(collect($this->block->styles)->firstWhere('isDefault'), 'name');\n }", "public function getDocliteId(): string\n {\n return $this->id;\n }" ]
[ "0.6981677", "0.6972972", "0.677369", "0.6612029", "0.6583603", "0.6539067", "0.6443468", "0.63163286", "0.6285657", "0.61799276", "0.6064171", "0.60551757", "0.60016006", "0.59326065", "0.59326065", "0.5930107", "0.58790797", "0.5874403", "0.5874403", "0.586798", "0.5852719", "0.5800885", "0.5796767", "0.5787596", "0.5762401", "0.5760713", "0.57433116", "0.5742505", "0.5730071", "0.5680897", "0.56798756", "0.5658907", "0.56561315", "0.563726", "0.56331515", "0.5627863", "0.5617333", "0.5617333", "0.5617333", "0.5617333", "0.5617333", "0.5596745", "0.55839574", "0.5582937", "0.5564074", "0.5558511", "0.55465895", "0.5541225", "0.5518221", "0.5514588", "0.5478109", "0.5476989", "0.5476027", "0.54721004", "0.5456606", "0.5447201", "0.54449904", "0.5444435", "0.54428136", "0.54352367", "0.5425524", "0.5405192", "0.5390007", "0.53883713", "0.5387852", "0.53845686", "0.53834426", "0.53822297", "0.5380135", "0.5379238", "0.5374158", "0.53724325", "0.53489983", "0.53480285", "0.5347389", "0.5343846", "0.53421354", "0.5338937", "0.5336168", "0.53348804", "0.5333464", "0.533306", "0.5326493", "0.53215", "0.5319477", "0.5315523", "0.5307952", "0.5307952", "0.5307952", "0.53071964", "0.5306629", "0.53064626", "0.53044534", "0.5302312", "0.52864045", "0.52864045", "0.5284534", "0.52841675", "0.5275576", "0.52744675" ]
0.76695305
0
Check if Gameset is live
Проверить, активен ли Gameset
public function is_gameset_live($gameset_id){ if(is_array($gameset_id)){ if(empty($gameset_id)) return false; return in_array($this->get_gameset_id(),$gameset_id); } else if( is_numeric($gameset_id) || is_int($gameset_id) ){ if( $gameset_id == 0 ) return false; return ($gameset_id == $this->get_gameset_id()); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isLive()\n\t{\n\t\treturn $this->isSaved() && $this->status == self::STATUS_LIVE;\n\t}", "public function isGameActive();", "public function isLive()\n {\n return 'live' == $this->getMode();\n }", "public function isLive()\n {\n return Director::isLive();\n }", "public function isLive()\n {\n return $this->traitIsLive();\n }", "public function isLive() {\n\t\treturn ($this->getWorkspace()->getBaseWorkspace() === NULL);\n\t}", "function live_mode()\n {\n return current_mode() === 'live';\n }", "private function _isLive()\r\n {\r\n if (strpos($this->_urlInFull, 'fencingtimelive') !== false) {\r\n $this->_isFencingtimeLive = 1;\r\n }\r\n }", "public function isLive()\n {\n $start = strtotime( $this->date_start );\n $end = strtotime( $this->date_end );\n $now = strtotime( 'now' );\n\n if ( $now >= $start && $now <= $end && $this->is_delete != 1 ) {\n\n return true;\n\n } else {\n\n return false;\n\n }\n\n }", "public static function isLive() {\n if($_SERVER['HTTP_HOST'] != 'localhost' && App::get('live', 'configs', true)) {\n return true;\n }\n return false; \n }", "public function isLive()\n {\n return config('przelewy24.mode', 'sandbox') === 'live';\n }", "public function isAlive(){\n if ($this->lifePoints > 0) {\n return true;\n } else{\n return false;\n }\n }", "public function getExistsOnLive()\n {\n return (bool)Versioned::get_versionnumber_by_stage('ContentModule', 'Live', $this->ID);\n }", "public function isInLiveDev();", "function isAlive() {}", "public function isAlive()\n {\n if ($this->life > 0){\n return true;\n }\n else {\n return false;\n }\n }", "function getExistsOnLive() {\n\t\treturn (bool) Versioned::get_versionnumber_by_stage(get_class($this->owner), 'Live', $this->owner->ID);\n\t}", "public function isAlive()\n {\n return $this->points > 0;\n }", "public function isIdle(): bool;", "public function checkPlaying() {\n return $this->run('current') ? true : false;\n }", "private function isRunning()\n {\n return $this->getPid() > 0;\n }", "function isLive()\n{\n if ($_SERVER['REMOTE_ADDR'] == '127.0.0.1' || $_SERVER['REMOTE_ADDR'] == '::1') {\n return false;\n }\n return true;\n}", "public function isFresh(){ }", "public function checkGames() {\n foreach ($this->getGameIds(TRUE) as $game_id) {\n $game = tourney_game_load($game_id);\n if (!$game->getWinner()) {\n return FALSE;\n }\n }\n return TRUE;\n }", "public function hasStoptime(){\n return $this->_has(6);\n }", "public function hasPlayer(){\r\n return $this->_has(1);\r\n }", "private function is_live()\n {\n if( $this->live_mode != null )\n {\n return $this->live_mode;\n }\n\n return config('easypay.live_mode');\n }", "public function isGameTied()\n {\n $square_1 = $this->square_1;\n $square_2 = $this->square_2;\n $square_3 = $this->square_3;\n $square_4 = $this->square_4;\n $square_5 = $this->square_5;\n $square_6 = $this->square_6;\n $square_7 = $this->square_7;\n $square_8 = $this->square_8;\n $square_9 = $this->square_9;\n\n if ($square_1 && $square_2 && $square_3 && $square_4 && $square_5 && $square_6 && $square_7 && $square_8 && $square_9 ){\n if (!$this->tie){\n $this->tie = true;\n $this->save();\n }\n return true;\n }\n }", "private function checkExisting()\n\t{\n\t\tif ($this->gameModel->getGameId())\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "protected function canGenerateCache() {\n\t\treturn Versioned::current_stage() == 'Live';\n\t}", "public function exist($get) {\r\n $game = $this->getGame($get['id']);\r\n \r\n if($game == NULL) {\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\n }", "public function isAlive()\n {\n return $this->state;\n }", "public function isRunning() {}", "public function isRunning() {}", "public function getLive()\n {\n return $this->live;\n }", "public function getLive()\n {\n return $this->live;\n }", "public function isRunning();", "public function stCheckEndOfGame()\n {\n return false;\n }", "public function isGameFinished()\n {\n $now = new \\DateTime();\n if ($now->getTimestamp() - $this->timestamp >= self::GAME_TIME) {\n return true;\n }\n\n return false;\n\n }", "public function hasCurrent(): bool;", "function test_live_is_true(){\n\t\tupdate_option( 'siteurl', 'http://wptt-logging.com' );\n\t\t$this->assertTrue( $this->plugin->is_live(), 'is_live() should be true' );\n\t}", "public function isEndGame();", "function islive(){\n return strpos(strtolower($_SERVER['HTTP_HOST']), \"didueat.ca\") !== false;\n }", "function isRunning();", "public function isFresh()\n {\n return false;\n }", "public function wasFreshInstance() : bool;", "public function isRunning(): bool;", "public function should_run()\n\t{\n\t\treturn $this->config['inactive_users_last_gc'] < time() - $this->config['inactive_users_gc'];\n\t}", "public function is_running()\n {\n return is_null($this->next_season());\n }", "protected function get_is_fresh(): bool\n\t{\n\t\treturn $this->ttl > 0;\n\t}", "public function hasIsWin(){\r\n return $this->_has(6);\r\n }", "public function checkStartedWithoutPlayers()\n {\n\n $rsm = new ResultSetMappingBuilder($this->em);\n $rsm->addRootEntityFromClassMetadata('AppBundle:Game', 'g');\n $rsm->addFieldResult('g', 'G_ID', 'id');\n\n //\"SELECT g.G_ID, count(p.U_ID) as num FROM `karo_games` as g left join karo_teilnehmer as p on g.G_ID=p.G_ID where g.G_ID >= 94760 group by g.G_ID having num=0 order by g.G_ID asc \",\n $sql = \"SELECT g.G_ID, count(p.U_ID) AS num FROM `karo_games` AS g LEFT JOIN karo_teilnehmer AS p ON g.G_ID=p.G_ID WHERE g.U_ID != 26 GROUP BY g.G_ID HAVING num=0 ORDER BY g.G_ID ASC\";\n $query = $this->em->createNativeQuery(\n $sql,\n $rsm\n );\n /** @var Game $game */\n\n $games = $query->execute();\n foreach ($games as $game) {\n $this->logger->info(\"Game started without players: \".$game->getId());\n $this->checker->ensureFinished($game);\n }\n\n }", "public function isSandbox()\n {\n return ! $this->isLive();\n }", "public function isSandbox()\n {\n return ! $this->isLive();\n }", "public function isOnline() {}", "function isAlive(){\n PackageManagerComm::initialize(false);\n\n $status = $GLOBALS['SugarDepot']->call('sugarPing', array());\n if (empty($status) || $GLOBALS['SugarDepot']->getError() || $status != 'ACTIVE') {\n return false;\n }else{\n return true;\n }\n }", "public function hasMonitoring(){\n return $this->_has(28);\n }", "public function CheckMonet() {\n\n\t\t\t// if ( $this->UnitTestFlg ) $this->AddConsoleMsg( \"Check Monet State\" );\n\t\t\t$StrtTime = microtime(true);\n\n\n\n\t\t\treturn( 0 );\n }", "public function hasVoicetime(){\n return $this->_has(8);\n }", "public function isCurrentlyUsed($planet_id) {return $this->redis->keys(\"planete_\".$planet_id);}", "public function GameOver() {\n\n if ($_SESSION[\"galgen_Setzen\"] >= 9) {\n return true;\n } else\n return false;\n}", "public function isRunning() :bool;", "function hasRunData() {\n\t\treturn ($this->getLastRunId()) ? true : false;\t\n\t}", "public function isGameOver()\n {\n\n }", "public function used():bool;", "public function areMonstersLoaded()\n {\n return isset($this->monsters);\n }", "function checkTime() {\n //By the \"Theater\" class\n \n\t\t$time = $this -> film[\"data\"][0][\"film_end_time\"] + 1800;\n \t\n if (($this -> film[\"data\"][0][\"screening_allow_latecomers\"] != \"true\") && ($time < timestamp())) {\n $this -> valid = false;\n $this -> state = \"Screening Time\";\n return false;\n }\n return true;\n }", "public function hasState() : bool;", "public function isStarted() {\n if (!$this->id) {\n throw new Exception(t('Match entity must first be setup before use.'));\n }\n\n $games = tourney_game_load_multiple($this->getGameIds());\n $started = FALSE;\n\n if (!empty($games)) {\n foreach ($games as $game) {\n $started = ($started) ? TRUE : $game->isStarted();\n }\n }\n\n return $started;\n }", "public function isRunning()\n {\n return false;\n }", "public function hasRealtimeStats(){\n return $this->_has(4);\n }", "function CheckStartGame()\n {\n $now = date(\"U\");\n $gameArray = $this->GetGame(null, true);\n \n if (is_array($gameArray))\n {\n foreach ($gameArray as $game)\n {\n \n // If a game isnt the current game but has a start_time passed, reset it back to 0 so it doesn't cause issues if it gets marked current. Only do this is the game is not archives\n if (!$game['current'] && ($now > $game['start_time']) && !$game['archive'])\n {\n // mark start_time as 0\n $this->UpdateGameColumn($game['gid'], 'start_time', '0');\n\n $GLOBALS['Cache']->RemoveFromCache('games_all');\n $GLOBALS['Cache']->RemoveFromCache('game_'.$game['gid']);\n $GLOBALS['Cache']->RemoveFromCache('game_current_state');\n $GLOBALS['Cache']->RemoveFromCache('games_joinable');\n \n }\n \n if ($game['current'] && !$game['active'] && !$game['archive'] && ($now >= $game['start_time']) && $game['start_time'] != 0)\n {\n \n // First mark all people who did not attend an orientation as deceased\n $GLOBALS['User']->DidNotAttendOrientation();\n \n // Get all the OZs for this game\n $ozArray = $this->GetOZs($game['gid']);\n if (is_array($ozArray))\n {\n $to = '';\n foreach ($ozArray as $oz)\n {\n $to .= $oz['email'].',';\n }\n }\n \n // Now send them an email\n $subject = \"\".UNIVERSITY.\" HvZ You Are An Original Zombie!\";\n $body = \"Hello,\\n\\rYou were randomly chosen to be an Original Zombie for the {$game['name']} game! This means that you start off as a zombie and can immediately begin tagging humans.\\n\\rRemember, Original Zombies DO NOT have to wear their bandanna on their head for the first 24 hours of the game. You may disguise yourself as a human!\\n\\rGood luck hunting! If there is a problem and you cannot be an Original Zombie, please contact the moderators immediately via the HvZ Mizzou Help Line (573.833.0385)\\n\\r\";\n \n $attachFooter = true;\n $bcc = true;\n $GLOBALS['Mail']->SimpleMail($to, $subject, $body, $attachFooter, $bcc);\n \n \n // Now we need to email everyone that the game has officially begun\n $allPlayers = $this->GetPlayers($game['gid'], 'all', null, null, null);\n if (is_array($allPlayers))\n {\n $to = '';\n foreach ($allPlayers as $player)\n {\n $to .= $player['email'].',';\n }\n }\n \n // Now send them an email\n $subject = \"\".UNIVERSITY.\" HvZ {$game['name']} Has Officially Begun!\";\n $body = \"Hello,\\n\\rThis email is to inform you that the Humans vs. Zombies {$game['name']} has officially begun! Remember you must carry your Secret Game ID and bandanna with you at all times.\\n\\rYou have received a seperate email if you are an Original Zombie -- If you have not received it then you are a human.\\n\\rGood luck! If you have any questions or concerns please contact a moderator.\\n\\r\";\n \n $GLOBALS['Mail']->SimpleMail($to, $subject, $body, true, false);\n \n // mark game active\n $this->UpdateGameColumn($game['gid'], 'active', '1');\n \n }\n \n\n }\n }\n \n\n }", "public function getLifetime() {\n return false;\n }", "public function isCurrentlyActive() {\n return $this->lastActive->diff(new DateTime(\"now\", $this->app->serverTimeZone))->i < 5;\n\n }", "public function isGameOver()\r\n {\r\n $res = false;\r\n $counts = array_count_values($this->getPlayerStatus());\r\n if($counts[1] == 1){ $res = true;}\r\n if(!$this->getCardsInDeck()){ $res = true;}\r\n return $res;\r\n }", "public function checkSession() \n\t{\n\t\t\n\t\t//Time between last hit and current hit\n\t\tif($this -> registry -> getSetting(\"DbEngine\") == \"sqlite\")\n\t\t{\n\t\t\t$time = $this -> db -> getCell(\"SELECT `last_hit` \n\t\t\t\t\t\t\t FROM `\".$this -> table.\"` \n\t\t\t\t\t\t\t\t\t\t\tWHERE `user_id`='\".$this -> id.\"' \n\t\t\t\t\t\t\t\t\t\t\tAND `session_id`='\".session_id().\"'\");\n\t\t\t\n\t\t\t$time = time() - I18n :: dateToTimestamp($time);\n\t\t}\n\t\telse\n\t\t\t$time = $this -> db -> getCell(\"SELECT (\".$this -> db -> unixTimeStamp('now').\"-\".\n\t\t\t\t\t\t\t\t\t\t\t$this -> db -> unixTimeStamp('last_hit').\") \n\t\t\t\t\t\t\t FROM `\".$this -> table.\"` \n\t\t\t\t\t\t\t\t\t\t\tWHERE `user_id`='\".$this -> id.\"' \n\t\t\t\t\t\t\t\t\t\t\tAND `session_id`='\".session_id().\"'\");\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t$user = $this -> db -> getCount($this -> table, \"`user_id`='\".$this -> id.\"'\n\t\t AND `ip_address`='\".ip2long($_SERVER['REMOTE_ADDR']).\"' \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tAND `user_agent`='\".md5($_SERVER['HTTP_USER_AGENT']).\"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tAND `session_id`='\".session_id().\"'\"); \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t //Makes sure it is the same user as previous\n\t\t\n\t\treturn (bool)($time < $this -> registry -> getSetting(\"SessionLifeTime\") && $user == 1); //Checks both conditions\n\t}", "function isAlive() {\n return !($this->iHealth <= 0); \n }", "public function hasState(): bool;", "public function hasAlive()\n {\n $this->refresh();\n return (count($this->pool) > 0 || count($this->queue) > 0);\n }", "public function playbackStatus(): bool;", "public function is_online()\n {\n \t$ten_minutes_ago = time() - (10 * 60);\n \t\t$lastseen_at = strtotime($this->lastseen_at);\n \n \treturn (!($lastseen_at < $ten_minutes_ago));\n }", "public function hasTime(){\n return $this->_has(1);\n }", "public function getGameOver(): bool\n {\n return $this->gameOver;\n }", "public function isLiveChannel()\n {\n return ($this->getLiveChannel()) ? true : false;\n }", "public function isSeen() : bool{\n\t\treturn $this->seen;\n\t}", "public function isLoaded(): bool;", "function isWatching() {\n return ($this->Session->val('limit') and $this->Session->val('limit') > 0);\n }", "public function live()\n {\n return $this->filter(\n function (PostInterface $post) {\n return $post->isLive();\n }\n );\n }", "public function live()\n {\n return $this->filter(\n function (PostInterface $post) {\n return $post->isLive();\n }\n );\n }", "public function isInPlay() {\n\t\treturn isset($_GET[self::$playURL]);\n\t}", "private function isFarmerAlive(){\n if (count($_SESSION['fed_details']['fed_to'])>FARMER_LIMIT) {\n $farmer_feds = $this->getRecentFed(FARMER_LIMIT);\n $farmer_key = array_search('farmer',$farmer_feds);\n $this->is_famer_alive = $farmer_key ? true:false;\n unset($this->elements[$farmer_key]);\n $_SESSION['fed_details']['elements'] = $this->elements;\n }\n return $this->is_famer_alive;\n }", "public function hasServertime()\n {\n return $this->get(self::SERVERTIME) !== null;\n }", "public function is_started();", "public function hasPooltime(){\n return $this->_has(3);\n }", "public function is_ready();", "public function hasMonsterid(){\n return $this->_has(1);\n }", "public function hasMonsterid(){\n return $this->_has(1);\n }", "public function getStats(): bool {}", "public function getStats(): bool {}", "public function isOnline()\n {\n return Cache::has('user-online-' . $this->id);\n }" ]
[ "0.7016417", "0.6780875", "0.6771124", "0.6739314", "0.6733525", "0.6693207", "0.6602792", "0.6520407", "0.65179217", "0.6482601", "0.6466322", "0.6440399", "0.63935703", "0.63909763", "0.6366066", "0.62541735", "0.6207929", "0.6143987", "0.609033", "0.60826415", "0.6074135", "0.60710037", "0.60597396", "0.60319394", "0.60269135", "0.6022351", "0.6014414", "0.5997359", "0.59929", "0.59809464", "0.59727925", "0.59534645", "0.59508055", "0.59508055", "0.5944574", "0.5944574", "0.5942437", "0.5928791", "0.59180826", "0.59143156", "0.58950895", "0.58408326", "0.5832777", "0.5817925", "0.58170366", "0.58161867", "0.5808254", "0.5800295", "0.5798974", "0.5764619", "0.57611465", "0.5759333", "0.5756059", "0.5756059", "0.5734546", "0.5725308", "0.5724473", "0.5718968", "0.56973857", "0.56856865", "0.5680528", "0.56725776", "0.56617683", "0.5657888", "0.56520057", "0.56490886", "0.5643861", "0.5637815", "0.56313264", "0.562921", "0.5620277", "0.56048733", "0.5603886", "0.56026804", "0.5601086", "0.55867755", "0.55854833", "0.55827105", "0.5582517", "0.5582493", "0.5581406", "0.55799335", "0.55740035", "0.5573449", "0.55722857", "0.5564431", "0.55638415", "0.5542316", "0.5542316", "0.5537859", "0.553033", "0.5525577", "0.5522141", "0.55213565", "0.55209035", "0.5520147", "0.5520147", "0.5517059", "0.5517059", "0.55104816" ]
0.7353804
0
Get manufacturer rate of a product
Получить производственную ставку продукта
public function manufacturer_rate($product_id) { $this->db->select('manufacturer_price'); $this->db->from('product_information'); $this->db->where(array('product_id' => $product_id)); $query = $this->db->get(); return $query->result_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCarRate()\n {\n return $this->get(self::CARRATE);\n }", "public function getRate(): float;", "public function getRate();", "public function getRate();", "public function getRated() {\n\t\t$rate = ProductRate::where('product_id', '=', $this->id)->first();\n\t\tif($rate) {\n\t\t\t$rate1 = $rate->sao1;\n\t\t\t$rate2 = $rate->sao2;\n\t\t\t$rate3 = $rate->sao3;\n\t\t\t$rate4 = $rate->sao4;\n\t\t\t$rate5 = $rate->sao5;\n\t\t\t$rate_count = $rate1 + $rate2 + $rate3 + $rate4 + $rate5;\n\t\t\t$rated = $rate_count != 0 ? ($rate1 + $rate2 * 2 + $rate3 * 3 + $rate4 * 4 + $rate5 * 5) / $rate_count : 0;\n\t\t} else {\n\t\t\t$rated = 0;\n\t\t}\n\n\t\treturn $rated;\n\t}", "public function invoice_data_manufacturer_rate($product_id,$startdate,$enddate)\n\t{\n\t\t\n\t\t$this->db->select('\n\t\t\t\t\tdate,\n\t\t\t\t\tsum(quantity) as quantity,\n\t\t\t\t\trate,\n\t\t\t\t\t-rate*sum(quantity) as total_price,\n\t\t\t\t\taccount\n\t\t\t\t');\n\n\t\t$this->db->from('view_product_report');\n\t\t$this->db->where('product_id',$product_id);\n\n\t\t$this->db->where('date >=',$startdate);\n\t\t$this->db->where('date <=',$enddate);\n\n\t\t$this->db->group_by('account');\n\t\t$this->db->order_by('date','asc');\n\t\t$query = $this->db->get();\n\t\n\t\tif ($query->num_rows() > 0) {\n\t\t\treturn $query->result_array();\t\n\t\t}\n\t\treturn false;\n\t}", "function disRates($productid)\n\t{\n\t\t$sql='select min(msrp) as msrp from msrp_by_quantity_table where product_id ='.$productid;\n\t\t$obj=new Bin_Query();\n\t\t$obj->executeQuery($sql);\n\t\t$val=$obj->records;\n\t\treturn $val[0]['msrp'];\n\t}", "function ol_get_stars_product( $rating ) {\n\treturn $rating * 100 / 5;\n}", "public function getRate(): string;", "public function getBestSellProduct()\n {\n }", "public function getBestSellProduct()\n {\n }", "public function getRateValue(): float;", "public function getRate(){\n return $this->rate;\n }", "public function get_manufacturer_policy1() {\n\n $query = $this->db->get('manufacturers_plan_one');\n return $query->result();\n }", "public function getRate()\n {\n return $this->attributes->mustHave('rate')->asString();\n }", "public function getRate(){\n\n\t\t\t\treturn $this->rate;\n\n\t\t\t}", "public function getRate(){\r\n\t\t$db\t\t= $this->getDbo();\r\n\t\t$rateId = $this->getState('filter.rate_id');\r\n\t\t$query\t= $db->getQuery(true)\r\n\t\t->select('*')\r\n\t\t->from('#__hotelreservation_offers_rates')\r\n\t\t->where('id='.$rateId);\r\n\t\t$db->setQuery($query,0,1);\r\n\t\t$rate = $db->loadObject();\r\n\t\r\n\t\treturn $rate;\r\n\t}", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getManufacturer() {\n return $this->manufacturer;\n }", "public function getRate(): float\n {\n\n $command = new Commands\\Rate();\n return $command->getFormattedOutput();\n\n }", "public function getCurrentRate(){\n\n\t\t$_calc = \\Mage::getSingleton('tax/calculation');\n\t\t$_rates = $_calc->getRatesForAllProductTaxClasses($_calc->getRateRequest());\n\n\t\tforeach ($_rates as $_class=>$_rate) {\n\t\t $_result = $_rate;\n\t\t}\n\n\t\treturn floatval($_result);\n\t}", "public function getProduct();", "public function getProduct();", "public function getProduct();", "function getProduct();", "function getProduct();", "public function getQualityRating();", "public function getManufacturer() {\n\n return $this->manufacturer;\n }", "function fuelRatio($tech)\n{\n\treturn 1 - pow(0.005 * $tech, 3); // TODO\n}", "function getManufacturer() {\n\t\treturn wurflManufacturer::getInstance($this->_ManufacturerID);\n\t}", "function get_nominal_rate($db_connection, $car_model){\n\n\t$res = $db_connection->query( \"SELECT nominal_rate FROM car_models WHERE model=\".\"'\".$car_model.\"'\");\n\tif(!$res)\n\t\treturn false;\n\t\n\t$return = $res->fetch_assoc();\n\treturn $return['nominal_rate'];\n}", "public static function get_average_rating_for_product(&$product)\n {\n }", "public function getProduct(Product $product);", "public function getManufacturer() {\n\t\tif($this->manufacturerId!=null){\n\t\t\tif(!$this->_manufacturer){\n\t\t\t\t$this->_manufacturer = Website_Model_CbFactory::factory('Website_Model_Manufacturer',$this->manufacturerId);\n\t\t\t}\n\t\t\treturn $this->_manufacturer;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public function getManufacturer()\n {\n if (array_key_exists(\"manufacturer\", $this->_propDict)) {\n return $this->_propDict[\"manufacturer\"];\n } else {\n return null;\n }\n }", "public function getManufacturer()\n {\n if (array_key_exists(\"manufacturer\", $this->_propDict)) {\n return $this->_propDict[\"manufacturer\"];\n } else {\n return null;\n }\n }", "public function getManufacturer()\n {\n if (array_key_exists(\"manufacturer\", $this->_propDict)) {\n return $this->_propDict[\"manufacturer\"];\n } else {\n return null;\n }\n }", "private function getRate($price) {\n if($price > 10000){\n return 0.25;\n }\n else\n return 0.2 * ($price / 10000);\n }", "private function chargeOverWeightForEachProduct($flat_rate = 5){\n\t\t$charged_amount = 0;\n\t\tforeach ($this->products as $product) {\n\t\t\t// Unit of Weight is Gram(g), 1KG = 1,000g\n\t\t\tif($product->get_weight() > 1000){\n\t\t\t\t$charged_amount += (__CHARGE_RATE__) * $flat_rate * $product->get_quantity();\n\t\t\t}\n\t\t}\n\t\treturn $charged_amount;\n\t}", "public function Manufacturer()\n {\n return $this->core->Manufacturer();\n }", "public function getRate(string $productType, $isImported = false) : int;", "public function getManufacturer() {\r\n return Factory::Create(\"Manufacturer\", $this->manufacturer_id); #new Manufacturer($this->manufacturer_id); \r\n }", "function getProductUnit() {return $this->_productUnit; }", "public function getProduct()\n\t{\n\t}", "function sayWeight(Product $product) \n\t{\n\t\treturn $product->showWeight();\n\t}", "public function productPrice()\n\t{\n\t\treturn Response::json( Product::where('id', Input::get('product'))->where('user_id', Auth::id())->first() );\n\t}", "public function getRateQualifier()\n {\n return $this->rateQualifier;\n }", "public function getMortalityRate() : float\n {\n return ($this->raw_data['died'] / $this->raw_data['lived']) * 100;\n }", "function getUnitPrice();", "public function getLeverageRatioAction(){\n\t\tZend_Loader::loadClass(\"LeverageRatio\", array(MODELS_PATH));\n\t\t$ratioTable = new LeverageRatio();\n\t\t$ratios = $ratioTable->fetchAll($ratioTable->select());\n\t\t$ratios = $ratios->toArray();\n\t\t$this->view->result = array(\"success\"=>true, \"ratios\"=>$ratios);\n\t}", "public function get_product_price($product)\n {\n }", "function rate() {\n\t\t$return = array(\n\t\t\t'success' => false,\n\t\t\t'message' => ''\n\t\t);\n\t\tif (!isset($_POST['rate']) || !isset($_POST['id'])) {\n\t\t\t$return['message'] = 'Nepodařilo se uložit Vaše hodnocení.';\n\t\t} else {\n\t\t\t$product_id = $_POST['id'];\n\t\t\t$rate = $_POST['rate'];\n\t\t\t\n\t\t\t$product = $this->Product->find('first', array(\n\t\t\t\t'conditions' => array('Product.id' => $product_id),\n\t\t\t\t'contain' => array(),\n\t\t\t\t'fields' => array('Product.id', 'Product.overall_rate', 'Product.voted_count')\n\t\t\t));\n\t\t\t\n\t\t\tif (empty($product)) {\n\t\t\t\t$return['message'] = 'Produkt, který chcete hodnotit, neexistuje.';\n\t\t\t} else {\n\t\t\t\t$product['Product']['overall_rate'] += $rate;\n\t\t\t\t$product['Product']['voted_count']++;\n\t\t\t\t\n\t\t\t\tif ($this->Product->save($product)) {\n\t\t\t\t\t$return['message'] = 'Vaše hodnocení bylo uloženo, děkujeme.';\n\t\t\t\t\t$return['success'] = true;\n\t\t\t\t} else {\n\t\t\t\t\t$return['message'] = 'Hodnocení se nepodařilo uložit, zkuste to prosím znovu.';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\techo json_encode($return);\n\t\tdie();\n\t}", "public function price()\n {\n return (float)$this->get('mt');\n }", "public function getTaxRate();", "public function getTaxRate();", "public function getRateAttribute()\n {\n return $this->restaurantReviews()->select(DB::raw('round(AVG(restaurant_reviews.rate),1) as rate'))->first('rate')->rate;\n }", "public function rates();", "public function getProductNumber()\n {\n }", "public function get_quality()\n {\n }", "function getAverageRate($productId,$conn)\n {\n $sql=\"Select AVG(rate) as averagerate from rates where product_id=\".$productId;\n $result = mysqli_query($conn, $sql);\n $row = $result->fetch_assoc();\n return $row['averagerate'];\n }", "public function getUnitPrice(): float;", "public function getUnitPrice(): float;", "public function getCommissionRateBySeller()\n\t{\n\t\treturn Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT `commision` FROM `'._DB_PREFIX_.'marketplace_commision`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE customer_id = '.(int)$this->customer_id);\n\t}", "public function product()\n {\n return $this->_product;\n }", "public function getRate() : int\n {\n return $this->rate;\n }", "public function getOnProduct();", "public function getUnitPrice();", "public function getUnitPrice();", "public function getManuProducts()\n {\n $sql = \"SELECT * FROM `manufactures`\";\n // thuc thi cau truy van\n $result = self::$conn->query($sql);\n return $this->getData($result);\n }", "public function getPriceRatiosAttribute()\n {\n return $this->priceRatios();\n }", "public function getExternalTaxRate();", "public function rateProduct()\n {\n User::validateUserRequest($this->user);\n\n $productId = $this->request->SESSION(\"productId\");\n $userId = $this->request->SESSION('userID');\n $rating = $this->request->GET(\"rating\");\n\n if ($userId)\n {\n if (!$this->checkIfProductIsAlreadyRated($productId, $userId))\n {\n $query = \"INSERT INTO bewertungen VALUES('','$rating', '$productId', '$userId')\";\n $this->database->query($query);\n }\n else\n {\n $errorMessage = new ErrorMessages();\n $errorMessage->setErrorMessage(\"Sie haben das Produkt bereits bewertet!\");\n }\n }\n\n header(\"Location: http://Localhost/WebundMultimedia/product/$productId\");\n die;\n }", "public function getProduct()\n {\n return $this->product;\n }", "public function getProduct()\n {\n return $this->product;\n }", "public function getProduct()\n {\n return $this->product;\n }", "public function getProduct()\n {\n return $this->product;\n }", "public function getProduct()\n {\n return $this->product;\n }", "public function getProduct()\n {\n return $this->product;\n }", "public function getPrice(): float;", "public function get_product()\n {\n }", "private function add_manufacturer( $product ) {\n\t\t$schema_manufacturer = WPSEO_Options::get( 'woo_schema_manufacturer' );\n\t\tif ( ! empty( $schema_manufacturer ) ) {\n\t\t\t$this->add_organization_for_attribute( 'manufacturer', $product, $schema_manufacturer );\n\t\t}\n\t}", "function getExtrasPrice(): float;", "public function GetProduct(){\n\t\treturn $this->product;\n\t}", "public function getManufacturerId()\n {\n return $this->manufacturerId;\n }", "public function setRate(float $rate): float;", "public function getMaxRate()\n {\n return $this->maxRate;\n }", "public function getProduct()\n {\n return Mage::registry('product');\n }", "public function getAveragePrice (){\r\n\t\tif(!$this->averagePrice){\r\n\t\t\tif($this->unit == Website_Model_Component::CENTILITRE){\r\n\t\t\t\t$this->averagePrice = $this->getIngredient()->getAveragePricePerLitre() / 100 * $this->amount;\r\n\t\t\t\t//$logger->log('RECIPE:getCaloriesKcal '.$this->getIngredient()->name.', amount: '.$this->amount.', unit: '.$this->unit.', kcal: '.$caloriesKcal.', my: '.$this->getIngredient()->getAverageCaloriesKcal(), Zend_Log::INFO);\r\n\t\t\t} elseif($this->unit == Website_Model_Component::MILLILITRE){\r\n\t\t\t\t$this->averagePrice = $this->getIngredient()->getAveragePricePerLitre() / 1000 * $this->amount;\r\n\t\t\t\t//$logger->log('RECIPE:getCaloriesKcal '.$this->getIngredient()->name.', amount: '.$this->amount.', unit: '.$this->unit.', kcal: '.$caloriesKcal.', my: '.$this->getIngredient()->getAverageCaloriesKcal(), Zend_Log::INFO);\r\n\t\t\t} elseif($this->unit == Website_Model_Component::LITRE){\r\n\t\t\t\t$this->averagePrice = $this->getIngredient()->getAveragePricePerLitre() * $this->amount;\r\n\t\t\t\t//$logger->log('RECIPE:getCaloriesKcal '.$this->getIngredient()->name.', amount: '.$this->amount.', unit: '.$this->unit.', kcal: '.$caloriesKcal.', my: '.$this->getIngredient()->getAverageCaloriesKcal(), Zend_Log::INFO);\r\n\t\t\t} elseif($this->unit == Website_Model_Component::GRAM){\r\n\t\t\t\t$this->averagePrice = $this->getIngredient()->getAveragePricePerKilogram() / 1000 * $this->amount;\r\n\t\t\t\t//$logger->log('RECIPE:getCaloriesKcal '.$this->getIngredient()->name.', amount: '.$this->amount.', unit: '.$this->unit.', kcal: '.$caloriesKcal.', my: '.$this->getIngredient()->getAverageCaloriesKcal(), Zend_Log::INFO);\r\n\t\t\t} elseif($this->unit == Website_Model_Component::KILOGRAM){\r\n\t\t\t\t$this->averagePrice = $this->getIngredient()->getAveragePricePerKilogram() * $this->amount;\r\n\t\t\t\t//$logger->log('RECIPE:getCaloriesKcal '.$this->getIngredient()->name.', amount: '.$this->amount.', unit: '.$this->unit.', kcal: '.$caloriesKcal.', my: '.$this->getIngredient()->getAverageCaloriesKcal(), Zend_Log::INFO);\r\n\t\t\t} elseif($this->unit == Website_Model_Component::PIECE){\r\n\t\t\t\t$this->averagePrice = $this->getIngredient()->getAveragePricePerPiece() * $this->amount;\r\n\t\t\t\t//$logger->log('RECIPE:getCaloriesKcal '.$this->getIngredient()->name.', amount: '.$this->amount.', unit: '.$this->unit.', kcal: '.$caloriesKcal.', my: '.$this->getIngredient()->getAverageCaloriesKcal(), Zend_Log::INFO);\r\n\t\t\t} elseif($this->unit == Website_Model_Component::WHOLE){\r\n\t\t\t\t$this->averagePrice = $this->getIngredient()->getAveragePricePerWhole() * $this->amount;\r\n\t\t\t\t//$logger->log('RECIPE:getCaloriesKcal '.$this->getIngredient()->name.', amount: '.$this->amount.', unit: '.$this->unit.', kcal: '.$caloriesKcal.', my: '.$this->getIngredient()->getAverageCaloriesKcal(), Zend_Log::INFO);\r\n\t\t\t} elseif($this->unit == Website_Model_Component::TEASPOON){\r\n\t\t\t\t$this->averagePrice = $this->getIngredient()->getAveragePricePerLitre() / 203 * $this->amount;\r\n\t\t\t\t//throw new Zend_Exception('Recipes with Component::TEASPOON cannot be converted right now!');\r\n\t\t\t\t// print $this->amount.' TL ' .$this->getIngredient()->name.' teaspoon hit: '.$caloriesKcal.' <br />';\r\n\t\t\t\t//$logger->log('RECIPE:getCaloriesKcal '.$this->getIngredient()->name.', amount: '.$this->amount.', unit: '.$this->unit.', kcal: '.$caloriesKcal.', my: '.$this->getIngredient()->getAverageCaloriesKcal(), Zend_Log::INFO);\r\n\t\t\t} elseif($this->unit == Website_Model_Component::FLUID_OUNCE){\r\n\t\t\t\t// TODO:\r\n\t\t\t\t//$logger->log('RECIPE:getCaloriesKcal '.$this->getIngredient()->name.', amount: '.$this->amount.', unit: '.$this->unit.', kcal: '.$caloriesKcal.', my: '.$this->getIngredient()->getAverageCaloriesKcal(), Zend_Log::INFO);\r\n\t\t\t} else {\r\n\t\t\t\t// TODO: Exception hinzuf√ºgen und √ºbersetzen\r\n\t\t\t\tthrow new Website_Model_RecipeException('UnsupportedUnit');\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $this->averagePrice;\r\n\t}", "function tep_get_tax_rate_from_desc($tax_desc) {\r\n $tax_query = tep_db_query(\"select tax_rate from \" . TABLE_TAX_RATES . \" where tax_description = '\" . $tax_desc . \"'\");\r\n $tax = tep_db_fetch_array($tax_query);\r\n return $tax['tax_rate'];\r\n }", "function apply_rate($price, $rate)\n {\n return ($price / (100 - $rate)) * 100;\n }", "function getValue($product) {\n\t\tif (array_key_exists($product, $this->numresults) == TRUE) {\n\t\t\treturn $this->numresults[$product];\n\t\t}\n\t\telse {\n\t\t\treturn 15;\n\t\t}\n\t}", "public function rating(){\n return $this->getValue(\"rating\");\n }", "public function getProduct()\n\t{\n\t\treturn $this->product;\n\t}", "public function getProduct()\n\t{\n\t\treturn $this->product;\n\t}" ]
[ "0.6526702", "0.6501597", "0.64329696", "0.64329696", "0.64172906", "0.63062936", "0.62081826", "0.61951804", "0.61934847", "0.6138101", "0.6138101", "0.61361986", "0.61013025", "0.6094056", "0.6061411", "0.6035148", "0.5985828", "0.5985632", "0.5985632", "0.5985632", "0.5985632", "0.5985632", "0.5985632", "0.5985632", "0.5957798", "0.59042704", "0.5887062", "0.58433986", "0.58433986", "0.58433986", "0.5841477", "0.5841477", "0.5812089", "0.57994884", "0.57759684", "0.5775841", "0.5734508", "0.57290405", "0.5714016", "0.56969154", "0.5674129", "0.5674129", "0.5674129", "0.56711143", "0.5661159", "0.56582874", "0.56505585", "0.56377554", "0.56364465", "0.5635309", "0.5622504", "0.5589907", "0.5580307", "0.55786794", "0.5574969", "0.55727786", "0.55681324", "0.5568017", "0.5554087", "0.55113006", "0.55113006", "0.5510633", "0.5499339", "0.5495285", "0.54872286", "0.54809403", "0.54782337", "0.54782337", "0.54766345", "0.5476552", "0.54541487", "0.544821", "0.54456365", "0.54456365", "0.5437127", "0.54087234", "0.5406875", "0.5402779", "0.5401104", "0.5401104", "0.5401104", "0.5401104", "0.5401104", "0.5401104", "0.5399757", "0.53792787", "0.5374752", "0.5374124", "0.536321", "0.53586316", "0.5353551", "0.5348473", "0.5347827", "0.53468937", "0.5345804", "0.53435224", "0.53429943", "0.5328854", "0.53267956", "0.53267956" ]
0.80021036
0
Returns an array of Adwords_Countries objects corresponding to all countries within the table.
Возвращает массив объектов Adwords_Countries, соответствующих всем странам в таблице.
Public Function GetAllCountries() { $Output = array(); $Countries = $this->_db->fetchAll('SELECT * FROM bevomedia_adwords_countries'); foreach($Countries as $Country) $Output[] = new Adwords_Countries($Country->id); return $Output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCountries()\n { \n $countries = $this->getCountryDao()->fetchAll();\n $country_array = array();\n foreach($countries as $country) {\n $country_array[$country->code] = $country->name;\n }\n \n return $country_array; \n }", "public static function getCountries()\r\n {\r\n global $db;\r\n $sql = \"select ID, Name from Country order by Name ASC\";\r\n return $db->query($sql);\r\n }", "public function getAllCountries()\n {\n $model = ClassRegistry::init('Country');\n return $model->find('list', array(\n 'fields' => array('Country.country_iso_code_2', 'Country.country_name'),\n 'order' => array('Country.country_name = \"United States\"' => 'desc','Country.country_name' => 'asc')));\n }", "final public function getAllCountries(): array\n {\n return $this->countries;\n }", "public static function getCountries() {\n $obj_db = self::obj_db();\n $countries = [];\n $query = \"select * from countries \"\n .\"order by name ASC \";\n $result = $obj_db->query($query);\n if($obj_db->errno) {\n throw new Exception(\"Db Select Error - $obj_db->error\");\n }\n if($result->num_rows == 0) {\n return $countries;\n }\n while($data = $result->fetch_object()) {\n $countries[] = $data;\n }\n return $countries;\n }", "public function getCountries() {\n $sql = query_Select_Countries;\n $stmt = $this->con->prepare($sql);\n $stmt->execute();\n $countries = $stmt->get_result();\n $stmt->close();\n\n return $countries;\n }", "public static function getcountries()\n\t{\n\t\t$countries = array();\n\n\t\tif (!($gdb = self::getGeoDBO()))\n\t\t{\n\t\t\treturn $countries;\n\t\t}\n\n\t\t$gdb->setQuery(\"SELECT code, name FROM countries ORDER BY name\");\n\t\t$results = $gdb->loadObjectList();\n\n\t\tif ($results)\n\t\t{\n\t\t\tforeach ($results as $row)\n\t\t\t{\n\t\t\t\tif ($row->code != '-' && $row->name != '-')\n\t\t\t\t{\n\t\t\t\t\tarray_push($countries, array(\n\t\t\t\t\t\t'code' => strtolower($row->code),\n\t\t\t\t\t\t'id' => $row->code,\n\t\t\t\t\t\t'name' => $row->name\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $countries;\n\t}", "public function getCountries()\n {\n //get read connection\n $read = $this->_resource->getConnection('core_read');\n $cl = $this->_resource->getTableName('geoip_cl');\n $query = \"SELECT * FROM {$cl} ORDER BY cn\";\n $results = $read->fetchAll($query);\n\n return $results;\n }", "function get_all_countries() {\n \n //$result[0] = array( 'Code' => 'ESP', 'Name' => 'Spain');\n $result = $this->query('select * from Country');\n \n return $result;\n }", "public function getCountries() {\n\t\t$query = $this->db->select('country')\n\t\t\t \t ->get('country');\n\t\treturn $query->result();\n\t}", "public function get_countries()\n {\n $arr = [];\n foreach($this->data_array() as $country){\n $arr[] = $country[\"Country\"];\n }\n return $arr;\n }", "public function getCountries();", "public function listOfCountries()\n {\n return $this->countries;\n }", "public function getAllCountries()\n {\n $countries = array();\n $countryCollection = Mage::getModel('directory/country')->getCollection();\n foreach ($countryCollection as $country) {\n /* @var $country Mage_Directory_Model_Country */\n $countries[$country->getId()] = $country->getName();\n }\n return $countries;\n }", "public function getAllInfo()\n {\n $countries = [];\n\n foreach ($this->countries as $country) {\n $country->currencyInfo = $DB->get_record('cscore_country_currency_info', ['id' => $country->id]) ?: null;\n $country->region = $DB->get_record('cscore_regions', ['id' => $country->region_id]) ?: null;\n $country->subRegion = $DB->get_record('cscore_subregions', ['id' => $country->subregion_id]) ?: null;\n $country->specificRegion = $DB->get_record('cscore_specificregions', ['id' => $country->specific_region_id]) ?: null;\n\n $countries[] = $country;\n }\n\n return $countries;\n }", "public function getCountries() : array\n {\n $countries = [];\n $response = $this->request(\"GET\", \"/countries\");\n\n if ($response != null && $response->getContent() != null) {\n foreach ($response->getContent() as $countryJson) {\n $countries[] = Country::fromResponseData($countryJson);\n }\n }\n return $countries;\n }", "public function get_all_countries()\n {\n $this->db->order_by('country');\n $query = $this->db->get('countries');\n if ($query->num_rows()) {\n return $query->result_array();\n }\n return NULL;\n }", "public function getCountries(){\n $this->sql = $this->conn->prepare(\"Select countries.id, countries.* FROM countries ORDER BY country_name\");\n $this->sql->execute();\n return $this->sql->fetchAll(\\PDO::FETCH_UNIQUE|\\PDO::FETCH_ASSOC); //order with id as key\n }", "public function getCountries(): array\n {\n $json = $this->_guzzle\n ->request('GET', '/crunchi/api/Admin/Country')\n ->getBody()\n ->getContents();\n\n $results = [];\n foreach (\\json_decode($json) as $country) {\n if (!$country->IsActive) {\n continue;\n }\n\n $results[] = new Country(\n (int) $country->ID,\n (string) $country->Description,\n (bool) $country->IsDefault,\n (bool) $country->IsActive,\n (string) $country->Abbreviation\n );\n }\n\n return $results;\n }", "public function getCountries()\n\t{\n\t\treturn (array) $this->doCall('countries');\n\t}", "public function getAllCountries()\n {\n $countries = new WC_Countries();\n\n if ($countries && is_array($countries->countries)) {\n return array_merge(array(), $countries->countries);\n } else {\n return array();\n }\n }", "public function get_country_list() {\n\t\t$s = \"SELECT \" . self::COL_NAME . \" FROM \" . self::TBL_COUNTRY;\n\t\treturn $this->run($s, self::COL_NAME);\n\t}", "public function countryList()\n {\n $countries = $this->get('/country/list.json');\n\n return $countries;\n }", "public function get_countries()\r\n\t{\r\n\t\treturn $this->select_all('user_city');\r\n\t}", "public static function getCountriesList()\n {\n if (empty(self::$arrCountries)) {\n $countries = array();\n $arrTmp = array();\n\n // Load the language files.\n \\System::loadLanguageFile('countries');\n \\System::loadLanguageFile('continents');\n\n // Include all files with name.\n require_once TL_ROOT.'/system/config/countries.php';\n require_once TL_ROOT.'/system/config/countriesByContinent.php';\n\n /** @var $countriesByContinent array */\n foreach ($countriesByContinent as $strConKey => $arrCountries) {\n // Add the main value.\n $strParentName = strlen($GLOBALS['TL_LANG']['CONTINENT'][$strConKey])\n ? utf8_romanize($GLOBALS['TL_LANG']['CONTINENT'][$strConKey])\n : $strConKey;\n\n // Add all countries.\n foreach (array_keys($arrCountries) as $key) {\n $arrTmp[$key] = array(\n 'name' => strlen($GLOBALS['TL_LANG']['CNT'][$key])\n ? utf8_romanize($GLOBALS['TL_LANG']['CNT'][$key])\n : $countries[$key],\n 'parent-name' => $strParentName,\n 'parent-short' => $strConKey,\n );\n }\n }\n\n self::$arrCountries = $arrTmp;\n }\n\n return self::$arrCountries;\n }", "public static function getCountries() {\n return self::get(self::$nameCountriesCache, CountryApi::class);\n }", "function get_countries_list()\n {\n return \\App\\Country::lists('name', 'id')->all();\n }", "function countries_list(){\n\t\n\t\t$sql=\"SELECT * FROM \".$this->prefix().\"countries \";\n\t\treturn $this->query($sql);\n\t}", "public static function getAllCountries()\n {\n $countryList = array(); \n \n foreach(self::$_countriesByRegionList as $region=>$list) { \n foreach($list as $name) {\n $countryList[$name] = $name;\n }\n } \n \n ksort($countryList);\n \n return $countryList;\n }", "function countryList() {\n $arrClms = array(\n 'country_id',\n 'name',\n );\n $varOrderBy = 'name ASC ';\n $arrRes = $this->select(TABLE_COUNTRY, $arrClms);\n //pre($arrRes);\n return $arrRes;\n }", "public function getAllCountries() {\n try {\n $select = $this->select()\n ->from($this);\n $result = $this->getAdapter()->fetchAll($select);\n } catch (Exception $e) {\n throw new Exception('Unable To retrieve data :' . $e);\n }\n if ($result) {\n return $result;\n }\n }", "public function getCountries()\n {\n $countries = [];\n\n foreach ($this->_xml->countries->children() as $child) {\n foreach ($child->children() as $cChild) {\n $countries[] = new AllopassCountry($cChild);\n }\n }\n\n return $countries;\n }", "public function listAll()\n {\n $countries = $this->model->all();\n\n return $countries;\n }", "protected function getCountries()\n {\n $cookie = $this->context->cookie;\n $countries = Country::getCountries($cookie->id_lang);\n $ret = array();\n foreach ($countries as $country) {\n $ret[] = array(\n 'key' => $country['iso_code'],\n 'value' => $country['name']\n );\n }\n return $ret;\n }", "public function countryList()\n {\n\t\treturn Country::orderBy('name', 'asc')->get();\n }", "public function getAvailableCountries(): array;", "public static function get_countries()\n {\n $g = new Geoip3();\n $ge = new GeoIP();\n\n $countries_codes = $ge->GEOIP_COUNTRY_CODES;\n $countries_names = $ge->GEOIP_COUNTRY_NAMES;\n\n $countries = array();\n\n foreach ($countries_codes as $id=>$cc) \n {\n if ($cc!='' AND $cc!='AP' AND $cc!='EU' )\n $countries[$id] = array('code'=>$cc,\n 'name'=>$countries_names[$id]);\n }\n return $countries;\n }", "public function getCountries() : array\n {\n return $this->cacheWrapper->wrap(function () {\n $client = new Client();\n $response = $client->get('https://api.hostaway.com/countries');\n $data = json_decode($response->getBody()->getContents());\n return (array)$data->result;\n }, ['key' => 'CountryCodesCache', 'ttl' => 3600]);\n }", "public function getCountries(){\n /* @var $countryDAO CountryDAO */\n $countries = array();\n $result = 0;\n try {\n $countryDAO = Registry::get(CountryDAO::$REGISTRY_KEY);\n\n $countries = $countryDAO->getCountries();\n $result = 1;\n } catch (Exception $er){\n $this->logManager->logText($er);\n }\n\n return (object) array(\n \"result\" => $result,\n \"countries\" => $countries\n );\n }", "public function getCountries()\n {\n return $this->countries;\n }", "public function getCountries()\n {\n return $this->countries;\n }", "public function getCountryList() {\n $result = array();\n $collection = Mage::getModel('directory/country')->getCollection();\n foreach ($collection as $country) {\n $cid = $country->getId();\n $cname = $country->getName();\n $result[$cid] = $cname;\n }\n return $result;\n }", "function getCountryArray() {\n return fetchDataArray(\"SELECT * FROM countries ORDER BY name\",null);\n}", "protected function getCountries()\n {\n /** @var QueryBuilder $queryBuilder */\n $queryBuilder = $this->get('dbal_connection')->createQueryBuilder();\n\n if (version_compare(Shopware()->Config()->version, '5.6.2', '>')) {\n return $queryBuilder->select('id', 'countryname')\n ->from('s_core_countries')\n ->where('allow_shipping = 1')\n ->execute()\n ->fetchAll(PDO::FETCH_ASSOC);\n }\n\n return $queryBuilder->select('id', 'countryname')\n ->from('s_core_countries')\n ->execute()\n ->fetchAll(PDO::FETCH_ASSOC);\n }", "public function getCountries()\n {\n return $this->_countries;\n }", "public static function getAvailableCountries() {\n return \\Drupal::service('address.country_repository')->getList();\n }", "function getCountries()\n\t{\n\t //Zend_Loader::loadClass('Countries');\n $countriesObj = new Default_Model_Countries();\n $countries = $countriesObj->fetchAll();\n return $countries;\n\t\t \n\t}", "function elgg_get_countries() {\n\treturn \\hypeJunction\\Countries::getCountries('iso', 'name', 'name');\n}", "function get_country_data()\n\t{\n\t\t$rows=array();\n\t\t$result=$this->db->get_where('red_countries');\n\t\tforeach($result->result_array() as $row)\n\t\t{\n\t\t\t$rows[]=$row;\n\t\t}\n\t\treturn $rows;\n\t\n\t}", "public function all() \n {\n $countries = [];\n\n foreach ($this->countries as $countryObj) {\n $countries[$countryObj->alpha_two_code] = $countryObj->name;\n }\n\n return $countries;\n }", "public static function getCountryArray() {\n $countries = Country::all();\n $return = array();\n foreach ($countries as $country) {\n $return[$country->id] = $country->country_name;\n }\n return $return;\n }", "public static function getAvailableCountries() : array\n {\n self::loadCountryData();\n\n $countries = [];\n\n foreach (self::$countries as $countryCode => $data) {\n $countries[] = self::of($countryCode);\n }\n\n return $countries;\n }", "public function getCountries()\n {\n $query = $this->createQueryBuilder('CmsCountries')\n ->select('CmsCountries.id, CmsCountries.code, CmsCountries.name')\n ->orderBy('CmsCountries.name', 'ASC');\n $query = $query->getQuery();\n $result = $query->getScalarResult();\n\n return $result;\n }", "public function getcountries()\r\n\t{\r\n\t\tif (! is_object( $this->api ) ) return false;\r\n\t\treturn $this->api->get( 'countries', 'getList', array() )->response();\r\n\t}", "public function allCountry()\n {\n $country = CountryMaster::select('id', 'name', 'country_code', 'dial_code', 'currency', 'currency_code', 'currency_symbol')->get();\n\n return prepareResult(true, $country, [], \"Country listing\", $this->success);\n }", "public function getCountries()\n {\n $countries = Country::select(array('id', 'country', 'created_at', 'updated_at'));\n\n return Datatables::of($countries)\n // ->edit_column('created_at','{{{ Carbon::now()->diffForHumans(Carbon::createFromFormat(\\'Y-m-d H\\', $test)) }}}')\n\n ->add_column('actions', '<a href=\"{{{ URL::to(\\'admin/countries/\\' . $id . \\'/edit\\' ) }}}\" class=\"iframe btn btn-xs btn-default\">{{{ Lang::get(\\'button.edit\\') }}}</a>\n <a href=\"{{{ URL::to(\\'admin/countries/\\' . $id . \\'/delete\\' ) }}}\" class=\"iframe btn btn-xs btn-danger\">{{{ Lang::get(\\'button.delete\\') }}}</a>\n ')\n\n ->remove_column('id')\n\n ->make();\n }", "public function getCountries() {\n return $this->getRequest($this->api_base . 'all');\n }", "function find_all_countries() {\n global $db;\n $sql = \"SELECT * FROM countries ORDER BY name ASC;\";\n $country_result = db_query($db, $sql);\n return $country_result;\n }", "public function get_countries () {\n\t\tglobal $cache;\n\n\t\t$res = $cache->get ('analytics_countries');\n\t\tif ($res) {\n\t\t\treturn $res;\n\t\t}\n\n\t\tif (! $this->init ()) {\n\t\t\t// failed to connect\n\t\t\treturn $this->error ($this->err);\n\t\t}\n\n\t\ttry {\n\t\t\t$min = time () - 2592000; // 30 days ago\n\t\n\t\t\t$this->ga->requestReportData (\n\t\t\t\t$this->profile,\n\t\t\t\tarray ('country'),\n\t\t\t\tarray ('visits'),\n\t\t\t\tarray ('-visits'), // sort\n\t\t\t\t'', // filter\n\t\t\t\tgmdate ('Y-m-d', $min),\n\t\t\t\tgmdate ('Y-m-d'), // today\n\t\t\t\t1, 10\n\t\t\t);\n\n\t\t\t$data = array ();\n\n\t\t\tforeach ($this->ga->getResults () as $k => $res) {\n\t\t\t\t$data[] = array (\n\t\t\t\t\t'country' => $res->getCountry (),\n\t\t\t\t\t'visits' => $res->getVisits ()\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$cache->set ('analytics_countries', $data, 43200);\n\t\t\treturn $data;\n\t\t} catch (Exception $e) {\n\t\t\treturn $this->error ($e->getMessage ());\n\t\t}\n\t}", "public function getCountry()\n {\n return $this->doctrine->getRepository('AdminBundle:Country')->findAll();\n }", "public function getCountries()\n {\n\t\t\t\n return $options = $this->getCountryCollection()\n ->setForegroundCountries($this->getTopDestinations())\n ->toOptionArray();\n\t\t\t\t\n }", "public static function ListStoreCountries()\n\t{\n\t\t// Query\n\t\t// SELECT DISTINCT store.CountryId, country.ClassName, country.Created, country.LastEdited, country.Name, country.Abbreviation\n\t\t// FROM country\n\t\t// JOIN store ON store.CountryId = country.ID\n\n\t\t $sqlQuery = new SQLQuery();\n\t\t $sqlQuery->select = array(\n\t\t\t\t\t\t\t\t\t\t'Store.CountryID AS ID',\n\t\t\t\t\t\t\t\t\t\t'Country.ClassName AS ClassName',\n\t\t\t\t\t\t\t\t\t\t'Country.Created AS Created',\n\t\t\t\t\t\t\t\t\t\t'Country.LastEdited AS LastEdited',\n\t\t\t\t\t\t\t\t\t\t'Country.Name AS Name',\n\t\t\t\t\t\t\t\t\t\t'Country.Abbreviation AS Abbreviation'\n\t\t\t\t\t\t\t\t\t);\n\n\t\t $sqlQuery->distinct = true;\n\n\t\t $sqlQuery->from = array(\"`Country` JOIN `Store` ON `Store`.`CountryId` = `Country`.`ID`\");\n\n\t\t // get the raw SQL\n\t\t $rawSQL = $sqlQuery->sql();\n\n\t\t // execute and return a Query-object\n\t\t $result = $sqlQuery->execute();\n\n\t\t // let Silverstripe work the magic\n\t\t if($result)\n\t\t {\n\t\t\t return singleton('Country')->buildDataObjectSet($result);\n\t\t }\n\n\t\t return false;\n\t}", "function getAllCountries()\n{\n global $pdo;\n $query = 'SELECT * FROM Country;';\n return $pdo->query($query)->fetchAll();\n}", "function getAllCountries()\n{\n global $pdo;\n $query = 'SELECT * FROM Country;';\n return $pdo->query($query)->fetchAll();\n}", "public function getAllFromDb() {\n\t\t$db = $this->connection();\n\n\t\t$sql = \"SELECT * FROM \" . COUNTY_TABLE;\n\n\t\t$query = $db->prepare($sql);\n\t\t$query->execute();\n\n\t\t$result = $query->fetchAll();\n\t\t$counties = array();\n\t\t\n\t\tforeach($result as $row) {\n\t\t\t$county = new County($row[ID_COLUMN], $row[COUNTY_ID_COLUMN], $row[COUNTY_NAME_COLUMN]);\n\t\t\t$counties[] = $county;\n\t\t}\n\t\t\n\t\treturn $counties;\n\t}", "public function getCountries()\n\t{\n\t\t$timeStart = time();\n\t\t$result = array();\n\t\t\n\t\t$requestXML = $this->createGetCountriesRequestXML();\n\n\t\t$curlOptions = $this->defaultCurlOptions;\n\t\t$curlOptions[CURLOPT_POSTFIELDS]['XML-Request'] = $requestXML->asXML();\n\n\t\t$response = $this->executeCurl($curlOptions);\n\n\t\tif ($response === false) {\n\t\t\t$result['status'] = '';\n\n\t\t\treturn $result;\n\t\t}\n\n\t\t$result = $this->createGetCountriesArrayFromXML($response);\n\n\t\t$result['executionTime'] = time() - $timeStart;\n\t\t$result['supplierCode'] = $this->supplierCode;\n\n\t\treturn $result;\n\t}", "public function all()\n {\n if (Cache::has('countries_all')) {\n return Cache::get('countries_all');\n }\n\n // Otherwise pull fresh data and cache it\n $all = Country::select('title', 'abbrev', 'slug', 'order')\n ->where('active', 1)\n ->orderBy('order', 'asc')\n ->orderBy('slug', 'asc')\n ->get();\n\n // Only cache real results\n if (count($all)) {\n $seconds = 43200;\n Cache::put('countries_all', $all, $seconds);\n }\n\n return $all;\n }", "public function countryList();", "public function getCountryList()\n {\n $list = $this->_getList('country');\n asort($list);\n return $list;\n }", "public function getCountriesArray()\n {\n $return = json_decode($this->Country);\n\n if (empty($return) && isset($this->Country)) {\n $return = [$this->Country];\n }\n\n return $return;\n }", "public function findAll()\n\t{\n\t\t$query = $this->getEntityManager()->createQueryBuilder()\n\t\t\t\t\t->select('c')\n\t\t\t\t\t->from('App\\System\\Entity\\Country', 'c')\n\t\t\t\t\t->getQuery();\n\n\t\treturn new \\Zend_Paginator(new Paginate\\PaginationAdapter($query));\n\t}", "public function getCountriesList() {\n\t\tif(!$this->lang) {\n\t\t\tError::warning('No language set');\n\t\t\treturn array();\n\t\t}\n\t\t$countries = null;\n\t\tswitch(App::getLang()) {\n\t\t\tcase 'de':\n\t\t\t\t$countries = array(\n\t\t\t\t'de' => 'Deutschland',\n\t\t\t\t'at' => 'Österreich',\n\t\t\t\t'ch' => 'Schweiz',\n\t\t\t\t'af' => 'Afghanistan',\n\t\t\t\t'eg' => 'Ägypten',\n\t\t\t\t'al' => 'Albanien',\n\t\t\t\t'dz' => 'Algerien',\n\t\t\t\t'ad' => 'Andorra',\n\t\t\t\t'ao' => 'Angola',\n\t\t\t\t'ar' => 'Argentinien',\n\t\t\t\t'am' => 'Armenien',\n\t\t\t\t'az' => 'Aserbaidschan',\n\t\t\t\t'et' => 'Äthiopien',\n\t\t\t\t'au' => 'Australien',\n\t\t\t\t'bs' => 'Bahamas',\n\t\t\t\t'bh' => 'Bahrein',\n\t\t\t\t'bd' => 'Bangladesch',\n\t\t\t\t'bb' => 'Barbados',\n\t\t\t\t'be' => 'Belgien',\n\t\t\t\t'bz' => 'Belize',\n\t\t\t\t'bj' => 'Benin',\n\t\t\t\t'bm' => 'Bermuda',\n\t\t\t\t'bt' => 'Bhutan',\n\t\t\t\t'bo' => 'Bolivien',\n\t\t\t\t'ba' => 'Bosnien und Herzegowina',\n\t\t\t\t'bw' => 'Botswana',\n\t\t\t\t'br' => 'Brasilien',\n\t\t\t\t'bn' => 'Brunei',\n\t\t\t\t'bg' => 'Bulgarien',\n\t\t\t\t'bf' => 'Burkina Faso',\n\t\t\t\t'bi' => 'Burundi',\n\t\t\t\t'cl' => 'Chile',\n\t\t\t\t'cn' => 'China',\n\t\t\t\t'cr' => 'Costa Rica',\n\t\t\t\t'dk' => 'Dänemark',\n\t\t\t\t'dm' => 'Dominica',\n\t\t\t\t'do' => 'Dominikanische Republik',\n\t\t\t\t'dj' => 'Dschibuti',\n\t\t\t\t'ec' => 'Ecuador',\n\t\t\t\t'sv' => 'El Salvador',\n\t\t\t\t'ci' => 'Elfenbeinküste',\n\t\t\t\t'er' => 'Eritrea',\n\t\t\t\t'ee' => 'Estland',\n\t\t\t\t'fk' => 'Falkland Inseln',\n\t\t\t\t'fj' => 'Fidschi',\n\t\t\t\t'fi' => 'Finnland',\n\t\t\t\t'fr' => 'Frankreich',\n\t\t\t\t'ga' => 'Gabun',\n\t\t\t\t'gm' => 'Gambia',\n\t\t\t\t'tg' => 'Gehen',\n\t\t\t\t'ge' => 'Georgia',\n\t\t\t\t'gh' => 'Ghana',\n\t\t\t\t'gi' => 'Gibraltar',\n\t\t\t\t'gr' => 'Griechenland',\n\t\t\t\t'gb' => 'Großbritannien',\n\t\t\t\t'gu' => 'Guam',\n\t\t\t\t'gt' => 'Guatemala',\n\t\t\t\t'gn' => 'Guinea',\n\t\t\t\t'gy' => 'Guyana',\n\t\t\t\t'ht' => 'Haiti',\n\t\t\t\t'hn' => 'Honduras',\n\t\t\t\t'hk' => 'Hongkong',\n\t\t\t\t'ir' => 'Ich rannte',\n\t\t\t\t'in' => 'Indien',\n\t\t\t\t'id' => 'Indonesien',\n\t\t\t\t'iq' => 'Irak',\n\t\t\t\t'ie' => 'Irland',\n\t\t\t\t'is' => 'Island',\n\t\t\t\t'il' => 'Israel',\n\t\t\t\t'it' => 'Italien',\n\t\t\t\t'jm' => 'Jamaika',\n\t\t\t\t'jp' => 'Japan',\n\t\t\t\t'ye' => 'Jemen',\n\t\t\t\t'jo' => 'Jordanien',\n\t\t\t\t'kh' => 'Kambodscha',\n\t\t\t\t'cm' => 'Kamerun',\n\t\t\t\t'ca' => 'Kanada',\n\t\t\t\t'kz' => 'Kasachstan',\n\t\t\t\t'qa' => 'Katar',\n\t\t\t\t'ke' => 'Kenia',\n\t\t\t\t'kg' => 'Kirgisistan',\n\t\t\t\t'ki' => 'Kiribati',\n\t\t\t\t'co' => 'Kolumbien',\n\t\t\t\t'cg' => 'Kongo',\n\t\t\t\t'cd' => 'Kongo',\n\t\t\t\t'hr' => 'Kroatien',\n\t\t\t\t'cu' => 'Kuba',\n\t\t\t\t'kw' => 'Kuwait',\n\t\t\t\t'la' => 'Laos',\n\t\t\t\t'ls' => 'Lesotho',\n\t\t\t\t'lv' => 'Lettland',\n\t\t\t\t'lb' => 'Libanon',\n\t\t\t\t'lr' => 'Liberia',\n\t\t\t\t'ly' => 'Libyen',\n\t\t\t\t'li' => 'Liechtenstein',\n\t\t\t\t'lt' => 'Litauen',\n\t\t\t\t'lu' => 'Luxemburg',\n\t\t\t\t'mo' => 'Macau',\n\t\t\t\t'mg' => 'Madagaskar',\n\t\t\t\t'mw' => 'Malawi',\n\t\t\t\t'my' => 'Malaysia',\n\t\t\t\t'mv' => 'Malediven',\n\t\t\t\t'ml' => 'Mali',\n\t\t\t\t'mt' => 'Malta',\n\t\t\t\t'ma' => 'Marokko',\n\t\t\t\t'mr' => 'Mauretanien',\n\t\t\t\t'mu' => 'Mauritius',\n\t\t\t\t'mk' => 'Mazedonien',\n\t\t\t\t'mx' => 'Mexiko',\n\t\t\t\t'md' => 'Moldawien',\n\t\t\t\t'mc' => 'Monaco',\n\t\t\t\t'mn' => 'Mongolei',\n\t\t\t\t'me' => 'Montenegro',\n\t\t\t\t'mz' => 'Mosambik',\n\t\t\t\t'mm' => 'Myanmar',\n\t\t\t\t'na' => 'Namibia',\n\t\t\t\t'nr' => 'Nauru',\n\t\t\t\t'np' => 'Nepal',\n\t\t\t\t'nz' => 'Neuseeland',\n\t\t\t\t'ni' => 'Nicaragua',\n\t\t\t\t'nl' => 'Niederlande',\n\t\t\t\t'ne' => 'Niger',\n\t\t\t\t'ng' => 'Nigeria',\n\t\t\t\t'kp' => 'Nord Korea',\n\t\t\t\t'no' => 'Norwegen',\n\t\t\t\t'om' => 'Oman',\n\t\t\t\t'tl' => 'Ost-Timor',\n\t\t\t\t'pk' => 'Pakistan',\n\t\t\t\t'ps' => 'Palästinensisches Gebiet',\n\t\t\t\t'pw' => 'Palau',\n\t\t\t\t'pa' => 'Panama',\n\t\t\t\t'pg' => 'Papua Neu-Guinea',\n\t\t\t\t'py' => 'Paraguay',\n\t\t\t\t'pe' => 'Peru',\n\t\t\t\t'ph' => 'Philippinen',\n\t\t\t\t'pl' => 'Polen',\n\t\t\t\t'pt' => 'Portugal',\n\t\t\t\t'pr' => 'Puerto Rico',\n\t\t\t\t'rw' => 'Ruanda',\n\t\t\t\t'ro' => 'Rumänien',\n\t\t\t\t'ru' => 'Russische Föderation',\n\t\t\t\t'zm' => 'Sambia',\n\t\t\t\t'ws' => 'Samoa',\n\t\t\t\t'sm' => 'San Marino',\n\t\t\t\t'sa' => 'Saudi Arabien',\n\t\t\t\t'se' => 'Schweden',\n\t\t\t\t'sn' => 'Senegal',\n\t\t\t\t'rs' => 'Serbien',\n\t\t\t\t'sc' => 'Seychellen',\n\t\t\t\t'sl' => 'Sierra Leone',\n\t\t\t\t'zw' => 'Simbabwe',\n\t\t\t\t'sg' => 'Singapur',\n\t\t\t\t'sk' => 'Slowakei',\n\t\t\t\t'si' => 'Slowenien',\n\t\t\t\t'so' => 'Somalia',\n\t\t\t\t'es' => 'Spanien',\n\t\t\t\t'lk' => 'Sri Lanka',\n\t\t\t\t'bl' => 'St. Bartholomäus',\n\t\t\t\t'sh' => 'St. Helena, Ascension und Tristan da Cunha',\n\t\t\t\t'kn' => 'St. Kitts und Nevis',\n\t\t\t\t'lc' => 'St. Lucia',\n\t\t\t\t'mf' => 'St. Martin (Französischer Teil)',\n\t\t\t\t'pm' => 'St. Pierre und Miquelon',\n\t\t\t\t'vc' => 'St. Vincent und die Grenadinen',\n\t\t\t\t'za' => 'Südafrika',\n\t\t\t\t'sd' => 'Sudan',\n\t\t\t\t'kr' => 'Südkorea',\n\t\t\t\t'sr' => 'Suriname',\n\t\t\t\t'sz' => 'Swasiland',\n\t\t\t\t'sy' => 'Syrien',\n\t\t\t\t'tj' => 'Tadschikistan',\n\t\t\t\t'tw' => 'Taiwan',\n\t\t\t\t'tz' => 'Tansania',\n\t\t\t\t'th' => 'Thailand',\n\t\t\t\t'tk' => 'Tokelau',\n\t\t\t\t'to' => 'Tonga',\n\t\t\t\t'tt' => 'Trinidad und Tobago',\n\t\t\t\t'tr' => 'Truthahn',\n\t\t\t\t'td' => 'Tschad',\n\t\t\t\t'cz' => 'Tschechien',\n\t\t\t\t'tn' => 'Tunesien',\n\t\t\t\t'tm' => 'Turkmenistan',\n\t\t\t\t'ug' => 'Uganda',\n\t\t\t\t'ua' => 'Ukraine',\n\t\t\t\t'hu' => 'Ungarn',\n\t\t\t\t'uy' => 'Uruguay',\n\t\t\t\t'uz' => 'Usbekistan',\n\t\t\t\t'va' => 'Vatikanstadt',\n\t\t\t\t've' => 'Venezuela',\n\t\t\t\t'ae' => 'Vereinigte Arabische Emirate',\n\t\t\t\t'us' => 'Vereinigte Staaten',\n\t\t\t\t'vn' => 'Vietnam',\n\t\t\t\t'by' => 'Weißrussland',\n\t\t\t\t'cf' => 'Zentralafrikanische Republik',\n\t\t\t\t'cy' => 'Zypern'\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tdefault: // en\n\t\t\t\t$countries = array(\n\t\t\t\t'af' => 'Afghanistan',\n\t\t\t\t'al' => 'Albania',\n\t\t\t\t'dz' => 'Algeria',\n\t\t\t\t'ad' => 'Andorra',\n\t\t\t\t'ao' => 'Angola',\n\t\t\t\t'ar' => 'Argentina',\n\t\t\t\t'am' => 'Armenia',\n\t\t\t\t'au' => 'Australia',\n\t\t\t\t'at' => 'Austria',\n\t\t\t\t'az' => 'Azerbaijan',\n\t\t\t\t'bs' => 'Bahamas',\n\t\t\t\t'bh' => 'Bahrain',\n\t\t\t\t'bd' => 'Bangladesh',\n\t\t\t\t'bb' => 'Barbados',\n\t\t\t\t'by' => 'Belarus',\n\t\t\t\t'be' => 'Belgium',\n\t\t\t\t'bz' => 'Belize',\n\t\t\t\t'bj' => 'Benin',\n\t\t\t\t'bm' => 'Bermuda',\n\t\t\t\t'bt' => 'Bhutan',\n\t\t\t\t'bo' => 'Bolivia',\n\t\t\t\t'ba' => 'Bosnia and Herzegovina',\n\t\t\t\t'bw' => 'Botswana',\n\t\t\t\t'br' => 'Brazil',\n\t\t\t\t'bn' => 'Brunei',\n\t\t\t\t'bg' => 'Bulgaria',\n\t\t\t\t'bf' => 'Burkina Faso',\n\t\t\t\t'bi' => 'Burundi',\n\t\t\t\t'kh' => 'Cambodia',\n\t\t\t\t'cm' => 'Cameroon',\n\t\t\t\t'ca' => 'Canada',\n\t\t\t\t'cf' => 'Central African Republic',\n\t\t\t\t'td' => 'Chad',\n\t\t\t\t'cl' => 'Chile',\n\t\t\t\t'cn' => 'China',\n\t\t\t\t'co' => 'Colombia',\n\t\t\t\t'cg' => 'Congo',\n\t\t\t\t'cd' => 'Congo',\n\t\t\t\t'cr' => 'Costa Rica',\n\t\t\t\t'hr' => 'Croatia',\n\t\t\t\t'cu' => 'Cuba',\n\t\t\t\t'cy' => 'Cyprus',\n\t\t\t\t'cz' => 'Czech Republic',\n\t\t\t\t'dk' => 'Denmark',\n\t\t\t\t'dj' => 'Djibouti',\n\t\t\t\t'dm' => 'Dominica',\n\t\t\t\t'do' => 'Dominican Republic',\n\t\t\t\t'tl' => 'East Timor',\n\t\t\t\t'ec' => 'Ecuador',\n\t\t\t\t'eg' => 'Egypt',\n\t\t\t\t'sv' => 'El Salvador',\n\t\t\t\t'er' => 'Eritrea',\n\t\t\t\t'ee' => 'Estonia',\n\t\t\t\t'et' => 'Ethiopia',\n\t\t\t\t'fk' => 'Falkland Islands',\n\t\t\t\t'fj' => 'Fiji',\n\t\t\t\t'fi' => 'Finland',\n\t\t\t\t'fr' => 'France',\n\t\t\t\t'ga' => 'Gabon',\n\t\t\t\t'gm' => 'Gambia',\n\t\t\t\t'ge' => 'Georgia',\n\t\t\t\t'de' => 'Germany',\n\t\t\t\t'gh' => 'Ghana',\n\t\t\t\t'gi' => 'Gibraltar',\n\t\t\t\t'gr' => 'Greece',\n\t\t\t\t'gu' => 'Guam',\n\t\t\t\t'gt' => 'Guatemala',\n\t\t\t\t'gn' => 'Guinea',\n\t\t\t\t'gy' => 'Guyana',\n\t\t\t\t'ht' => 'Haiti',\n\t\t\t\t'hn' => 'Honduras',\n\t\t\t\t'hk' => 'Hong Kong',\n\t\t\t\t'hu' => 'Hungary',\n\t\t\t\t'is' => 'Iceland',\n\t\t\t\t'in' => 'India',\n\t\t\t\t'id' => 'Indonesia',\n\t\t\t\t'ir' => 'Iran',\n\t\t\t\t'iq' => 'Iraq',\n\t\t\t\t'ie' => 'Ireland',\n\t\t\t\t'il' => 'Israel',\n\t\t\t\t'it' => 'Italy',\n\t\t\t\t'ci' => 'Ivory Coast',\n\t\t\t\t'jm' => 'Jamaica',\n\t\t\t\t'jp' => 'Japan',\n\t\t\t\t'jo' => 'Jordan',\n\t\t\t\t'kz' => 'Kazakhstan',\n\t\t\t\t'ke' => 'Kenya',\n\t\t\t\t'ki' => 'Kiribati',\n\t\t\t\t'kw' => 'Kuwait',\n\t\t\t\t'kg' => 'Kyrgyzstan',\n\t\t\t\t'la' => 'Laos',\n\t\t\t\t'lv' => 'Latvia',\n\t\t\t\t'lb' => 'Lebanon',\n\t\t\t\t'ls' => 'Lesotho',\n\t\t\t\t'lr' => 'Liberia',\n\t\t\t\t'ly' => 'Libya',\n\t\t\t\t'li' => 'Liechtenstein',\n\t\t\t\t'lt' => 'Lithuania',\n\t\t\t\t'lu' => 'Luxembourg',\n\t\t\t\t'mo' => 'Macao',\n\t\t\t\t'mk' => 'Macedonia',\n\t\t\t\t'mg' => 'Madagascar',\n\t\t\t\t'mw' => 'Malawi',\n\t\t\t\t'my' => 'Malaysia',\n\t\t\t\t'mv' => 'Maldives',\n\t\t\t\t'ml' => 'Mali',\n\t\t\t\t'mt' => 'Malta',\n\t\t\t\t'mr' => 'Mauritania',\n\t\t\t\t'mu' => 'Mauritius',\n\t\t\t\t'mx' => 'Mexico',\n\t\t\t\t'md' => 'Moldova',\n\t\t\t\t'mc' => 'Monaco',\n\t\t\t\t'mn' => 'Mongolia',\n\t\t\t\t'me' => 'Montenegro',\n\t\t\t\t'ma' => 'Morocco',\n\t\t\t\t'mz' => 'Mozambique',\n\t\t\t\t'mm' => 'Myanmar',\n\t\t\t\t'na' => 'Namibia',\n\t\t\t\t'nr' => 'Nauru',\n\t\t\t\t'np' => 'Nepal',\n\t\t\t\t'nl' => 'Netherlands',\n\t\t\t\t'nz' => 'New Zealand',\n\t\t\t\t'ni' => 'Nicaragua',\n\t\t\t\t'ne' => 'Niger',\n\t\t\t\t'ng' => 'Nigeria',\n\t\t\t\t'kp' => 'North Korea',\n\t\t\t\t'no' => 'Norway',\n\t\t\t\t'om' => 'Oman',\n\t\t\t\t'pk' => 'Pakistan',\n\t\t\t\t'pw' => 'Palau',\n\t\t\t\t'ps' => 'Palestinian Territory',\n\t\t\t\t'pa' => 'Panama',\n\t\t\t\t'pg' => 'Papua New Guinea',\n\t\t\t\t'py' => 'Paraguay',\n\t\t\t\t'pe' => 'Peru',\n\t\t\t\t'ph' => 'Philippines',\n\t\t\t\t'pl' => 'Poland',\n\t\t\t\t'pt' => 'Portugal',\n\t\t\t\t'pr' => 'Puerto Rico',\n\t\t\t\t'qa' => 'Qatar',\n\t\t\t\t'ro' => 'Romania',\n\t\t\t\t'ru' => 'Russian Federation',\n\t\t\t\t'rw' => 'Rwanda',\n\t\t\t\t'bl' => 'Saint Barthélemy',\n\t\t\t\t'sh' => 'Saint Helena, Ascension and Tristan da Cunha',\n\t\t\t\t'kn' => 'Saint Kitts and Nevis',\n\t\t\t\t'lc' => 'Saint Lucia',\n\t\t\t\t'mf' => 'Saint Martin (French part)',\n\t\t\t\t'pm' => 'Saint Pierre and Miquelon',\n\t\t\t\t'vc' => 'Saint Vincent and the Grenadines',\n\t\t\t\t'ws' => 'Samoa',\n\t\t\t\t'sm' => 'San Marino',\n\t\t\t\t'sa' => 'Saudi Arabia',\n\t\t\t\t'sn' => 'Senegal',\n\t\t\t\t'rs' => 'Serbia',\n\t\t\t\t'sc' => 'Seychelles',\n\t\t\t\t'sl' => 'Sierra Leone',\n\t\t\t\t'sg' => 'Singapore',\n\t\t\t\t'sk' => 'Slovakia',\n\t\t\t\t'si' => 'Slovenia',\n\t\t\t\t'so' => 'Somalia',\n\t\t\t\t'za' => 'South Africa',\n\t\t\t\t'kr' => 'South Korea',\n\t\t\t\t'es' => 'Spain',\n\t\t\t\t'lk' => 'Sri Lanka',\n\t\t\t\t'sd' => 'Sudan',\n\t\t\t\t'sr' => 'Suriname',\n\t\t\t\t'sz' => 'Swaziland',\n\t\t\t\t'se' => 'Sweden',\n\t\t\t\t'ch' => 'Switzerland',\n\t\t\t\t'sy' => 'Syria',\n\t\t\t\t'tw' => 'Taiwan',\n\t\t\t\t'tj' => 'Tajikistan',\n\t\t\t\t'tz' => 'Tanzania',\n\t\t\t\t'th' => 'Thailand',\n\t\t\t\t'tg' => 'Togo',\n\t\t\t\t'tk' => 'Tokelau',\n\t\t\t\t'to' => 'Tonga',\n\t\t\t\t'tt' => 'Trinidad and Tobago',\n\t\t\t\t'tn' => 'Tunisia',\n\t\t\t\t'tr' => 'Turkey',\n\t\t\t\t'tm' => 'Turkmenistan',\n\t\t\t\t'ug' => 'Uganda',\n\t\t\t\t'ua' => 'Ukraine',\n\t\t\t\t'ae' => 'United Arab Emirates',\n\t\t\t\t'gb' => 'United Kingdom',\n\t\t\t\t'us' => 'United States',\n\t\t\t\t'uy' => 'Uruguay',\n\t\t\t\t'uz' => 'Uzbekistan',\n\t\t\t\t'va' => 'Vatican City',\n\t\t\t\t've' => 'Venezuela',\n\t\t\t\t'vn' => 'Vietnam',\n\t\t\t\t'ye' => 'Yemen',\n\t\t\t\t'zm' => 'Zambia',\n\t\t\t\t'zw' => 'Zimbabwe'\n\t\t\t\t);\n\t\n\t\t}\n\t\treturn $countries;\n\t}", "private function getCountriesList()\n {\n if ($this->investigation === null) {\n $this->investigation = $this->authUser->investigations->first();\n }\n\n $randomCountries = Country::inRandomOrder()\n ->whereNotIn(\n 'cca2',\n [\n $this->investigation->loc_current,\n $this->investigation->loc_next,\n ]\n )\n ->limit(self::NB_DESTINATIONS)\n ->get();\n\n return $randomCountries->merge(\n Country::whereIn('cca2', [\n $this->investigation->loc_current,\n $this->investigation->loc_next,\n ])->get()\n )->sort();\n }", "function get_all_countries()\n\t{\n\t\t$this->db->select('countryid,name');\n\t\t$this->db->order_by(\"name\",\"asc\");\n\t\t$query=$this->db->get('countries');\n\t\t\n\t\t$output=array('-'=>'-');\n\t\t\n\t\tif ($query)\n\t\t{\n\t\t\t$rows=$query->result_array();\n\t\t\t\n\t\t\tforeach($rows as $row)\n\t\t\t{\n\t\t\t\t$output[$row['name']]=$row['name'];\n\t\t\t}\t\t\t\t\n\t\t}\n\t\t\n\t\treturn $output;\n\t}", "public function getCountries()\n {\n $countries = null;\n $countriesGroupId = GroupType::COUNTRIES;\n\n try\n {\n $query = DB::table('ri_list_entities as rle')->join('ri_list_group as rlg', 'rlg.id', '=', 'rle.list_group_id');\n $query->where('rle.delete_status', '=', 1);\n $query->where('rle.list_group_id', '=', $countriesGroupId);\n $query->select('rle.id as entityId', 'rle.list_entity_name as listEntityName',\n 'rlg.id as listGroupId', 'rlg.list_group_name as listGroupName');\n $query->orderBy('rle.list_entity_name', 'ASC');\n\n $countries = $query->get();\n //$listEntities = $query->paginate(10);\n }\n catch(QueryException $queryExc)\n {\n throw new HelperException(null, ErrorEnum::COUNTRY_LIST_ERROR, $queryExc);\n }\n catch(Exception $exc)\n {\n throw new HelperException(null, ErrorEnum::COUNTRY_LIST_ERROR, $exc);\n }\n\n return $countries;\n }", "function Countries()\n\t{\t$countries = array();\n\t\t$where = array();\n\t\tif ($_GET[\"continent\"])\n\t\t{\t$where[] = \"continent='{$_GET[\"continent\"]}'\";\n\t\t}\n\t\t\n\t\t$sql = \"SELECT countries.*, IF(toplist > 0, 0, 1) AS istoplist FROM countries\";\n\t\tif ($wstr = implode(\" AND \", $where))\n\t\t{\t$sql .= \" WHERE $wstr\";\n\t\t}\n\t\t$sql .= \" ORDER BY istoplist, toplist, shortname\";\n\t\tif ($result = $this->db->Query($sql))\n\t\t{\twhile ($row = $this->db->FetchArray($result))\n\t\t\t{\t$countries[] = new AdminCountry($row);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $countries;\n\t}", "function getCountryList() {\n\t\tAPP::import('Model','Country');\n\t\t$this->Country = new Country(); \n\t\treturn $this->Country->find('list',array('fields'=>array('id','name'),'order'=>array('name')));\n\t}", "public static function getCountries()\n {\n // Los lenguages soportados por la aplicación\n \n $countries = array('Spain', 'England', 'France');\n\n return $countries[array_rand($countries)];\n }", "public function getCountries() {\n\n $analytics = $this->connectAnalytics();\n\n try {\n\n //$results = $analytics->data_ga->get(Yii::$app->params['analytics']['analyticsId'], $this->startDate, $this->endDate, 'ga:sessions', ['sort' => '-ga:sessions', 'max-results' => 10]);\n $results = $analytics->data_ga->get(Yii::$app->params['analytics']['analyticsId'], $this->startDate, $this->endDate, 'ga:sessions', ['dimensions' => 'ga:country', 'sort' => '-ga:sessions', 'max-results' => 10]);\n\n $data['cols'] = [\n ['id' => 'countries', 'label' => 'Countries', 'type' => 'string'],\n ['id' => 'sessions', 'label' => 'Sessions', 'type' => 'number'],\n ];\n\n foreach ($results['rows'] as $result)\n {\n $data['rows'][] = ['c' => [\n ['v' => $result[0]],\n ['v' => (int)$result[1]]],\n ];\n }\n\n } catch(Exception $e) {\n // @todo Yii exception\n echo 'There was an error : - ' . $e->getMessage();\n }\n\n return json_encode($data);\n }", "public function get_all_countries()\r\n\t{\r\n\t\t$query = $this->db->get('country');\r\n\t\tif ($query->num_rows >= 1){\r\n\t\t\t$country_info = $query->result_array();\r\n\t\t} else {\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\treturn $country_info;\r\n\t}", "public function getCountryList()\n {\n return response()->json(Models\\Country::getAllCountries(), 200);\n }", "public static function getVatRateCountries()\n {\n return ArrayHelper::map(\n self::find()\n ->where('vat_rate IS NOT NULL')\n ->andWhere(['<>', 'vat_rate', '0.00'])\n ->all(),\n 'code',\n 'name'\n );\n }", "function getCountries()\n {\n $method = new ReqMethod(['method' => __FUNCTION__]);\n return $this->call($method);\n }", "public function getCountries() {\r\n $countryModel = new CountryModel();\r\n $results = $countryModel->findAll();\r\n\r\n echo json_encode($results);\r\n }", "public function getPossibleCountries(){\n\t\t$connection=Database::getConnection();\n\t\t$query = \"SELECT * FROM country ORDER BY country ASC\";\n\t\t$items=\"\";\n\t\t$result_obj=$connection->query($query);\n\t\ttry{\n\t\t\twhile($result = $result_obj->fetch_array(MYSQLI_ASSOC)){\n\t\t\t\t$items[]=$result;\n\t\t\t}\n\t\t\treturn($items);\n\t\t}\n\t\tcatch(Exception $e){\n\t\t\treturn false;\n\t\t}\n\t}", "function getAllCountries() {\n global $pdo;\n $query = 'SELECT * FROM Country;';\n return $pdo->query($query)->fetchAll();\n}", "function tvguide_countries () {\n\t\tglobal $sql;\n\t\t$countries = $sql->sql_select_array_query(\"SELECT DISTINCT country FROM `xmltv_source`\");\n\t\tforeach ($countries as $country) {\n\t\t\t$result[] = strtolower($country['country']);\n\t\t}\n\t\treturn $result;\n\t}", "function get_countries(){\n\t\t$countries = array(''=>'&nbsp;');\n\t\t$countrydata = Lookup::countries();\n\t\tforeach ($countrydata as $iso => $c) {\n\t\t\t$countries[$iso] = $c['name'];\n\t\t}\n\t\treturn $countries;\n\t}", "function GetCourseCountries()\n\t{\t$countries = array();\n\t\t$sql = \"SELECT countries.ccode, countries.shortname, cities.cityid FROM countries, cities, courses WHERE countries.ccode=cities.country AND cities.cityid=courses.city AND courses.coursecontent={$this->coursecontent->id} ORDER BY countries.shortname\";\n\t\tif ($result = $this->db->Query($sql))\n\t\t{\twhile ($row = $this->db->FetchArray($result))\n\t\t\t{\tif ($this->user->CanAccessCity($row[\"cityid\"]))\n\t\t\t\t{\t$countries[$row[\"ccode\"]] = $row[\"shortname\"];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $countries;\n\t}", "function getAllCountry($COUNTRY_CODE)\n\t{\n\t\t$sql = \"SELECT * FROM country \";\n\t\t$sql .= \"ORDER BY country_name\";\n\t\t$query = mysql_query($sql) or die(\"SQL : \".$sql.\"<br>ERROR : \". mysql_error()); \n\t\t$i = 0;\n\t\twhile ($row = mysql_fetch_array($query)) {\n\t\t\t$result[$i][\"ROWIDS\"]\t\t\t= $row[\"ROWIDS\"];\n\t\t\t$result[$i][\"COUNTRY_CODE\"]\t\t= $row[\"COUNTRY_CODE\"];\n\t\t\t$result[$i][\"COUNTRY_NAME\"]\t\t= $row[\"COUNTRY_NAME\"];\t\n\t\t\t$result[$i][\"ZONECODE\"]\t\t\t= $row[\"ZONECODE\"];\n\t\t\t$i++;\t\n\t\t}\n\t\treturn $result;\n\t\t}", "public function getCountries()\n {\n return $this->_getRegionsHash('Countries');\n }", "public function getCountries()\n {\n return $this->hasMany(Countries::className(), ['id' => 'countries_id'])->viaTable('movies_countries', ['movies_id' => 'id']);\n }", "public function api_listAllCountries()\n {\n $errMsg = $this->checkApiHeaderInfo();\n\t\t$error = !empty($errMsg) ? 1 : 0;\n if ($error == 0) {\n $this->loadModel('Country');\n $countryList = $this->Country->getAllCountries();\n foreach ($countryList as $key=>$value) {\n $list[] = $value['Country'];\n }\n if (!empty($countryList)) {\n $this->set(array(\n 'code' => Configure::read('RESPONSE_SUCCESS'),\n 'result' => $list,\n 'message' => 'Country List.',\n '_serialize' => array('code', 'result', 'message')\n ));\n } else {\n $this->errorMessageApi('No country.');\n }\n } else {\n $this->errorMessageApi($errMsg);\n }\n }", "function listCountriesAndStates() {\n\t\t$countries = new DataObjectSet();\n\n\t\t//$results = DB::query(\"SELECT c.ID AS CountryId, c.Name AS CountryName, s.ID AS StateID, s.Name AS StateName FROM country c LEFT JOIN state s ON s.CountryID = c.ID ORDER BY c.Name;\");\n\t\t$results = DB::query(\"SELECT ID, Name FROM Country ORDER BY Name ASC\");\n\n\t\tif($results) {\n\t\t\tforeach($results as $result) {\n\t\t\t\t$countryId = $result['ID'];\n\t\t\t\t$countries->push(new ArrayData(array(\n\t\t\t\t'Country' => array('ID'=>$result['ID'],'Name'=>$result['Name']),\n\t\t\t\t'States' => DataObject::get(\"State\",\"CountryId = '$countryId'\")\n\t\t\t\t)));\n\t\t\t}\n\t\t\treturn $countries;\n\t\t}\n\n\t\treturn false;\n\t}", "public function getCountriesCollection()\n {\n if (null !== $this->countriesCollection) {\n return $this->countriesCollection;\n }\n\n return $this->countriesCollection = (new CountLang())->getCountries(['subRegionCode', $this->getCode()]);\n }", "public function getCountries($name)\n {\n $model = ClassRegistry::init('Country');\n return $model->find('all', array(\n 'conditions' => array('Country.country_name LIKE' => trim($name).'%'),\n 'fields' => array('Country.country_iso_code_2', 'Country.country_name'),\n 'order' => array('Country.country_name' => 'asc')));\n\n }", "public function getActiveCountries()\n {\n $activeCountries = DB::select(\"SELECT distinct co.country_name, co.country_code FROM units un INNER JOIN apps_countries co on un.country_id = co.id\");\n return $activeCountries;\n// return $this->hasMany('App\\Unit','country_id');\n }", "public function get_countries() {\n $countries = array(\n 'AF' => 'Afghanistan',\n 'AX' => 'Åland Islands',\n 'AL' => 'Albania',\n 'DZ' => 'Algeria',\n 'AS' => 'American Samoa',\n 'AD' => 'Andorra',\n 'AO' => 'Angola',\n 'AI' => 'Anguilla',\n 'AQ' => 'Antarctica',\n 'AG' => 'Antigua and Barbuda',\n 'AR' => 'Argentina',\n 'AM' => 'Armenia',\n 'AW' => 'Aruba',\n 'AU' => 'Australia',\n 'AT' => 'Austria',\n 'AZ' => 'Azerbaijan',\n 'BS' => 'Bahamas',\n 'BH' => 'Bahrain',\n 'BD' => 'Bangladesh',\n 'BB' => 'Barbados',\n 'BY' => 'Belarus',\n 'BE' => 'Belgium',\n 'BZ' => 'Belize',\n 'BJ' => 'Benin',\n 'BM' => 'Bermuda',\n 'BT' => 'Bhutan',\n 'BO' => 'Bolivia, Plurinational State of',\n 'BA' => 'Bosnia and Herzegovina',\n 'BW' => 'Botswana',\n 'BV' => 'Bouvet Island',\n 'BR' => 'Brazil',\n 'IO' => 'British Indian Ocean Territory',\n 'BN' => 'Brunei Darussalam',\n 'BG' => 'Bulgaria',\n 'BF' => 'Burkina Faso',\n 'BI' => 'Burundi',\n 'KH' => 'Cambodia',\n 'CM' => 'Cameroon',\n 'CA' => 'Canada',\n 'CV' => 'Cape Verde',\n 'KY' => 'Cayman Islands',\n 'CF' => 'Central African Republic',\n 'TD' => 'Chad',\n 'CL' => 'Chile',\n 'CN' => 'China',\n 'CX' => 'Christmas Island',\n 'CC' => 'Cocos (Keeling) Islands',\n 'CO' => 'Colombia',\n 'KM' => 'Comoros',\n 'CG' => 'Congo',\n 'CD' => 'Congo, the Democratic Republic of the',\n 'CK' => 'Cook Islands',\n 'CR' => 'Costa Rica',\n 'CI' => \"Côte d'Ivoire\",\n 'HR' => 'Croatia',\n 'CU' => 'Cuba',\n 'CY' => 'Cyprus',\n 'CZ' => 'Czech Republic',\n 'DK' => 'Denmark',\n 'DJ' => 'Djibouti',\n 'DM' => 'Dominica',\n 'DO' => 'Dominican Republic',\n 'EC' => 'Ecuador',\n 'EG' => 'Egypt',\n 'SV' => 'El Salvador',\n 'GQ' => 'Equatorial Guinea',\n 'ER' => 'Eritrea',\n 'EE' => 'Estonia',\n 'ET' => 'Ethiopia',\n 'FK' => 'Falkland Islands (Malvinas)',\n 'FO' => 'Faroe Islands',\n 'FJ' => 'Fiji',\n 'FI' => 'Finland',\n 'FR' => 'France',\n 'GF' => 'French Guiana',\n 'PF' => 'French Polynesia',\n 'TF' => 'French Southern Territories',\n 'GA' => 'Gabon',\n 'GM' => 'Gambia',\n 'GE' => 'Georgia',\n 'DE' => 'Germany',\n 'GH' => 'Ghana',\n 'GI' => 'Gibraltar',\n 'GR' => 'Greece',\n 'GL' => 'Greenland',\n 'GD' => 'Grenada',\n 'GP' => 'Guadeloupe',\n 'GU' => 'Guam',\n 'GT' => 'Guatemala',\n 'GG' => 'Guernsey',\n 'GN' => 'Guinea',\n 'GW' => 'Guinea-Bissau',\n 'GY' => 'Guyana',\n 'HT' => 'Haiti',\n 'HM' => 'Heard Island and McDonald Islands',\n 'VA' => 'Holy See (Vatican City State)',\n 'HN' => 'Honduras',\n 'HK' => 'Hong Kong',\n 'HU' => 'Hungary',\n 'IS' => 'Iceland',\n 'IN' => 'India',\n 'ID' => 'Indonesia',\n 'IR' => 'Iran, Islamic Republic of',\n 'IQ' => 'Iraq',\n 'IE' => 'Ireland',\n 'IM' => 'Isle of Man',\n 'IL' => 'Israel',\n 'IT' => 'Italy',\n 'JM' => 'Jamaica',\n 'JP' => 'Japan',\n 'JE' => 'Jersey',\n 'JO' => 'Jordan',\n 'KZ' => 'Kazakhstan',\n 'KE' => 'Kenya',\n 'KI' => 'Kiribati',\n 'KP' => \"Korea, Democratic People's Republic of\",\n 'KR' => 'Korea, Republic of',\n 'KW' => 'Kuwait',\n 'KG' => 'Kyrgyzstan',\n 'LA' => \"Lao People's Democratic Republic\",\n 'LV' => 'Latvia',\n 'LB' => 'Lebanon',\n 'LS' => 'Lesotho',\n 'LR' => 'Liberia',\n 'LY' => 'Libyan Arab Jamahiriya',\n 'LI' => 'Liechtenstein',\n 'LT' => 'Lithuania',\n 'LU' => 'Luxembourg',\n 'MO' => 'Macao',\n 'MK' => 'Macedonia, the former Yugoslav Republic of',\n 'MG' => 'Madagascar',\n 'MW' => 'Malawi',\n 'MY' => 'Malaysia',\n 'MV' => 'Maldives',\n 'ML' => 'Mali',\n 'MT' => 'Malta',\n 'MH' => 'Marshall Islands',\n 'MQ' => 'Martinique',\n 'MR' => 'Mauritania',\n 'MU' => 'Mauritius',\n 'YT' => 'Mayotte',\n 'MX' => 'Mexico',\n 'FM' => 'Micronesia, Federated States of',\n 'MD' => 'Moldova, Republic of',\n 'MC' => 'Monaco',\n 'MN' => 'Mongolia',\n 'ME' => 'Montenegro',\n 'MS' => 'Montserrat',\n 'MA' => 'Morocco',\n 'MZ' => 'Mozambique',\n 'MM' => 'Myanmar',\n 'NA' => 'Namibia',\n 'NR' => 'Nauru',\n 'NP' => 'Nepal',\n 'NL' => 'Netherlands',\n 'AN' => 'Netherlands Antilles',\n 'NC' => 'New Caledonia',\n 'NZ' => 'New Zealand',\n 'NI' => 'Nicaragua',\n 'NE' => 'Niger',\n 'NG' => 'Nigeria',\n 'NU' => 'Niue',\n 'NF' => 'Norfolk Island',\n 'MP' => 'Northern Mariana Islands',\n 'NO' => 'Norway',\n 'OM' => 'Oman',\n 'PK' => 'Pakistan',\n 'PW' => 'Palau',\n 'PS' => 'Palestinian Territory, Occupied',\n 'PA' => 'Panama',\n 'PG' => 'Papua New Guinea',\n 'PY' => 'Paraguay',\n 'PE' => 'Peru',\n 'PH' => 'Philippines',\n 'PN' => 'Pitcairn',\n 'PL' => 'Poland',\n 'PT' => 'Portugal',\n 'PR' => 'Puerto Rico',\n 'QA' => 'Qatar',\n 'RE' => 'Réunion',\n 'RO' => 'Romania',\n 'RU' => 'Russian Federation',\n 'RW' => 'Rwanda',\n 'BL' => 'Saint Barthélemy',\n 'SH' => 'Saint Helena',\n 'KN' => 'Saint Kitts and Nevis',\n 'LC' => 'Saint Lucia',\n 'MF' => 'Saint Martin (French part)',\n 'PM' => 'Saint Pierre and Miquelon',\n 'VC' => 'Saint Vincent and the Grenadines',\n 'WS' => 'Samoa',\n 'SM' => 'San Marino',\n 'ST' => 'Sao Tome and Principe',\n 'SA' => 'Saudi Arabia',\n 'SN' => 'Senegal',\n 'RS' => 'Serbia',\n 'SC' => 'Seychelles',\n 'SL' => 'Sierra Leone',\n 'SG' => 'Singapore',\n 'SK' => 'Slovakia',\n 'SI' => 'Slovenia',\n 'SB' => 'Solomon Islands',\n 'SO' => 'Somalia',\n 'ZA' => 'South Africa',\n 'GS' => 'South Georgia and the South Sandwich Islands',\n 'ES' => 'Spain',\n 'LK' => 'Sri Lanka',\n 'SD' => 'Sudan',\n 'SR' => 'Suriname',\n 'SJ' => 'Svalbard and Jan Mayen',\n 'SZ' => 'Swaziland',\n 'SE' => 'Sweden',\n 'CH' => 'Switzerland',\n 'SY' => 'Syrian Arab Republic',\n 'TW' => 'Taiwan, Province of China',\n 'TJ' => 'Tajikistan',\n 'TZ' => 'Tanzania, United Republic of',\n 'TH' => 'Thailand',\n 'TL' => 'Timor-Leste',\n 'TG' => 'Togo',\n 'TK' => 'Tokelau',\n 'TO' => 'Tonga',\n 'TT' => 'Trinidad and Tobago',\n 'TN' => 'Tunisia',\n 'TR' => 'Turkey',\n 'TM' => 'Turkmenistan',\n 'TC' => 'Turks and Caicos Islands',\n 'TV' => 'Tuvalu',\n 'UG' => 'Uganda',\n 'UA' => 'Ukraine',\n 'AE' => 'United Arab Emirates',\n 'GB' => 'United Kingdom',\n 'US' => 'United States',\n 'UM' => 'United States Minor Outlying Islands',\n 'UY' => 'Uruguay',\n 'UZ' => 'Uzbekistan',\n 'VU' => 'Vanuatu',\n 'VE' => 'Venezuela, Bolivarian Republic of',\n 'VN' => 'Viet Nam',\n 'VG' => 'Virgin Islands, British',\n 'VI' => 'Virgin Islands, U.S.',\n 'WF' => 'Wallis and Futuna',\n 'EH' => 'Western Sahara',\n 'YE' => 'Yemen',\n 'ZM' => 'Zambia',\n 'ZW' => 'Zimbabwe'\n );\n return $countries;\n }", "function dataaccess_getcountries()\r\n{\r\n\t$db = new dataconnection();\r\n\t$query = \"SELECT countries.code FROM countries\";\r\n\t$db->setQuery($query);\r\n\t$db->ExecuteQuery();\r\n\t\r\n\t$resultarray = $db->getResultArray();\r\n\t\r\n\tforeach($resultarray as $key=>$value)\r\n\t{\r\n\t\tlist($code) = $resultarray[$key];\r\n\t\t$codelist[] = $code;\r\n\t}\r\n\t\r\n\treturn $codelist;\r\n}", "static public function getCountries()\n {\n return array(\n 'nl' => array(\n 'name' => 'Netherlands',\n 'code' => 'NL',\n 'phone' => '+31',\n ),\n\n 'be' => array(\n 'name' => 'Belgium',\n 'code' => 'BE',\n 'phone' => '+32',\n ),\n\n 'es' => array(\n 'name' => 'Spain',\n 'code' => 'ES',\n 'phone' => '+34',\n ),\n\n 'fr' => array(\n 'name' => 'France',\n 'code' => 'FR',\n 'phone' => '+33',\n ),\n\n 'de' => array(\n 'name' => 'Germany',\n 'code' => 'de',\n 'phone' => '+44',\n ),\n\n 'cy' => array(\n 'name' => 'Cyprus',\n 'code' => 'CY',\n 'phone' => '+357',\n ),\n\n 'lu' => array(\n 'name' => 'Luxembourg',\n 'code' => 'LU',\n 'phone' => '+352',\n ),\n\n 'cw' => array(\n 'name' => 'Curacao',\n 'code' => 'CW',\n 'phone' => '+599',\n ),\n\n 'sc' => array(\n 'name' => 'Seychelles',\n 'code' => 'SC',\n 'phone' => '+248',\n ),\n\n 'ca' => array(\n 'name' => 'Canada',\n 'code' => 'CA',\n 'phone' => '+1',\n ),\n\n 'hk' => array(\n 'name' => 'Hong Kong',\n 'code' => 'HK',\n 'phone' => '+852',\n ),\n\n 'uk' => array(\n 'name' => 'United Kingdom',\n 'code' => 'UK',\n 'phone' => '+44',\n ),\n\n 'us' => array(\n 'name' => 'United States',\n 'code' => 'US',\n 'phone' => '+1',\n ),\n\n 'ru' => array(\n 'name' => 'Russian Federation',\n 'code' => 'RU',\n 'phone' => '+7',\n ),\n );\n }" ]
[ "0.7992248", "0.78993237", "0.77905965", "0.7747716", "0.7733822", "0.7717324", "0.768209", "0.76649076", "0.7612652", "0.75748247", "0.7567133", "0.75596464", "0.75383836", "0.7520771", "0.7483433", "0.746586", "0.74598086", "0.7455302", "0.7431913", "0.7422916", "0.742122", "0.7412978", "0.7385024", "0.7367762", "0.7358976", "0.7341211", "0.7303937", "0.72810054", "0.7276111", "0.7252915", "0.72399336", "0.7222096", "0.7221991", "0.72112757", "0.7208833", "0.72024024", "0.7199746", "0.71986586", "0.71902597", "0.7186439", "0.7186439", "0.7182709", "0.7177175", "0.7111215", "0.7109952", "0.71009374", "0.70781696", "0.7077751", "0.7071376", "0.70528215", "0.70434135", "0.7027729", "0.7013702", "0.6993889", "0.697674", "0.69437057", "0.6926051", "0.69247437", "0.69210356", "0.69075245", "0.6897839", "0.6897761", "0.6896778", "0.6896778", "0.68797696", "0.68774146", "0.6853945", "0.68475235", "0.6842434", "0.6836573", "0.68111646", "0.681016", "0.6804257", "0.6796817", "0.6789061", "0.6774935", "0.6772946", "0.67727", "0.676902", "0.67411304", "0.6740416", "0.6713858", "0.67116493", "0.6696844", "0.66801614", "0.66734934", "0.6632051", "0.66183084", "0.65760255", "0.6568262", "0.65635526", "0.6557873", "0.65547", "0.6553046", "0.6541703", "0.6541377", "0.65137", "0.65109146", "0.6501517", "0.6501326" ]
0.8451095
0
Sets the specified $Property of this object with the specified $Value provided.
Устанавливает указанное свойство $Property этого объекта с указанным значением $Value.
Public Function Set($Property, $Value) { $this->{$Property} = $Value; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Public Function set($Property, $Value)\n\t{\n\t\t$this->{$Property} = $Value;\n\t\treturn $this;\n\t}", "public function Set($property, $value) {\n $this->$property = $value;\n }", "Protected Function Set_Property($Property, $Value = NULL)\n\t\t\t{\n\t\t\t\tIf(Property_Exists($this,$Property))\n\t\t\t\t{\n\t\t\t\t\t$this->{$Property}\t=\t$Value;\n\t\t\t\t}\n\t\t\t\tElse\n\t\t\t\t{\n\n\t\t\t\t\t// TODO What if the property doesn't exist.?\n\t\t\t\t}\n\t\t\t\tReturn $this;\n\n\t\t\t}", "public function __set($property, $value) {\n $this->set($property, $value);\n }", "public function __set($property, $value) {\n $this->set($property, $value);\n }", "public function __set($property, $value)\n {\n $propertyName = self::underscoreToCamelCase($property);\n $this->$propertyName = $value;\n }", "public function __set($property, $value) {\n $this->$property = $value;\n }", "public function set($property, $value) {\n $property = $this->convert($property);\n if ($this->isValid($property)) {\n $this->_values[$property] = $value;\n }\n }", "public function __set($property, $value)\r\n {\r\n $this->$property = $value;\r\n }", "public function __set($property, $value)\n {\n $this->$property = $value;\n }", "public function __set($property, $value)\n {\n $this->$property = $value;\n }", "public function __set($property, $value)\n {\n $this->$property = $value;\n }", "public function __set($property, $value)\n {\n $this->$property = $value;\n }", "public function __set($property, $value)\n {\n $this->$property = $value;\n }", "public function __set($property, $value)\n {\n $this->$property = $value;\n }", "public function __set($property, $value)\n {\n $this->properties[$property] = $value;\n }", "public function __set($property, $value) {\n $this->$property = $value;\n }", "public function __set($property, $value) \r\n {\r\n $this->$property = $value;\r\n }", "public function __set($property, $value) \n {\n $this->$property = $value;\n }", "public function __set($property, $value) \n {\n $this->$property = $value;\n }", "public function __set($property, $value)\n\t{\n\t\t$this->$property = $value;\n\t}", "public function __set($property, $value)\n\t{\n\t\t$this->$property = $value;\n\t}", "public function __set($property, $value)\n\t{\n\t\t$this->$property = $value;\n\t}", "public function __set($property, $value)\n {\n $this->setParameter($property, $value);\n }", "public function __set($property, $value) \n\t{\n\t\t$this->$property = $value;\n\t}", "public function set($property, $value) {\n $this->offsetSet($property, $value);\n }", "public function __set( $sProperty, $vValue ) {\r\n $this->setProperty( $sProperty, $vValue );\r\n }", "function __set($property, $value)\n {\n $this->setValue($value);\n }", "public function __set($property, $value)\n {\n \tif (property_exists($this, $property)) {\n \t\t$this->$property = $value;\n \t}\n }", "function set_prop( $property, $value ) {\n if ( is_null( $this->{ $property } ) || is_scalar( $this->{ $property } ) )\n $this->{ $property } = $value;\n else return FALSE;\n }", "public function set($property, $value)\n {\n if( ! isset($this->$property))\n {\n JError::raiseWarning(0, 'Undefined property '.__CLASS__.'::'.$property);\n\n return;\n }\n\n $this->$property = $value;\n }", "public function __set(string $property, $value): void {\n\t\t$this->set($property, $value);\n\t}", "public function __set($property, $value)\n {\n if (property_exists($this, $property) && 'id' == $property) {\n $this->$property = $value;\n }\n }", "public function __set($property, $value)\n {\n \t$this->$property = $value;\n }", "public function __set($property, $value)\n {\n \t$this->$property = $value;\n }", "public function __set($property, $value);", "public function __set($property, $value);", "public function __set($property, $value);", "public function set($property, $value = null) { \n $this->$property = $value;\n }", "public function setProperty ( $property, $value )\n {\n if ( isset ( $value ) ) {\n $this -> properties[$property] = $value;\n } else {\n $this -> properties[$property] = null;\n }\n }", "public function __set($property, $value) {\n $this->offsetSet($property, $value);\n }", "public function __set(string $property, mixed $value): void\n {\n if (property_exists($this, $property)) {\n $this->$property = $value;\n\n return;\n }\n\n $this->data[$property] = $value;\n }", "public function Set($property, $value = NULL){\n if(isset($property) && $property){\n if(isset(self::$$property))\n self::$$property = $value;\n else\n $this->$property = $value;\n }\n }", "public static function set( $property, $value )\n {\n self::$data[$property] = $value;\n }", "public function __set($property, $value) {\r\n if (property_exists($this, $property)) {\r\n $this->property = $value;\r\n }\r\n\r\n return $this;\r\n }", "public function setProperty($property, $value){\n $this->validaProperty($property);\n $this->data[$property] = $value;\n }", "public function setProperty($propertyPath, $value)\n {\n // init\n $disProperty = $this->_dissolvePropertyPath($propertyPath);\n // first property is this object\n $property = $this;\n\n // follow property path\n foreach($disProperty as $subProperty) {\n \n // processing depending on property type\n if (is_array($property)) {\n $property = & $this->_setPropertyArray($property, $subProperty);\n } elseif ($property instanceof ZendX_AbstractBean) {\n $property = & $property->_setPropertyBean($subProperty);\n } elseif (is_object($property)) {\n $property = & $this->_setPropertyGenericObject($property, $subProperty);\n }\n }\n \n $property = $value;\n }", "public abstract function setPropertyValue($object, $property, $value);", "public function __set($property, $value)\n {\n \\Sledgehammer\\warning('Property: \"' . $property . '\" doesn\\'t exist in a \"' . get_class($this) . '\" object.');\n $this->$property = $value;\n }", "public function __set($property, $value) {\n method_exists($this, $m = \"set_$property\") ?\n $this->$m($value) : $this[Service_OpenSocial::canonicalize($property)] = $value;\n return $this;\n }", "public function __set($property = null, $value = null) {\n\t\tif ($property !== null) {\n\t\t\t$this->properties[$property] = $value;\n\t\t}\n\t\treturn;\n\t}", "function set( $_property, $_value ) {\n $this->$_property = $_value;\n }", "public function property(string $property, mixed $value) : self\n {\n $this->properties[$property] = $value;\n\n return $this;\n }", "public function __set(string $property, mixed $value): void\n {\n $this->target->{$property} = $value; // @phpstan-ignore-line\n }", "function setProperty($property, $value=null)\n\t{\n\t\t$this->$property = $value;\n\t}", "public function setProperty ($property, $value)\n {\n $this->validateProperty($property);\n $this->$property = $value;\n return $this;\n }", "public function __set($property,$value) {\n if (property_exists($this, $property)) {\n $this->$property = $value;\n }\n return $this;\n }", "public function set( $property, $value )\n\t{\n\t\t$this->_data[ $property ] = $value;\n\t\t\n\t\treturn $this;\n\t}", "public function __set ($property, $value) {\n\t\t$method = \"set{$property}\";\n\t\tif (method_exists($this, $method)) {\n\t\t\treturn $this->$method($value);\n\t\t}\n\t}", "public function __set($property, $value) {\n\t\treturn $this->_get_instance()->$property = $value;\n\t}", "public function set($property, $value)\n\t{\n\t\t$this->$property = $value;\n\t\treturn $this; // So we can do method chaining!\n\t}", "public function __set($property, $value)\n \t{\n\t\tif (property_exists($this, $property))\n\t \t{\n\t \t\t$this->$property = $value;\n\t\t}\n\t\treturn $this;\n \t}", "public function __set($property, $value) {\n\t\tswitch($property) {\n\t\t\tcase 'name':\n\t\t\t\t$this->name = $value;\n\t\t\t\tbreak;\n\n\t\t\tcase 'appTag':\n\t\t\t\t$this->appTag = $value;\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tparent::__set($property, $value);\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function __set($property, $value) \n \t{\n \tif (property_exists($this, $property)) \n \t{\n \t$this->$property = $value;\n \t}\n \treturn $this;\n \t}", "protected function set_reflection_property_value($property, $value)\n {\n $this->get_accessible_reflection_property($property)\n ->setValue($this->class, $value);\n }", "public function setProperty($property, $value)\n\t{\n\t\t$this->loadProperties();\n\t\tif ($value === null) {\n\t\t\t$this->removeProperty($property);\n\t\t} else {\n\t\t\t$this->properties[$property] = $value;\n\t\t}\n\t\treturn $this;\n\t}", "public function set(string $property, $value) : void\n\t{\n\t\tif ($this->has($property)) $this->record[$property] = $value;\n\t}", "public function __set($property, $value) {\n\t\tswitch($property) {\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\tbreak;\n\t\t}\n\n\t}", "public function setValue($value)\n {\n if ($this->setter) {\n $value = call_user_func($this->setter, $value);\n }\n // check the value against the type specified\n if ($this->type !== null && !$this->checkType($this->type, $value)) {\n throw new PropertyException(\"Value specified for \\\"{$this->name}\\\" is not of the correct type\");\n }\n $this->value = $value;\n }", "public function setProperty($property, $value)\n {\n $this->properties[$property] = $value;\n\n return $this;\n }", "public function set($property_name, $value) {\n return $this->decorated->set($property_name, $value);\n }", "public function __set($property, $value)\n {\n $this->object->{'metadata_' . $property} = $value;\n }", "public function __set($property, $value) {\n $setter = sprintf('set%s', $property);\n\n if(method_exists($this, $setter))\n return $this->$setter($value);\n\n trigger_error(sprintf(\"Undefined property %s::$%s.\\n\", __CLASS__, $property));\n }", "function __set($property, $value) { \n return $this->compatSet($property, $value);\n }", "public function __set($property, $value)\n {\n if (property_exists($this, $property)) {\n //UTF-8 is recommended for correct JSON serialization\n if (is_string($value) && mb_detect_encoding($value, \"UTF-8\", TRUE) != \"UTF-8\") {\n $this->$property = utf8_encode($value);\n }\n else {\n $this->$property = $value;\n }\n }\n\n return $this;\n }", "public function __set($property, $value) {\r\n\t\tif (method_exists ( $this, 'set' . ucfirst ( $property ) )) {\r\n\t\t\t// This will call $this->setPassword($value) while setting\r\n\t\t\t// $this->password\r\n\t\t\treturn call_user_func ( array ($this, 'set' . ucfirst ( $property ) ), $value );\r\n\t\t} else {\r\n\t\t\t$this->$property = $value;\r\n\t\t}\r\n\t}", "public function __set($property, $value) {\r\n\t\tif (method_exists ( $this, 'set' . ucfirst ( $property ) )) {\r\n\t\t\t// This will call $this->setPassword($value) while setting\r\n\t\t\t// $this->password\r\n\t\t\treturn call_user_func ( array ($this, 'set' . ucfirst ( $property ) ), $value );\r\n\t\t} else {\r\n\t\t\t$this->$property = $value;\r\n\t\t}\r\n\t}", "public function __set($property, $value)\n {\n $this->setProperty($property, $value);\n\n return $this->getProperty($property);\n }", "public function __set($property, $value) {\n\t\tswitch($property) {\n\t\t\tcase 'percentage':\n\t\t\t\t$this->percentage = $value;\n\t\t\t\tbreak;\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\tbreak;\n\t\t}\n\t}", "public function __set($p_property, $p_value)\n {\n parent::_set($p_property, $p_value);\n if (empty(self::check($p_property, $p_value)))\n {\n switch ($p_property)\n {\n case \"m_sortID\":\n $this->m_sortID = $p_value;\n break;\n case \"m_labelID\":\n $this->m_labelID = $p_value;\n break;\n }\n }\n }", "function set($property, $value) {\n\t\t\t$this->properties[$property] = $value;\n\t\t\t\n\t\t\tif($property == 'valid_extensions')\n\t\t\t\t$this->properties['extensions_mod'] = implode(';', explode(',', $this->properties['valid_extensions']));\n\t\t}", "public function __set($property, $value){ }", "public function __set($property, $value) {\r\n\t\tswitch($property) {\r\n\r\n\t\t\tdefault:\r\n\t\t\t\t$trace = debug_backtrace();\r\n\t\t\t\ttrigger_error(\r\n\t\t\t\t\t'Undefined property ' . $property .\r\n\t\t\t\t\t' in ' . $trace[0]['file'] .\r\n\t\t\t\t\t' on line ' . $trace[0]['line'],\r\n\t\t\t\t\tE_USER_NOTICE);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "private function callSetter($property, $value)\n {\n if (method_exists($this, toCamelCase($property, 'set'))) {\n call_user_func_array([$this, toCamelCase($property, 'set')], [$value]);\n }\n\n if (method_exists($this, toSnakeCase($property, 'set'))) {\n call_user_func_array([$this, toSnakeCase($property, 'set')], [$value]);\n }\n\n $this->$property = $value;\n }", "public function __set($property, $value) {\n switch ($property) {\n case 'id':\n case 'user_id':\n case 'group_id':\n case 'app_id':\n case 'resource_id':\n $this->$property = (string) $value;\n break;\n case 'service':\n $this->service = Service_OpenSocial_Service::object($value);\n break;\n case 'operation':\n $this->operation = Service_OpenSocial_Operation::object($value);\n break;\n case 'resource':\n $this->resource($value);\n break;\n default:\n $this->params[$property] = $value;\n }\n return $this;\n }", "public function __set($property = null, $value = null)\n\t{\n\t\tif (!property_exists(__CLASS__, $property) || $property{0} == '_')\n\t\t{\n\t\t\tif (empty($property))\n\t\t\t{\n\t\t\t\t$property = '(null)';\n\t\t\t}\n\n\t\t\t$this->_error(\"Cannot access property \" . __CLASS__ . \"::$\" . $property, E_USER_ERROR);\n\t\t\tdie();\n\t\t}\n\n\t\t$this->$property = $value;\n\n\t\tif (!in_array($property, $this->_updatedkeys))\n\t\t{\n\t\t\t$this->_updatedkeys[] = $property;\n\t\t}\n\t}", "public function __set($property, $value) {\n\t\tswitch($property) {\n\t\t\tcase 'seed':\n\t\t\t\t$this->seed = $value;\n\t\t\t\t$this->initial_seed = $value;\n\t\t\t\tbreak;\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\tbreak;\n\t\t}\n\t}", "public function __set($property, $value)\n\t{\n\t\t$setter = 'volatile_set_' . $property;\n\n\t\tif (method_exists($this, $setter))\n\t\t{\n\t\t\treturn $this->$setter($value);\n\t\t}\n\n\t\t$setter = 'set_' . $property;\n\n\t\tif (method_exists($this, $setter))\n\t\t{\n\t\t\treturn $this->$property = $this->$setter($value);\n\t\t}\n\n\t\t$properties = get_object_vars($this);\n\n\t\tif (array_key_exists($property, $properties))\n\t\t{\n\t\t\ttrigger_error(\\Brickrouge\\format('The property %property is not writable for object of class %class.', array('property' => $property, 'class' => get_class($this))));\n\n\t\t\treturn;\n\t\t}\n\n\t\t$this->$property = $value;\n\t}", "protected function set_property_value($object, $property_name, $value)\n {\n $this->setPropertyValue($object, $property_name, $value);\n }", "public function __set($property, $value){\n\n //this refers to the class, it checks if the property exist in the class\n //then sets the value if it does and returns the class\n if(property_exists($this, $property)){\n $this->$property = $value;\n }\n }", "public function put($property, $value)\n {\n $this->set($property, $value);\n return $this;\n }", "public function setData($property, $value=null)\n {\n \t$this->$property = $value;\n return $this;\n }", "function setProperty($property, $value){\n\t\t$this->mArrProp[$property]\t= $value;\n\t}", "function setProperty($property, $value){\n\t\t$this->mArrProp[$property]\t= $value;\n\t}", "public function __set( $prop, $value )\n\t{\n\t\t$this->bean->$prop = $value;\n\t}", "public function __set($property, $value) {\r\n\t\tif(isset($this->__data[$property])) {\r\n\t\t\treturn $this->__data[$property] = $value;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public function __set( $property, $value )\n {\n switch ( $property )\n {\n case 'value':\n return $this->value = (float) $value;\n\n default:\n throw new RuntimeException( \"No such property: $property.\" );\n }\n\n }", "public function setDocumentValue($document, $property, $value)\n {\n $setter = \\Closure::bind(function ($document, $property, $value) {\n $document->$property = $value;\n }, null, $document\n );\n $setter($document, $property, $value);\n }", "public function setProperty($key, $value) {\n\t\t$this->properties[$key] = $value;\n\t}", "protected function assign($property, $value)\n {\n // convert ISO 8601 dates into Carbon objects\n if (preg_match('/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:Z|[+-]\\d{2}:\\d{2})?$/', $value) === 1) {\n $value = new Carbon($value);\n }\n\n if (property_exists($this, $property)) {\n $this->$property = $value;\n } else {\n $this->extra[$property] = $value;\n }\n }" ]
[ "0.81972396", "0.7978943", "0.79037166", "0.7865797", "0.78573924", "0.78542167", "0.78250015", "0.78159076", "0.7786632", "0.777809", "0.777809", "0.777809", "0.777809", "0.777809", "0.777809", "0.7759099", "0.7731071", "0.7725069", "0.77027863", "0.77027863", "0.76760155", "0.76760155", "0.76760155", "0.76696056", "0.76466054", "0.7642161", "0.76328117", "0.76145804", "0.7611365", "0.7604961", "0.75946", "0.75837016", "0.7561663", "0.7543126", "0.7543126", "0.75316876", "0.75316876", "0.75316876", "0.75148195", "0.74980104", "0.74846953", "0.7482547", "0.7448333", "0.7418955", "0.7417794", "0.7415431", "0.74078524", "0.7385337", "0.7373853", "0.7334181", "0.7333376", "0.7317764", "0.73083985", "0.7306972", "0.7286912", "0.7286116", "0.72571635", "0.72433186", "0.722105", "0.72193927", "0.71957797", "0.71891224", "0.71792865", "0.7156484", "0.71481824", "0.71246916", "0.71246827", "0.7123401", "0.7099984", "0.7091358", "0.70823526", "0.70812017", "0.70803297", "0.7068306", "0.7055263", "0.70502967", "0.70502967", "0.70482934", "0.70445246", "0.70278746", "0.7023305", "0.70183355", "0.6998784", "0.69970214", "0.6990883", "0.6983056", "0.6982282", "0.69769996", "0.6974245", "0.6962396", "0.6932987", "0.69324017", "0.6932162", "0.6932162", "0.6928367", "0.69092363", "0.6902466", "0.6889947", "0.6868255", "0.68532085" ]
0.81222194
1
Creates an exception from a SoapFault object
Создает исключение из объекта SoapFault
public static function createFromSoapFault(SoapFault $soapFault) { if (isset($soapFault->detail->ExportServiceException)) { $detail = $soapFault->detail->ExportServiceException; $message = $detail->status . ': ' . $detail->description; return new EMV_Exception($message); } if (isset($soapFault->detail->BatchMemberServiceException)) { $detail = $soapFault->detail->BatchMemberServiceException; $fields = isset($detail->fields) ? ' [fields: ' . $detail->fields . ']' : ''; $message = $detail->status . $fields . ': ' . $detail->description; return new EMV_Exception($message); } return new EMV_Exception($soapFault->getMessage()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function createFromSoapFault(\\SoapFault $e)\n {\n $code = (int) $e->getMessage();\n\n $message = 'Request failed';\n\n if (isset(self::$messages[$code])) {\n $message = self::$messages[$code];\n $class = isset(self::$exceptions[$code]) ? self::$exceptions[$code] : null;\n\n if ($class) {\n $class = 'KG\\\\DigigDoc\\\\Exception\\\\'.$class;\n\n return new $class($message, $code, $e);\n }\n }\n\n return new static($message, $code, $e);\n }", "static function newSoapFault( $p_fault_code, $p_fault_string ) {\n\t\treturn new SoapFault( $p_fault_code, $p_fault_string );\n\t}", "public function fault()\n\t{\n\t\trequire_once 'PLASER/SoapFault.php';\n\t\tnew PLASER_SoapFault($this->faultcode, $this->faultstring, $this->faultactor, $this->detail);\n\t}", "function SoapExceptionHandler( $msg )\n{\n\tthrow new SoapFault(\"Server\", $msg);\n}", "protected function handle(SoapFault $fault)\n {\n if (!isset($fault->detail) || !$fault->detail) {\n throw new SpeedyException($fault->getMessage(), $fault->getCode());\n }\n\n foreach ($fault->detail as $exception => $message) {\n if (is_object($message)) {\n if (!isset($message->errorDescription)) {\n $message = '';\n }\n\n if (isset($message->errorDescription)) {\n $message = $message->errorDescription;\n }\n }\n\n if (!$message) {\n $message = $fault->getMessage();\n }\n\n if (class_exists(\"\\\\Rolice\\\\Speedy\\\\Exceptions\\\\{$exception}\")) {\n $class = \"\\\\Rolice\\\\Speedy\\\\Exceptions\\\\{$exception}\";\n throw new $class($message);\n }\n }\n\n throw $fault;\n }", "public function setFault(Fault $fault): self\n {\n $this->fault = $fault;\n\n return $this;\n }", "function getFault() {\r\n\t\t\t// return debuggable fault objects\r\n\t\t\tif (strcmp(DISPLAY_ERROR_STYLE, \"Plaintext\") == 0) {\r\n\t\t\t\t$allErrors = \"\";\r\n\t\t\t\tforeach($this->getErrors() as $error) {\r\n\t\t\t\t\t$allErrors .= \"\r\n\\tCode: \".@$error['code'].\"\r\n\\tDetail: \".@$error['detail'].\"\r\n\\tIs Exemptable: \".@$error['isExemptable'].\"\r\n\\tField: \".@$error['field'].\"\r\n\\tIndex: \".@$error['index'].\"\r\n\\tText Index: \".@$error['textIndex'].\"\r\n\\tText Length: \".@$error['textLength'].\"\r\n\\tTrigger: \".@$error['trigger'].\"\\n\";\r\n\t\t\t\t}\r\n\t\t\t\tif ($allErrors == \"\") $allErrors = \"\\n\";\r\n\t\t\t\treturn \"\r\nCode: \".$this->getCode().\"\r\nMessage: \".$this->getMessage().\"\r\nTrigger: \".$this->getTrigger().\"\r\nErrors:\"\r\n.$allErrors.\r\n\"Fault Origin: \".$this->getFaultOrigin().\"\r\nSOAP Parameters: \".$this->getSoapParameters().\"\\n\\n\";\r\n\t\t\t}\r\n\r\n\t\t\t// return beautiful html errors\r\n\t\t\telse if (strcmp(DISPLAY_ERROR_STYLE, \"HTML\") == 0) {\r\n\t\t\t\t$faultMessage =\r\n\t\t\t\t \"<div style='padding:0.5em; margin:0.5em; border:1px dashed gray;'>\r\n\t\t\t\t <small>\\n<font color='blue'><b>Ouch!</b></font> I am not proud to\r\n\t\t\t\t announce the following <font color='maroon'><u>AdWords API Exception\r\n\t\t\t\t </u></font>:\\n<br />\";\r\n\t\t\t\t$faultMessage .=\r\n\t\t\t\t \"&nbsp;&nbsp;<b>Message:</b> \".$this->getMessage().\"\\n<br />\\n\";\r\n\t\t\t\t$faultMessage .=\r\n\t\t\t\t \"&nbsp;&nbsp;<b>Trigger:</b> \".$this->getTrigger().\"\\n<br />\\n\";\r\n\t\t\t\t$faultMessage .=\r\n\t\t\t\t \"&nbsp;&nbsp;<b>Code:</b> <font color='blue'>\"\r\n\t\t\t\t .$this->getCode().\"</font>\\n<br />\\n\";\r\n\t\t\t\t$faultMessage .=\r\n\t\t\t\t \"&nbsp;&nbsp;<b>Fault Origin:</b> <font color='blue'>\"\r\n\t\t\t\t .$this->getFaultOrigin().\"</font>\\n<br />\";\r\n\r\n\t\t\t\t// pseudo syntax highlighting of the SOAP parameters\r\n\t\t\t\t$style =\r\n\t\t\t\t \"<style type='text/css'> .string { font-family:monospace;\r\n\t\t\t\t color:darkgreen; } .tag { font-family:monospace; color:blue; }</style>\";\r\n\t\t\t\techo $style;\r\n\t\t\t\t$this->soapParameters =\r\n\t\t\t\t str_replace(\"'\", \"&quot;\", htmlspecialchars($this->getSoapParameters()));\r\n\t\t\t\t$this->soapParameters =\r\n\t\t\t\t preg_replace(\r\n\t\t\t\t '/(&quot;.*?&quot;)/s',\r\n\t\t\t\t '<span class=\"string\">\\1</span>',\r\n\t\t\t\t $this->getSoapParameters()\r\n\t\t\t\t );\r\n\t\t\t\t$this->soapParameters =\r\n\t\t\t\t preg_replace(\r\n\t\t\t\t '/(&lt;[a-zA-Z0-9]*&gt;)/s',\r\n\t\t\t\t '<span class=\"tag\">\\1</span>',\r\n\t\t\t\t $this->getSoapParameters()\r\n\t\t\t\t );\r\n\t\t\t\t$this->soapParameters =\r\n\t\t\t\t preg_replace(\r\n\t\t\t\t '/(&lt;\\/.*?&gt;)/s',\r\n\t\t\t\t '<span class=\"tag\">\\1</span><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;',\r\n\t\t\t\t $this->getSoapParameters()\r\n\t\t\t\t );\r\n\t\t\t\t$this->soapParameters =\r\n\t\t\t\t preg_replace('/\\n/s', '<br />\\1', $this->getSoapParameters());\r\n\t\t\t\t$faultMessage .=\r\n\t\t\t\t \"&nbsp;&nbsp;<b>SOAP Parameters:</b>\\n<br />\\n\r\n\t\t\t\t &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"\r\n\t\t\t\t .utf8_encode(str_replace(\"€\", \"&#x20AC;\", $this->getSoapParameters()))\r\n\t\t\t\t .\"\\n\";\r\n\t\t\t\tif (sizeOf($this->getErrors()) > 0) {\r\n\t\t\t\t\t$faultMessage .= \"<br />\\n<b>AdWords API Error(s):</b>\\n<br />\\n\";\r\n\t\t\t\t\t$allErrors = \"\";\r\n\t\t\t\t\t$i = 0;\r\n\t\t\t\t\tforeach($this->getErrors() as $error) {\r\n\t\t\t\t\t\t$allErrors .= \"&nbsp;&nbsp;<b>Violation #\".$i.\"</b><br />\";\r\n\t\t\t\t\t\t$allErrors .= \"\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Code:</b> \".@$error['code'].\"<br />\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Detail:</b> \".@$error['detail'].\"<br />\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Is Exemptable:</b> \".@$error['isExemptable'].\"<br />\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Field:</b> \".@$error['field'].\"<br />\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Index:</b> \".@$error['index'].\"<br />\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Text Index:</b> \".@$error['textIndex'].\"<br />\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Text Length:</b> \".@$error['textLength'].\"<br />\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Trigger:</b> \".@$error['trigger'].\"\\n<br />&nbsp;<br />\";\r\n\t\t\t\t\t\t$i++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$faultMessage .= $allErrors;\r\n\t\t\t\t}\r\n\t\t\t\t$faultMessage .= \"</small></div>\";\r\n\t\t\t\treturn $faultMessage;\r\n\t\t\t}\r\n\r\n\t\t\t// return xml fault messages\r\n\t\t\telse if (strcmp(DISPLAY_ERROR_STYLE, \"XML\") == 0) {\r\n\t\t\t\t$xml = \t\"\r\n<adWordsApiError>\r\n\t<code>\".$this->getCode().\"</code>\r\n\t<message>\".$this->getMessage().\"</message>\r\n\t<trigger>\".$this->getTrigger().\"</trigger>\r\n\t<faultOrigin>\".$this->getFaultOrigin().\"</faultOrigin>\r\n\t<soapParameters>\\n\\t\\t\"\r\n\t.str_replace('€', '&#x20AC;', $this->getSoapParameters()).\"\\n\\t</soapParameters>\";\r\n\tif (sizeOf($this->getErrors()) > 0) {\r\n\t\t$allErrors = \"<errors>\\n\";\r\n\t\tforeach($this->getErrors() as $error) {\r\n\t\t\t$allErrors .= \"<error>\r\n\t<code>\".@$error['code'].\"</code>\\n\r\n\t<detail>\".@$error['detail'].\"</detail>\\n\r\n\t<isExemptable>\".@$error['isExemptable'].\"</isExemptable>\\n\r\n\t<field>\".@$error['field'].\"</field>\\n\r\n\t<index>\".@$error['index'].\"</index>\\n\r\n\t<textIndex>\".@$error['textIndex'].\"</textIndex>\\n\r\n\t<textLength>\".@$error['textLength'].\"</textLength>\\n\r\n\t<trigger>\".@$error['trigger'].\"</trigger>\\n</error>\\n\";\r\n\t\t}\r\n\t\t$xml .= $allErrors.\"\\n</errors>\\n\";\r\n\t}\r\n\t$xml .= \"\\n</adWordsApiError>\\n\";\r\n\t\t\t\treturn utf8_encode($xml);\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}", "private function _fault($code, $errorDescription = \"Generic Error\") {\n \n $faultCode = $this->_config->GetFaultCode();\n \n if (isset($faultCode[$code])) {\n $errorDescription = $faultCode[$code];\n }\n \n return new SoapFault(\"$code\", $errorDescription);\n \n }", "public function getFault(): ?\\SoapFault\n\t{\n\t\treturn $this->getPrevious();\n\t}", "function pushFault($someSoapClient, $faultOrigin, $soapParameters) {\r\n\t\t// API Exception level\r\n\t\t// supplied by the API\r\n\t\tif (!isset($someSoapClient->detail['fault']['code']))\r\n\t\t $someSoapClient->detail['fault']['code'] = \"N/A\";\r\n\t\tif (!isset($someSoapClient->detail['fault']['message']))\r\n\t\t $someSoapClient->detail['fault']['message'] = $someSoapClient->getError();\r\n\t\tif (!isset($someSoapClient->detail['fault']['trigger']))\r\n\t\t $someSoapClient->detail['fault']['trigger'] = \"N/A\";\r\n\t\tif (!isset($someSoapClient->detail['fault']['errors']))\r\n\t\t $someSoapClient->detail['fault']['errors'] = array();\r\n\t\tif (isset($someSoapClient->detail['fault']['errors']['code'])) {\r\n\t\t\t$saveFault = $someSoapClient->detail['fault']['errors'];\r\n\t\t\tunset($someSoapClient->detail['fault']['errors']);\r\n\t\t\t$someSoapClient->detail['fault']['errors'][0] = $saveFault;\r\n\t\t}\r\n\t\t// supplied by APIlity\r\n\t\tif (!isset($faultOrigin)) $faultOrigin = \"N/A\";\r\n\t\tif (!isset($soapParameters)) $soapParameters = \"N/A\";\r\n\r\n\t\t// create a fault object\r\n\t\t$faultObject = new APIlityFault(\r\n\t\t $someSoapClient->detail['fault']['code'],\r\n\t\t $someSoapClient->detail['fault']['message'],\r\n\t\t $someSoapClient->detail['fault']['trigger'],\r\n\t\t $someSoapClient->detail['fault']['errors'],\r\n\t\t $faultOrigin,\r\n\t\t $soapParameters\r\n\t\t);\r\n\r\n\t\t// by default print the fault message, else when running in silence\r\n\t\t// stealth mode be quiet\r\n\t\tif (!SILENCE_STEALTH_MODE) $faultObject->printFault();\r\n\r\n\t\t// access the global error stack\r\n\t\tglobal $faultStack;\r\n\t\t// push the fault object in the fault stack and keep only the last\r\n\t\t// #FAULT_STACK_SIZE error messages\r\n\t\tarray_push($faultStack, $faultObject);\r\n\t\tif (sizeof($faultStack) <= FAULT_STACK_SIZE) return;\r\n\t\twhile (sizeof($faultStack) > FAULT_STACK_SIZE) {\r\n\t\t\tarray_shift($faultStack);\r\n\t\t}\r\n\t}", "function mci_soap_fault_login_failed() {\n\treturn SoapObjectsFactory::newSoapFault( 'Client', 'Access denied' );\n}", "public function __construct(MManagedObjectContext $context) {\n\t\t\tparent::__construct(MPersistentStoreRequest::FaultRequestType, $context);\n\t\t\t\n\t\t\t$this->faults = new MMutableArray();\n\t\t}", "public function addFault(MManagedObject $fault) {\n\t\t\tif (!$fault->isFault()) {\n\t\t\t\tthrow new MPersistentStoreException(S(\"Managed Object is not a valid fault\"));\n\t\t\t}\n\t\t\t$this->faults->addObject($fault);\n\t\t}", "private function createCustomerSOAPerror($soapfault)\n\t\t{\n\t\t\tforeach($this->customer_soap_errors as $acceptable_error){\n\n\t\t\t\tif (strpos(strtolower($soapfault),strtolower($acceptable_error)) !== false) {\n\t\t\t\t return true;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "public function destroy(ItemFault $fault)\n {\n //\n }", "static function isSoapFault ( $p_maybe_fault ) {\n\t\tif( !is_object( $p_maybe_fault ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn get_class( $p_maybe_fault ) == 'SoapFault';\n\t}", "function raiseError( $msg )\n\t{\n\t\treturn new SoapFault( \"Server\", $msg );\n\t}", "function gFaultXmlRequest($faultCode,$faultString){\n\tglobal $stylevar;\n\n\t$faultMethod = 'return_fault';\n\t$xml = new xmlrpcmsg($faultMethod);\n\t$xml->addParam($faultCode);\n\t$xml->addParam($faultString);\n\t$rxml = $xml->serialize($stylevar['charset']);\n\treturn $rxml;\n}", "private function _manageException($function_name, $function_args, $soapFault)\n {\n $exception = self::_getCrowdException($soapFault);\n\n // special case for handling token-authentication failure by the application - we try to reauthenticate.\n // This is because applications can supply cached authentication tokens, which may have expired.\n if ($exception == 'InvalidAuthorizationTokenException') {\n static $retryCount = 0;\n if ($retryCount == 0) {\n $retryCount++;\n $this->_authenticateToServer();\n return call_user_func_array(array($this, $function_name), $function_args);\n }\n // the retries have also failed.\n $msg = 'The Crowd securityServer could not be reached. Check connection settings and network connectivity.';\n throw new Services_Atlassian_Crowd_ServerUnreachableException($msg);\n }\n\n\n // check the soapFault to see if it's a known Crowd error condition\n if ($exception) {\n switch ($exception) {\n // The application doesn't have permission\n case 'ApplicationAccessDeniedException':\n case 'ApplicationPermissionException':\n $msg = 'The application does not have permission to perform ' . $function_name;\n throw new Services_Atlassian_Crowd_ApplicationPermissionException($msg);\n break;\n\n // The principal's account is inactive\n case 'InactiveAccountException':\n $msg = 'The principal\\'s account is inactive.';\n throw new Services_Atlassian_Crowd_InactiveAccountException($msg);\n break;\n\n // The principal's username/password are invalid\n case 'InvalidAuthenticationException':\n if ($function_name == 'createPrincipalToken') {\n $msg = 'The principal could not be found';\n throw new Services_Atlassian_Crowd_ObjectNotFoundException($msg);\n }\n else {\n $msg = 'The principal\\'s username or password is invalid.';\n throw new Services_Atlassian_Crowd_InvalidPrincipalAuthenticationException($msg);\n }\n break;\n\n // Bad arguments\n case 'InvalidCredentialException':\n case 'InvalidEmailAddressException':\n case 'InvalidGroupException':\n case 'InvalidRoleException':\n case 'InvalidUserException':\n $msg = 'The supplied arguments were not accepted by Crowd.';\n throw new Services_Atlassian_Crowd_InvalidArgumentException($msg);\n break;\n\n // xxx not found\n case 'InvalidTokenException':\n case 'ObjectNotFoundException':\n switch ($function_name) {\n case 'addAttributeToPrincipal':\n case 'findGroupMemberships':\n case 'findPrincipalByName':\n case 'findPrincipalByToken':\n case 'findPrincipalWithAttributesByName':\n case 'findRoleMemberships':\n case 'removePrincipal':\n case 'removeAttributeFromPrincipal':\n case 'resetPrincipalCredential':\n case 'updatePrincipalAttribute':\n case 'updatePrincipalCredential':\n $target = 'principal';\n break;\n\n case 'addAttributeToGroup':\n case 'findGroupByName':\n case 'findGroupWithAttributesByName':\n case 'removeAttributeFromGroup':\n case 'removeGroup':\n case 'updateGroup':\n case 'updateGroupAttribute':\n $target = 'group';\n break;\n\n case 'findRoleByName':\n case 'removeRole':\n $target = 'role';\n break;\n\n case 'addPrincipalToGroup':\n case 'removePrincipalFromGroup':\n $target = 'principal or group';\n break;\n\n case 'addPrincipalToRole':\n case 'removePrincipalFromRole':\n $target = 'principal or role';\n break;\n }\n $msg = \"The {$target} was not found.\";\n throw new Services_Atlassian_Crowd_ObjectNotFoundException($msg);\n break;\n }\n }\n $msg = 'An unknown error occurred.';\n throw new Services_Atlassian_Crowd_Exception($msg);\n }", "public function testExceptionIsRaisedSoapFault($vat)\n {\n $this->expectException(ViesServiceException::class);\n $stub = $this->getMockFromWsdl(dirname(__FILE__) . '/_files/checkVatService.wsdl');\n $stub->expects($this->any())\n ->method('__soapCall')\n ->will($this->throwException(new SoapFault(\"test\", \"myMessage\")));\n\n (new Vies())\n ->setSoapClient($stub)\n ->validateVat('BE', $vat)\n ;\n }", "public function dataProviderForGetSoapFaultMessageTest()\n {\n /** Include file with all expected SOAP fault XMLs. */\n $expectedXmls = include __DIR__ . '/../../_files/soap_fault/soap_fault_expected_xmls.php';\n\n //Each array contains data for SOAP Fault Message, Expected XML, and Assert Message.\n return [\n 'ArrayDataDetails' => [\n 'Fault reason',\n 'Sender',\n [\n Fault::NODE_DETAIL_PARAMETERS => ['key1' => 'value1', 'key2' => 'value2', 'value3'],\n Fault::NODE_DETAIL_TRACE => 'Trace',\n 'Invalid' => 'This node should be skipped'\n ],\n $expectedXmls['expectedResultArrayDataDetails'],\n 'SOAP fault message with associated array data details is invalid.',\n ],\n 'IndexArrayDetails' => [\n 'Fault reason',\n 'Sender',\n ['value1', 'value2'],\n $expectedXmls['expectedResultIndexArrayDetails'],\n 'SOAP fault message with index array data details is invalid.',\n ],\n 'EmptyArrayDetails' => [\n 'Fault reason',\n 'Sender',\n [],\n $expectedXmls['expectedResultEmptyArrayDetails'],\n 'SOAP fault message with empty array data details is invalid.',\n ],\n 'ObjectDetails' => [\n 'Fault reason',\n 'Sender',\n (object)['key' => 'value'],\n $expectedXmls['expectedResultObjectDetails'],\n 'SOAP fault message with object data details is invalid.',\n ],\n 'ComplexDataDetails' => [\n 'Fault reason',\n 'Sender',\n [Fault::NODE_DETAIL_PARAMETERS => ['key' => ['sub_key' => 'value']]],\n $expectedXmls['expectedResultComplexDataDetails'],\n 'SOAP fault message with complex data details is invalid.',\n ]\n ];\n }", "public static function create(\\Throwable $exception): ServiceException\n {\n return new ServiceException($exception->getMessage(), $exception->getCode(), $exception);\n }", "private function getSoapInit()\n {\n try {\n $this->soapClientTimeBegin = microtime(true);\n $this->getSoapClient();\n } catch (Exception $soapException) {\n $this->soapClientTimeEnd = microtime(true);\n $soapClientRequestTimeDiff = $this->soapClientTimeEnd - $this->soapClientTimeBegin;\n $currentTimeout = $this->CONFIG->getTimeout();\n\n if ((int)$soapException->getCode()) {\n throw $soapException;\n }\n\n // Trying to prevent dual requests during a soap-transfer. In v6.0, there was dual initializations of\n // soapclient when potential authfail errors occurred.\n if ((int)$this->soapWarningException['code']) {\n $code = $this->getHttpHead($this->soapWarningException['string']);\n if ((int)$code === 0) {\n // Above request is fetching the first code in the string. If this makes the code still go 0\n // we will fail over to the real one, as we usually want to get errors from the soap warning string.\n $code = (int)$this->soapWarningException['code'];\n }\n $message = $this->getHttpHead($this->soapWarningException['string'], 'message');\n\n if ($code === 2) {\n if ($soapClientRequestTimeDiff >= $currentTimeout['CONNECT'] &&\n $soapClientRequestTimeDiff >= $currentTimeout['REQUEST']\n ) {\n $code = Constants::LIB_NETCURL_SOAP_TIMEOUT;\n $message .= sprintf(' [soapClientRequestTime: %s]', $this->getTotalRequestTime());\n } elseif (preg_match('/Connection refused/', $message)) {\n // Try to detect this error by string. May be destroyed by locales.\n $code = Constants::LIB_NETCURL_CONNECTION_REFUSED;\n }\n }\n\n $this->CONFIG->getHttpException(\n (int)$code > 0 && !empty($message) ? $message : $this->soapWarningException['string'],\n (int)$code > 0 ? $code : $this->soapWarningException['code'],\n null,\n $this,\n true\n );\n }\n }\n $this->soapClientTimeEnd = microtime(true);\n\n // Restore the errorhandler immediately after soaprequest if no exceptions are detected during first request.\n restore_error_handler();\n\n return $this;\n }", "public function removeFault(MManagedObject $fault) {\n\t\t\t$this->faults->removeObject($fault);\n\t\t}", "public function isFaulted();", "public function create(Zend_Http_Response $response, $commandCode)\n {\n $responseErrorMessage = $this->getResponseErrorMessage($response);\n $errorCode = $response->getStatus();\n /**\n * @var Viabill_Payment_Model_Exception_Mapper $messagesMapper \n*/\n $messagesMapper = Mage::getModel('viabill/exception_mapper');\n $errorMessage = $messagesMapper->getMessage($commandCode, $errorCode);\n if (!$errorMessage) {\n $errorCode = Viabill_Payment_Model_Exception_ViabillException::DEFAULT_CODE;\n $errorMessage = !empty($responseErrorMessage)\n ? $responseErrorMessage\n : Viabill_Payment_Model_Exception_ViabillException::DEFAULT_MESSAGE;\n }\n\n // We need to log initial error message because it has more details\n Mage::logException(\n new Exception(\n !empty($responseErrorMessage)\n ? $responseErrorMessage\n : $errorMessage\n )\n );\n\n return new Viabill_Payment_Model_Exception_ViabillException(\n Mage::helper('viabill')->__($errorMessage),\n $errorCode,\n null\n );\n }", "public function IsFault() {\n return isset($this->lastSoapFault);\n }", "protected function _checkSoapResponse($response) {\n\n if (is_object($response) && $response instanceof \\SoapFault) {\n error_log($response->getMessage());\n error_log($response->getTraceAsString());\n throw new \\Exception($response->getMessage());\n }\n if (!is_array($response)) {\n throw new \\Exception('response is no array');\n }\n if (!isset($response['state']) || !in_array($response['state'], array('ok', 'error'))) {\n throw new \\Exception('unknown state');\n }\n if ('error' === $response['state']) {\n throw new \\Exception($response['messages'][0]);\n }\n }", "public function prepareExceptionResponse(\\Exception $result);", "protected function convertResponseToException(ResponseInterface $response)\n {\n\n $code = 500;\n $message = 'Unknown error';\n\n if ($response->hasHeader('szlahu_error_code')) {\n $code = $response->getHeader('szlahu_error_code')[0];\n }\n elseif ($this->isAuthenticationError($response)) {\n $code = 2;\n }\n elseif (preg_match(\"/<hibakod>([0-9]+)\\<\\/hibakod>/\", (string)$response->getBody(), $matches)) {\n if (isset($matches[1]) && is_numeric($matches[1])) {\n $code = (int)$matches[1];\n }\n }\n\n if ($response->hasHeader('szlahu_error')) {\n $message = $response->getHeader('szlahu_error')[0];\n }\n\n $httpStatusCode = $response->getStatusCode();\n\n $exceptionClass = null;\n\n switch ((int)$code) {\n case 3:\n $exceptionClass = AuthenticationException::class;\n break;\n case 54:\n $exceptionClass = CannotCreateInvoiceException::class;\n break;\n case 261:\n case 264:\n $exceptionClass = InvalidGrossPriceValueException::class;\n break;\n case 202:\n $exceptionClass = InvalidInvoicePrefixException::class;\n break;\n case 259:\n case 262:\n $exceptionClass = InvalidNetPriceValueException::class;\n break;\n case 338:\n $exceptionClass = ReceiptAlreadyExistsException::class;\n break;\n case 339:\n $exceptionClass = ReceiptNotFoundException::class;\n break;\n case 260:\n case 263:\n $exceptionClass = InvalidVatRateValueException::class;\n break;\n case 56:\n $exceptionClass = InvoiceNotificationSendingException::class;\n break;\n case 49:\n $exceptionClass = KeystoreOpeningException::class;\n break;\n case 53:\n $exceptionClass = NoXmlFileException::class;\n break;\n case 1:\n $exceptionClass = RemoteMaintenanceException::class;\n break;\n case 55:\n $exceptionClass = UnsuccessfulInvoiceSignatureException::class;\n break;\n case 57:\n $exceptionClass = XmlReadingException::class;\n break;\n default:\n throw new CommonResponseException($response, $message ?: 'Unknown error', $httpStatusCode ?: 500);\n }\n\n if ($exceptionClass) {\n throw new $exceptionClass($response);\n }\n\n }", "public function get_exception();", "public function createErrorResponse(TRpcException $exception)\n\t{\n\t\treturn $this->encode(array(\n\t\t\t'faultCode' => $exception->getCode(),\n\t\t\t'faultString' => $exception->getMessage()\n\t\t));\n\t}", "public function show(ItemFault $fault)\n {\n return response($fault);\n }", "public function prepare(Order $order)\n {\n $order->notify_url = $order->get('notify_url', $this->config->notify_url);\n\n $data = $this->request(self::API_PREPARE_ORDER, $order->all());\n if ($data->result_code == 'SUCCESS') {\n if (!(new Request($this->getConfig()))->setData($data->toArray())->isValid()) {\n throw new FaultException('Invalid request payloads.', 400);\n }\n }\n\n return $data;\n }", "function getFaultString() {\n\t\tif ($this->isFault()) {\n\t\t\t$faultStruct =& $this->documentElement->firstChild->firstChild->firstChild;\n\t\t\treturn ($faultStruct->childNodes[1]->childNodes[1]->firstChild->firstChild->nodeValue);\n\t\t}\n\t}", "public function getException()\n {\n if (isset($this->exceptionMap[$this->code])) {\n $exception = new $this->exceptionMap[$this->code];\n } else {\n $exception = new NotFoundException($this->message, $this->code);\n }\n\n return $exception;\n }", "public function manager_fault_retrieve($args = array()){\n\t\t$record = $this->query_get(\"fault/alarm/\", $args);\n\t\t$http_code = $this->get_status_code($record->info);\n\t\t\n\t\tif($http_code != 200){\n\t\t\t$record->error = \"Invalid http response: \".$http_code;\n\t\t}\n\t\t\n\t\treturn $record;\n\t}", "private function extract_xml_data_to_assoc($xml_input){\n\n //variables to use\n $result = new stdClass();\n $result->err_msg = 'OK';\n $result->request_data = NULL;\n\n//echo \"\\n### XML Response:\\n\\n\".$xml_input.\"\\n\\n### END of XML Response\\n\\n\";\n\n //check if the passed string has some XML stuff within\n if(strpos($xml_input, '?xml ', 0) !== FALSE){\n\n //1. set the XML processing errors reporting\n libxml_use_internal_errors(TRUE);\n\n //2. load the passed string as an XMLObject\n $xml_object_to_process = simplexml_load_string($xml_input);\n\n //3. check if there were some error with the loading of the $xml_input loading as SimpleXMLElement Object\n $xml_errors = libxml_get_errors();\n\n //there was an error(s) creating it from a string\n if(sizeof($xml_errors) > 0){\n //clear the error_message\n $result->err_msg = '';\n //re-build the new error_message\n foreach ($xml_errors as $key=>$xml_error)\n $result->err_msg .= ($key+1).'. '.\n trim($xml_error->code).':<br />'.\n trim($xml_error->message).\n '<br />line: '.$xml_error->line.\n '<br />column: '.$xml_error->column;\n\n }else{\n\n//echo \"\\nThe XML-Object to process is:\\n\";\n//print_r($xml_object_to_process);\n\n //4. get the //soap:Fault and //NewDataSet part of the XML: will be array of SimpleXMLElement Objects or FALSE\n $xml_object_to_process->registerXPathNamespace('soap', 'http://www.w3.org/2003/05/soap-envelope');\n\t\t\t\t$xml_response_fault = $xml_object_to_process->xpath('//soap:Fault'); //soap:Fault\n\t\t\t\t$xml_result_data = $xml_object_to_process->xpath('//NewDataSet'); //NewDataSet\n\n//echo \"\\nThe body of Response is: \";\n//echo \"\\nThe body of Fault is: \";\n//print_r($xml_response_fault);\n//echo \"\\nThe body of Data is: \";\n//print_r($xml_result_data);\n//echo \"\\n\";\n//echo \"\\n### Start of SOAP XML converted String###\\n\";\n//echo \"\\nFault: \\n\";\n//print_r(json_decode(json_encode($xml_response_fault)));\n//echo \"\\nData: \\n\";\n//print_r(json_decode(json_encode($xml_result_data)));\n//echo \"\\n### END of SOAP XML converted String###\\n\";\n\n\t\t\t\t//4.1 Check the Fault (Error Returned MSG from the PL-WS), if there is such\n\t\t\t\tif($xml_response_fault){ //There was an issue with the Sent SOAP Request DATA\n\t\t\t\t\t$fault_result = json_encode($xml_response_fault);\n\t\t\t\t\t$xml_mixed_fault_data = json_decode($fault_result);\n\t\t\t\t\t$xml_fault_result_array = $this->mixed_array_to_assoc($xml_mixed_fault_data);\n\n//echo \"\\n### Start Fault Data\\n\";\n//print_r($xml_fault_result_array);\n//echo \"\\n### END Fault Data\\n\";\n\n\t\t\t\t\t//Set the Error Message\n\t\t\t\t\t$result->err_msg = '<strong>System Notice:</strong><br />'.\n\t\t\t\t\t\t\t\t\t\t((Kohana::$environment != Kohana::PRODUCTION)?\n\t\t\t\t\t\t\t\t\t\t\t\t'<em>Fault Code:</em> '.$xml_fault_result_array['faultcode'].'<br />'.'<em>Message:</em> '.$xml_fault_result_array['faultstring'] :\n\t\t\t\t\t\t\t\t\t\t\t\t'There was a problem with the Request to Rewards Club - 3rd Party Web Service.'\n\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t//The Request was OK, proceed as usual\n\t\t\t\t}else{\n\t\t\t\t\t//4.2 the xml_string was successfully loaded as an XMLObject\n\t\t\t\t\tif($xml_result_data){ //convert it to array\n\t\t\t\t\t\t//4.2.1 convert the $xml_result_data into associative array\n\t\t\t\t\t\t//converts SimpleXMLObject to assoc_array and its children: SimpleXMLElement to just Objects\n\t\t\t\t\t\t$temp_result = json_encode($xml_result_data);\n\t\t\t\t\t\t$xml_mixed_result_data = json_decode($temp_result);\n\n//echo \"\\n### Collection to Convert: \\n\";\n//print_r($xml_mixed_result_data);\n\n\t\t\t\t\t\t//4.2.2 convert the $xml_mixed_result_data into associative array\n\t\t\t\t\t\t$xml_result_array = $this->mixed_array_to_assoc($xml_mixed_result_data);\n\n//echo \"\\n### Converted Collection: \\n\";\n//print_r($xml_result_array);\n//echo \"\\n### NOW PROCESS EXTRACTED DATA ###\\n\";\n\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * For All Request the $xml_result_array is in the form:\n\t\t\t\t\t\t * $xml_result_array = 'OK' or the error message received from the Web-Service\n\t\t\t\t\t\t * $xml_result_array = array(\n\t\t\t\t\t\t * 'table' : HOLDS_THE_RECEIVED_FROM_THE_WS-DATA\n\t\t\t\t\t\t * 'table1' : HOLDS_THE_RECEIVED_FROM_THE_WS_RESPONSE\n\t\t\t\t\t\t * )\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * In the Case of: RequestNewCardNumber, the $xml_result_array is in the form\n\t\t\t\t\t\t * $xml_result_array = array(\n\t\t\t\t\t\t * 'table1' : HOLDS_THE_RECEIVED_FROM_THE_WS-DATA\n\t\t\t\t\t\t * 'table2' : HOLDS_THE_RECEIVED_FROM_THE_WS_RESPONSE\n\t\t\t\t\t\t * )\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * @TODO: NOTE: This Request is NO LONGER Used - if this check and everything related to: RegisterNewMember_1_3 IS STILL HERE AFTER 01 JULY 2013 -=> REMOVE IT\n\t\t\t\t\t\t * In the Case of: RegisterNewMember_1_3 the $xml_result_array is in the form:\n\t\t\t\t\t\t * $xml_result_array = array(\n\t\t\t\t\t\t * \t\t\t\t\t\t\t'0' => array(\n\t\t\t\t\t\t * \t\t\t\t\t\t\t\t\t\t\t'memberid' => THE_GENERATED_USER_MEMBER_ID\n\t\t\t\t\t\t * \t\t\t\t\t\t\t\t\t\t\t'username' => SAME_AS_MEMBERID\n\t\t\t\t\t\t * \t\t\t\t\t\t\t\t\t\t\t'password' => THE_GENERATED_PASSWORD_FOR_THIS_USERNAME\n\t\t\t\t\t\t * \t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t * \t\t\t\t\t\t\t'1' => array(\n\t\t\t\t\t\t * \t\t\t\t\t\t\t\t\t\t\t'success' => TRUE_OR_FALSE\n\t\t\t\t\t\t * \t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t */\n\t\t\t\t\t\t//check if the request was valid\n\t\t\t\t\t\tif(\n\t\t\t\t\t\t\t//most request wil have this type of response for success/fail\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t(isset($xml_result_array['table1']['success']) && strtolower($xml_result_array['table1']['success']) === 'true' ) &&\n\t\t\t\t\t\t\t\t(isset($xml_result_array['table']) && count($xml_result_array['table']) >= 1)\n\t\t\t\t\t\t\t) ||\n\t\t\t\t\t\t\t//this response Structure is coming from the RequestNewCardNumber Request: table1 - holds the response Data and table2 - holds the SUCCESS/FAIL details\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t(isset($xml_result_array['table2']['success']) && strtolower($xml_result_array['table2']['success']) === 'true') &&\n\t\t\t\t\t\t\t\t(isset($xml_result_array['table1']) && count($xml_result_array['table1']) >= 1)\n\t\t\t\t\t\t\t) ||\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * @TODO: NOTE: This Request is NO LONGER Used - if this check and everything related to: RegisterNewMember_1_3 IS STILL HERE AFTER 01 JULY 2013 -=> REMOVE IT\n\t\t\t\t\t\t\t * this one is received for the RegisterNewMember_1_3 response -\n\t\t\t\t\t\t\t * - $xml_result_array['table1'][0] will hold: memberId, Username and Password\n\t\t\t\t\t\t\t * - $xml_result_array['table1'][1] will hold: success TRUE/FALSE + message (maybe?)\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t(isset($xml_result_array['table1'][1]['success']) && strtolower($xml_result_array['table1'][1]['success']) === 'true' ) &&\n\t\t\t\t\t\t\t\t(isset($xml_result_array['table1'][0]) && count($xml_result_array['table1'][0]) >= 1)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t){\n\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * Set the Result->request_data taken from Table1\n\t\t\t\t\t\t\t * -=> because of the: RequestNewCardNumber Request:\n\t\t\t\t\t\t\t * \t\ttable1 - holds the response Data and\n\t\t\t\t\t\t\t * \t\ttable2 - holds the SUCCESS/FAIL details\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tif(isset($xml_result_array['table2'])){\n\t\t\t\t\t\t\t\tif(count($xml_result_array['table1']) >= 1){\n\t\t\t\t\t\t\t\t\t$result->request_data = $xml_result_array['table1'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//Set the Result->request_data as USUAL: table - holds the Response data, table1 - holds the SUCCESS/FAIL details\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tif(isset($xml_result_array['table']) && count($xml_result_array['table']) >= 1){\n\t\t\t\t\t\t\t\t\t$result->request_data = $xml_result_array['table'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(isset($xml_result_array['table1'][0]) && count($xml_result_array['table1'][0]) >= 1){\n\t\t\t\t\t\t\t\t\t$result->request_data = $xml_result_array['table1'][0];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//there was a problem with the request - set the WS-error response\n\t\t\t\t\t\t}else if(\n\t\t\t\t\t\t\t//most request wil have this type of response for success/fail\n\t\t\t\t\t\t\t(isset($xml_result_array['table1']['success']) && strtolower($xml_result_array['table1']['success']) === 'false') ||\n\t\t\t\t\t\t\t//request: RequestNewCardNumber has this type of response for success/fail\n\t\t\t\t\t\t\t(isset($xml_result_array['table2']['success']) && strtolower($xml_result_array['table2']['success']) === 'false') ||\n\t\t\t\t\t\t\t(isset($xml_result_array['table1'][1]['success']) && strtolower($xml_result_array['table1'][1]['success']) === 'false')\n\t\t\t\t\t\t){\n\t\t\t\t\t\t\tif(isset($xml_result_array['table1']['message'])){\n\t\t\t\t\t\t\t\t$result->err_msg = '<strong>System Notice:</strong> '.$xml_result_array['table1']['message'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(isset($xml_result_array['table2']['message'])){\n\t\t\t\t\t\t\t\t$result->err_msg = '<strong>System Notice:</strong> '.$xml_result_array['table2']['message'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(isset($xml_result_array['table1'][1]['message'])){\n\t\t\t\t\t\t\t\t$result->err_msg = '<strong>System Notice:</strong> '.$xml_result_array['table1'][1]['message'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t//there was no such '//NewDataSet' in the received XML response\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//set error msg\n\t\t\t\t\t\t$result->err_msg = '<strong>System Notice:</strong> The received Web Service XML-Response had no data to be retrieved!';\n\t\t\t\t\t}\n\t\t\t\t}//end of Processing PL-WS Response\n\n }//end of processing $xml_input\n\n //clear errors\n libxml_clear_errors();\n //unset the XML processing errors reporting\n libxml_use_internal_errors(FALSE);\n\n //the passed xml_string is not XML formatted\n }else{\n $result->err_msg = '<strong>System Notice:</strong> The passed string is not a valid XML formatted string!';\n }\n\n//echo \"\\nResult before EXIT:\\n\";\n//print_r($result);\n//exit(\"\\n\\nEXIT before Return\");\n\n //return\n return $result;\n }", "function getFaultCode() {\n\t\tif ($this->isFault()) {\n\t\t\t$faultStruct =& $this->documentElement->firstChild->firstChild->firstChild;\n\t\t\treturn ($faultStruct->childNodes[0]->childNodes[1]->firstChild->firstChild->nodeValue);\n\t\t}\n\t}", "public function GetLastFaultMessage() {\n return $this->IsFault()\n ? $this->lastSoapFault->getMessage() : 'null';\n }", "public function get_exception(/* ... */)\n {\n return $this->_exception;\n }", "function request(toba_servicio_web_mensaje $mensaje)\n\t{\n\t\ttry {\n\t\t\t$message = $this->wsf->request($mensaje->wsf());\n\t\t\tif (! toba::instalacion()->es_produccion()) {\n\t\t\t\ttoba::logger()->debug(\"Request: \" . var_export($this->wsf->getLastRequest(), true));\n\t\t\t\ttoba::logger()->debug(\"Response: \" . var_export($this->wsf->getLastResponse(), true));\n\t\t\t\ttoba::logger()->var_dump($this->wsf->getLastResponseHeaders());\n\t\t\t}\n\n\t\t\t//-- INICIO PARCHE: Intenta parsear un Fault por bug en libreria WSF con esquema de seguridad..\n\t\t\tif (is_a($message, 'WSMessage')) {\n\t\t\t\t$inicio = \"<soapenv:Fault\";\n\t\t\t\tif (substr($message->str, 0, strlen($inicio)) == $inicio) {\n\t\t\t\t\t$xml = new SimpleXMLElement($message->str);\n\t\t\t\t\t$ns = $xml->getDocNamespaces(true);\n\t\t\t\t\t$childrens = $xml->children($ns['soapenv']);\n\t\t\t\t\t$code = @(string) $childrens->Code->Value;\n\t\t\t\t\t$reason = @(string) $childrens->Reason->Text;\n\t\t\t\t\t$detail = @(string) $childrens->Detail->children($ns['soapenv']->children, true)->error;\n\t\t\t\t\tthrow new WSFault(str_replace(\"soapenv:\", \"\", $code), $reason, null, $detail);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//--- FIN PARCHE\n\n\t\t\treturn new toba_servicio_web_mensaje($message);\n\t\t} catch (WSFault $fault) {\n\t\t\tif (! toba::instalacion()->es_produccion()) {\n\t\t\t\ttoba::logger()->debug(\"Request: \" . var_export($this->wsf->getLastRequest(), true));\n\t\t\t\ttoba::logger()->debug(\"Response: \" . var_export($this->wsf->getLastResponse(), true));\n\t\t\t\ttoba::logger()->var_dump($this->wsf->getLastResponseHeaders());\n\t\t\t}\n\t\t\t$detalle = (isset($fault->Detail)) ? $fault->Detail: '';\n\t\t\t$code = (isset($fault->Code)) ? $fault->Code: '';\n\t\t\tself::get_modelo_proyecto($this->proyecto);\n\t\t\tthrow new toba_error_servicio_web($fault->Reason, $detalle, $code);\n\t\t} catch (Exception $e) {\n\t\t\tif (! toba::instalacion()->es_produccion()) {\n\t\t\t\ttoba::logger()->debug(\"Request: \" . var_export($this->wsf->getLastRequest(), true));\n\t\t\t\ttoba::logger()->debug(\"Response: \" . var_export($this->wsf->getLastResponse(), true));\n\t\t\t\ttoba::logger()->var_dump($this->wsf->getLastResponseHeaders());\n\t\t\t}\n\t\t\tthrow new toba_error_comunicacion($e->getMessage(), $this->opciones, $this->wsf->getLastResponseHeaders());\n\t\t}\n\t}", "public function faultString()\n {\n return $this->getMessage();\n }", "public function getException();", "public function getException();", "public function getException();", "function saprfc_exception($function)\n{\n $func = \\phpsap\\IntegrationTests\\SapRfcModuleMocks::singleton()->get(__FUNCTION__);\n return $func($function);\n}", "public function __construct(){\n\n if(!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n $this->ip_address =array('ip_address'=> $_SERVER['HTTP_X_FORWARDED_FOR']);\n } else {\n $this->ip_address =array('ip_address'=> $_SERVER['REMOTE_ADDR']) ;\n }\n $soap_address = config('app.soap_address'); \n @$sgs = file_get_contents($soap_address); //check if webservice is online\n if ($sgs == FALSE)\n {\n throw new Exception();\n }\n $this->soapClient = new SoapClient($soap_address); \n }", "public function faults()\n {\n return $this->hasMany(Fault::class);\n }", "private function getException(string $message, $method): \\Exception\n {\n if ($method === 'UPDATE') {\n return new InvalidUpdateException($message);\n }\n return new InvalidCreationException($message);\n }", "public static function createServiceException(HttpClientException $exception): ServiceException\n {\n if (!$exception instanceof \\Throwable) {\n return new ServiceException('Unknown exception occurred', 0);\n }\n\n return self::create($exception);\n }", "public function __construct(ExceptionHandler $original)\n {\n $this->original = $original;\n }", "public function update(Request $request, ItemFault $fault)\n {\n $fault->update($request->validate([\n 'name' => 'nullable|min:3',\n 'description' => 'nullable',\n 'status' => ['nullable', Rule::in(ItemFaultStatus::getValues())],\n 'priority' => ['nullable', Rule::in(ItemFaultPriority::getValues())]\n ]));\n\n return response($fault);\n\n }", "public function convertException(\\Throwable $exception): \\Throwable;", "protected function _initOrder($orderId) {\n $order = Mage::getModel('sales/order')->load($orderId);\n if (!$order->getId()) {\n throw new Exception($this->__('This order no longer exists.'));\n }\n return $order;\n }", "public static function formOtherException(\\Exception $exception)\n {\n return new static(\n $exception->getMessage(),\n $exception->getCode(),\n $exception\n );\n }", "public function __construct( $wsdl = '' )\n {\n $this->domainKey = Hanzo::getInstance()->get('core.domain_key');\n\n try {\n if (empty($wsdl)) {\n $wsdl = 'http://phplist.bellcom.dk/integration/phplist.konsulent.pompdelux.dk/wsdl';\n }\n\n $this->soapClient = new \\Soapclient( $wsdl, ['trace' => true] );\n\n } catch (Exception $e) {\n throw new Exception( \"Could not create soap client: \". $e->getMessage() );\n }\n }", "private function getSoapInitErrorHandler()\n {\n // No inspections on this, it is handled properly handled despite the immediate overrider.\n // The overrider is present as it has to be nulled out after each use.\n if (!is_null($this->currentErrorHandler)) {\n restore_error_handler();\n $this->currentErrorHandler = null;\n $this->soapWarningException['code'] = null;\n $this->soapWarningException['string'] = null;\n }\n $this->currentErrorHandler = set_error_handler(function ($errNo, $errStr) {\n if (empty($this->soapWarningException['string'])) {\n $this->soapWarningException['code'] = $errNo;\n $this->soapWarningException['string'] = $errStr;\n }\n restore_error_handler();\n return false;\n }, E_WARNING);\n\n return $this;\n }", "public static function reflectionFailure($document, \\ReflectionException $previousException)\n {\n return new self('An error occurred in ' . $document, 0, $previousException);\n }", "public function __construct($objetoExeption = Exception::class){\n $this->code = $objetoExeption->getCode(); // armazena os dados da exeção na váriavel da classe\n $this->message = $objetoExeption->getMessage();\n }", "public function setVmsfaultEnum($vmsfaultEnum)\n {\n $this->vmsfaultEnum = $vmsfaultEnum;\n return $this;\n }", "public static function fromException(Exception $exception, $status = null, $errors = null)\n {\n return (static::$exceptions_map[$exception->getStatusCode()] ?? Exception::class)::fromException($exception);\n }", "public function httpMessageRequestConstructExceptionHeaders(UnitTester $I)\n {\n $I->wantToTest('Http\\Message\\Request - __construct() - exception headers');\n\n $I->expectThrowable(\n new InvalidArgumentException(\n 'Headers needs to be either an array or instance of Phalcon\\Collection'\n ),\n function () {\n $request = new Request(\n 'GET',\n '',\n 'php://memory',\n false\n );\n }\n );\n }", "function lara_exception($message): FuriosoJack\\LaraException\\ExceptionFather\n {\n $lara = new \\FuriosoJack\\LaraException\\ExceptionFather();\n $lara->message($message);\n return $lara;\n }", "private function _getErrorFromResponse($response) {\n if (isset($response['Envelope']['Body']['Fault']['FaultString']) && !empty($response['Envelope']['Body']['Fault']['FaultString'])) {\n return $response['Envelope']['Body']['Fault']['FaultString'];\n }\n return 'Unknown Server Error';\n }", "protected function exception($prefix= NULL) {\n if ($this->messages) {\n $cause= NULL;\n while ($e= array_shift($this->messages)) {\n $cause= new TdsProtocolException(\n $e['message'],\n $e['number'],\n $e['state'],\n $e['class'],\n $e['server'],\n $e['proc'],\n $e['line'],\n $cause\n );\n }\n } else {\n $cause= new TdsProtocolException('Unexpected protocol error', -1, -1, 0xFF, null, null, -1);\n }\n\n if (NULL !== $prefix) {\n $cause->message= $prefix.': '.$cause->message;\n }\n return $cause;\n }", "private function GetLoadExceptionFromMessage($errorMessage, $innerException = null, $isFatal = true) {\n\t\t$errorMessageWithDetails = $errorMessage . $this->GetConnectionDebugInfoReduced();\n\t\t$ex = new DBOperationException($errorMessageWithDetails, 0, $innerException, $isFatal);\n\t\t$ex->setAdditionalData(array(\"connectionInfo\" => $this->GetConnectionDebugInfo()));\n\t\treturn $ex;\n\t}", "public static function createHttpException($message, NostoHttpRequest $request, NostoHttpResponse $response)\n {\n $message .= sprintf(' Error: %s.', $response->getCode());\n $message .= sprintf(' Request: %s.', $request);\n $message .= sprintf(' Response: %s.', $response);\n return new NostoHttpException($message, $response->getCode());\n }", "protected function createComponentInsertFaultForm(){\n\n $form = (new InsertFaultFormFactory()) -> create();\n $form->onSuccess[] = [$this, 'insertFaultSucceeded'];\n return $form;\n\n }", "protected function getException($prcode)\n {\n $exceptionText = $this->params['RESULTTEXT'];\n\n if (in_array($prcode, [1, 2, 3, 4, 5, 11, 14, 27, 31])) {\n return new InvalidDataException($exceptionText);\n } elseif (in_array($prcode, [15, 17, 18, 20, 25, 28, 30])) {\n return new FinancialException($exceptionText);\n } elseif (in_array($prcode, [26, 1000])) {\n return new CommunicationException($exceptionText);\n } elseif (in_array($prcode, [35])) {\n return new TimeoutException($exceptionText);\n } elseif (in_array($prcode, [50])) {\n return new BlockedException($exceptionText);\n } else {\n return new Exception($exceptionText);\n }\n }", "public function CreateIncident($Incident) {\n\t\t$this->onDebug ( \"CreateIncident de stars\", 1 );\n\t\t$this->onDebug ( $Incident, 2 );\n\t\t\n\t\t/**manual version\n\t\t$soap_data = \"<soapenv:Envelope xmlns:soapenv=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\" xmlns:ns=\\\"http://schemas.hp.com/SM/7\\\" xmlns:com=\\\"http://schemas.hp.com/SM/7/Common\\\" xmlns:xm=\\\"http://www.w3.org/2005/05/xmlmime\\\">\";\n\t\t$soap_data .= \"<soapenv:Header/>\";\n\t\t$soap_data .= \"<soapenv:Body>\";\n\t\t$soap_data .= \"<ns:CreateIncidentRequest attachmentInfo=\\\"\\\" attachmentData=\\\"\\\" ignoreEmptyElements=\\\"true\\\" updateconstraint=\\\"\\\">\";\n\t\t$soap_data .= \" <ns:model query=\\\"\\\">\";\n\t\t$soap_data .= \" <ns:keys query=\\\"\\\" updatecounter=\\\"\\\">\";\n\t\t$soap_data .= \" </ns:keys>\";\n\t\t$soap_data .= \" <ns:instance query=\\\"\\\">\";\n\t\t$soap_data .= \" <ns:Category type=\\\"String\\\" >\" . $Incident [\"Category\"] . \"</ns:Category>\";\n\t\t$soap_data .= \" <ns:OpenedBy type=\\\"String\\\" >\" . $Incident [\"OpenedBy\"] . \"</ns:OpenedBy>\";\n\t\t$soap_data .= \" <ns:Urgency type=\\\"String\\\" >\" . $Incident [\"Urgency\"] . \"</ns:Urgency>\";\n\t\t$soap_data .= \" <ns:AssignmentGroup type=\\\"String\\\" >\" . $Incident [\"AssignmentGroup\"] . \"</ns:AssignmentGroup>\";\n\t\t$soap_data .= \" <ns:AffectedCI type=\\\"String\\\" >\" . $Incident [\"AffectedCI\"] . \"</ns:AffectedCI>\";\n\t\t$soap_data .= \" <ns:Description type=\\\"Array\\\">\";\n\t\t$soap_data .= \" <ns:Description type=\\\"String\\\" >\" . $Incident [\"Description\"] [\"Description\"] . \"</ns:Description>\";\n\t\t$soap_data .= \" </ns:Description>\";\n\t\t$soap_data .= \" <ns:Contact type=\\\"String\\\" >\" . $Incident [\"Contact\"] . \"</ns:Contact>\";\n\t\t$soap_data .= \" <ns:Company type=\\\"String\\\" >\" . $Incident [\"Company\"] . \"</ns:Company>\";\n\t\t$soap_data .= \" <ns:Title type=\\\"String\\\" >\" . $Incident [\"Title\"] . \" </ns:Title>\";\n\t\t$soap_data .= \" <ns:Area type=\\\"String\\\" >\" . $Incident [\"Area\"] . \"</ns:Area>\";\n\t\t$soap_data .= \" <ns:Subarea type=\\\"String\\\" >\" . $Incident [\"Subarea\"] . \"</ns:Subarea>\";\n\t\t$soap_data .= \" <ns:Impact type=\\\"String\\\" >\" . $Incident [\"Impact\"] . \"</ns:Impact>\";\n\t\t$soap_data .= \" <ns:Service type=\\\"String\\\" >\" . $Incident [\"Service\"] . \"</ns:Service>\";\n\t\t$soap_data .= \" <ns:HPOMID type=\\\"String\\\" >\" . $Incident [\"HPOMID\"] . \"</ns:HPOMID>\";\n\t\t$soap_data .= \"\t\t <ns:KnowledgeDoc type=\\\"String\\\" >\" . $Incident [\"KnowledgeDoc\"] . \"</ns:KnowledgeDoc>\";\n\t\t$soap_data .= \"\t\t <ns:CustomerReference1 type=\\\"String\\\" >\" . $Incident [\"CustomerReference1\"] . \"</ns:CustomerReference1>\";\n\t\t$soap_data .= \" </ns:instance>\";\n\t\t$soap_data .= \" <ns:messages>\";\n\t\t$soap_data .= \" <!--Zero or more repetitions:-->\";\n\t\t$soap_data .= \" <com:message severity=\\\"?\\\" module=\\\"?\\\"></com:message>\";\n\t\t$soap_data .= \" </ns:messages>\";\n\t\t$soap_data .= \" </ns:model>\";\n\t\t$soap_data .= \"</ns:CreateIncidentRequest>\";\n\t\t$soap_data .= \"</soapenv:Body>\";\n\t\t$soap_data .= \"</soapenv:Envelope>\";\n\t\t\n\t\tif ($this->getListeOptions ()\n\t\t\t->getOption ( \"dry-run\" ) !== false) {\n\t\t\t$this->onWarning ( \"DRY RUN : CreateIncident NON EXECUTE\" );\n\t\t\t$this->onInfo ( $soap_data );\n\t\t\t$CreateIncidentResponse = array (\n\t\t\t\t\t\"status\" => \"SUCCESS\",\n\t\t\t\t\t\"message\" => \"\",\n\t\t\t\t\t\"IncidentID\" => \"1\" \n\t\t\t);\n\t\t} else {\n\t\t\t$CreateIncidentResponse = $this->getSoapConnection ()\n\t\t\t\t->send_curl_soap_requete ( $soap_data );\n\t\t}\n\t\t*/\n\t\t\n\t\t$CreateIncidentResponse = $this->applique_requete_soap ( \"CreateIncident\", array (\n\t\t\t\t$Incident \n\t\t) );\n\t\t\n\t\t$this->onDebug ( $CreateIncidentResponse, 2 );\n\t\treturn $CreateIncidentResponse;\n\t}", "public static function create($parsed)\n {\n $result = new self();\n\n $result->_id = Utilities::tryGetValue(\n $parsed,\n Resources::XTAG_ID\n );\n $result->_status = Utilities::tryGetValue(\n $parsed,\n Resources::XTAG_STATUS\n );\n $result->_httpStatusCode = Utilities::tryGetValue(\n $parsed,\n Resources::XTAG_HTTP_STATUS_CODE\n );\n $error = Utilities::tryGetValue(\n $parsed,\n Resources::XTAG_ERROR\n );\n\n if (!empty($error)) {\n $code = Utilities::tryGetValue($error, Resources::XTAG_CODE);\n $message = Utilities::tryGetValue($error, Resources::XTAG_MESSAGE);\n\n $result->_error = new ServiceException($code, $message);\n }\n\n return $result;\n }", "public function createException($message = '')\n {\n $mock = $this->mock('Exception')\n ->new($message);\n\n return $mock;\n }", "public static function exception(\\Throwable $exception)\n {\n $instance = new static(null, (int) $exception->getCode());\n $instance->error = $exception;\n\n return $instance;\n }", "static public function createInstance($value) {\r\n\t\treturn new Web_Service_Response($value);\r\n\t}", "protected function raiseInvalidUserError($password)\n {\n $msg = 'Invalid username [' . $this->user->getUserName() . '] or password [' . $password . ']';\n\n if (isVersion('1.6'))\n Sys::log(LOG_WARNING, \"SOAP error\", $msg);\n\n return new soap_fault('AUTH', '', 'Authentication failed', $msg);\n }", "public final function facilityDetails($soap)\n {\n $facility = $soap->facilityDetails(config('site.' . config('domain') . '.soap_api_key'), $this->data['facilityId']);\n \\Debugbar::info($facility);\n if(isset($facility->responseCode) && $facility->responseCode == -1) {\n throw new SoapCallException($facility->message);\n }\n return new Facility($facility);\n }", "public static function fromAttributeThrowingException($exception)\n {\n return new self(self::ATTRIBUTES_EXCEPTION_STRING . $exception->getMessage());\n }", "public function createErrorResponse(TRpcException $exception)\n\t{\n\t\tif($this->_specificationVersion==2.0)\n\t\t{\n\t\t\treturn $this->encode(array(\n\t\t\t\t'id' => $this->_id,\n\t\t\t\t'result' => null,\n\t\t\t\t'error'=> array(\n\t\t\t\t\t'code' => $exception->getCode(),\n\t\t\t\t\t'message'=> $exception->getMessage(),\n\t\t\t\t\t'data' => null,\n\t\t\t\t\t)\n\t\t\t));\n\t\t} else {\n\t\t\treturn $this->encode(array(\n\t\t\t\t'id' => $this->_id,\n\t\t\t\t'error'=> array(\n\t\t\t\t\t'code' => $exception->getCode(),\n\t\t\t\t\t'message'=> $exception->getMessage(),\n\t\t\t\t\t'data' => null,\n\t\t\t\t\t)\n\t\t\t));\t\t\t\n\t\t}\n\t}", "private function setSoapHeader() \n {\n if(empty($this->merchantSoapUsername)) {\n throw new exception('Please specify a merchant username for soap trasaction');\n }\n elseif(empty($this->merchantSoapPassword)) {\n throw new exception('Please specify a merchant password for soap trasaction');\n }\n \n //Creating a soap xml\n $headerXml = '<wsse:Security SOAP-ENV:mustUnderstand=\"1\" xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\">';\n $headerXml .= '<wsse:UsernameToken wsu:Id=\"UsernameToken-9\" xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\">';\n $headerXml .= '<wsse:Username>'.$this->merchantSoapUsername.'</wsse:Username>';\n $headerXml .= '<wsse:Password Type=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText\">'.$this->merchantSoapPassword.'</wsse:Password>';\n $headerXml .= '</wsse:UsernameToken>';\n $headerXml .= '</wsse:Security>';\n $headerbody = new SoapVar($headerXml, XSD_ANYXML, null, null, null); \n \n $ns = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'; //Namespace of the WS. \n $this->soapAuthHeader = new SOAPHeader($ns, 'Security', $headerbody, true); \n }", "function wc_caught_exception($exception_object, $function = '', $args = array())\n {\n }", "function isFault() {\n\t\treturn ($this->documentElement->firstChild->nodeName == DOM_XMLRPC_TYPE_FAULT);\n\t}", "public function resourceFaults($resourceName, $sessionId) {\n return $this->__soapCall('resourceFaults', array($resourceName, $sessionId), array(\n 'uri' => 'urn:Magento',\n 'soapaction' => ''\n )\n );\n }", "public function initFromXML($xml) \n {\n $xml = simplexml_load_string(str_replace('req:', '', $xml));\n\n if (!empty($xml->Response->Status->Condition->ConditionCode))\n {\n $errorMsg = ((string) $xml->Response->Status->Condition->ConditionCode) . ' : ' . ((string) $xml->Response->Status->Condition->ConditionData);\n throw new \\Exception('Error returned from Dhl webservice : ' . $errorMsg);\n }\n\n $parts = explode('\\\\', get_class($this));\n $className = array_pop($parts);\n foreach ($xml->children() as $child) \n { \n $childName = $child->getName();\n switch ($childName)\n {\n case 'Response':\n $this->MessageTime = (string) $child->ServiceHeader->MessageTime;\n $this->MessageReference = (string) $child->ServiceHeader->MessageReference;\n $this->SiteID = (string) $child->ServiceHeader->SiteID;\n $this->Password = '#';\n break;\n\n default:\n if (is_object($this->$childName))\n {\n $this->$childName->initFromXml($child->asXML());\n }\n elseif (isset($this->_params[$childName]['multivalues']) && $this->_params[$childName]['multivalues'])\n {\n foreach ($child->children() as $subchild) \n {\n $subchildName = $subchild->getName();\n if ($subchild->count() > 1)\n {\n $subchildName .= 's';\n }\n\n $childClassname = implode('\\\\', $parts) . '\\\\' . $this->_params[$subchildName]['type'];\n $childClassname = str_replace('Entity', 'Datatype', $childClassname);\n\n if ('string' == $this->_params[$subchildName]['type'] && ($subchild->count() <= 1))\n {\n $childObj = trim((string) $subchild);\n }\n else\n {\n $childObj = new $childClassname();\n $childObj->initFromXml($subchild->asXML());\n }\n \n $addMethodName = 'add' . ucfirst($subchildName);\n $this->$addMethodName($childObj);\n }\n }\n elseif (isset($this->$childName))\n {\n $this->$childName = trim((string) $child);\n }\n break;\n }\n }\n }", "private function getInstantiationException($nullValue, $className, $functionName, $requestexternalExecute)\n {\n if (is_null($nullValue)) {\n throw new ExceptionHandler(\n sprintf(\n '%s instantiation failure: No communication wrappers currently available in function/class %s.',\n $className,\n $functionName\n ),\n Constants::LIB_NETCURL_NETWRAPPER_NO_DRIVER_FOUND,\n $requestexternalExecute\n );\n }\n }", "protected function getException(SingleConnectionInterface $connection, $message, $code = 0, \\Exception $inner = null) {\n\t\t$arguments = array (\n\t\t\t\t$connection,\n\t\t\t\t$message,\n\t\t\t\t$code,\n\t\t\t\t$inner \n\t\t);\n\t\t$mock = $this->getMockForAbstractClass ( 'Predis\\CommunicationException', $arguments );\n\t\t\n\t\treturn $mock;\n\t}", "public static function factory($key, $previous = null)\n {\n return new Exception($key, $previous);\n }", "public function testFaultyProperties()\n {\n try {\n new Insured(str_repeat('a', 10));\n $this->fail('BpostInvalidValueException not launched');\n } catch (BpostInvalidValueException $e) {\n // Nothing, the exception is good\n } catch (Exception $e) {\n $this->fail('BpostInvalidValueException not caught');\n }\n\n try {\n new Insured('additionalInsurance', str_repeat('1', 10));\n $this->fail('BpostInvalidValueException not launched');\n } catch (BpostInvalidValueException $e) {\n // Nothing, the exception is good\n } catch (Exception $e) {\n $this->fail('BpostInvalidValueException not caught');\n }\n\n // Exceptions were caught,\n $this->assertTrue(true);\n }", "private function createDefinitionException($message)\n\t{\n\t\tthrow new RuntimeException($message);\n\t}", "abstract protected function _createI18nException($message, $code = 0, \\Exception $previous = null);", "private static function testSOAP() {\n\t\treturn (function_exists(\"is_soap_fault\")!=true) ? 0 : 1;\n\t}", "public function testReflectionException()\n {\n $instance = $this->getMockForTrait('CSDT\\\\PhpunitTestHelper\\\\Traits\\\\ObjectTestTrait');\n\n try {\n $instance->getPropertyValue(new \\stdClass(), 'property');\n $this->fail('Get unexisting property must fail');\n } catch (\\ReflectionException $exception) {\n // success\n }\n\n try {\n $instance->setPropertyValue(new \\stdClass(), 'property', 'value');\n $this->fail('Set unexisting property must fail');\n } catch (\\ReflectionException $exception) {\n // success\n }\n }", "public function testCreateIssueWithFaultyVersionGeneratesError() {\n\n\t\t$issueToAdd = $this->getIssueToAdd( 'IssueAddTest.testCreateIssueWithFaultyVersionGeneratesError' );\n\t\t$issueToAdd['version'] = 'noSuchVersion';\n\t\t\n\t\ttry {\n\t\t\t$this->client->mc_issue_add(\n\t\t\t\t$this->userName,\n\t\t\t\t$this->password,\n\t\t\t\t$issueToAdd);\n\t\t\t\n\t\t\t$this->fail( \"Invalid version did not raise error.\" );\n\t\t} catch ( SoapFault $e) {\n\t\t\t$this->assertContains( \"Version 'noSuchVersion' does not exist in project\", $e->getMessage() );\t\n\t\t}\n\t}", "public function testFaultyProperties()\n {\n $customsInfo = new CustomsInfo();\n\n try {\n $customsInfo->setContentDescription(str_repeat('a', 51));\n $this->fail('BpostInvalidLengthException not launched');\n } catch (BpostInvalidLengthException $e) {\n // Nothing, the exception is good\n } catch (Exception $e) {\n $this->fail('BpostInvalidLengthException not caught');\n }\n\n try {\n $customsInfo->setContentDescription(str_repeat('a', 51));\n $this->fail('BpostInvalidLengthException not launched');\n } catch (BpostInvalidLengthException $e) {\n // Nothing, the exception is good\n } catch (Exception $e) {\n $this->fail('BpostInvalidLengthException not caught');\n }\n\n try {\n $customsInfo->setShipmentType(str_repeat('a', 10));\n $this->fail('BpostInvalidValueException not launched');\n } catch (BpostInvalidValueException $e) {\n // Nothing, the exception is good\n } catch (Exception $e) {\n $this->fail('BpostInvalidValueException not caught');\n }\n\n // Exceptions were caught,\n $this->assertTrue(true);\n }", "function use_soap_error_handler($handler = true)\n{\n}", "public function createNotFoundException($message = '')\n {\n $mock = $this->mockClassAndInterfaces('Exception', ['Psr\\Container\\NotFoundExceptionInterface'])\n ->setConstructorArgs([$message])\n ->getMock();\n\n return $mock;\n }", "function makeSoapEnvelope($stringToSoap)\n{\n\t$stringSoaped = \"<SOAP-ENV:Envelope xmlns:SOAP-ENV=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\"><SOAP-ENV:Header> </SOAP-ENV:Header><SOAP-ENV:Body>\n\t\t\t$stringToSoap\n\t\t</SOAP-ENV:Body>\n </SOAP-ENV:Envelope>\";\n\n\treturn $stringSoaped;\n\n}", "public function __construct($exception)\n {\n $this->exception = $exception;\n }", "public function __construct($exception)\n {\n $this->exception = $exception;\n }", "private function initializeException(string $exceptionName): \\HttpException\\HttpException\n {\n $exceptionClassName = sprintf(self::EXCEPTION_CLASS_NAME_PATTERN, $exceptionName);\n\n return new $exceptionClassName();\n }" ]
[ "0.74538726", "0.6634986", "0.62990034", "0.6149092", "0.6096571", "0.60747623", "0.5956479", "0.5718817", "0.5642984", "0.55890775", "0.55468893", "0.5532329", "0.541713", "0.5392431", "0.53600144", "0.5347507", "0.5312762", "0.5281615", "0.52524054", "0.5212431", "0.5140787", "0.51143885", "0.5081885", "0.5059353", "0.49279714", "0.48986906", "0.48819867", "0.48737267", "0.48218736", "0.4800292", "0.4775702", "0.4761995", "0.47557944", "0.47371173", "0.47278658", "0.47145963", "0.46937153", "0.46848822", "0.4679173", "0.45984283", "0.45970494", "0.45923296", "0.458703", "0.45665985", "0.45665985", "0.45665985", "0.45660225", "0.4547637", "0.45420063", "0.45316464", "0.4520813", "0.4519864", "0.44996068", "0.44957042", "0.44955006", "0.44915092", "0.44792685", "0.44791716", "0.4467074", "0.44665605", "0.4464689", "0.4454698", "0.44495258", "0.44453847", "0.4441375", "0.44398686", "0.44221345", "0.44164908", "0.44125476", "0.4402521", "0.44006822", "0.4399601", "0.43879548", "0.43820742", "0.43810773", "0.43636498", "0.4359917", "0.43576264", "0.4341738", "0.43374318", "0.43334153", "0.43324456", "0.4308837", "0.43083292", "0.43036443", "0.42921048", "0.42645675", "0.4257603", "0.4256408", "0.4247755", "0.42425668", "0.42273894", "0.42210555", "0.42147756", "0.4201278", "0.41995707", "0.41991147", "0.41982466", "0.41982466", "0.41941103" ]
0.73048025
1
Clears the recent chat filter (for spam protection)
Очищает фильтр недавних чатов (для защиты от спама)
public function clearRecentChat() { $this->recentChat = array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function clear(): void{\n echo \"Clearing...\\n\";\n $slack = new SlackController();\n $channels = $slack->getInactiveTextMessageChannels();\n\n foreach ($channels as $channel){\n $slack->removeMembers($channel[\"id\"]);\n }\n }", "public static function clearLastMessages() {\n if (isset($_SESSION[\"messages\"])) {\n unset($_SESSION[\"messages\"]);\n }\n }", "public function clearMessages() {\n $this->messages = array();\n }", "public function clear(): void\n {\n $this->getSessionMessages(true);\n parent::clear();\n }", "public function clearTellMessages() {\n\t\t$this->tellMessages = array();\n\t}", "public function clear() {\r\n $this->match = '';\r\n $this->bodyTexts = array();\r\n $this->stack = array();\r\n }", "public function removeAll() {\n $this->messages = array();\n }", "public function clearFilters();", "public function clearMessages() {\n\t\t\t$this->messages = [];\n\t\t}", "public function clear() {\n $this->buffer= '';\n }", "public function clearMessages()\n {\n $this->handler->clean();\n $this->messages = array();\n }", "public function reset_filters() {\n\t\tunset($_SESSION['filtres']);\n\t\tredirect('question');\n\t}", "public function clear_message() {\n unset($_SESSION['message']);\n }", "function clearSqlFilter()\n {\n $this->filter_sql = NULL;\n $this->filter_sql_hash = NULL;\n }", "public static function clearLogger()\n {\n self::$_messages = array();\n }", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "public static function clearBuffer()\n {\n static::$_buffer = '';\n }", "function ClearMessage() {\r\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\r\n\t}", "function ClearMessage() {\r\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\r\n\t}", "function ClearMessage() {\r\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\r\n\t}", "function ClearMessage() {\r\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\r\n\t}", "function ClearMessage() {\r\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\r\n\t}", "function ClearMessage() {\r\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\r\n\t}", "function ClearMessage() {\r\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\r\n\t}", "function ClearMessage() {\r\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\r\n\t}", "public function clearChiffredaffaires()\n {\n $this->collChiffredaffaires = null; // important to set this to NULL since that means it is uninitialized\n }", "function clearTo () {\r\n $this->sendto = array();\r\n $this->all_emails = array();\r\n }", "public function clearSearch()\n {\n data_set($this->filters, 'search', '');\n }", "function acf_clear_log() {}", "public function clear()\n {\n $this->receivers = [];\n $this->messages = [];\n $this->injected = [];\n }", "public function clearBroadcastViewerss()\n\t{\n\t\t$this->collBroadcastViewerss = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function clearMessages()\r\n {\r\n $this->_messageQueue = array();\r\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 clear () {}", "public function clear () {}", "public function clear () {}", "public function clear () {}", "public static function clearMessage()\r\n {\r\n self::setMessage(null);\r\n }", "public function clear_messages() {\n\t\t$this->messages = array();\n\t\treturn $this;\n\t}", "public static function clearBuffer()\n\t{\n\t\tself::$oBuffer = \"\";\n\t}", "public function Clear();", "public function resetAll() {\r\r\n\t\t\r\r\n\t\t$this->newMessage();\r\r\n\t\t$this->options = array();\r\r\n\t\t$this->tags = array();\r\r\n\t}", "public function clear() {}", "public function clear() {}", "public function clear() {}", "public function clear() {}", "public function clear() {}", "public function clear() {}", "public function removeFilters() {\n\t\t$this->_filters = array();\n\t}", "protected function clear() {}", "protected function clear() {}", "public function clear() {\n $this->exec('echo off | clip');\n }", "public function resetMessages()\n {\n $this->messages = array();\n }", "public function clear();", "public function clear();", "public function clear();", "public function clear();", "public function clear();", "public function clear();", "public function clear();", "public function clear();", "public function clear();", "public function clear();", "public function clear();", "public function clear();", "public function clear();", "public function clear();", "public function clear();" ]
[ "0.6778056", "0.6587303", "0.6482958", "0.6437759", "0.64027226", "0.6395022", "0.63865745", "0.63807243", "0.63008225", "0.62787503", "0.6230012", "0.6201561", "0.6151603", "0.6144156", "0.61218745", "0.60977787", "0.60977787", "0.60977787", "0.60977787", "0.60977787", "0.60977787", "0.60977787", "0.60977787", "0.60977787", "0.60977787", "0.60977787", "0.60977787", "0.60977787", "0.60977787", "0.60977787", "0.60977787", "0.60977787", "0.60977787", "0.60977787", "0.60977787", "0.60977787", "0.60977787", "0.60977787", "0.60977787", "0.60977787", "0.60977787", "0.60977787", "0.60977787", "0.60977787", "0.60977787", "0.60977787", "0.60977787", "0.60977787", "0.6072425", "0.6048799", "0.6048799", "0.6048799", "0.6048799", "0.6048799", "0.6048799", "0.6048799", "0.6048799", "0.60218793", "0.6012245", "0.6012243", "0.59360486", "0.59354824", "0.592268", "0.59224284", "0.5912679", "0.5907218", "0.5907218", "0.5907218", "0.5907218", "0.588855", "0.58794725", "0.58593875", "0.5846804", "0.5830485", "0.582898", "0.582898", "0.582898", "0.582898", "0.582898", "0.582898", "0.58288026", "0.5826127", "0.58257043", "0.5820895", "0.58178765", "0.58119506", "0.58119506", "0.58119506", "0.58119506", "0.58119506", "0.58119506", "0.58119506", "0.58119506", "0.58119506", "0.58119506", "0.58119506", "0.58119506", "0.58119506", "0.58119506", "0.58119506" ]
0.8017825
0
Ajax function that deletes roles of a user in a particular object. Only owner of a hotel/organization can use this. Also a user may want to delete its own roles at hotels/organizations he belongs to.
Функция Ajax, которая удаляет роли пользователя в определенном объекте. Использовать ее могут только владельцы отеля/организации. Также пользователь может удалить свои собственные роли в отелях/организациях, к которым он принадлежит.
public function ajaxDeleteRolesForUser($user_id = null, $model = null, $foreign_key = null) { $this->RolesUser->deleteRolesForUserInObject($user_id, $model, $foreign_key); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function eliminarUsuarioRol(){\r\n\t\t$this->objFunSeguridad=new FuncionesSeguridad();\t\r\n\t\t$this->res=$this->objFunSeguridad->eliminarUsuarioRol($this->objParam);\r\n\t\t$this->res->imprimirRespuesta($this->res->generarJson());\r\n\r\n\t}", "public function removeRoleUser()\n {\n unset($this->adminRoles[$this->id]);\n }", "public function deleteRole(): void\n {\n if (!empty($_POST)) {\n $token = $_POST['token'];\n $role = htmlspecialchars($_POST['role']);\n if ($token === $_SESSION['token']) {\n if ($this->hasPermission('settings__delete_role', false)) {\n $selectedRole = $this->role->select(['name' => $role]);\n $roleContainsUsers = $this->userRole->select(['role_id' => $selectedRole->getId()]);\n if (!$roleContainsUsers) {\n // Prevent a user to delete his own role\n if ($selectedRole->getName() !== $this->currentRole('name')) {\n // Prevent a user to delete a role greater than his current role\n if ($selectedRole->getRank() > $this->currentRole('rank')) {\n if ($this->role->deleteById($selectedRole->getId())) {\n $this->echoJsonData('success')->addToast($this->lang('settings.deleteRole.deleted'))->echo();\n } else {\n $this->echoJsonData('error')->addToast($this->lang('general.error.retry'), $this->lang('general.error.occured'))->echo();\n }\n } else {\n $this->echoJsonData('error')->addToast($this->lang('settings.deleteRole.error.greater'))->echo();\n }\n } else {\n $this->echoJsonData('error')->addToast($this->lang('settings.deleteRole.error.ownRole'))->echo();\n }\n } else {\n $this->echoJsonData('error')->addToast($this->lang('settings.deleteRole.error.roleContainUsers'))->echo();\n }\n } else {\n $this->echoJsonData('error')->addToast($this->lang('general.error.forbidden'))->echo();\n }\n } else {\n $this->echoJsonData('error')->addToast($this->lang('general.error.badToken'))->echo();\n }\n }\n }", "protected function userRoleDelete() {\n\t\t$oRole = new APP_Model_User_Role();\n\t\t$oUser = new APP_Model_User();\n\t\t$iRoleID = $this->get('delete');\n\t\tif(count( ($oUser->getList('role_id = ' . $oUser->quote($iRoleID))) ) > 0) {\n\t\t\t$this->setFlashMessage('Unable to delete this role is already in use.', false);\n\t\t\t$this->redirect('admin/user/roles');\n\t\t}\n\t\t$oRole->delete($this->get('delete'));\n\t\t$this->setFlashMessage('Role successfully deleted');\n\t\t$this->redirect('admin/user/roles');\n }", "public function destroy($id)\n {\n// if (auth()->user->hasPermissionTo('delete user')) {\n// $user = User::find($id);\n// $role = $user->roles->all();\n// if (!$user) {\n// flash(__('unable to find user'))->error();\n// return response()->json([\n// \"error\" => true,\n// \"message\" => 'User Does not exist'\n// ], 400);\n// } elseif (!empty($role)) {\n// flash(__('Can not delete User Role Exist for user!!'))->error();\n// return response()->json([\n// \"error\" => true,\n// \"message\" => 'User Role exist'\n// ], 400);\n// } else {\n// $delete = $user->delete();\n// if ($delete) {\n// flash(__('User deleted Successfully'))->success();\n// return response()->json([\n// \"error\" => true,\n// \"message\" => 'User deleted successfully'\n// ], 400);\n// }\n// else{\n// flash(__('user cannot be deleted'))->error();\n// return response()->json([\n// \"error\" => true,\n// \"message\" => 'user cannot be deleted'\n// ], 400);\n// }\n// }\n//\n// } else {\n// flash(__('You are Not Permitted to Delete User'))->error();\n// return view('admin.roles.index');\n// }\n\n }", "public function destroy(Request $request)\r\n {\r\n $user = Admin::findOrFail($request->id);\r\n $role = Role::all();\r\n foreach($role as $srole)\r\n $user->removeRole($srole);\r\n if($user->delete()){\r\n return response()->json(['status'=>200]);\r\n } else {\r\n return response()->json(['status'=>-1]);\r\n }\r\n\r\n }", "public function deleteRole() {\n $postedData = $this->request->data;\n if (isset($postedData['roleId']) && !empty($postedData['roleId'])) {\n $checkGlobalAdmin = $this->Auth->User('ISGLOBALADMIN');\n\t\t\tif($checkGlobalAdmin === true){\n\t\t\t$this->loggedInUserWorkspaceIdFinal = GLOBAL_ADMIN_WORKSPACE_ID; \n\t\t\t\n\t\t}else{\t\t\t\t\n\t\t\t$this->loggedInUserWorkspaceIdFinal = 2;\n\t\t\t$UserAllWorkspaceIdsSes = $this->Auth->User('WorkspaceIds');\n\t\t\tif (empty($UserAllWorkspaceIdsSes) || in_array($this->loggedInUserWorkspaceIdFinal, $UserAllWorkspaceIdsSes) == false) {\n\t\t\t\treturn AppServiceUtil::errResponse('INVALID_REQUEST');\n\t\t\t}\n \n\t\t}\n\t\t\t$postedData = ['id' => $postedData['roleId'], 'is_deleted' =>IS_DELETED_YES, 'modified_user_id' => $this->loggedInuserId,\n\t\t\t'workspace_id'=>$this->loggedInUserWorkspaceIdFinal];\n\n return $roleId = $this->RoleTblObj->updateRole($postedData, false);\n } else {\n return AppServiceUtil::errResponse('INVALID_REQUEST');\n }\n }", "function remove_role($role)\n{\n}", "public function removeRole(Request $request)\n {\n DB::table('role_user')->where('id', $request->id)->delete();\n\n return $this->apiResponser->success('');\n }", "public function destroy($id,Request $request)\n {\n $result = array();\n $ob = User::where(\"id\",$id)->where(\"id\",\"!=\",\\Auth::user()->id)->where(\"id\",\"!=\",1)->first();\n\n if($ob){\n $ob->roles()->detach();\n $ob->delete();\n \n\t\t\t$result['message'] = \\Lang::get('comman.responce_msg.record_deleted_succes');;\n $result['code'] = 200;\n }else{\n Session::flash('flash_message', 'No Access !');\n $result['message'] = \\Lang::get('comman.responce_msg.you_have_no_permision_to_delete_record');;\n $result['code'] = 400;\n }\n\n\n if($request->ajax()){\n return response()->json($result, $result['code']);\n }else{\n Session::flash('flash_message',$result['message']);\n return redirect('admin/users');\n }\n }", "public static function remove_user_roles(){\n remove_role('ux_professional');\n remove_role('job_recruiter');\n }", "public function destroy(Request $request, $id)\n {\n if ($request->ajax()) {\n $haspermision = auth()->user()->can('role-delete');\n if ($haspermision) {\n $role = Role::findOrFail($id);\n $role->delete();\n return response()->json(['type' => 'success', 'message' => \"Successfully Deleted\"]);\n } else {\n abort(403, 'Sorry, you are not authorized to access the page');\n }\n } else {\n return response()->json(['status' => 'false', 'message' => \"Access only ajax request\"]);\n }\n }", "public function removeUser()", "public function destroy($user, Request $request)\n {\n $request->user()->controlroles(['1']); //control de roles\n //\n }", "public function destroyMandantUser(Request $request)\n {\n $requiredUsers = array();\n $requiredRoles = array();\n $requiredRolesResult = array();\n\n $mandantUser = MandantUser::where('user_id', $request->input('user_id'))->where('mandant_id', $request->input('mandant_id'))->first();\n $mandantUserAll = MandantUser::where('mandant_id', $request->input('mandant_id'))->get();\n\n foreach ($mandantUser->role as $role) {\n if ($role->mandant_required || $role->system_role) {\n array_push($requiredRoles, $role);\n }\n }\n\n foreach ($requiredRoles as $requiredRole) {\n $roleUsers = array();\n foreach ($mandantUserAll as $mu) {\n foreach ($mu->mandantUserRoles as $mandantUserRole) {\n if ($requiredRole->id == $mandantUserRole->role_id) {\n if (!in_array($mu, $roleUsers)) {\n array_push($roleUsers, $mu);\n }\n }\n }\n }\n $requiredRolesResult[] = array('role_id' => $requiredRole->id, 'user_count' => count($roleUsers));\n }\n\n // dd($requiredRolesResult);\n\n foreach ($requiredRolesResult as $reqRole) {\n if ($reqRole['user_count'] == 1) {\n return redirect('benutzer')->with('message', 'Benutzer kann nicht entfernt werden.');\n }\n }\n\n $mandantUserRoles = MandantUserRole::where('mandant_user_id', $mandantUser->id)->get();\n foreach ($mandantUserRoles as $mandantUserRole) {\n // dd($mandantUserRole->roles);\n $mandantUserRole->delete();\n }\n $mandantUser->delete();\n InternalMandantUser::where('user_id', $request->input('user_id'))->where('mandant_id', $request->input('mandant_id'))->delete();\n\n return redirect('benutzer')->with('message', 'Benutzer erfolgreich entfernt.');\n }", "public function delete_roles($_data){\r\n\t\t$this->roles->delete_role($_data['id']);\r\n\t\treturn TRUE;\r\n\t}", "public function deleteuser(Request $request){\n //nalazimo usera kog treba obrisati u 'users' tabeli pomocu id-a koji je stigo AJAX-om\n $user = User::find($request['userid']); \n // ako je ulogovan user admin i ako ne pokusava da sam sebe obrise onda je moguce brisanje\n if($request->user()->is_admin() && $user->id != $request->user()->id){\n if($user->image != 'default.jpg'){ // ako user ima dodatu sliku brisemo je iz foldera 'myblog\\public\\img\\authors'\n unlink(public_path('img/authors/'.$user->image)); \n }\n $user->delete(); // brisemo usera iz 'users' tabele\n return response()->json(['delete' => 1]);//vracamo poruku u searchusers.js na dalju obradu...\n }else{\n //ako requester nije admin vrati ga na index stranicu sa error porukkom\n return redirect('/')->withErrors('You dont have permissions for deleting this user.');\n }\n}", "public function deleteRoles() {\n $roles = $this->listRoles();\n foreach ($roles as $role) {\n $this->retract($role);\n }\n }", "public function destroy(Request $request)\n {\n $role= Role::find($request->id);\n if($role->name == 'superadmin')\n {\n return response()->json(['success' => false]);\n }\n DB::table(\"roles\")->where('id',$request->id)->delete();\n }", "public function destroy(Request $request,Role $role)\n {\n if($role->slug != 'administrador-del-sistema'){\n $wasDeleted = $role->delete();\n\n if($request->ajax()){\n if($wasDeleted){\n return response(\"El Rol {$role->name} fue eliminado\",200);\n }else{\n return response(\"No fue eliminado.\",404);\n }\n }\n }else{\n if($request->ajax()){\n return response(\"El rol administrador no puede ser eliminado\",404);\n }\n }\n\n }", "public function ajax_eliminar_permiso() {\n if (!$this->input->is_ajax_request()) {\n return false;\n }\n $result = $this->roles_model->eliminar_permiso();\n $response = array(\"deleted\" => $result);\n //Limpiar Cache\n $this->cache->clean();\n $json = '{\"results\":[' . json_encode($response) . ']}';\n echo $json;\n exit;\n }", "public function deleteRoleObj($request)\n\t{\n\t\t$objReturnVal=false;\n\t\ttry {\n\t\t\t$roleObj = config('comman.table_modal.roles')::where('id', $id)->delete();\n\n\t\t\tif($roleObj) {\n\t\t\t\t$objReturnVal = true;\n\t\t\t}\n\t\t\t// $objReturnVal = $roleObj;\n\t\t} catch (Exception $e) {\n\t\t\t$objReturnVal=false;\n\t\t\t// throw new Exception(COMMAON_ERROR_MSG, INTERNAL_ERROR_CODE);\n\t\t\tthrow new Exception('Somthing error', 500);\n\t\t}\n\n\t\treturn $objReturnVal;\n\t}", "public function delete($userRoleId = NULL){\n\t\tif(!$this->session->userdata('username')){\n\t\t\t$this->session->set_flashdata('error',\"Access Unauthorized! Please Login.\");\n\n\t\t\tredirect('login','refresh');\n\t\t}\n\n\t\tif($this->session->userdata('role')<>'admin'){\n\t\t\t$this->session->set_flashdata('error',\"Access Unauthorized! Admin Only.\");\n\n\t\t\tredirect('salam','refresh');\n\t\t}\n\n\t\ttry{\n\t\t\t$result = $this->userroles_model->delete($userRoleId);\n\t\t\t\n\t\t}\n\t\tcatch(Exception $ex){\n\t\t\t//Catch Error\n\t\t}\n\t\t\n\t\tredirect('userroles', 'refresh');\t\t\t\n\t}", "public function removeRole(Request $request)\n {\n //return $request->role.\" \".$request->eid;\n $role = Role::where(\"roles_id\",\"=\",$request->role)->where(\"e_id\",\"=\",$request->eid)->delete();\n //$role->delete();\n return \"The staff has been relieved of the role\";\n }", "public function destroy(Request $request) {\n $id =$request->input('id');\n //Role::find($id)->delete();\n\t\t$user =DB::table(\"role_user\")->where(\"role_id\", $id)->get();\n\t\t\n\t\tif($user){\n\t\t\tDB::table(\"users\")->where('id', $user[0]->id)->delete();\n\t\t}\n\t\t\n\t\tDB::table(\"role_user\")->where('role_id', $id)->delete();\n DB::table(\"roles\")->where('id', $id)->delete();\n //return redirect()->route('roles.index')\n // ->with('success', 'Role deleted successfully');\n\t\t print_r(json_encode(array('status' => 'success', 'msg' => 'Deleted Succesfully')));\n }", "public function deleteUserAjax() {\n\t\t$params = Input::requireParams('id');\n\t\t$id = (int) $params->id;\n\t\t\n\t\tif ($id <= 0) {\n\t\t\tthrow new Exception('Invalid ID');\n\t\t}\n\t\t\n\t\t$user = User::fetchOne($id);\n\t\tif ($user !== false) {\n\t\t\t$user->destroy();\n\t\t\tLog::info(\"Deleted user #{$id} {$user->username} from database\");\n\t\t}\n\t\t\n\t\treturn BootstrapUI::buttonRemoteResponse()\n\t\t\t->disableButton()\n\t\t\t->disableOtherButtons()\n\t\t\t->removeParentRow();\n\t}", "static public function ctrEliminarRol()\n {\n\n if (isset($_GET[\"idRol\"])) {\n\n $tabla = \"tipo_usuario\";\n $item = \"Id_Tipo_User\";\n $valor = $_GET[\"idRol\"];\n\n $eliminar = ModeloRoles::mdlEliminarRol($tabla, $item, $valor);\n\n if ($eliminar == \"ok\") {\n echo '<script>\n swal({\n title: \"Eliminación exitosa!\",\n text: \"El rol se eliminó correctamente.\",\n icon: \"success\",\n closeOnClickOutside: false,\n }).then( (result) => {\n window.location = \"mainRoles\";\n });\n </script>';\n } else if ($eliminar == \"errorPadres\") {\n echo '<script>\n swal({\n title: \"Error al intentar eliminar!\",\n text: \"No se ha podido eliminar, ya que tienes usuarios registrados con este tipo de rol.\",\n icon: \"warning\",\n closeOnClickOutside: false,\n }).then( (result) => {\n window.location = \"mainRoles\";\n });\n </script>';\n } else {\n echo '<script>\n swal({\n title: \"Error!\",\n text: \"Ha ocurrido un error con la conexión a la base de datos.\",\n icon: \"error\",\n closeOnClickOutside: false,\n }).then( (result) => {\n window.location = \"mainRoles\";\n });\n </script>';\n }\n }\n }", "public function destroy(Request $request)\n {\n \n UserGroup::where('grouproles_id',$request->grouproles_id)->where('user_id',$request->user_id)->delete();\n\n $response = ['success'=>'User successfully remove!!'];\n\n\n\n \n return response()->json($response);\n }", "function removeUser($args) {\n\t\t$this->validate();\n\t\t$this->setupTemplate(true);\n\n\t\t$userId = isset($args[0])?$args[0]:null;\n\t\t$user =& Request::getUser();\n\t\t$journal =& Request::getJournal();\n\n\t\tif ($userId != null && $userId != $user->getId()) {\n\t\t\t$roleDao =& DAORegistry::getDAO('RoleDAO');\n\t\t\t$roleDao->deleteRoleByUserId($userId, $journal->getId());\n\t\t}\n\n\t\tRequest::redirect(null, null, 'people', 'all');\n\t}", "public function delete_role(Request $request){\n $id = $request->id;\n $role = Role::find($id);\n $role->delete();\n }", "public function destroy($id)\n {\n// @todo : need to protect this route\n return response(json_encode(UserRoles::destroy($id)));\n }", "function delete_user_role($id,$table){\n $this->db->delete($table, array('user_id' => $id));\n return;\n }", "function delete_user_role($id,$table){\n $this->db->delete($table, array('user_id' => $id));\n return;\n }", "function delete_user_role($id,$table){\n $this->db->delete($table, array('user_id' => $id));\n return;\n }", "public function destroy(AdminUserRole $adminUserRole)\n {\n //\n }", "public function destroy(DeleteRoleRequest $request,$id)\n {\n\n\n $role=Role::find($id);\n $role->delete();\n\n //code...\n if($request->ajax()){\n return response()->json(\"sucess\", 200);\n }\n\n\n return redirect()->route('roles.index');\n\n //\n }", "public function removeRoles(Request $request)\n {\n $role = $this->role::findOrFail($request['roles']);\n $roleUsers = $this->user::whereRoleIs($role->name)->get();\n\n $user = $this->user::findOrFail($request['userId']);\n $roles = $request['roles'];\n\n $user->detachRole($roles);\n\n return redirect(route('dashboard.roles'))->with([\n 'notificationStatus' => 'success',\n 'notificationMessage' => 'Role successfully removed.'\n ]);\n }", "public function destroy($id)\n {\n //dd($id);\n //dd($request->id);\n //$id = $request->id;\n $role = Role::findorFail($id);\n $role->perms()->sync([]);\n $role->users()->sync([]);\n $role->delete();\n //Session::flash('flash_message', 'User successfully deleted!');\n //return redirect()->intended('admin/role');\n $arr['success'] = 'Role deleted successfully';\n return json_encode($arr);\n exit;\n }", "public function clientRoleUserDel($client_role_id = 0, $user_id = 0)\n {\n $client_role_id*=1;\n $user_id*=1;\n \n if (!$client_role_id||!$user_id) {\n return false;\n }\n\n $sql =\"DELETE FROM edxapp.django_comment_client_role_users WHERE role_id=$client_role_id AND user_id=$user_id LIMIT 1;\";\n \n $q=$this->db->query($sql) or die(\"$sql\");\n return true;\n }", "public function remove_role($role)\n {\n }", "public function remove_role($role)\n {\n }", "public function ajax_activar_desactivar_rol() {\n if (!$this->input->is_ajax_request()) {\n return false;\n }\n $response = $this->roles_model->activar_desactivar_rol();\n $json = '{\"results\":[' . json_encode($response) . ']}';\n echo $json;\n exit;\n }", "public function deleteuser()\n\t{\n\t\t$admin_id = $this->input->post('admin_id');\t\t\n\t\t$result = $this->admin_model->delete($admin_id);\n\t\techo json_encode($result);\n\t}", "public function destroy($id)\n {\n if($id == 1){\n return $this->ajaxError('超级管理员角色不能被删除');\n }\n\n $result = $this->role->delete($id);\n\n return $this->ajaxAuto($result,'删除');\n }", "public function destroy($id)\n {\n \t//$role_user=Role_user::where('user_id','=',$id)->get(); \n \t//Role_user::destroy($role_user);\n $user= User::find($id);\n \tUser::destroy($id);\n /// \n //$user->roles()->detach(Role_user::where('user_id', $id);\n Session::flash('message','Usuario Eliminado Correctamente');\n return redirect('/usuario');\n }", "public function destroy(Request $request ,$id)\n {\n $this->authorize('delete', Role::class);\n\n $this->delete($id);\n\n $message = 'El rol fue borrado correctamente.';\n\n if ($request->ajax()) {\n return response()->json(['success'=>true, 'data'=>['message'=>$message]]);\n }else{\n Alert::success($message);\n return redirect()->route('user.index');\n }\n }", "public function ajax_delete_admin()\r\n {\r\n try\r\n {\r\n if ($this->privileges[PRIV_USERS]['delete'] == FALSE)\r\n {\r\n throw new Exception('You do not have the required privileges for this task.');\r\n }\r\n\r\n $this->load->model('admins_model');\r\n $result = $this->admins_model->delete($this->input->post('admin_id'));\r\n $this->output\r\n ->set_content_type('application/json')\r\n ->set_output(json_encode($result ? AJAX_SUCCESS : AJAX_FAILURE));\r\n }\r\n catch (Exception $exc)\r\n {\r\n $this->output\r\n ->set_content_type('application/json')\r\n ->set_output(json_encode(['exceptions' => [exceptionToJavaScript($exc)]]));\r\n }\r\n }", "public function role_delete($roleid, $uid){return($this->role('delete', array('roleid' => $roleid, 'uid' => $uid)));}", "function removeUser(){//pr($this->data);die;\n\t\t if(isset($this->data['Admin']['idArr']) && !empty($this->data['Admin']['idArr'])){\n\t\t\t$idArr = explode(\",\", $this->data['Admin']['idArr']);\n\t\t\t//pr($idArr);die;\n\t\t}\n\tif(isset($idArr[1]) && !empty($idArr[1])){\n\t\t$message = 'Selected Users removed successfully';\n\t}else{\n\t\t$message = 'Selected User removed successfully';\n\t}\n\t\n\t\tforeach($idArr as $ids){\n\t\t\t$userDesc = $this->User->find('first', array('conditions' => array('User.id' => $ids)));\n\t\t\t$arr[] = $ids;\n\t\t\tif(isset($userDesc['User']['user_image']) && !empty($userDesc['User']['user_image'])){\n\t\t\t\t$imageToUnlik = PROFILE_UPLOAD_URL.'upload_userImages/'.$userDesc['User']['user_image'];\n\t\t\t\tunlink($imageToUnlik);\n\t\t\t}\n\t\t\t//\n\t\t} \n\t\t\n\t\t$this->User->recursive = 0;\n\t\t\n\t\tif($this->User->deleteAll(array('id'=>$arr))){\t\n\t\t\t$this->Session->setFlash($message, 'default', array('class' => 'errMsgLogin'));\n\t\t\t$this->redirect('manageUsers');\n\t\t}else{\n\t\t\tdie('not deleted');\n\t\t}\n\t }", "public function delete( User $user, User $model, Request $request )\n {\n $targetId = $request->id;\n $target = $model->all()->find( $targetId );\n\n if( $user->id === $targetId ) { return false; } // User cant remove himself/herself.\n if( $target->hasRole( 'root' ) ) { return false; } // Root user can't be removed.\n if( $user->hasRole( 'admin' ) && $target->hasRole( 'admin' ) ) { return false; } // Admin can't remove another admin.\n if( $user->hasRole( 'root' ) || $user->hasRole( 'admin' ) ) \n {\n return true;\n }\n return false;\n }", "public function destroy($id)\n {\n //\n $user_auth = Auth::user();\n $this->authorize('before',$user_auth);\n\n\n $user = User::findOrFail($id);\n $user->delete();\n \n\n if( $user->roles->pluck('display_name')->implode(' - ') === 'Moderador'){\n \n if( $dato = Profesor::where('clave',$user->name)->first()){\n $dato->delete();\n }\n \n \n }else{\n \n if($dato = Alumno::where('matricula',$user->name)->first()){\n $dato->delete();\n } \n \n \n }\n\n\n \n\n Cache::flush();\n \n return back()->with('info','Usuario eliminado');\n }", "protected function confirmDeleteObject()\n\t{\n\t\tglobal $ilCtrl;\n\n\t\tif(!count($_POST['roles']))\n\t\t{\n\t\t\tilUtil::sendFailure($this->lng->txt('select_one'),true);\n\t\t\t$ilCtrl->redirect($this,'view');\n\t\t}\n\n\t\t$question = $this->lng->txt('rbac_role_delete_qst');\n\n\t\tinclude_once './Services/Utilities/classes/class.ilConfirmationGUI.php';\n\t\t$confirm = new ilConfirmationGUI();\n\t\t$confirm->setHeaderText($question);\n\t\t$confirm->setFormAction($ilCtrl->getFormAction($this));\n\t\t$confirm->setHeaderText($this->lng->txt(\"info_delete_sure\"));\n\t\t$confirm->setConfirm($this->lng->txt('delete'), 'deleteRole');\n\t\t$confirm->setCancel($this->lng->txt('cancel'), 'cancel');\n\n\n\t\tinclude_once './Services/AccessControl/classes/class.ilObjRole.php';\n\t\tforeach($_POST['roles'] as $role_id)\n\t\t{\n\t\t\t$confirm->addItem(\n\t\t\t\t'roles[]',\n\t\t\t\t$role_id,\n\t\t\t\tilObjRole::_getTranslation(ilObject::_lookupTitle($role_id))\n\t\t\t);\n\t\t}\n\t\t$this->tpl->setContent($confirm->getHTML());\n\t}", "public function harddelete($Id){\r\n $userid = Auth::user()->id;\r\n $userroledetail = \\DB::table('role_user')\r\n ->join('roles', 'role_user.role_id', '=', 'roles.id')\r\n ->Where('role_user.user_id', '=',$userid)\r\n ->select('roles.slug')\r\n ->first();\r\n\r\n if(!empty($userroledetail) && $userroledetail->slug == 'Admin' ){\r\n $place = place::find($Id);\r\n try{\r\n $place->delete();\r\n return response()->success('success');\r\n }\r\n catch (\\Exception $e){\r\n return response()->error($e->getMessage());\r\n }\r\n}else{\r\n return response()->success('error');\r\n}\r\n}", "public function destroy($id) {\n// if (! Gate::allows('users_manage')) {\n// return abort(401);\n// }\n\n $roleCheck = DB::table('model_has_roles')->where('model_id', $id)->first();\n\n if (!empty($roleCheck)) {\n $roleCheck = DB::table('model_has_roles')->where('model_id', '=', $id)->delete();\n }\n $user = User::findOrFail($id);\n $user->delete();\n\n $feedback_data = [\n 'status' => 'success',\n 'message' => 'Data have successfully Deleted',\n ];\n echo json_encode($feedback_data);\n }", "public function ajaxremoveownerAction() {\n // Henter data og sætter form\n $post = $this->getRequest()->getPost();\n $id = $post['id'];\n $result['success'] = false;\n //remove owner\n $ownertask = $this->getOwnermapper()->find($id);\n if ($ownertask) {\n //Cache data til hukommelse\n $this->getEntityManager()->remove($ownertask);\n //Gemmer label i db \n $this->getEntityManager()->flush();\n $result['success'] = true;\n }\n return new JsonModel($result);\n }", "public function removeRole($role);", "public function deleteAction()\n {\n $auth = Zend_Auth::getInstance();\n if($auth->hasIdentity())\n {\n $loginUserId = $auth->getStorage()->read()->id;\n }\n $baseUrl = $this->generateBaseurl();\n $id = $this->_request->getParam('objid');\n $messages['message'] = '';\n $actionflag = 3;$agencyuser = 'no';$Id = '';\n if($id)\n {\n $user_model = new Default_Model_Usermanagement(); \n $menumodel = new Default_Model_Menu();\n\t\t\t$agencylistmodel = new Default_Model_Agencylist();\n \n\t\t\t$agencyroles = $agencylistmodel->getagencyrole();\n\t\t\t$userData = $user_model->getUserDataById($id);\t\t\t\n\t\t\t$user_role = $userData['emprole'];\n\t\t\tforeach($agencyroles as $agrole)\n\t\t\t{\n\t\t\t\tif($agrole['id'] == $user_role)\n\t\t\t\t{\n\t\t\t\t\t$agencyuser = 'yes';\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\t$data = array(\n\t\t\t\t\t\t'isactive' => 0,\n\t\t\t\t\t\t'modifiedby' => $loginUserId,\n\t\t\t\t\t\t'modifieddate' => gmdate(\"Y-m-d H:i:s\"),\n\t\t\t\t);\n\t\t\t$where = array('id=?'=>$id);\n\t\t\t$Id = $user_model->SaveorUpdateUserData($data, $where);\n\t\t\t\n\t\t\tif($agencyuser == 'yes')\n\t\t\t{\n\t\t\t\t$agencyData = $user_model->getAgencyData($id);\n\t\t\t\t$user_model->deleteAllagencydetails($agencyData['agencyid'],$loginUserId);\n\t\t\t\t$emailids = $agencylistmodel->getAllHRManagementEMails();\t\t\t\t\n\t\t\t\t$this->sendEMails($agencyData,'inactivated');\n\t\t\t}\n\t\t\t\n if($Id == 'update')\n { \n $objidArr = $menumodel->getMenuObjID('/roles');\n $objID = $objidArr[0]['id']; \n $result = sapp_Global::logManager($objID,$actionflag,$loginUserId,$id); \n $messages['message'] = 'User deleted successfully';\n $messages['msgtype'] = 'success';\n } \n else\n {\n $messages['message'] = 'User cannot be deleted';\t\n $messages['msgtype'] = 'error';\n }\n }\n else\n { \n $messages['message'] = 'User cannot be deleted';\n $messages['msgtype'] = 'error';\n }\n $this->_helper->json($messages);\n }", "public function destroy(Request $request)\n {\n $ids = $request->get('ids');\n if (empty($ids)){\n return response()->json(['code'=>1,'msg'=>'请选择删除项']);\n }\n\n // 如果角色已经关联有启用的用户,删除提示:“有关联用户,不能删除”\n $users = DB::table('sys_model_has_roles')->whereIn('role_id', $ids)->pluck('model_id')->toArray();\n $count = User::query()->whereIn('id', $users)->count();\n if ($count > 0) {\n return response()->json(['code' => 1, 'msg' => '有关联用户,不能删除']);\n }\n\n if (Role::destroy($ids)){\n // sys_log表\n $adminUser = $request->user()->toArray();\n $this->addSysLog([\n 'user_id'=>$adminUser['id'],\n 'username'=>$adminUser['name'],\n 'module'=>SysLog::manage_role,\n 'page'=>'角色管理',\n 'type'=>SysLog::delete,\n 'content'=>'删除角色:' . join(',', $ids),\n ]);\n return response()->json(['code'=>0,'msg'=>'删除成功']);\n }\n return response()->json(['code'=>1,'msg'=>'删除失败']);\n }", "public function removeRoles(): self\n {\n // Don't remove if the user is already disconnected\n if (empty($this->app)) {\n return $this;\n }\n\n $me = $this->me();\n\n\n $headers = [\n 'Authorization' => 'Bot ' . config('discord.bot_token'),\n 'Content-Type' => 'application/json',\n ];\n $body = [\n 'access_token' => $this->app->access_token,\n ];\n\n try {\n foreach (config('discord.roles') as $id) {\n $url = 'guilds/' . config('discord.channel_id') . '/members/' . $me->id . '/roles/' . $id;\n $this->call('delete', $url, $body, $headers);\n }\n } catch (\\Exception $e) {\n Log::warning('Couldn\\'t delete role for user');\n }\n\n return $this;\n }", "function remove_user_role($username, $role) {\n $drush = drush_location_get();\n\n print \"Removing new user role\\n\";\n exec_verbose(array($drush, 'user-remove-role', $role, $username));\n}", "function delete_user(){ // Delte User\n\t\t\t\n\t}", "public function destroy($id)\n {\n $user = User::find($id);\n if ($user->user_type != 'admin') {\n $user->delete();\n Toastr::success('User Role Deleted Successfully ');\n }else{\n Toastr::warning('You can not delete Super admin');\n }\n\n return back();\n }", "public function delete()\n\t{\n\t\t// Set WHERE before deleting, to access the object id\n\t\t$where = array($this->class.'_id' => $this->object->id);\n\n\t\t// Related table name\n\t\t$table = $this->related_table('users');\n\n\t\tif ($return = parent::delete())\n\t\t{\n\t\t\t// Delete the many<>many relationships for users<>roles\n\t\t\tself::$db\n\t\t\t\t->where($where)\n\t\t\t\t->delete($table);\n\t\t}\n\n\t\treturn $return;\n\t}", "public function destroy($institute_guid, $user_guid, Request $request)\n {\n $rank = \\Config::get('enum.role_ranks');\n $institute = $this->getUserInstitutePivot($institute_guid, $user_guid);\n\n if (count($institute['users']) <= 0) {\n return response()->json(['Error' => 'No such user in your institute.'], 202);\n }\n\n if ($rank[$request->get('auth_user_role')] < $rank[$institute['users'][0]['pivot']['role']] &&\n $institute->users()->detach($institute['users'][0]['id'])\n ) {\n return response()->json(['user_guid' => $institute['users'][0]['user_guid']], 202);\n } else {\n return response()->json(['Error' => 'Not Authorized.'], 403);\n }\n }", "public function destroy(Request $request)\n{\n\n if($request->ajax()){\n $success = $this->user->find($request->id)->delete();\n\n if($success){\n return response()->json($success);\n }else{\n return response()->json($success);\n }\n\n }else{\n return response()->json($success);\n }\n}", "public function destroy($id)\n {\n $users = admin::find($id);\n $users->roles()->detach();\n $users->delete();\n return redirect (route('staff.index'))->with('message','Admin User Deleted Successfully');\n }", "function delete()\n\t{\t\t\n\t\tglobal $rbacadmin, $rbacreview,$ilDB;\n\t\t\n\t\t// Temporary bugfix\n\t\tif($rbacreview->hasMultipleAssignments($this->getId()))\n\t\t{\n\t\t\t$GLOBALS['ilLog']->write(__METHOD__.': Found role with multiple assignments: '.$this->getId());\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif ($rbacreview->isAssignable($this->getId(),$this->getParent()))\n\t\t{\n\t\t\t// do not delete a global role, if the role is the last \n\t\t\t// role a user is assigned to.\n\t\t\t//\n\t\t\t// Performance improvement: In the code section below, we\n\t\t\t// only need to consider _global_ roles. We don't need\n\t\t\t// to check for _local_ roles, because a user who has\n\t\t\t// a local role _always_ has a global role too.\n\t\t\t$last_role_user_ids = array();\n\t\t\tif ($this->getParent() == ROLE_FOLDER_ID)\n\t\t\t{\n\t\t\t\t// The role is a global role: check if \n\t\t\t\t// we find users who aren't assigned to any\n\t\t\t\t// other global role than this one.\n\t\t\t\t$user_ids = $rbacreview->assignedUsers($this->getId());\n\n\t\t\t\tforeach ($user_ids as $user_id)\n\t\t\t\t{\n\t\t\t\t\t// get all roles each user has\n\t\t\t\t\t$role_ids = $rbacreview->assignedRoles($user_id);\n\t\t\t\t\n\t\t\t\t\t// is last role?\n\t\t\t\t\tif (count($role_ids) == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$last_role_user_ids[] = $user_id;\n\t\t\t\t\t}\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// users with last role found?\n\t\t\tif (count($last_role_user_ids) > 0)\n\t\t\t{\n\t\t\t\tforeach ($last_role_user_ids as $user_id)\n\t\t\t\t{\n//echo \"<br>last role for user id:\".$user_id.\":\";\n\t\t\t\t\t// GET OBJECT TITLE\n\t\t\t\t\t$tmp_obj = $this->ilias->obj_factory->getInstanceByObjId($user_id);\n\t\t\t\t\t$user_names[] = $tmp_obj->getFullname();\n\t\t\t\t\tunset($tmp_obj);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// TODO: This check must be done in rolefolder object because if multiple\n\t\t\t\t// roles were selected the other roles are still deleted and the system does not\n\t\t\t\t// give any feedback about this.\n\t\t\t\t$users = implode(', ',$user_names);\n\t\t\t\t$this->ilias->raiseError($this->lng->txt(\"msg_user_last_role1\").\" \".\n\t\t\t\t\t\t\t\t\t $users.\"<br/>\".$this->lng->txt(\"msg_user_last_role2\"),$this->ilias->error_obj->WARNING);\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// IT'S A BASE ROLE\n\t\t\t\t$rbacadmin->deleteRole($this->getId(),$this->getParent());\n\n\t\t\t\t// Delete ldap role group mappings\n\t\t\t\tinclude_once('./Services/LDAP/classes/class.ilLDAPRoleGroupMappingSettings.php');\n\t\t\t\tilLDAPRoleGroupMappingSettings::_deleteByRole($this->getId());\n\n\t\t\t\t// delete object_data entry\n\t\t\t\tparent::delete();\n\t\t\t\t\t\n\t\t\t\t// delete role_data entry\n\t\t\t\t$query = \"DELETE FROM role_data WHERE role_id = \".$ilDB->quote($this->getId(),'integer');\n\t\t\t\t$res = $ilDB->manipulate($query);\n\n\t\t\t\tinclude_once 'Services/AccessControl/classes/class.ilRoleDesktopItem.php';\n\t\t\t\t$role_desk_item_obj = new ilRoleDesktopItem($this->getId());\n\t\t\t\t$role_desk_item_obj->deleteAll();\n\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// linked local role: INHERITANCE WAS STOPPED, SO DELETE ONLY THIS LOCAL ROLE\n\t\t\t$rbacadmin->deleteLocalRole($this->getId(),$this->getParent());\n\t\t}\n\t\treturn true;\n\t}", "public function destroy($id)\n {\n //\n\n $user=User::find($id);\n\n $this->authorize('delete',$user);\n\n\n $user->roles()->detach();\n\n $user->delete();\n\n session()->flash('success','Role Assigned Succesfully');\n\n return redirect()->back();\n\n\n\n }", "public function elimina(){\n try{\n $con = new Conexion;\n $con = $con->conectar();\n $sql = 'DELETE FROM roles WHERE id = '.$this->id;\n }catch(Exception $e){\n $e->getMessage();\n }finally{\n $con->close();\n }\n }", "public function destroy(Request $request)\n {\n try{\n $this->authorize('delete', User::class);\n $user = User::find($request->id);\n $user->roles()->detach();\n User::destroy($user->id);\n return redirect()->route('users')->with('status', 'Successfully deleted the User');\n }catch (\\Exception $e){\n return redirect()->back()->withErrors($e->getMessage());\n }\n }", "public function ajax_delete_user_data(){\n\n\t\tif(!$this->input->is_ajax_request()){\n\t\t\texit(\"Nenhum acesso de script direto permitido!\");\n\t\t}\n\n\t\t$json = array();\n\t\t$json[\"status\"] = 1;\n\n\t\t$this->load->model(\"users_model\");\n\t\t$user_id = $this->input->post(\"user_id\");\n\t\t$this->users_model->delete($user_id); \n\t\t\n\t\techo json_encode($json);\n\t}", "public function destroyRole($id)\n {\n //\n }", "function pwm_remove_user_role($user_id, $role){\n\t\n\t$employer_pro = get_userdata($user_id);\n\t$employer_pro->remove_role($role); \t\n\n\t$subscription_plan = get_user_meta( $user_id, '_subscription_plan', true );\n\t\n\tif ($subscription_plan == 'Employer Recruiter Pro'){\n\t\tupdate_user_meta( $user_id, '_subscription_plan', 'Employer Free' );\n\t}\n\n\tupdate_user_meta( $user_id, '_subscription_status', 0 );\n}", "public function delete_user()\r\n {\r\n // is_active a 0\r\n $id = $this->id_session();\r\n $this->user_model->delete($id);\r\n\r\n // log_out\r\n $array_items = array('username', 'role');\r\n $this->session->unset_userdata($array_items);\r\n\r\n redirect(site_url());\r\n }", "public function destroy(Request $request)\n {\n $request->validate([\n 'id'=> 'bail|required|exists:roles'\n ]);\n $roles = Role::find($request->id);\n $roles->delete();\n return response()->json([\n 'role' => $roles,\n 'response' => 'deleted'\n\n ], 200);\n }", "public function actionRemovecoauthor()\n {\n if (!Yii::app()->request->isAjaxRequest)\n throw new CHttpException(404);\n $this->layout = false;\n $coauthorId = Yii::app()->request->getParam('coauthorId');\n\n $rows = Coauthor::model()->deleteByPk($coauthorId, 'idea_type_id=:typeId', array(':typeId' => Config::INTERIOR));\n echo CJSON::encode(array('success' => (bool) $rows));\n\n return;\n }", "public function destroy($id)\n {\n $role = Role::find($id);\n\n // if($role->user()->get()){\n //Destroy role_user associations\n foreach($role->user()->get() as $role){\n // echo $role->pivot->role_id;\n // $user_id = $role->pivot->user_id;\n // $user = User::find($user_id);\n // $user->role()->detach($role->pivot->role_id);\n $user = User::find($role->pivot->user_id);\n $user->role()->detach($role->pivot->role_id);\n }\n\n $this->destroy_role_userinvitation($id);\n $this->destroy_role($id);\n return \\Redirect::route('roles.index');\n // return \\Redirect::route('roles.index')->with('success', 'Success! Role Deleted');\n \n\n }", "public function delReservaUser()\n {\n // verificamos que hemos recibido los parámetros desde la vista de listado \n if (isset($_GET['id']) && (is_numeric($_GET['id']))) {\n $id = $_GET[\"id\"];\n //Realizamos la operación de suprimir el usuario con el id=$id\n $resultModelo = $this->modelo->borrarReservas($id);\n //Analizamos el valor devuelto por el modelo para definir el mensaje a \n //mostrar en la vista listado\n if ($resultModelo[\"correcto\"]) :\n $this->mensajes[] = [\n \"tipo\" => \"success\",\n \"mensaje\" => \"Se elimino correctamente la reserva $id\"\n ];\n else :\n $this->mensajes[] = [\n \"tipo\" => \"danger\",\n \"mensaje\" => \"La eliminación de la reserva no se realizó correctamente<br/>({$resultModelo[\"error\"]})\"\n ];\n endif;\n } else { //Si no recibimos el valor del parámetro $id generamos el mensaje indicativo:\n $this->mensajes[] = [\n \"tipo\" => \"danger\",\n \"mensaje\" => \"No se pudo acceder al id del usuario a eliminar!! :(\"\n ];\n }\n //Realizamos el listado de los usuarios\n $this->misReservas();\n }", "public function actionDelete()\n {\n $result = false;\n if (Yii::$app->request->post('Delete')) {\n $data = Yii::$app->request->post('Delete');\n $auth = Yii::$app->authManager;\n switch ($data['type']) {\n case 'single':\n if ($data['id'] == 'superAdmin')\n $result = true;\n else {\n $role = $auth->getRole($data['id']);\n $result = $auth->remove($role);\n }\n break;\n\n case 'multiple':\n foreach (Json::decode($data['id']) as $item) {\n if ($item == 'superAdmin')\n $result = true;\n else {\n $role = $auth->getRole($item);\n $result = $auth->remove($role);\n }\n }\n break;\n }\n }\n\n if ($result === false)\n Yii::$app->session->setFlash('public-alert', ['type' => 'danger', 'message' => Yii::t('words', 'base.deleteDangerMsg')]);\n else\n Yii::$app->session->setFlash('public-alert', ['type' => 'success', 'message' => Yii::t('words', 'base.deleteSuccessMsg')]);\n\n return $this->actionIndex();\n }", "function oracleEliminarRolAction() {\n $gestor = $this->_request->getPost('gestor');\n $puerto = $this->_request->getPost('puerto');\n $user = $this->_request->getPost('user');\n $pass = $this->RSA->decrypt($this->_request->getPost('passw'));\n $ipgestorbd = $this->_request->getPost('ip');\n $SID = \"orac\";\n $cadenaConex = \"(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL='TCP')(HOST=$ipgestorbd)(PORT=$puerto)))(CONNECT_DATA = (SID = $SID)))\";\n $conn = oci_connect(\"$user\",\"$pass\",\"$cadenaConex\");\n\n $rol_eliminar=$this->_request->getPost('rol');\n\n $query = \"DROP ROLE $rol_eliminar\";\n $stid = oci_parse($conn, $query);\n oci_execute($stid);\n\n $this->showMessage('Rol eliminado satisfactoriamente.');\n\n oci_close($conn);\n }", "public function destroyRole($id, $userID) {\n\n\t\tDB::delete('delete from classes_has_users where id=' . $id);\n\t\treturn URL::to('portal/teacher/' . $userID . \"/roles\");\n\t\t//return URL::to('portal/teacher/');\n\t}", "public function admin_remove($id){\r\n\t\t\t$user = User::find($id);\r\n\t\t\t$role_id = $user->role_id;\r\n\t\t\tif($user->is_deleted==1){\r\n\t\t\t\t$user->is_deleted = 0;\r\n\t\t\t}else {\r\n\t\t\t\t$user->is_deleted = 1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif($user->save()){\r\n\t\t\t\tSession::flash('message', 'User account has been deleted successfully.');\r\n\t\t\t\treturn Redirect::to('admin/users/'.$role_id);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "public function destroy($id)\n {\n if (Auth::check() && Auth::user()->role->name == 'administrador') {\n $r = Role::find($id);\n $r->status = $r->status == 1 ? 0 : 1;\n $r->save();\n return json_encode(['result' => 'success']);\n }\n return json_encode(['result' => 'error', 'error' => 'No tiene acceso']);\n\n }", "public function destroy(User $user)\n {\n // delete\n\n\\DB::table('role_user')->where('user_id', $user->id)->delete();\n $user->delete();\n\n // redirect\n // Session::flash('message', 'Successfully deleted the nerd!');\n \\Alert::success(\"Registro eliminado con exito\");\n return redirect()->route('users.index'); \n\n // return Redirect::to('users');\n }", "private function updateUserRole()\n {\n $databaseAdapter = new Database();\n $userMapper = new UserMapper($databaseAdapter);\n $this->view->responseAjaxCall($userMapper->updateUserRole($this->view->getUserIdForUpdate(), $this->view->getUserRoleToUpdate()));\n }", "public function removeRoleFormUser($roleId)\n {\n $role = branchUserRole::select('*')\n ->where('id',$roleId)\n ->first();\n if ($role) {\n \n $update = branchUserRole::whereIn('id',$roleId)->delete();\n \n if ($update) {\n \n return $this->generalResponse(true,201,'success', null,null);\n \n }\n \n } else {\n \n $msg = 'role not exist';\n return $this->generalResponse(false, 404,$msg, null,null);\n \n }\n }", "public function destroy(Request $request)\n {\n if ($request->id == Auth::user()->id) {\n return redirect()->back()->with('mess', 'Bạn không được quyền xóa chính mình');\n }\n $user = Admin::query()->find($request->id);\n $user->roles()->detach();\n $user->destroy($request->id);\n return redirect()->back()->with('mess', 'Xóa tài khoản thành công');\n }", "function removeUser($userID, $role){\n $success = False;\n\n try {\n //Remove event manager connections in manager_event table\n if ($role == 2){\n if ($stmt = $this->conn->prepare(\"DELETE FROM manager_event WHERE manager= :managerID\")){\n //Executing\n $stmt->execute(array(\":managerID\"=>$userID));\n }\n }\n\n //Remove session connections in attendee_session table\n if ($stmt2 = $this->conn->prepare(\"DELETE FROM attendee_session WHERE attendee= :attendeeID\")){\n //Executing\n $stmt2->execute(array(\":attendeeID\"=>$userID));\n }\n\n //Get attendee_event and remove link from that table\n if ($stmt3 = $this->conn->prepare(\"DELETE FROM attendee_event WHERE attendee= :attendeeID2\")){\n //Executing\n $stmt3->execute(array(\":attendeeID2\"=>$userID));\n }\n\n //Remove attendee\n if ($stmt4 = $this->conn->prepare(\"DELETE FROM attendee WHERE idattendee= :attendeeID\")){\n //Executing\n $stmt4->execute(array(\":attendeeID\"=>$userID));\n\n $success = True;\n }\n return $success;\n } catch (PDOException $e) {\n //can log message\n echo $e->getMessage();\n return array();\n }\n }", "public function remove_role( $args, $assoc_args ) {\n\t\t$user = $this->fetcher->get_check( $args[0] );\n\n\t\tif ( isset( $args[1] ) ) {\n\t\t\t$role = $args[1];\n\n\t\t\tself::validate_role( $role );\n\n\t\t\t$user->remove_role( $role );\n\n\t\t\tWP_CLI::success( \"Removed '{$role}' role for {$user->user_login} ({$user->ID}).\" );\n\t\t} else {\n\t\t\t// Multisite\n\t\t\tif ( function_exists( 'remove_user_from_blog' ) ) {\n\t\t\t\tremove_user_from_blog( $user->ID, get_current_blog_id() );\n\t\t\t} else {\n\t\t\t\t$user->remove_all_caps();\n\t\t\t}\n\n\t\t\tWP_CLI::success( \"Removed {$user->user_login} ({$user->ID}) from \" . site_url() . '.' );\n\t\t}\n\t}", "public function destroy($user_id)\n {\n if(auth()->user()->hasPermissionTo('user-delete')){\n $user = $this->model->show($user_id); \n $use = User::where([\n \"user_id\" => $user_id, \n ])->first();\n \n $details= $use->name; \n $email = $use->email;\n $roles = $user->roles()->first()->name;\n $log = new ActivityLog([\n \"operations\" => \"Deleted \". $email. \" From The User List\",\n \"user_id\" => Auth::user()->user_id,\n ]);\n if (($user->delete($user_id)) AND ($user->trashed()) AND ($log->save())) {\n $use->removeRole($roles);\n return redirect()->back()->with([\n 'success' => \"You Have Deleted\". $details. \" \". \"From The User Details Successfully\",\n ]);\n }\n } else{\n return redirect()->back()->with([\n 'error' => \"You Dont have Access To Delete A User\",\n ]);\n }\n }", "public function destroy(Request $request,User $user,Role $role)\n {\n $authUser = $request->user();\n $authUserHasAdminRole = $authUser->roles->contains('id',1);\n \n if(!$authUserHasAdminRole){\n return $this->errorResponse('Only users with admin role can remove a role from a user',403);\n }\n \n $roleUser = RoleUser::where([\n ['user_id',$user->id],\n ['role_id',$role->id]\n ])->firstOrFail();\n \n $roleUser->forceDelete();\n\n return $this->showMessage(\"User \".$user->username.\" no longer has a role \".$role->name);\n }", "public function del_user(Request $request)\n {\n $deliting_user = User::where('id',strip_tags($request->user_id))->first();\n\n if (Auth::user()->id != $deliting_user->id) {\n if(User_role::where('user_id', '=', $deliting_user->id)->count() > 0){\n $user_roles = User_role::where('user_id', '=', $deliting_user->id)->first();\n $user_roles -> delete();\n }\n \n if(user_notification::where('user_id', '=', $deliting_user->id)->count() > 0){\n $user_notifications = user_notification::where('user_id', '=', $deliting_user->id)->first();\n $user_notifications -> delete();\n }\n \n if(User_permission::where('user_id', '=', $deliting_user->id)->count() > 0){\n $user_parmissions = User_permission::where('user_id', '=', $deliting_user->id)->get();\n \n foreach ($user_parmissions as $user_parmission) {\n $user_parmission -> delete();\n }\n }\n\n if ($deliting_user->image) {\n ImageControllService::image_delete('images/user_profil_img/'.$deliting_user->image.'_img/', $deliting_user, 'image');\n }\n\n $deliting_user ->delete();\n\n return(\"User deleted socsesful\");\n }\n else {\n return(\"You don`t can delete yourself! :)\");\n }\n }", "public function delete($rid){\n if( ! $this->current_user->can('delete-acl') ){\n $this->response['result'] = 'error';\n return response()->json($this->response);\n }\n\n $role = Role::find($rid);\n if(empty($role)){\n $this->response['result'] = 'error';\n $this->response['message'] = t('cp__error__not_find', 'Информация не найдена');\n return response()->json($this->response);\n }\n\n $role->delete();\n $this->response['result'] = 'success';\n $this->response['message'] = t('cp__action__role_delete', 'Роль удалена');\n\n return response()->json($this->response);\n }", "public function actionRevoke()\n {\n $username = $this->prompt('Имя пользователя:', ['required' => true]);\n $user = $this->findUser($username);\n\n $roleName = $this->select('Роль:', ArrayHelper::merge(\n ['all' => 'Все роли'],\n ArrayHelper::map(Yii::$app->authManager->getRolesByUser($user->id), 'name', 'description'))\n );\n\n $authManager = Yii::$app->getAuthManager();\n\n if ($roleName == 'all') {\n $authManager->revokeAll($user->id);\n } else {\n $role = $authManager->getRole($roleName);\n $authManager->revoke($role, $user->id);\n }\n\n $this->stdout('Готово!' . PHP_EOL);\n }", "function index_delete() {\n $id = $this->delete('role_id');\n $this->db->where('role_id', $id);\n $delete = $this->db->delete('ref_roles');\n if ($delete) {\n $this->response(array('status' => 'success', 'msg' => $delete), 201);\n } else {\n $this->response(array('status' => 'fail', 'msg' => $delete, 502));\n }\n }", "public function destroy(User $user)\n {\n if (Auth::user()->id == $user->id) {\n return redirect(route('users.index'))->with('error' , 'You Can not Edit your self');\n }\n if ($user) {\n $user->roles()->detach();\n User::destroy($user->id);\n return redirect(route('users.index'))->with('msg' , 'The User Has Deleted successfully !');\n }\n return redirect(route('users.index'))->with('error' , 'The User Can not be Deleted');\n }", "public function destroy($user_id)\n {\n $alumni = User::findOrFail($user_id);\n $alumni->delete();\n return redirect('alumnies')->with('success','Data Deleted Success');\n }", "public function userRoleRevokePermissionTo(Request $request)\n {\n $this->validate($request, [\n \"role\" => \"required\",\n \"permission\" => \"required\",\n ]);\n\n $users = User::role($request->role)\n ->get();\n\n if (!$users) {\n return response([\"message\" => \"User with given role not found\"], Response::HTTP_UNPROCESSABLE_ENTITY);\n }\n\n foreach ($users as $user) {\n\n $currentUser = User::find($user->id);\n $currentUser->revokePermissionTo($request->permission);\n }\n\n return response([\"message\" => \"Success to revoke a permission from user via role \"]);\n }", "private function removeUser()\n {\n $databaseAdapter = new Database();\n $userMapper = new UserMapper($databaseAdapter);\n $userImage = $userMapper->getUserImage($this->view->userToRemove());\n\n if($userImage[0][\"profileImage\"] != \"Data/profile_images/default_profile_image.gif\") {\n unlink($userImage[0][\"profileImage\"]);\n }\n\n $this->view->responseAjaxCall($userMapper->removeUser($this->view->userToRemove()));\n }", "public function destroy( $user)\n {\n try{\n $user = User::findOrFail($user);\n $id=$user->id;\n// $user->roles()->detach();\n $user->delete();\n \n return redirect()->route('user.index');\n } catch(Exception $e){\n $var = '<script language=\"javascript\">alert(\"No se puede eliminar este registro ya que tiene registros hijos asociados a otras tablas.\"); window.history.go(-1);</script>';\n return (\"$var \");\n// return \"Fatal error - \".$e->getMessage();\n }\n }" ]
[ "0.65931654", "0.6538291", "0.6494793", "0.64777493", "0.6458609", "0.63973147", "0.6355682", "0.6227402", "0.6186035", "0.6172462", "0.61573815", "0.61356795", "0.61302716", "0.60998785", "0.60159767", "0.60146046", "0.6007945", "0.6007254", "0.6003847", "0.59943813", "0.59922594", "0.5967651", "0.5946926", "0.5944614", "0.59408885", "0.5940852", "0.59207165", "0.5916844", "0.5915772", "0.59062755", "0.58922046", "0.58807296", "0.58807296", "0.58807296", "0.5872359", "0.58565533", "0.5854738", "0.58535933", "0.5850192", "0.5844223", "0.5844223", "0.5832207", "0.58186704", "0.57935137", "0.57896364", "0.5783635", "0.57816696", "0.5781174", "0.5778046", "0.5771239", "0.5767765", "0.57586473", "0.5747974", "0.5744112", "0.5743411", "0.5733776", "0.5730887", "0.5715906", "0.5700239", "0.5697582", "0.5697144", "0.5686841", "0.5686111", "0.5680905", "0.56788534", "0.567605", "0.56749606", "0.56684023", "0.56521994", "0.5651707", "0.5643464", "0.56423247", "0.56376886", "0.56342554", "0.56318164", "0.56174624", "0.5614766", "0.5609964", "0.56098443", "0.5604116", "0.5601295", "0.5599475", "0.55994534", "0.55980843", "0.5597419", "0.559714", "0.5597028", "0.559433", "0.5591477", "0.55913466", "0.559126", "0.5584147", "0.5567576", "0.5565515", "0.5562154", "0.5552523", "0.55494326", "0.55464476", "0.5541723", "0.5535856" ]
0.73205024
0
Gets the width of this graph. The width is returned as 'defined' by the canvas.
Получает ширину этого графика. Ширина возвращается как 'определенная' канвасом.
function width() { return $this->_canvas->getWidth(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getWidth() {\n\t\treturn $this->originalDimensions['width'];\n\t}", "public function getWidth() {\n\t\treturn $this->originalDimensions['width'];\n\t}", "public function getWidth() : int\n {\n return $this->width;\n }", "public function getWidth() : int\n {\n return $this->width;\n }", "public function getWidth()\n {\n return $this->width;\n }", "public function getWidth()\n {\n return $this->width;\n }", "public function getWidth()\n {\n return $this->width;\n }", "public function getWidth()\n {\n return $this->width;\n }", "public function getWidth()\n {\n return $this->width;\n }", "public function getWidth()\n {\n return $this->width;\n }", "public function getWidth()\n {\n return $this->width;\n }", "public function getWidth()\n {\n return $this->width;\n }", "public function getWidth()\n {\n return $this->width;\n }", "public function getWidth()\n {\n return $this->width;\n }", "public function getWidth()\n {\n return $this->width;\n }", "public function getWidth()\n {\n return $this->width;\n }", "public function getWidth()\n {\n return $this->width;\n }", "public function getWidth()\n {\n return $this->width;\n }", "public function getWidth()\n {\n return $this->width;\n }", "public function getWidth() {\n\t\treturn $this->width;\n\t}", "public function getWidth() {\n\t\treturn $this->width;\n\t}", "public function getWidth(): int\n {\n return $this->width;\n }", "public function getWidth(): int\n {\n return $this->width;\n }", "public function get_width() {\n\t\treturn $this->width;\n\t}", "public function getWidth() {\r\n\t\treturn $this->width; \r\n\t}", "public function getWidth(): int\n {\n return $this->_width;\n }", "public function getWidth() : int\n\t{\n\t\treturn $this->width;\n\t}", "public function getWidth()\n {\n return $this->_width;\n }", "public function getWidth()\n {\n return $this->_width;\n }", "public function getWidth()\r\n {\r\n return $this->width;\r\n }", "public function getWidth()\n {\n return $this->get('width');\n }", "public final function getWidth() : int\n {\n\n return $this->disposed ? 0 : $this->size->getWidth();\n\n }", "public function getWidth()\n {\n return $this->getAttribute('width');\n }", "public function getWidth() {\n\t\treturn $this->iWidth;\n\t}", "public function GetWidth () {\n\t\treturn $this->width;\n\t}", "public function getWidth() {\n return $this->_width;\n }", "public function getWidth() {\n list($width, $height) = explode('x', $this->getSize());\n return $width;\n }", "public function width() : int\n {\n if ($this->width === null) {\n throw new RuntimeException('Layer has not been initialized.');\n }\n\n return $this->width;\n }", "public function width() : int\n {\n if ($this->width === null) {\n throw new RuntimeException('Layer has not been initialized.');\n }\n\n return $this->width;\n }", "public function getWidthAttribute()\n {\n if ($this->isImage()) {\n $dimensions = $this->getImageDimensions();\n\n return $dimensions[0];\n }\n }", "public function getWidth(){\n\t\t\treturn $this->_width;\n\t\t}", "public function width() : int\n {\n if (!$this->width) {\n throw new RuntimeException('Layer has not been initialized.');\n }\n\n return $this->width;\n }", "public function getWidth()\n {\n return $this->i->width;\n }", "function get_width() {\n\t\treturn $this->width;\n\t}", "public function getWidth()\n {\n return $this->isImage() ? $this->imageSize[0] : null;\n }", "public function getWidth()\n {\n return imagesx($this->currentImage);\n }", "function getWidth() {\n return $this->width;\n }", "public function getWidth()\n\t{\n\t\treturn imagesx($this->image());\n\t}", "function _plotWidth()\n {\n return (min($this->height(), $this->width())) * 0.80;\n }", "public function getWidth() { return $this->_width; }", "public function get_width(){\n\t\treturn (float) $this->v_width;\n\t}", "public function width()\n {\n\n if (empty($this->width)) {\n\n $this->processGetImageSize();\n\n }\n\n return $this->width;\n\n }", "public function width() {\n return $this->width;\n }", "public function getWidthPixels()\n {\n return $this->width_pixels;\n }", "public function getWidthPixels()\n {\n return $this->width_pixels;\n }", "public function getWidth()\n {\n return $this->attributes->mustHave('width')->asInteger();\n }", "function getWidth()\n\t{\n\t\treturn $this->XSize;\n\t}", "public function getWidth()\n\t{\n\t\treturn self::getInfo($this->file, 'width');\n\t}", "public function getWidth()\n {\n $imageSizes = $this->getImageSizes();\n return $imageSizes[0];\n }", "public function width() { return $this->_m_width; }", "public function getWidth();", "public function getWidth();", "public function getWidth();", "public function getWidth();", "public function getWidth();", "public function getWidth() {\n return imagesx($this->image);\n }", "public function width()\n {\n return imagesx($this->image);\n }", "function getWidth() { return $this->_width; }", "public function getWidthUnit()\n {\n return $this->widthUnit;\n }", "public function width()\n {\n return $this->getInterventionImage()->width();\n }", "public function getWidth() {\n if(!$this->getProcessed()) {\n $this->processImage();\n }\n return $this->width;\n }", "protected function getWidth() \n {\n \treturn $this->options['width'];\n }", "public function getWidth()\n {\n return 280;\n }", "public function getWidth(): int\n\t{\n\t\treturn (int) $this->productWidth;\n\t}", "public function width()\n {\n return imagesx($this->resource());\n }", "public function getWidth() {}", "public function getWidth(): float;", "public function width() : int\n {\n return $this->neurons;\n }", "public function getWidth(): int;", "public function getWidth(): int;", "public function getWidth(): int;", "public function getWidthRatio() : float\n {\n return $this->widthRatio;\n }", "public function getImageWidth()\n {\n if ( empty($this->getData('imagewidth')) ) {\n return self::DEFAULT_IMAGE_WIDTH;\n }\n\n return (int) $this->getData('imagewidth');\n }", "public function getWidth(){\n return imagesx($this->outputImage);\n }", "public function getWidth(): int\n {\n // So we don't do -box[0].\n return max($this->box[2], $this->box[4]);\n }", "public function getWidth()\n {\n return null;\n }", "public function getImageWidth()\n {\n return $this->image_width;\n }", "public function getImageWidth()\n {\n if ($this->getData('imagewidth') == '') {\n return DEFAULT_IMAGE_WIDTH;\n }\n return (int)$this->getData('imagewidth');\n }", "public function getResizeWidth(): int\n {\n return (int)$this->getData(self::RESIZE_WIDTH);\n }", "public function getImageWidth() {\r\n\t\t$current = $this->getCurrentImage();\r\n\t\treturn $current['width'];\r\n\t}", "protected function width(): float\n {\n return max(array_map(function ($item) {\n return $item['width'];\n }, $this->items));\n }", "public function getOuterWidth(){\n return $this->getWidth(false, true);\n }", "public function total_width();", "public function get_line_width() {\n return $this->line_width;\n }", "public function getInnerWidth(){\n return $this->getWidth(true, false);\n }", "public function getBoardWidth()\n\t{\n\t\treturn $this->_boardWidth;\n\t}", "public function getThickness() : int {\n return $this -> thickness;\n }", "protected function _getImageWidth()\n {\n return imagesx($this->_resource);\n }", "private function getGridWidth()\n {\n return $this->width;\n }", "public function getWidth(){ }" ]
[ "0.78569764", "0.78569764", "0.7736724", "0.7736724", "0.77219224", "0.77219224", "0.77219224", "0.77219224", "0.77219224", "0.77219224", "0.77219224", "0.77219224", "0.77219224", "0.77219224", "0.77219224", "0.77219224", "0.77219224", "0.77219224", "0.77219224", "0.77130985", "0.77130985", "0.7700719", "0.7700719", "0.76643187", "0.7651619", "0.7649454", "0.76316786", "0.7631574", "0.7631574", "0.762547", "0.7614976", "0.7593682", "0.7551726", "0.75221527", "0.7519948", "0.7453887", "0.739571", "0.7376725", "0.7376725", "0.7357834", "0.73205", "0.7263048", "0.7226022", "0.7179235", "0.7157229", "0.7152023", "0.71492714", "0.7148895", "0.7145626", "0.71445316", "0.71289116", "0.70897555", "0.70742714", "0.7072983", "0.7072983", "0.7055838", "0.70554876", "0.701038", "0.69971293", "0.6963764", "0.69315636", "0.69315636", "0.69315636", "0.69315636", "0.69315636", "0.69227403", "0.69204664", "0.6918077", "0.6887196", "0.6872651", "0.68679434", "0.6857633", "0.68459135", "0.6827807", "0.68114704", "0.6751525", "0.67438316", "0.67419285", "0.6712726", "0.6712726", "0.6712726", "0.6706097", "0.6685474", "0.66837794", "0.6679902", "0.66445273", "0.664201", "0.6639032", "0.6619448", "0.6605578", "0.6570525", "0.65462404", "0.64688003", "0.6445368", "0.6445151", "0.64327246", "0.6384084", "0.6368555", "0.6365835", "0.6364027" ]
0.83080935
0
Gets the height of this graph. The height is returned as 'defined' by the canvas.
Получает высоту этого графика. Высота возвращается как 'определенная' канвасом.
function height() { return $this->_canvas->getHeight(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHeight() {\n\t\treturn $this->height;\n\t}", "public function getHeight() {\n\t\treturn $this->originalDimensions['height'];\n\t}", "public function getHeight() {\n\t\treturn $this->originalDimensions['height'];\n\t}", "public function getHeight()\n {\n return $this->height;\n }", "public function getHeight()\n {\n return $this->height;\n }", "public function getHeight()\n {\n return $this->height;\n }", "public function getHeight()\n {\n return $this->height;\n }", "public function getHeight()\n {\n return $this->height;\n }", "public function getHeight()\n {\n return $this->height;\n }", "public function getHeight()\n {\n return $this->height;\n }", "public function getHeight()\n {\n return $this->height;\n }", "public function getHeight()\n {\n return $this->height;\n }", "public function getHeight()\n {\n return $this->height;\n }", "public function getHeight()\n {\n return $this->height;\n }", "public function getHeight()\n {\n return $this->height;\n }", "public function getHeight()\n {\n return $this->height;\n }", "public function getHeight()\n {\n return $this->height;\n }", "public function getHeight()\n {\n return $this->height;\n }", "public function getHeight() {\n return $this->_getGridParam('height');\n }", "public function getHeight()\n {\n return $this->_height;\n }", "public function get_height() {\n\t\treturn $this->height;\n\t}", "public function getHeight()\n {\n return $this->getAttribute('height');\n }", "public function GetHeight () {\n\t\treturn $this->height;\n\t}", "public function getHeight() : int\n {\n return $this->height;\n }", "public function getHeight() : int\n {\n return $this->height;\n }", "public function getHeight() {\n return $this->_height;\n }", "public function GetHeight()\n\t\t{\n\t\t\treturn $this->_height;\n\t\t}", "public function getHeight(): float\n {\n return $this->height;\n }", "public function getHeight() : int\n\t{\n\t\treturn $this->height;\n\t}", "public function getHeight(): int\n {\n return $this->_height;\n }", "public function getHeight(): int\n {\n return $this->height;\n }", "public function getHeight(): int\n {\n return $this->height;\n }", "public function getHeight() {\n\t\treturn $this->iHeight;\n\t}", "public function getHeight() : int{\n\t\treturn $this->height;\n\t}", "function getHeight()\n\t{\n\t\treturn $this->YSize;\n\t}", "public final function getHeight() : int\n {\n\n return $this->disposed ? 0 : $this->size->getHeight();\n\n }", "function get_height() {\n\t\treturn $this->height;\n\t}", "public function getHeight()\n\t{\n\t\treturn self::getInfo($this->file, 'height');\n\t}", "public function getHeight()\n {\n return $this->i->height;\n }", "public function height() { return $this->_m_height; }", "public function getHeight() { \n list($width, $height) = explode('x', $this->getSize());\n return $height;\n }", "public function height(){\n\t\treturn $this->p_height($this->get_root()); \n\t}", "public function getHeightPixels()\n {\n return $this->height_pixels;\n }", "public function getHeightPixels()\n {\n return $this->height_pixels;\n }", "public function getHeightAttribute()\n {\n if ($this->isImage()) {\n $dimensions = $this->getImageDimensions();\n\n return $dimensions[1];\n }\n }", "public function height()\n {\n\n if (empty($this->height)) {\n\n $this->processGetImageSize();\n\n }\n\n return $this->height;\n\n }", "public function getHeight()\n {\n return $this->isImage() ? $this->imageSize[1] : null;\n }", "public function getHeight()\n\t{\n\t\treturn imagesy($this->image());\n\t}", "public function getHeight()\n {\n return imagesy($this->currentImage);\n }", "public function height()\n {\n return imagesy($this->resource());\n }", "function _plotHeight()\n {\n return (min($this->height(), $this->width())) * 0.80;\n }", "public function height()\n {\n return imagesy($this->image);\n }", "public function getHeight() {\n return imagesy($this->image);\n }", "public function getHeight()\n {\n return $this->attributes->mustHave('height')->asInteger();\n }", "public function getMaxHeight() {\n return $this->maxHeight;\n }", "public function getHeight() {\n if(!$this->getProcessed()) {\n $this->processImage();\n }\n return $this->height;\n }", "public function getMaxHeight()\n {\n return $this->maxHeight;\n }", "public function height()\n {\n return $this->getInterventionImage()->height();\n }", "public function getHeight()\n {\n $imageSizes = $this->getImageSizes();\n return $imageSizes[1];\n }", "public function getHeight();", "public function getHeight();", "public function getHeight();", "public function getHeight();", "public function getHeight();", "public function getElementHeight()\n\t{\n\t\treturn $this->element_height;\n\t}", "public function getHeight()\n {\n return 164;\n }", "public function getHeight()\n {\n return $this->readOneof(2);\n }", "public function getImageHeight()\n {\n if ( empty($this->getData('imageheight')) ) {\n return self::DEFAULT_IMAGE_HEIGHT;\n }\n\n return (int) $this->getData('imageheight');\n }", "public function getImageHeight()\n {\n return $this->image_height;\n }", "private function getGridHeight()\n {\n return $this->height;\n }", "public function getInnerHeight(){\n return $this->getHeight(true, false);\n }", "public function getLineHeight() {\n return $this->lineHeight;\n }", "public function getHeight(): float;", "public function getHeight() {}", "public function getHeightUnit()\n {\n return $this->heightUnit;\n }", "public function getImageHeight()\n {\n if ($this->getData('imageheight') == '') {\n return DEFAULT_IMAGE_HEIGHT;\n }\n return (int)$this->getData('imageheight');\n }", "public function getBoardHeight()\n\t{\n\t\treturn $this->_boardHeight;\n\t}", "public function total_height();", "public function getHeight(): int;", "public function getHeight(): int;", "public function getHeight(): int;", "public function getHeight(){\n return imagesy($this->outputImage);\n }", "public function getImgHeight()\n\t{\n\t\treturn $this->imgHeight;\n\t}", "public function height()\n\t{\n\t\tif ($this->isEmpty) {\n\t\t\treturn -1;\n\t\t}\n\n\t\treturn 1 + $this->max($this->left()->height(), $this->right()->height());\n\t}", "function height()\n {\n return $this->_font->height($this->_text);\n }", "function GetMaximumHeight()\n {\n return $this->MaximumHeight;\n }", "public static function height()\n {\n return static::rows();\n }", "function get_height() {\n //based on image height\n return $this->_height;\n }", "protected function _getImageHeight()\n {\n return imagesy($this->_resource);\n }", "public function getHeight()\n {\n return null;\n }", "public function getHeight(): int\n {\n if ($this->isLeaf()) {\n return 0;\n }\n\n $heights = [];\n\n foreach ($this->getChildren() as $child) {\n $heights[] = $child->getHeight();\n }\n\n return \\max($heights) + 1;\n }", "public function getHeight(){ }", "public function getCurrentLineHeight()\n {\n return $this->size;\n }", "public function getHeightRatio() : float\n {\n return $this->heightRatio;\n }", "public function getImgHeight()\n {\n return $this->strImgHeight;\n }", "private function getMaxHeight() { return $this->maxHeight; }", "public function getBlockHeight()\n {\n return $this->block_height;\n }", "public function height();", "public function height();", "public function getResizeHeight(): int\n {\n return (int)$this->getData(self::RESIZE_HEIGHT);\n }" ]
[ "0.80131054", "0.79957265", "0.79957265", "0.79899997", "0.79899997", "0.79899997", "0.79899997", "0.79899997", "0.79899997", "0.79899997", "0.79899997", "0.79899997", "0.79899997", "0.79899997", "0.79899997", "0.79899997", "0.79899997", "0.79899997", "0.7939392", "0.79324496", "0.78849024", "0.78669095", "0.78292006", "0.7827278", "0.7827278", "0.78240556", "0.7797218", "0.7772297", "0.7748724", "0.77251905", "0.7713175", "0.7713175", "0.76898825", "0.7584402", "0.7558025", "0.7552373", "0.74767554", "0.7466513", "0.7442637", "0.74181", "0.741177", "0.73356396", "0.7333458", "0.7333458", "0.7308417", "0.730015", "0.7256952", "0.7242195", "0.72117007", "0.7211696", "0.7145567", "0.71268886", "0.71057147", "0.70569307", "0.7048596", "0.7047377", "0.7044823", "0.70312244", "0.70057344", "0.69997466", "0.69997466", "0.69997466", "0.69997466", "0.69997466", "0.69897944", "0.6987033", "0.69787544", "0.695362", "0.69401467", "0.6920133", "0.6916157", "0.68915623", "0.6890896", "0.6865563", "0.68486255", "0.6845515", "0.6841981", "0.6839545", "0.6827711", "0.6827711", "0.6827711", "0.67364115", "0.672742", "0.66924745", "0.66910374", "0.6688927", "0.6675789", "0.66729844", "0.6655851", "0.6644417", "0.6640379", "0.66067594", "0.6605341", "0.65926015", "0.6585915", "0.6580512", "0.6579571", "0.65764064", "0.65764064", "0.6571251" ]
0.8363266
0
Factory method to create Image_Graph objects. Used for 'lazy including', i.e. loading only what is necessary, when it is necessary. If only one parameter is required for the constructor of the class simply pass this parameter as the $params parameter, unless the parameter is an array or a reference to a value, in that case you must 'enclose' the parameter in an array. Similar if the constructor takes more than one parameter specify the parameters in an array, i.e Image_Graph::factory('MyClass', array($param1, $param2, &$param3)); Variables that need to be passed by reference must have the & before the variable, i.e: Image_Graph::factory('line', &$Dataset); or Image_graph::factory('bar', array(array(&$Dataset1, &$Dataset2), 'stacked')); Class name can be either of the following: 1 The 'real' Image_Graph class name, i.e. Image_Graph_Plotarea or Image_Graph_Plot_Line 2 Short class name (leave out Image_Graph) and retain case, i.e. Plotarea, Plot_Line not plot_line 3 Class name 'alias', the following are supported: 'graph' = Image_Graph 'plotarea' = Image_Graph_Plotarea 'line' = Image_Graph_Plot_Line 'area' = Image_Graph_Plot_Area 'bar' = Image_Graph_Plot_Bar 'pie' = Image_Graph_Plot_Pie 'radar' = Image_Graph_Plot_Radar 'step' = Image_Graph_Plot_Step 'impulse' = Image_Graph_Plot_Impulse 'dot' or 'scatter' = Image_Graph_Plot_Dot 'smooth_line' = Image_Graph_Plot_Smoothed_Line 'smooth_area' = Image_Graph_Plot_Smoothed_Area 'dataset' = Image_Graph_Dataset_Trivial 'random' = Image_Graph_Dataset_Random 'function' = Image_Graph_Dataset_Function 'vector' = Image_Graph_Dataset_VectorFunction 'category' = Image_Graph_Axis_Category 'axis' = Image_Graph_Axis 'axis_log' = Image_Graph_Axis_Logarithmic 'title' = Image_Graph_Title 'line_grid' = Image_Graph_Grid_Lines 'bar_grid' = Image_Graph_Grid_Bars 'polar_grid' = Image_Graph_Grid_Polar 'legend' = Image_Graph_Legend 'font' = Image_Graph_Font 'ttf_font' = Image_Graph_Font 'Image_Graph_Font_TTF' = Image_Graph_Font (to maintain BC with Image_Graph_Font_TTF) 'gradient' = Image_Graph_Fill_Gradient 'icon_marker' = Image_Graph_Marker_Icon 'value_marker' = Image_Graph_Marker_Value
Фабричный метод для создания объектов Image_Graph. Используется для 'ленивой вставки', то есть загрузки только необходимого, когда это необходимо. Если для конструктора класса требуется только один параметр, просто передайте этот параметр как $params, за исключением случая, когда параметр является массивом или ссылкой на значение, в таком случае параметр должен быть помещен в массив. Аналогично, если конструктор принимает более одного параметра, укажите параметры в массиве, например: Image_Graph::factory('MyClass', array($param1, $param2, &$param3)); Переменные, которые необходимо передать по ссылке, должны иметь перед названием символ &, например: Image_Graph::factory('line', &$Dataset); или Image_Graph::factory('bar', array(array(&$Dataset1, &$Dataset2), 'stacked')); Имя класса может быть следующим: 1 'Реальное' имя класса Image_Graph, например, Image_Graph_Plotarea или Image_Graph_Plot_Line 2 Короткое имя класса (исключите Image_Graph) и сохраните регистр, например, Plotarea, Plot_Line, а не plot_line 3 Имя класса 'алиас', поддерживаются следующие: 'graph' = Image_Graph 'plotarea' = Image_Graph_Plotarea 'line' = Image_Graph_Plot_Line 'area' = Image_Graph_Plot_Area 'bar' = Image_Graph_Plot_Bar 'pie' = Image_Graph_Plot_Pie 'radar' = Image_Graph_Plot_Radar 'step' = Image_Graph_Plot_Step 'impulse' = Image_Graph_Plot_Impulse 'dot' или 'scatter' = Image_Graph_Plot_Dot 'smooth_line' = Image_Graph_Plot_Smoothed_Line 'smooth_area' = Image_Graph_Plot_Smoothed_Area 'dataset' = Image_Graph_Dataset_Trivial 'random' = Image_Graph_Dataset_Random 'function' = Image_Graph_Dataset_Function 'vector' = Image_Graph_Dataset_VectorFunction 'category' = Image_Graph_Axis_Category 'axis' = Image_Graph_Axis 'axis_log' = Image_Graph_Axis_Logarithmic 'title' = Image_Graph_Title 'line_grid' = Image_Graph_Grid_Lines 'bar_grid' = Image_Graph_Grid_Bars 'polar_grid' = Image_Graph_Grid_Polar 'legend' = Image_Graph_Legend 'font' = Image_Graph_Font 'ttf_font' = Image_Graph_Font 'Image_Graph_Font_TTF' = Image_Graph_Font (для поддержания обратной совместимости с Image_Graph_Font_TTF) 'gradient' = Image_Graph_Fill_Gradient 'icon_marker' = Image_Graph_Marker_Icon 'value_marker' = Image_Graph_Marker_Value
function &factory($class, $params = null) { static $Image_Graph_classAliases = array( 'graph' => 'Image_Graph', 'plotarea' => 'Image_Graph_Plotarea', 'line' => 'Image_Graph_Plot_Line', 'area' => 'Image_Graph_Plot_Area', 'bar' => 'Image_Graph_Plot_Bar', 'smooth_line' => 'Image_Graph_Plot_Smoothed_Line', 'smooth_area' => 'Image_Graph_Plot_Smoothed_Area', 'pie' => 'Image_Graph_Plot_Pie', 'radar' => 'Image_Graph_Plot_Radar', 'step' => 'Image_Graph_Plot_Step', 'impulse' => 'Image_Graph_Plot_Impulse', 'dot' => 'Image_Graph_Plot_Dot', 'scatter' => 'Image_Graph_Plot_Dot', 'dataset' => 'Image_Graph_Dataset_Trivial', 'random' => 'Image_Graph_Dataset_Random', 'function' => 'Image_Graph_Dataset_Function', 'vector' => 'Image_Graph_Dataset_VectorFunction', 'category' => 'Image_Graph_Axis_Category', 'axis' => 'Image_Graph_Axis', 'axis_log' => 'Image_Graph_Axis_Logarithmic', 'title' => 'Image_Graph_Title', 'line_grid' => 'Image_Graph_Grid_Lines', 'bar_grid' => 'Image_Graph_Grid_Bars', 'polar_grid' => 'Image_Graph_Grid_Polar', 'legend' => 'Image_Graph_Legend', 'font' => 'Image_Graph_Font', 'ttf_font' => 'Image_Graph_Font', 'Image_Graph_Font_TTF' => 'Image_Graph_Font', // BC with Image_Graph_Font_TTF 'gradient' => 'Image_Graph_Fill_Gradient', 'icon_marker' => 'Image_Graph_Marker_Icon', 'value_marker' => 'Image_Graph_Marker_Value' ); if (substr($class, 0, 11) != 'Image_Graph') { if (isset($Image_Graph_classAliases[$class])) { $class = $Image_Graph_classAliases[$class]; } else { $class = 'Image_Graph_' . $class; } } include_once str_replace('_', '/', $class) . '.php'; $obj = null; if (is_array($params)) { switch (count($params)) { case 1: $obj =& new $class( $params[0] ); break; case 2: $obj =& new $class( $params[0], $params[1] ); break; case 3: $obj =& new $class( $params[0], $params[1], $params[2] ); break; case 4: $obj =& new $class( $params[0], $params[1], $params[2], $params[3] ); break; case 5: $obj =& new $class( $params[0], $params[1], $params[2], $params[3], $params[4] ); break; case 6: $obj =& new $class( $params[0], $params[1], $params[2], $params[3], $params[4], $params[5] ); break; case 7: $obj =& new $class( $params[0], $params[1], $params[2], $params[3], $params[4], $params[5], $params[6] ); break; case 8: $obj =& new $class( $params[0], $params[1], $params[2], $params[3], $params[4], $params[5], $params[6], $params[7] ); break; case 9: $obj =& new $class( $params[0], $params[1], $params[2], $params[3], $params[4], $params[5], $params[6], $params[7], $params[8] ); break; case 10: $obj =& new $class( $params[0], $params[1], $params[2], $params[3], $params[4], $params[5], $params[6], $params[7], $params[8], $params[9] ); break; default: $obj =& new $class(); break; } } else { if ($params == null) { $obj =& new $class(); } else { $obj =& new $class($params); } } return $obj; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public function Factory($className,$parameters=null);", "abstract public function createGraph();", "final public static function factory($params = null)\n\t{\n\t\t$instance = new static();\n\t\t\n\t\tif ($params and is_array($params))\n\t\t{\n\t\t\tforeach ($params as $key => $param)\n\t\t\t{\n\t\t\t\tis_string($key) and $instance->$key = $param;\n\t\t\t}\n\t\t}\n\t\treturn $instance;\n\t}", "protected function loadFactory(?array $params=[])\n {\n if (is_array($params) && !empty($params['class']) && class_exists($params['class'])) {\n $factory = new $params['class']($params['options'] ?? []);\n $this->getLogger()->debug('Factory created',['factory'=>$factory]);\n\n return $factory;\n } else {\n $this->getLogger()->error('Factory not found',['params'=>$params]);\n\n }\n\n return null;\n }", "public function factory();", "function __construct($params)\n {\n }", "function __construct($params)\n {\n }", "public function __construct($params)\n\t{\n\t\t\n\t}", "public static function create( $parameters ){\n static $instance = null;\n if ($instance === null) {\n $instance = new Image();\n $instance->urlBuilder = new UrlBuilder( $parameters, Config::get('clem.feed.steam::api.urltemplates.app_image') );\n } else {\n $instance->urlBuilder->reconstruct( $parameters, Config::get('clem.feed.steam::api.urltemplates.app_image') );\n }\n return $instance->urlBuilder->getUrl();\n }", "public function instance($class, $params = array());", "public function factory($params = array())\n {\n return $this->connector->factory($params); // Get new unknown connection\n }", "public function __construct($params = array())\n {\n }", "public static function create(array $parameters = array());", "public function __construct($graph)\n\t{\n\t\t$this->graph = $graph;\n\t}", "function __construct($numNodes, $numEdges,$img,$ext) {\n\t\t$this->graph = new Graph($numNodes, $numEdges);\n\t\t$this->edgeNum = 0;\n\t\t$this->totalFlow = 0;\n\t\t$this->maxflowIteration = 0;\n\t\t$this->activeQueueFirst = array(null,null);\n\t\t$this->activeQueueLast = array(null,null);\n\t\t$this->orphans = new SplDoublyLinkedList();\n\t\t$this->img_name = $img;\n\t\t$this->ext = $ext;\n\t}", "function __construct(array $params)\n {\n parent::__construct($params);\n \n $this->scheduled = Checks::checkDateTime(Checks::checkParam($params, \"scheduled\"));\n $this->type = Checks::checkParam($params, \"type\");\n $this->payment = Checks::checkParam($params, \"payment\");\n\n $subResourceByType = array(\n \"brcode-payment\" => function ($array) { return new BrcodePreview($array); },\n \"boleto-payment\" => function ($array) { return new BoletoPreview($array); },\n \"tax-payment\" => function ($array) { return new TaxPreview($array); },\n \"utility-payment\" => function ($array) { return new UtilityPreview($array); }\n );\n\n if (array_key_exists($this->type, $subResourceByType)) {\n $this->payment = API::fromApiJson($subResourceByType[$this->type], $this->payment);\n }\n\n Checks::checkParams($params);\n }", "public function instantiate($class, $params = array());", "public static function create(...$params)\n {\n return new static(...$params);\n }", "public function __construct( array $params = [] )\n\t{\n\t\t$required = array( 'type', 'internaltype', 'code', 'internalcode', 'label' );\n\n\t\tforeach( $required as $entry )\n\t\t{\n\t\t\tif ( !isset($params[$entry]) ) {\n\t\t\t\tthrow new \\Aimeos\\MW\\Common\\Exception( sprintf('Required parameter \"%1$s\" is missing', $entry) );\n\t\t\t}\n\t\t}\n\n\t\t$this->code = (string) $params['code'];\n\t\t$this->internalType = (string) $params['internaltype'];\n\t\t$this->internalCode = $params['internalcode'];\n\t\t$this->label = (string) $params['label'];\n\t\t$this->type = (string) $params['type'];\n\n\t\tif( isset( $params['default'] ) ) {\n\t\t\t$this->default = $params['default'];\n\t\t}\n\n\t\tif( isset( $params['internaldeps'] ) ) {\n\t\t\t$this->internalDeps = $params['internaldeps'];\n\t\t}\n\n\t\tif( isset( $params['function'] ) ) {\n\t\t\t$this->func = $params['function'];\n\t\t}\n\n\t\tif( isset( $params['public'] ) ) {\n\t\t\t$this->public = (bool) $params['public'];\n\t\t}\n\n\t\tif( isset( $params['required'] ) ) {\n\t\t\t$this->required = (bool) $params['required'];\n\t\t}\n\t}", "public function __construct($params = NULL)\n\t{\n\t $this->setParams($params);\n\t}", "public function newInstance();", "public function newInstance();", "final static function factory($driver, $image, array $options=array()) {\n $class = __NAMESPACE__ . \"\\\\image_$driver\";\n return new $class($image, $options);\n }", "function __construct( $params )\n {\n $this->params = $params;\n }", "abstract public function getFactory();", "abstract protected function getFactory();", "public function construct($class, $parameters = []);", "public function createImage()\n {\n $graph = new Graph\\PieGraph(510, 360);\n $graph->title->Set(\"A Simple Pie Plot\");\n $graph->title->SetFont(FF_ARIAL, FS_NORMAL, 16);\n $graph->title->SetMargin(20);\n //$graph->SetBox(true, [255,0,0]);\n\n $data = array(40, 21, 17, 14, 23);\n $p1 = new Plot\\PiePlot($data);\n //$p1->ShowBorder();\n $p1->SetColor('black');\n $p1->SetSliceColors(array('#1E90FF', '#2E8B57', '#ADFF2F', '#ff0000', '#BA55D3'));\n $p1->title->SetFont(FF_ARIAL, FS_NORMAL, 20);\n\n $graph->Add($p1);\n return $graph->Stroke();\n// return $graph;\n }", "public function __construct($params = array('title'=> null,'filename'=> null,'user'=> null,'id'=> null,'season' => null,'description' => null)) {\n\t\tparent::__construct($params);\n\n\t\t//fetch params from array\n\t\t$this->title = $params['title'];\n\t\t$this->filename = $params['filename'];\n\t\t$this->user = $params['user'];\n\t\t$this->id = $params['id'];\n\t\t$this->season = $params['season'];\n\t\t$this->description = $params['description'];\n\n\t\t//if the filename is an actual file, get EXIF-info\n\t\tif (file_exists($this->filename)){\n\t\t\t$this->exif_getLatLon($this->filename);\n\t\t}\n\t}", "public static function init($params = null)\n {\n $class = static::class;\n if (isset(self::$instances[$class])) {\n if (!empty($params)) {\n self::refreshParam($class, $params);\n }\n return self::$instances[$class];\n }\n\n if (empty($params)) {\n self::newClassWithoutParam($class);\n } else {\n self::newClassWithParam($class, $params);\n }\n\n return self::$instances[$class];\n }", "public function __construct($params) {\n $this->params = $params;\n }", "public function __construct($params = null) {\n $this->load($params);\n }", "abstract public static function create();", "public function __construct($params)\n {\n $this->params = $params;\n }", "public function __construct($params)\n {\n $this->params = $params;\n }", "public function __construct($params)\n {\n $this->params = $params;\n }", "public function __construct($deps, $params)\n {\n parent::__construct($deps, $params);\n\n }", "public function create($params)\n {\n throw new NotImplementedException();\n }", "public static function factory(array $params=array())\r\n {\r\n /*\r\n * Use late static binding to create an instance of the\r\n * proper concrete class\r\n */\r\n $instance = new static($params);\r\n\r\n if (array_key_exists('logger', $params)) {\r\n if ($params['logger'] instanceof LoggerInterface) {\r\n $instance->setLogger($params['logger']);\r\n } else {\r\n throw new InvalidArgumentException('Invalid logger');\r\n }\r\n }\r\n\r\n return $instance;\r\n }", "public function __construct($params)\n {\n ci()->load->model('comments/comment_m');\n ci()->load->model('comments/comment_blacklists_m');\n ci()->lang->load('comments/comments');\n \n ci()->load->library('trends/trends');\n\n // This shouldnt be required if static loading was possible, but its not in CI\n if (is_array($params)) {\n // Required\n $this->module = $params['module'];\n $this->singular = $params['singular'];\n $this->plural = $params['plural'];\n\n // Overridable\n $this->entry_uri = isset($params['uri']) ? $params['uri'] : uri_string();\n\n // Optional\n isset($params['entry_id']) and $this->entry_id = $params['entry_id'];\n isset($params['entry_title']) and $this->entry_title = $params['entry_title'];\n }\n }", "function create($params)\n {\n }", "function Graph($aWidth = 300, $aHeight = 200, $aCachedName = \"\", $aTimeOut = 0, $aInline = true)\n {\n GLOBAL $gJpgBrandTiming;\n // If timing is used create a new timing object\n if ($gJpgBrandTiming) {\n global $tim;\n $tim = new JpgTimer();\n $tim->Push();\n }\n\n if (!is_numeric($aWidth) || !is_numeric($aHeight)) {\n JpGraphError::RaiseL(25008);//('Image width/height argument in Graph::Graph() must be numeric');\n }\n\n // Automatically generate the image file name based on the name of the script that\n // generates the graph\n if ($aCachedName == \"auto\")\n $aCachedName = GenImgName();\n\n // Should the image be streamed back to the browser or only to the cache?\n $this->inline = $aInline;\n\n $this->img = new RotImage($aWidth, $aHeight);\n\n $this->cache = new ImgStreamCache($this->img);\n $this->cache->SetTimeOut($aTimeOut);\n\n $this->title = new Text();\n $this->title->ParagraphAlign('center');\n $this->title->SetFont(FF_FONT2, FS_BOLD);\n $this->title->SetMargin(3);\n $this->title->SetAlign('center');\n\n $this->subtitle = new Text();\n $this->subtitle->ParagraphAlign('center');\n $this->subtitle->SetMargin(2);\n $this->subtitle->SetAlign('center');\n\n $this->subsubtitle = new Text();\n $this->subsubtitle->ParagraphAlign('center');\n $this->subsubtitle->SetMargin(2);\n $this->subsubtitle->SetAlign('center');\n\n $this->legend = new Legend();\n $this->footer = new Footer();\n\n // Window doesn't like '?' in the file name so replace it with an '_'\n $aCachedName = str_replace(\"?\", \"_\", $aCachedName);\n\n // If the cached version exist just read it directly from the\n // cache, stream it back to browser and exit\n if ($aCachedName != \"\" && READ_CACHE && $aInline)\n if ($this->cache->GetAndStream($aCachedName)) {\n exit();\n }\n\n $this->cache_name = $aCachedName;\n $this->SetTickDensity(); // Normal density\n\n $this->tabtitle = new GraphTabTitle();\n }", "function initGraph()\n {\n $isValidFile = ($this->sourceType == \"file\" && file_exists(trim($this->source)));\n\n if($isValidFile)\n {\n $this->getGraphFromFile($this->source);\n }\n elseif($this->sourceType == \"DB\")\n {\n $this->getGraphFromDb($this->source);\n }\n else\n {\n die(\"Invalid Information\");\n }\n\n }", "public function __construct($params = array())\n\t{\n\t\tparent::__construct();\n\t\t$this->initialize($params);\n\t}", "public function __construct($params = array()) {\r\n\t\tforeach ($params as $p => $val) $this->$p = $val;\r\n\t}", "abstract protected function createInstance();", "public static function create($params = null, $options = null);", "public function Create($type, $params = NULL) {\n if (array_key_exists($type, $this->options['classmap'])) {\n $class = $this->options['classmap'][$type];\n $reflectionClass = new ReflectionClass($class);\n if (isset($params)) {\n if (MapUtils::IsMap($params)) {\n $params = MapUtils::MapToMethodParameters($params,\n $reflectionClass->getConstructor());\n }\n return $reflectionClass->newInstanceArgs($params);\n } else {\n return $reflectionClass->newInstance();\n }\n } else {\n trigger_error('Unknown type: ' . $type, E_USER_ERROR);\n }\n }", "public function __construct(array $params = [])\n {\n if (!empty($params)) {\n $this->hydrater($params);\n }\n }", "public function __construct(Array $graph){\n $this->graph = $graph;\n }", "public function __construct( Array $params = array() )\r\n\t{\r\n\t\t$this->params\t= $params;\r\n\t\t$this->setup();\r\n\t}", "final public function __construct(Array $params = array()){\n \n $this->Namespace = get_called_class();\n $calledClass = explode(\"\\\\\",$this->Namespace);\n $this->ModuleName = $calledClass[2];\n $this->ControllerName = $calledClass[4];\n \n $this->setParams($params); \n\n /**\n * Load the config \n */\n $this->loadConfig();\n \n /**\n * Load the view \n */\n $this->loadView();\n \n /**\n * Load the Paginator \n */\n $this->loadPaginator();\n\n /**\n * Execute the main \n */\n $this->main();\n\n }", "public function __construct(AbstractGraph $graph)\n\t\t{\n\t\t\t$this->graph = $graph;\n\t\t}", "public function __construct($params = null)\n {\n if (null !== $params) {\n $this->setParams($params);\n }\n }", "public function __construct($image) {\n\t\t$image_info = getimagesize($image);\n\t\t$type = $image_info[2];\n\n\t\t// Set image with the data to either a PNG or a JPEG\n\t\tif ($type == IMAGETYPE_JPEG) {\n\t\t\t$this->image = imagecreatefromjpeg($image);\n\t\t}\n\t\telseif ($type == IMAGETYPE_PNG) {\n\t\t\t$this->image = imagecreatefrompng($image);\n\t\t}\n\t\t// If the image is not a PNG or a JPEG, die\n\t\telse {\n\t\t\tdie('Image is not in JPEG or PNG format');\n\t\t}\n\n\t}", "public function __construct(GraphInterface $graph, $state, $data)\n {\n $this->graph = $graph;\n $this->state = $state;\n $this->data = $data;\n }", "public function getFactory();", "public function __construct($params)\n {\n $this->data = $params;\n }", "public function __construct($params = null)\n\t{\n\n\t\tif ($params) {\n\t\t\t$this->_setData($params);\n\t\t}\n\n\t\tparent::__construct();\n\t}", "public function __construct($params = array())\r\n {\r\n $this->config = array(\r\n 'inputFile' => 'data/hotels.csv',\r\n 'outputFileName' => 'hotels',\r\n 'convertToFormat' => 'all', //'all' as all available formats\r\n //'sortBy' => 'stars'\r\n );\r\n\r\n // Merge passed in params with defaults for config.\r\n $this->config = array_merge($this->config, $params);\r\n\r\n if (!isset($this->config['inputFile'])) {\r\n throw new Exception('FileDataConverter Class missing \"inputFile\" parameter.');\r\n }\r\n\r\n $this->fileReader = new CSVFileReader();\r\n \r\n }", "public function __construct($params = array()) {\n\t\tUtils::debugTrace(__FILE__.\":\".__FUNCTION__.\":[\".__LINE__.\"]\", start);\n\t\tself::$_ORMID++;\n\t\t\n\t\t// -----------------------------------------------\n\t\t// Establish Connection and Merge Parameters\n\t\t// -----------------------------------------------\n\t\t$this->_processConnection($params);\n\t\t\n\t\t// ---------------------------------------------------------------------------\n\t\t// Perform all initialization in a private method that can be used elsewhere\n\t\t// ---------------------------------------------------------------------------\n\t\t$this->_initParams($params);\n\t\t\n\t\t// ----------------------------------------------------------------------------------\n\t\t// If we have an object target and conditions of selection then execute\n\t\t// OR if we recieved a SQL override, using only the functionality of the object\n\t\t// We want only execute when executable conditions exists\n\t\t// ----------------------------------------------------------------------------------\n\t\tif ((isset($this->_conditions) && isset($this->_object))\n\t\t\t\t|| (isset($this->_conditions) && isset($this->_object))\n\t\t\t\t|| ((isset($this->_select) && isset($this->_object)) || isset($this->_select))\n\t\t\t\t|| isset($this->_fetchStmt)\n\t\t\t\t|| isset($this->_join)\n\t\t\t\t|| (isset($params[0]) && $params[0]==\"select-all\" && isset($this->_object))){\n\t\t\t\t\t// Fetch the object if criteria provided\n\t\t\t\t\t$this->_Fetch();\n\t\t}\n\t\t\n\t\tUtils::debugTrace(__FILE__.\":\".__FUNCTION__.\":[\".__LINE__.\"]\", end);\n\t\treturn;\n\t}", "public static function create($params, $publickey = null, $secretkey = null)\n {\n return parent::g_create(get_class(), self::getUrl(), $params, $publickey, $secretkey);\n }", "public function __construct(array $params)\n {\n $this->dateTo = isset($params['dateTo']) ? $params['dateTo'] : '';\n $this->dateFrom = isset($params['dateFrom']) ? $params['dateFrom'] : '';\n $this->description = isset($params['description']) ? $params['description'] : '';\n\n if (isset($params['convertedPrice'])) {\n $this->ConvertedPrice = new Price($params['convertedPrice']);\n }\n\n if (isset($params['price'])) {\n $this->Price = new Price($params['price']);\n }\n }", "public function newClass(array $params = []) {\n $class = new ReflectionClass($this->getClass());\n return $class->newInstanceArgs($params);\n }", "public function __construct(array $params = [])\n {\n $this->setDriver($params);\n }", "public function __construct(array $parameters) {}", "protected function _render($params) {\n \t// initialize the chart class \n\t\t$plot = new Faett_Piwik_Chart();\n\t\t// if TrueType fonts should be used set the magento default TTF\n\t\tif (Mage::getStoreConfig('piwik/piwik_chart/ttf')) {\n\t\t\t$plot->SetDefaultTTFont('lib/LinLibertineFont/LinLibertine_It-2.8.2.ttf');\n\t\t} else {\n\t\t\t$plot->SetFontGD('x_label', 2);\n\t\t\t$plot->SetFontGD('y_label', 2);\n \t}\n \t// set the data\n\t\t$plot->SetDataValues($params);\n\t\t// render and return the chart as image\n\t\treturn $plot->DrawGraph();\n }", "public function __construct() {\n $numargs = func_num_args();\n if($numargs == 1){\n $this->constructById(func_get_arg(0));\n }\n elseif($numargs == 2){\n $this->constructByInput(func_get_arg(0), func_get_arg(1));\n }\n else{\n throw new \\InvalidArgumentException('Incorrect number of arguments');\n }\n }", "function __construct($params) {\n if (is_array($params)) {\n foreach ($params as $key => $val) {\n $this->$key = $val;\n }\n }\n log_message('debug', 'Database Driver Class Initialized');\n }", "public function __construct(array $params)\n {\n $this->params = $params;\n }", "public function __construct(array $params)\n {\n $this->params = $params;\n }", "public function __construct(array $params)\n {\n $this->params = $params;\n }", "public function __construct()\n {\n // Default configuration\n $this->definitionManager = new DefinitionManager();\n $this->definitionManager->useReflection(true);\n $this->definitionManager->useAnnotations(true);\n\n // Default factory\n $this->factory = new Factory($this);\n }", "abstract protected function create();", "public function testInstantiation()\n {\n $this->assertInstanceOf('Contao\\ImagineSvg\\Image', new Image(new \\DOMDocument(), new MetadataBag()));\n }", "public function __construct(NodeFactory $nodeFactory, array $data);", "public function __construct($params = [])\n {\n $this->params = $params;\n }", "public function __construct($params = array())\n {\n $this->_params = $params;\n $this->_connect();\n }", "abstract function create();", "public function __construct($params = array())\n {\n $this->_params = $params;\n }", "public function __construct($aParams = array())\n\t{\n\t\tif (!$this->_oObject)\n\t\t{\n\t\t\t$sCdn = (Phpfox::getParam('core.cdn_service') == '' ? 's3' : Phpfox::getParam('core.cdn_service'));\n\t\t\t\n\t\t\t$this->_oObject = Phpfox::getLib('phpfox.cdn.module.' . $sCdn, $aParams);\n\t\t}\n\t}", "function factory($driver, $params = array())\n {\n if (is_array($driver)) {\n $app = $driver[0];\n $driver = $driver[1];\n }\n\n $driver = basename($driver);\n if (empty($driver) || $driver == 'none') {\n return new Horde_Cache($params);\n }\n\n if (!empty($app)) {\n include_once $app . '/lib/Cache/' . $driver . '.php';\n } elseif (file_exists(dirname(__FILE__) . '/Cache/' . $driver . '.php')) {\n include_once dirname(__FILE__) . '/Cache/' . $driver . '.php';\n } else {\n include_once 'Horde/Cache/' . $driver . '.php';\n }\n\n $class = 'Horde_Cache_' . $driver;\n if (class_exists($class)) {\n $cache = new $class($params);\n } else {\n $cache = PEAR::raiseError('Class definition of ' . $class . ' not found.');\n }\n\n return $cache;\n }", "function __construct($engine, $params)\n {\n }", "public static function create(array $params)\n {\n return parent::_create(self::getResourceName(), $params);\n }", "abstract public function create();", "abstract public function create();", "abstract public function create();", "abstract public function create();", "abstract public function create();", "public function __construct( $parameters ) {\n\t}", "public function __construct($params)\n {\n if ($this->db === null) {\n $this->connect($params);\n }\n \n return $this->getInstance();\n }", "public function __construct(array $params)\n {\n $this->type = isset($params['type']) ? $params['type'] : '';\n $this->originalCurrency = isset($params['originalCurrency']) ? $params['originalCurrency'] : '';\n\n if (isset($params['price'])) {\n $this->Price = new Price($params['price']);\n } else {\n $this->Price = new Price([]);\n }\n }", "public function __construct($params = array())\n {\n self::$instance =& $this;\n\n // get the CodeIgniter super-object\n $this->CI =& get_instance();\n\n // init session\n $this->init_session();\n\n // load botdetect captcha library\n BDCI_LibraryLoader::load();\n\n // change the keys in $param array to lowercase,\n // this will avoid user being able to pass in a lowercase option (e.g. captchaconfig)\n $params = array_change_key_case($params, CASE_LOWER);\n\n if (empty($params) ||\n !array_key_exists('captchaconfig', $params) ||\n empty($params['captchaconfig'])\n ) {\n $error_message = 'The BotDetect Captcha library requires you to declare \"captchaConfig\" option and assigns a captcha configuration key defined in config/captcha.php file.<br>';\n $error_message .= '';\n throw new InvalidArgumentException($error_message);\n }\n\n $captcha_id = $params['captchaconfig'];\n\n // get captcha config\n $config = BDCI_UserCaptchaConfiguration::get($captcha_id);\n\n if (null === $config) {\n throw new InvalidArgumentException(sprintf('The \"%s\" option could not be found in config/captcha.php file.', $captcha_id));\n }\n\n if (!is_array($config)) {\n throw new InvalidArgumentException(sprintf('Expected argument of type \"array\", \"%s\" given', gettype($config)));\n }\n\n // save user's captcha configuration options\n BDCI_UserCaptchaConfiguration::save($config);\n \n // init botdetect captcha instance\n $this->init_captcha($config);\n }", "public function __construct(array $parameters)\n\t{\n\t}", "function __construct($params = array())\n {\n parent::__construct($params);\n $this->_connect();\n }", "private function __construct() {\n $jpgIO = new JpgImageIO();\n\n $this->io = array(\n 'gif' => new GifImageIO(),\n 'jpeg' => $jpgIO,\n 'jpg' => $jpgIO,\n 'png' => new PngImageIO(),\n );\n }", "public function build(string $name, array $params): FilterInterface\n {\n $class = $this->getFilterClass($name);\n $arguments = $this->makeConstructorArguments($class, $params);\n\n return new $class(...$arguments);\n }", "function __construct($config, $params) {\n\t\t$this->config = $config;\n\t\t$this->params = $params;\n\t}", "public function __construct()\n {\n $config = PHPImageOptimConfig::$config;\n\n $classArr = explode('\\\\', get_class($this));\n $class = end($classArr);\n $this->config = !empty($config['libs'][$class]) ? $config['libs'][$class] : [];\n\n if(!empty($binary = $this->config['binary']))\n {\n $this->setBinaryPath($binary);\n }\n }", "function __construct($params = array()){\n self::initialize();\n $this->populate($params, true);\n }" ]
[ "0.6161147", "0.6131616", "0.58143365", "0.57970476", "0.5699492", "0.56039464", "0.56039464", "0.55858356", "0.55837494", "0.55835557", "0.55738026", "0.5454627", "0.5450692", "0.54383504", "0.54382384", "0.5437166", "0.54169315", "0.5410768", "0.53892905", "0.5386972", "0.53564566", "0.53564566", "0.53317165", "0.5316913", "0.5297303", "0.52964836", "0.52913284", "0.52853847", "0.52794313", "0.52789915", "0.5277625", "0.5255334", "0.5229347", "0.52236176", "0.52236176", "0.52236176", "0.5222981", "0.5209695", "0.5199578", "0.5198377", "0.51838005", "0.5183654", "0.5181691", "0.5177415", "0.5169251", "0.51686686", "0.5166446", "0.5160228", "0.5159784", "0.51475024", "0.51464236", "0.5132278", "0.51312906", "0.51287264", "0.51153266", "0.510756", "0.51067525", "0.51030076", "0.51025116", "0.5093347", "0.5089436", "0.5084294", "0.5078096", "0.5069103", "0.5068955", "0.5057409", "0.505491", "0.5045424", "0.50438267", "0.50397", "0.50397", "0.50397", "0.50297487", "0.5028053", "0.5024665", "0.5020633", "0.50190055", "0.50139284", "0.501287", "0.5010155", "0.5010066", "0.5008869", "0.50077593", "0.4997108", "0.49959686", "0.49959686", "0.49959686", "0.49959686", "0.49959686", "0.49953443", "0.49891093", "0.49865758", "0.49842557", "0.49767634", "0.49763626", "0.49702248", "0.49691632", "0.49655008", "0.49557766", "0.49500856" ]
0.8048125
0
Preppend a load path. Directories at the beginning of the load path have precedence over subsequent directories. Theese paths are used for expand relative paths to absolute paths.
Предварительно добавить путь загрузки. Директории в начале пути загрузки имеют приоритет над последующими директориями. Эти пути используются для разрешения относительных путей в абсолютные.
public function preppendPath($path) { $this->_addPath($path, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function preppendLoadPath($path)\n\t{\n\t\t$this->_fs->preppendPath($path);\n\t}", "public function appendLoadPath($path)\n\t{\n\t\t$this->_fs->appendPath($path);\n\t}", "protected function loadPaths()\n {\n $this->cmd = str_replace('{prefix}', $this->prefix, $this->cmd);\n $this->pidfile = str_replace('{prefix}', $this->prefix, $this->pidfile);\n if (empty($this->cmd) || empty($this->pidfile)) {\n $this->outLine('Error: override cmd and pidfile in source');\n exit();\n }\n }", "public function prependPath(string $path): void\n {\n $this->addPath($path, true);\n }", "private function _prepend($path)\n {\n if ($path[0] == '/') {\n return $this->_uri . $path;\n } else {\n return $this->_uri . $this->_pathprepend . '/' . $path;\n }\n }", "protected function add_preload_rest_paths() {\n\t\t$paths = [\n\t\t\t'/amp/v1/options',\n\t\t\t'/amp/v1/reader-themes',\n\t\t\t'/wp/v2/settings',\n\t\t\t'/wp/v2/users/me',\n\t\t];\n\n\t\tforeach ( $paths as $path ) {\n\t\t\t$this->rest_preloader->add_preloaded_path( $path );\n\t\t}\n\t}", "protected function prependPath($basePath, array &$paths)\n {\n $basePath = substr($basePath, 0, strrpos($basePath, '/') + 1);\n\n array_walk_recursive(\n $paths,\n function (&$localPath) use ($basePath) {\n $localPath = $basePath . $localPath;\n }\n );\n }", "public function setPhantomLoader($path);", "public function prepend($path, $data = '');", "public function prepend($path, $data);", "private function loadPath(string $path): void\n {\n // we'll load all files in it\n if (is_dir($path)) {\n $this->loadDir($path);\n\n return;\n }\n\n if (strpos($path,'.php') === false)\n return;\n\n if ($this->checkIgnore($path)) {\n echo \"[Preloader] IGNORED `{$path}`\" . PHP_EOL;\n return;\n }\n\n // Otherwise we'll just load this one file\n $this->loadFile($path);\n }", "protected function loadPath()\n {\n }", "public function prependLocation($location)\n {\n array_unshift($this->paths, $this->resolvePath($location));\n }", "public function prepend($path, $contents);", "public static function prepend($path, $data){\n\t\treturn \\Illuminate\\Filesystem\\Filesystem::prepend($path, $data);\n\t}", "public function setAutoloadPath($path = '');", "private function loadDirectorys() {\n $aPathWithClass = explode(self::BACKSLASH_SEPARATOR, $this->namespace);\n array_pop($aPathWithClass);\n\n foreach ($aPathWithClass as $dir) {\n $this->addDirectory($dir);\n }\n }", "function flexihash_unshift_include_path($items)\n{\n\t$elements = explode(PATH_SEPARATOR, get_include_path());\n\n\tif (is_array($items))\n\t{\n\t\tset_include_path(implode(PATH_SEPARATOR, array_merge($items, $elements)));\n\t}\n\telse\n\t{\n\t\tarray_unshift($elements, $items);\n\t\tset_include_path(implode(PATH_SEPARATOR, $elements));\n\t}\n}", "public function setImportPath($path=null)\n {\n $this->importPath = ($path && $path !== '.' && $path !== './') ? $path : \"\";\n }", "public function addPath($path, $prepend = false)\n {\n foreach ($this->engines as $engine) {\n $engine->addPath($path, $prepend);\n }\n }", "public function loadDirectory($path)\n {\n //\n }", "public static function addPath($path) {\n\t\tset_include_path(get_include_path() . PS . realpath($path));\n\t}", "public function add_path($path = '', $namespace = '__main__', $prepend = FALSE)\n\t{\n\t\ttry \n\t\t{\n\t\t\tif (! is_a($this->_loader, 'Twig_Loader_Filesystem')) \n\t\t\t{\n\t\t\t\tthrow new Exception('Loader not set correctly.');\n\t\t\t}\n\t\t\t# Checking if directory path exist\n\t\t\t$absolute_path = str_replace('//', '/', realpath(rtrim($path, '/').'/'));\n\t\t\tif (! file_exists($path)) \n\t\t\t{\n\t\t\t\tthrow new Exception(\"{$path} currently not exist.\");\n\t\t\t}\n\t\t} \n\t\tcatch (Exception $e) \n\t\t{\n\t\t\t$this->_show_error($e->getMessage());\n\t\t}\n\t\t# Prepend or append?\n\t\t($prepend !== FALSE)? \n\t\t\t$this->_loader->prependPath($absolute_path, $namespace):\n\t\t\t$this->_loader->addPath($absolute_path, $namespace);\n\t\treturn $this;\n\t}", "protected function prepare_path() {\n $this->subpath = $this->parent->subpath;\n array_shift($this->subpath);\n $this->mypath = array_shift($this->subpath);\n }", "public function update_includes_real_path( $path ) {\n\t\tupdate_option( $this->get_includes_real_path_option_name(), $path );\n\t}", "public static function addPath()\n\t{\n\t\t$paths = func_get_args();\n\t\t\n\t\tset_include_path(implode(PATH_SEPARATOR, $paths) . PATH_SEPARATOR . get_include_path());\n\t}", "protected function _setupIncludePathes()\n {\n foreach ($this->_includes as $path) {\n $currIncludePath = get_include_path();\n if (strpos($currIncludePath, $path) === false) {\n self::$_log->info(\"Adding include path: $path\");\n set_include_path($currIncludePath . PATH_SEPARATOR . $path);\n }\n }\n }", "public function addPath($path, $prepend = false)\n {\n if (is_array($path)) {\n foreach ($path as $directory) {\n $this->addPath($directory, $prepend);\n }\n } else {\n if ($prepend) {\n $this->paths = array_merge([$path], $this->paths);\n } else {\n $this->paths[] = $path;\n }\n }\n }", "protected static function _setIncludePath()\n {\n $includedPath = get_include_path();\n $paths = explode(PATH_SEPARATOR, $includedPath);\n\n if (false === array_search(self::$_classPath, $paths)) {\n set_include_path(self::$_classPath . PATH_SEPARATOR . $includedPath);\n }\n }", "public static function add_path($path)\n\t{\n\t\tif(!in_array($path, static::$_asset_paths))\n\t\t{\n\t\t\tarray_unshift(static::$_asset_paths, str_replace('../', '', $path));\n\t\t}\n\t}", "public function addPath(string $path, bool $prepend = false): void\n {\n $this->write(tap($this->read(), function (&$config) use ($path, $prepend) {\n $method = $prepend ? 'prepend' : 'push';\n\n $config['paths'] = collect($config['paths'])->{$method}($path)->unique()->all();\n }));\n }", "function addIncludePath( $path = null )\r\r\n\t{\r\r\n\t\tstatic $paths;\r\r\n\r\r\n\t\tif (!isset($paths)) {\r\r\n\t\t\t$paths = array( dirname( __FILE__ ).DS.'table' );\r\r\n\t\t}\r\r\n\r\r\n\t\t// just force path to array\r\r\n\t\tsettype($path, 'array');\r\r\n\r\r\n\t\tif (!empty( $path ) && !in_array( $path, $paths ))\r\r\n\t\t{\r\r\n\t\t\t// loop through the path directories\r\r\n\t\t\tforeach ($path as $dir)\r\r\n\t\t\t{\r\r\n\t\t\t\t// no surrounding spaces allowed!\r\r\n\t\t\t\t$dir = trim($dir);\r\r\n\r\r\n\t\t\t\t// add to the top of the search dirs\r\r\n\t\t\t\t// so that custom paths are searched before core paths\r\r\n\t\t\t\tarray_unshift($paths, $dir);\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\t\treturn $paths;\r\r\n\t}", "public function add_path($path) {\n\t\tif (!is_dir($path)) {\n\t\t\tthrow new \\Exception('Path \"'.$path.'\" Not Found Error',812);\n\t\t}\n\n\t\tarray_unshift($this->new_paths,$path);\n\n\t\tset_include_path($this->start_up_path.PATH_SEPARATOR.implode(PATH_SEPARATOR,$this->new_paths));\n\t}", "private function load($paths) {\n foreach ($paths as $path) {\n if (is_array($path)) {\n // If path goes to another directory\n $this -> load($path);\n } else {\n require_once($path);\n }\n }\n }", "public function prepend($css, $path)\n {\n $this->prependPath = rtrim($path, '/') . '/';\n \n $css = $this->trimUrls($css);\n \n // append\n $css = preg_replace_callback('/@import\\\\s+([\\'\"])(.*?)[\\'\"]/'\n ,array($this, 'processUriCB'), $css);\n $css = preg_replace_callback('/url\\\\(\\\\s*([\\'\"](.*?)[\\'\"]|[^\\\\)\\\\s]+)\\\\s*\\\\)/'\n ,array($this, 'processUriCB'), $css);\n\n return $css;\n }", "public function prepend($path, $data)\n {\n return $this->filesystem->prepend(\n $this->path($path),\n $data\n );\n }", "public function preImport() {\n if (module_exists('redirect')) {\n //Settings for /admin/config/search/path/patterns\n variable_set('pathauto_node_pattern', '[node:menu-link:parents:join-path]/[node:title]');\n variable_set('pathauto_node_panopoly_page_pattern', '[node:menu-link:parents:join-path]/[node:title]');\n }\n\n\n }", "function add_include_path ()\r\n{\r\n\tforeach (func_get_args() as $path) {\r\n\t\tif (!is_dir($path)) {\r\n\t\t\ttrigger_error(\"Include path '$path' does not exist or is not a directory\", E_USER_WARNING);\r\n\t\t}\r\n\t\t$paths = explode(PATH_SEPARATOR, get_include_path());\r\n\t\tif (array_search($path, $paths) === false) {\r\n\t\t\tarray_unshift($paths, $path);\r\n\t\t\t$tmp = $paths[0];\r\n\t\t\t$paths[0] = $paths[1];\r\n\t\t\t$paths[1] = $tmp;\r\n\t\t}\r\n\t\tset_include_path(implode(PATH_SEPARATOR, $paths));\r\n\t}\r\n}", "public function setPath($path)\n {\n $this->params[] = '--load-path';\n $this->params[] = $path;\n return $this;\n }", "protected function keySetPreparation($path) {\n\t\t// If the file resides within a subdirectory, create it\n\t\tif (!$this->view->file_exists($path)) {\n\t\t\t$sub_dirs = explode('/', ltrim($path, '/'));\n\t\t\t$dir = '';\n\t\t\tforeach ($sub_dirs as $sub_dir) {\n\t\t\t\t$dir .= '/' . $sub_dir;\n\t\t\t\tif (!$this->view->is_dir($dir)) {\n\t\t\t\t\t$this->view->mkdir($dir);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected function initPaths($paths) {\n $this->paths = $paths;\n $this->createDefaultPaths(array(\n 'library' => 'library/',\n 'generated' => 'Generated/',\n 'application' => 'application/',\n 'base' => 'Base/',\n 'modules' => '',\n ));\n }", "protected function setPath($path) {\n\t\t$this->path = explode('/', $path);\n\t\tif(!$this->path)\n\t\t\t$this->path = explode('/', $this->defaultPath());\n\t}", "public static function addIncludePath($path) {\n $paths = '';\n switch(gettype($path)) {\n case 'string':\n if(is_dir($path)) {\n $paths = $path;\n }\n break;\n case 'array':\n foreach($path as $k => $v) {\n if (!is_dir($v)) {\n unset($path[$k]);\n }\n }\n $paths = implode(':', $path);\n break;\n }\n\n if ($paths) {\n set_include_path(get_include_path() . ':' . $paths);\n }\n }", "public function testSortPathsByBasename()\n {\n $paths = $this->getPathsToLoad();\n $loader = $this->createInstance();\n $loader->sortPathsByBasename($paths);\n $this->assertEquals($this->addRootDir([\n '2-a-module/',\n 'example/3-my-module/',\n 'example/8-my-other-module/'\n ]), $paths, 'Loader did not sort paths correctly');\n }", "public function testAddPath()\n {\n $path = dirname(__FILE__);\n Phergie_Autoload::addPath($path);\n $paths = explode(PATH_SEPARATOR, get_include_path());\n $this->assertContains($path, $paths);\n }", "public static function addPath($path)\n {\n $includePath = get_include_path();\n $includePathList = explode(PATH_SEPARATOR, $includePath);\n if (!in_array($path, $includePathList)) {\n set_include_path($path . PATH_SEPARATOR . get_include_path());\n }\n }", "public function setExtraPath($path)\r\n\t{\t\r\n\t\tif(is_array($path))\r\n\t\t\t$this->extra_path = implode('/', array_reverse($path));\r\n\t\telse\r\n\t\t\t$this->extra_path = $path;\r\n\t}", "function zInc($path)\n{\n return include(getPathing($path));\n}", "public function addPath($path)\n\t{\n\t\tstatic::$path = rtrim($path, '/').'/';\n\t}", "private function setPath()\n {\n $this->path = $this->root . $this->dir . DIRECTORY_SEPARATOR;\n }", "public function set_base_path( $path ) {\n\t\t$this->base_path = $path;\n\t}", "public function prepend($path, $data)\n {\n return $this->storage->prepend($this->buildPath($path),$data);\n }", "function setRelativePath($path){\n\t\tif ($path != ''){\n\t\t\tif ($path[-1] != '/'){\n\t\t\t\t$path .= '/'; \n\t\t\t}\n\t\t\t$this->relative_path = $path;\n\t\t}\n\t}", "private function loadIgnoreFile(string $path): void\n {\n if (! file_exists($path . '/.preloadignore')) {\n return;\n }\n\n $ignore = file($path . '/.preloadignore', FILE_SKIP_EMPTY_LINES | FILE_IGNORE_NEW_LINES);\n\n foreach ($ignore as $file) {\n $this->ignoreFile($path . '/' . $file);\n }\n }", "public static function add_path($path, $prefix = false)\n\t{\n\t\tif ($prefix)\n\t\t{\n\t\t\t// prefix the path to the paths array\n\t\t\tarray_unshift(static::$_paths, $path);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// find APPPATH index\n\t\t\t$insert_at = array_search(APPPATH, static::$_paths) + 1;\n\t\t\t// insert new path just behind the APPPATH\n\t\t\tarray_splice(static::$_paths, $insert_at, 0, $path);\n\t\t}\n\t}", "public static function prepend($path, $data)\n {\n if (static::exists($path)) {\n return static::put($path, $data . static::get($path));\n }\n\n return static::put($path, $data);\n }", "function setRelativePath($path){\n\t\t$this->relative_path = $path . '/';\n\t}", "public function set_base_path( $path = '' ) {\n\t\t\t$this->base_path = $path;\n\t\t}", "private function preloadDir( $dirPath ) {\n if( !in_array( str_replace( $this->imgDir . '/', '', $dirPath ), $this->excludedDirsArray ) ) {\n\n /*\n *\n * Walk through the current directory\n *\n */\n $dir = opendir( $dirPath );\n while( $file = readdir( $dir ) ) {\n\n /*\n *\n * Check if the current file is specified as ignored\n *\n */\n if( in_array( $file, $this->ignoredFiles ) ) {\n continue;\n }\n\n /*\n *\n * First, check if the current 'file' is really a file or a\n * directory. This is done by checking for a dot in the name.\n * If there's no dot, we assume it's a directory (this means\n * that directories with a dot in their name can't be scanned)\n *\n */\n if( strpos( $file, \".\" ) ) {\n\n /*\n *\n * Grab the file's extension and check it against the list\n * of accepted file formats. If it's not in an accepted\n * format, continue with the next file\n *\n */\n $fileExtension = substr( $file, strpos( $file, '.' ) + 1 );\n if( !in_array( $fileExtension, $this->imageFormats ) ) {\n continue;\n }\n\n /*\n *\n * Finally add the file to the list if images to be\n * preloaded\n *\n */\n $this->imageSources[] = $dirPath . \"/\" . $file;\n } else {\n\n /*\n *\n * Since the current 'file' is really a folder, scan it\n *\n */\n $this->preloadDir( $dirPath . \"/\" . $file );\n }\n }\n }\n }", "public function prepend($path, $data)\n {\n if ($this->exists($path)) {\n return $this->put($path, $data . $this->get($path));\n }\n\n return $this->put($path, $data);\n }", "function lazy_load() {\n $this->extend(include $this->file);\n $this->file=false;\n }", "function prepend($string, $orig_filename) {\n $context = stream_context_create();\n $orig_file = fopen($orig_filename, 'r', 1, $context);\n\n $temp_filename = tempnam(sys_get_temp_dir(), 'php_prepend_');\n file_put_contents($temp_filename, $string);\n file_put_contents($temp_filename, $orig_file, FILE_APPEND);\n\n fclose($orig_file);\n unlink($orig_filename);\n rename($temp_filename, $orig_filename);\n}", "public function add($prefix, $paths, $prepend = false)\n {\n if ( ! $prefix)\n {\n if ($prepend)\n {\n $this->fallbackPaths = array_merge((array) $paths, $this->fallbackPaths);\n }\n else\n {\n $this->fallbackPaths = array_merge($this->fallbackPaths, (array) $paths);\n }\n return;\n }\n\n if ( ! isset($this->prefixes[$prefix]))\n {\n $this->prefixes[$prefix] = (array) $paths;\n return;\n }\n\n if ($prepend)\n {\n $this->prefixes[$prefix] = array_merge((array) $paths, $this->prefixes[$prefix]);\n }\n else\n {\n $this->prefixes[$prefix] = array_merge($this->prefixes[$prefix], (array) $paths);\n }\n\t}", "public static function prepend($path, $data)\n {\n /** @var \\Illuminate\\Filesystem\\Filesystem $instance */\n return $instance->prepend($path, $data);\n }", "public function addPath($path)\n {\n array_unshift($this->arr['field-path'], $path);\n }", "public function create_directory_precheck($path) {\n return parent::create_directory_precheck($path);\n }", "public function create_directory_precheck($path) {\n return parent::create_directory_precheck($path);\n }", "public function append_path($path) {\n if (empty($path)) return;\n if (is_array($path)) $path = implode(\"/\", $path);\n $this->path = $path;\n }", "private function _addSlashIfNecessary(&$path)\n\t{\n\t\tif (substr($path, -1) != DIRECTORY_SEPARATOR)\n\t\t\t$path .= DIRECTORY_SEPARATOR;\n\t}", "public function paths($paths){\n\t\t$this->paths = array_merge($this->paths,$paths);\n\t}", "public function setPath($path){\n if(substr($path, -1) === '/'){\n $path = substr($path, 0, -1);\n }\n //$this->path = $path;\n }", "protected function _prepend() {}", "public static function autoload($path = null) {\n\t\tself::register();\n\t\tself::addPath($path);\n\t}", "function prepend($string, $orig_filename) {\n $context = stream_context_create();\n $orig_file = fopen($orig_filename, 'r', 1, $context);\n\n $temp_filename = tempnam(sys_get_temp_dir(), 'php_prepend_');\n file_put_contents($temp_filename, $string);\n file_put_contents($temp_filename, $orig_file, FILE_APPEND);\n\n fclose($orig_file);\n unlink($orig_filename);\n rename($temp_filename, $orig_filename);\n}", "function setIncludes($extPath = \"..\"){\n\t\t//getIncludes($extPath, $this->mTipoDePagina);\n\t}", "public function testAddGetPathsToLoad()\n {\n $paths = $this->getPathsToLoad();\n $loader = $this->createInstance($paths);\n \n $this->assertEquals($paths, $loader->getPathsToLoad(), 'Loader did not register given paths');\n }", "function front_preload () {\n\t\t$this->CI->smarty->addPluginsDir(APPPATH . 'modules/store/template_plugins/');\n\t}", "public static function setIncludePaths($path, $removeZfPath = false)\r\n {\n \tif (substr($path, -1) != DIRECTORY_SEPARATOR) $path .= DIRECTORY_SEPARATOR;\n \t\r\n\t\tself::setPaths($path);\n\n\t\t$dpaths = explode(PATH_SEPARATOR, get_include_path());\n\t\t\n\t\tif ($removeZfPath === true) {\n\t\t\tforeach ($dpaths as $key => $dpath) {\n\t\t\t\tif (strpos($dpath, \"/ZendFramework/\") !== false) {\n\t\t\t\t\tunset($paths[$key]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n \tset_include_path(\r\n \t\t\timplode(PATH_SEPARATOR, $dpaths) . PATH_SEPARATOR\r\n \t\t\t. $path . PATH_SEPARATOR\r\n \t\t\t. $path . 'application/' . PATH_SEPARATOR\r\n \t\t\t. $path . 'vendor/' . PATH_SEPARATOR\r\n \t\t\t. $path . 'vendor/quatrain/t41/library' . PATH_SEPARATOR\n \t\t\t. $path . 'vendor/zendframework/zendframework1/library' . PATH_SEPARATOR\n \t);\n }", "private function add_leading_path(&$directory, $key, $prefix) {\n $directory = \"$prefix$directory/\";\n }", "private function prependNamespace(string $namespace, ?string $prepend): string\n {\n if($prepend !== null && substr($namespace, 0, 1) !== '\\\\') {\n $namespace = \"{$prepend}\\\\{$namespace}\";\n }\n\n return $namespace;\n }", "public static function addPath($path)\n\t{\n\t\tif(!is_dir($path)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tself::$loadPaths[] = $path;\n\t\tself::$loadPaths = array_unique(self::$loadPaths);\n\t\treturn true;\n\t}", "public static function add_leading_slash( $path ) : string {\n return '/' . self::remove_leading_slash( $path );\n }", "public function prepend(ContainerBuilder $container): void\n {\n $configsDir = __DIR__ . '/../Resources/config/';\n $configs = [\n 'ezdesign.yml' => 'ezdesign',\n 'ezplatform.yml' => 'ezpublish',\n ];\n\n foreach ($configs as $file => $namespace) {\n $config = Yaml::parse(file_get_contents($configsDir . $file));\n $container->prependExtensionConfig($namespace, $config);\n $container->addResource(new FileResource($configsDir . $file));\n }\n\n $container->prependExtensionConfig(\n 'bazinga_js_translation',\n [\n 'active_domains' => [\n 'feature_flag',\n ]\n ]\n );\n }", "public function add($prefix, $paths, $prepend = false)\n {\n if (!$prefix) {\n if ($prepend) {\n $this->_fallbackDirsPsr0 = array_merge(\n (array) $paths,\n $this->_fallbackDirsPsr0\n );\n } else {\n $this->_fallbackDirsPsr0 = array_merge(\n $this->_fallbackDirsPsr0,\n (array) $paths\n );\n }\n\n return;\n }\n\n $first = $prefix[0];\n if (!isset($this->_prefixesPsr0[$first][$prefix])) {\n $this->_prefixesPsr0[$first][$prefix] = (array) $paths;\n\n return;\n }\n if ($prepend) {\n $this->_prefixesPsr0[$first][$prefix] = array_merge(\n (array) $paths,\n $this->_prefixesPsr0[$first][$prefix]\n );\n } else {\n $this->_prefixesPsr0[$first][$prefix] = array_merge(\n $this->_prefixesPsr0[$first][$prefix],\n (array) $paths\n );\n }\n }", "function setModulePath($path)\n\t{\n\t\tif(substr_compare($path, '/', -1) !== 0)\n\t\t{\n\t\t\t$path.='/';\n\t\t}\n\t\t$this->module_path = $path;\n\t}", "public function appendPath($source)\n\t{\n\t\t$this->_addPath($source, false);\n\t}", "public function setLocalPath($path);", "function zIncVar($path, $lvar=\"\")\n{\n return include(getPathing($path));\n}", "public function addPaths($paths, $prepend = false)\n {\n $this->fileFinder->addPaths($paths, $prepend);\n\n return $this;\n }", "static protected function _configurationPreload()\n\t{\n\t\t_e('In order for this cache engine to work you have to insert <strong>one</strong> of the pre-loading script', 'xlii-cache'); ?>\n\t\t\t\t\t\n\t\t<div class = \"code-sample\">\n\t\t\t<ul class = \"tab-nav\">\n\t\t\t\t<li><a href = \"#htaccess\">.htaccess</a></li>\n\t\t\t\t<li><a href = \"#wp-config\">wp-config.php</a></li>\n\t\t\t</ul>\n\n\t\t\t<code class = \"htaccess\">\n\t\t\t\t<div class = \"comment\">\n\t\t\t\t# <?php echo __('Add this code to the top of your .htaccess file', 'xlii-cache'); ?><br />\n\t\t\t\t# <?php echo __('Location', 'xlii-cache') . ': ' . get_home_path() . '.htaccess'; ?><br /><br />\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<div class = \"comment\"># BEGIN Cache<br /></div>\n\t\t\t\tphp_value auto_prepend_file \"<?php echo ABSPATH . $path; ?>\"<br />\n\t\t\t\t<div class = \"comment\"># END Cache<br /></div>\n\t\t\t</code>\n\t\t\t\n\t\t\t<code class = \"wp-config\">\n\t\t\t\t<div class = \"comment\">\n\t\t\t\t// <?php echo __('Add this line right after the PHP brackets open in your PHP wp-config.php file', 'xlii-cache'); ?><br />\n\t\t\t\t// <?php echo __('Location', 'xlii-cache') . ': ' . ABSPATH . 'wp-config.php'; ?><br /><br />\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\tif(file_exists(__DIR__ . '/<?php echo $path; ?>'))<br />\n\t\t\t\t&nbsp; &nbsp; require_once __DIR__ . '/<?php echo $path; ?>';\n\t\t\t</code>\n\t\t</div>\n\t\t<?php \n\t\tif(defined('CACHE_PRE_LOADED') && CACHE_PRE_LOADED)\n\t\t\techo '<p class = \"description\"><small>' . sprintf(__('Pre loader %sdetected%s', 'xlii-cache'), '<strong style = \"color:green;\">', '</strong>') . '</small></p>';\n\t\telse\n\t\t\techo '<p class = \"description\"><small>' . sprintf(__('Pre loader %snot detected%s', 'xlii-cache'), '<strong style = \"color:#a00;\">', '</strong>') . '</small></p>';\n\t}", "public function testConstructorAddsToIncludePath()\n {\n $autoload = new Phergie_Autoload;\n $paths = explode(PATH_SEPARATOR, get_include_path());\n $this->assertContains(PHERGIE_BASE_PATH, $paths);\n }", "function ascend_path($path,$levels)\n{\n\t$dir=explode('/',$path);\n\treturn implode(array_slice($dir,0,count($dir)-$levels),'/');\n}", "public function load($path)\n {\n $process = $this->makeProcess($this->baseCommand().' < \"${:LARAVEL_LOAD_PATH}\"');\n\n $process->mustRun(null, array_merge($this->baseVariables($this->connection->getConfig()), [\n 'LARAVEL_LOAD_PATH' => $path,\n ]));\n }", "function prepend($string, $orig_filename) {\n\t\t\t\t$context = stream_context_create();\n\t\t\t\t$orig_file = fopen($orig_filename, 'r', 1, $context);\n\n\t\t\t\t$temp_filename = tempnam(sys_get_temp_dir(), 'php_prepend_');\n\t\t\t\tfile_put_contents($temp_filename, $string);\n\t\t\t\tfile_put_contents($temp_filename, $orig_file, FILE_APPEND);\n\n\t\t\t\tfclose($orig_file);\n\t\t\t\tunlink($orig_filename);\n\t\t\t\trename($temp_filename, $orig_filename);\n\t\t\t\tchmod($orig_filename, 0644);\n\t\t\t}", "public function setPath($path){\n if(substr($this->path, -1) === '/'){\n $path = substr($path, 0, -1);\n }\n\n //echo $this->path = $path;\n }", "public function ensureParentDirectories($path) {}", "public function preLoad() {\n $preHooks = $this->getProperty('preHooks','');\n }", "public function prepend() {\n\t\t$this->prepend = true;\n\t}", "private function base_relative($path = null)\n\t\t{\n\t\t\t$test\t= self::getProtocol().$_SERVER['HTTP_HOST'].\"/\".apps::getGlobal(\"router\")->getBasePath();\n\t\t\treturn concat_path($test,$path);\n\t\t}", "function set_custom_lang_path($lang_path)\n\t{\n\t\t$this->lang_path = $lang_path;\n\n\t\tif (substr($this->lang_path, -1) != '/')\n\t\t{\n\t\t\t$this->lang_path .= '/';\n\t\t}\n\t}" ]
[ "0.7891637", "0.6604219", "0.64837575", "0.64534193", "0.6319582", "0.6286141", "0.60754305", "0.6030631", "0.601739", "0.58993196", "0.5857507", "0.57569623", "0.56709176", "0.55746585", "0.55181456", "0.54966193", "0.5466341", "0.5445114", "0.5375729", "0.5373398", "0.53726363", "0.5370964", "0.5363806", "0.5352651", "0.53447556", "0.5306328", "0.5299407", "0.5294137", "0.526852", "0.5257511", "0.5240544", "0.52284515", "0.51799667", "0.5174059", "0.51586354", "0.51144445", "0.51031256", "0.5101238", "0.509541", "0.50817305", "0.5077088", "0.5071919", "0.5057765", "0.5048392", "0.503438", "0.50262135", "0.5021503", "0.50106514", "0.50014657", "0.49992633", "0.49969268", "0.4990292", "0.49849004", "0.49787673", "0.495612", "0.49496824", "0.49389395", "0.49291807", "0.49270213", "0.48989362", "0.48988822", "0.48963767", "0.48918536", "0.48827222", "0.4878572", "0.48768285", "0.48768285", "0.48764563", "0.48618287", "0.4860225", "0.48579016", "0.48572922", "0.484954", "0.48485833", "0.48384666", "0.48375964", "0.48373708", "0.48364633", "0.4833446", "0.48289448", "0.48235852", "0.4822646", "0.48095873", "0.48076585", "0.4804215", "0.4803796", "0.4802805", "0.48012897", "0.47991562", "0.4797461", "0.47911268", "0.4785716", "0.478551", "0.47786534", "0.4770914", "0.4759926", "0.47507834", "0.47502536", "0.4748858", "0.4740319" ]
0.7166356
1
Get the number of seconds until the user is unblocked
Получить количество секунд до разблокировки пользователя
public function getSecondsUntilUnblock($username) { $seconds = $this->findBlockUntil($username) - $this->getCurrentTime() + 1; if (0 > $seconds) { return 0; } return $seconds; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTimeout()\n {\n return $this->lockout;\n }", "public function getSecondsBeforeNextAttempts();", "function waitTime() {\n $tries = $this->Session->val('tries');\n $limit = $this->Session->val('limit');\n if ( !$tries ) {\n return 0;\n }\n\n $base = ($tries - $limit);\n $minutes = 0;\n for( $i=1; $i <= $base; $i++ ) {\n $minutes += $i;\n }\n\n return $minutes*60;\n }", "public function timeout() {\n if ($this->messageWaiting) {\n return 1;\n } else {\n return $this->plugin->pinginterval;\n }\n }", "public function getWaitTime() : int {\r\n\r\n return (int) $this->getConfig()->get(\"Waiting time\");\r\n\r\n }", "public function getWaitSeconds()\n {\n return $this->wait_seconds;\n }", "protected function lockoutTime()\n {\n return property_exists($this, 'lockoutTime') ? $this->lockoutTime : 60;\n }", "protected function lockoutTime()\n {\n return property_exists($this, 'lockoutTime') ? $this->lockoutTime : 60;\n }", "public function waitingTime(): float\n {\n return \\max(0.0, $this->starttransfer_time - $this->pretransfer_time);\n }", "public function getTimeout(): float;", "public abstract function get_idle_threshold(): int;", "public function getTemporarilyLoginAttempts();", "public function getWaitTimeSeconds()\n {\n return $this->WaitTimeSeconds;\n }", "protected function lockoutTime() : int\n {\n return config('dms.auth.login.lockout-time');\n }", "public function getIdleTime();", "public function getCheckIntervalSec()\n {\n return isset($this->check_interval_sec) ? $this->check_interval_sec : 0;\n }", "public function getTimeout()\n {\n return 5.0;\n }", "private function validUntil() : int\n {\n return time() + ($this->duration * 60);\n }", "public function getWaiting(): int \n {\n return $this->waiting;\n }", "public function getWaitingTime()\n {\n if ($this->lastActionTime === null) {\n return 0;\n }\n $diff = $this->lastActionTime - ($this->timeProvider->getTime() - $this->getCurrentInterval());\n return $diff;\n }", "public function getLockLifeTime()\n {\n $timeout = (int)Mage::getStoreConfig('cms/hierarchy/lock_timeout');\n return ($timeout != 0 && $timeout < 120 ) ? 120 : $timeout;\n\n }", "public static function checkUserTimeout()\r\n {\r\n \r\n // If there was no POST at all during this session\r\n if (! isset($_SESSION['timeout'])) {\r\n $_SESSION['timeout'] = time();\r\n return;\r\n }\r\n $bypass = 1;\r\n if ($bypass == 1)\r\n return;\r\n $waitTime = self::$timeout - (time() - $_SESSION['timeout']);\r\n \r\n if ($waitTime > 0) {\r\n throw new Exception(\"You are doing it too fast! Please wait \" . $waitTime . \" more seconds..\");\r\n }\r\n \r\n $_SESSION['timeout'] = time();\r\n return;\r\n }", "public function getSleepTime()\n {\n return $this->sleepTime;\n }", "function m_maxconntimeout($conn, $secs)\n{\n}", "private function getConfirmTimerEnd(): int\n {\n if ($this->http_request->cookies->has('confirm_timer')) {\n $timer_end = $this->http_request->cookies->get('confirm_timer');\n } else {\n $timer_end = time() + 180;\n }\n\n return $timer_end;\n }", "public function timeRemaining(): int\n {\n return $this->response->rateLimitNextReset();\n }", "public function getWaited(): float {\n\t\t\treturn $this->waited;\n\t\t}", "public function get_until_blocked() {\r\n\t\tglobal $conex;\r\n\t\t$sql = 'SELECT max(blocked_until_datetime) AS blocked_until_datetime FROM blocks WHERE user_id = \\''. $this->user_id .'\\'';\r\n\t\t$sel = my_query($sql, $conex);\r\n\t\t\r\n\t\treturn my_result($sel, 0, 'blocked_until_datetime');\r\n\t}", "function isBlocked() {\n if ( $this->isWatching() ) {\n // Blocked by number of tries\n if ( $this->Session->val('tries') > $this->Session->val('limit') ) {\n // Blocked by time between tries\n if ( time() < ($this->Session->val('last_attempt') + $this->waitTime()) ) {\n return true;\n }\n }\n }\n\n return false;\n }", "public function getTimeout();", "protected function _timeRemaining()\r\n\t{\r\n\t\t$time_rem = 0;\r\n\t\tif( Art_Session::get(self::CONTACTFORM_COUNT) )\r\n\t\t{\r\n\t\t\t$time_mnts = ( time() - Art_Session::get(self::CONTACTFORM_SENT) ) / 60;\r\n\t\t\tswitch( Art_Session::get(self::CONTACTFORM_COUNT) )\r\n\t\t\t{\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tif( $time_mnts < 2 )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$time_rem = 2 - floor($time_mnts);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tif( $time_mnts < 5 )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$time_rem = 5 - floor($time_mnts);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tif( $time_mnts < 10 )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$time_rem = 10 - floor($time_mnts);\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $time_rem;\r\n\t}", "public function getWaitTime()\n\t{\n\t\t$iTime = round(((($this->_aParams['last_time_stamp'] + $this->_aParams['time_stamp']) - PHPFOX_TIME) / 60));\t\t\n\t\t\n\t\tif ($iTime <= 1)\n\t\t{\n\t\t\tif (str_replace('-', '', (PHPFOX_TIME - ($this->_aParams['last_time_stamp'] + $this->_aParams['time_stamp']))) == '1')\n\t\t\t{\n\t\t\t\t$iTime = Phpfox::getPhrase('core.try_again_in_1_second');\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t$sTime = Phpfox::getPhrase('core.try_again_in_time_seconds', array('time' => str_replace('-', '', (PHPFOX_TIME - ($this->_aParams['last_time_stamp'] + $this->_aParams['time_stamp'])))));\n\t\t\t}\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$sTime = Phpfox::getPhrase('core.try_again_in_time_minutes', array('time' => $iTime));\n\t\t}\n\t\t\n\t\treturn $sTime;\n\t}", "public function backoff(): int;", "public function getTimeout(): int\n {\n return 15;\n }", "public function getTimeoutSec()\n {\n return isset($this->timeout_sec) ? $this->timeout_sec : 0;\n }", "public function get_idle_threshold(): int {\n return (int)get_config('local_time_tracking', 'idlethreshold');\n }", "function yourls_tick() {\n\treturn ceil( time() / yourls_get_nonce_life() );\n}", "public function getTimeOut(): int\n {\n return $this->timeOut;\n }", "public function isBannedSince();", "public function secondsRemainingOnLockout(Request $request)\n {\n return app(RateLimiter::class)->availableIn(\n $this->getThrottleKey($request)\n );\n }", "public function getDelayInSeconds()\n {\n $now = Carbon::now();\n\n if ($now->gte($this->run_at)) {\n return 0;\n } else {\n return $this->run_at->diffInSeconds($now);\n }\n }", "private function lockAnnounceDuration()\n {\n $identity = md5(urldecode(app()->request->getQueryString()));\n if (false == $check = app()->redis->zScore(Constant::trackerAnnounceLockZset, $identity)) { // this identity is not lock\n app()->redis->zAdd(Constant::trackerAnnounceLockZset, time() + 60, $identity);\n }\n return $check;\n }", "protected static function timeout() {\n\t\treturn (int) (time() + self::LOCK_EXPIRE_TIMEOUT + 1);\n\t}", "public function getMutexLockTimeout();", "public function waitTime($waits = 0)\n {\n return 1;\n }", "public function uptime_seconds() {\n\n\t}", "public function __sleep();", "public function __sleep();", "function check_wait_time() {\n\t\t// This is just a call to a function in seating-algorithm/algorithm.php\n\t}", "public function getVisibilityTimeout(): int;", "public function getMaxTriesUntilBlock(): int\n {\n $key = 'login_tries_until_blocked';\n\n if (array_key_exists($key, $this->options)) {\n $val = (int) $this->options[$key];\n if ($val <= 0) {\n throw new InvalidArgumentException('Invalid value for option \"' . $key . '\": ' . $val);\n }\n return $val;\n }\n\n // defaults, in case config.yml does not define values\n // e.g. because of a redaxo core update from a version.\n return 50;\n }", "public function getLoginTimeout();", "private function getIsDownUntil() {\n if (file_exists(MEMCACHED_DOWN_LOCK_FILE)) {\n $timestamp = file_get_contents(MEMCACHED_DOWN_LOCK_FILE);\n // is the lock file expired?\n if ($timestamp > time()) {\n ZLog::Write(LOGLEVEL_WARN, sprintf(\"IpcMemcachedProvider(): Memcache service is marked as down until %s.\", strftime(\"%d.%m.%Y %H:%M:%S\", $timestamp)));\n return $timestamp;\n }\n else {\n @unlink(MEMCACHED_DOWN_LOCK_FILE);\n }\n }\n return 0;\n }", "public function is_blocked()\n\t{\n\treturn\tboolval($this->blocked_on);\n\t}", "function inactivityChecker()\n{\n\tif(!isset($_SESSION['inactivityTimer']))\n\t{\n\t\t$_SESSION['inactivityTimer'] = time();\n\t}\n\tif(time() - $_SESSION['inactivityTimer'] > 600)\n\t{\n\t\tnewEvent(\"Logout\", \"Timeout\");\n\t\tDestroySession();\n\t}\n\telse {\n\t\t$_SESSION['inactivityTimer'] = time();\n\t}\n}", "public function get_shutdownCountdown(): int\n {\n // $res is a int;\n if ($this->_cacheExpiration <= YAPI::GetTickCount()) {\n if ($this->load(YAPI::$_yapiContext->GetCacheValidity()) != YAPI::SUCCESS) {\n return self::SHUTDOWNCOUNTDOWN_INVALID;\n }\n }\n $res = $this->_shutdownCountdown;\n return $res;\n }", "public function pollInterval()\n {\n return 10;\n }", "protected function secondsRemainingOnLockout(Request $request)\n {\n return app(RateLimiter::class)->availableIn(\n $this->getThrottleKey($request)\n );\n }", "public function getWaitingTime(): string\n {\n return Yii::$app->formatter->asTime($this->secondsToSleep);\n }", "function tries() {\n if ( $this->isWatching() ) {\n return $this->Session->val('tries');\n }\n\n return 0;\n }", "public function __sleep ();", "private function secondsSince(): int\n {\n return \\current_time('timestamp') - $this->timestamp;\n }", "private function _unlimitedTime()\n\t{\n\t\t$this->_addReply(['Session-Timeout'=>0]);\n\t}", "function SERVER_getWarnWhenJobsAreDelayed()\n{\n\tif (!RMV_exists4IP('warnWhenJobsAreDelayed', 'm23ServerSetting'))\n\t\treturn(0);\n\n\t$maxAllowedDelay = (int)SERVER_getServerSetting('warnWhenJobsAreDelayed');\n\tif ($maxAllowedDelay < 0)\n\t\treturn(0);\n\n\treturn($maxAllowedDelay);\n}", "private function checkRequestsLimit()\n {\n $now = microtime(true);\n if ($this->lastRequestTime > 0) {\n $nextTime = $this->lastRequestTime + 0.1;\n $delta = $nextTime - $now;\n if ($delta > 0) {\n usleep($delta * 1000000);\n }\n }\n $this->lastRequestTime = $now;\n }", "public function getWaitTime()\n {\n if(!$this->getType() || !isset($this->_results['oldest']) || !is_object($this->_results['oldest']))\n {\n return 0;\n }\n\n return $this->getType()->getMaxTime() - (time() - $this->_results['oldest']->getDateTime()->getTimestamp());\n }", "public function getDelaySeconds()\n {\n return $this->DelaySeconds;\n }", "function checkTimeout(){\n\t\tif ($_SESSION['lastactivity'] + 5*60 < time()) {\n \treturn TRUE;\t\t\t\n \t} else {\n\t $_SESSION['lastactivity'] = time();\n\t\t\treturn FALSE;\n\t }\n\t}", "public function getDelayInSeconds()\n {\n return 60 * 60 * $this->getReminderTimeDelay();\n }", "public function retryUntil()\n {\n return now()->addSeconds(5);\n }", "public function timeLimit()\n {\n return $this->tl;\n }", "public function getTimeout(): float {\n\t\t\treturn $this->timeout;\n\t\t}", "public function isBlocked(): bool;", "public function tick() {\n $lifetime = apply_filters( 'nonce_life', $this->lifetime );\n\n return ceil( time() / ( $lifetime / 2 ) );\n }", "protected function _checkAndClearTimer()\n\t{\n\t\tif( $this->memberData['bit_wait_period'] )\n\t\t{\n\t\t\t$timestamp\t= IPSCookie::get( 'bit_wait_period' );\n\t\t\t\n\t\t\t/* No cookie, but we are supposed to wait. Set now and show error */\n\t\t\tif( !$timestamp )\n\t\t\t{\n\t\t\t\tIPSCookie::set( 'bit_wait_period', time() );\n\t\t\t\t\n\t\t\t\t$this->registry->output->showError( sprintf( $this->lang->words['wait_period_remaining'], $this->memberData['bit_wait_period'], $this->memberData['bit_wait_period'] ), 1087991 );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t/* Have we waited long enough yet? */\n\t\t\t\t$_period\t= time() - $timestamp;\n\t\t\t\t\n\t\t\t\tif( $_period < $this->memberData['bit_wait_period'] )\n\t\t\t\t{\n\t\t\t\t\t$this->registry->output->showError( sprintf( $this->lang->words['wait_period_remaining'], $_period, $_period ), 1087992 );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tIPSCookie::set( 'bit_wait_period', 0 );\n\t\t\t}\n\t\t}\n\t}", "function sessionThrottle() {\n\t// Check session\n\tsessionCheck();\n\t\n\t// Sender should not be served for the duration of this session\n\tif ( isset( $_SESSION['kill'] ) ) {\n\t\tvisitorError( 403, 'Denied' );\n\t\tsendError( 403, errorLang( \"denied\", \\MSG_DENIED ) );\n\t}\n\t\n\t$check\t\t= lastVisit();\n\t\n\t// Increase sleep delay\n\tswitch( $check ) {\n\t\t// Send Too Many Requests\n\t\tcase SESSION_STATE_HEAVY:\n\t\t\tvisitorError( 429, 'Requests' );\n\t\t\tshutdown( 'cleanup' );\n\t\t\tshutdown( 'sleep', 20 );\n\t\t\tsendError( 429, errorLang( \"toomany\", \\MSG_TOOMANY ) );\n\t\t\t\n\t\t// Send Not Modified for the rest\n\t\tcase SESSION_STATE_MEDIUM:\n\t\t\tshutdown( 'cleanup' );\n\t\t\tshutdown( 'sleep', 10 );\n\t\t\tsend( 304 );\n\t\t\t\n\t\tcase SESSION_STATE_LIGHT:\n\t\t\tshutdown( 'cleanup' );\n\t\t\tshutdown( 'sleep', 5 );\n\t\t\tsend( 304 );\n\t}\n}", "public function getTimeout(): int\n {\n return $this->timeout;\n }", "public function getTimeAllowed(): int {}", "public function getTimeAllowed(): int {}", "public function blockedAt()\n {\n if(is_null($this->resource->blocked_at))\n {\n return 0;\n }\n\n return 1;\n }", "public abstract function get_session_timeout_warn_threshold(): int;", "public function timeoutReached() {\n return $this->timeoutReached;\n }", "public function getGracefulDecommissionTimeout()\n {\n return $this->graceful_decommission_timeout;\n }", "public function getResetRequestTime();", "function timeLeft()\n{\n if ($_SESSION['gameStatus'] === \"notStarted\") {\n $timeLeft = $_SESSION['time']; // default: timeLeft = total time\n } else if ($_SESSION['gameStatus'] === \"active\") {\n $timeLeft = $_SESSION['time'] - (time() - $_SESSION['startTime']);\n } else { // $_SESSION['gameStatus'] === \"ended\"\n $timeLeft = 0;\n }\n return (int)$timeLeft;\n}", "public function timeout()\n {\n return 300;\n }", "function timeoutHeartBeat()\n {\n if (!$this->isSilent) {\n // :KLUDGE: mt_rand behaves badly with small nummers on some\n // systems, 30 is added/reduced everywhere\n if (FALSE !== ($env = $this->getEnvironment())) {\n $env_is_bar = $env->location === (DPUNIVERSE_PAGE_PATH\n . 'bar.php');\n\n if ($env_is_bar) {\n for ($max = 10;\n $this->isPresent(dp_text('glass')) && $max--; ) {\n $this->performAction(dp_text('drop glass'));\n }\n }\n\n if (35 === mt_rand(30, 40)) {\n $env->tell($this->mChat[mt_rand(0,\n sizeof($this->mChat) - 1)]);\n }\n elseif (38 === mt_rand(30,51)) {\n $this->randomWalk();\n }\n elseif ((33 === mt_rand(30, 40)) && FALSE === $env_is_bar\n && FALSE == $this->isPresent(dp_text('glass 4'))) {\n if ($env->isPresent(dp_text('glass'))) {\n $this->performAction(\n dp_text('say What a mess, and who has to clean it up? Yes...'));\n $this->performAction(dp_text('get glass'));\n }\n }\n }\n }\n DpNpc::timeoutHeartBeat();\n }", "public function getTimeOut()\n\t{\n\t\treturn (int) $this->timeOut;\n\t}", "public function getTimeOut()\n\t{\n\t\treturn (int) $this->timeOut;\n\t}", "public function isTimeoutReached(): bool;", "public function testTaskStatusTimeCalculationForUnBlocked()\n {\n // Assigned 30 minutes ago\n $minutesWorking = 30;\n $assignedAgo = (int)(new \\DateTime())->sub(new \\DateInterval('PT' . $minutesWorking . 'M'))->format('U');\n $task = $this->getAssignedTask($assignedAgo);\n $task->blocked = true;\n $task->save();\n $blockedTimeBeforeListener = $task->work[$task->owner]['blocked'];\n $timeStampBeforeListener = $task->work[$task->owner]['workTrackTimestamp'];\n\n $task->blocked = false;\n $event = new TaskStatusTimeCalculation($task);\n $listener = new \\App\\Listeners\\TaskStatusTimeCalculation();\n $listener->handle($event);\n\n $this->assertGreaterThan($blockedTimeBeforeListener, $task->work[$task->owner]['blocked']);\n $this->assertGreaterThan($timeStampBeforeListener, $task->work[$task->owner]['workTrackTimestamp']);\n $this->assertEquals(\n $task->work[$task->owner]['workTrackTimestamp'] - $timeStampBeforeListener,\n $task->work[$task->owner]['blocked']\n );\n }", "public function isBlocked();", "public function isBlocked();", "function Zotpress_change_timeout($time) { return 60; /* second */ }", "public function getDelay(): int\n {\n return $this->delay;\n }", "function LockTime($Username)\n\t{\n\t\t$UserID=$this->UserID($Username);\n\t\tif (!$UserID) return null;\n\t\t$Info=$this->UserInfo($UserID);\n\t\treturn $Info['LockTimeout']-jf::time();\n\t}", "private function getSleepDuration() {\n $sleep = phutil_units('3 minutes in seconds');\n\n $next_triggers = id(new PhabricatorWorkerTriggerQuery())\n ->setViewer($this->getViewer())\n ->setOrder(PhabricatorWorkerTriggerQuery::ORDER_EXECUTION)\n ->withNextEventBetween(0, null)\n ->setLimit(1)\n ->needEvents(true)\n ->execute();\n if ($next_triggers) {\n $next_trigger = head($next_triggers);\n $next_epoch = $next_trigger->getEvent()->getNextEventEpoch();\n $until = max(0, $next_epoch - PhabricatorTime::getNow());\n $sleep = min($sleep, $until);\n }\n\n return $sleep;\n }", "function blocked(){\n\t\t //check if they have been unblocked\n\t\t if ($_SESSION['login_attempts'] < BLOCKED_AT){\n\t\t\t $this->redirect(\"login\"); \n\t\t\t\treturn false; \n\t\t }\n\t\t \n\t\t\t//set the meta info \n\t\t\t$meta['title'] = 'Blocked';\n\t\t\t\n\t\t\t//calculate the time in minutes\n\t\t\t$minutes = round(BLOCKED_SECONDS / 60); \n\t\t\t$meta['notify'] = $this->notify(\"Too many failed login attempts! Please try again in $minutes minutes.\", \"error\");\n\t\t\t\n\t\t\t//get the page\n\t\t\t$this->load->view(\"blocked.php\", $data, $meta);\n\t\t\t\n\t\t\treturn; \n\t\t}", "function get_db_wait_timeout() {\n $connection = \\Drupal\\Core\\Database\\Database::getConnection('default');\n $result = $connection->query(\"SHOW SESSION VARIABLES LIKE 'wait_timeout'\");\n if ($result) {\n drush_print(\"------------------------------------------------------------\");\n drush_print(\"* MYSQL SESSION WAIT_TIMEOUT OVERRIDE *\");\n while ($row = $result->fetchAssoc()) {\n drush_print(\"- \" . $row['Variable_name'] . \" is currently set to: \" . $row['Value'] . \" seconds.\");\n //drush_print_r($row);\n }\n }\n drush_print(\"------------------------------------------------------------\");\n}", "private function sleepTime($numRetries)\n {\n \t$sleepSeconds = min(PayBear::getInitialNetworkRetryDelay() * 1.0 * pow(2, $numRetries - 1), PayBear::getMaxNetworkRetryDelay());\n \t$sleepSeconds *= 0.5 * (1 + randomGenerator::randFloat());\n \t$sleepSeconds = max(PayBear::getInitialNetworkRetryDelay(), $sleepSeconds);\n \treturn $sleepSeconds;\n }" ]
[ "0.6768239", "0.6764018", "0.6681463", "0.6647231", "0.65267515", "0.6434321", "0.6379011", "0.6379011", "0.6338282", "0.632841", "0.63187504", "0.6249458", "0.62453437", "0.6235074", "0.6179945", "0.61311036", "0.6088408", "0.6077421", "0.60764205", "0.6065673", "0.6058649", "0.60575277", "0.6037434", "0.6029409", "0.6025702", "0.60241747", "0.59926414", "0.5990588", "0.5956616", "0.59534043", "0.59324265", "0.5930853", "0.59108084", "0.5903588", "0.5893922", "0.5891611", "0.5881373", "0.58731496", "0.5865598", "0.5839809", "0.5829713", "0.58253986", "0.5823779", "0.5808448", "0.58040965", "0.58018905", "0.5801588", "0.5801588", "0.58011466", "0.57879937", "0.57857287", "0.5781971", "0.5767674", "0.57609195", "0.5755952", "0.5751129", "0.5746876", "0.5733323", "0.5729446", "0.57205427", "0.5719622", "0.57041997", "0.57032156", "0.5700449", "0.56964874", "0.56883645", "0.5688142", "0.56876725", "0.5675143", "0.56729776", "0.5669659", "0.5662521", "0.56561714", "0.56556016", "0.5651293", "0.5649936", "0.5645915", "0.564008", "0.564008", "0.5638729", "0.5637078", "0.56342256", "0.56329155", "0.56282073", "0.56258994", "0.56256014", "0.5619394", "0.5619051", "0.5619051", "0.56164867", "0.5615568", "0.5614359", "0.5614359", "0.56038743", "0.559858", "0.5584324", "0.5581772", "0.5579905", "0.5575066", "0.5568788" ]
0.7251765
0
Delete the login attempts option for $username.
Удалить опцию попыток входа для $username.
function deleteLoginAttempts($username) { $optionName = $this->getOptionName(true, $username); /* Essentially the same as delete_option() but works network wide when using WP Multisite. */ return delete_site_option($optionName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function resetAttempts($username)\n {\n $this->dc->qb()\n ->delete($this->dc->p('user_login_attempts'))\n ->where('username = :username')\n ->setParameter(':username', $username)\n ->execute();\n }", "public function clearLoginAttempts();", "function _deleteLoginAttempts()\n\t{\n\t\tif($this->login_limit)\n\t\t{\n\t\t\t$ip = env('REMOTE_ADDR');\n\t\t\t\n\t\t\tloadModel($this->login_attempts_model);\n\t\t\t$Model = & new $this->login_attempts_model;\n\t\t\t\n\t\t\t$Model->del($ip);\n\t\t\t\n\t\t\tif($this->cookie_active)\n\t\t\t{\n\t\t\t\tsetcookie('othAuth.login_attempts','',time() - 31536000,'/');\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public function resetLoginAttempts();", "public function clearFailedLogin(){\n\n\t global $db;\n\n\t #clear count.\n $db->SQL = \"UPDATE ebb_users SET failed_attempts='0' WHERE Username='\".$this->user.\"' LIMIT 1\";\n\t\t$db->query();\n\t}", "function clearAllChallenges($username) {\n\t\t$this->mdb->query(\"DELETE challenge FROM challenge WHERE gameUser1Id = %s OR gameUser2Id = %s\", $username, $username);\n\t}", "private function resetFailedLogins($username, &$user)\n {\n $dbHandler = $this->getDbHandler();\n $dbHandler->updateRecord(\"User\", \"Failed_login_attempts\", 0, \"Username\", $username, PDO::PARAM_INT);\n $user -> failedLoginAttempts = 0;\n }", "function clear_failed_logins($username) {\n\n\t$db = DBAccess::getMysqliConnection();\n\n\t$cleanEmail = mysqli_real_escape_string($db, $username);\n\t$count = 0;\n\t$last_time = time();\n\n\t$failed_login = $db->query(\"SELECT * FROM failed_logins WHERE email='$cleanEmail'\") or die($mysqli->error());\n\n\t//We should probably check that we wrote the attempt down.\n\tif($failed_login->num_rows > 0) {\n\n\t\t//Good news? We did.\n\t\t$sql = \"UPDATE failed_logins SET (theCount, last_time) WHERE email='$cleanEmail'\"\n\t\t\t\t\t\t. \"VALUES ('$count', '$last_time')\";\n\t\t$db->query($sql);\n\t}\n\n\treturn true;\n}", "public function resetUser($username)\n\t{\n\t\t$user = $this->deleteBlockUntil($username);\n\t\t$loginAttempts = $this->deleteLoginAttempts($username);\n\n\t\treturn $user && $loginAttempts;\n\t}", "public function resetAttempts(UserInterface $user);", "private function clear_login_attempts($login)\n\t{\n\t\tif ($this->ci->config->item('login_count_attempts', 'fx_auth')) {\n\t\t\t$this->ci->load->model('fx_auth/login_attempts');\n\t\t\t$this->ci->login_attempts->clear_attempts(\n\t\t\t\t\t$this->ci->input->ip_address(),\n\t\t\t\t\t$login,\n\t\t\t\t\t$this->ci->config->item('login_attempt_expire', 'fx_auth'));\n\t\t}\n\t}", "public function reset_login_attempts($ip_address = NULL)\n {\n if (is_null($ip_address))\n $ip_address = $this->ip_address;\n \n $a = new Attempt();\n $a->where('ip_address', $ip_address)->get();\n \n if ( $a->exists() )\n {\n $a->delete();\n }\n }", "public function reset_login_attempts($user_id) {\n $this->db->where('user_id', $user_id);\n $this->db->update(DB_PREFIX .'user', array('login_attempts' => 0));\n }", "function yubikey_login_user_clear_attempts($uid) {\n\t// Only clear the UID attempts since a successful attempt from one client\n\t// behind an IP doesn't mean there aren't other malicious clients.\n\tflood_clear_event('yubikey_login_login_otp_uid', $uid);\n\tflood_clear_event('yubikey_login_backup_code_uid', $uid);\n}", "public function deleteattempts($uid) { \n\t\tYii::$app->db->createCommand()->delete('login_attempts', ['user_ref_id' => $uid] )->query();\n\t\treturn true;\n\t}", "public function clearLoginAttemptsIfAllowed()\n {\n $lastAttempt = clone $this->last_attempt_at;\n\n $suspensionTime = static::$suspensionTime;\n $clearAttemptsAt = $lastAttempt->modify(\"+{$suspensionTime} minutes\");\n $now = new Carbon;\n\n if ($clearAttemptsAt <= $now) {\n $this->attempts = 0;\n $this->save();\n }\n\n unset($lastAttempt, $clearAttemptsAt, $now);\n }", "function clear_attempts($ip_address, $login, $expire_period = 86400)\n {\n $q = $this->createQuery()\n ->delete()\n ->where('(ip_address = ?', $ip_address)\n ->andWhere('login = ?)', $login)\n ->orWhere('UNIX_TIMESTAMP(time) < ?', time() - $expire_period);\n \n $q->execute();\n \n /*\n $this->db->where(array('ip_address' => $ip_address, 'login' => $login));\n \n // Purge obsolete login attempts\n $this->db->or_where('UNIX_TIMESTAMP(time) <', time() - $expire_period);\n\n $this->db->delete(self::TABLE);\n */\n }", "function persistLoginAttempts($username, $loginAttempts)\n\t{\n\t\t$optionName = $this->getOptionName(true, $username);\n\n\t\t/* This function is essentially the same as update_option() but works network wide when using WP Multisite. */\n\t\treturn update_site_option($optionName, $loginAttempts);\n\t}", "public function clearLoginAttempts()\n {\n if ($this->getLoginAttempts() == 0 or $this->suspended)\n {\n return;\n }\n\n $this->attempts = 0;\n $this->last_attempt_at = null;\n $this->suspended = false;\n $this->suspended_at = null;\n $this->save();\n }", "public function clearLoginAttempts()\n {\n // If our login attempts is already at zero\n // we do not need to do anything. Additionally,\n // if we are suspended, we are not going to do\n // anything either as clearing login attempts\n // makes us unsuspended. We need to manually\n // call unsuspend() in order to unsuspend.\n if ($this->getLoginAttempts() == 0 or $this->is_suspended) {\n return;\n }\n\n $this->attempts = 0;\n $this->last_attempt_at = null;\n $this->is_suspended = false;\n $this->suspended_at = null;\n $this->save();\n }", "function deleteBlockUntil($username)\n\t{\n\t\t$optionName = $this->getOptionName(false, $username);\n\n\t\t/* Essentially the same as delete_option() but works network wide when using WP Multisite. */\n\t\treturn delete_site_option($optionName);\n\t}", "public function userBanLifted($username)\n\t{\n\t\ttry\n\t\t{\n\t\t\t$query = 'DELETE FROM authentification WHERE username = ?';\n\t\t\t$stmt = $this->pdo->prepare($query);\n\t\t\t$stmt->bindParam(1, $username);\n\t\t\t$stmt->execute();\n\t\t}\n\t\t\n\t\tcatch(PDOException $e)\n {\n echo \"Error working with the database: \".$e;\n }\n \n finally\n {\n\t\t\tunset($stmt);\n }\t\t\n\t}", "public function eraseCredentials();", "public function Delete($username)\n {\n $this->tokens->Delete($username);\n }", "public function unsetUsername() {\r\n\t$this->username = \"\";\r\n }", "public function clear_login_attempts($identity, $expire_period = 86400) \n\t{\n\t\tif ($this->config->item('track_login_attempts')) \n\t\t{\n\t\t\t$ip_address = $this->input->ip_address();\n\n\t\t\t$this->db->where(array('ip_address' => $ip_address, 'login' => $identity));\n\t\t\t// Purge obsolete login attempts\n\t\t\t$this->db->where('time <', time() - $expire_period);\n\n\t\t\t$this->db->delete($this->tables['login_attempts']);\n\t\t\t//echo date(\"H:i:s\",time()- $expire_period);\n\t\t\t//echo $this->db->last_query();exit;\n\t\t}\n\t}", "public function removeUser()", "public function deleteRememberMeForUser($username)\n\t{\n\t\t$sql = \"DELETE FROM {$this->tableRememberMe}\n\t\t WHERE user_username = :username\";\n\t\t$sth = $this->db->prepare($sql);\n\t\t$sth->bindValue(\":username\", $username, PDO::PARAM_STR);\n\t\t$sth->execute();\n\t}", "public function eraseCredentials() { }", "public function eraseCredentials() { }", "public function eraseCredentials() { }", "public function eraseCredentials() { }", "function unTempLocked() {\r\n if ($this->Session->check('Login.WrongNum') && $this->Session->check('Login.id')) {\r\n $this->unlockUser($this->Session->read('Login.id'));\r\n }\r\n $this->Session->delete('Login');\r\n }", "function eraseCredentials()\n {\n\n }", "public function kickUser($username)\n {\n $db = $_SESSION[\"database\"];\n $db->delete(\"ClassMember\", \"ClassID = '$this->id' AND Username = '$username'\");\n }", "public function eraseCredentials() {\n }", "public function clearLoginAttempts(\\Netinteractive\\Sentry\\Throttling\\ThrottleInterface $record)\n {\n $blueprint = $record->getBlueprint();\n $suspensionTime = $blueprint->getSuspensionTime();\n $lastAttempt = null;\n $now = new Carbon();\n $clearAttemptsAt = new Carbon();\n\n\n if ( $record->last_attempt_at != null){\n $lastAttempt = new Carbon($record->last_attempt_at);\n $clearAttemptsAt = $lastAttempt->modify(\"+{$suspensionTime} minutes\");\n }\n\n\n if ($lastAttempt == null || $clearAttemptsAt <= $now) {\n $record->attempts = 0;\n $this->getMapper()->save($record);\n }\n\n unset($lastAttempt);\n unset($clearAttemptsAt);\n unset($now);\n }", "function delete_user($con,$username,$dcount) {\n if($dcount!=0){\n\t\t$delete = mysqli_query ($con,\"delete from socntwk.WHOISONLINE \n\t\twhere TIMESTAMPDIFF(MINUTE,time,NOW()) >10\");\n\t\tif (!$delete) {\n\t\t\t$this->error[$this->i] = \"Unable to delete visitors\";\n\t\t\t$this->i++;\n\t\t}\n\t\t}\n\t\telse\n\t\t$this->i;\n}", "public function deleteUsr($username);", "public function eraseCredentials() {\n\n\t}", "function clearOneChallenge($username1, $username2) {\n\t\t$this->mdb->query(\"DELETE challenge FROM challenge WHERE (gameUser1Id = %s AND gameUser2Id = %s) \n\t\t\tOR (gameUser2Id = %s AND gameUser1Id = %s)\", $username1, $username2, $username1, $username2);\n\t}", "public function delete($username)\r\n {\r\n $user = Sentry::findUserByLogin($username);\r\n\r\n $user->delete();\r\n\r\n Event::fire('Users.Deleted', array($username, Carbon::now(), 'Deleted'));\r\n\r\n }", "public function eraseCredentials(): void;", "function deleteUsers(){\n\n $sql = \"DELETE\n FROM server_user\n WHERE username = ?\";\n\n $username = $this->getUserName();\n $this->db->Add_insert_delete_Query($sql,array($username),array(PDO::PARAM_STR));\n\n\n\n }", "public function clear()\n {\n $this->attempts=0;\n }", "public function delete($username)\n {\n }", "function logoutAll($username) {\n\t\treturn $this->updateUserSessid($username, $this->randStr(32));\n\t}", "public function eraseCredentials()\n\t\t{\n\t\t}", "public function eraseCredentials()\r\n {\r\n }", "public function eraseCredentials()\r\n {\r\n }", "public function eraseCredentials()\n {\n //Implement eraseCredentials() method.\n }", "public function eraseCredentials(): void\r\n {}", "function ppp_drop_user($username) {\n\t\t\t$this->conn->exec(\"/ppp active remove [find name=\\\"$username\\\"]\");\n if($this->result) return $this->conn->error;\n return TRUE;\n\t\t}", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }" ]
[ "0.7657679", "0.72056055", "0.6970507", "0.6619515", "0.6470273", "0.6296884", "0.62652194", "0.6234102", "0.62061465", "0.6202459", "0.61826944", "0.6167496", "0.61670846", "0.61659193", "0.6153895", "0.60583574", "0.5988527", "0.59691995", "0.5949484", "0.5872581", "0.57931113", "0.5765611", "0.5750472", "0.5746149", "0.5675343", "0.56753355", "0.5644931", "0.56281054", "0.5627351", "0.5627351", "0.5627351", "0.5627351", "0.5617642", "0.5604025", "0.5602433", "0.5585227", "0.55785716", "0.55746055", "0.55676633", "0.5565828", "0.5563523", "0.55622065", "0.5558611", "0.5553822", "0.5547722", "0.55467045", "0.5540575", "0.55339086", "0.5532537", "0.5532537", "0.5526168", "0.55240625", "0.5517949", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102", "0.5516102" ]
0.86207473
0
Delete the 'block time until' value option for $username.
Удалите параметр 'время ожидания блока' для $username.
function deleteBlockUntil($username) { $optionName = $this->getOptionName(false, $username); /* Essentially the same as delete_option() but works network wide when using WP Multisite. */ return delete_site_option($optionName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteLoginAttempts($username)\n\t{\n\t\t$optionName = $this->getOptionName(true, $username);\n\n\t\t/* Essentially the same as delete_option() but works network wide when using WP Multisite. */\n\t\treturn delete_site_option($optionName);\n\t}", "public function unblockUser();", "public function persistBlockUntil($username, $blockUntil)\n\t{\n\t\t$optionName = $this->getOptionName(false, $username);\n\n\t\t/* This function is essentially the same as update_option() but works network wide when using WP Multisite. */\n\t\treturn update_site_option($optionName, $blockUntil);\n\t}", "function unblockUser($userinfo, &$existinguser, &$status)\r\n {\r\n }", "function opening_times_remove() {\n//delete_option('hello_world_data');\n}", "public function unsetUsername() {\r\n\t$this->username = \"\";\r\n }", "public function unblockUser($username)\n\t{\n\t\treturn $this->con->post(\"$username/unblock\");\n\t}", "function unblock()\n\t{\n\t\t\n\t}", "public function setBlockUnblock(){\n\t\t$id = $this->input->post('id');\n\t\t$buttonValue = $this->input->post('buttonValue');\n\t\t$status = $this->input->post('status');\n\n\t\t//get deleted user info\n\t\t$userInfo = singleDbTableRow($id);\n\t\t$fullName = user_full_name($userInfo);\n\t\t// add a activity\n\t\tcreate_activity($status.\" {$fullName} from Task\");\n\t\t//Now delete permanently\n\n\t\t$this->db->where('id', $id)->update('tasks', ['status' => $buttonValue]);\n\t\treturn true;\n\t}", "private static function delete_options() {\n\t\tglobal $wpdb;\n\t\t$wpdb->query( \"DELETE FROM {$wpdb->options} WHERE option_name LIKE 'blockmeister_%'\" );\n\t}", "function autodelete(){\n\t\t$q=mysql_query(\"delete from transactions where datediff(curdate(),request)>3 and confirm='0000-00-00'\");\n\t}", "function findBlockUntil($username)\n\t{\n\t\t$optionName = $this->getOptionName(false, $username);\n\n\t\t/* This function is almost identical to get_option(), except that in multisite,\n\t\tit returns the network-wide option. For non-multisite installs, it uses get_option. */\n\t\treturn get_site_option($optionName, 0);\n\t}", "private function delete_user_options( $scope ) {\n\t\tglobal $wpdb;\n\n\t\tif ( 'site' === $scope ) {\n\t\t\t$meta_prefix = $wpdb->get_blog_prefix();\n\t\t} elseif ( 'network' === $scope ) {\n\t\t\t$meta_prefix = '';\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\n\t\t// phpcs:ignore WordPress.DB.DirectDatabaseQuery\n\t\t$wpdb->query(\n\t\t\t$wpdb->prepare(\n\t\t\t\t\"DELETE FROM {$wpdb->usermeta} WHERE meta_key LIKE %s\",\n\t\t\t\t$meta_prefix . static::KEY_PATTERN\n\t\t\t)\n\t\t);\n\t}", "function sharei_wp_settings_username() {\n add_option( 'sharei_wp_option_username', '');\n register_setting( 'sharei_wp_options_group','sharei_wp_option_username', 'sharei_wp_callback' );\n }", "function ppp_drop_user($username) {\n\t\t\t$this->conn->exec(\"/ppp active remove [find name=\\\"$username\\\"]\");\n if($this->result) return $this->conn->error;\n return TRUE;\n\t\t}", "public static function lock_unlog() {\n if(isset($GLOBALS[\"CURRENT_USER\"])) {\n global $CURRENT_USER;\n if($CURRENT_USER != NULL) {\n PHPEasyTemplate::e_403();\n }\n }\n }", "function _delete_option_fresh_site()\n{\n}", "public function getSecondsUntilUnblock($username)\n\t{\n\t\t$seconds = $this->findBlockUntil($username) - $this->getCurrentTime() + 1;\n\n\t\tif (0 > $seconds) {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn $seconds;\n\t}", "function delete_user_option($user_id, $option_name, $global = \\false)\n{\n}", "function sumo_delete_old_users_temp()\n{\n\tGLOBAL $SUMO;\n\n\t$query = \"DELETE FROM \".SUMO_TABLE_USERS_TEMP.\"\n\t\t\t WHERE time < \".($SUMO['server']['time'] - $SUMO['config']['accounts']['registration']['life'] * 3600);\n\n\t$SUMO['DB']->Execute($query);\n}", "function purge_user($con,$username) {\n\t\t$delete = mysqli_query ($con,\"delete from socntwk.WHOISONLINE where upper(user_name)=upper('$username')\");\n\t\tif (!$delete) {\n\t\t\t$this->error[$this->i] = \"Unable to delete visitors\";\n\t\t\t$this->i++;\n\t\t}\n}", "function ignore($ban_length=0){\n\t\t\tglobal $x7s, $db, $prefix;\n\t\t\t$time = time();\n\t\t\t$db->DoQuery(\"INSERT INTO {$prefix}muted VALUES('0','$x7s->username','$this->user')\");\n\t\t}", "public function review_notice_data_remove() {\n\t\t$get_all_users = get_users();\n\t\t$theme_installed_time = get_option( 'sydney_theme_installed_time' );\n\n\t\t// Delete options data.\n\t\tif ( $theme_installed_time ) {\n\t\t\tdelete_option( 'sydney_theme_installed_time' );\n\t\t}\n\n\t\tforeach ( $get_all_users as $user ) {\n\t\t\t$ignored_notice = get_user_meta( $user->ID, 'sydney_disable_review_notice', true );\n\t\t\t$ignored_notice_partially = get_user_meta( $user->ID, 'delay_sydney_disable_review_notice_partially', true );\n\n\t\t\tif ( $ignored_notice ) {\n\t\t\t\tdelete_user_meta( $user->ID, 'sydney_disable_review_notice' );\n\t\t\t}\n\n\t\t\tif ( $ignored_notice_partially ) {\n\t\t\t\tdelete_user_meta( $user->ID, 'delay_sydney_disable_review_notice_partially' );\n\t\t\t}\n\t\t}\n\t}", "public function unsetResetRequestTime();", "function give_v152_cleanup_users() {\n\n\t$give_version = get_option( 'give_version' );\n\n\tif ( ! $give_version ) {\n\t\t// 1.0 is the first version to use this option so we must add it.\n\t\t$give_version = '1.0';\n\t}\n\n\t$give_version = preg_replace( '/[^0-9.].*/', '', $give_version );\n\n\t// v1.5.2 Upgrades\n\tif ( version_compare( $give_version, '1.5.2', '<' ) || ! give_has_upgrade_completed( 'upgrade_give_user_caps_cleanup' ) ) {\n\n\t\t// Delete all caps with \"ss\".\n\t\t// Also delete all unused \"campaign\" roles.\n\t\t$delete_caps = array(\n\t\t\t'delete_give_formss',\n\t\t\t'delete_others_give_formss',\n\t\t\t'delete_private_give_formss',\n\t\t\t'delete_published_give_formss',\n\t\t\t'read_private_forms',\n\t\t\t'edit_give_formss',\n\t\t\t'edit_others_give_formss',\n\t\t\t'edit_private_give_formss',\n\t\t\t'edit_published_give_formss',\n\t\t\t'publish_give_formss',\n\t\t\t'read_private_give_formss',\n\t\t\t'assign_give_campaigns_terms',\n\t\t\t'delete_give_campaigns',\n\t\t\t'delete_give_campaigns_terms',\n\t\t\t'delete_give_campaignss',\n\t\t\t'delete_others_give_campaignss',\n\t\t\t'delete_private_give_campaignss',\n\t\t\t'delete_published_give_campaignss',\n\t\t\t'edit_give_campaigns',\n\t\t\t'edit_give_campaigns_terms',\n\t\t\t'edit_give_campaignss',\n\t\t\t'edit_others_give_campaignss',\n\t\t\t'edit_private_give_campaignss',\n\t\t\t'edit_published_give_campaignss',\n\t\t\t'manage_give_campaigns_terms',\n\t\t\t'publish_give_campaignss',\n\t\t\t'read_give_campaigns',\n\t\t\t'read_private_give_campaignss',\n\t\t\t'view_give_campaigns_stats',\n\t\t\t'delete_give_paymentss',\n\t\t\t'delete_others_give_paymentss',\n\t\t\t'delete_private_give_paymentss',\n\t\t\t'delete_published_give_paymentss',\n\t\t\t'edit_give_paymentss',\n\t\t\t'edit_others_give_paymentss',\n\t\t\t'edit_private_give_paymentss',\n\t\t\t'edit_published_give_paymentss',\n\t\t\t'publish_give_paymentss',\n\t\t\t'read_private_give_paymentss',\n\t\t);\n\n\t\tglobal $wp_roles;\n\t\tforeach ( $delete_caps as $cap ) {\n\t\t\tforeach ( array_keys( $wp_roles->roles ) as $role ) {\n\t\t\t\t$wp_roles->remove_cap( $role, $cap );\n\t\t\t}\n\t\t}\n\n\t\t// Create Give plugin roles.\n\t\t$roles = new Give_Roles();\n\t\t$roles->add_roles();\n\t\t$roles->add_caps();\n\n\t\t// The Update Ran.\n\t\tupdate_option( 'give_version', preg_replace( '/[^0-9.].*/', '', GIVE_VERSION ), false );\n\t\tgive_set_upgrade_complete( 'upgrade_give_user_caps_cleanup' );\n\t\tdelete_option( 'give_doing_upgrade' );\n\n\t}// End if().\n\n}", "function delete_user($con,$username,$dcount) {\n if($dcount!=0){\n\t\t$delete = mysqli_query ($con,\"delete from socntwk.WHOISONLINE \n\t\twhere TIMESTAMPDIFF(MINUTE,time,NOW()) >10\");\n\t\tif (!$delete) {\n\t\t\t$this->error[$this->i] = \"Unable to delete visitors\";\n\t\t\t$this->i++;\n\t\t}\n\t\t}\n\t\telse\n\t\t$this->i;\n}", "public function delete() {\n\t\t$sql = \"DELETE FROM\twcf\".WCF_N.\"_user_option\n\t\t\tWHERE\t\toptionID = \".$this->optionID;\n\t\tWCF::getDB()->sendQuery($sql);\n\t\t\n\t\t$sql = \"ALTER TABLE\twcf\".WCF_N.\"_user_option_value\n\t\t\tDROP \t\tuserOption\".$this->optionID;\n\t\tWCF::getDB()->sendQuery($sql);\n\t}", "function remove_inactives() {\n\t\t$time = time();\n\t\t$result = mysql_query(\"SELECT * FROM active_users\");\n\t\t\n\t\twhile ($row = mysql_fetch_assoc($result)) {\n\t\t\techo $time - $row['time'];\n\t\t\tif ($time - $row['time'] > 7200) {\n\t\t\t\t$uid = $row['uid'];\n\t\t\t\tmysql_query(\"DELETE FROM active_users WHERE uid='$uid'\");\n\t\t\t}\n\t\t}\t\t\n\t}", "public static function my_deactivation()\r\n\t{\r\n\t\tdelete_option(self::opt);\r\n\t}", "function Aastra_remove_parking_Asterisk($user)\n{\n# Retrieve current configuration\n$data=Aastra_get_user_context('parking','user');\n\n# User is there\nif(in_array($user,$data)) \n\t{\n\t# Remove the user\n\t$data=array_flip($data);\n\tunset($data[$user]);\n\t$data=array_flip($data);\n\n\t# Save configuration\n\tAastra_save_user_context('parking','user',$data);\n\t}\n}", "private function _unlimitedTime()\n\t{\n\t\t$this->_addReply(['Session-Timeout'=>0]);\n\t}", "public function unblock()\n {\n $this->status = $this->status & ~User::STATUS_BLOCK;\n return $this->save();\n }", "public function settingsDeactivate()\n\t{\n\t\tif(hasSetting('user-request'))\n\t\t{\n\t\t\tdeleteSetting('user-request', false);\n\t\t}\n\t}", "public function delete() {\n\t\t$this->acquired = false;\n\t\n\t\tglobal $wpdb;\n\t\t$wpdb->query($wpdb->prepare(\"DELETE FROM {$wpdb->options} WHERE option_name = %s\", $this->option_name));\n\n\t\t$this->log('Lock option ('.$this->option_name.', '.$wpdb->options.') was deleted from the database');\n\t}", "function delete_user_setting($names)\n{\n}", "protected function maybe_update_options() {\n $current_version = get_option( 'laterpay_plugin_version' );\n\n if ( version_compare( $current_version, '0.9.8.1', '>=' ) ) {\n delete_option( 'laterpay_plugin_is_activated' );\n }\n\n if ( version_compare( $current_version, '0.9.14', '>=' ) ) {\n delete_option( 'laterpay_access_logging_enabled' );\n }\n\n if ( version_compare( $current_version, '0.9.25', '>' ) ) {\n delete_option( 'laterpay_version' );\n }\n\n // actualize sandbox creds values\n LaterPay_Helper_Config::prepare_sandbox_creds();\n }", "public function resetTimeLimits()\n {\n unset($this->options['SubmittedFromDate']);\n unset($this->options['SubmittedToDate']);\n }", "public function eraseCredentials() : void\n {\n // Unused, there is nothing to hide.\n }", "function Aastra_remove_vmail_Asterisk($vmbox,$user,$count=False)\n{\n# No update\n$update=False;\n\n# Retrieve current configuration\n$data=Aastra_get_user_context('vmail','user');\n\n# Specific VMBox\nif($vmbox!='') $array[$vmbox]='';\nelse $array=$data;\n\n# Browse all mailboxes\nforeach($array as $vmbox=>$value)\n\t{\n\tif(isset($data[$vmbox]['user']))\n\t\t{\n\t\tif(in_array($user,$data[$vmbox]['user'])) \n\t\t\t{\n\t\t\t# Remove the user\n\t\t\t$temp=array_flip($data[$vmbox]['user']);\n\t\t\tunset($temp[$user]);\n\t\t\t$temp=array_flip($temp);\n\t\t\tif(count($temp)!=0) \n\t\t\t\t{\n\t\t\t\t$data[$vmbox]['user']=$temp;\n\t\t\t\tif($count and $data[$vmbox]['count']>0) $data[$vmbox]['count']--;\n\t\t\t\t}\n\t\t\telse unset($data[$vmbox]);\n\n\t\t\t# Update needed \n\t\t\t$update=True;\n\t\t\t}\n\t\t}\n\t}\n\n# Save configuration\nif($update) Aastra_save_user_context('vmail','user',$data);\n}", "function Aastra_delete_busy_message_Asterisk($user)\n{\nGlobal $AA_VM_BOXBASE;\n\n# Translate user if needed\n$user=Aastra_get_userdevice_Asterisk($user);\n\n# Delete temporary message\n$dir=$AA_VM_BOXBASE.'/'.$user;\n@unlink($dir.'/busy.wav');\n@unlink($dir.'/busy.WAV');\n}", "function clearOldChallenges() {\n\t\t$this->mdb->query(\"DELETE challenge FROM challenge WHERE timestamp < (NOW() - INTERVAL 2 MINUTE)\");\n\t}", "public static function do_block_user($user_id){\n\tglobal $base;\n\t$clean_user = $base->clear_string($user_id);\n\t\n\t$sql = \"UPDATE users SET active = '0' WHERE user_id = '{$clean_user}'\"; \n\t$base->select_table($sql);\n}", "public function delete () {\n\t\t\t// Simply, set expire to now\n\t\t\tMage::getModel (\"core/cookie\")->set ( $this->_createUserHash (), \"\", 0 );\n\t\t}", "public function clear_data() {\n\t\t$this->revokeToken();\n\t\tdelete_option( $this->option_access_token );\n\t\tdelete_option( $this->option_refresh_token );\n\t}", "public function clear_unpaid_signups()\n {\n $sql = 'delete from ' . $this->table_name . \n ' where status = \\'unpaid\\' and created < NOW() - interval ' .\n self::UNPAID_REG_TIME_LIMIT . ' second';\n $this->wpdb->query($sql);\n }", "public static function cleaner() {\n\t\t\tglobal $wpdb;\n\n\t\t\t$timestamp = time() - 24 * HOUR_IN_SECONDS; // expired x hours ago.\n\t\t\t$time_start = time();\n\t\t\t$time_limit = 30;\n\t\t\t$batch = 100;\n\n\t\t\t// @todo Look at site transients too.\n\t\t\t// Don't take longer than $time_limit seconds.\n\t\t\twhile ( time() < $time_start + $time_limit ) {\n\t\t\t\t$option_names = $wpdb->get_col( \"SELECT `option_name` FROM {$wpdb->options} WHERE `option_name` LIKE '\\_transient\\_timeout\\_%'\n\t\t\t\t\tAND CAST(`option_value` AS UNSIGNED) < {$timestamp} LIMIT {$batch};\" );\n\n\t\t\t\tif ( empty( $option_names ) )\n\t\t\t\t\tbreak;\n\n\t\t\t\t// Add transient keys to transient timeout keys.\n\t\t\t\tforeach ( $option_names as $key => $option_name )\n\t\t\t\t\t$option_names[] = '_transient_' . substr( $option_name, 19 );\n\n\t\t\t\t// Create a list to use with MySQL IN().\n\t\t\t\t$options_in = implode( ', ', array_map( function( $item ) use ( $wpdb ) {\n\t\t\t\t\treturn $wpdb->prepare( '%s', $item );\n\t\t\t\t}, $option_names ) );\n\n\t\t\t\t// Delete transient and transient timeout fields.\n\t\t\t\t$wpdb->query( \"DELETE FROM {$wpdb->options} WHERE `option_name` IN ({$options_in});\" );\n\n\t\t\t\t// Break if no more deletable options available.\n\t\t\t\tif ( count( $option_names ) < $batch * 2 )\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "public function lockoutUser($username)\n {\n $endpoint = '/lockouts/'.$username; \n return $this->doRequest('post', $endpoint);\n }", "function delete_version_option() {\n\t\t\tdelete_option($this->version_option);\n delete_option($this->changelog_option);\n\t\t}", "public function unlockUser($username)\n {\n $endpoint = '/lockouts/'.$username; \n return $this->doRequest('delete', $endpoint);\n }", "function delete_all_user_settings()\n{\n}", "function deleteBannedUser() {\n\n}", "function blockUser($userinfo, &$existinguser, &$status)\r\n {\r\n }", "public function lockoutUser($username)\n {\n $endpoint = '/lockouts/'.$username; \n return $this->doRequest('POST', $endpoint);\n }", "protected function stop_capturing_option_updates()\n {\n }", "function clearAllChallenges($username) {\n\t\t$this->mdb->query(\"DELETE challenge FROM challenge WHERE gameUser1Id = %s OR gameUser2Id = %s\", $username, $username);\n\t}", "function delete_jail_finish()\r\n\t\t{\r\n\t\t\t $time = time();\r\n\r\n\t\t\t $result = mysql_query(\"select action_time from `check` where `jail` = '1' and `users_id` = '{$_SESSION['SP_USER_ID']}' LIMIT 1\") or FUNCTIONS::debug(mysql_error(), \"mysql_actions\", __LINE__);\r\n\t\t\t if($row = mysql_fetch_object($result))\r\n\t\t\t\t if(FUNCTIONS::get_date_min($row->action_time) >= 5){ // after 1 min\r\n\t\t\t\t\t mysql_query(\"DELETE FROM `actions` WHERE `type` = 'jail' and `users_id` = '{$_SESSION['SP_USER_ID']}'\") or FUNCTIONS::debug(mysql_error(), \"mysql_actions\", __LINE__);\r\n\t\t\t\t\t mysql_query(\"update `check` set `jail` = '0' where `users_id` = '{$_SESSION['SP_USER_ID']}'\") or FUNCTIONS::debug(mysql_error(), \"mysql_actions\", __LINE__);\r\n\t\t\t }\r\n\t\t}", "public function unlockUser($username)\n {\n $endpoint = '/lockouts/'.$username; \n return $this->doRequest('DELETE', $endpoint);\n }", "public function unMuteUser($username)\n {\n $db = $_SESSION[\"database\"];\n $db->delete(\"MutedUser\", \"ClassID = '$this->id' AND Username = '$username'\");\n }", "private function delete_from_user_options( $transient ) {\n\t\t$prefixed_transient_timeout = $this->get_transient_timeout_for_user_options( $transient );\n\t\t$this->user_options->delete( $prefixed_transient_timeout );\n\n\t\t$prefixed_transient = $this->get_transient_name_for_user_options( $transient );\n\t\treturn $this->user_options->delete( $prefixed_transient );\n\t}", "public function autoUnlockAccount($username) {\r\n $flag = false;\r\n $criteria = new CDbCriteria();\r\n $criteria->condition='email = :username or username = :username'; \r\n $criteria->params=array(':username'=>$username);\r\n $user=Users::model()->find($criteria);\r\n if ($user == null) return $flag;\r\n $comments = \"if the account is locked attempt to unlocked it\\n\";\r\n $comments .= \"if the there is not failed attempt in the last 15 minutes.\\n\";\r\n if ($user->locked) {\r\n $now=strtotime(date('Y-m-d H:m:s'));\r\n $failed_attempt_at = strtotime($user->failed_attempt_at);\r\n $span = $now - $failed_attempt_at;\r\n if ($span > 60) {\r\n $min = (int)($span/60);\r\n if ($min > 15) {\r\n $user->setAttributes(array(\r\n 'locked' => false,\r\n 'failed_attempt' => 0,\r\n 'modified_at' => new CDbExpression('NOW()'),\r\n ));\r\n $flag = $user->save(false);\r\n }\r\n } \r\n }\r\n return $flag;\r\n }", "public static function deactivate() {\n\t\tdo_action( 'clear_os_cache' ); \n\t\tdelete_option( 'host_name' );\n\t\tdelete_option(' mo_firebase_authentication_lv' );\n\t\tdelete_option(' mo_firebase_authentication_lk' );\n\t\tdelete_option( 'mo_firebase_authentication_new_registration' );\n\t\tdelete_option( 'mo_firebase_authentication_admin_phone' );\n\t\tdelete_option( 'mo_firebase_authentication_verify_customer' );\n\t\tdelete_option( 'mo_firebase_authentication_admin_customer_key' );\n\t\tdelete_option( 'mo_firebase_authentication_admin_api_key' );\n\t\tdelete_option( 'mo_firebase_authentication_new_customer' );\n\t\tdelete_option( 'mo_firebase_authentication_customer_token' );\n\t\tdelete_option( 'mo_firebase_auth_message' );\n\t\tdelete_option( 'mo_firebase_authentication_registration_status' );\n\t\tdelete_option( 'mo_firebase_authentication_current_plugin_version' );\n\t}", "public function userBanLifted($username)\n\t{\n\t\ttry\n\t\t{\n\t\t\t$query = 'DELETE FROM authentification WHERE username = ?';\n\t\t\t$stmt = $this->pdo->prepare($query);\n\t\t\t$stmt->bindParam(1, $username);\n\t\t\t$stmt->execute();\n\t\t}\n\t\t\n\t\tcatch(PDOException $e)\n {\n echo \"Error working with the database: \".$e;\n }\n \n finally\n {\n\t\t\tunset($stmt);\n }\t\t\n\t}", "static function block_user($user_name, $blocker, $period = 0) {\r\n\t\t# check that $user_name exists\r\n\t\t$user_id_arr = simple_select('users', 'email', $user_name, 'user_id', ' AND deleted_ind = 0');\r\n\t\t\r\n\t\tif($user_id_arr) {\r\n\t\t\t$arr_upd = array('blocked_ind' => 1);\r\n\t\t\tupdate_array_db('users', 'user_id', $user_id_arr['user_id'], $arr_upd);\r\n\t\t\t\r\n\t\t\t$now = new date_time(date('Y-m-d'), date('H:i:s'));\r\n\t\t\tif($period)\r\n\t\t\t\t$now_plus_period = $now->plus_mins($period);\r\n\t\t\telse\r\n\t\t\t\t$now_plus_period = new date_time('2038-01-01', '00:00:00');\r\n\r\n\t\t\t$arr_ins = array('user_id' => $user_id_arr['user_id'], \r\n\t\t\t\t\t\t\t 'reason' => wrong_login .' + 6 '. tries, \r\n\t\t\t\t\t\t\t 'block_datetime' => $now->datetime, \r\n\t\t\t\t\t\t\t 'blocked_until_datetime' => $now_plus_period->datetime,\r\n\t\t\t\t\t\t\t 'blocked_by' => $blocker,\r\n\t\t\t\t\t\t\t 'blocked_IP' => $_SERVER['REMOTE_ADDR']);\r\n\t\t\t\t\t\t\t \r\n\t\t\tinsert_array_db('blocks', $arr_ins);\r\n\t\t}\t\r\n\t}", "function agreement_user_delete(&$dh)\n{\n global $mybb, $db;\n\n if (isset($mybb->settings['ag_ip_del_user']) && $mybb->settings['ag_ip_del_user'] == 1) {\n // Get the uid's of the deleted users\n $delete_uids = implode(',', $dh->delete_uids);\n\n // Purge all stored IP addresses of the deleted users\n $db->update_query('posts', array('ipaddress' => ''), \"uid IN({$delete_uids})\");\n $db->update_query('privatemessages', array('ipaddress' => ''), \"fromid IN({$delete_uids})\");\n $db->update_query('moderatorlog', array('ipaddress' => ''), \"uid IN({$delete_uids})\");\n $db->update_query('adminlog', array('ipaddress' => ''), \"uid IN({$delete_uids})\");\n $db->update_query('maillogs', array('ipaddress' => '','fromemail' => ''), \"fromuid IN({$delete_uids})\");\n $db->update_query('threadratings', array('ipaddress' => ''), \"uid IN({$delete_uids})\");\n $db->update_query('searchlog', array('ipaddress' => ''), \"uid IN({$delete_uids})\");\n // Delete poll IP's only in MyBB 1.8.15 and later\n if ($mybb->version_code >= 1815) {\n $db->update_query('pollvotes', array('ipaddress' => ''), \"uid IN({$delete_uids})\");\n }\n }\n}", "function remove_user_for_system($handle, $id_user)\n{\n\tckeck_sa_user($handle, $id_user);\n\t//recuperamos el usuario para eleliminar el resto de perfiles del usuario\t\n\t$result=$handle->query(\"SELECT user_name, dni FROM users WHERE dni='$id_user'\");\n\t$com=$result->fetch_assoc();\n\t$us=$com[\"user_name\"];\n\t// efectuamos la eliminaciones necesarias\n\t$handle->query(\"DELETE FROM paging_settings WHERE id_user='$us'\");\n\t$handle->query(\"DELETE FROM users_online WHERE id_user='$us'\");\n\t$handle->query(\"DELETE FROM users WHERE dni='$id_user'\");\n\t$handle->query(\"DELETE FROM bus_for_user WHERE user_name='$id_user'\");\n\t$handle->query(\"DELETE FROM chat_users WHERE username='$id_user'\");\n\t$handle->query(\"DELETE FROM config_mp WHERE user_name='$id_user'\");\n\t// mostramos mensaje de confirmacion\n\tok_remove_user();\n}", "function limitthreads_deactivate()\r\n{\r\n\tglobal $db, $cache;\n\tif($db->field_exists(\"maxthreadsday\", \"usergroups\"))\n\t{\n\t\t$db->drop_column(\"usergroups\", \"maxthreadsday\");\n\t}\n\n\t$cache->update_usergroups();\n}", "function removeLock() ;", "public function resetTimeLimits()\n {\n unset($this->options['StartDate']);\n unset($this->options['EndDate']);\n }", "function eraseCredentials()\n {\n\n }", "function Aastra_delete_unavail_message_Asterisk($user)\n{\nGlobal $AA_VM_BOXBASE;\n\n# Translate user if needed\n$user=Aastra_get_userdevice_Asterisk($user);\n\n# Delete temporary message\n$dir=$AA_VM_BOXBASE.'/'.$user;\n@unlink($dir.'/unavail.wav');\n@unlink($dir.'/unavail.WAV');\n}", "public static function rejectPendingUserByUsername ($username) {\n return DB::table('pending_users')->where('username', $username)->delete(); \n \n }", "function dev_clear_get_users_cache() {\n\n\tglobal $wpdb;\n\n\t$wpdb->get_results( $wpdb->prepare( \"DELETE FROM $wpdb->options WHERE option_name LIKE '%s'\", '_transient_dev_list_users_%' ) );\n\n}", "function delete_user(){ // Delte User\n\t\t\t\n\t}", "function pwm_remove_subscription($entry_id, $user_id ){\n\tupdate_user_meta( $user_id, 'pwm_subscribed_till_end', '' );\n\t\n\t//downgrade role if necessary. make sure its not an admin!\n\tpwm_remove_user_role( $user_id, 'employer-recruiter-50' );\n\n}", "public function clearUserSettingss()\n {\n $this->collUserSettingss = null; // important to set this to NULL since that means it is uninitialized\n }", "private function resetTimeLimit(): void\n {\n \\set_time_limit($this->configuration->getTimeLimit());\n }", "function clearOneChallenge($username1, $username2) {\n\t\t$this->mdb->query(\"DELETE challenge FROM challenge WHERE (gameUser1Id = %s AND gameUser2Id = %s) \n\t\t\tOR (gameUser2Id = %s AND gameUser1Id = %s)\", $username1, $username2, $username1, $username2);\n\t}", "function CUSTOM_userSave($uid)\n{\n global $_CONF, $_TABLES;\n\n $cooktime = 0;\n if (isset ($_POST['cooktime'])) {\n $cooktime = COM_applyFilter ($_POST['cooktime'], true);\n if ($cooktime < 0) {\n $cooktime = 0;\n }\n\n DB_query(\"UPDATE {$_TABLES['users']} SET cookietimeout = $cooktime WHERE uid = $uid\");\n }\n}", "function dismiss_update_notice() {\r\r\n\t\t// Check the nonce and if not isset the id, just die.\r\r\n\t\tif ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( $_POST['nonce'], 'cf7skins_update_notice' ) ) {\r\r\n\t\t\tdie();\r\r\n\t\t}\r\r\n\t\t\r\r\n\t\t// Set skip interval based on current time\r\r\n\t\tupdate_option( 'cf7skins_update_notice', current_time( 'timestamp' ) + $this->skip_interval );\r\r\n\t\t\r\r\n\t\texit();\r\r\n\t}", "public function disable() {\n\t\t$this->userEnabled = false;\n\t}", "public function unsetTemporaryUser()\n {\n $this->currentUser = null;\n }", "function time_unlock_account() \n\t{\n\t\n\t\tif (defined(\"ACCOUNT_LOCKOUT_TIME\") && ACCOUNT_LOCKOUT_TIME > 0)\n\t\t{\n\n\t\t\t$lockout_time=ACCOUNT_LOCKOUT_TIME.\" minutes\";\n\t\t\t\n\t\t\t// see if this user has been locked out and if the lockout time has passed\n\t\t\t$sql = \"SELECT * FROM auth_accountperm WHERE account_id='\".$this->accountId.\"' AND failed_logins_locked=TRUE AND locked_time < now() - INTERVAL '$lockout_time'\";\n\t\t\t$login_attempts = $this->DB->single($sql);\n\t\t\t\n\t\t\tif ($login_attempts[\"failed_logins_locked\"]==\"t\")\n\t\t\t{\n\t\t\t\t$sql = \"UPDATE auth_accountperm SET failed_logins_locked=FALSE,enable=TRUE,locked_time=NULL WHERE account_id='\".$this->accountId.\"';\";\n\t\t\t\t$this->DB->query($sql);\n\t\t\t}\n\t\t\n\t\t}\n\n\t}", "public function clearExpiry();", "function auto_logout($field) {\r\n $t = time();\r\n $t0 = $_SESSION[$field];\r\n $diff = $t - $t0;\r\n if ($diff > 6000 || !isset($t0))\r\n { \r\n return true;\r\n }\r\n else\r\n {\r\n $_SESSION[$field] = time();\r\n }\r\n }", "private function removeCurlOptions()\n {\n $this->_curlUserOptions = [];\n }", "function clleague_user_delete($account) {\n\tclleague_anonimize_league_participant($account->uid);\n}", "public function resetUser($username)\n\t{\n\t\t$user = $this->deleteBlockUntil($username);\n\t\t$loginAttempts = $this->deleteLoginAttempts($username);\n\n\t\treturn $user && $loginAttempts;\n\t}", "public function reset($user);", "public function DeletePassword()\n {\n if(!Controller::checkPower(1))\n return false;\n \n $block = 1;\n \n if(isset($_POST['uIdSubmitted']) && !empty($_POST['uId']))\n {\n $uId = $_POST['uId'];\n $block = 2;\n }\n if(isset($_POST['submitFinal']) && isset($_POST['uIdFinal']))\n {\n $uId = $_POST['uIdFinal'];\n \n $oUser = User :: getById($uId) ;\n if(is_object($oUser))\n {\n if($oUser->passwordState != PasswordState::IS_UNAVIABLE)\n {\n $oUser->passwordState = PasswordState::NO_PASSWORD; \n $md5Password = \"\";\n $oUser->setMd5Password($md5Password);\n $oUser->forceSave();\n $message = 'Reset Success'; \n } else $message = 'User ko hop le';\n } else $message = 'User ko ton tai'; \n \n $block = 3;\n }\n if(isset($_POST['cancel']))\n {\n \n $message = 'Admin Canceled';\n $block = 3 ;\n }\n \n include TPL_DIR.'/DeletePassword.php';\n }", "static function deactivate() {\r\n delete_option( 'cs_jobhunt_plugin_activation' );\r\n delete_option( 'cs_jobhunt', false );\r\n }", "function SePoll_uninstall () {\r\tdelete_option('widget_SePoll');\r}", "static function clearOutOfDates() {\n \t$meg = new System_message();\n \t$qry = \"DELETE FROM receive_sysmes WHERE created < '%s'\";\n \t$date = date(\"Y-m-d\", strtotime(\"-1 Month\")) .\" 00:00:00\";\n \t$meg->query(sprintf($qry, $date));\n }", "public function releaseUserName()\n {\n $dateTime = new \\DateTime($this->dtString);\n $timeLimit = new \\DateTime(\"$this->dtString - $this->blockUsernamesFor\");\n $this->requestCountsManager->releaseCountsForUserName($this->username, $dateTime, $timeLimit);\n }", "function unkick_user($clan, $user)\n{\n $kicked_users = get_kicked_users($clan);\n\n if (($key = array_search($user, $kicked_users)) !== false)\n unset($kicked_users[$key]);\n\n file_put_contents(\"$clan.kicked\", serialize($kicked_users));\n\n return $kicked_users;\n}", "public function unblock()\n {\n $this->blocked_at = null;\n\n return $this->save(false);\n }", "function bp_core_remove_data( $user_id ) {\r\n\t/* Remove usermeta */\r\n\tdelete_user_meta( $user_id, 'last_activity' );\r\n\r\n\t/* Flush the cache to remove the user from all cached objects */\r\n\twp_cache_flush();\r\n}", "function deleteGuestUser($options){\n\t\t$this->db->where('user_id', $options['userID']);\n\t\t$this->db->delete('event_attendee_companion');\n\n\t\t$this->db->where('userID', $options['userID']);\n\t\t// delete cache\n\t\t$this->db->cache_delete_all();\n \treturn $this->db->delete($this->tableName);\n\t}", "function adrotate_clean_trackerdata() {\n\tglobal $wpdb;\n\n\t$removeme = current_time('timestamp') - 86400;\n\t$wpdb->query(\"DELETE FROM `\".$wpdb->prefix.\"adrotate_tracker` WHERE `timer` < \".$removeme.\";\");\n}", "function unTempLocked() {\r\n if ($this->Session->check('Login.WrongNum') && $this->Session->check('Login.id')) {\r\n $this->unlockUser($this->Session->read('Login.id'));\r\n }\r\n $this->Session->delete('Login');\r\n }", "public function removeUser()" ]
[ "0.61089784", "0.594005", "0.58645636", "0.5802182", "0.5636671", "0.55362445", "0.54658085", "0.53929716", "0.53555614", "0.5343282", "0.53410745", "0.5338677", "0.53340113", "0.5309509", "0.5302525", "0.52613974", "0.52514035", "0.5228407", "0.52122", "0.5207073", "0.5200456", "0.5188045", "0.51680654", "0.5148989", "0.5146704", "0.51452804", "0.51414454", "0.5132415", "0.51162714", "0.51033425", "0.5090198", "0.507266", "0.50363714", "0.50341", "0.50258785", "0.50108516", "0.4996406", "0.49637365", "0.4946281", "0.49288505", "0.4919679", "0.49114996", "0.49050897", "0.49033728", "0.49030426", "0.48905143", "0.4884557", "0.48776433", "0.4871296", "0.4863281", "0.4859165", "0.48567033", "0.485359", "0.48525771", "0.48464316", "0.4841384", "0.48241538", "0.48170298", "0.48081756", "0.48040795", "0.48018247", "0.4799185", "0.4796709", "0.47943172", "0.4790873", "0.47890532", "0.47880122", "0.47852957", "0.4783433", "0.4781029", "0.4780082", "0.4773055", "0.4771491", "0.4765729", "0.47607905", "0.47569025", "0.47527605", "0.47508025", "0.47394627", "0.47373074", "0.47337076", "0.47318882", "0.4728221", "0.47278237", "0.4720347", "0.4716715", "0.4715452", "0.47085586", "0.47066122", "0.47047126", "0.4703991", "0.47027948", "0.47021177", "0.47006524", "0.46994293", "0.46971813", "0.4696383", "0.46932963", "0.46914026", "0.4689194" ]
0.78211594
0
Encodes given Username to SHA1
Кодирует заданный Username в SHA1
function encodeUsername($username) { return sha1($username); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function non_salted_sha1($pass)\n{\n return \"{SHA}\" . base64_encode(pack(\"H*\", sha1($pass)));\n}", "function encryptar($nickname, $contrasenia){\n\t$retorno=\"\";\n $retorno=$nickname.$contrasenia;\n $retorno = sha1($retorno);\n $retorno = substr($retorno, 0, -1*strlen($retorno)+10);\n return $retorno;\n}", "protected function hash($username)\n {\n return base64_encode(\n hash_hmac(\n 'sha256',\n $username.$this->clientId,\n $this->clientSecret,\n true\n )\n );\n }", "public function encryptPassword() {\n\t\t$this->password = sha1($this->password . strtolower($this->username));\t\n\t}", "function bvEncodeUser($userID, $sharedkey){\n\n\t\t$userString = 'date=' . date('Ymd') . '&userid=' . $userID;\n\t\t\n\t\treturn md5($sharedkey . $userString) . bin2hex($userString);\n}", "public static function encryptDigestHA1($realm, $username, $password)\n\t{\n\t\treturn md5($username . \":\" . $realm . \":\" . $password);\n\t}", "function MyEncriptSHA1($value){\n $vsecure = sha1($value);\n $char_pos = date('j');\n return(substr($vsecure, 0, $char_pos).\n substr($vsecure, $char_pos + 1).\n substr($vsecure, $char_pos, 1).time());\n}", "public function encodeSha1() {\n return new AdvanceStringProcesser(sha1($this->_s), $this->_encoding);\n }", "function encryption($string ,$salt = \"\")\n{\n return sha1($salt.$string); \n}", "public function encodePassword($raw, $salt);", "function toSHA1($str) {\n\t\treturn sha1($str);\n\t}", "protected function _sha1($password)\n\t{\n\t\treturn '{SHA}' . base64_encode(pack('H40', sha1($password)));\t\t\n\t}", "function sha1_raw($text)\r\n{\r\n\treturn sha1($text, true);\r\n}", "function encode_password($password)\n{\n return md5($password);\n}", "function getSha1() ;", "function encode_password($password) {\n return md5($password);\n}", "function encryptpass( $username, $password ) {\n if ( $password == $this->encryptedpass() )\n return $password;\n\n $new_sha_pass_hash = sha1( strtoupper( $username ) . \":\" . strtoupper( $password ) );\n return $new_sha_pass_hash;\n }", "function encryptPasswordString($password, $username) {\n $preparedString = $username . \"telcontar\" . $password . \"elessar\";\n $preparedString = strrev($preparedString);\n echo \"\\n$preparedString \\n\";\n $result = password_hash($preparedString, PASSWORD_DEFAULT);\n return $result;\n }", "function encode_password($password, $salt, $already_md5 = false)\n{\n if (!$already_md5)\n {\n $password = md5($password);\n }\n return md5($salt . $password);\n}", "public function encodePassword($password, $salt) {\n\t\treturn sha1($this->username . sha1($password . $salt));\n\t}", "public function getSha1() {}", "public function getSha1() {}", "public function createHash($username = \"\", $password = \"\")\n\t{\n\t\treturn $this->CI->realms->getEmulator()->encrypt($username, $password);\n\t}", "public function encode($password, $salt = null);", "function user_key($Username, $Password) {\n\treturn hash('sha512', $Username . $Password);\n}", "function build_cookie_hash($username)\n{\n return md5(strtolower($username).config_get('user', 'security', 'crypt_cookie_key'));\n}", "private function encriptaSenha($username, $password)\n {\n $w = trim($password);\n $t1 = strlen(trim($username));\n $t2 = strlen($w);\n\n if ($t2 < 1) {\n $password = '??????';\n $w = '??????';\n $t2 = 6;\n }\n\n while (strlen($w) < 15) {\n $w = $w . $w;\n }\n\n $w = substr($w, 1, 15);\n $k = ord((substr($w, 1, 1))) + 2;\n $s = '';\n $i = 0;\n\n while ($i < 15) {\n $i = $i + 1;\n $v = ($t1 + $t2) * $k / $i;\n $f = ord(substr($w, 1, 1));\n $w = substr($w, 2, 15);\n $j = (($f * $k) + $t1 + ($t2 * $f)) / $i;\n $v = $v + $j;\n if ($v < 33) {\n $v = $v + ($t1 * $i);\n }\n $j = $v % 94;\n $s = $s . (33 + $j);\n }\n\n return $s;\n }", "public static function encode($value) {\n\t\treturn md5(Constants::PASSWORD_SALT . $value . Constants::PASSWORD_SALT);\n\t}", "function password($str) { \n return '*'.strtoupper(sha1(pack('H*',sha1($str)))); \n }", "function sha1($str)\r\t{\r\t\tif (function_exists('mhash') && defined('MHASH_SHA1'))\r\t\t\treturn bin2hex(mhash(MHASH_SHA1, $str));\r\r\t\t$nblk = (strlen($str) + 8 >> 6) + 1;\r\t\t$blks = array_pad(array(), $nblk * 16, 0);\r\r\t\tfor ($i = 0; $i < strlen($str); $i++)\r\t\t\t$blks[$i >> 2] |= ord($str{$i}) << (24 - ($i % 4) * 8);\r\r\t\t$blks[$i >> 2] |= 0x80 << (24 - ($i % 4) * 8);\r\r\t\treturn sha1_core($blks, strlen($str) * 8);\r\t}", "function sha1($str)\n{\n return '';\n}", "function rand_salt_sha1($pass)\n{\n mt_srand((double)microtime() * 1000000);\n $salt = pack(\"CCCC\", mt_rand(), mt_rand(), mt_rand(), mt_rand());\n return \"{SSHA}\" . base64_encode(pack(\"H*\", sha1($pass . $salt)) . $salt);\n}", "public function base64EncodedAuthentication()\r\n\t{\r\n\t\treturn base64_encode($this->burd_api_username.\":\".$this->burd_api_password);\r\n\t}", "private function _sha1 ($str)\n {\n if (! function_exists('sha1'))\n {\n return bin2hex(mhash(MHASH_SHA1, $str));\n }\n else\n {\n return sha1($str);\n }\n }", "function au_hash_password($password, $user_name, $user_actcode){\n\n\t// Let's make the $extra_data\n\t$extra_data = $user_name . \":\" . $user_actcode;\n\n\t// Now let's hash this thing\n\treturn au_hash($password, $extra_data);\n\n}", "function urlhash_Encode( $in ) {\n\tglobal $urlhash_Hashids;\n\treturn $urlhash_Hashids->encode($in);\n}", "function ac_user_db_password_en_alg($str)\r\n{\r\n\treturn md5(substr($str, 0, strlen($str)/2)) . sha1(substr($str, strlen($str)/2));\r\n}", "function sed_hash_sha1($data, $salt)\r\n{\r\n\treturn hash('sha1', $data . $salt);\r\n}", "public function shaMisa($string);", "public function encrypt($data){\n return sha1($data);\n }", "function hash1($string)\n{\n return hash_hmac('sha1', $string, 'SomeRandomString', false);\n}", "function strEncode($s_str) {\n $s_str = base64_encode(\"@####@\".base64_encode(\"##pmetro##\".$s_str)); /// Salt are hard coded here for security reason\n $s_str = str_replace(\"==\", \"-EEQL-\", $s_str);\n return str_replace(\"=\", \"-EQL-\", $s_str);\n}", "function createPassword($publicsalt,$username,$salt1,$salt2,$password){\n \t$password=hash('sha512', $publicsalt.$username.$password.$salt1);\n \treturn $password=$password.$salt2;\n }", "public function encode($input = '') {\n $input =@ $this->crypt($input);\n if ($this->_type == self::B64) {\n $input = base64_encode($input);\n $input = strtr($input, array('+' => '-', '/' => '_', '=' => ''));\n } elseif ($this->_type == self::HEX) {\n $input = bin2hex($input);\n }\n return $input;\n }", "function encrypt_password($username, $password)\n{\n $salt = substr($username, 0, 2);\n $salt = '$1$' . str_pad($salt, 9, '0');\n $encrypted_password = crypt($password, $salt);\n\n return $encrypted_password;\n}", "function salt($unSaltedPass){\n\t\treturn sha1(md5($unSaltedPass)).$unSaltedPass;//sha1 - returns sha hash\n\t}", "public function hash(): string\n {\n $hash = md5('::' . $this->login . '::');\n\n // salt added to User's hash\n return substr($hash, 0, 8) .\n substr($hash, 24, 8) .\n substr($hash, 16, 8) .\n substr($hash, 8, 8);\n }", "public function cypher($string) {\n return sha1($string);\n }", "public function authenticationWithValidLatin1SpecialCharClassPassword() {}", "public function authenticationWithValidLatin1SpecialCharClassPassword() {}", "public function authenticationWithValidLatin1SpecialCharClassPassword() {}", "public function authenticationWithValidLatin1SpecialCharClassPassword() {}", "function password_hash($username, $password, $salt) {\n return hash(\"SHA512\", $username . $password . $salt );\n}", "function encPass($unEncPass){\n\t\treturn md5(salt($unEncPass));// md5 - returns 32 bit hash | We use salt to make the encrypted pass secure to rainbow attacks\n\t}", "function getBase64Encode($plainpassword){\n $result = base64_encode($plainpassword);\n return $result;\n}", "private function _encrypt_id($user_id) \n {\n // Create the hash\n $hex_salt = 'R1c?+r.VEfIN';\n $hex_hash = sha1($hex_salt . $user_id);\n // Convert user id to 8-digit hex\n $user_hex = $this->_zeropad(dechex($user_id), 8);\n // Interpolate hex into hash\n $cur_pos = 0;\n for ( $i = 0; $i <= 7; $i++ ) \n {\n $cur_pos += $i + 1; \n $hex_hash = substr_replace($hex_hash, substr($user_hex, $i, 1), $cur_pos, 1);\n }\n return $hex_hash;\n }", "public function encodePassword($raw, $salt): string\n {\n return \\password_hash($raw, \\PASSWORD_BCRYPT);\n }", "function makeKey($nickname, $password){\n //split nickname and password\n $nickname_key = str_split($nickname, 3);\n $password_key = str_split($password, 3);\n\n //using firt part split for make key\n $key = $nickname_key[0].$password_key[0];\n\n $key = openssl_digest ($key , \"sha256\");\n return $key;\n }", "function mgEncryptString($string, $key=SECURITY_KEY){\n\t\t//$key = sha1($key);\n\t\t$strLen = strlen($string);\n\t\t$keyLen = strlen($key);\n\t\t$j = 0; $hash=\"\";\n\t\tfor ($i = 0; $i < $strLen; $i++) {\n\t\t\t$ordStr = ord(substr($string,$i,1));\n\t\t\tif ($j == $keyLen) { $j = 0; }\n\t\t\t$ordKey = ord(substr($key,$j,1));\n\t\t\t$j++;\n\t\t\t$hash .= strrev(base_convert(dechex($ordStr + $ordKey),16,36));\n\t\t}\n\t\treturn $hash;\n\t}", "function encryptPassword($password) {\r\n // We then hash the password using Whirlpool (outputs 128 character hash)\r\n return hash('whirlpool', strtoupper($password));\r\n}", "private static function CreateShaPassHash() {\n if(!self::$username || !self::$password) {\n WoW_Log::WriteError('%s : username/password was not defined!', __METHOD__);\n return false;\n }\n self::$sha_pass_hash = sha1(strtoupper(self::$username) . ':' . strtoupper(self::$password));\n return true;\n }", "private function EncryptPassword() {\n\t\t\n\t\t$this->password = sha1( md5( $this->password ) );\n\t}", "public static function encode($value){ \n $key = PasswordHelper::check_keylength();\n if (!$value) {\n return false;\n }\n $text = $value;\n $ivSize = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);\n $iv = mcrypt_create_iv($ivSize, MCRYPT_RAND);\n $crypttext = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $text, MCRYPT_MODE_ECB, $iv);\n return trim(PasswordHelper::safe_b64encode($crypttext)); \n }", "function __hashID($user,$password=\"\") {\n\tGLOBAL $__salt;\n\t\n\t//addslashes in the case that we are inserting into an sql statement\n\t$user = addslashes($user);\n\t$password = addslashes($password);\n\t// enforce alphanumeric answer for user, to prevent stuff like $user=\"badcode!sef32fw3\"\n\t$user = PREG_REPLACE(\"/[^0-9a-zA-Z]/i\", '', $user);\n\t\n\t$posthashed = hash(\"sha256\",$user.$__salt.$password.$__salt);\n\t//password only hash will always have a '!' in front of it, to prevent people from typing the hash in the username\n\t// in order to bypass the password for no username passworded inboxes.\n\t// e.g. !dsafda will not recognize \"dsafda\" entered in the username box\n\t\n\tif( isset($password) and $password != \"\" ){\n\t\tfor( $i = strlen($posthashed) ; $i>=0 ; $i-- ){\n\t\t\t$hashIDstrings[] = $user.\"!\".substr($posthashed,0,$i);\n\t\t}\n\t\t$hashIDstrings[] = $user;\n\n\t} else {\n\t\t$hashIDstrings[] = $user;\n\t}\n\treturn $hashIDstrings;\n}", "function _inp_password($val){\n return base64_encode($val);\n }", "public function encryptPassword()\n {\n $this->{UserModel::PASSWORD} = sha1($this->{UserModel::PASSWORD});\n }", "public function encodePassword($raw, $salt)\n {\n return $raw;\n }", "function hashPassword($pPassword, $pSalt1=\"2345#$%@3e\", $pSalt2=\"taesa%#@2%^#\") { \n return sha1(md5($pSalt2 . $pPassword . $pSalt1)); \n}", "function encrypt($rawPassword,$salt)\n\t{\n\n\t\t$saltyInput = $rawPassword . $salt;\n\t\t$encrypted = base64_encode(hash(\"sha256\",$saltyInput ,true));\n\t\t\n\t\treturn $encrypted;\n\n\t}", "public function authenticationWithValidAlphaCharClassPasswordAndFixedHash() {}", "public function authenticationWithValidAlphaCharClassPasswordAndFixedHash() {}", "public function authenticationWithValidAlphaCharClassPasswordAndFixedHash() {}", "public function authenticationWithValidAlphaCharClassPasswordAndFixedHash() {}", "function passw_hash($password){return hash('sha256', $password.'salt1234!@#$');}", "function encrypt($password){\n for($i = 0; $i < strlen($password); $i++){\n $data.=ord($msg[$i]); \n }\n // Convert message digest into hex value\n $hashtext = bin2hex($data);\n\n while (length(hashtext) < 32) {\n hashtext = \"0\".hashtext;\n }\n return hashtext;\n }", "function encrypt_simple($string){\n return base64_encode(base64_encode(base64_encode($string)));\n}", "private function encode(?string $payload): string\n {\n return base64_encode(\n hash_hmac('sha256', $payload, $this->key, true)\n );\n }", "public static function encode($raw_str) {\n\t\t//$salt = date(\"dmY\");\n\t\t//$salt = \"fish\";\n\t\t//$encoded_str = trim(base64_encode(mcrypt_encrypt(MCRYPT_BLOWFISH, $salt, $raw_str, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_ECB), MCRYPT_RAND))));\n\t\t//$encoded_str = trim(base64_encode(mcrypt_encrypt(MCRYPT_BLOWFISH, $salt, $raw_str, MCRYPT_MODE_ECB)));\n\t\t//strtr($encoded_str, '+/=', '-.#');\n\t\t\n\t\t//return rtrim(strtr($encoded_str, '+/=', '-.#'),'#');\n\t\treturn $raw_str;\n\t\t\n\t\t\n\n }", "function encrypt_password($random_password) {\n return sha1($random_password);\n }", "public function passwordVersion2()\n {\n $mixed = implode('|', [\n $this->credentials['password'],\n $this->user->getAttribute('username'),\n ]);\n\n return base64_encode(hash('sha512', $mixed, true));\n }", "function encryptPassword( $str )\n{\n\n $qEncoded = md5($str );\n return( $qEncoded );\n}", "function hash($password){\n\t\t$secure_password = sha1($password);\n\t\treturn $secure_password;\n\t}", "function encrypt($a_username,$a_password) {\n\t\t$username = $a_username;\n\t\t$password = $key = $a_password;\n\t\t//Encrypt username.\n\t\t//setup Encryption\n\t\t$mc = mcrypt_module_open('rijndael-256','',MCRYPT_MODE_ECB,'');\n\t\t$iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($mc),MCRYPT_RAND);\n\t\t$key_lengh = mcrypt_enc_get_key_size($mc);\n\t\t\n\t\t//complet key.\n\t\t$key = substr($key,0,$key_lengh);\n\t\t// Intialize encryption \n\t\tmcrypt_generic_init($mc,$key,$iv);\n\t\t// Encrypt data \n\t\t$username = base64_encode(mcrypt_generic($mc,$username));\n\t\t//Close encrypt.\n\t\tmcrypt_generic_deinit($mc);\n\t\tmcrypt_module_close($mc);\n\t\t\n\t\t//create password.\n\t\t$password = hash('md5',$username.$password);\n\t\t\n\t\t\n\t\treturn $password;\n\t}", "function uid_encode($value)\n{\n $service = new UidGenerator;\n\n return $service->encode($value);\n}", "public function gerarSenha($user, $pass)\n {\n $pass1 = \"baseweb://{$user}:{$pass}\";\n $pass2 = sha1(md5($pass1));\n\n return $pass2;\n }", "public function encodePassword()\n {\n\n if ($this->getPasswordEncoder() && $this->getPlainPassword()) {\n $password = $this->getPasswordEncoder()->encodePassword($this->getPlainPassword(), $this->getSalt());\n $this->setPassword($password);\n }\n }", "function shaPassword($field = null, $salt = \"\") {\r\n\tif($field) {\r\n\t\treturn hash('sha256', $field.$salt);\r\n\t}\r\n}", "private function passwordToHash(string $password): string\n {\n return sha1($password);\n }", "protected static function hash_hmac_sha1($string, $key, $raw = true) {\n if (function_exists('hash_hmac')) {\n return hash_hmac('sha1', $string, $key, $raw);\n } else {\n return OAuth_Utils::php_hash_hmac('sha1', $string, $key, $raw);\n }\n }", "protected function _sha1($in)\n\t{\n\t\t//check if we can use the internal PHP sha1 funciton\n\t\tif(function_exists('sha1')){\n\t\t\treturn pack(\"H*\", sha1($in));\n\t\t}\n\t\t\n\t\t$indx = 0;\n\t\t$chunk = \"\";\n\t\t\n\t\t$A = array(1732584193, 4023233417, 2562383102, 271733878, 3285377520);\n\t\t$K = array(1518500249, 1859775393, 2400959708, 3395469782);\n\t\t$a = $b = $c = $d = $e = 0;\n\t\t$l = $p = $r = $t = 0;\n\t\t\n\t\tdo{\n\t\t\t$chunk = substr($in, $l, 64);\n\t\t\t$r = strlen($chunk);\n\t\t\t$l += $r;\n\t\t\t\n\t\t\tif ($r<64 && !$p++) {\n\t\t\t\t$r++;\n\t\t\t\t$chunk .= \"\\x80\";\n\t\t\t}\n\t\t\t\n\t\t\t$chunk .= \"\\0\\0\\0\\0\";\n\t\t\t\n\t\t\twhile (strlen($chunk) % 4 > 0) { \n\t\t\t\t$chunk .= \"\\0\";\n\t\t\t}\n\t\t\t\n\t\t\t$len = strlen($chunk) / 4;\n\t\t\tif ($len > 16) $len = 16;\n\t\t\t$fmt = \"N\" . $len;\n\t\t\t$W = array_values(unpack($fmt, $chunk));\n\t\t\tif ($r < 57 ) { \n\t\t\t\twhile (count($W) < 15) {\n\t\t\t\t\tarray_push($W, \"\\0\");\n\t\t\t\t}\n\t\t\t\t$W[15] = $l*8;\n\t\t\t}\n\t\t\t\n\t\t\tfor ($i = 16; $i <= 79; $i++) {\n\t\t\t\t$v1 = $this->_d($W, $i-3);\n\t\t\t\t$v2 = $this->_d($W, $i-8);\n\t\t\t\t$v3 = $this->_d($W, $i-14);\n\t\t\t\t$v4 = $this->_d($W, $i-16);\n\t\t\t\tarray_push($W, $this->_l($v1 ^ $v2 ^ $v3 ^ $v4, 1));\n\t\t\t}\n\t\t\t\n\t\t\tlist($a,$b,$c,$d,$e)=$A;\n\t\t\t\n\t\t\tfor ($i = 0; $i<=79; $i++) {\n\t\t\t\t$t0 = 0;\n\t\t\t\tswitch(intval($i/20)) {\n\t\t\t\t\tcase 1:\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\t$t0 = $this->_f1($b, $c, $d);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\t$t0 = $this->_f2($b, $c, $d);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$t0 = $this->_f0($b, $c, $d);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\n\t\t\t\t$t = $this->_m($t0 + $e + $this->_d($W, $i) + $this->_d($K, $i/20) + $this->_l($a, 5));\n\t\t\t\t$e = $d;\n\t\t\t\t$d = $c;\n\t\t\t\t$c = $this->_l($b,30);\n\t\t\t\t$b = $a;\n\t\t\t\t$a = $t;\n\t\t\t}\n\t\t\t\n\t\t\t$A[0] = $this->_m($A[0] + $a);\n\t\t\t$A[1] = $this->_m($A[1] + $b);\n\t\t\t$A[2] = $this->_m($A[2] + $c);\n\t\t\t$A[3] = $this->_m($A[3] + $d);\n\t\t\t$A[4] = $this->_m($A[4] + $e);\n\t\t\n\t\t} while ($r>56);\n\t\t\n\t\t$v = pack(\"N*\", $A[0], $A[1], $A[2], $A[3], $A[4]);\n\t\treturn $v;\n\t}", "public function authenticationWithValidLatin1UmlautCharClassPassword() {}", "function au_hash($input, $extra_data = '') {\n\n\t// The salt (this is unique for every installation and also quite tasty, because it's salt).\n\t$salt = md5(\"672kjaujnfu72ujnajfll91//\").sha1(\"aulis0.01\");\n\t\n\t// Setting up the basic hash, we suppose this is safe. Or at least it's harder to reverse\n\t$hash = hash('ripemd160', md5(sha1(sha1(md5(sha1(md5($salt) . $salt . $input) . $input) . md5(strlen($input)) . $salt . md5($input)))));\n\t\n\t// If we want to add some extra data to the hash, such as user ID or what not, we can do that too.\n\tif($extra_data != '')\n\t\t$hash = hash('ripemd160', sha1($hash . $salt . $extra_data) . sha1($extra_data) . sha1($salt));\n\t\t\n\t// For aesthetic effect, we do one final hash to make it a short sha1-string\n\t$hash = sha1($hash . strlen($input) . strlen($extra_data));\n\t\n\t// Now we kindly return this hash.\n\treturn $hash;\n\n}", "public function authenticationWithValidLatin1UmlautCharClassPassword() {}", "public function authenticationWithValidLatin1UmlautCharClassPassword() {}", "public function authenticationWithValidLatin1UmlautCharClassPassword() {}", "public function encode_hex($str);", "function encode_me($variable)\r\n\t\t{\r\n\t\t\tglobal $cookie_value;\r\n\r\n\t\t\t// We can just use the cookie value as the md5 key since it's already md5\r\n\t\t\t// encoded and unique to the user and forum.\r\n\t\t\treturn md5($variable . $cookie_value);\r\n\t\t}", "function simple_encrypt($text, $salt = \"VUHuiU6b8jgieEG0p79Yx9T4G8Zqp880\") {\n return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $salt, $text, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND))));\n}", "function encrypt_string($string)\n{\n\t$encryptedString = hash( 'sha512', sha1( md5( $string ) ) );\n\t\n\treturn $encryptedString;\n}", "function zen_encrypt_password($plain)\n{\n $password = '';\n\n for($i = 0; $i < 10; $i ++) {\n $password .= zen_rand();\n }\n\n $salt = substr(md5($password), 0, 2);\n\n $password = md5($salt . $plain) . ':' . $salt;\n\n return $password;\n}" ]
[ "0.70218885", "0.68549496", "0.6764733", "0.66179883", "0.6535621", "0.64576465", "0.6441971", "0.6413511", "0.6406497", "0.64014906", "0.64008945", "0.63291293", "0.6278495", "0.6222077", "0.6215066", "0.6211231", "0.61813825", "0.61410356", "0.6108109", "0.61018705", "0.6076052", "0.6076052", "0.603685", "0.60311526", "0.602902", "0.6027913", "0.60173017", "0.5993013", "0.59878594", "0.59656453", "0.59533113", "0.59451985", "0.59412986", "0.59321076", "0.58903587", "0.5837541", "0.5825401", "0.5821606", "0.5804551", "0.58022934", "0.57978106", "0.57863003", "0.57856405", "0.57690966", "0.57513535", "0.575084", "0.57160074", "0.5710299", "0.56881344", "0.56881344", "0.56881344", "0.56868464", "0.568604", "0.56812763", "0.5668852", "0.5666456", "0.5663599", "0.56500095", "0.56452745", "0.5639927", "0.5639087", "0.5638317", "0.5637599", "0.5627991", "0.562615", "0.5620045", "0.561742", "0.56146985", "0.56132704", "0.56047875", "0.56047875", "0.56047875", "0.56047875", "0.560198", "0.5594312", "0.5592516", "0.55890733", "0.55832386", "0.5569619", "0.55656075", "0.55596095", "0.55438745", "0.5542865", "0.5539375", "0.5528004", "0.55278045", "0.5521597", "0.55138224", "0.5509428", "0.55075336", "0.5506831", "0.5506772", "0.55048805", "0.55048805", "0.55048805", "0.54994994", "0.5487859", "0.5486356", "0.5484559", "0.54810816" ]
0.8386846
0
Retrieves the definition by a key.
Получает определение по ключу.
public function getDefinitionByKey(string $key): mixed;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get(string $key)\n {\n return $this->definitions[$key] ?? null;\n }", "public function getByKey($key);", "public function getDefinitionValue($key)\n\t{\n\t\t$definition = $this->getDefinition(true);\n\n\t\tif($definition != null)\n\t\t{\n\t\t\tif(array_key_exists($key, $definition))\n\t\t\t{\n\t\t\t\treturn $definition[$key];\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "public static function getByKey($key);", "public function get(string $key);", "public function get(string $key);", "public function get(string $key);", "public function get(string $key);", "public function get(string $key);", "public function get(string $key);", "public function get( $key );", "public static function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function getFromGet($key);", "public function get(CacheKey $key);", "public function findByKey($key)\n {\n return self::whereKey($key)->first();\n }", "public function get($key) {}", "function get($key = '') {\n\t\treturn $this->__get_v('get', $key);\n\t}", "public function getKey($key);", "Public Function Get($Key);", "public function getByKey($key)\n {\n return $this->model->where('key','=',$key)->first();\n }", "public function getByKey($key)\n {\n return $this->model->where('key','=',$key)->first();\n }", "public function getByKey($key)\n {\n return $this->model->where('key','=',$key)->first();\n }", "public function getByKey($key)\n {\n return $this->model->where('key','=',$key)->first();\n }", "public function getByKey($key)\n {\n $model = $this->model;\n return $model::getByKey($key);\n }", "public function get($key)\n {\n }", "public function get($key)\n {\n }", "public function getFromPost($key);", "public function getRequirement($key);", "public function get($key = null);", "public function get($key = null);", "public abstract function get($key);", "public abstract function get($key);", "public abstract function get($key);", "public function getItem($key);", "public function getItem($key);", "public function getItem($key);", "public function getItem($key);", "public function lookup($key)\n {\n return $this->storage->get($key);\n }", "public static function get($key)\n {\n return self::$_registry[$key];\n }", "public function read($key);", "public function getDefinition();", "public function get($key)\n {\n return $this->_registry[$key];\n }", "static function get($key) {\n\t\treturn self::$table[$key];\n\t}", "function get($key) {\n return isset($this->_directives[$key]) ? $this->_directives[$key] : null;\n }", "public function find($key)\n\t{\n\t\treturn $this->keyByAll()->get($key);\n\t}", "public function getDataByKey($key);", "protected abstract function retrieve($key);", "public function get($key)\n {\n return $this->level3->get($key);\n\n }", "public function __get($key)\n\t{\n\t\tif ($key == 'implementation')\n\t\t{\n\t\t\treturn $this->implementation_;\n\t\t}\n\n\t\treturn $this->implementation->$key;\n\t}", "public static function get(string $key)\n {\n return self::$collection[$key];\n }", "abstract public function get(string $key);", "function get($key);", "function get($key);", "public function get($key, $sheet = 'sDEF')\n {\n if (!$this->isValid()) {\n return null;\n }\n $flexFormData = $this->flexFormData['data'];\n\n return $flexFormData[$sheet]['lDEF'][$key]['vDEF'] ?? null;\n }" ]
[ "0.73208284", "0.7012088", "0.6948819", "0.69403374", "0.6447315", "0.6447315", "0.6447315", "0.6447315", "0.6447315", "0.6447315", "0.64432526", "0.6421497", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.64112866", "0.6268884", "0.624305", "0.62260115", "0.61366534", "0.6128027", "0.6107989", "0.61054343", "0.6071738", "0.6071738", "0.6071738", "0.6071738", "0.60522777", "0.60482186", "0.60468966", "0.60429436", "0.60312784", "0.6017216", "0.6017216", "0.59933275", "0.59933275", "0.59933275", "0.5982428", "0.5982428", "0.5982428", "0.5982428", "0.5960363", "0.5939765", "0.5929641", "0.59207743", "0.59038174", "0.5903689", "0.5897161", "0.5894343", "0.5891226", "0.5883788", "0.5880775", "0.58684766", "0.58662283", "0.5864075", "0.58629495", "0.58629495", "0.5860359" ]
0.8429926
0
fonction qui calcule le volume d'un cone
функция, которая вычисляет объем конуса
function volumeCone($rayon, $hauteur){ $volume = $rayon * $rayon * 3.14 * $hauteur * (1/3); // calcul du volume return $volume;//indique la valeur a renvoyer !! }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function total_volume();", "abstract public function calculateVolume(): int;", "public function getVolume(): float;", "public function volume();", "public function get_volume(){\n return $this->get_area() *$this->height;\n }", "protected function volume(): float\n {\n return ($this->length() * $this->width() * $this->height()) / 6000;\n }", "public function getVolume () {\n return 4/3 * pow($this->radius, 3) * M_PI;\n }", "function calculate_volume($radius,$height){\n $volume = ($radius*$radius)* M_PI * $height * (1/3); \n echo \"The volume of a cone wich ray is $radius and height is $height =\" . $volume. \"cm<sup>3/</sup><br />\" ;\n}", "public function getVolume();", "public function getVolume(): int;", "public function getVolume(): int;", "public function getVolume(): float\n {\n return $this->volume;\n }", "public function volume(float $volume): static;", "public function getVolume(){\r\n\t\treturn $this->volume;\r\n\t}", "public function calcTankVolume()\n {\n return $this -> rib * $this -> rib * $this -> height;\n }", "public function getSummaryVolume(): float;", "public function calcTankVolume()\n {\n return $this->radius * $this->radius * pi() * $this->height;\n }", "public static function get_volume ( $entity ) {\n return $entity->height * $entity->length * $entity->width;\n }", "public function getVolumeLevel(): float;", "public function calculateVolume($side1, $side2) {\n $volume = pow($side1, 3);\n return $volume;\n }", "public function get_volume() { \r\n\r\n\t\t$args = array(); \r\n\t\t$results = $this->sendCommand('getvolume',$args); \r\n\r\n\t\tif ($results == '0') { $results = null; } \r\n\t\telse { \r\n\t\t\t/* Need to make this out of 100 */ \r\n\t\t\t$results = round((($results / 255) * 100),2);\r\n\t\t}\r\n\r\n\t\treturn $results; \r\n\r\n\t}", "public function getVolume()\n {\n return $this->volume;\n }", "public function getVolume()\n {\n return $this->volume;\n }", "public function getVolume()\n {\n return $this->volume;\n }", "public function getVolume()\n {\n return $this->volume;\n }", "public function getVolume()\n\t{\n\t\treturn $this->volume;\n\t}", "public static function calculateVolume(Vector3 $a, Vector3 $b) : float{\n\t\t$min = Vector3::minComponents($a, $b);\n\t\t$max = Vector3::maxComponents($a, $b);\n\t\treturn (1 + $max->x - $min->x) * (1 + $max->y - $min->y) * (1 + $max->z - $min->z);\n\t}", "function getPesoVolumetricoTotal(){\n $res = 0;\n foreach($this->paquetes as $pk){\n $res += $pk->getPesoVolumetrico();\n }\n return $res;\n }", "public function getVolumeLevel(): float\n {\n\n $command = new Commands\\Volume();\n return $command->getFormattedOutput();\n\n }", "public function getVolume(): string {\n return $this->data['volume'];\n }", "public function getBoilVolume()\n {\n return $this->boilVolume;\n }", "public function getVolumeCount()\n {\n return $this->volume_count;\n }", "public function liquidVolume()\n {\n return $this->buildUnit('liquid-volume', Measures\\LiquidVolume::class);\n }", "function get_voti($voti)\n{\n $tot_voti = count($voti);\n // SOMMA DEI VOTI\n $totale = array_sum($voti);\n // TOTALE VOTI DIVISO NUMERO VOTI \n $media_voti = $totale / $tot_voti;\n //RITORNO LA MEDIA VOTI\n return round($media_voti, 1);\n}", "public function getVolumeUnits()\n {\n return $this->volumeUnits;\n }", "public function getUnitVat(): float;", "public function _getTotalVol24(){\n return $this->_getMultiFullData('TOTALVOLUME24HTO');\n }", "public function setVolumeLevel(float $volume): float;", "final public function getVolume()\n {\n return new Volume(0);\n }", "public function getVolume()\n {\n return $this->volumes->offsetGet(0);\n }", "private function calculateVolumeSummary(): ?float\n {\n $view = View::getInstance();\n if (!$view->get('phpMetricsData', false)) {\n return null;\n }\n\n //This formula below makes a progressive slowing down from 100 to 0 when the Volume goes from 100 to 8000.\n $leapFactor = ((8000 ** 1.5 - 100 ** 1.5) / 100) ** (2 / 3); // ~= 370.981\n return \\max(0, \\min(100, 100.14 - (($view->get('phpMetricsData_volume') / $leapFactor) ** 1.5)));\n }", "protected function useWeightOrVolume(): float\n {\n if ($this->volume() < 10 || $this->volume() <= $this->weight()) {\n return $this->weight();\n }\n return $this->volume();\n }", "public function getNumberOfVolumes();", "public function getDataVolume()\n {\n $value = $this->get(self::DATAVOLUME);\n return $value === null ? (integer)$value : $value;\n }", "public function getMagnitude(): float;", "public static function getVolumetricWeight($length, $width, $height, $unit)\n {\n //We need dimensions in centimeters.\n if($unit !== 'cm') {\n $length = MeasurementHelper::dimensionConverter($length, $unit, 'cm'); \n $width = MeasurementHelper::dimensionConverter($width, $unit, 'cm'); \n $height = MeasurementHelper::dimensionConverter($height, $unit, 'cm'); \n }\n\n //Compute the volume (cm3).\n $volume = $length * $width * $height;\n //Get the global settings.\n $session = JFactory::getSession();\n $settings = $session->get('settings', array(), 'ketshop'); \n //Get the volumetric ratio set for the shop. \n $volumetricRatio = $settings['volumetric_ratio'];\n\n //Return the volumetric weight.\n return $volume / $volumetricRatio;\n }", "public function getVolume(): ?int\n {\n return $this->volume ?? null;\n }", "public function getCircumference(){\n return (2 * self::$pi * $this->radius );\n }", "public function calculaJurosVeiculo()\n\t{\n\t\t//Calcula e imprime na tela o valor do veiculo\n\t\techo \"Total de Juros: \" . $this->valorVeiculo * 0.1 . \"<br>\";\n\t}", "public function setVolumeLevel(float $volume): float\n {\n\n $command = new Commands\\Volume($volume);\n return $command->getFormattedOutput();\n\n }", "public function volume()\n {\n return $this->belongsTo('App\\Volume');\n }", "public function calcDiscAmount($amount)\n {\n }", "function getOGDisc();", "public function calculoArea(){\n return $this->altura*$this->base;\n }", "public function getTotalVoltesRapides()\n {\n return $this->total_voltes_rapides;\n }", "function calcularIMC($peso, $altura)\n{\n return $peso / pow($altura, 2);\n}", "public function totalVolume(array $shapes)\n\t{\n\t\t$totalShapeVolume = $shape['cube', 'sphere'];\n\t\treturn array_sum($totalShapeVolume);\n\t}", "public function getDividend();", "function calCone($r,$h){\n $resultat=1/3*3.14*$r*$r*$h;\n return $resultat;\n}", "public function setVolume($volume);", "function SetMasterVolume(float $volume): void { }", "public function get_discount_per_unit(){\n\t\treturn (float) $this->v_discount_per_unit;\n\t}", "public function calcularArea(){\r\n\t\treturn $this->altura * $this->base / 2;\r\n\t}", "function calculCube($arete)\n{\n return $arete * $arete * $arete;\n}", "public function getVolumes() {\n return $this->volumes;\n }", "public function get_width(){\n\t\treturn (float) $this->v_width;\n\t}", "public function imc(){\n return $this->peso / ($this->altura * $this->altura);\n }", "public function getFractionAmount(): int;", "function convertVolt($v, $variable)\n{\n return ($v / $variable);\n}", "public function setVolume($volume)\n{\n return $this->volume = $volume;\n}", "public function setTankVolume($volume)\n {\n $this -> tankVolume = $volume;\n\techo \"<br>Cost is \".$this->cost;\n }", "function calcularMedia()\n{\n $nota1 = $_POST['nota1'];\n $nota2= $_POST['nota2'];\n $nota3 = $_POST['nota3'];\n\n //Calcula a média\n $media = ($nota1 + $nota2 + $nota3) / 3;\n\n //Mostra a média\n echo \"Média: \" . $media;\n}", "public function getCircumference () {\n return (2 * $this->getRadius() * pi()); // 2 * radius * pi\n }", "public function getVolumes()\n {\n return $this->volumes;\n }", "public function getVolumes()\n {\n return $this->volumes;\n }", "public static function totalComprasVtasDiarias(){\n $compras=Compra::find()->where(['fecha'=>date('Y-m-d')])->all();\n $sumatoria=0;\n foreach($compras as $compra){\n foreach($compra->detallecompras as $detalle){\n $sumatoria=$sumatoria+($detalle->cantidad * $detalle->producto->precio); \n }\n }\n return $sumatoria;\n }", "public function volumeToArray(): array\n {\n return [\n 'sku' => $this->getSku(),\n 'quantidade' => $this->getQuantity(),\n 'preco' => $this->getPriceUnit(),\n 'altura' => $this->getHeight(),\n 'comprimento' => $this->getLength(),\n 'largura' => $this->getWidth(),\n 'peso' => $this->getWeight(),\n ];\n }", "function calcul_surface($longueur){\n $surface = $longueur * $longueur;\n // echo \"<br><br>ma variable surface est egal à : $surface\";\n\n // echo \"<br>Ceci est ma variable compteur : $compteur\";\n\n global $compteur; // J'amene $compteur dans l'espace locale pour le manipuler\n\n $compteur++; // Je manipule globale en l'incrementant\n\n\n return $surface;\n\n \n\n // Le code après return n'est pas executé\n }", "public function coseno(){\n $this->pantalla = cos((float)$this->pantalla);\n //Devuelve el valor en radianes\n }", "public function insertaVolume() {\r\n $database \t= self::getInstance();\r\n $query = \"UPDATE resultado_db as RES LEFT JOIN dblp_results AS DB ON RES.titulo=DB.titulo SET RES.volume=DB.volume WHERE RES.volume IS NULL\";\r\n\r\n $result = $database->query($query);\r\n\r\n return $result;\r\n }", "function to_celsius() {\n\t\t\treturn ($this->weight_param - 32) * 1.8;\n\t\t}", "public function getQVol()\n {\n return $this->qVol;\n }", "public function getVatAmount();", "public function getVatPercent(): int;", "function count_vc( $word ){\n $m = 0;\n $length = strlen($word);\n $prev_c = false;\n for ( $i = 0; $i < $length; $i++ ) {\n $is_c = $this->is_consonant($word, $i);\n if ( $is_c ) {\n if ( $m > 0 && !$prev_c ) {\n $m += 0.5;\n }\n } else {\n if ( $prev_c || $m == 0 ) {\n $m += 0.5;\n }\n }\n $prev_c = $is_c;\n }\n $m = floor($m);\n return $m;\n }", "public function getCutoff() : float;", "private function volumen ($mes,$anio)\n { \n $total=0;\n $id= auth()->user()->asociado_membrecia;\n \n $compras=Compra::whereMonth('created_at', $mes)\n ->whereYear('created_at', $anio)\n ->where(\"asociado_membrecia\",\"=\",$id)\n ->get();\n\n \nforeach ($compras as $compra) {\n \n $total+= $compra->compra_totalVolumen;\n }\n return $total;\n }", "function NWW()\n\t{\n\t\t$poprzednie = $this->okres_zadan_c[0];\n\t\t for ($i=1; $i < $this->liczba_zadan_c; $i++)\n\t\t {\n\t\t\t$a=$poprzednie;\n\t\t\t$b=$this->okres_zadan_c[$i];\n\t\t\t\n\t\t\twhile($a!=$b){\n\t\t\tif($a>$b) $a=$a-$b;\n\t\t\telse $b=$b-$a;\n\t\t\t} \n\t\t\t$NWD = $a;\n\t\t\t$poprzednie = ($poprzednie * $this->okres_zadan_c[$i]) / $NWD;\n\t\t }\n\t\t\t \n\t\t\treturn $poprzednie; \n\t}", "function areaPentagono($perimetro,$apotema){\n return ($perimetro*$apotema)/2;\n}", "public function calculate() {\n\t\tif (\n\t\t\t!$this->Trackdata->has(Trackdata\\Entity::VERTICAL_OSCILLATION) ||\n\t\t\t!$this->Trackdata->has(Trackdata\\Entity::STRIDE_LENGTH)\n\t\t) {\n\t\t\treturn [];\n\t\t}\n\n\t\t$Oscillation = $this->Trackdata->verticalOscillation();\n\t\t$StrideLength = $this->Trackdata->strideLength();\n\t\t$Size = $this->Trackdata->num();\n\n\t\t$this->VerticalRatio = array();\n\n\t\tfor ($i = 0; $i < $Size; ++$i) {\n\t\t\t$this->VerticalRatio[] = ($StrideLength[$i] > 0) ? round(100 * $Oscillation[$i] / $StrideLength[$i]) : 0;\n\t\t}\n\n\t\treturn $this->VerticalRatio;\n\t}", "function prixtotalvente()\n{\n $test=new testgraph;\n $totalvente=$test->gettotalvente();\n echo $totalvente['prix_vente']*$totalvente['nbre_vente'];\n}", "public function vat() {\n \treturn $this->price * env('VAT_PERCENTAGE');\n }", "public function getValidVolumeUnits()\n {\n return $this->validVolumeUnits;\n }", "public function get_length(){\n\t\treturn (float) $this->v_length;\n\t}", "public function getRatio(){\r\n $victoires=(int) $this->getX('GAGNEES');\r\n $defaites=(int) $this->getX('PERDUES');\r\n $bouclage=($victoires==0 || $defaites==0)?false:true;\r\n while ($bouclage){\r\n $bouclage = false;\r\n if ($victoires%9 == 0 && $defaites%9==0 && !$bouclage){\r\n $victoires=$victoires/9;\r\n $defaites=$defaites/9;\r\n $bouclage = true;\r\n }\r\n elseif ($victoires%8 == 0 && $defaites%8==0 && !$bouclage) {\r\n $victoires=$victoires/8;\r\n $defaites=$defaites/8;\r\n $bouclage = true;\r\n }\r\n elseif ($victoires%7 == 0 && $defaites%7==0 && !$bouclage) {\r\n $victoires=$victoires/7;\r\n $defaites=$defaites/7;\r\n $bouclage = true;\r\n }\r\n elseif ($victoires%6 == 0 && $defaites%6==0 && !$bouclage) {\r\n $victoires=$victoires/6;\r\n $defaites=$defaites/6;\r\n $bouclage = true;\r\n }\r\n elseif ($victoires%5 == 0 && $defaites%5==0 && !$bouclage) {\r\n $victoires=$victoires/5;\r\n $defaites=$defaites/5;\r\n $bouclage = true;\r\n }\r\n elseif ($victoires%4 == 0 && $defaites%4==0 && !$bouclage) {\r\n $victoires=$victoires/4;\r\n $defaites=$defaites/4;\r\n $bouclage = true;\r\n }\r\n elseif ($victoires%3 == 0 && $defaites%3==0 && !$bouclage) {\r\n $victoires=$victoires/3;\r\n $defaites=$defaites/3;\r\n $bouclage = true;\r\n }\r\n elseif ($victoires%2 == 0 && $defaites%2==0 && !$bouclage) {\r\n $victoires=$victoires/2;\r\n $defaites=$defaites/2;\r\n $bouclage = true;\r\n }\r\n }\r\n return $victoires.\" : \".$defaites;\r\n }", "public function getConsumptionPerKilometer()\n {\n return $this->car->getConsumptionPerKilometer() * 1.3;\n }", "public function getVwap(): float\n {\n return $this->vwap;\n }", "function vat_cal($vat_value){\n\tglobal $vat_rate;\n\t$vat_cal= $vat_value * $vat_rate;\n\t$vat= ceil($vat_cal);\n\t\n\treturn $vat;\n}", "function vat_cal($vat_value){\n\tglobal $vat_rate;\n\t$vat_cal= $vat_value * $vat_rate;\n\t$vat= ceil($vat_cal);\n\t\n\treturn $vat;\n}", "function czestotliwosc()\n\t{\n\t\t\n\t\t for ($i=0; $i < $this->liczba_zadan_c; $i++)\n\t\t {\n\t\t\t$this->czestotliwosc_c[$i] = round( ($this->czas_zadan_c[$i] / $this->okres_zadan_c[$i]),2) ;\n\t\t\t\n\t\t }\n\t\t\t \n\t\t\t\n\t}" ]
[ "0.79248637", "0.7708593", "0.7605513", "0.75714153", "0.74318486", "0.7237351", "0.72275406", "0.7187802", "0.71411043", "0.70742923", "0.70742923", "0.70093936", "0.6865191", "0.67591894", "0.67365193", "0.67126846", "0.666697", "0.65978074", "0.6588613", "0.655442", "0.6515304", "0.6503342", "0.6503342", "0.6503342", "0.6503342", "0.64554036", "0.6205193", "0.6164231", "0.60377496", "0.600269", "0.5986575", "0.5972034", "0.5893165", "0.57497007", "0.5732995", "0.57165754", "0.570668", "0.56738675", "0.559968", "0.5543682", "0.55182475", "0.55112666", "0.5504073", "0.5465402", "0.5428382", "0.54057175", "0.5396111", "0.53658247", "0.5346597", "0.5342644", "0.5337038", "0.5333884", "0.5327333", "0.53042734", "0.5304051", "0.52881545", "0.5283374", "0.52828777", "0.5214081", "0.5175744", "0.51327777", "0.5126602", "0.5121859", "0.50981086", "0.5095935", "0.5089011", "0.5060091", "0.502172", "0.5017305", "0.5009071", "0.500504", "0.49889413", "0.49657944", "0.4952895", "0.4952895", "0.49480876", "0.49415293", "0.49380064", "0.49362993", "0.49213356", "0.49212104", "0.49199653", "0.49068138", "0.49030253", "0.4895076", "0.48866016", "0.48786065", "0.48761028", "0.48744515", "0.48742574", "0.48689437", "0.48622495", "0.48557973", "0.48548815", "0.48487702", "0.4829926", "0.48228633", "0.4821191", "0.4821191", "0.48075598" ]
0.7949797
0
channel_MAC is an authentication code that proves that the peer that sent this message knows the name of the channel. Generated from protobuf field bytes channel_MAC = 1;
channel_MAC — это код подтверждения аутентификации, который доказывает, что собеседник, отправивший это сообщение, знает имя канала. Генерируется из байтового поля protobuf channel_MAC = 1;
public function getChannelMAC() { return $this->channel_MAC; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setChannelMAC($var)\n {\n GPBUtil::checkString($var, False);\n $this->channel_MAC = $var;\n\n return $this;\n }", "public function getMac()\n {\n return $this->mac;\n }", "public function getMac()\n {\n return $this->mac;\n }", "public function setMac($var)\n {\n GPBUtil::checkString($var, False);\n $this->mac = $var;\n\n return $this;\n }", "public function getMac()\n {\n if (array_key_exists(\"mac\", $this->_propDict)) {\n return $this->_propDict[\"mac\"];\n } else {\n return null;\n }\n }", "function SERVER_getShowClientMACColumn()\n{\n\treturn(SERVER_getServerBoolSetting('showClientMACColumn'));\n}", "public function getSocketChannelName(): string\n {\n return hash_hmac('md5', $this->id, Config::get('SOCKETS_SALT'));\n }", "public function mac_vendor() {\n\n\t}", "public static function MacToHex($sMAC) {\n\t\t$xMAC = '';\n\n\t\t// Break into dot groups\n\t\t$MACParts = explode(':', $sMAC);\n\t\tif (count($MACParts) != 6)\n\t\t\tthrow new Exception(\"Invalid MAC colon notation MAC $sMAC.\");\n\n\t\tforeach ($MACParts as $xPiece) {\n\t\t\tif ($xPiece < 0x00 || $xPiece > 0xff)\n\t\t\t\tthrow new Exception(\"Invalid MAC colon notation MAC $sMAC out of range.\");\n\t\t\t$xMAC .= sprintf('%02x', hexdec($xPiece));\n\t\t}\n\n\t\treturn $xMAC;\n\t}", "function getMacsToConnect() {\n return $this->portMacs;\n }", "public function getMacAddress() : string\n {\n return $this->macAddress;\n }", "public static function mac(\n MacEnum $macAlgorithm,\n SubAlgorithmAbstractEnum $innerAlgorithm,\n $key,\n $data,\n $nonce = '',\n $raw = false\n );", "function SERVER_setShowClientMACColumn($enabled)\n{\n\tSERVER_setServerBoolSetting('showClientMACColumn', $enabled);\n}", "public function mac_addr() {\n\n\t}", "public function get_mac(){\r\n\t\t$string= exec('getmac');\r\n\t\t$mac=substr($string, 0, 17); \r\n\t\treturn $mac;\r\n\t}", "public function setMacFunction($mac_function)\n {\n }", "public function getBanMACADDR()\n\t\t{\n\t\t\treturn $this->banMACADDR;\n\t\t}", "public function formatMAC($mac) {\n\t\t$mac = strval($mac);\n\t\t$mac = strtolower($mac);\n\t\tif (substr($mac, 0, 2) == \"0x\") $mac = substr($mac, 2);\n\t\t$newstr = \"\";\n\t\tfor ($i=0;$i<strlen($mac);$i++)\n\t\t{\n\t\t\t$char = substr($mac, $i, 1);\n\t\t\t$ascii = ord($char);\n\t\t\tif (($ascii >= 48 && $ascii <= 57) || ($ascii >= 97 && $ascii <= 102)) $newstr .= $char;\n\t\t}\n\t\tif (strlen($newstr) == 12)\n\t\t{\n\t\t\t$newmac = \"\";\n\t\t\tfor ($i=0;$i<strlen($newstr);$i++)\n\t\t\t{\n\t\t\t\tif ($i > 0 && $i % 2 == 0) $newmac .= \":\";\n\t\t\t\t$newmac .= substr($newstr, $i, 1);\n\t\t\t}\n\t\t\treturn $newmac;\n\t\t}\n\t\treturn false;\n\t}", "function get_interface_mac($interface) {\n\t$linkinfo = \"\";\n\texec(\"/usr/bin/netstat -I $interface -nW -f link\", $linkinfo);\n\tarray_shift($linkinfo);\n\t$alink = preg_split(\"/\\s+/\", $linkinfo[0]);\n\t$mac = chop($alink[3]);\n\treturn $mac;\n}", "public function getWifiMac()\n {\n if (array_key_exists(\"wifiMac\", $this->_propDict)) {\n return $this->_propDict[\"wifiMac\"];\n } else {\n return null;\n }\n }", "public function getMacAddress(): string\n {\n if (false == $this->hasMacAddress()) {\n throw new RuntimeException(\"Mac address undefined\");\n }\n\n return $this->macAddress;\n }", "function getSender(): Channel;", "public function setMac($val)\n {\n $this->_propDict[\"mac\"] = intval($val);\n return $this;\n }", "function generateMACString ($macFields) {\r\n global $VK_variableOrder;\r\n\r\n $requestNum = $macFields['VK_SERVICE'];\r\n\r\n $data = '';\r\n\r\n foreach ((array)$VK_variableOrder[$requestNum] as $key) {\r\n $v = $macFields[$key];\r\n $data .= str_pad (strlen ($v), 3, '0', STR_PAD_LEFT) . $v;\r\n }\r\n\r\n return $data; \r\n }", "private static function mac($item, $fields, $message)\n {\n if (array_key_exists($item, $fields)) {\n if (!filter_var($fields[$item], FILTER_VALIDATE_MAC)) {\n self::$errors[] = (empty($message) ? \"The field '$item' is not a valid MAC\" : $message);\n }\n }\n }", "public function obtenerMAC()\n {\n $arp = exec('arp -a ' . $this->obtenerIP());\n $lines = explode(\" at \", $arp);\n\n $macAddr = trim(explode(\" \", $lines[1])[0]);\n\n if ($macAddr == \"\") {\n $arp = exec('arp -a ');\n $lines = explode(\" at \", $arp);\n\n $macAddr = trim(explode(\" \", $lines[1])[0]);\n }\n\n return $macAddr;\n }", "public static function HexToMac($xMac) {\n\t\t$sMac = '';\n\n\t\t// Leading zeros will be dropped, so add them manually\n\t\t$xMac = sprintf('%012x', hexdec($xMac));\n\n\t\t// Break into 2 char pairs\n\t\t$MACParts = str_split($xMac, 2);\n\n\t\tforeach ($MACParts as $sPiece) {\n\t\t\tif ($sMac != '')\n\t\t\t\t$sMac .= ':';\n\t\t\t$sMac .= $sPiece;\n\t\t}\n\n\t\treturn $sMac;\n\t}", "public static function getChannelId()\n {\n return self::$channel_id;\n }", "public function hasMacAddress(): bool\n {\n return self::UNKNOWN_MAC_ADDRESS != $this->macAddress;\n }", "public function getChannelName(){\n\t\tif (isset($this->channelName)){\n\t\t\treturn $this->channelName;\n\t\t}else{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function getMac($data)\n {\n return hash_hmac('sha256', $data, $this->getKey());\n }", "abstract public function getChannelKey() : int;", "function generateMACString ($macFields) {\n $banklinkCharset = $macFields['VK_ENCODING'];\n $requestNum = $macFields['VK_SERVICE'];\n\t\t$variableOrder = $this->variableOrder();\n\t\t\n $data = '';\n\t\t \n foreach ((array)$variableOrder[$requestNum] as $key) {\n $v = $macFields[$key];\n $l = mb_strlen ($v, $banklinkCharset);\n $data .= str_pad ($l, 3, '0', STR_PAD_LEFT) . $v;\n }\n\n if($data == '')\n \treturn 'null';\n else\n \treturn $data;\n }", "public function getChannelName () {\r\n return '@' . $name;\r\n }", "public function getComputerMacAddress() : Int {\n return($this->computerMacAddress);\n }", "public function getChannelId()\n {\n return $this->channelId;\n }", "public function setMac(Mac $mac)\n {\n $this->mac = $mac;\n\n return $this;\n }", "public function setRedisChannel() {\n $this->redisChannel = 'ch:'.str_replace(\" \",\"\",ucwords($this->channel));\n return $this->redisChannel;\n }", "public static function sendCommandRpi($mac)\n {\n $database = DatabaseFactory::getFactory()->getConnection();\n\n $sql = \"SELECT *\n FROM commands WHERE mac = :mac LIMIT 1\";\n $query = $database->prepare($sql);\n $query->execute(array(':mac' => $mac));\n $macs = $query->fetch();\n\n $query = $database->prepare(\"DELETE FROM commands WHERE mac = :mac\");\n $query->execute(array(':mac' => $mac));\n $sql = \"DELETE FROM commands WHERE mac = :mac\";\n\n return $macs;\n }", "public function getChannelID()\n {\n return $this->channelID;\n }", "public function getChannelId() {\n return $this->channelId;\n }", "public function getChannel()\n {\n return (string)$this->c;\n }", "function getMAC() {\n \n ob_start(); // Turn on output buffering\n system('ipconfig /all'); //Execute external program to display output\n $mycom = ob_get_contents(); // Capture the output into a variable\n ob_clean(); // Clean (erase) the output buffer\n\n $findme = \"Physical\";\n $pmac = strpos($mycom, $findme); // Find the position of Physical text\n $mac = substr($mycom,($pmac+36),17); // Get Physical Address\n\n //echo \"MAC ADD -- >\".$mac;\n return $mac;\n }", "public function getChannel()\n {\n return $this->_aChannel;\n }", "public function getNameChannelAttribute()\n {\n return \"{$this->channels_id} {$this->channel->name}\";\n }", "protected function get_channel() {\n\n\t\treturn $this->channel;\n\t}", "public function getChannelId();", "public function getChannelName(): string;", "public function getChannel()\n {\n $value = $this->get(self::CHANNEL);\n return $value === null ? (string)$value : $value;\n }", "function _generateMACString($type, $macFields)\n {\n $data = '';\n $vkVariableOrder = $this->_getVariableOrder($type);\n foreach ($vkVariableOrder as $key) {\n if (isset($macFields[$key])) {\n $v = trim($macFields[$key]);\n $data .= $v . '&';\n }\n }\n $data .= $this->_getMacKey() . '&';\n// echo \"<!-- \" . $data . \"-->\\n\";\n $data = strtoupper(md5($data));\n return $data;\n }", "public function getChannel();", "public function getChannel();", "public function getChannel();", "public function getChannel();", "private function validateResponseMac(array $parameters = array())\n {\n self::validateRequiredKeys($parameters);\n\n // Only SHA-256 supported\n if ($parameters['ALGORITHM'] !== '3' && $parameters['ALGORITHM'] !== 3) {\n throw new UnsupportedAlgorithmException('Only algorithm 3 is supported');\n }\n\n $hashString = join(\n '&',\n array_map(function ($field) use (&$parameters) {\n return $parameters[$field];\n }, self::$RESPONSE_MAC_FIELDS)\n );\n\n $calculatedMac = strtoupper(hash_hmac('sha256', $hashString, $this->getMerchantSecret()));\n\n if ($parameters['MAC'] !== $calculatedMac) {\n throw new ChecksumMismatchException('MAC value does not match calculated value');\n }\n }", "public function getMacCrc32C()\n {\n return $this->mac_crc32c;\n }", "public function getChannel()\n {\n return $this->channel;\n }", "public function getChannel()\n {\n return $this->channel;\n }", "public function getChannel()\n {\n return $this->channel;\n }", "public function getChannel()\n {\n return $this->channel;\n }", "public function getChanId()\n {\n return $this->chan_id;\n }", "public function getChanId()\n {\n return $this->chan_id;\n }", "function verify_vmware_vsphere_mac_clone($mac) {\n\t\t$new_forth_byte_first_bit = rand(1, 3);\n\t\t$mac = strtolower($this->vmware_mac_base.\":\".substr($mac, 9));\n\t\t$mac = substr_replace($mac , $new_forth_byte_first_bit, 9, 1);\n\t\treturn $mac;\n\t}", "public function setChannel($var)\n {\n GPBUtil::checkString($var, True);\n $this->channel = $var;\n\n return $this;\n }", "public function broadcastOn(){\n\t\treturn new PrivateChannel('channel-name');\n\t}", "public function getChannel() {\n return $this->channel;\n }", "public function getIpcChannel() {\n return $this->channel;\n }", "public function getChannelId() : int\n {\n return $this->channelId;\n }", "public function getChannelName();", "public function getChannelFlags()\n {\n return $this->channel_flags;\n }", "public function getChannel()\n {\n return $this->Channel;\n }", "public function setChannel($var)\n {\n GPBUtil::checkInt32($var);\n $this->channel = $var;\n\n return $this;\n }", "public function broadcastOn()\n {\n return new Channel('22');\n }", "public function getMACAddressList(){\n\t\t\t$processedList = array();\n\t\t\t$list = $this->conn->getRouterProperty($this->macAddressListID);\n\t\t\tforeach ($list as $key => $value) {\n\t\t\t\t# code...\n\t\t\t\tarray_push($processedList,bin2hex($this->utility->cleanStringApostrophe($value)));\n\t\t\t}\n\t\t\t$this->macAddressList=$processedList;\n\t\t\t\n\t\t}", "public function getEncCh(){\n return $this->encCH;\n }", "public function testComAdobeCqSocialCommonsEmailreplyImplMacmailEmailClientProvider() {\n\n }", "public function getChannel(): ?string\n {\n return $this->channel;\n }", "function GetChannel() {\n\t\treturn $this->channel;\n\t}", "public function ip_macaddress(){\n\n $ip = request()->ip();\n $mac=shell_exec(\"arp -a \".$ip);\n $mac_string = shell_exec(\"arp -a $ip\");\n\n $mac_array = explode(\" \",$mac_string);\n $mac = $mac_array[3];\n\n if(empty($mac)) {\n // for mac e linux\n $mac = shell_exec(\"arp -a \".escapeshellarg($_SERVER['REMOTE_ADDR']).\" | grep -o -E '(:xdigit:{1,2}:){5}:xdigit:{1,2}'\");\n $mac_string = shell_exec(\"arp -a $ip\");\n\n $mac_array = explode(\" \",$mac_string);\n $mac = $mac_array[3];\n $computer = $ip.\" - \".$mac;\n } else {\n // for windows\n $computer = $ip.\" - \".$mac;\n }\n\n return $computer;\n\n }", "protected function buildChannel($channel,$appId)\n {\n return \"channel:\" . $appId . \":\" . $channel;\n }", "function PortUnknownConnection($p_mac, $p_ip) {\n $PluginFusioninventoryUnknownDevice = new PluginFusioninventoryUnknownDevice();\n $unknown_infos = array();\n $unknown_infos[\"name\"] = '';\n $newID=$PluginFusioninventoryUnknownDevice->add($unknown_infos);\n // Add networking_port\n $NetworkPort =new NetworkPort();\n $port_add = array();\n $port_add[\"items_id\"] = $newID;\n $port_add[\"itemtype\"] = 'PluginFusioninventoryUnknownDevice';\n $port_add[\"ip\"] = $p_ip;\n $port_add['mac'] = $p_mac;\n $dport = $NetworkPort->add($port_add);\n $this->connectDB($dport);\n }", "public function testMacValidationException()\n {\n $data = array(\n 'merchantID' => 1,\n 'storeID' => 2,\n 'orderID' => 3,\n 'captureID' => 4,\n 'merchantReference' => 5,\n 'paymentReference' => 6,\n 'userID' => 7,\n 'amount' => 9,\n 'currency' => 10,\n 'transactionStatus' => 12,\n 'orderStatus' => 13,\n 'additionalData' => 15,\n 'timestamp' => 16,\n 'version' => 1.5,\n 'mac' => 'fbdc46ef7ab1ccf195781983caf60782a81bb1e2',\n );\n\n $processor = new \\Upg\\Library\\Tests\\Mock\\Mns\\MockProcessor();\n\n $handler = new Handler($this->config, $data, $processor);\n }", "public function getChannel(): Channel\n {\n return $this->channel;\n }", "public function setChannel($var)\n {\n GPBUtil::checkString($var, True);\n $this->Channel = $var;\n\n return $this;\n }", "function reflect_get_channel() {\n\n\t$c = q(\"select * from channel left join xchan on channel_hash = xchan_hash \n\t\twhere channel_address = '%s' limit 1\",\n\t\tdbesc(REDMATRIX_IMPORTCHANNEL)\n\t);\n\treturn $c[0];\n}", "function generate_random_mac_address() {\n\t$mac = \"02\";\n\tfor ($x = 0; $x < 5; $x++) {\n\t\t$mac .= \":\" . dechex(rand(16, 255));\n\t}\n\treturn $mac;\n}", "public function channel()\n {\n $channel = $this->isNumeric() ? $this->params[1] : $this->params[0];\n if ($channel[0] == '#' or $channel[0] == '&') {\n return $channel;\n } else {\n return null;\n }\n }", "public static function update_channel() {\n\t\tif ( isset( $_POST['uid'] ) && isset( $_POST['channel'] ) ) {\n\t\t\t$uid = sanitize_text_field( wp_unslash( $_POST['uid'] ) );\n\t\t\t$channel = sanitize_text_field( wp_unslash( $_POST['channel'] ) );\n\t\t\tYarns_Microsub_Channels::update( $uid, $channel );\n\t\t\techo wp_kses_post( static::list_channels() );\n\t\t}\n\t\twp_die();\n\t}", "public function broadcastOn() {\n\t\treturn new PrivateChannel('channel-name');\n\t}", "public function hasChannel(){\n return $this->_has(5);\n }", "public function getChannelTextAttribute() {\n return $this->attributes['channel'] ? \\Lang::get('surveys::update.data.channel.' . $this->attributes['channel']) : '';\n }", "public function setChannel()\n {\n $name = $this->slim->request->post('name');\n\n if (!isset($name)) {\n throw new PushApiException(PushApiException::NO_DATA);\n }\n\n // Checking if channel already exists\n $channel = Channel::where('name', $name)->first();\n\n if (!isset($channel->name)) {\n $channel = new Channel;\n $channel->name = $name;\n $channel->save();\n }\n $this->send($channel->toArray());\n }", "public function setWifiMac($val)\n {\n $this->_propDict[\"wifiMac\"] = $val;\n return $this;\n }", "public function broadcastOn()\n {\n return ['pizzamart-channel'];\n }", "public static function delete_channel() {\n\t\tif ( isset( $_POST['uid'] ) ) {\n\t\t\t$uid = sanitize_text_field( wp_unslash( $_POST['uid'] ) );\n\t\t\tYarns_Microsub_Channels::delete( $uid );\n\t\t\techo wp_kses_post( static::list_channels() );\n\t\t}\n\t\twp_die();\n\t}", "public function broadcastOn()\n {\n\t\tif(in_array(config('app.name'),['haxibiao','yinxiangshipin'])){\n\t\t\treturn new PrivateChannel(config('app.name').'.User.' . $this->categoryUser->user_id);\n\t\t}\n return new PrivateChannel('App.User.' . $this->categoryUser->user_id);\n }", "protected function _get_vendor($mac)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $mac = preg_replace('/-/', ':', $mac);\n\n // Pull in MAC address database\n if (empty($this->mac_database)) {\n include clearos_app_base('network_map') . '/deploy/mac_database.php';\n $this->mac_database = $mac_database;\n }\n\n $vendor = '';\n $matches = array();\n\n if (preg_match('/^(.*):(.*):(.*):(.*):(.*):(.*)/', strtoupper($mac), $matches)) {\n $mac = sprintf(\n '%02s:%02s:%02s:%02s:%02s:%02s',\n $matches[1],\n $matches[2],\n $matches[3],\n $matches[4],\n $matches[5],\n $matches[6]\n );\n\n $mac_prefix = strtoupper(substr($mac, 0, 8));\n $vendor = isset($this->mac_database[$mac_prefix]) ? $this->mac_database[$mac_prefix] : '';\n }\n\n return $vendor;\n }", "public function getChannel()\n {\n $value = $this->get(self::channel);\n return $value === null ? (integer)$value : $value;\n }", "public static function configRpi($mac)\n {\n $database = DatabaseFactory::getFactory()->getConnection();\n\n $sql = \"SELECT id, mac, url, urlViaServer, orientation\n FROM rpiStatus WHERE mac = :mac\n ORDER BY id DESC\n LIMIT 1\";\n $query = $database->prepare($sql);\n $query->execute(array(':mac' => $mac));\n $mac = $query->fetch();\n\n return $mac;\n }", "function delChannel()\n {\n }" ]
[ "0.7929313", "0.58723557", "0.58723557", "0.56279653", "0.5566493", "0.55508333", "0.5489118", "0.5415403", "0.54081297", "0.5180305", "0.5100145", "0.508042", "0.5047627", "0.49871966", "0.4984315", "0.49423075", "0.48935196", "0.48933882", "0.4862807", "0.4851916", "0.48485783", "0.4830414", "0.4820203", "0.48153698", "0.48101956", "0.48019657", "0.47918284", "0.47864988", "0.47792763", "0.4764398", "0.4742958", "0.46996403", "0.46943712", "0.46839216", "0.46785697", "0.4666044", "0.46616745", "0.46548662", "0.46489432", "0.4645273", "0.46175173", "0.46088663", "0.46015018", "0.45927885", "0.4569177", "0.4562702", "0.45567903", "0.45555836", "0.45453504", "0.4541847", "0.45337957", "0.45337957", "0.45337957", "0.45337957", "0.4529922", "0.44868967", "0.44712827", "0.44712827", "0.44712827", "0.44712827", "0.44566718", "0.44566718", "0.4453933", "0.44493166", "0.44412512", "0.4434565", "0.44336134", "0.44204965", "0.44018692", "0.4398141", "0.43974614", "0.43884596", "0.4372626", "0.43663368", "0.4365532", "0.43621454", "0.43562597", "0.4356179", "0.43512625", "0.43507797", "0.4334388", "0.43224388", "0.43173873", "0.4309662", "0.43095854", "0.43050042", "0.42944437", "0.42907494", "0.42885014", "0.42851526", "0.42770606", "0.42767864", "0.4273573", "0.426997", "0.4261202", "0.42567933", "0.42546177", "0.42467767", "0.42403644", "0.42373803" ]
0.7954139
0
channel_MAC is an authentication code that proves that the peer that sent this message knows the name of the channel. Generated from protobuf field bytes channel_MAC = 1;
channel_MAC — это код подтверждения аутентификации, который доказывает, что собеседник, отправивший это сообщение, знает имя канала. Генерируется из байтового поля protobuf channel_MAC = 1;
public function setChannelMAC($var) { GPBUtil::checkString($var, False); $this->channel_MAC = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getChannelMAC()\n {\n return $this->channel_MAC;\n }", "public function getMac()\n {\n return $this->mac;\n }", "public function getMac()\n {\n return $this->mac;\n }", "public function setMac($var)\n {\n GPBUtil::checkString($var, False);\n $this->mac = $var;\n\n return $this;\n }", "public function getMac()\n {\n if (array_key_exists(\"mac\", $this->_propDict)) {\n return $this->_propDict[\"mac\"];\n } else {\n return null;\n }\n }", "function SERVER_getShowClientMACColumn()\n{\n\treturn(SERVER_getServerBoolSetting('showClientMACColumn'));\n}", "public function getSocketChannelName(): string\n {\n return hash_hmac('md5', $this->id, Config::get('SOCKETS_SALT'));\n }", "public function mac_vendor() {\n\n\t}", "public static function MacToHex($sMAC) {\n\t\t$xMAC = '';\n\n\t\t// Break into dot groups\n\t\t$MACParts = explode(':', $sMAC);\n\t\tif (count($MACParts) != 6)\n\t\t\tthrow new Exception(\"Invalid MAC colon notation MAC $sMAC.\");\n\n\t\tforeach ($MACParts as $xPiece) {\n\t\t\tif ($xPiece < 0x00 || $xPiece > 0xff)\n\t\t\t\tthrow new Exception(\"Invalid MAC colon notation MAC $sMAC out of range.\");\n\t\t\t$xMAC .= sprintf('%02x', hexdec($xPiece));\n\t\t}\n\n\t\treturn $xMAC;\n\t}", "function getMacsToConnect() {\n return $this->portMacs;\n }", "public function getMacAddress() : string\n {\n return $this->macAddress;\n }", "public static function mac(\n MacEnum $macAlgorithm,\n SubAlgorithmAbstractEnum $innerAlgorithm,\n $key,\n $data,\n $nonce = '',\n $raw = false\n );", "function SERVER_setShowClientMACColumn($enabled)\n{\n\tSERVER_setServerBoolSetting('showClientMACColumn', $enabled);\n}", "public function mac_addr() {\n\n\t}", "public function get_mac(){\r\n\t\t$string= exec('getmac');\r\n\t\t$mac=substr($string, 0, 17); \r\n\t\treturn $mac;\r\n\t}", "public function setMacFunction($mac_function)\n {\n }", "public function formatMAC($mac) {\n\t\t$mac = strval($mac);\n\t\t$mac = strtolower($mac);\n\t\tif (substr($mac, 0, 2) == \"0x\") $mac = substr($mac, 2);\n\t\t$newstr = \"\";\n\t\tfor ($i=0;$i<strlen($mac);$i++)\n\t\t{\n\t\t\t$char = substr($mac, $i, 1);\n\t\t\t$ascii = ord($char);\n\t\t\tif (($ascii >= 48 && $ascii <= 57) || ($ascii >= 97 && $ascii <= 102)) $newstr .= $char;\n\t\t}\n\t\tif (strlen($newstr) == 12)\n\t\t{\n\t\t\t$newmac = \"\";\n\t\t\tfor ($i=0;$i<strlen($newstr);$i++)\n\t\t\t{\n\t\t\t\tif ($i > 0 && $i % 2 == 0) $newmac .= \":\";\n\t\t\t\t$newmac .= substr($newstr, $i, 1);\n\t\t\t}\n\t\t\treturn $newmac;\n\t\t}\n\t\treturn false;\n\t}", "public function getBanMACADDR()\n\t\t{\n\t\t\treturn $this->banMACADDR;\n\t\t}", "function get_interface_mac($interface) {\n\t$linkinfo = \"\";\n\texec(\"/usr/bin/netstat -I $interface -nW -f link\", $linkinfo);\n\tarray_shift($linkinfo);\n\t$alink = preg_split(\"/\\s+/\", $linkinfo[0]);\n\t$mac = chop($alink[3]);\n\treturn $mac;\n}", "public function getWifiMac()\n {\n if (array_key_exists(\"wifiMac\", $this->_propDict)) {\n return $this->_propDict[\"wifiMac\"];\n } else {\n return null;\n }\n }", "public function getMacAddress(): string\n {\n if (false == $this->hasMacAddress()) {\n throw new RuntimeException(\"Mac address undefined\");\n }\n\n return $this->macAddress;\n }", "function getSender(): Channel;", "public function setMac($val)\n {\n $this->_propDict[\"mac\"] = intval($val);\n return $this;\n }", "function generateMACString ($macFields) {\r\n global $VK_variableOrder;\r\n\r\n $requestNum = $macFields['VK_SERVICE'];\r\n\r\n $data = '';\r\n\r\n foreach ((array)$VK_variableOrder[$requestNum] as $key) {\r\n $v = $macFields[$key];\r\n $data .= str_pad (strlen ($v), 3, '0', STR_PAD_LEFT) . $v;\r\n }\r\n\r\n return $data; \r\n }", "private static function mac($item, $fields, $message)\n {\n if (array_key_exists($item, $fields)) {\n if (!filter_var($fields[$item], FILTER_VALIDATE_MAC)) {\n self::$errors[] = (empty($message) ? \"The field '$item' is not a valid MAC\" : $message);\n }\n }\n }", "public function obtenerMAC()\n {\n $arp = exec('arp -a ' . $this->obtenerIP());\n $lines = explode(\" at \", $arp);\n\n $macAddr = trim(explode(\" \", $lines[1])[0]);\n\n if ($macAddr == \"\") {\n $arp = exec('arp -a ');\n $lines = explode(\" at \", $arp);\n\n $macAddr = trim(explode(\" \", $lines[1])[0]);\n }\n\n return $macAddr;\n }", "public static function HexToMac($xMac) {\n\t\t$sMac = '';\n\n\t\t// Leading zeros will be dropped, so add them manually\n\t\t$xMac = sprintf('%012x', hexdec($xMac));\n\n\t\t// Break into 2 char pairs\n\t\t$MACParts = str_split($xMac, 2);\n\n\t\tforeach ($MACParts as $sPiece) {\n\t\t\tif ($sMac != '')\n\t\t\t\t$sMac .= ':';\n\t\t\t$sMac .= $sPiece;\n\t\t}\n\n\t\treturn $sMac;\n\t}", "public static function getChannelId()\n {\n return self::$channel_id;\n }", "public function hasMacAddress(): bool\n {\n return self::UNKNOWN_MAC_ADDRESS != $this->macAddress;\n }", "public function getChannelName(){\n\t\tif (isset($this->channelName)){\n\t\t\treturn $this->channelName;\n\t\t}else{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function getMac($data)\n {\n return hash_hmac('sha256', $data, $this->getKey());\n }", "abstract public function getChannelKey() : int;", "function generateMACString ($macFields) {\n $banklinkCharset = $macFields['VK_ENCODING'];\n $requestNum = $macFields['VK_SERVICE'];\n\t\t$variableOrder = $this->variableOrder();\n\t\t\n $data = '';\n\t\t \n foreach ((array)$variableOrder[$requestNum] as $key) {\n $v = $macFields[$key];\n $l = mb_strlen ($v, $banklinkCharset);\n $data .= str_pad ($l, 3, '0', STR_PAD_LEFT) . $v;\n }\n\n if($data == '')\n \treturn 'null';\n else\n \treturn $data;\n }", "public function getChannelName () {\r\n return '@' . $name;\r\n }", "public function getComputerMacAddress() : Int {\n return($this->computerMacAddress);\n }", "public function setMac(Mac $mac)\n {\n $this->mac = $mac;\n\n return $this;\n }", "public function getChannelId()\n {\n return $this->channelId;\n }", "public function setRedisChannel() {\n $this->redisChannel = 'ch:'.str_replace(\" \",\"\",ucwords($this->channel));\n return $this->redisChannel;\n }", "public static function sendCommandRpi($mac)\n {\n $database = DatabaseFactory::getFactory()->getConnection();\n\n $sql = \"SELECT *\n FROM commands WHERE mac = :mac LIMIT 1\";\n $query = $database->prepare($sql);\n $query->execute(array(':mac' => $mac));\n $macs = $query->fetch();\n\n $query = $database->prepare(\"DELETE FROM commands WHERE mac = :mac\");\n $query->execute(array(':mac' => $mac));\n $sql = \"DELETE FROM commands WHERE mac = :mac\";\n\n return $macs;\n }", "public function getChannelID()\n {\n return $this->channelID;\n }", "public function getChannelId() {\n return $this->channelId;\n }", "public function getChannel()\n {\n return (string)$this->c;\n }", "function getMAC() {\n \n ob_start(); // Turn on output buffering\n system('ipconfig /all'); //Execute external program to display output\n $mycom = ob_get_contents(); // Capture the output into a variable\n ob_clean(); // Clean (erase) the output buffer\n\n $findme = \"Physical\";\n $pmac = strpos($mycom, $findme); // Find the position of Physical text\n $mac = substr($mycom,($pmac+36),17); // Get Physical Address\n\n //echo \"MAC ADD -- >\".$mac;\n return $mac;\n }", "public function getChannel()\n {\n return $this->_aChannel;\n }", "public function getNameChannelAttribute()\n {\n return \"{$this->channels_id} {$this->channel->name}\";\n }", "protected function get_channel() {\n\n\t\treturn $this->channel;\n\t}", "public function getChannelId();", "public function getChannelName(): string;", "function _generateMACString($type, $macFields)\n {\n $data = '';\n $vkVariableOrder = $this->_getVariableOrder($type);\n foreach ($vkVariableOrder as $key) {\n if (isset($macFields[$key])) {\n $v = trim($macFields[$key]);\n $data .= $v . '&';\n }\n }\n $data .= $this->_getMacKey() . '&';\n// echo \"<!-- \" . $data . \"-->\\n\";\n $data = strtoupper(md5($data));\n return $data;\n }", "public function getChannel()\n {\n $value = $this->get(self::CHANNEL);\n return $value === null ? (string)$value : $value;\n }", "private function validateResponseMac(array $parameters = array())\n {\n self::validateRequiredKeys($parameters);\n\n // Only SHA-256 supported\n if ($parameters['ALGORITHM'] !== '3' && $parameters['ALGORITHM'] !== 3) {\n throw new UnsupportedAlgorithmException('Only algorithm 3 is supported');\n }\n\n $hashString = join(\n '&',\n array_map(function ($field) use (&$parameters) {\n return $parameters[$field];\n }, self::$RESPONSE_MAC_FIELDS)\n );\n\n $calculatedMac = strtoupper(hash_hmac('sha256', $hashString, $this->getMerchantSecret()));\n\n if ($parameters['MAC'] !== $calculatedMac) {\n throw new ChecksumMismatchException('MAC value does not match calculated value');\n }\n }", "public function getChannel();", "public function getChannel();", "public function getChannel();", "public function getChannel();", "public function getMacCrc32C()\n {\n return $this->mac_crc32c;\n }", "public function getChannel()\n {\n return $this->channel;\n }", "public function getChannel()\n {\n return $this->channel;\n }", "public function getChannel()\n {\n return $this->channel;\n }", "public function getChannel()\n {\n return $this->channel;\n }", "function verify_vmware_vsphere_mac_clone($mac) {\n\t\t$new_forth_byte_first_bit = rand(1, 3);\n\t\t$mac = strtolower($this->vmware_mac_base.\":\".substr($mac, 9));\n\t\t$mac = substr_replace($mac , $new_forth_byte_first_bit, 9, 1);\n\t\treturn $mac;\n\t}", "public function getChanId()\n {\n return $this->chan_id;\n }", "public function getChanId()\n {\n return $this->chan_id;\n }", "public function setChannel($var)\n {\n GPBUtil::checkString($var, True);\n $this->channel = $var;\n\n return $this;\n }", "public function broadcastOn(){\n\t\treturn new PrivateChannel('channel-name');\n\t}", "public function getChannel() {\n return $this->channel;\n }", "public function getIpcChannel() {\n return $this->channel;\n }", "public function getChannelId() : int\n {\n return $this->channelId;\n }", "public function getChannelName();", "public function getChannelFlags()\n {\n return $this->channel_flags;\n }", "public function getChannel()\n {\n return $this->Channel;\n }", "public function setChannel($var)\n {\n GPBUtil::checkInt32($var);\n $this->channel = $var;\n\n return $this;\n }", "public function broadcastOn()\n {\n return new Channel('22');\n }", "public function getMACAddressList(){\n\t\t\t$processedList = array();\n\t\t\t$list = $this->conn->getRouterProperty($this->macAddressListID);\n\t\t\tforeach ($list as $key => $value) {\n\t\t\t\t# code...\n\t\t\t\tarray_push($processedList,bin2hex($this->utility->cleanStringApostrophe($value)));\n\t\t\t}\n\t\t\t$this->macAddressList=$processedList;\n\t\t\t\n\t\t}", "public function getEncCh(){\n return $this->encCH;\n }", "public function testComAdobeCqSocialCommonsEmailreplyImplMacmailEmailClientProvider() {\n\n }", "public function getChannel(): ?string\n {\n return $this->channel;\n }", "function GetChannel() {\n\t\treturn $this->channel;\n\t}", "public function ip_macaddress(){\n\n $ip = request()->ip();\n $mac=shell_exec(\"arp -a \".$ip);\n $mac_string = shell_exec(\"arp -a $ip\");\n\n $mac_array = explode(\" \",$mac_string);\n $mac = $mac_array[3];\n\n if(empty($mac)) {\n // for mac e linux\n $mac = shell_exec(\"arp -a \".escapeshellarg($_SERVER['REMOTE_ADDR']).\" | grep -o -E '(:xdigit:{1,2}:){5}:xdigit:{1,2}'\");\n $mac_string = shell_exec(\"arp -a $ip\");\n\n $mac_array = explode(\" \",$mac_string);\n $mac = $mac_array[3];\n $computer = $ip.\" - \".$mac;\n } else {\n // for windows\n $computer = $ip.\" - \".$mac;\n }\n\n return $computer;\n\n }", "protected function buildChannel($channel,$appId)\n {\n return \"channel:\" . $appId . \":\" . $channel;\n }", "function PortUnknownConnection($p_mac, $p_ip) {\n $PluginFusioninventoryUnknownDevice = new PluginFusioninventoryUnknownDevice();\n $unknown_infos = array();\n $unknown_infos[\"name\"] = '';\n $newID=$PluginFusioninventoryUnknownDevice->add($unknown_infos);\n // Add networking_port\n $NetworkPort =new NetworkPort();\n $port_add = array();\n $port_add[\"items_id\"] = $newID;\n $port_add[\"itemtype\"] = 'PluginFusioninventoryUnknownDevice';\n $port_add[\"ip\"] = $p_ip;\n $port_add['mac'] = $p_mac;\n $dport = $NetworkPort->add($port_add);\n $this->connectDB($dport);\n }", "public function testMacValidationException()\n {\n $data = array(\n 'merchantID' => 1,\n 'storeID' => 2,\n 'orderID' => 3,\n 'captureID' => 4,\n 'merchantReference' => 5,\n 'paymentReference' => 6,\n 'userID' => 7,\n 'amount' => 9,\n 'currency' => 10,\n 'transactionStatus' => 12,\n 'orderStatus' => 13,\n 'additionalData' => 15,\n 'timestamp' => 16,\n 'version' => 1.5,\n 'mac' => 'fbdc46ef7ab1ccf195781983caf60782a81bb1e2',\n );\n\n $processor = new \\Upg\\Library\\Tests\\Mock\\Mns\\MockProcessor();\n\n $handler = new Handler($this->config, $data, $processor);\n }", "public function getChannel(): Channel\n {\n return $this->channel;\n }", "function reflect_get_channel() {\n\n\t$c = q(\"select * from channel left join xchan on channel_hash = xchan_hash \n\t\twhere channel_address = '%s' limit 1\",\n\t\tdbesc(REDMATRIX_IMPORTCHANNEL)\n\t);\n\treturn $c[0];\n}", "public function setChannel($var)\n {\n GPBUtil::checkString($var, True);\n $this->Channel = $var;\n\n return $this;\n }", "function generate_random_mac_address() {\n\t$mac = \"02\";\n\tfor ($x = 0; $x < 5; $x++) {\n\t\t$mac .= \":\" . dechex(rand(16, 255));\n\t}\n\treturn $mac;\n}", "public function channel()\n {\n $channel = $this->isNumeric() ? $this->params[1] : $this->params[0];\n if ($channel[0] == '#' or $channel[0] == '&') {\n return $channel;\n } else {\n return null;\n }\n }", "public static function update_channel() {\n\t\tif ( isset( $_POST['uid'] ) && isset( $_POST['channel'] ) ) {\n\t\t\t$uid = sanitize_text_field( wp_unslash( $_POST['uid'] ) );\n\t\t\t$channel = sanitize_text_field( wp_unslash( $_POST['channel'] ) );\n\t\t\tYarns_Microsub_Channels::update( $uid, $channel );\n\t\t\techo wp_kses_post( static::list_channels() );\n\t\t}\n\t\twp_die();\n\t}", "public function broadcastOn() {\n\t\treturn new PrivateChannel('channel-name');\n\t}", "public function hasChannel(){\n return $this->_has(5);\n }", "public function setChannel()\n {\n $name = $this->slim->request->post('name');\n\n if (!isset($name)) {\n throw new PushApiException(PushApiException::NO_DATA);\n }\n\n // Checking if channel already exists\n $channel = Channel::where('name', $name)->first();\n\n if (!isset($channel->name)) {\n $channel = new Channel;\n $channel->name = $name;\n $channel->save();\n }\n $this->send($channel->toArray());\n }", "public function getChannelTextAttribute() {\n return $this->attributes['channel'] ? \\Lang::get('surveys::update.data.channel.' . $this->attributes['channel']) : '';\n }", "public function setWifiMac($val)\n {\n $this->_propDict[\"wifiMac\"] = $val;\n return $this;\n }", "public function broadcastOn()\n {\n return ['pizzamart-channel'];\n }", "public static function delete_channel() {\n\t\tif ( isset( $_POST['uid'] ) ) {\n\t\t\t$uid = sanitize_text_field( wp_unslash( $_POST['uid'] ) );\n\t\t\tYarns_Microsub_Channels::delete( $uid );\n\t\t\techo wp_kses_post( static::list_channels() );\n\t\t}\n\t\twp_die();\n\t}", "protected function _get_vendor($mac)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $mac = preg_replace('/-/', ':', $mac);\n\n // Pull in MAC address database\n if (empty($this->mac_database)) {\n include clearos_app_base('network_map') . '/deploy/mac_database.php';\n $this->mac_database = $mac_database;\n }\n\n $vendor = '';\n $matches = array();\n\n if (preg_match('/^(.*):(.*):(.*):(.*):(.*):(.*)/', strtoupper($mac), $matches)) {\n $mac = sprintf(\n '%02s:%02s:%02s:%02s:%02s:%02s',\n $matches[1],\n $matches[2],\n $matches[3],\n $matches[4],\n $matches[5],\n $matches[6]\n );\n\n $mac_prefix = strtoupper(substr($mac, 0, 8));\n $vendor = isset($this->mac_database[$mac_prefix]) ? $this->mac_database[$mac_prefix] : '';\n }\n\n return $vendor;\n }", "public function broadcastOn()\n {\n\t\tif(in_array(config('app.name'),['haxibiao','yinxiangshipin'])){\n\t\t\treturn new PrivateChannel(config('app.name').'.User.' . $this->categoryUser->user_id);\n\t\t}\n return new PrivateChannel('App.User.' . $this->categoryUser->user_id);\n }", "public function getChannel()\n {\n $value = $this->get(self::channel);\n return $value === null ? (integer)$value : $value;\n }", "public static function configRpi($mac)\n {\n $database = DatabaseFactory::getFactory()->getConnection();\n\n $sql = \"SELECT id, mac, url, urlViaServer, orientation\n FROM rpiStatus WHERE mac = :mac\n ORDER BY id DESC\n LIMIT 1\";\n $query = $database->prepare($sql);\n $query->execute(array(':mac' => $mac));\n $mac = $query->fetch();\n\n return $mac;\n }", "function delChannel()\n {\n }" ]
[ "0.7953564", "0.5873044", "0.5873044", "0.5631075", "0.556731", "0.55507416", "0.54881865", "0.5415438", "0.5410627", "0.5181299", "0.51005137", "0.5082658", "0.5047162", "0.4988553", "0.49850357", "0.49444023", "0.48963198", "0.48938367", "0.48639014", "0.48527324", "0.4849211", "0.48297465", "0.48215723", "0.4816627", "0.48099944", "0.48031232", "0.47938728", "0.47833854", "0.47804874", "0.4762486", "0.47445926", "0.4697799", "0.46960643", "0.46829847", "0.46785745", "0.466524", "0.46629366", "0.46532887", "0.46507913", "0.4641751", "0.46143484", "0.46068528", "0.46028244", "0.45903927", "0.45673487", "0.4560141", "0.45541435", "0.4553899", "0.45435405", "0.4543238", "0.45317912", "0.453139", "0.453139", "0.453139", "0.453139", "0.44864485", "0.446857", "0.446857", "0.446857", "0.446857", "0.44560143", "0.44546393", "0.44546393", "0.4446012", "0.44403684", "0.44317257", "0.44306543", "0.44176805", "0.43999428", "0.43960467", "0.43947634", "0.4385218", "0.43721166", "0.43678102", "0.43646008", "0.43637875", "0.4354701", "0.4353314", "0.43529323", "0.4349324", "0.43351784", "0.43239585", "0.4314513", "0.4307456", "0.43063328", "0.43061942", "0.42940637", "0.4289331", "0.42876223", "0.42843068", "0.42753708", "0.42753485", "0.4274889", "0.42689347", "0.42597443", "0.42567387", "0.42561698", "0.42447913", "0.42422673", "0.42356077" ]
0.7929934
1
TODO: Implement frameInitialized() method.
TODO: Реализовать метод frameInitialized().
function frameInitialized() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function frameSet() {}", "public static function frameInitialize(): void\n {\n date_default_timezone_set('Asia/Shanghai');\n }", "public static function frameInitialize(): void\n {\n date_default_timezone_set('Asia/Shanghai');\n }", "public static function frameInitialize(): void\n {\n date_default_timezone_set('Asia/Shanghai');\n }", "protected function initialized() {;}", "public static function frameInitialize(): void\n {\n date_default_timezone_set('Asia/Shanghai');\n ini_set('default_socket_timeout', -1);\n self::loadConf(EASYSWOOLE_ROOT . '/Application/Conf');\n Di::getInstance()->set(SysConst::LOGGER_WRITER,Handler::class);\n }", "public function get_frame()\n {\n return $this->frame;\n }", "private function initialize()\n {\n }", "function init () {\n }", "public function init() {\n\t\tif (!$this->getIsInitialized()) {\n\t\t\t$this->determineCurrent();\n\t\t\tparent::init();\n\t\t}\n\t}", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function initialize()\n {\n }", "function init()\n {\n }", "function init()\n {\n }", "function init()\n {\n }", "function init()\n {\n }", "public function getLastInitialized(){ }", "protected function initFrameWork()\n {\n $this->objectManager = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');\n $bootstrap = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Core\\Bootstrap');\n $bootstrap->initialize(['extensionName' => $this->extensionName, 'pluginName' => $this->pluginName]);\n }", "public function init() {\r\n \r\n }", "function init() {\n\t}", "function init() {\n }", "public function initialize()\r\n {\r\n }", "function init()\n {\n\n }", "function init()\n {\n\n }", "function init()\n {\n\n }", "public function initialize() {}", "public function initialize() {}", "public function initialize() {}", "public function initialize() {}", "public function initialize() {}", "public function initialize() {}", "public function initialize() {}", "public function initialize() {}", "public function initialize() {}", "public function initialize() {}", "private function\n\t\tset_frame(Oedipus_Frame $frame)\n\t{\n\t\t$this->frame = $frame;\n\t}", "public function initialize() { }", "public function init ()\r\n {\r\n }", "public function init()\n { \n \n }" ]
[ "0.6800913", "0.67737204", "0.67737204", "0.67737204", "0.6423077", "0.62093586", "0.61522067", "0.59144545", "0.5897266", "0.5888239", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.581029", "0.5798168", "0.5798168", "0.5798168", "0.5798168", "0.57831633", "0.577515", "0.57696694", "0.57611585", "0.57605636", "0.5759383", "0.57549787", "0.57549787", "0.57549787", "0.57495725", "0.57495725", "0.57495725", "0.57488966", "0.57488966", "0.5748591", "0.5748591", "0.5748591", "0.5748591", "0.5748591", "0.5739686", "0.57389534", "0.57353795", "0.5731729" ]
0.8894378
0
TODO: Implement onDispatcher() method.
TODO: Реализовать метод onDispatcher().
function onDispatcher(Request $request, Response $response, $targetControllerClass, $targetAction) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDispatcher();", "public function setDispatcher(\\Symfony\\Component\\EventDispatcher\\EventDispatcherInterface $dispatcher);", "private function dispatcher()\n {\n $route = $this->serviceLocator->get('router')->getByRequest();\n\n $controller = $this->getController($route);\n\n $view = $this->getView($route, $controller);\n \n $this->serviceLocator->get('response')->setView($view);\n $this->serviceLocator->get('response')->render();\n }", "abstract protected function getDispatcherClass();", "protected function dispatched() {;}", "public function dispatch()\n {\n }", "public function dispatch()\n {\n }", "public function dispatch()\n {\n }", "public function getDispatcher()\n\t{\n\t\treturn $this->dispatcher;\n\t}", "public function process(Dispatcher $dispatcher): void{\n }", "public function getDispatcher() {\n\t\treturn $this->_dispatcher;\n\t}", "private function dispatch()\n\t{\n\t\t// Get routing service\n\t\t$router = $this->getService('router');\n\n\t\t// Dispatch route\n\t\t$response = $router->dispatch();\n\n\t\t// Render response\n\t\t$response->render();\n\t}", "public function dispatch()\n {\n }", "protected function getSignalSlotDispatcher() {}", "protected function getSignalSlotDispatcher() {}", "protected function getSignalSlotDispatcher() {}", "protected function getSignalSlotDispatcher() {}", "protected function getSignalSlotDispatcher() {}", "protected function getSignalSlotDispatcher() {}", "protected function getSignalSlotDispatcher() {}", "protected function getSignalSlotDispatcher() {}", "protected function getSignalSlotDispatcher() {}", "protected function getSignalSlotDispatcher() {}", "public function hasDispatcher();", "public function dispatch()\n {\n if ($this->_dispatched) {\n return;\n }\n\n $config = $this->getConfig();\n $dispatcher = $this->getApp()->getMessageDispatcher();\n\n $dispatcher->post('beforeResourceSetup', $this);\n $this->setup($config);\n $dispatcher->post('afterResourceSetup', $this);\n\n // Detach from dispatch event\n if (isset($this->_dispatchEvent)) {\n $event = (is_array($this->_dispatchEvent) && isset($this->_dispatchEvent[0]))\n ? $this->_dispatchEvent[0] : $this->_dispatchEvent;\n $dispatcher->detach($this, $event);\n }\n\n $this->_dispatched = true;\n }", "public function postDispatch ()\n {\n parent::postDispatch();\n }", "public function dispatch();", "public function postDispatch()\n {\n parent::postDispatch();\n\n }", "public function getDispatcher()\n {\n return $this->events;\n }", "public function getDispatcher()\n {\n return $this->events;\n }", "public function dispatch()\n\t{\n\t\t$dispatcher = $this->getComponent( 'Dispatcher' );\n\t\t$dispatcher->executeDispatch();\n\t\techo $dispatcher->getTemplate()->getContent();\n\t}", "public function postDispatch() {\n\t}", "public static function dispatch() {\n ob_start();\n \n $dispatcher = self::$dispatch;\n $dispatcher(self::$_controller, self::$_action);\n \n MM::$response .= ob_get_clean();\n }", "public function preDispatch(){\n\n // a brute-force protection here would be nice\n\n parent::preDispatch(); \n\n if (!$this->getRequest()->isDispatched()) {\n return;\n }\n\n\n }", "public function postDispatch()\n {}", "public function postDispatch() : void {\n\t}", "protected static function getSignalSlotDispatcher() {}", "protected static function getSignalSlotDispatcher() {}", "function predispatch() {\n parent::predispatch();\n \n }", "public function preDispatch()\n {\n parent::preDispatch();\n }", "public function preDispatch()\n {\n \n }", "public function getDispatcher(): Dispatcher\n {\n return $this->events;\n }", "public function setValue(Dispatcher $dispatcher): void{\n }", "public function onBeforeDispatch()\n\t{\n\t\treturn true;\n\t}", "public function preDispatch() {\n\t}", "public function preDispatch() {\n\t}", "function preDispatch()\r\n\t{\r\n\r\n\t}", "public function run()\n {\n $this->createDispatcher();\n $this->dispatch();\n $this->handleDispatchedRoute();\n }", "public function beforeDispatch(Event $event, Dispatcher $dispatcher) {\n\t\t\n\t}", "public function preDispatch()\n {}", "private function __dispatchRouter() {\n $this->router = FastRoute\\simpleDispatcher(function(FastRoute\\RouteCollector $route) {\n if(!empty($this->routecollection)) {\n foreach($this->routecollection as $r) {\n $route->addRoute($r['method'],$r['route'],$r['callback']);\n } \n }\n });\n // setup the collection to dispatch\n $this->__setupDispatch();\n }", "protected function preDispatch() { /* no-op */ }", "private function handleDispatchedRoute()\n {\n switch ($this->dispatchedRoute[0]) {\n case Dispatcher::NOT_FOUND:\n // ... 404 Not Found\n throw new \\Exception('', 404);\n case Dispatcher::METHOD_NOT_ALLOWED:\n $allowedMethods = $this->dispatchedRoute[1];\n // ... 404 Method Not Allowed\n throw new \\Exception(implode(' ', $allowedMethods), 404);\n case Dispatcher::FOUND:\n $routerData = $this->getDispatchedRouteData();\n\n $controller = $routerData['controller'];\n $action = $routerData['action'];\n $vars = $routerData['vars'];\n\n $this->setRouterDataInRequest($controller, $action, $vars);\n $this->runControllerAction($controller, $action, $vars);\n break;\n }\n }", "public function getEventDispatcher()\n {\n return $this->dispatcher;\n }", "public function dispatch() {\n\n\t\t/**\n\t\t * Let's load extra controllers\n\t\t */\n\t\t// if ($path = $this->app->path->path('applications:masterapp/controllers')) {\n\t\t// \t$this->app->path->register($path, 'controllers');\n\t\t// }\n\n\t\t/**\n\t\t * Let's bind an event to each category loading\n\t\t */\n\t\t// $this->app->event->dispatcher->connect('category:init', array($this, 'categoryLoaded'));\n\n\t\tparent::dispatch();\n\t}", "protected function getSignalSlotDispatcher()\n {\n return GeneralUtility::makeInstance(Dispatcher::class);\n }", "protected function injectControllerDispatcher(){\n // router.matched\n\n $dispatcher = new ControllerDispatcher($this->app);\n\n $this->app->instance('illuminate.route.dispatcher', $dispatcher);\n\n $this->app->instance(\\Illuminate\\Routing\\Contracts\\ControllerDispatcher::class, $dispatcher);\n\n // Caution: If the priority of this listener is lower than\n // PageTypeRouter, the controllerDispatcher wont geht useful\n // information if no page was found\n $this->app['events']->listen(RouteMatched::class, function(RouteMatched $event) use ($dispatcher) {\n $dispatcher->configure($event->route, $event->request);\n }, 10);\n\n }", "function processNext(Dispatcher $dispatcher);", "abstract public function dispatch();", "public static function setEventDispatcher(Dispatcher $dispatcher)\n {\n }", "public static function getDispatcher()\n {\n /** @var \\Illuminate\\Http\\Client\\Factory $instance */\n return $instance->getDispatcher();\n }", "public function dispatch()\n {\n $this->init();\n $this->checkReference();\n $this->main();\n $this->printContent();\n }", "public function setDispatcher($dispatcher) {\n $this->dispatcher = $dispatcher;\n }", "public function beforeExecuteRoute($dispatcher) {}", "public function getEventDispatcher()\n {\n return $this->dispatcher;\n }", "protected function localDispatch(){\r\n\t}", "private function __setupDispatch() {\n $this->payload = $this->router->dispatch($this->request->method(),$this->request->path());\n $this->requestMethod = filter_input(INPUT_SERVER,'REQUEST_METHOD');\n\n // error handler to throw errors\n switch ($this->payload[0]) { \n case FastRoute\\Dispatcher::NOT_FOUND:\n response()->json(['message'=>'404 - '.$this->statusTexts[404]],404);\n break;\n case FastRoute\\Dispatcher::METHOD_NOT_ALLOWED:\n response()->json(['message'=>'405 - '.$this->statusTexts[405]],405);\n break;\n case FastRoute\\Dispatcher::FOUND:\n if($this->requestMethod === 'OPTIONS') {\n return true;\n }\n $this->routehandler = $this->payload[1];\n $this->routevars = $this->payload[2];\n if(is_object($this->routehandler)) {\n call_user_func($this->routehandler, $this->routevars);\n } else {\n $this->class = $this->dependency->injector->make($this->payload[1][0]);\n $this->method = $this->payload[1][1];\n $this->request->add($this->routevars);\n $this->class->{$this->method}($this->request,$this->response);\n }\n break;\n default:\n return response()->json(['message'=>'500 - '.$this->statusTexts[500]],500);\n break;\n } \n }", "protected function replaceRouteDispatcher()\n {\n $this->app->singleton('illuminate.route.dispatcher', function($app) {\n return new IlluminateControllerDispatcher($app['api.router.adapter']->getRouter(), $app);\n });\n }", "protected function getDispatcher(): Dispatcher\n {\n if ($this->dispatcher === null) {\n $this->dispatcher = simpleDispatcher(static function (RouteCollector $r) {\n foreach (app()->router->getRoutes() as $route) {\n $r->addRoute($route['method'], $route['uri'], $route['action']);\n }\n });\n }\n\n return $this->dispatcher;\n }", "public function start()\n {\n $this->dispatcher();\n }", "protected function createDispatcher()\n {\n return $this->dispatcher ?: \\FastRoute\\simpleDispatcher(function ($r) {\n $this->sortRoutes();\n foreach ($this->routes as $route) {\n $r->addRoute($route['method'], $route['uri'], $route['action']);\n }\n });\n }", "public static function getDispatcher()\n {\n /** @var \\Illuminate\\View\\Factory $instance */\n return $instance->getDispatcher();\n }", "public function setEventDispatcher(Dispatcher $dispatcher)\n\t{\n\t\t$this->dispatcher = $dispatcher;\n\t}", "private function dispatcher()\n {\n $this->requestMethod = strtolower($_SERVER['REQUEST_METHOD']);\n $this->isXhr = (\n (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']))\n || (isset($_SERVER['X_REQUESTED_WITH']) && strtolower($_SERVER['X_REQUESTED_WITH']) == 'xmlhttprequest')\n );\n\n $endpoints = $this->dispatcherWhitelist[$this->requestMethod];\n $totalEndpoints = count($endpoints);\n if ($totalEndpoints > 1) {\n trigger_error('Only one endpoint can be specified per request.', E_USER_NOTICE);\n }\n\n // Only allow one endpoint per request. Obviously this is very\n // simplified.\n $endpoint = reset($endpoints);\n\n // Set default endpoint, if none provided.\n if (!$endpoint) {\n $endpoint = 'cart';\n }\n\n if (in_array($endpoint, $this->dispatcherWhitelist[$this->requestMethod])) {\n switch ($endpoint) {\n // This will only accept requests over GET.\n case 'cart':\n $this->view->render($endpoint);\n break;\n // This will only accept requests over POST.\n case 'update':\n if ($this->handleUpdateCartQuantityPost()) {\n if ($this->isXhr) {\n $this->sendJson($this->view->provisionView(false));\n } else {\n $this->redirect('?cart');\n }\n } else {\n // Not going to bother handling regular synchronous\n // errors, other than redirecting back to the page.\n // That sort of exhaustiveness is beyond the scope\n // of this test. Nevertheless, I did handle\n // asynchronous errors, because everyone loves\n // eye candy.\n $this->redirect('?error');\n }\n break;\n }\n }\n }", "function claimedPubsDispatcher()\r\n {\r\n MyResearch::dispatcher(\"claimed\");\r\n }", "private function dispatch(){\n\t\tcall_user_func_array(array($this->controller, $this->strAction), $this->arrArgs);\n\t}", "public function getEventDispatcher()\n\t{\n\t\treturn $this->dispatcher;\n\t}", "protected function mapEvents(DispatcherInterface $dispatcher)\n {\n }", "public function getEventDispatcher()\n {\n return $this->_eventDispatcher;\n }", "public function dispatch()\n {\n $base = $this->getBaseDir().ltrim($this->getRequestUri(),'/');\n $requestUri = rtrim($base, '/');\n $requestMethod = $this->getRequestMethod();\n\n /**\n * Chama o metodo correspondente\n */\n foreach ($this->getRoutes()[$requestMethod] as $route) {\n $match = $this->match($requestUri, $route['route']);\n\n if ($match[0]) {\n if (is_numeric($match[1])) {\n call_user_func($route['closure'], $match[1]);\n } else {\n call_user_func($route['closure']);\n }\n \n }\n }\n }", "public static function getEventDispatcher()\n {\n return static::$dispatcher;\n }", "public static function getEventDispatcher()\n {\n return static::$dispatcher;\n }", "public static function getEventDispatcher()\n {\n }", "public function getEventDispatcher()\n {\n return $this->eventDispatcher;\n }", "public function __construct(Dispatcher $dispatcher)\n\t{\n\t\t$this->dispatcher = $dispatcher;\n\t}", "public function dispatch()\n {\n $this->getConfiguration()->dispatch();\n }", "public function postDispatch() {\n $view = $this->view;\n }", "public function testDispatcher() {\n\n\t\t$dispatcher = SlackFactory::dispatcher();\n\n\t\t$this->assertInstanceOf('HybridLogic\\Slack\\SlashDispatcher', $dispatcher);\n\n\t}", "public function getEventDispatcher(): EventDispatcherInterface;", "public function getEventDispatcher() : IEventDispatcher;", "public function __construct(Dispatcher $dispatcher)\n {\n $this->dispatcher = $dispatcher;\n }", "public function __construct(Dispatcher $dispatcher)\n {\n $this->dispatcher = $dispatcher;\n }", "public function run() {\n echo $this->dispatch();\n }", "public function dispatch() {\n\t\t$this->setController();\n\t\t$this->setMethod();\n\t\t$this->setParams();\n\t\tcall_user_func_array(array($this->controller, $this->method), $this->params);\n\t}", "public function run()\r\n {\r\n $this->getController()->dispatch();\r\n }", "public function getDispatcher()\n {\n if (!isset($this->dispatcher)) {\n $this->dispatcher = new EventDispatcher();\n }\n return $this->dispatcher;\n }", "protected function on_Request()\n {\n }", "public function testDispatching()\n {\n }", "public function dispatch()\n {\n $con = new MVC\\Controller\\Controller();\n }", "public function register(EventDispatcher $dispatcher) : void;" ]
[ "0.7902221", "0.70768285", "0.70197856", "0.6925531", "0.6881273", "0.6860391", "0.68589115", "0.68589115", "0.68568337", "0.6826626", "0.68089247", "0.67439365", "0.6738945", "0.6704009", "0.6703038", "0.6703038", "0.6703038", "0.6703038", "0.67005366", "0.67005366", "0.67005366", "0.67005366", "0.67005366", "0.667504", "0.6623471", "0.66107416", "0.65986216", "0.6594412", "0.6549001", "0.6549001", "0.65195405", "0.6493434", "0.6489627", "0.6466561", "0.6455602", "0.6450145", "0.64324474", "0.6432366", "0.6331341", "0.63268286", "0.6324801", "0.63240004", "0.6314419", "0.6307846", "0.6294616", "0.6294616", "0.6277007", "0.6271744", "0.62704885", "0.626567", "0.62655413", "0.6263721", "0.6222329", "0.6214973", "0.62116635", "0.62106884", "0.6198694", "0.6142954", "0.61357254", "0.6116131", "0.6092191", "0.6087763", "0.6060232", "0.60170597", "0.6012754", "0.6000755", "0.59953517", "0.59887016", "0.5984625", "0.5971106", "0.59484315", "0.59340006", "0.592007", "0.5913661", "0.5913344", "0.5910038", "0.58919716", "0.58845484", "0.58748275", "0.58722454", "0.5870552", "0.5870552", "0.58675325", "0.5866493", "0.58646506", "0.58521163", "0.58490735", "0.5839332", "0.5828197", "0.582775", "0.5825883", "0.5825883", "0.5823738", "0.5813243", "0.5812534", "0.5809314", "0.5801938", "0.57905585", "0.57876766", "0.578563" ]
0.71234775
1
Get the value of holder
Получить значение holder
public function getHolder() { return $this->holder; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHolder(){\n\t\treturn $this->holder;\n\t}", "public function getValue() {\n return isset($this->container['Value']) ? $this->container['Value'] : null;\n\t}", "function getValue()\r\n {\r\n return $this -> _value;\r\n }", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() // {{{\n {\n return $this->_value;\n }", "public function get()\n {\n\n list($value, $isHit) = $this->driver->get($this->getKey());\n $this->value = $value;\n $this->isHit = $isHit;\n\n return $this->value;\n }", "function get_value() {\n\t\treturn $this->value;\n\t}", "public function getValue() {return $this->_value; }", "function get_value() {\r\n\r\n return $this->_value;\r\n\r\n }", "public function getValue()\n {\n return $this->_;\n }", "function getValue() {\r\n return $this->_value;\r\n }", "public function getVal();", "function value(){\n\t\tif(!$this->_loaded){\n\t\t\t$this->load();\n\t\t}\n\t\treturn $this->_value;\n\t}", "public function fetchValue()\n {\n return $this->fetch('value');\n }", "public function getValue(){\n\t\t\t# Return the value\n\t\t\treturn $this->value;\n\t\t}", "function getValue() {\r\n\t\treturn $this->value;\r\n\t}", "public function getValue() {\n return $this->_value;\n }", "public function getValue() \n { \n return $this->_data; \n }", "protected function _getValue() {\n\t\treturn (string) $this->_data['value'];\n\t}", "protected function value() {\n return $this->value;\n }", "public function getValue() {\n return $this->_value;\n }", "function getValue()\n\t{\n\t\treturn $this->value;\n\t}", "public function get()\n\t{\n\t\treturn $this->value;\n\t}", "public function getValue(){\n\t\treturn $this->value;\n\t}", "public function getValue() {\n return $this->get('value');\n }", "public function getValue()\n {\n return $this->_value;\n }", "public function getValue()\n {\n return $this->_value;\n }", "public function getValue()\n {\n return $this->_value;\n }", "public function getValue()\n {\n return $this->_value;\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();", "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()\n {\n return $this->_value;\n\n }", "function getValue() {\n return $this->value;\n }", "function getvalue() {\n\treturn $this->value;\n}", "public function getValue() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"value\");\n\t}", "public function getValue() {\n return $this->_value;\n }", "public function get()\n {\n return $this->value;\n }", "public function get()\n {\n return $this->value;\n }", "public function get()\n {\n return $this->value;\n }", "public function get()\n {\n return $this->value;\n }", "public function get()\n {\n return $this->value;\n }", "public function get_value()\n { \n return $this->value;\n }", "public function getValue() {\n\t return $this->value;\n\t}", "public function getValue() {\n\n\t \t\t return $this->value;\n\t }", "public function getValue()\n\t{\n\t\treturn $this->_value;\n\t}", "public function getValue()\n\t{\n\t\treturn $this->_value;\n\t}", "public function getValue()\n\t{\n\t\treturn $this->_value;\n\t}", "public function getValue()\n\t{\n\t\treturn $this->_value;\n\t}", "public function getValue()\n\t{\n\t\treturn $this->data['value'];\n\t}", "public function getValue()\n {\n return $this->value;\n }", "public function get_value()\n {\n }", "public function get_value()\n {\n }", "public function getValue()\r\n {\r\n return $this->value;\r\n }", "public function getValue()\r\n {\r\n return $this->value;\r\n }", "function getItem() ;", "public function getValue()\n {\n return $this->get(self::VALUE);\n }", "public function get_value() {\r\n\t\t$reset = $this->page_data->get_get()->contains($this->get_reset_param());\r\n\t\treturn ($reset) ? '' : $this->page_data->get_get()->get_item($this->get_param(), '');\r\n\t}", "public function get() {\n return $this->value;\n }", "function getValue() {\n\n return $this->value;\n\n }", "public function get_value() {\n return $this->value;\n }", "public function get_value() {\n return $this->value;\n }" ]
[ "0.745061", "0.68811315", "0.67903423", "0.67894655", "0.67894655", "0.67894655", "0.67894655", "0.67894655", "0.67756814", "0.6761661", "0.6724703", "0.6707129", "0.66909254", "0.66368526", "0.66340524", "0.66272914", "0.662045", "0.66092646", "0.6597131", "0.65704", "0.656421", "0.65397006", "0.65226334", "0.6513633", "0.6512367", "0.6511124", "0.6504598", "0.6502033", "0.64873564", "0.6482275", "0.6482275", "0.6482275", "0.6482275", "0.64797175", "0.64797175", "0.64797175", "0.64797175", "0.64797175", "0.64797175", "0.64797175", "0.64797175", "0.64797175", "0.64797175", "0.64797175", "0.64797175", "0.64797175", "0.64797175", "0.64797175", "0.64797175", "0.64797175", "0.64797175", "0.64797175", "0.64797175", "0.64797175", "0.64797175", "0.64797175", "0.64797175", "0.64797175", "0.64797175", "0.64797175", "0.64797175", "0.64797175", "0.64797175", "0.64797175", "0.64797175", "0.64797175", "0.64797175", "0.64797175", "0.64797175", "0.64797175", "0.6470493", "0.6459454", "0.644731", "0.6446694", "0.6437397", "0.6436864", "0.6436864", "0.6436864", "0.6436864", "0.6436864", "0.64286196", "0.64275116", "0.64233416", "0.6418216", "0.6418216", "0.6418216", "0.6418216", "0.63951", "0.6392536", "0.6387155", "0.6387155", "0.6384204", "0.6384204", "0.63790774", "0.6375374", "0.6374585", "0.6367934", "0.63650197", "0.6363316", "0.6363316" ]
0.74228567
1
Get the value of due_date
Получить значение due_date
public function getDueDate() { return $this->due_date; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dueDate()\n {\n return $this->due_date;\n }", "public function getDueDate()\n {\n return $this->due_date;\n }", "public function getDueDate()\n {\n return $this->due_date;\n }", "function getDueOn() {\n return $this->getDateField1();\n }", "public function get_due_date() {\n\t\treturn $this->due_date;\n\t}", "public function getDueDate(){\r\n $this->initDb();\r\n if($this->id != \"\"){\r\n $this->due_date = (getValue(\"SELECT subject_due_date FROM tbl_subjects WHERE subject_id = \" . $this->id));\r\n }\r\n return $this->due_date;\r\n }", "public function getDueDate() {\n\t\treturn $this->dueDate;\n\t}", "public function getDueOn()\r\n\t{\r\n\t\treturn $this->due_on;\r\n\t}", "function getDueOnDate() {\n $on = $this->getAdditionalProperty('due_on_filter_on');\n\n return $on ? new DateValue($on) : null;\n }", "public function getDueDate(): ?string;", "public function getPaymentDueDateAttribute() {\n return $this->attributes['payment_due_date'] ?? null;\n }", "public function getDueDate(): ?DateTime {\n return $this->dueDate;\n }", "public function getRegularDue();", "public function getPaymentDueDate() {\n\t\treturn $this->paymentDueDate;\n\t}", "public function getSepaDueDate()\n {\n $days = $this->config->get('Novalnet.sepa_due_date');\n $due = preg_match('/^[0-9]/', $days) ? $days : '7';\n if( $due < 7 ) $due = 7;\n $day_timestamp = strtotime(\"+ \" . $due . \" day\");\n $due_date = date( \"Y-m-d\", $day_timestamp );\n return $due_date;\n\n }", "public function getDueDate(): ?\\DateTime;", "public function test_get_due_date() {\n $this->resetAfterTest();\n $tsassign = new plagiarism_turnitinsim_assign();\n\n // Log instructor in.\n $this->setUser($this->instructor);\n\n // Create assign module with a due date.\n $record = new stdClass();\n $record->course = $this->course;\n $record->duedate = 1000000001;\n $assign = $this->getDataGenerator()->create_module('assign', $record);\n\n $response = $tsassign->get_due_date($assign->id);\n $this->assertEquals(1000000001, $response);\n\n // Create assign module without a due date.\n $record = new stdClass();\n $record->course = $this->course;\n $record->duedate = 1000000001;\n $assign = $this->getDataGenerator()->create_module('assign', $record);\n\n $response = $tsassign->get_due_date($assign->id);\n $this->assertEquals(1000000001, $response);\n }", "function dueDateToString($due_date) {\r\n\t\t\t\t\t\tif(!$due_date) return '';\r\n\t\t\t\t\t\treturn date('m/d/Y', strtotime($due_date));\r\n\t\t\t\t\t}", "public function calculateDueDate()\n {\n assert($this->supplier !== null);\n $terms = $this->supplier->getPaymentTerms();\n $this->dueDate = $terms->calculateDueDate($this->date);\n return clone $this->dueDate;\n }", "public static function getDueDate()\n\t{\n\t\t$freq = config::byKey('freq', 'prixcarburants');\n\t\tif ($freq == 'prog') $freq = config::byKey('autorefresh', 'prixcarburants');\n\n\t\tif ($freq == '' || is_null($freq)) { // set default if not set\n\t\t\tlog::add(__CLASS__, 'debug', __('Aucun Cron Défini pour la mise à jour, passage au défaut :', __FILE__) . self::DEFAULT_CRON);\n\t\t\t$freq = self::DEFAULT_CRON;\n\t\t}\n\t\treturn self::getDueDateStr($freq);\n\t}", "public function getDueDate()\n {\n if (!$this->getStartDate() instanceof \\DateTime) {\n return null;\n }\n $dueDate = clone $this->getStartDate();\n $dueDate->modify('+40 days');\n\n return $dueDate;\n }", "public function due($due = false){\n\t\tif($due === false){\n\t\t\tif(!$this->loaded){\n\t\t\t\t$this->load();\n\t\t\t}\n\t\t\treturn $this->taskman->adjustFromGMT($this->due_datetime);\n\t\t}else if(!is_string($due) || !$this->isDateTime($due)){\n\t\t\tthrow new IllegalArgumentException(\"optional argument to \" . __METHOD__ . \" must be a string of format YYYY-MM-DD HH:mm:SS\");\n\t\t}else{\n\t\t\tif($this->canWrite()){\n\t\t\t\t$due = $this->taskman->adjustToGMT($due);\n\t\t\t\t$sql = \"UPDATE `\" . $this->avalanche->PREFIX() . $this->taskman->folder() . \"_tasks` SET `due`=\\\"\" . $due . \"\\\" WHERE id='\" . $this->id . \"'\";\n\t\t\t\t$result = $this->avalanche->mysql_query($sql);\n\t\t\t\tif(mysql_error()){\n\t\t\t\t\tthrow new DatabaseException(mysql_error());\n\t\t\t\t}\n\t\t\t\t$this->due_datetime = $due;\n\t\t\t\t$this->setModified();\n\t\t\t\treturn $this->taskman->adjustFromGMT($due);\n\t\t\t}else{\n\t\t\t\treturn $this->due();\n\t\t\t}\n\t\t}\n\t}", "function setDueOn($due_on) {\n return $this->setDateField1($due_on);\n }", "function mci_issue_get_due_date(BugData $p_bug) {\n $t_value = null;\n\n if (access_has_bug_level(config_get('due_date_view_threshold'), $p_bug->id) && !date_is_null($p_bug->due_date)) {\n $t_value = $p_bug->due_date;\n }\n\n return SoapObjectsFactory::newDateTimeVar($t_value);\n}", "function getDueOnMonth() {\n if($this->getStatus() > 0) {\n return $this->getDueOn()->getMonth() . ', ' . $this->getDueOn()->getYear();\n }//if\n return 0;\n }", "public function getDueBackDate()\n {\n return $this->stringToDate((string) $this->json()->due_back_date);\n }", "public function getJobDueDate(): ?string;", "public function getAmountDue();", "public function getPaymentDueDefault()\n\t{\n\t\treturn now() + $this->setting('payment_due');\n\t}", "function get_due_tomorrow() {\n\t\t\t\t\t\t$sql =\"SELECT *\tFROM provider_account_information\n\t\twhere DATEDIFF(STR_TO_DATE(CONCAT(MONTH(CURDATE()),'/', due_date,'/',YEAR(CURDATE())), '%m/%d/%y' ), CURDATE()) - 366 = 1\" ;\n\t\t$data = $this->db->query($sql);\n\t\treturn $data;\n\t}", "function getReviewDueDate($dueDate = null, $numWeeks = null) {\n\t\t$today = getDate();\n\t\t$todayTimestamp = mktime(0, 0, 0, $today['mon'], $today['mday'], $today['year']);\n\t\tif ($dueDate) {\n\t\t\t$dueDateParts = explode('-', $dueDate);\n\n\t\t\t// Ensure that the specified due date is today or after today's date.\n\t\t\tif ($todayTimestamp <= strtotime($dueDate)) {\n\t\t\t\treturn date('Y-m-d H:i:s', mktime(0, 0, 0, $dueDateParts[1], $dueDateParts[2], $dueDateParts[0]));\n\t\t\t} else {\n\t\t\t\treturn date('Y-m-d H:i:s', $todayTimestamp);\n\t\t\t}\n\t\t} elseif ($numWeeks) {\n\t\t\treturn date('Y-m-d H:i:s', $todayTimestamp + ($numWeeks * 7 * 24 * 60 * 60));\n\t\t} else {\n\t\t\t$journal =& Request::getJournal();\n\t\t\t$settingsDao =& DAORegistry::getDAO('JournalSettingsDAO');\n\t\t\t$numWeeks =& $settingsDao->getSetting($journal->getId(), 'numWeeksPerReview');\n\t\t\tif (!isset($numWeeks) || (int) $numWeeks < 0) $numWeeks = 0;\n\t\t\treturn date('Y-m-d H:i:s', $todayTimestamp + ($numWeeks * 7 * 24 * 60 * 60));\n\t\t}\n\t}", "public function getRemainingDays(string $due): string\n {\n $interval = date_diff(\n date_create(date('Y-m-d')), // Today's date\n date_create(date('Y-m-d', strtotime($due))), // Due date\n false); // Absolute value\n return $interval->format('%R%a');\n }", "public function isDue($date = 'now');", "public function getDatePaid()\n\t\t{\n\t\t\tif(isset($this->_date_paid)){\n\t\t\t\treturn $this->_date_paid;\t\n\t\t\t}\n\t\t}", "public function getOutstandingPendingDue();", "public function set_due_date( $due_date ) {\n\t\t$this->due_date = $due_date;\n\t}", "function ltiGetDueDate() {\n $retval = new stdClass();\n $retval->message = false;\n $retval->penalty = 0;\n $retval->dayspastdue = 0;\n $retval->percent = 0;\n $retval->duedate = false;\n $retval->duedatestr = false;\n\n $duedatestr = ltiGetCustom('due');\n if ( $duedatestr === false ) return $retval;\n $duedate = strtotime($duedatestr);\n\n $diff = -1;\n $penalty = false;\n\n date_default_timezone_set('Pacific/Honolulu'); // Lets be generous\n if ( ltiGetCustom('timezone') ) {\n date_default_timezone_set(ltiGetCustom('timezone'));\n }\n\n if ( $duedate === false ) return $retval;\n\n // If it is just a date - add nearly an entire day of time...\n if ( strlen($duedatestr) <= 10 ) $duedate = $duedate + 24*60*60 - 1;\n $diff = time() - $duedate;\n\n $retval->duedate = $duedate;\n $retval->duedatestr = $duedatestr;\n // Should be a percentage off between 0.0 and 1.0\n if ( $diff > 0 ) {\n $penalty_time = ltiGetCustom('penalty_time') ? ltiGetCustom('penalty_time') + 0 : 24*60*60;\n $penalty_cost = ltiGetCustom('penalty_cost') ? ltiGetCustom('penalty_cost') + 0.0 : 0.2;\n $penalty_exact = $diff / $penalty_time;\n $penalties = intval($penalty_exact) + 1;\n $penalty = $penalties * $penalty_cost;\n if ( $penalty < 0 ) $penalty = 0;\n if ( $penalty > 1 ) $penalty = 1;\n $retval->penalty = $penalty;\n $retval->dayspastdue = $diff / (24*60*60);\n $retval->percent = intval($penalty * 100);\n $retval ->message = 'It is currently '.sprintf(\"%10.2f\",$retval->dayspastdue).\" days\\n\".\n 'past the due date ('.htmlentities($duedatestr).') so your late penalty is '.$retval->percent.\" percent.\\n\";\n }\n return $retval;\n}", "public function getOutstandingExpiredDue();", "public function getNbDue() {\n return $this->nbDue;\n }", "public function getDueDate(): ?Date {\n $val = $this->getBackingStore()->get('dueDate');\n if (is_null($val) || $val instanceof Date) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'dueDate'\");\n }", "public function getCurrentlyDue(): ?array\n {\n return $this->currentlyDue;\n }", "private static function calculateDueDate($date)\n {\n $dueDate = date(\\DATE_FORMAT, strtotime('+9 weekdays', strtotime($date)));\n return $dueDate;\n }", "public function getFieldValue()\n {\n return $this->getDate();\n }", "public function getDaysUntilDueAttribute(): int\n {\n if ($this->isPaid) {\n return 0;\n }\n\n $now = new Carbon();\n return $now->diffInDays($this->due, false);\n }", "public function retreiveDateFin()\n {\n $time = $this->getHeureFin()->format('H:i:s');\n $date = $this->getDate()->format('Y-m-d');\n $dateFin = new \\DateTime($date . ' ' . $time);\n return $dateFin;\n }", "function getDateFinalNotified() {\n\t\treturn $this->getData('dateFinalNotified');\n\t}", "function dueOnDate($date) {\n $this->setDueOnFilter(self::DATE_FILTER_SELECTED_DATE);\n $this->setAdditionalProperty('due_on_filter_on', (string) $date);\n }", "public function testSetGetDueDate()\n {\n $dueDate = new DateTime('+14 days');\n $this->invoice->setIssuedDate('+14 days');\n $this->assertEquals($this->invoice->getDueDate()->format('Y-m-d'), $dueDate->format('Y-m-d'));\n }", "public function getTotalPaymentDue() {\n\t\treturn $this->totalPaymentDue;\n\t}", "public function getDateDelivered(){\n return $this->date_delivered;\n }", "public function getDateFinContrat() {\n return $this->dateFinContrat;\n }", "function convertDueDate($dateInput){\n $curTimeVancouver = time() - 8*60*60;\n $dueDateTime = strtotime($dateInput); \n return round(abs($dueDateTime - $curTimeVancouver)/(60* 60 *24)) + 1;\n }", "public function getEffectiveDate()\n {\n return !empty($this->data['effective_date']) ? $this->data['effective_date'] : null;\n }", "public function getDateCheck(){\n return $this->dateCheck;\n }", "public function getDateFin()\n {\n return $this->dateFin;\n }", "function getDateFin(){\n return $this->datefin;\n }", "public function getNextDueDate(){\n\t\tif ($this->getSubscription() == null) {\n\t\t\tthrow new Exception('No subscription has been set.');\n\t\t}\n\t\tif ($this->getPeriodMaxCycles() == null || $this->getSubscription()->getNumberOfCycles() < $this->getPeriodMaxCycles()) {\n\t\t\t$nowDate = Zend_Date::now();\n\t\t\t$fromDateString = $this->getSubscription()->getLastRegularDatetime();\n\t\t\tif ($fromDateString == null) {\n\t\t\t\t$fromDateString = $this->getSubscription()->getStartDatetime();\n\t\t\t}\n\t\t\t$resultDate = Mage::helper('customweb_subscription')->toDateObject($fromDateString);\n\t\t\tdo {\n\t\t\t\t$this->nextDueDate($resultDate);\n\t\t\t}\n\t\t\twhile ($nowDate->compare($resultDate) >= 0);\n\t\t\treturn $resultDate;\n\t\t}\n\t\tthrow new Exception('The subscription cannot be executed.');\n\t}", "public function getEffectiveDate()\n {\n $value = $this->get(self::EFFECTIVEDATE);\n return $value === null ? (string)$value : $value;\n }", "public function getDate_fin()\n {\n return $this->date_fin;\n }", "public function getPastDue(): ?array\n {\n return $this->pastDue;\n }", "public function setDueDateAttribute($value)\n\t{\n\t\tif(gettype($value) == 'string') {\n\t\t\t$this->attributes['due_date'] = Carbon::createFromFormat('d-m-Y', $value);\n\t\t}\n\t}", "public function getReturnDate()\n {\n return parent::getValue('return_date');\n }", "function last_pay_date(){\n \n if (isset($_COOKIE[\"i35esda5asd\"]) && isset($_COOKIE[\"p35edasdd785easd\"]) && isset($_COOKIE[\"t35e6and45easn\"])) {\n $connect = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n $id = $_COOKIE[\"i35esda5asd\"];\n \n $select_it = \"SELECT * FROM users_due WHERE due_user_id = '$id' && due_paid_list = 'spe_due' ORDER BY id DESC LIMIT 1 \";\n $run_select_it = mysqli_query($connect, $select_it);\n if ($run_select_it == true && mysqli_num_rows($run_select_it) === 1) {\n while($get_last_date = mysqli_fetch_array($run_select_it)){\n $last_date = $get_last_date[\"sold_date\"];\n\n return $last_payment_day = day_ago($last_date);\n \n }\n }else{\n return $last_payment_day = '-- / -- / --';\n }\n }\n}", "public function getDatePayment()\n {\n return $this->date_payment;\n }", "function SetDueDate($value)\r\n\t{\r\n $due = $this->Due();\r\n if ($due && $value)\r\n {\r\n $due->SetDate($value->Date());\r\n $value = $due;\r\n }\r\n else if ($value && $value->HasTime())\r\n {\r\n $value = $value->Copy();\r\n $value->SetTime(NULL);\r\n }\r\n $this->SetDue($value);\r\n\t}", "public function getFundationDate()\n {\n return $this->fundationDate;\n }", "public function getDate() \n {\n return $this->_fields['Date']['FieldValue'];\n }", "private function getDate(){\n\n\t\treturn Date::get( $this->date );\n\n\t}", "public function getPaymentDate();", "public function setDueOn($due_on)\r\n\t{\r\n\t\tif (isset($due_on) && preg_match('/^[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}$/i', $due_on)) {\r\n\t\t\t$this->due_on = $due_on;\r\n\t\t} elseif ($due_on == null) {\r\n\t\t\t$this->due_on = null;\r\n\t\t} else {\r\n\t\t\tthrow new Exception(\"setDueOn expected a date in the format YYYY-MM-DD but was given the following: \" . $due_on);\r\n\t\t}\r\n\t}", "function getDueOnFilter() {\n return $this->getAdditionalProperty('due_on_filter', self::DATE_FILTER_ANY);\n }", "public function getFreightReadyDate()\n {\n return $this->_fields['FreightReadyDate']['FieldValue'];\n }", "public function setDueDateAttribute($date)\n\t{\n\t\t$this->attributes['due'] = Carbon::parse($date);\n\t}", "function getIssuedOn() {\n return $this->getDateField2();\n }", "public function getDateDevis() {\n return $this->dateDevis;\n }", "public function getNextDueExecution() {}", "public function getDate_debut()\n {\n return $this->date_debut;\n }", "public function setDueOnAttribute ($value)\n {\n $this->attributes['due_on'] = Carbon::parse($value)->toDateString();\n }", "public function getDatePosted()\n\t{\n\t\t$date = new Precurio_Date($this->date_posted);\n\t\t\t\t\n\t\treturn $date->get(Precurio_Date::DATE_SHORT).' '.$date->get(Precurio_Date::TIME_SHORT);\n\t}", "public function getDatePosted() {\r\n return $this->datePosted ;\r\n }", "public function getDate_naissance()\n {\n return $this->date_naissance;\n }", "public function testCreateIssueWithDueDate() {\n\t\t\n\t\t$this->skipIfDueDateIsNotEnabled();\n\t\t\n\t\t$date = '2015-10-29T12:59:14Z';\n\t\t\n\t\t$issueToAdd = $this->getIssueToAdd( 'IssueAddTest.testCreateIssueWithDueDate' );\n\t\t\n\t\t$issueToAdd['due_date'] = $date;\n\t\t\n\t\t$issueId = $this->client->mc_issue_add(\n\t\t\t$this->userName,\n\t\t\t$this->password,\n\t\t\t$issueToAdd);\n\t\t\t\n\t\t$this->deleteAfterRun( $issueId );\t\t\t\n\n\t\t$issue = $this->client->mc_issue_get(\n\t\t\t$this->userName,\n\t\t\t$this->password,\n\t\t\t$issueId);\n\t\t\t\n\t\t\t\n\t\t$this->assertEquals( $date, $issue->due_date, \"due_date\");\n\t}", "public function getPickupDate()\n {\n return parent::getValue('pickup_date');\n }", "public function getEventuallyDue(): ?array\n {\n return $this->eventuallyDue;\n }", "public function getDateObtained()\n {\n return $this->_dateObtained;\n }", "function dueAfterDate($date) {\n $this->setDueOnFilter(self::DATE_FILTER_AFTER_SELECTED_DATE);\n $this->setAdditionalProperty('due_on_filter_on', (string) $date);\n }", "public function getPurchaseDate();", "public function getDate(){\n\t\treturn $this->_formatedDate;\n\t}", "public function setDueDateAttribute($date)\n {\n $this->attributes['due_date'] = \\Carbon\\Carbon::createFromFormat('d/m/Y', $date)->format('Y-m-d');\n }", "public function getDateDeNaissance() {\n return $this->dateDeNaissance;\n }", "public function getDateAcquisition() {\n return $this->dateAcquisition;\n }", "function getCompletedOnDate() {\n $on = $this->getAdditionalProperty('completed_filter_on');\n\n return $on ? new DateValue($on) : null;\n }", "public function getDateReported();", "private function _getDate(){\r\n\t\treturn isset($this->_data->pollDate)?Utility::formatDate($this->_data->pollDate):null;\r\n\t}", "public function current() {\n $parentKey = parent::key();\n $parentValue = parent::current();\n $returnValue = \"\";\n if (($parentKey == \"IssuedDate\" || $parentKey == \"ReturnDueDate\") && (!empty($parentValue))) {\n // For Non-Empty Date Fields modify date format\n $returnValue = date(\"d/m/Y\", strtotime($parentValue));\n } else {\n // For all others output original value\n $returnValue = $parentValue;\n }\n return \"<td>{$returnValue}</td>\";\n }", "public function getDate()\n {\n $value = $this->get(self::DATE);\n return $value === null ? (string)$value : $value;\n }", "public function getDate()\n {\n return isset($this->date) ? $this->date : null;\n }", "public function getDate()\n {\n return isset($this->date) ? $this->date : null;\n }", "public function Get_Pay_Date_Calc() { return $this->pdc; }", "public function pastDue()\n {\n return $this->status === \\Stripe\\Subscription::STATUS_PAST_DUE;\n }" ]
[ "0.8019067", "0.7913681", "0.7913681", "0.79082054", "0.7896338", "0.78573185", "0.7671305", "0.7624485", "0.75729775", "0.73389393", "0.72076106", "0.71235573", "0.70175797", "0.7002676", "0.69041556", "0.6835006", "0.6817132", "0.67949283", "0.676384", "0.6758317", "0.66695607", "0.66647196", "0.66529864", "0.6620655", "0.6605869", "0.6586262", "0.6577266", "0.65582365", "0.64600474", "0.6441693", "0.6410493", "0.62894267", "0.625962", "0.6220297", "0.62035936", "0.61878425", "0.6179747", "0.61776423", "0.61651653", "0.6158399", "0.6151472", "0.6143722", "0.6119001", "0.61095893", "0.609034", "0.60333323", "0.6003274", "0.59963703", "0.59774655", "0.59768504", "0.5975919", "0.59718585", "0.59706753", "0.5967692", "0.59669894", "0.5959975", "0.59594494", "0.5953946", "0.5953907", "0.59422284", "0.59046996", "0.5901522", "0.5899788", "0.5889631", "0.58747697", "0.5871756", "0.5866456", "0.58634603", "0.5853332", "0.5852021", "0.5849996", "0.58397204", "0.5837934", "0.583109", "0.5829754", "0.58254737", "0.5823493", "0.58221674", "0.5822167", "0.58207554", "0.5805183", "0.57859135", "0.5778538", "0.5775309", "0.5771528", "0.57710516", "0.5761029", "0.57524353", "0.5749503", "0.5740397", "0.5737868", "0.5721447", "0.5720303", "0.57183367", "0.5712602", "0.5710798", "0.5709901", "0.5709901", "0.57092404", "0.5706729" ]
0.7953232
1
Get the value of line_1
Получить значение line_1
public function getline1() { return $this->line_1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getline2()\r\n {\r\n return $this->line_2;\r\n }", "public function get_line() {\n return $this->line;\n }", "public function getAddressLine1()\n\t{\n\t\treturn $this->address_line1;\n\t}", "public function getLine() {\n return $this->line;\n }", "public function line1(): string;", "public function getAddressLine1(): ?string\n {\n if (count($this->addressLine1) == 0) {\n return null;\n }\n return $this->addressLine1['value'];\n }", "public function getLine(): int\n {\n return $this->getValue()->getExtraValue();\n }", "public function getLine ()\n {\n return $this->line;\n }", "public function getLine() {\n return $this->line;\n }", "public function getLine()\n {\n return $this->line;\n }", "public function getLine()\n {\n return $this->line;\n }", "public function getLine()\n {\n return $this->line;\n }", "public function getLine()\n {\n return $this->line;\n }", "public function getLine()\n {\n return $this->line;\n }", "public function getLine()\n {\n return $this->line;\n }", "public function getLine()\n {\n return $this->line;\n }", "public function getLine()\n {\n return $this->line;\n }", "public function getLine($line = NULL) {\r\n if ($line == NULL) $line = $this->line;\r\n return ($line >= $this->lines ? NULL : $this->source[$line]);\r\n }", "public function getLine()\n {\n $this->addFieldCache('line');\n\n if (!isset($this->data['fields']['line']) &&\n !$this->isFieldInQuery('line'))\n {\n $this->loadFull();\n }\n // Still not set? It can only be null\n if (!isset($this->data['fields']['line'])) {\n $this->data['fields']['line'] = null;\n }\n\n return $this->data['fields']['line'];\n }", "public function getLine()\n {\n return $this->_line;\n }", "function getline()\n {\n $this->line = fgets($this->fp);\n return $this->line;\n }", "public function line2(): ?string;", "public function getProjectaddressline1()\n\t{\n\t\treturn $this->projectaddressline1;\n\t}", "public function getProjectaddressline1()\n\t{\n\t\treturn $this->projectaddressline1;\n\t}", "public function setline1($line_1)\r\n {\r\n $this->line_1 = $line_1;\r\n\r\n return $this;\r\n }", "public function getAddressLine1(): ?string;", "public function line(): int;", "protected function getLine() {\n\t\treturn fgetcsv($this->fileHandler, 8092, $this->parser->getSeparator());\n\t}", "public function get_address_line_1() {\n\t\treturn stripslashes( $this->address_1 );\n\t}", "public function getLineValue(){\n\t\treturn (double)($this->qtty * $this->price);\n\t\t\n\t}", "public function fileLine(): string;", "public function getLine() {\n switch ($this->mode) {\n case $this::MODE_HATERS:\n return $this->getHaters();\n break;\n\n case $this::MODE_PROCON:\n return $this->getProCon();\n break;\n\n case $this::MODE_WRECKEDEM:\n return $this->getWreckedEm();\n break;\n }\n }", "final public static function getLine() {\n\t\t$line = self::$line;\n\t\t\n\t\t// call hook\n\t\tHook::call('Error.getLine', array(&$line));\n\t\t\n\t\treturn $line;\n\t}", "public function getAddressLine2(): ?string;", "public function getLine();", "public function getLine();", "public function getLine();", "public function getLine();", "public function getLine();", "public function getLine();", "public function getAddressLine2(): ?string\n {\n if (count($this->addressLine2) == 0) {\n return null;\n }\n return $this->addressLine2['value'];\n }", "public function line(): ?string;", "function line($line = '')\r\n\t{\r\n\t\t$value = ($line == '' OR ! isset($this->language[$line])) ? FALSE : $this->language[$line];\r\n\r\n\t\t// Because killer robots like unicorns!\r\n\t\tif ($value === FALSE)\r\n\t\t{\r\n\t\t\tlog_message('error', 'Could not find the language line \"'.$line.'\"');\r\n\t\t}\r\n\r\n\t\treturn is_array($value) ? $value : stripslashes($value);\r\n\t}", "function get_xref_start_line() {\n\t\t//-------------------------------\n\t\t\treturn $this->value_entries['$_XREF_$'][\"infos\"][\"start\"][\"line\"];\n\t\t}", "public function getActualLine()\n {\n return $this->_position;\n\n }", "public function getStartLine(): int;", "public function getLineID()\n {\n return $this->lineID;\n }", "public function line($line = '')\n {\n $value = ($line == '' || !isset($this->language[$line])) ? false : $this->language[$line];\n\n // Because killer robots like unicorns!\n if ($value === false) {\n $value = $line;\n Fly::log('error', 'Could not find the language line \"'.$line.'\"');\n }\n return $value;\n }", "function getAttribute1() {\n\t\treturn $this->data_array['attribute1'];\n\t}", "public function line()\n {\n return $this->spl->key()+1;\n }", "public function getAddressLine2()\n\t{\n\t\treturn $this->address_line2;\n\t}", "final public function getLine() { }", "public function getField1()\n {\n return $this->data['fields']['field1'];\n }", "public function getAddressLine1Check(): ?string\n {\n return $this->addressLine1Check;\n }", "public static function readLine($path,$line)\r\n {\r\n $arr=self::fileToArray($path);\r\n\r\n $amount=count($arr);\r\n if($line > $amount)\r\n {\r\n Frd::getLog(\"invalid file line number (max $amount) :$line\");\r\n }\r\n\r\n return $arr[$line-1];\r\n }", "public function choose($line, $number)\n {\n $parts = explode('|', $line);\n\n if (($value = $this->extract($parts, $number)) !== null) {\n return trim($value);\n }\n\n $parts = $this->stripConditions($parts);\n\n return count($parts) == 1 || $number == 1\n ? $parts[0] : $parts[1];\n }", "public function getCurrentLine();", "protected function get_string($line) {\n return $this->decode(substr($line, strpos($line, ' ') + 1));\n }", "private function getLineNumber() {\n\t\treturn $this->line['number'];\n\t}", "public function get_recipient_line();", "public function getCurrentLine() {\r\n return $this->line;\r\n }", "public function lineNo(): int\n {\n return $this->line_no;\n }", "public function getLine() {\n return $this->err_line;\n }", "protected function getLineType($line) {\n\t\treturn $line[0];\n\t}", "public function getLineNum()\n {\n return $this->line_num;\n }", "public function getAddressLine3(): ?string;", "public function getDefinedAtLine(): ?int;", "public function current()\n {\n $line = $this->file->current();\n $res = array();\n\n foreach ($this->an6record as $fieldName => $fieldLengths) {\n if (count($fieldLengths) == 2) {\n list($length,$start) = $fieldLengths;\n $res[$fieldName] = substr($line,$start-1,$length);\n } elseif (count($fieldLengths) == 3) {\n list($length,$start,$decimals) = $fieldLengths;\n $valueInt = substr($line,$start-1,$length-$decimals);\n $valueDec = substr($line,$start-1+$length-$decimals,$decimals);\n $res[$fieldName] = floatval($valueInt . '.' . $valueDec);\n }\n }\n return $res;\n }", "protected function extractValue(): mixed\n {\n $tokens = $this->extractLineTokens();\n $value = implode(' ', $tokens);\n //fix for different stat output for older versions\n $value = trim($value);\n if ($value[0] === '`') {\n $value = substr($value, 1, strlen($value));\n }\n\n if ($value[strlen($value)-1] === \"'\") {\n $value = substr($value, 0, -1);\n }\n\n return $value;\n }", "public function getHeadline1()\n {\n return isset($this->headline1) ? $this->headline1 : '';\n }", "public function getSourceLine()\n {\n return $this->source_line;\n }", "public function getLine(): int;", "private function getValueFromField()\n {\n $position = $this->readUntil($this->boundary);\n\n # there is always a newline after the value and before the boundary\n # exclude that newline from the value\n $value = substr($this->buffer, 0, $position - 2);\n\n # update the buffer to exclude the value and the pre boundary newline\n $this->buffer = substr($this->buffer, $position);\n\n return $value;\n }", "public function get_address_line_2() {\n\t\treturn stripslashes( $this->address_2 );\n\t}", "function get_line()\r\n\t\t{\r\n\t\t\twhile(!feof($this->con))\r\n\t\t\t{ \r\n $line = '';\r\n while ( substr($line,3,1) != ' ' ) \r\n { \r\n $line = fgets($this->con);\r\n //echo date(\"H:i:s\") . \" SMTP << $line <br>\";\r\n }\r\n \r\n return(substr($line,0,-2));\r\n\r\n\t\t\t}\r\n\t\t}", "public function getAddr1()\n {\n return $this->addr1;\n }", "public function getLine(int $lineno)\n {\n $lines = $this->getLines();\n return $lines[$lineno] ?? null;\n }", "function read_xref_start_value() {\n\t\t//------------------------------\n\t\t\t$buffer=$this->get_buffer();\n\t\t\t$chunks = preg_split('/\\bxref\\b/', $buffer, -1, PREG_SPLIT_OFFSET_CAPTURE);\n\t\t\treturn intval($chunks[1][1])-4; //-4 , relative to end of xref\n\t\t}", "public function getHeaderLine(): string;", "public function getPLine()\n {\n return $this->pLine;\n }", "public function getPLine()\n {\n return $this->pLine;\n }", "public function getPLine()\n {\n return $this->pLine;\n }", "public function getPLine()\n {\n return $this->pLine;\n }", "static function query_one_value($query, $value, $label = NULL, $file = NULL, $line = NULL, $feature_type = 0, $feature_id = 0) {\n\t\ttry {\n\t\t\t$res = $GLOBALS ['DB']->query ( $query . \" limit 1\" )->fetch ( PDO::FETCH_COLUMN );\n\t\t} catch ( PDOException $e ) {\n\t\t\tZU::log ( $e . addslashes ( $query ), E_RECOVERABLE_ERROR, $label, $file, $line, $feature_type, $feature_id );\n\t\t}\n\t\treturn $res [$value];\n\t}", "public function get($key)\n {\n foreach ($this->lines as &$line) {\n if ($this->is_key_match($key, $line)) {\n return $this->parse_line_value($line);\n }\n }\n\n // if we got here, the key wasn't matched\n return null;\n }", "private function findLine($line)\n {\n return array_search($line, $this->readLines);\n }", "public function getFileLine()\n {\n return $this->name.':'.$this->hash;\n }", "public function getFormatLine()\n {\n if(($line = fgets($this->formatFile)) == FALSE)\n return FALSE;\n else\n return $line;\n }", "private function composeValue($fileNr, $line)\n {\n return self::DECIMAL_OFFSET * $fileNr + $line;\n }", "function getCsvLine() {\n return fgetcsv($this->fileHandle, 0, $this->sepChar, $this->textQualifier);\n }", "function parse_line($line){\n\t\t$state_function = array($this, $this->state);\n\t\treturn call_user_func($state_function, $line);\n\t}", "protected function comment_line($line) {\n return $line;\n }", "public function getStatusLine() {\n\t\treturn $this->statusLine;\n\t}", "public function getLine2Basic()\n {\n return $this->getFirstPersonName();\n }", "public static function fetchCodeLine($path, $line)\n {\n if (!file_exists($path)) {\n return null;\n }\n $file = new SplFileObject($path);\n if (!$file->eof()) {\n $file->seek($line - 1);\n return $file->current();\n }\n }", "protected abstract function parseLine();", "private function getSource() {\n\t\treturn $this->line['source'];\n\t}", "public function key()\n {\n return $this->line;\n }", "public function key()\n {\n return $this->line;\n }", "abstract protected function formatLine(array &$result, $line);" ]
[ "0.7308623", "0.6886221", "0.6740285", "0.6722304", "0.67103195", "0.66880643", "0.66088694", "0.65923285", "0.6589029", "0.6564422", "0.6564422", "0.6564422", "0.6564422", "0.6564422", "0.6564422", "0.6564422", "0.6564422", "0.6488167", "0.6483669", "0.6457489", "0.6332308", "0.62680215", "0.6229685", "0.6229685", "0.61659616", "0.61453474", "0.6140621", "0.6135555", "0.61286974", "0.6083708", "0.6021787", "0.60071486", "0.60029197", "0.5926082", "0.5919505", "0.5919505", "0.5919505", "0.5919505", "0.5919505", "0.5919505", "0.591099", "0.58989114", "0.58952254", "0.58950776", "0.58931553", "0.5886407", "0.58834743", "0.5869449", "0.5823572", "0.58128345", "0.5810875", "0.5810054", "0.57975316", "0.5782097", "0.57799524", "0.5759122", "0.5716711", "0.5695988", "0.5689603", "0.568424", "0.56807077", "0.56636673", "0.5657586", "0.5651947", "0.5648824", "0.56375515", "0.56253946", "0.5625138", "0.5608077", "0.5600306", "0.5600096", "0.5585433", "0.55754006", "0.5559731", "0.5537092", "0.55316603", "0.553075", "0.55249476", "0.5504323", "0.5499339", "0.5499339", "0.5499339", "0.5499339", "0.5474993", "0.5474614", "0.5464978", "0.54556215", "0.54429907", "0.5440282", "0.5437074", "0.5431425", "0.54241407", "0.5413135", "0.54040396", "0.540344", "0.54034054", "0.5397859", "0.5390968", "0.5390968", "0.5382748" ]
0.8474215
0
Set the value of line_1
Задайте значение line_1
public function setline1($line_1) { $this->line_1 = $line_1; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setAddressLine1(?string $addressLine1): void\n {\n $this->addressLine1['value'] = $addressLine1;\n }", "public function setAddressLine1($addressLine1){\n\t\t$this->addressLine1\t=\t$addressLine1;\n\t}", "public function setLine($line)\n {\n $this->line = $line;\n }", "public function setline2($line_2)\r\n {\r\n $this->line_2 = $line_2;\r\n\r\n return $this;\r\n }", "public function set_line (numberlineplot_line $line) {\n $this->line = $line;\n }", "public function getline1()\r\n {\r\n return $this->line_1;\r\n }", "public function setLine($line)\n {\n $this->line = (int) $line;\n return $this;\n }", "function _set_field_value($line,$value) {\n\t\t//----------------------------------------\n\t\t\n\t\t\t$verbose_set=($this->verbose&&($this->verbose_level>1));\n\t\t\t//get the line content\n\t\t\t$CurLine =$this->pdf_entries[$line];\n\t\t\n\t\t\t$OldLen=strlen($CurLine);\n\t\t\t\n\t\t\t//My PHP4/5 static call hack, only to make the callback $this->replace_value($matches,\"$value\") possible!\n\t\t\t$callback_code='$THIS=new FPDM(\"[_STATIC_]\");return $THIS->replace_value($matches,\"'.$value.'\");';\n\t\t\t\n\t\t\t$field_regexp='/^\\/(\\w+)\\s?(\\<|\\()([^\\)\\>]*)(\\)|\\>)/';\n\t\t\t\n\t\t\tif(preg_match($field_regexp,$CurLine)) {\n\t\t\t\t//modify it according to the new value $value\n\t\t\t\t$CurLine = preg_replace_callback(\n\t\t\t\t\t$field_regexp,\n\t\t\t\t\tcreate_function('$matches',$callback_code),\n\t\t\t\t\t$CurLine\n\t\t\t\t);\n\t\t\t}else {\n\t\t\t\tif($verbose_set) echo(\"<br>WARNING:\".htmlentities(\"Can not access to the value: $CurLine using regexp $field_regexp\"));\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t$NewLen=strlen($CurLine);\n\t\t\t$Shift=$NewLen-$OldLen;\n\t\t\t$this->shift=$this->shift+$Shift;\n\t\t\t\n\t\t\t//Saves\n\t\t\t$this->pdf_entries[$line]=$CurLine;\n\t\t\t\n\t\t\treturn $Shift;\n\t\t}", "public function setLine($line)\n {\n if ($line === null) {\n return;\n }\n $this->parts = $this->outer->translateCommandline($line);\n }", "public function setAddressLine2(?string $addressLine2): void\n {\n $this->addressLine2['value'] = $addressLine2;\n }", "public function setLine($value)\n {\n if (!isset($this->data['fields']['line'])) {\n if (!$this->isNew()) {\n $this->getLine();\n if (\n ( is_object($value) && $value == $this->data['fields']['line'] ) ||\n ( !is_object($value) && $value === $this->data['fields']['line'] )\n ) {\n return $this;\n }\n } else {\n if (null === $value) {\n return $this;\n }\n $this->fieldsModified['line'] = null;\n $this->data['fields']['line'] = $value;\n return $this;\n }\n } elseif (\n ( is_object($value) && $value == $this->data['fields']['line'] ) ||\n ( !is_object($value) && $value === $this->data['fields']['line'] )\n ) {\n return $this;\n }\n\n if (!isset($this->fieldsModified['line']) && !array_key_exists('line', $this->fieldsModified)) {\n $this->fieldsModified['line'] = $this->data['fields']['line'];\n } elseif (\n ( is_object($value) && $value == $this->fieldsModified['line'] ) ||\n ( !is_object($value) && $value === $this->fieldsModified['line'] )\n ) {\n unset($this->fieldsModified['line']);\n }\n\n $this->data['fields']['line'] = $value;\n\n return $this;\n }", "public function setAddressLine1($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->address_line1 !== $v) {\n\t\t\t$this->address_line1 = $v;\n\t\t\t$this->modifiedColumns[] = afCrmContactPeer::ADDRESS_LINE1;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function setLine($line)\n {\n $this->line = (int) $line;\n\n return $this;\n }", "public function setLine(\\NOKA\\PHPUBL\\UBL\\Common\\BasicComponents\\Line $line)\n {\n $this->line = $line;\n return $this;\n }", "public function setSource($file, $line)\n {\n $this->source_file = $file;\n $this->source_line = $line;\n }", "public function setAddressLine2($addressLine2){\n\t\t$this->addressLine2\t=\t$addressLine2;\n\t}", "public function setLine($line) {\n $this->properties['line'] = $line;\n\n return $this;\n }", "public function setLine($line)\n {\n $this->line = $line;\n\n return $this;\n }", "public function setLine($line)\n {\n $this->line = $line;\n\n return $this;\n }", "private static function setLine($client, $line, $comName)\n {\n // if ($ping == null) {\n // $ping = new AscommStatus([\"Client\" => $client, \"Line\" => $line]);\n // }\n // self::setLineByObject($ping, $comName);\n\n // $testData = Redis::zrangebyscore(\"TCOM:Filter:$client:$line\", now(config(\"app.timezone\"))->subMinutes(1)->timestamp, Carbon::now(config('app.timezone'))->timestamp, 'withscores');\n // echo \"Redis test data => \" . json_encode($testData) . PHP_EOL;\n Redis::zadd(\"TCOM:Filter:$client:$line\", now(config(\"app.timezone\"))->timestamp, $comName);\n }", "public function addressLine1(?string $value): self\n {\n $this->instance->setAddressLine1($value);\n return $this;\n }", "public function unsetAddressLine1(): void\n {\n $this->addressLine1 = [];\n }", "public function editLine($index,$line) {\n\t\t$input = $this->_parseLine($line);\n\t\treturn $this->_entryEdit($index,$input);\n\t}", "public function setField1($value)\n {\n if (!array_key_exists('field1', $this->fieldsModified)) {\n $this->fieldsModified['field1'] = $this->data['fields']['field1'];\n } elseif ($value === $this->fieldsModified['field1']) {\n unset($this->fieldsModified['field1']);\n }\n\n $this->data['fields']['field1'] = $value;\n }", "public function assignInvoiceLine(InvoiceLineInterface $line): void;", "function sachdaten_druck_editor_linie_aendern($line_id, $line_attribute_name, $line_attribute_value) {\n\t\t$myObj = new MyObject($this, 'druckfreilinien');\n\t\t$druckfreilinie = $myObj->find_by_ids($line_id);\n\t\t$druckfreilinie->set($line_attribute_name, $line_attribute_value);\n\t\t$this->qlayerset[0]['shape'] = $druckfreilinie->update();\n\t\t$this->mime_type = 'application/json';\n\t\t$this->formvars['format'] = 'json';\n\t\t$this->formvars['content_type'] = 'application/json';\n\t\t$this->output();\n\t}", "public function testSetLineOutOfBounds()\n {\n $this->_object->setLine(-1, 'a');\n }", "function add_line($so_invoice_line) // receives an associative array of line info\n {\n $line_data=$so_invoice_line->get_data();\n $this->_data['so_invoice_lines']['line' . $line_data['line']] = $line_data;\n }", "public function setLine(int $newLine): void\n {\n $this->opline->lineno = $newLine;\n }", "public function setLine($var)\n {\n GPBUtil::checkInt64($var);\n $this->line = $var;\n\n return $this;\n }", "function set( $value ) {\r\n\t\tif ( $this->last_key_line === -1 ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t$update = $this->prepend_key . $this->last_key . $this->append_key;\r\n\t\t$update .= $this->prepend_value . $value . $this->append_value;\r\n\t\t$this->block[$this->last_key_line] = $update;\r\n\t}", "public function setLineType($lineType) { $this->lineType = $lineType ; }", "protected function editLinePart1()\n\t{\n\t\tglobal $debug, $message, $success, $Dbc, $returnThis;\n\t\t$output = '';\n\t\ttry{\n\t\t\tif(!isset($this->_listInfo['listRoleId']) || $this->_listInfo['listRoleId'] < 2){\n\t\t\t\tthrow new Adrlist_CustomException(\"Your role doesn't allow you to edit this list.\", '');\n\t\t\t}elseif(empty($_POST['lineId'])){\n\t\t\t\tthrow new Adrlist_CustomException('', 'editLinePart1: $_POST[\\'lineId\\'] is empty.');\n\t\t\t}\n\t\t\t$lineId = intval($_POST['lineId']);\n\t\t\t$stmt = $Dbc->prepare(\"SELECT\n\t\tlinesTable.charId AS 'charId',\n\t\tlinesTable.lineId as lineId,\n\t\tlinesTable.reel AS 'reel',\n\t\tlinesTable.scene AS 'scene',\n\t\tlinesTable.tcIn AS 'tcIn',\n\t\tlinesTable.tcOut AS 'tcOut',\n\t\tlinesTable.line AS 'line',\n\t\tlinesTable.notes AS 'notes'\n\tFROM\n\t\tlinesTable\n\tWHERE\n\t\tlinesTable.lineId = ? AND\n\t\tlinesTable.listId = ?\");\n\t\t\t$params = array($lineId, $this->_listInfo['listId']);\n\t\t\t$stmt->execute($params);\n\t\t\t$row = $stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\tif(empty($row)){\n\t\t\t\terror(__LINE__);\n\t\t\t\tpdoError(__LINE__, $stmt, $params, 1);\n\t\t\t}else{\n\t\t\t\t$row = charToHtml($row);//Convert all special characters to html.\n\t\t\t\t$output .= '<div id=\"lineDiv' . $lineId . '\" class=\"lineMain ui-corner-all center textCenter\" style=\"border:none\">\n\t\t\t\t\t\t' . self::buildCharacters($row['charId'], 'editLineCharacter', 13) . '\n\t\t\t\t\t\t<div class=\"ui-field-contain\">\n\t\t\t\t\t\t\t<label for=\"editReel\" unused=\"ui-hidden-accessible\">Reel</label>\n\t\t\t\t\t\t\t<input autocapitalize=\"off\" autocorrect=\"off\" data-mini=\"true\" data-wrapper-class=\"true\" id=\"editReel\" goswitch=\"addLineButton\" name=\"editReel\" placeholder=\"\" type=\"text\" value=\"' . $row['reel'] . '\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"ui-field-contain\">\n\t\t\t\t\t\t\t<label for=\"editScene\" unused=\"ui-hidden-accessible\">Scene</label>\n\t\t\t\t\t\t\t<input autocapitalize=\"off\" autocorrect=\"off\" data-mini=\"true\" data-wrapper-class=\"true\" id=\"editScene\" goswitch=\"addLineButton\" name=\"editScene\" placeholder=\"\" type=\"text\" value=\"' . $row['scene'] . '\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"ui-field-contain\">\n\t\t\t\t\t\t\t<label for=\"editTcIn\" unused=\"ui-hidden-accessible\">TC In</label>\n\t\t\t\t\t\t\t<input autocapitalize=\"off\" autocorrect=\"off\" class=\"tcValidate\" data-mini=\"true\" data-wrapper-class=\"true\" entry=\"edit\" id=\"editTcIn\" framerate=\"' . $this->_listInfo['framerate'] . '\" goswitch=\"addLineButton\" maxlength=\"14\" name=\"editTcIn\" otherfield=\"editTcOut\" placeholder=\"\" type=\"text\" value=\"' . $row['tcIn'] . '\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<button lineId=\"2351\" class=\"swapTc ui-btn ui-mini ui-btn-inline ui-corner-all\" entry=\"edit\"><i class=\"fa fa-exchange fa-lg fa-rotate-90\"></i>Swap</button>\n\t\t\t\t\t\t<div class=\"ui-field-contain\">\n\t\t\t\t\t\t\t<label for=\"editTcOut\" unused=\"ui-hidden-accessible\">TC Out</label>\n\t\t\t\t\t\t\t<input autocapitalize=\"off\" autocorrect=\"off\" class=\"tcValidate\" data-mini=\"true\" data-wrapper-class=\"true\" entry=\"edit\" id=\"editTcOut\" framerate=\"' . $this->_listInfo['framerate'] . '\" goswitch=\"addLineButton\" maxlength=\"14\" name=\"editTcOut\" otherfield=\"editTcIn\" placeholder=\"\" type=\"text\" value=\"' . $row['tcOut'] . '\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"ui-field-contain\">\n\t\t\t\t\t\t\t<label for=\"editLine\" unused=\"ui-hidden-accessible\">Line</label>\n\t\t\t\t\t\t\t<textarea autocapitalize=\"off\" autocorrect=\"off\" data-mini=\"true\" data-wrapper-class=\"true\" id=\"editLine\" framerate=\"' . $this->_listInfo['framerate'] . '\" goswitch=\"addLineButton\" name=\"addLine\" placeholder=\"\" rows=\"5\">' . $row['line'] . '</textarea>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"ui-field-contain\">\n\t\t\t\t\t\t\t<label for=\"editNotes\" unused=\"ui-hidden-accessible\">Notes</label>\n\t\t\t\t\t\t\t<textarea autocapitalize=\"off\" autocorrect=\"off\" data-mini=\"false\" data-wrapper-class=\"true\" id=\"editNotes\" framerate=\"' . $this->_listInfo['framerate'] . '\" goswitch=\"addLineButton\" name=\"addNotes\" placeholder=\"\" rows=\"5\">' . $row['notes'] . '</textarea>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<button class=\"ui-btn ui-btn-inline ui-shadow ui-corner-all ui-btn-icon-left ui-icon-heart\" id=\"saveLineButton\" lineId=\"' . $row['lineId'] . '\">Save Changes</button><button class=\"ui-btn ui-btn-b ui-btn-inline ui-shadow ui-corner-all ui-btn-icon-left ui-icon-delete\" id=\"cancelEditLine\">Cancel</button>\t\t\t\t\n\t\t\t\t\t</div>';\n\t\t\t\t$success = MODE == 'editLinePart1' ? true : $success;\n\t\t\t\t$returnThis['returnEditLinePart1'] = $output;\n\t\t\t}\n\t\t}catch(Adrlist_CustomException $e){\n\t\t}catch(PDOException $e){\n\t\t\terror(__LINE__, '', '<pre>' . $e . '</pre>');\n\t\t}\n\t\tif(MODE == 'editLinePart1'){\n\t\t\treturnData();\n\t\t}\n\t}", "final protected function modificarLinea()\n\t{\n\t\tif($this->linea == null){\n\t\t\tthrow new Exception('Linea sin datos');\n\t\t}\n\t\tDataAccess::update($this->linea);\t\n\t}", "private static function setLineByObject($line, $comName) {\n // echo \"Redis test data => \" . json_encode($testData) . PHP_EOL;\n Redis::zadd(\"TCOM:Filter:Device:$line\", now(config(\"app.timezone\"))->timestamp, [$comName, $comName]);\n // echo \"setLineByObject $line end \" . Carbon::now(config('app.timezone'))->timestamp . \" $comName\" . PHP_EOL;\n\n\n // $line->ComName = $comName;\n // $line->LastPing = Carbon::now(config('app.timezone'));\n // $line->save();\n }", "function setRow($rid, $line) {\r\n if (!is_array($line)) return false;\r\n $this->data[$rid] = $line;\r\n return true;\r\n }", "public function setProjectaddressline1($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->projectaddressline1 !== $v) {\n\t\t\t$this->projectaddressline1 = $v;\n\t\t\t$this->modifiedColumns[] = AmendmentsubmissionqcSearchPeer::PROJECTADDRESSLINE1;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function keyVal($line,$key){\n\t\t$keyVal = explode('=', $line, 2);\n\t\tif(isset($keyVal)):\n\t\t\tif(isset($keyVal[1])):\n\t\t\t\tstatic::$contents[$keyVal[0]] = $keyVal[1];\n\t\t\telse:\n\t\t\t\tstatic::$contents[$keyVal[0]] = '';\n\t\t\tendif;\n\t\t\tstatic::$stack[] = $key;\n\t\tendif;\n\t\treturn $this;\n\t}", "function line($x1, $y1, $x2, $y2, $style = array()) {\n\t\t\t// Javier: width, color and style might be edited\n\t\t\tTCPDF::Line($x1, $this->h - $y1, $x2, $this->h - $y2, $style);\n\t\t}", "public function setProjectaddressline1($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->projectaddressline1 !== $v) {\n\t\t\t$this->projectaddressline1 = $v;\n\t\t\t$this->modifiedColumns[] = QcSearchPeer::PROJECTADDRESSLINE1;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function setCsvLineNo($lineNo)\n {\n $this->csvLineNo = $lineNo;\n }", "public function updateLine($id, $data);", "function setLineNum($num)\n {\n $this->_wp->linenum = $num;\n }", "public function setAddressLine3(?string $addressLine3): void\n {\n $this->addressLine3['value'] = $addressLine3;\n }", "protected function setStatusLine($statusLine) {\n\t\t$this->statusLine = $statusLine;\n\t}", "public function textLine($value)\n {\n }", "public function line($x1,$y1,$x2,$y2){\n\t\t\t$this->drawLine($x1,$y1,$x2,$y2);\n\t\t}", "public function setSeq1($version1)\n {\n if (!is_array($version1)) {\n $version1 = str_split($version1);\n }\n if ($version1 == $this->old) {\n return;\n }\n\n $this->old = $version1;\n $this->matchingBlocks = null;\n $this->opCodes = null;\n }", "public function addLine($line)\n {\n $this->resultString = \"{$line}{$this->resultString}{$line}\";\n }", "public function writeLine($line);", "public function writeLine($line);", "function set_tagline($tagline)\r\n {\r\n $this->set_default_property(self :: PROPERTY_TAGLINE, $tagline);\r\n }", "public function setAddressLine2($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->address_line2 !== $v) {\n\t\t\t$this->address_line2 = $v;\n\t\t\t$this->modifiedColumns[] = afCrmContactPeer::ADDRESS_LINE2;\n\t\t}\n\n\t\treturn $this;\n\t}", "function setPageLine($PAGELINE){ $this->PAGELINE = $PAGELINE; }", "public function getline2()\r\n {\r\n return $this->line_2;\r\n }", "public function set_dimension_1( TransactionLineDimension $dimension ) {\n\t\t$this->dimension_1 = $dimension;\n\t}", "public function setAddressLine1Check(?string $addressLine1Check): self\n {\n $this->addressLine1Check = $addressLine1Check;\n\n return $this;\n }", "public function line1(): string;", "function setLines($lines) {\n\t\tif ($lines !== null && !is_array($lines)) {\n\t\t\t$this->m_lines = array($lines);\n\t\t} else {\n\t\t\t$this->m_lines = $lines;\n\t\t}\n\t}", "public function applyInvoiceLine(InvoiceLineInterface $line): void;", "public function changeTo(File $file, $line)\n {\n $currentLineNumber = $file->getCurrentLineNumber();\n\n $file->changeLineTo($line, $currentLineNumber);\n }", "public function getAddressLine1()\n\t{\n\t\treturn $this->address_line1;\n\t}", "public function add_to_form ($line) {\n\t\t$this->form_lines[]= $line.\"\\n\";\n\t}", "public function setOneColumn(){\n\t\t$this->column = 1;\n\t}", "public function setHeadline1($var)\n {\n GPBUtil::checkString($var, True);\n $this->headline1 = $var;\n\n return $this;\n }", "private function addVariable($line){\n\t\tpreg_match('~^([\\$a-zA-Z0-9_-]+)\\s*=\\s*([^;]+);?$~', $line, $matches);\n\t\t$name = $matches[1];\n\t\t$value = preg_replace('~(^[^=]+=\\s*)|;~', '', $this->parseLine($line));\n\t\t$this->assign($name, $value);\n\t}", "public function editLine($lineNum, $string) {\n\t\t\t$this->data[$lineNum] = explode($this->delimiter, $string);\n\t\t}", "protected function editLinePart2()\n\t{\n\t\tglobal $debug, $message, $success, $Dbc, $returnThis;\n\t\t$output = '';\n\t\ttry{\n\t\t\tif(!isset($this->_listInfo['listRoleId']) || $this->_listInfo['listRoleId'] < 2){\n\t\t\t\tthrow new Adrlist_CustomException(\"Your role doesn't allow you to edit this list.\", '');\n\t\t\t}elseif(empty($_POST['lineId'])){\n\t\t\t\tthrow new Adrlist_CustomException('', 'editLinePart2: $_POST[\\'lineId\\'] is empty.');\n\t\t\t}elseif(empty($_POST['charId'])){\n\t\t\t\tthrow new Adrlist_CustomException('', 'editLinePart2: $_POST[\\'charId\\'] is empty.');\n\t\t\t}elseif(!isset($_POST['reel'])){\n\t\t\t\tthrow new Adrlist_CustomException('', 'editLinePart2: $_POST[\\'reel\\'] is empty.');\n\t\t\t}elseif(!isset($_POST['scene'])){\n\t\t\t\tthrow new Adrlist_CustomException('', 'editLinePart2: $_POST[\\'scene\\'] is empty.');\n\t\t\t}elseif(!isset($_POST['tcIn'])){\n\t\t\t\tthrow new Adrlist_CustomException('', 'editLinePart2: $_POST[\\'tcIn\\'] is empty.');\n\t\t\t}elseif(!isset($_POST['tcOut'])){\n\t\t\t\tthrow new Adrlist_CustomException('', 'editLinePart2: $_POST[\\'tcOut\\'] is empty.');\n\t\t\t}elseif(!isset($_POST['line'])){\n\t\t\t\tthrow new Adrlist_CustomException('', 'editLinePart2: $_POST[\\'line\\'] is empty.');\n\t\t\t}elseif(!isset($_POST['notes'])){\n\t\t\t\tthrow new Adrlist_CustomException('', 'editLinePart2: $_POST[\\'notes\\'] is empty.');\n\t\t\t}\n\t\t\t$stmt = $Dbc->prepare(\"UPDATE\n\t\tlinesTable\n\tSET\n\t\tlinesTable.charId = ?,\n\t\tlinesTable.reel = ?,\n\t\tlinesTable.scene = ?,\n\t\tlinesTable.tcIn = ?,\n\t\tlinesTable.tcOut = ?,\n\t\tlinesTable.line = ?,\n\t\tlinesTable.notes = ?,\n\t\tlinesTable.modified = ?,\n\t\tlinesTable.mId = ?\n\tWHERE\n\t\tlinesTable.lineId = ?\");\n\t\t\t$stmt->execute(array($_POST['charId'], $_POST['reel'], $_POST['scene'], $_POST['tcIn'], $_POST['tcOut'], $_POST['line'], $_POST['notes'], DATETIME, $this->_listInfo['userId'], $_POST['lineId']));\n\t\t\tupdateListHist($this->_listInfo['listId']);\n\t\t\t$message .= 'Saved';\n\t\t\tif(MODE == 'editLinePart2'){\n\t\t\t\t$success = true;\n\t\t\t\t$returnThis['buildLines'] = self::buildLines();\n\t\t\t}\n\t\t}catch(Adrlist_CustomException $e){\n\t\t}catch(PDOException $e){\n\t\t\terror(__LINE__, '', '<pre>' . $e . '</pre>');\n\t\t}\n\t\tif(MODE == 'editLinePart2'){\n\t\t\treturnData();\n\t\t}\n\t}", "public function moveLine()\n {\n $numberFive = 5;\n $numberOne = 1;\n $numberThree = 3;\n $numberTwo = 2;\n $numberFour = 4;\n }", "public function unsetAddressLine2(): void\n {\n $this->addressLine2 = [];\n }", "public function setTwoColumn(){\n\t\t$this->column = 2;\n\t}", "public function set_line_color (array $line_color) {\n $this->line_color = $line_color;\n }", "public function setAddress1($address1)\n {\n $this->address1 = $address1;\n }", "public function setLineNumber($lineNumber)\n {\n $this->lineNumber = $lineNumber;\n }", "function _Line($x, $y) {\r\n $this->_out(sprintf('%.2f %.2f l', $x * $this->k, ($this->h - $y) * $this->k));\r\n }", "abstract protected function formatLine(array &$result, $line);", "public function add_line( SalesInvoiceLine $line ) {\n\t\t$this->lines[] = $line;\n\t}", "public function set_address_1($address_1) {\r\n $this->address_1 = $address_1;\r\n }", "function StyleLine($x1, $y1, $x2, $y2)\n {\n if ($this->line_weight <= 0)\n return;\n\n switch ($this->line_style) {\n case 1:// Solid\n $this->Line($x1, $y1, $x2, $y2);\n break;\n case 2: // Dotted\n $this->DashedLine($x1, $y1, $x2, $y2, 1, 3);\n break;\n case 3: // Dashed\n $this->DashedLine($x1, $y1, $x2, $y2, 2, 4);\n break;\n case 4: // Longdashes\n $this->DashedLine($x1, $y1, $x2, $y2, 8, 6);\n break;\n default:\n JpGraphError::RaiseL(25104, $this->line_style);//(\" Unknown line style: $this->line_style \");\n break;\n }\n }", "public function change_nb_line($p_nb_line,$p_selected_lines = false)\r\n\t\t{\r\n\t\t\t// Set the selected lines to edit\r\n\t\t\tif($p_selected_lines != false)\r\n\t\t\t{\r\n\t\t\t\t$this->define_selected_line($p_selected_lines);\r\n\t\t\t}\r\n\t\t\t$this->c_nb_line = $p_nb_line;\r\n\t\t\t$this->c_limit_max = $this->c_nb_line;\r\n\r\n\t\t\t$this->c_obj_graphic->define_nb_line($p_nb_line);\r\n\t\t\t$this->define_attribute('__current_page',1);\r\n\t\t\t$this->define_limit_min(0);\r\n\t\t}", "protected function setFileAndLine()\n {\n $this->file = (array_key_exists('file', $this->strTraceArray[$this->intOffset])) ?\n $this->strTraceArray[$this->intOffset]['file'] : '';\n\n $this->line = (array_key_exists('line', $this->strTraceArray[$this->intOffset])) ?\n $this->strTraceArray[$this->intOffset]['line'] : '';\n }", "public function unsetAddressLine1(): self\n {\n $this->instance->unsetAddressLine1();\n return $this;\n }", "function setStreet1($value) {\n\t\treturn $this->setColumnValue('street_1', $value, Model::COLUMN_TYPE_VARCHAR);\n\t}", "protected function write_line_data(){\n\t\t$this->line_data = \"#$this->title query data organized by column\\r\\n\" . $this->line_data;\n\t file_put_contents($this->line_data_location, $this->line_data);\n\t}", "public function addressLine2(?string $value): self\n {\n $this->instance->setAddressLine2($value);\n return $this;\n }", "private function setLink($node1, $node2, $value=1){\n\t\t$data['source'] = $this->getNodeArrayPosition($node1);\n\t\t$data['target']\t= $this->getNodeArrayPosition($node2);\n\t\t$data['value'] = $value;\n\t\tarray_push($this->links,$data);\n\t}", "function setTrack1($track1) {\n\t\t$this->m_track1 = $track1;\n\t}", "private function setMainLine(){\n //$line_total = sum sublines->$line_total\n $this->mainline['description'] = $this->product->title.' at '.$this->venue->title;\n\n\n }", "final function setStreet_1($value) {\n\t\treturn $this->setStreet1($value);\n\t}", "public function define_nb_line($p_nb_line,$p_selected_lines = false)\r\n\t\t{\r\n\t\t\t$this->c_default_nb_line = $p_nb_line;\r\n\t\t\t$this->change_nb_line($p_nb_line,$p_selected_lines);\r\n\t\t}", "public function setFullLine(string $fullLine)\n {\n $this->fullLine = $fullLine;\n $exploded = explode(\"=\", $fullLine);\n\n $value = $exploded[1];\n if (preg_match('/^([\"\\']).*\\1$/m', $value)) {\n $value = substr($value, 1, -1);\n }\n\n return $this\n ->setKey($exploded[0])\n ->setValue($value);\n }", "public function setFromLine(string $line) : self\n\t\t{\n\t\tif (\\strpos($line, '# '))\n\t\t\t{\n\t\t\tthrow new Exception\\LogLine('Not a valid Slow log line: ' . $line);\n\t\t\t}\n\n\t\t// parse the following lines:\n\t\t//\n\t\t// # Time: 2020-12-02T19:08:43.462468Z\n\t\t// # User@Host: root[root] @ localhost [::1] Id: 8\n\t\t// # Query_time: 0.001519 Lock_time: 0.000214 Rows_sent: 0 Rows_examined: 0\n\n\t\t$line = \\trim($line);\n\t\t// special handling for # User@Host: root[root] @ localhost [::1] Id: 8\n\t\tif (\\strpos($line, 'User@Host:'))\n\t\t\t{\n\t\t\t$line = \\str_replace('# User@Host', '# User', $line);\n\t\t\t$line = \\str_replace('@', 'Host:', $line);\n\t\t\t$line = \\str_replace(' [', '[', $line);\n\t\t\t}\n\n\t\t$parts = \\explode(' ', \\substr($line, 2));\n\n\t\twhile (\\count($parts))\n\t\t\t{\n\t\t\t$field = \\trim(\\str_replace(':', '', \\array_shift($parts)));\n\n\t\t\tif (isset($this->fields[$field]))\n\t\t\t\t{\n\t\t\t\tdo\n\t\t\t\t\t{\n\t\t\t\t\t$value = \\trim(\\array_shift($parts));\n\t\t\t\t\t}\n\t\t\t\twhile ('' === $value);\n\t\t\t\t$this->fields[$field] = $value;\n\t\t\t\t}\n\t\t\t}\n\n\t\treturn $this;\n\t\t}", "public function setField2($value)\n {\n if (!array_key_exists('field2', $this->fieldsModified)) {\n $this->fieldsModified['field2'] = $this->data['fields']['field2'];\n } elseif ($value === $this->fieldsModified['field2']) {\n unset($this->fieldsModified['field2']);\n }\n\n $this->data['fields']['field2'] = $value;\n }", "protected function recordIdentity($line)\n {\n return 'NFO';\n }", "public function addLines($lines){\n\t\t$this->_lines = $lines;\n\t}", "public function setCriteria1(?string $value): void {\n $this->getBackingStore()->set('criteria1', $value);\n }", "public function setPurchaseInvoiceLines(?array $value): void {\n $this->getBackingStore()->set('purchaseInvoiceLines', $value);\n }", "public function doOperation($line)\n {\n echo \"Originator: Taking input from the user\\n\";\n $this->state = $this->getUserInput($line);\n echo \"Originator: and my state has changed to: {$this->state}\\n\";\n }", "public function setTemplateLine($lineno)\n {\n $this->lineno = $lineno;\n\n $this->updateRepr();\n }", "public function updateRootline() {}" ]
[ "0.7259683", "0.71484894", "0.7007261", "0.6717658", "0.6622404", "0.6482934", "0.64558846", "0.63682663", "0.6364684", "0.6363385", "0.632997", "0.6285218", "0.6213425", "0.62051314", "0.61877745", "0.6163608", "0.6138414", "0.608674", "0.608674", "0.6057228", "0.60341245", "0.5941677", "0.5937753", "0.5931005", "0.5899144", "0.5893923", "0.58781815", "0.5844861", "0.58301324", "0.57896894", "0.57735485", "0.5738799", "0.5708923", "0.57071626", "0.56550705", "0.5614939", "0.5613831", "0.5608664", "0.5591232", "0.5576061", "0.55613655", "0.55611986", "0.55521786", "0.55232924", "0.5514793", "0.5489979", "0.5466556", "0.5464613", "0.546062", "0.5438855", "0.5438855", "0.5432423", "0.54238933", "0.54065144", "0.5400759", "0.5397914", "0.5386662", "0.53782445", "0.53751653", "0.53586876", "0.53569853", "0.5346615", "0.5344202", "0.533337", "0.5324668", "0.5318188", "0.5304067", "0.52849156", "0.5278075", "0.5270906", "0.52641916", "0.5256762", "0.5252596", "0.52519125", "0.52410305", "0.5237015", "0.52337205", "0.52331984", "0.5229462", "0.52184093", "0.5211157", "0.5210746", "0.5189546", "0.5163976", "0.51635706", "0.51478845", "0.5137308", "0.5110871", "0.51094896", "0.5108374", "0.51046365", "0.5099498", "0.5094397", "0.5089312", "0.50832814", "0.507085", "0.506416", "0.5059379", "0.505605", "0.5042596" ]
0.7948143
0
Get the value of line_2
Получить значение line_2
public function getline2() { return $this->line_2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getline1()\r\n {\r\n return $this->line_1;\r\n }", "public function getAddressLine2()\n\t{\n\t\treturn $this->address_line2;\n\t}", "public function getAddressLine2(): ?string\n {\n if (count($this->addressLine2) == 0) {\n return null;\n }\n return $this->addressLine2['value'];\n }", "public function get_line() {\n return $this->line;\n }", "public function line2(): ?string;", "public function getLine(): int\n {\n return $this->getValue()->getExtraValue();\n }", "public function getLine() {\n return $this->line;\n }", "public function line1(): string;", "public function getAddressLine2(): ?string;", "public function get_address_line_2() {\n\t\treturn stripslashes( $this->address_2 );\n\t}", "public function getLine ()\n {\n return $this->line;\n }", "public function getLine() {\n return $this->line;\n }", "public function getLine()\n {\n return $this->line;\n }", "public function getLine()\n {\n return $this->line;\n }", "public function getLine()\n {\n return $this->line;\n }", "public function getLine()\n {\n return $this->line;\n }", "public function getLine()\n {\n return $this->line;\n }", "public function getLine()\n {\n return $this->line;\n }", "public function getLine()\n {\n return $this->line;\n }", "public function getLine()\n {\n return $this->line;\n }", "public function setline2($line_2)\r\n {\r\n $this->line_2 = $line_2;\r\n\r\n return $this;\r\n }", "function getAttribute2() {\n\t\treturn $this->data_array['attribute2'];\n\t}", "public function getLine()\n {\n return $this->_line;\n }", "public function getAddressLine1(): ?string\n {\n if (count($this->addressLine1) == 0) {\n return null;\n }\n return $this->addressLine1['value'];\n }", "public function getLine($line = NULL) {\r\n if ($line == NULL) $line = $this->line;\r\n return ($line >= $this->lines ? NULL : $this->source[$line]);\r\n }", "public function getAddressLine1()\n\t{\n\t\treturn $this->address_line1;\n\t}", "public function getLineValue(){\n\t\treturn (double)($this->qtty * $this->price);\n\t\t\n\t}", "public function getLine()\n {\n $this->addFieldCache('line');\n\n if (!isset($this->data['fields']['line']) &&\n !$this->isFieldInQuery('line'))\n {\n $this->loadFull();\n }\n // Still not set? It can only be null\n if (!isset($this->data['fields']['line'])) {\n $this->data['fields']['line'] = null;\n }\n\n return $this->data['fields']['line'];\n }", "function getline()\n {\n $this->line = fgets($this->fp);\n return $this->line;\n }", "public function getField2()\n {\n return $this->data['fields']['field2'];\n }", "public function getActualLine()\n {\n return $this->_position;\n\n }", "public function line(): int;", "protected function getLine() {\n\t\treturn fgetcsv($this->fileHandler, 8092, $this->parser->getSeparator());\n\t}", "public function getAddressLine1(): ?string;", "public function getProjectaddressline1()\n\t{\n\t\treturn $this->projectaddressline1;\n\t}", "public function getProjectaddressline1()\n\t{\n\t\treturn $this->projectaddressline1;\n\t}", "public function getLine2Basic()\n {\n return $this->getFirstPersonName();\n }", "final public static function getLine() {\n\t\t$line = self::$line;\n\t\t\n\t\t// call hook\n\t\tHook::call('Error.getLine', array(&$line));\n\t\t\n\t\treturn $line;\n\t}", "public function getLine() {\n switch ($this->mode) {\n case $this::MODE_HATERS:\n return $this->getHaters();\n break;\n\n case $this::MODE_PROCON:\n return $this->getProCon();\n break;\n\n case $this::MODE_WRECKEDEM:\n return $this->getWreckedEm();\n break;\n }\n }", "public function get_recipient_line();", "public function fileLine(): string;", "public function get_address_line_1() {\n\t\treturn stripslashes( $this->address_1 );\n\t}", "public function getAddressLine3(): ?string;", "final public function getLine() { }", "public function getLine();", "public function getLine();", "public function getLine();", "public function getLine();", "public function getLine();", "public function getLine();", "public function getHeadline2()\n {\n return isset($this->headline2) ? $this->headline2 : '';\n }", "public function line(): ?string;", "public function getCurrentLine();", "public function getAddr2()\n {\n return $this->addr2;\n }", "public static function readLine($path,$line)\r\n {\r\n $arr=self::fileToArray($path);\r\n\r\n $amount=count($arr);\r\n if($line > $amount)\r\n {\r\n Frd::getLog(\"invalid file line number (max $amount) :$line\");\r\n }\r\n\r\n return $arr[$line-1];\r\n }", "public function getLine() {\n return $this->err_line;\n }", "public function getProp2()\n {\n return $this->prop2;\n }", "public function getStartLine(): int;", "public function line()\n {\n return $this->spl->key()+1;\n }", "function line($line = '')\r\n\t{\r\n\t\t$value = ($line == '' OR ! isset($this->language[$line])) ? FALSE : $this->language[$line];\r\n\r\n\t\t// Because killer robots like unicorns!\r\n\t\tif ($value === FALSE)\r\n\t\t{\r\n\t\t\tlog_message('error', 'Could not find the language line \"'.$line.'\"');\r\n\t\t}\r\n\r\n\t\treturn is_array($value) ? $value : stripslashes($value);\r\n\t}", "public function getOedtline()\n {\n return $this->oedtline;\n }", "private function getLineNumber() {\n\t\treturn $this->line['number'];\n\t}", "public function getLineID()\n {\n return $this->lineID;\n }", "function getAttribute1() {\n\t\treturn $this->data_array['attribute1'];\n\t}", "public function getCurrentLine() {\r\n return $this->line;\r\n }", "protected function extractValue(): mixed\n {\n $tokens = $this->extractLineTokens();\n $value = implode(' ', $tokens);\n //fix for different stat output for older versions\n $value = trim($value);\n if ($value[0] === '`') {\n $value = substr($value, 1, strlen($value));\n }\n\n if ($value[strlen($value)-1] === \"'\") {\n $value = substr($value, 0, -1);\n }\n\n return $value;\n }", "public function getLocation2()\r\n {\r\n return $this->location2;\r\n }", "public function getProductline()\n\t{\n\t\treturn $this->productline;\n\t}", "public function choose($line, $number)\n {\n $parts = explode('|', $line);\n\n if (($value = $this->extract($parts, $number)) !== null) {\n return trim($value);\n }\n\n $parts = $this->stripConditions($parts);\n\n return count($parts) == 1 || $number == 1\n ? $parts[0] : $parts[1];\n }", "public function getLineRefereeTwo()\n {\n return $this->hasOne(Referee::class, 'line_referee_two_id');\n }", "public function current()\n {\n $line = $this->file->current();\n $res = array();\n\n foreach ($this->an6record as $fieldName => $fieldLengths) {\n if (count($fieldLengths) == 2) {\n list($length,$start) = $fieldLengths;\n $res[$fieldName] = substr($line,$start-1,$length);\n } elseif (count($fieldLengths) == 3) {\n list($length,$start,$decimals) = $fieldLengths;\n $valueInt = substr($line,$start-1,$length-$decimals);\n $valueDec = substr($line,$start-1+$length-$decimals,$decimals);\n $res[$fieldName] = floatval($valueInt . '.' . $valueDec);\n }\n }\n return $res;\n }", "public function setline1($line_1)\r\n {\r\n $this->line_1 = $line_1;\r\n\r\n return $this;\r\n }", "public function lineNo(): int\n {\n return $this->line_no;\n }", "public function getCustomInfo2() : string\n {\n return $this->customInfo2;\n }", "public function line($line = '')\n {\n $value = ($line == '' || !isset($this->language[$line])) ? false : $this->language[$line];\n\n // Because killer robots like unicorns!\n if ($value === false) {\n $value = $line;\n Fly::log('error', 'Could not find the language line \"'.$line.'\"');\n }\n return $value;\n }", "abstract protected function formatLine(array &$result, $line);", "function getStreet2() {\n\t\treturn $this->street_2;\n\t}", "public function setAddressLine2($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->address_line2 !== $v) {\n\t\t\t$this->address_line2 = $v;\n\t\t\t$this->modifiedColumns[] = afCrmContactPeer::ADDRESS_LINE2;\n\t\t}\n\n\t\treturn $this;\n\t}", "function get_line()\r\n\t\t{\r\n\t\t\twhile(!feof($this->con))\r\n\t\t\t{ \r\n $line = '';\r\n while ( substr($line,3,1) != ' ' ) \r\n { \r\n $line = fgets($this->con);\r\n //echo date(\"H:i:s\") . \" SMTP << $line <br>\";\r\n }\r\n \r\n return(substr($line,0,-2));\r\n\r\n\t\t\t}\r\n\t\t}", "public function getPLine()\n {\n return $this->pLine;\n }", "public function getPLine()\n {\n return $this->pLine;\n }", "public function getPLine()\n {\n return $this->pLine;\n }", "public function getPLine()\n {\n return $this->pLine;\n }", "function get_xref_start_line() {\n\t\t//-------------------------------\n\t\t\treturn $this->value_entries['$_XREF_$'][\"infos\"][\"start\"][\"line\"];\n\t\t}", "protected abstract function parseLine();", "function hys_lines($prmry_or_scndry = 1) {\n\t\tglobal $hys;\n\t\t\n\t\t//if calling for the lines via the functino instead of the var, return the var\n\t\tif ($prmry_or_scndry == 1) return $hys['settings']['line1'];\n\t\tif ($prmry_or_scndry == 2) return $hys['settings']['line2'];\n\t\t\n\t\t//if usings hey you plugin feature options, output line where called\n\t\tif ($prmry_or_scndry == 'primary_line') {\n\t\t\treturn (isset($hys['hys_page_config']['line_before_list']) && $hys['hys_page_config']['line_before_list'] == 1 && isset($hys['settings']['line1'])) \n\t\t\t\t? $hys['settings']['line1'] : '';\n\t\t}\n\t\tif ($prmry_or_scndry == 'secondary_line') {\n\t\t\treturn (isset($hys['hys_page_config']['line_between_list']) && $hys['hys_page_config']['line_between_list'] == 1 && isset($hys['settings']['line2'])) \n\t\t\t\t? $hys['settings']['line2'] : '';\n\t\t}\n\t}", "public static function fetchCodeLine($path, $line)\n {\n if (!file_exists($path)) {\n return null;\n }\n $file = new SplFileObject($path);\n if (!$file->eof()) {\n $file->seek($line - 1);\n return $file->current();\n }\n }", "private function composeValue($fileNr, $line)\n {\n return self::DECIMAL_OFFSET * $fileNr + $line;\n }", "public function getDefinedAtLine(): ?int;", "public function getLineNum()\n {\n return $this->line_num;\n }", "public function getSourceLine()\n {\n return $this->source_line;\n }", "public function setAddressLine2($addressLine2){\n\t\t$this->addressLine2\t=\t$addressLine2;\n\t}", "public function getOptionalField2()\n\t{\n return $this->_call($this->optField2);\n }", "private function findLine($line)\n {\n return array_search($line, $this->readLines);\n }", "public function getAddress2()\n {\n return $this->address_2;\n }", "public function getHeaderLine(): string;", "public function getFileLine()\n {\n return $this->name.':'.$this->hash;\n }", "protected function getLineType($line) {\n\t\treturn $line[0];\n\t}", "function parse_line($line){\n\t\t$state_function = array($this, $this->state);\n\t\treturn call_user_func($state_function, $line);\n\t}", "public function getAddressLine1Check(): ?string\n {\n return $this->addressLine1Check;\n }" ]
[ "0.7933292", "0.6780752", "0.6707837", "0.6565875", "0.652226", "0.65188855", "0.64050287", "0.63441306", "0.6301416", "0.62776315", "0.62706375", "0.62467414", "0.6236501", "0.6236501", "0.6236501", "0.6236501", "0.6236501", "0.6236501", "0.6236501", "0.6236501", "0.6181398", "0.6133531", "0.6129857", "0.6120279", "0.6118442", "0.61170447", "0.60553604", "0.605134", "0.6007258", "0.6000598", "0.5961428", "0.5917685", "0.5912068", "0.5850843", "0.5788463", "0.5788463", "0.5721953", "0.5702575", "0.5699119", "0.5677494", "0.56733006", "0.56645393", "0.5643444", "0.56216437", "0.5619323", "0.5619323", "0.5619323", "0.5619323", "0.5619323", "0.5619323", "0.5608288", "0.5528706", "0.5525927", "0.5519074", "0.5500096", "0.5483811", "0.54829407", "0.5479795", "0.5478846", "0.54771984", "0.54756624", "0.54712504", "0.5469376", "0.5462563", "0.545608", "0.54541206", "0.5452773", "0.5446122", "0.54443103", "0.54368746", "0.5435416", "0.5435364", "0.5434653", "0.54303265", "0.5428287", "0.5385702", "0.5380933", "0.53795195", "0.53783244", "0.5369918", "0.5369918", "0.5369918", "0.5369918", "0.53659695", "0.5347232", "0.53464586", "0.5342671", "0.5339806", "0.5328326", "0.53208715", "0.5318396", "0.53132915", "0.53104633", "0.5294816", "0.52922076", "0.5284754", "0.52841026", "0.5278657", "0.5277344", "0.52752864" ]
0.8373554
0
Set the value of line_2
Задайте значение line_2
public function setline2($line_2) { $this->line_2 = $line_2; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setAddressLine2(?string $addressLine2): void\n {\n $this->addressLine2['value'] = $addressLine2;\n }", "public function setAddressLine2($addressLine2){\n\t\t$this->addressLine2\t=\t$addressLine2;\n\t}", "public function setline1($line_1)\r\n {\r\n $this->line_1 = $line_1;\r\n\r\n return $this;\r\n }", "public function setLine($line)\n {\n $this->line = $line;\n }", "public function getline2()\r\n {\r\n return $this->line_2;\r\n }", "public function setAddressLine1(?string $addressLine1): void\n {\n $this->addressLine1['value'] = $addressLine1;\n }", "public function setAddressLine2($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->address_line2 !== $v) {\n\t\t\t$this->address_line2 = $v;\n\t\t\t$this->modifiedColumns[] = afCrmContactPeer::ADDRESS_LINE2;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function setField2($value)\n {\n if (!array_key_exists('field2', $this->fieldsModified)) {\n $this->fieldsModified['field2'] = $this->data['fields']['field2'];\n } elseif ($value === $this->fieldsModified['field2']) {\n unset($this->fieldsModified['field2']);\n }\n\n $this->data['fields']['field2'] = $value;\n }", "public function setAddressLine1($addressLine1){\n\t\t$this->addressLine1\t=\t$addressLine1;\n\t}", "public function unsetAddressLine2(): void\n {\n $this->addressLine2 = [];\n }", "public function addressLine2(?string $value): self\n {\n $this->instance->setAddressLine2($value);\n return $this;\n }", "public function set_line (numberlineplot_line $line) {\n $this->line = $line;\n }", "function _set_field_value($line,$value) {\n\t\t//----------------------------------------\n\t\t\n\t\t\t$verbose_set=($this->verbose&&($this->verbose_level>1));\n\t\t\t//get the line content\n\t\t\t$CurLine =$this->pdf_entries[$line];\n\t\t\n\t\t\t$OldLen=strlen($CurLine);\n\t\t\t\n\t\t\t//My PHP4/5 static call hack, only to make the callback $this->replace_value($matches,\"$value\") possible!\n\t\t\t$callback_code='$THIS=new FPDM(\"[_STATIC_]\");return $THIS->replace_value($matches,\"'.$value.'\");';\n\t\t\t\n\t\t\t$field_regexp='/^\\/(\\w+)\\s?(\\<|\\()([^\\)\\>]*)(\\)|\\>)/';\n\t\t\t\n\t\t\tif(preg_match($field_regexp,$CurLine)) {\n\t\t\t\t//modify it according to the new value $value\n\t\t\t\t$CurLine = preg_replace_callback(\n\t\t\t\t\t$field_regexp,\n\t\t\t\t\tcreate_function('$matches',$callback_code),\n\t\t\t\t\t$CurLine\n\t\t\t\t);\n\t\t\t}else {\n\t\t\t\tif($verbose_set) echo(\"<br>WARNING:\".htmlentities(\"Can not access to the value: $CurLine using regexp $field_regexp\"));\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t$NewLen=strlen($CurLine);\n\t\t\t$Shift=$NewLen-$OldLen;\n\t\t\t$this->shift=$this->shift+$Shift;\n\t\t\t\n\t\t\t//Saves\n\t\t\t$this->pdf_entries[$line]=$CurLine;\n\t\t\t\n\t\t\treturn $Shift;\n\t\t}", "public function setTwoColumn(){\n\t\t$this->column = 2;\n\t}", "public function setLine($value)\n {\n if (!isset($this->data['fields']['line'])) {\n if (!$this->isNew()) {\n $this->getLine();\n if (\n ( is_object($value) && $value == $this->data['fields']['line'] ) ||\n ( !is_object($value) && $value === $this->data['fields']['line'] )\n ) {\n return $this;\n }\n } else {\n if (null === $value) {\n return $this;\n }\n $this->fieldsModified['line'] = null;\n $this->data['fields']['line'] = $value;\n return $this;\n }\n } elseif (\n ( is_object($value) && $value == $this->data['fields']['line'] ) ||\n ( !is_object($value) && $value === $this->data['fields']['line'] )\n ) {\n return $this;\n }\n\n if (!isset($this->fieldsModified['line']) && !array_key_exists('line', $this->fieldsModified)) {\n $this->fieldsModified['line'] = $this->data['fields']['line'];\n } elseif (\n ( is_object($value) && $value == $this->fieldsModified['line'] ) ||\n ( !is_object($value) && $value === $this->fieldsModified['line'] )\n ) {\n unset($this->fieldsModified['line']);\n }\n\n $this->data['fields']['line'] = $value;\n\n return $this;\n }", "public function setLine($line)\n {\n $this->line = (int) $line;\n return $this;\n }", "public function setLine($line)\n {\n if ($line === null) {\n return;\n }\n $this->parts = $this->outer->translateCommandline($line);\n }", "function set( $value ) {\r\n\t\tif ( $this->last_key_line === -1 ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t$update = $this->prepend_key . $this->last_key . $this->append_key;\r\n\t\t$update .= $this->prepend_value . $value . $this->append_value;\r\n\t\t$this->block[$this->last_key_line] = $update;\r\n\t}", "function line($x1, $y1, $x2, $y2, $style = array()) {\n\t\t\t// Javier: width, color and style might be edited\n\t\t\tTCPDF::Line($x1, $this->h - $y1, $x2, $this->h - $y2, $style);\n\t\t}", "public function setLine(\\NOKA\\PHPUBL\\UBL\\Common\\BasicComponents\\Line $line)\n {\n $this->line = $line;\n return $this;\n }", "protected function editLinePart2()\n\t{\n\t\tglobal $debug, $message, $success, $Dbc, $returnThis;\n\t\t$output = '';\n\t\ttry{\n\t\t\tif(!isset($this->_listInfo['listRoleId']) || $this->_listInfo['listRoleId'] < 2){\n\t\t\t\tthrow new Adrlist_CustomException(\"Your role doesn't allow you to edit this list.\", '');\n\t\t\t}elseif(empty($_POST['lineId'])){\n\t\t\t\tthrow new Adrlist_CustomException('', 'editLinePart2: $_POST[\\'lineId\\'] is empty.');\n\t\t\t}elseif(empty($_POST['charId'])){\n\t\t\t\tthrow new Adrlist_CustomException('', 'editLinePart2: $_POST[\\'charId\\'] is empty.');\n\t\t\t}elseif(!isset($_POST['reel'])){\n\t\t\t\tthrow new Adrlist_CustomException('', 'editLinePart2: $_POST[\\'reel\\'] is empty.');\n\t\t\t}elseif(!isset($_POST['scene'])){\n\t\t\t\tthrow new Adrlist_CustomException('', 'editLinePart2: $_POST[\\'scene\\'] is empty.');\n\t\t\t}elseif(!isset($_POST['tcIn'])){\n\t\t\t\tthrow new Adrlist_CustomException('', 'editLinePart2: $_POST[\\'tcIn\\'] is empty.');\n\t\t\t}elseif(!isset($_POST['tcOut'])){\n\t\t\t\tthrow new Adrlist_CustomException('', 'editLinePart2: $_POST[\\'tcOut\\'] is empty.');\n\t\t\t}elseif(!isset($_POST['line'])){\n\t\t\t\tthrow new Adrlist_CustomException('', 'editLinePart2: $_POST[\\'line\\'] is empty.');\n\t\t\t}elseif(!isset($_POST['notes'])){\n\t\t\t\tthrow new Adrlist_CustomException('', 'editLinePart2: $_POST[\\'notes\\'] is empty.');\n\t\t\t}\n\t\t\t$stmt = $Dbc->prepare(\"UPDATE\n\t\tlinesTable\n\tSET\n\t\tlinesTable.charId = ?,\n\t\tlinesTable.reel = ?,\n\t\tlinesTable.scene = ?,\n\t\tlinesTable.tcIn = ?,\n\t\tlinesTable.tcOut = ?,\n\t\tlinesTable.line = ?,\n\t\tlinesTable.notes = ?,\n\t\tlinesTable.modified = ?,\n\t\tlinesTable.mId = ?\n\tWHERE\n\t\tlinesTable.lineId = ?\");\n\t\t\t$stmt->execute(array($_POST['charId'], $_POST['reel'], $_POST['scene'], $_POST['tcIn'], $_POST['tcOut'], $_POST['line'], $_POST['notes'], DATETIME, $this->_listInfo['userId'], $_POST['lineId']));\n\t\t\tupdateListHist($this->_listInfo['listId']);\n\t\t\t$message .= 'Saved';\n\t\t\tif(MODE == 'editLinePart2'){\n\t\t\t\t$success = true;\n\t\t\t\t$returnThis['buildLines'] = self::buildLines();\n\t\t\t}\n\t\t}catch(Adrlist_CustomException $e){\n\t\t}catch(PDOException $e){\n\t\t\terror(__LINE__, '', '<pre>' . $e . '</pre>');\n\t\t}\n\t\tif(MODE == 'editLinePart2'){\n\t\t\treturnData();\n\t\t}\n\t}", "public function testSetLineOutOfBounds()\n {\n $this->_object->setLine(-1, 'a');\n }", "function sachdaten_druck_editor_linie_aendern($line_id, $line_attribute_name, $line_attribute_value) {\n\t\t$myObj = new MyObject($this, 'druckfreilinien');\n\t\t$druckfreilinie = $myObj->find_by_ids($line_id);\n\t\t$druckfreilinie->set($line_attribute_name, $line_attribute_value);\n\t\t$this->qlayerset[0]['shape'] = $druckfreilinie->update();\n\t\t$this->mime_type = 'application/json';\n\t\t$this->formvars['format'] = 'json';\n\t\t$this->formvars['content_type'] = 'application/json';\n\t\t$this->output();\n\t}", "function addSecondline($secondline) {\n\t\t$this->secondline[] = $secondline;\n\t\tif ($secondline != '') {\n\t\t\t$this->usingsecondline = TRUE;\n\t\t}\n\t}", "public function getline1()\r\n {\r\n return $this->line_1;\r\n }", "public function setLine($line) {\n $this->properties['line'] = $line;\n\n return $this;\n }", "public function setLine($line)\n {\n $this->line = (int) $line;\n\n return $this;\n }", "public function setSource($file, $line)\n {\n $this->source_file = $file;\n $this->source_line = $line;\n }", "public function line($x1,$y1,$x2,$y2){\n\t\t\t$this->drawLine($x1,$y1,$x2,$y2);\n\t\t}", "public function setLine($line)\n {\n $this->line = $line;\n\n return $this;\n }", "public function setLine($line)\n {\n $this->line = $line;\n\n return $this;\n }", "public function editLine($index,$line) {\n\t\t$input = $this->_parseLine($line);\n\t\treturn $this->_entryEdit($index,$input);\n\t}", "public function assignInvoiceLine(InvoiceLineInterface $line): void;", "public function setSeq2($version2)\n {\n if (!is_array($version2)) {\n $version2 = str_split($version2);\n }\n if ($version2 == $this->new) {\n return;\n }\n\n $this->new = $version2;\n $this->matchingBlocks = null;\n $this->opCodes = null;\n $this->chainB();\n }", "private function setLink($node1, $node2, $value=1){\n\t\t$data['source'] = $this->getNodeArrayPosition($node1);\n\t\t$data['target']\t= $this->getNodeArrayPosition($node2);\n\t\t$data['value'] = $value;\n\t\tarray_push($this->links,$data);\n\t}", "function add_line($so_invoice_line) // receives an associative array of line info\n {\n $line_data=$so_invoice_line->get_data();\n $this->_data['so_invoice_lines']['line' . $line_data['line']] = $line_data;\n }", "protected function r2()\n {\n list($index, $value) = $this->rx($this->r1);\n\n $this->r2 = $value;\n $this->r2Index = $this->r1Index + $index;\n }", "public function setLine(int $newLine): void\n {\n $this->opline->lineno = $newLine;\n }", "private static function setLine($client, $line, $comName)\n {\n // if ($ping == null) {\n // $ping = new AscommStatus([\"Client\" => $client, \"Line\" => $line]);\n // }\n // self::setLineByObject($ping, $comName);\n\n // $testData = Redis::zrangebyscore(\"TCOM:Filter:$client:$line\", now(config(\"app.timezone\"))->subMinutes(1)->timestamp, Carbon::now(config('app.timezone'))->timestamp, 'withscores');\n // echo \"Redis test data => \" . json_encode($testData) . PHP_EOL;\n Redis::zadd(\"TCOM:Filter:$client:$line\", now(config(\"app.timezone\"))->timestamp, $comName);\n }", "final protected function modificarLinea()\n\t{\n\t\tif($this->linea == null){\n\t\t\tthrow new Exception('Linea sin datos');\n\t\t}\n\t\tDataAccess::update($this->linea);\t\n\t}", "public function set_dimension_2( TransactionLineDimension $dimension ) {\n\t\t$this->dimension_2 = $dimension;\n\t}", "public function unsetAddressLine1(): void\n {\n $this->addressLine1 = [];\n }", "final function setStreet_2($value) {\n\t\treturn $this->setStreet2($value);\n\t}", "function setAdditionalColumn2($value) {\n return $this->setAdditionalProperty('additional_column_2', $value);\n }", "public function set_shipping_address_2($value)\n {\n }", "public function changeTo(File $file, $line)\n {\n $currentLineNumber = $file->getCurrentLineNumber();\n\n $file->changeLineTo($line, $currentLineNumber);\n }", "public function setAddressLine3(?string $addressLine3): void\n {\n $this->addressLine3['value'] = $addressLine3;\n }", "function setStreet2($value) {\n\t\treturn $this->setColumnValue('street_2', $value, Model::COLUMN_TYPE_VARCHAR);\n\t}", "public function setLineType($lineType) { $this->lineType = $lineType ; }", "public function updateLine($id, $data);", "function _Line($x, $y) {\r\n $this->_out(sprintf('%.2f %.2f l', $x * $this->k, ($this->h - $y) * $this->k));\r\n }", "function target2($value2){$this->target2 = $value2;}", "public function set_address_2($address_2) {\r\n $this->address_2 = $address_2;\r\n }", "function setTrack2($track2) {\n\t\t$this->m_track2 = $track2;\n\t}", "public function setFocusPoint($x1, $y2);", "public function set_billing_address_2($value)\n {\n }", "function StyleLine($x1, $y1, $x2, $y2)\n {\n if ($this->line_weight <= 0)\n return;\n\n switch ($this->line_style) {\n case 1:// Solid\n $this->Line($x1, $y1, $x2, $y2);\n break;\n case 2: // Dotted\n $this->DashedLine($x1, $y1, $x2, $y2, 1, 3);\n break;\n case 3: // Dashed\n $this->DashedLine($x1, $y1, $x2, $y2, 2, 4);\n break;\n case 4: // Longdashes\n $this->DashedLine($x1, $y1, $x2, $y2, 8, 6);\n break;\n default:\n JpGraphError::RaiseL(25104, $this->line_style);//(\" Unknown line style: $this->line_style \");\n break;\n }\n }", "public function setTrack2Data($track2data)\n {\n if (preg_match('/^;.*\\?$/', $track2data)) {\n $this->track2 = substr($track2data, 1, -1);\n } else {\n $this->track2 = $track2data;\n }\n }", "public function unsetAddressLine2(): self\n {\n $this->instance->unsetAddressLine2();\n return $this;\n }", "public function line ($x, $y, $x2, $y2, $width = NULL)\n\t{\n\t\tif ($width)\n\t\t{\n\t\t\tpdf_setlinewidth($this->pdf, $width);\n\t\t}\n\t\tpdf_moveto($this->pdf, $x, $y);\n\t\tpdf_lineto($this->pdf, $x2, $y2);\n\t\tpdf_stroke($this->pdf);\n\t}", "function setAddress2Attribute($address2) \n\t{\n\n\t\t$this->attributes['address2'] = $address2;\n\n\t\t$parts = explode(\" \",$address2);\n\t\tif ( count($parts)> 0 && is_numeric($parts[0]) ) {\n\n\t\t\t$zipcode = Zipcode::where('zipcode','=',$parts[0])->first();\n\t\t\n\t\t\tif ($zipcode instanceOf Zipcode) {\n\n\t\t\t\t// connect to Zipcode \n\t\t\t\t$this->zipcode_id = $zipcode->id;\n\t\t\t\t\n\t\t\t\t// Try to geocode \n\t\t\t\tif (!$this->geocode()) {\n\n\t\t\t\t\t$geocoded = $this->geocodeKey();\n\n\t\t\t\t\t// use district lat lng if available\n\t\t\t\t\tif ($zipcode->district) {\n\t\t\t\t\n\t\t\t\t\t\t$this->lat = $zipcode->district->lat;\n\t\t\t\t\t\t$this->lng = $zipcode->district->lng;\n\t\t\t\t\t\t$this->geosource = 'ZIPD';\n\t\t\t\t\t\t$this->geocoded = $geocoded;\n\n\t\t\t\t\t} \n\n\t\t\t\t\t// use city lat lng if available\n\t\t\t\t\telse if ($zipcode->city) {\n\n\t\t\t\t\t\t$this->lat = $zipcode->city->lat;\n\t\t\t\t\t\t$this->lng = $zipcode->city->lng;\n\t\t\t\t\t\t$this->geosource = 'ZIPC';\n\t\t\t\t\t\t$this->geocoded = $geocoded;\n\n\t\t\t\t\t}\n\t\n\t\t\t\t}\n\t\n\t\t\t}\n\n\t\t}\n\n\t}", "public function getAddressLine2()\n\t{\n\t\treturn $this->address_line2;\n\t}", "public function setField1($value)\n {\n if (!array_key_exists('field1', $this->fieldsModified)) {\n $this->fieldsModified['field1'] = $this->data['fields']['field1'];\n } elseif ($value === $this->fieldsModified['field1']) {\n unset($this->fieldsModified['field1']);\n }\n\n $this->data['fields']['field1'] = $value;\n }", "public function keyVal($line,$key){\n\t\t$keyVal = explode('=', $line, 2);\n\t\tif(isset($keyVal)):\n\t\t\tif(isset($keyVal[1])):\n\t\t\t\tstatic::$contents[$keyVal[0]] = $keyVal[1];\n\t\t\telse:\n\t\t\t\tstatic::$contents[$keyVal[0]] = '';\n\t\t\tendif;\n\t\t\tstatic::$stack[] = $key;\n\t\tendif;\n\t\treturn $this;\n\t}", "public function setCsvLineNo($lineNo)\n {\n $this->csvLineNo = $lineNo;\n }", "function set_tagline($tagline)\r\n {\r\n $this->set_default_property(self :: PROPERTY_TAGLINE, $tagline);\r\n }", "public function setAddress2($address2)\n {\n $this->address2 = $address2;\n }", "function addLine($x1, $y1, $x2, $y2, $col) \n {\n if(!$this->error) \n {\n $colour = ImageColorAllocate($this->img, $col[0], $col[1], $col[2]);\n ImageLine($this->img, $x1, $y1, $x2, $y2, $colour);\n }\n }", "public function setCriteria2(?string $value): void {\n $this->getBackingStore()->set('criteria2', $value);\n }", "public function setG2point1Attribute($input)\n {\n $this->attributes['g2point1'] = $input ? $input : null;\n }", "public function addressLine1(?string $value): self\n {\n $this->instance->setAddressLine1($value);\n return $this;\n }", "function setRow($rid, $line) {\r\n if (!is_array($line)) return false;\r\n $this->data[$rid] = $line;\r\n return true;\r\n }", "function line($x, $y, $x2, $y2, $color=0) {\n\t\tif (! is_numeric($color)) $color = $this->intify($color);\n\t\treturn imageline($this->img, $x, $y, $x2, $y2, $color);\n\t}", "public function setAddressLine1($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->address_line1 !== $v) {\n\t\t\t$this->address_line1 = $v;\n\t\t\t$this->modifiedColumns[] = afCrmContactPeer::ADDRESS_LINE1;\n\t\t}\n\n\t\treturn $this;\n\t}", "private static function setLineByObject($line, $comName) {\n // echo \"Redis test data => \" . json_encode($testData) . PHP_EOL;\n Redis::zadd(\"TCOM:Filter:Device:$line\", now(config(\"app.timezone\"))->timestamp, [$comName, $comName]);\n // echo \"setLineByObject $line end \" . Carbon::now(config('app.timezone'))->timestamp . \" $comName\" . PHP_EOL;\n\n\n // $line->ComName = $comName;\n // $line->LastPing = Carbon::now(config('app.timezone'));\n // $line->save();\n }", "public function setSection2($value) {\n return $this->set(self::SECTION2, $value);\n }", "public function setLine($var)\n {\n GPBUtil::checkInt64($var);\n $this->line = $var;\n\n return $this;\n }", "function AddLine($aLine, $aToY2 = false)\n {\n if ($aLine == null)\n JpGraphError::RaiseL(25015);//(\"Graph::AddLine() You tried to add a null line to the graph.\");\n\n if ($aToY2) {\n if (is_array($aLine)) {\n for ($i = 0; $i < count($aLine); ++$i)\n $this->y2lines[] = $aLine[$i];\n } else\n $this->y2lines[] = $aLine;\n } else {\n if (is_array($aLine)) {\n for ($i = 0; $i < count($aLine); ++$i)\n $this->lines[] = $aLine[$i];\n } else\n $this->lines[] = $aLine;\n }\n }", "public function applyInvoiceLine(InvoiceLineInterface $line): void;", "protected function setStatusLine($statusLine) {\n\t\t$this->statusLine = $statusLine;\n\t}", "public function addLine($line)\n {\n $this->resultString = \"{$line}{$this->resultString}{$line}\";\n }", "public function change_nb_line($p_nb_line,$p_selected_lines = false)\r\n\t\t{\r\n\t\t\t// Set the selected lines to edit\r\n\t\t\tif($p_selected_lines != false)\r\n\t\t\t{\r\n\t\t\t\t$this->define_selected_line($p_selected_lines);\r\n\t\t\t}\r\n\t\t\t$this->c_nb_line = $p_nb_line;\r\n\t\t\t$this->c_limit_max = $this->c_nb_line;\r\n\r\n\t\t\t$this->c_obj_graphic->define_nb_line($p_nb_line);\r\n\t\t\t$this->define_attribute('__current_page',1);\r\n\t\t\t$this->define_limit_min(0);\r\n\t\t}", "public function writeLine($line);", "public function writeLine($line);", "public function setOrgAddress2($newAddress2) {\n\t\t//verify the new address is secure\n\t\t$newAddress2 = trim($newAddress2);\n\t\t$newAddress2 = filter_var($newAddress2, FILTER_SANITIZE_STRING);\n\t\t//allow the empty case\n\t\tif($newAddress2 === false) {\n\t\t\tthrow (new InvalidArgumentException(\"address (second line) is insecure\"));\n\t\t}\n\t\t//verify the new address will fit in the database\n\t\tif(strlen($newAddress2) > 64) {\n\t\t\tthrow(new RangeException(\"address (second line) is too large\"));\n\t\t}\n\t\t//store the new address\n\t\t$this->orgAddress2 = $newAddress2;\n\t}", "public function moveLine()\n {\n $numberFive = 5;\n $numberOne = 1;\n $numberThree = 3;\n $numberTwo = 2;\n $numberFour = 4;\n }", "function PMA_PDF_lineScale($x1, $y1, $x2, $y2)\n {\n $x1 = ($x1 - $this->_xMin) / $this->scale + $this->leftMargin;\n $y1 = ($y1 - $this->_yMin) / $this->scale + $this->topMargin;\n $x2 = ($x2 - $this->_xMin) / $this->scale + $this->leftMargin;\n $y2 = ($y2 - $this->_yMin) / $this->scale + $this->topMargin;\n $this->Line($x1, $y1, $x2, $y2);\n }", "public function salesOrderLineUpdate(\n string $key,\n string $type,\n string $no,\n string $description,\n string $description2,\n string $quantity,\n string $measurecode,\n string $unitPrice,\n string $lineDiscountPercent\n ): object {\n $result = $this\n ->soap('Page/WsSalesOrderLines')\n ->update([\n 'WsSalesOrderLines' => [\n 'Key' => $key,\n 'Type' => $type,\n 'No' => $no,\n 'Description' => $description,\n 'Description_2' => $description2,\n 'Quantity' => $quantity,\n 'Unit_of_Measure_Code' => $measurecode,\n 'Unit_Price' => $unitPrice,\n 'Line_Discount_Percent' => $lineDiscountPercent,\n ],\n ]);\n\n return $result->WsSalesOrderLines ?? (object) [];\n }", "function setLineNum($num)\n {\n $this->_wp->linenum = $num;\n }", "public function set(int $x, int $y, int $value) : void\n {\n $this->bytes[$y][$x] = $value;\n }", "public function setPurchaseInvoiceLines(?array $value): void {\n $this->getBackingStore()->set('purchaseInvoiceLines', $value);\n }", "public function setG2point2Attribute($input)\n {\n $this->attributes['g2point2'] = $input ? $input : null;\n }", "public function setMerchantDefinedField2($value)\n {\n return $this->setParameter('merchant_defined_field_2', $value);\n }", "protected function editLinePart1()\n\t{\n\t\tglobal $debug, $message, $success, $Dbc, $returnThis;\n\t\t$output = '';\n\t\ttry{\n\t\t\tif(!isset($this->_listInfo['listRoleId']) || $this->_listInfo['listRoleId'] < 2){\n\t\t\t\tthrow new Adrlist_CustomException(\"Your role doesn't allow you to edit this list.\", '');\n\t\t\t}elseif(empty($_POST['lineId'])){\n\t\t\t\tthrow new Adrlist_CustomException('', 'editLinePart1: $_POST[\\'lineId\\'] is empty.');\n\t\t\t}\n\t\t\t$lineId = intval($_POST['lineId']);\n\t\t\t$stmt = $Dbc->prepare(\"SELECT\n\t\tlinesTable.charId AS 'charId',\n\t\tlinesTable.lineId as lineId,\n\t\tlinesTable.reel AS 'reel',\n\t\tlinesTable.scene AS 'scene',\n\t\tlinesTable.tcIn AS 'tcIn',\n\t\tlinesTable.tcOut AS 'tcOut',\n\t\tlinesTable.line AS 'line',\n\t\tlinesTable.notes AS 'notes'\n\tFROM\n\t\tlinesTable\n\tWHERE\n\t\tlinesTable.lineId = ? AND\n\t\tlinesTable.listId = ?\");\n\t\t\t$params = array($lineId, $this->_listInfo['listId']);\n\t\t\t$stmt->execute($params);\n\t\t\t$row = $stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\tif(empty($row)){\n\t\t\t\terror(__LINE__);\n\t\t\t\tpdoError(__LINE__, $stmt, $params, 1);\n\t\t\t}else{\n\t\t\t\t$row = charToHtml($row);//Convert all special characters to html.\n\t\t\t\t$output .= '<div id=\"lineDiv' . $lineId . '\" class=\"lineMain ui-corner-all center textCenter\" style=\"border:none\">\n\t\t\t\t\t\t' . self::buildCharacters($row['charId'], 'editLineCharacter', 13) . '\n\t\t\t\t\t\t<div class=\"ui-field-contain\">\n\t\t\t\t\t\t\t<label for=\"editReel\" unused=\"ui-hidden-accessible\">Reel</label>\n\t\t\t\t\t\t\t<input autocapitalize=\"off\" autocorrect=\"off\" data-mini=\"true\" data-wrapper-class=\"true\" id=\"editReel\" goswitch=\"addLineButton\" name=\"editReel\" placeholder=\"\" type=\"text\" value=\"' . $row['reel'] . '\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"ui-field-contain\">\n\t\t\t\t\t\t\t<label for=\"editScene\" unused=\"ui-hidden-accessible\">Scene</label>\n\t\t\t\t\t\t\t<input autocapitalize=\"off\" autocorrect=\"off\" data-mini=\"true\" data-wrapper-class=\"true\" id=\"editScene\" goswitch=\"addLineButton\" name=\"editScene\" placeholder=\"\" type=\"text\" value=\"' . $row['scene'] . '\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"ui-field-contain\">\n\t\t\t\t\t\t\t<label for=\"editTcIn\" unused=\"ui-hidden-accessible\">TC In</label>\n\t\t\t\t\t\t\t<input autocapitalize=\"off\" autocorrect=\"off\" class=\"tcValidate\" data-mini=\"true\" data-wrapper-class=\"true\" entry=\"edit\" id=\"editTcIn\" framerate=\"' . $this->_listInfo['framerate'] . '\" goswitch=\"addLineButton\" maxlength=\"14\" name=\"editTcIn\" otherfield=\"editTcOut\" placeholder=\"\" type=\"text\" value=\"' . $row['tcIn'] . '\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<button lineId=\"2351\" class=\"swapTc ui-btn ui-mini ui-btn-inline ui-corner-all\" entry=\"edit\"><i class=\"fa fa-exchange fa-lg fa-rotate-90\"></i>Swap</button>\n\t\t\t\t\t\t<div class=\"ui-field-contain\">\n\t\t\t\t\t\t\t<label for=\"editTcOut\" unused=\"ui-hidden-accessible\">TC Out</label>\n\t\t\t\t\t\t\t<input autocapitalize=\"off\" autocorrect=\"off\" class=\"tcValidate\" data-mini=\"true\" data-wrapper-class=\"true\" entry=\"edit\" id=\"editTcOut\" framerate=\"' . $this->_listInfo['framerate'] . '\" goswitch=\"addLineButton\" maxlength=\"14\" name=\"editTcOut\" otherfield=\"editTcIn\" placeholder=\"\" type=\"text\" value=\"' . $row['tcOut'] . '\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"ui-field-contain\">\n\t\t\t\t\t\t\t<label for=\"editLine\" unused=\"ui-hidden-accessible\">Line</label>\n\t\t\t\t\t\t\t<textarea autocapitalize=\"off\" autocorrect=\"off\" data-mini=\"true\" data-wrapper-class=\"true\" id=\"editLine\" framerate=\"' . $this->_listInfo['framerate'] . '\" goswitch=\"addLineButton\" name=\"addLine\" placeholder=\"\" rows=\"5\">' . $row['line'] . '</textarea>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"ui-field-contain\">\n\t\t\t\t\t\t\t<label for=\"editNotes\" unused=\"ui-hidden-accessible\">Notes</label>\n\t\t\t\t\t\t\t<textarea autocapitalize=\"off\" autocorrect=\"off\" data-mini=\"false\" data-wrapper-class=\"true\" id=\"editNotes\" framerate=\"' . $this->_listInfo['framerate'] . '\" goswitch=\"addLineButton\" name=\"addNotes\" placeholder=\"\" rows=\"5\">' . $row['notes'] . '</textarea>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<button class=\"ui-btn ui-btn-inline ui-shadow ui-corner-all ui-btn-icon-left ui-icon-heart\" id=\"saveLineButton\" lineId=\"' . $row['lineId'] . '\">Save Changes</button><button class=\"ui-btn ui-btn-b ui-btn-inline ui-shadow ui-corner-all ui-btn-icon-left ui-icon-delete\" id=\"cancelEditLine\">Cancel</button>\t\t\t\t\n\t\t\t\t\t</div>';\n\t\t\t\t$success = MODE == 'editLinePart1' ? true : $success;\n\t\t\t\t$returnThis['returnEditLinePart1'] = $output;\n\t\t\t}\n\t\t}catch(Adrlist_CustomException $e){\n\t\t}catch(PDOException $e){\n\t\t\terror(__LINE__, '', '<pre>' . $e . '</pre>');\n\t\t}\n\t\tif(MODE == 'editLinePart1'){\n\t\t\treturnData();\n\t\t}\n\t}", "function setPageLine($PAGELINE){ $this->PAGELINE = $PAGELINE; }", "abstract protected function formatLine(array &$result, $line);", "public function edit(ProductionLine $productionLine)\n {\n //\n }", "public function line($x1, $y1, $x2, $y2)\n {\n $converter = $this->manager->getConverter();\n\n $x1 = $converter->toPt($x1);\n $y1 = $this->manager->getHeight() - $converter->toPt($y1);\n $x2 = $converter->toPt($x2);\n $y2 = $this->manager->getHeight() - $converter->toPt($y2);\n\n $this->ensureDraw();\n\n $canvas = $this->manager->getCanvas();\n $canvas->draw()->line($x1, $y1, $x2, $y2);\n }", "public function editLine($lineNum, $string) {\n\t\t\t$this->data[$lineNum] = explode($this->delimiter, $string);\n\t\t}", "private function DrawLine($x1, $y1, $x2, $y2) {\n $colors = array(\n 'black' => array(0,0,0),\n 'red' => array(255,0,0),\n 'green' => array(0,128,0),\n 'purple' => array(128,0,128),\n 'orange' => array(255,165,0),\n );\n \n $color = $colors[$this->color];\n \n $this->SetDrawColor($color[0], $color[1], $color[2]);\n \n if ($this->border == 'dashed') {\n $this->LineDashed($x1, $y1, $x2, $y2, 5);\n } else {\n $this->Line($x1, $y1, $x2, $y2);\n }\n }" ]
[ "0.73890173", "0.7138105", "0.6951766", "0.6628774", "0.650527", "0.64467686", "0.6385502", "0.6326051", "0.6270687", "0.6232117", "0.6156783", "0.61482954", "0.6111496", "0.6110168", "0.6035643", "0.59945416", "0.5897563", "0.5864028", "0.585669", "0.5837755", "0.5834124", "0.58260655", "0.5821139", "0.57773656", "0.5775846", "0.5772254", "0.57555425", "0.57420504", "0.5723274", "0.5716465", "0.5716465", "0.5711268", "0.56815964", "0.56537783", "0.5651745", "0.5614377", "0.56060046", "0.5602799", "0.55766934", "0.5567729", "0.5554574", "0.5532758", "0.55302787", "0.55226517", "0.5519784", "0.55032545", "0.54961824", "0.5495302", "0.5493343", "0.54731154", "0.546441", "0.5463304", "0.5417862", "0.5415327", "0.5411134", "0.54057056", "0.5404049", "0.5400143", "0.5386187", "0.5384249", "0.53765845", "0.5371049", "0.53639317", "0.53587866", "0.5358395", "0.53424656", "0.53211564", "0.529058", "0.5281392", "0.5278469", "0.5277308", "0.52596956", "0.5258371", "0.52415097", "0.5240605", "0.52397716", "0.52385753", "0.5236688", "0.52294415", "0.5228957", "0.52285707", "0.5220929", "0.520293", "0.520293", "0.51852477", "0.51741236", "0.51676565", "0.51549286", "0.51547074", "0.51485956", "0.514597", "0.51323634", "0.5127251", "0.51133424", "0.5101177", "0.50938326", "0.508956", "0.5084927", "0.5068091", "0.5065907" ]
0.7844328
0
Show the form for creating a new Requisito.
Показать форму для создания нового Requisito.
public function create() { return view('requisitos.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n if(!Gate::allows('isAdmin')){\n abort(404,'Você não tem acesso a esta funcionalidade');\n }\n return view('frm_produto');\n }", "public function create()\n {\n return view('raridades.form');\n }", "public function create()\n {\n $action = route('fornecedor.store');\n return view('form_fornecedor_juridico');\n }", "public function create()\n {\n return view('produto.addProduto');\n }", "public function create()\n {\n return view('professores.create');\n }", "public function create()\n {\n return view(\"cliente.form\");\n }", "public function actionCreate()\n {\n $model = new Recepcion();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function create()\n {\n Gate::authorize('admin');\n return view('productos.productosForm'); \n }", "public function create()\n {\n $title = \"Registrar negocio\";\n $model = new Business();\n\n return view($this-> prefixView.'form',compact('title','model'));\n }", "public function create()\n {\n $title = \"Registrar producto\";\n $model = new Product();\n return view($this-> prefixView.'form',compact('title','model'));\n }", "public function create()\n {\n //\n return view('forms.company');\n }", "public function create()\n {\n // Mostramos un formulario para crear nuevos ejemplos\n $licencia = new Licencia;\n return view('licencia.create',['$licencia'=>$licencia]);\n }", "public function criar()\n {\n return $this->view('formResgate');\n }", "public function create()\n {\n //return \"Formulario de registo\";\n return view('clientes.create');\n }", "public function create()\n {\n return view('resep.form');\n }", "public function create()\n {\n $refeicaos= Refeicao::get();\n return view('registo.newRegisto', compact('refeicaos'));\n }", "public function create()\n {\n return view(\"produto.create\");\n }", "public function create()\n {\n Return View::make('proformaInvoice.add');\n }", "public function create()\n {\n $jenis = \"create\";\n return view('ecommerce.form', compact('jenis'));\n }", "public function create()\n {\n return 'Exibindo o form de cadastro de um novo produto';\n }", "public function create()\n {\n $data['tipo'] = 'criar';\n // return view('formcidade', $data);\n }", "public function create()\n {\n return view('pages.familiarestipo.create');\n }", "public function create()\n {\n return view('admin.precios.create');\n }", "public function create()\n {\n return view('crud.form');\n }", "public function create()\n\t{\n\t\t$modulocombo = Modulo::all()->lists('ModCertificado','id');\n\t\t$dispcombo = Disponibilidad::all()->lists('DispNombre','id');\n\t\t$perfilcombo = Perfil::all()->lists('PerNombre','id');\n\t\treturn View::make('preinscrito.create', array('modulocombo' => $modulocombo,'dispcombo'=>$dispcombo,'perfilcombo'=>$perfilcombo));\n\t\t//return View::make('preinscrito.create')->with('modulocombo', $modulocombo);\n\t}", "public function create()\n {\n return view('nguoi-choi.form');\n }", "public function create()\n {\n return view('requirements.create');\n }", "public function create()\n {\n return view('requirements.create');\n }", "public function createProdcutForm(){\n return view(\"admin.createProductForm\");\n }", "public function create()\n {\n return view('company.form')\n ->with([\n 'title' => 'Add Company',\n 'action' => 'add',\n 'company' => null\n ]);\n }", "public function create()\n {\n //\n return view(\"recetas.create\");\n }", "public function newAction()\n {\n $entity = new Receta();\n $form = $this->createForm(new RecetaType(), $entity);\n\n return $this->render('TodoCerdoTodoCerdoBundle:Receta:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "function showCreateForm(){\n return view('admin.Warta_Jemaat.create');\n }", "public function create()\n\t{\n\t\treturn view('recetas.create');\n\t}", "public function create()\n {\n return view('pages.facturaconcepto.create');\n }", "public function create()\n {\n //\n return view('form.formCotizacion');\n }", "public function actionCreate()\n {\n $model = new Informerespuestas();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->idiglesia]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function newAction()\n {\n $entity = new Reposicion();\n $entity->setFechaReposicion(new \\DateTime('now', new \\DateTimeZone('UTC')));\n\n $form = $this->createCreateForm($entity);\n\n return $this->render('AppBundle:admin\\Reposicion:new.html.twig',array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $requisition = Requisition::all();\n $payabletos = Payableto::all();\n $projects = Project::all();\n return view('requisitions.create',compact('requisition','payabletos','projects'));\n }", "public function create()\n {\n return view('beneficiados.create');\n }", "public function create()\n {\n return view('admin.catalog.form');\n }", "public function create()\n {\n return view('articulos.create');\n }", "public function crear()\n\t{\n\t\treturn view('proveedores.crear');\n\t}", "public function create()\n {\n return view('admin.proveedores.create');\n }", "public function create()\n {\n return view('religion.add');\n }", "public function create()\n {\n /*show create form maybe not nessesary*/\n }", "public function create()\n {\n return view ('ingresos.CreateIngreso');\n //\n }", "public function create()\n {\n return view('asignatura.form');\n }", "public function create()\n {\n return view('utilisateurs.create');\n }", "public function create()\n {\n return view('utilisateurs.create');\n }", "function showCreateForm(){\n return view('admin.Ebuletin.create');\n }", "public function create()\n {\n return view('cheques.form');\n }", "public function create()\n {\n\n return view(\"auth.admin.creare\")->with([\"formulario\"=>\"I\",\n \"type\"=>\"E\",\n \"urlpunto\"=>\"listadesplieguepuntofinal\",\n \"urlmesa\"=>\"listadesplieguemesa\",\n \"urldesplieguefinal\"=>\"listadespliegueciudadfinal\",\n 'urldesplieguedepartamento'=>'listadesplieguedepartamento',\n \"idnamefinal\"=>\"id_ciudad\",\n 'idname'=>'id_departamento',\n 'idnamepunto'=>'id_punto',\n 'idnamemesa'=>'id_mesa',\n 'idnamereferido'=>'id_referido',\n 'urlreferido'=>'listardiferidos' ])->with(self::url());\n }", "public function create()\n {\n return view('supplier.form', [\n 'edit' => false\n ]);\n }", "public function create()\n {\n return view(\"proveedores.create\");\n }", "public function formNewTipoContrato(){\n Obj::run()->View->render();\n }", "public function createAction()\n {\n $this->view->flds = '[{\"cssClass\":\"input_text\",\"required\":\"undefined\",\"values\":\"First Name\"},{\"cssClass\":\"textarea\",\"required\":\"undefined\",\"values\":\"Bio\"},{\"cssClass\":\"checkbox\",\"required\":\"undefined\",\"title\":\"Whats on your pizza?\",\"values\":{\"2\":{\"value\":\"Extra Cheese\",\"baseline\":\"undefined\"},\"3\":{\"value\":\"Beef\",\"baseline\":\"undefined\"}}}]';\n $this->view->form = new NpfWebformsForm(null);\n }", "public function create()\n {\n $classe_produto = ClasseProduto::pluck('classe', 'id');\n $tipo_produto = TipoProduto::pluck('tipo', 'id');\n $data = [\n 'title' => \"Produtos\",\n 'menu' => \"Produtos\",\n 'submenu' => \"Novo\",\n 'type' => \"form\",\n 'getClasseProduto' => $classe_produto,\n 'getTipoProduto' => $tipo_produto\n\n ];\n\n return view(\"produto.new\", $data);\n }", "public function create()\n {\n return view('partner.form');\n }", "public function create()\n {\n return view('inscritos.create');\n }", "public function actionCreate()\n {\n $model = new TipoIngreso();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->idtipo_ingreso]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function create()\n {\n return view('admin.tipo_internamientos.create');\n }", "public function create()\n {\n return view('procesos.create');\n }", "public function create()\n {\n return view('clientes.crear');\n }", "public function create()\n {\n return view('laboratoire.create');\n }", "public function create()\n {\n $data['tipo'] = 'criar';\n // return view('formcategoria', $data);\n }", "public function create()\n {\n $title = 'Cadastrar polo';\n return view('polo.form',compact('title'));\n }", "public function create()\n {\n $showUser = Gate::allows('edit-users'); //verificando se é ADMIN\n $showProjeto = Gate::allows('edit-projeto'); //Verificando permissão PROJETO\n $showProcesso = Gate::allows('edit-processo'); //Verificando permissão PROCESSO\n $showCronograma = Gate::allows('edit-cronograma'); //Verificando permissão CRONOGRAMA\n $fornecedores = Fornecedor::all();\n \n return view('fornecedores.criar', compact('showUser', 'showProjeto', 'showProcesso', 'showCronograma'));\n }", "public function create()\n {\n return view('promotion.form_create');\n }", "public function create()\n {\n \n \n return view('articulos.create');\n }", "public function create()\n {\n return view(\"admin.cliente.crear\");\n }", "public function create()\n\t{\n\t\treturn View::make('s_comentarios_registros.create');\n\t}", "public function create()\n\t{\n\t\treturn View::make('producto.create');\n\t}", "public function create()\n {\n return view('crudproducto.create');\n }", "public function create()\n {\n return view('productos.crear');\n }", "public function create()\n {\n return view(\"pages.req.form\");\n }", "public function create()\n {\n return view('reclamos.crearReclamo');\n }", "public function create()\n {\n return view('admin.cargo.create');\n }", "public function create()\n {\n return view('admin.cargo.create');\n }", "public function create()\n {\n //\n return view('notas.formulario');\n }", "public function create()\n {\n $tipos = Tipo::all()->lists('nombre','id');\n return view('presentacion.formulario.create', compact('tipos'));\n }", "public function create()\n {\n return view('propietario.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return view('Firmantes.create')->render();\n }", "public function create()\n {\n $modal = array(\n 'title' => 'Mensaje de confirmación',\n 'body' => '¿Está seguro de guardar el registro del profesor?'\n );\n return view('profesor.crear', compact('modal'));\n }", "public function create()\n\t{\n\t\t//ValidaAccesoController::validarAcceso('Proveedores','escritura');\n\t\t$form_data = array('route' => array('proveedores.store'), 'method' => 'post');\n\n $action = 'Crear';\n $proveedor= null;\n\t\treturn View::make('admin/proveedor',compact('proveedor','form_data','action'));\n\t}", "public function create()\n\t{\n\t\treturn View::make('Productos.create');\n\t\n\t}", "public function create()\n\t{\n\t\t//\n\t\treturn view('registro.create');\n\t}", "public function create()\n {\n $cliente = Cliente::pluck('name', 'id');\n $plazo = Plazo::pluck('name', 'id');\n $formapago = FormaPago::pluck('name', 'id');\n $tasa = Tasa::pluck('name', 'id');\n\n return view('creditos.create', compact('cliente', 'plazo', 'formapago', 'tasa'));\n }", "public function create()\n\t{\n\t\treturn view('atributos.create');\n\t}", "public function newAction()\n {\n $entity = new Recurso();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CrestaAulasBundle:Recurso:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('admin.assistente-comunitario.add');\n }", "public function create()\n {\n $departamento = ['0' => 'Seleccionar...'] + Departamento::select('id','Departamento')->orderBy('Num','asc')->lists('Departamento','id')->toArray();\n $cueroRegionalComunidad = CueroRegionalComunidad::orderBy('FechaRegistro','desc');\n $cueroRegionalComunidad = $cueroRegionalComunidad->get();\n return view('cueroregional.formulario',compact('departamento'));\n }", "public function create()\n {\n return view('chi-tiet-luot-choi.form');\n }", "public function create() {\r\n \r\n $title = 'Cadastro de Produto';\r\n\r\n $category = ['eletronicos', 'moveis', 'limpeza', 'banho'];\r\n\r\n return view('painel.produto.create-edit', compact('title', 'category')); }", "public function create()\n {\n return view ('Catalogos.TipoObras.crear');\n }", "public function create()\n {\n return view('admin.produto.novo-produto');\n }", "public function create()\n {\n return view('admin.promo_code.forms.create');\n }", "public function create()\n {\n return view('proveedor/crear');\n }", "public function create()\n {\n\t\t\t\treturn view(\"procesos.cobro.create\");\n\n }" ]
[ "0.7254952", "0.7200327", "0.71334827", "0.71159333", "0.71033394", "0.7094821", "0.70831114", "0.7076143", "0.7069998", "0.7030152", "0.7023695", "0.7023491", "0.70212954", "0.7020437", "0.70170057", "0.7016669", "0.701636", "0.7007855", "0.7001043", "0.698657", "0.69754064", "0.6970772", "0.6939946", "0.69321847", "0.6930471", "0.6930291", "0.6923574", "0.6923574", "0.69192666", "0.69182646", "0.69101465", "0.6907968", "0.69042486", "0.69007736", "0.6896146", "0.6895262", "0.68917054", "0.68844265", "0.6882982", "0.6880394", "0.68747246", "0.6873007", "0.6869098", "0.68653077", "0.6865087", "0.6860952", "0.68598825", "0.6859868", "0.6859663", "0.6859663", "0.68585634", "0.6856522", "0.6855101", "0.6852558", "0.6852316", "0.6851004", "0.68494695", "0.68488365", "0.6847557", "0.68452924", "0.6841718", "0.68393487", "0.6835663", "0.68343264", "0.68261975", "0.6824721", "0.6823707", "0.6823274", "0.68205285", "0.68173593", "0.6816131", "0.681474", "0.681458", "0.68139154", "0.681112", "0.6810952", "0.6808578", "0.68069994", "0.68069994", "0.6805763", "0.6805655", "0.68051153", "0.6801016", "0.679894", "0.67987007", "0.67975736", "0.67970926", "0.6797036", "0.67968124", "0.67951405", "0.67935985", "0.67921686", "0.67892474", "0.67842185", "0.6783761", "0.6782903", "0.6781958", "0.67816716", "0.6779022", "0.6774789" ]
0.7381663
0
Store a newly created Requisito in storage.
Храните только что созданный Requisito в хранилище.
public function store(CreateRequisitoRequest $request) { $input = $request->all(); $requisito = $this->requisitoRepository->create($input); Flash::success('Requisito saved successfully.'); return redirect(route('requisitos.index')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store(PerritoRequest $request)\n {\n\n $perrito = new Perrito;\n $perrito->create($request->all());\n }", "public function store()\n {\n $this->validate([\n 'nome' => 'required',\n ]);\n\n $contato_tipo = TipoContato::updateOrCreate(['id' => $this->tipo_contato_id], [\n 'nome' => $this->nome,\n ]);\n session()->flash('message',\n $this->tipo_contato_id ? 'Tipo de Contato atualizado com sucesso.' : 'Tipo de Contato cadastrado com sucesso.');\n\n $this->closeModal();\n $this->resetInputFields();\n }", "public function store(Request $request)\n {\n\n $this->validate($request, [\n 'title' => 'required',\n 'category_id' => 'required',\n 'requisition_type' => 'required',\n 'manufacturer' => 'required',\n 'country_id' => 'required',\n 'project_id' => 'required',\n 'worker_id' => 'required',\n ]);\n\n $requisition = new Requisition();\n $requisition->title = $request->title;\n $requisition->slug = Str::slug($request->title);\n $requisition->category_id = $request->category_id;\n $requisition->requisition_type = $request->requisition_type;\n $requisition->manufacturer = $request->manufacturer;\n $requisition->country_id = $request->country_id;\n $requisition->description = $request->description;\n $requisition->price = $request->price;\n $requisition->quantity = $request->quantity;\n $requisition->unit_id = $request->unit_id;\n $requisition->project_id = $request->project_id;\n $requisition->worker_id = $request->worker_id;\n $requisition->needed_date = Carbon::createFromFormat('d-m-Y', $request->needed_date);\n if (isset($request->approved_by)) {\n $requisition->approved_by = true;\n } else {\n $requisition->approved_by = false;\n }\n $requisition->generateRequisitionNumber();\n $requisition->save();\n return redirect()->route('requisition.index');\n }", "public function store()\n\t{\n\t\t$proyectoid = Input::get('proyectoid');\n\t\t$descripcion = Input::get('descripcion');\n\t\t$cantidad = Input::get('cantidad');\n\t\t$medidaid = Input::get('medidaid');\n\t\t\n\t\t$recurso = new Recurso();\n\t\t$recurso->proyectoid = $proyectoid;\n\t\t$recurso->descripcion = $descripcion;\n\t\t$recurso->cantidad = $cantidad;\n\t\t$recurso->medidaid = $medidaid;\n\t\t$recurso->save();\n\t\tSession::flash('message', 'Registro guardado satisfactoriamente!');\n\t\treturn Redirect::to('proyectos/'.$proyectoid.'/attribute');\n\t}", "public function store()\n {\n $this->validate([\n 'nome' => 'required',\n 'endereco' => 'required',\n 'data_nasc' => 'required',\n ]);\n\n Contato::where('pessoa_id', $this->pessoa_id)->delete();\n\n $pessoa = Pessoa::updateOrCreate(['id' => $this->pessoa_id], [\n 'nome' => $this->nome,\n 'endereco' => $this->endereco,\n 'data_nasc' => $this->data_nasc,\n 'user_id' => auth()->user()->id\n ]);\n\n foreach ($this->contatos as $value) {\n Contato::create(['tipo_contatos_id' => $value['nome'],\n 'valor' => $value['valor'],\n 'pessoa_id' => $pessoa->id\n ]);\n }\n\n\n session()->flash('message',\n $this->pessoa_id ? 'Usuário atualizado com sucesso.' : 'Usuário cadastrado com sucesso.');\n\n $this->closeModal();\n $this->resetInputFields();\n }", "public function store(CreateOcorrenciaRequest $request)\n {\n $input = $request->all();\n $id = Auth::user()->id;\n $corretor = Corretor::find($id)->get();\n $corretorId = $corretor[0]->id;\n $input['corretor_id'] = $corretorId;\n $input['prioridade'] = 0;\n $input['status'] = 0;\n\n $ocorrencia = $this->ocorrenciaRepository->create($input);\n\n Flash::success('Ocorrencia salvo com sucesso.');\n\n return redirect(route('ocorrencias.index'));\n }", "public function store(Request $request)\n {\n $partidofav=PartidoFavorito::create([\n 'user_id' =>$request['user_id'],\n 'partido_id' =>$request['partido_id'],\n 'partido_act' =>1,\n ]);\n $partidofav->save();\n }", "public function store(StoreLicitation $request)\n {\n //$this->authorize('create', Licitation::class);\n $input = $request->validated();\n \n Licitation::create($input); // Armazena a licitação\n \n return redirect('licitations')->with('status', 'licitation.created');\n }", "public function store(AdquisicionCreateRequest $request)\n {\n //\n \\Siropa\\Adquisicion::create([\n 'nombre_proyecto'=>$request['nombre_proyecto'],\n 'numero_proyecto'=>$request['numero_proyecto'],\n 'region'=>$request['region'],\n 'localidad'=>$request['localidad'],\n 'direccion'=>$request['direccion'],\n 'nombre_empresa'=>$request['nombre_empresa'],\n 'municipio_id'=>$request['municipio_id'],\n \n ]);\n Session::flash('message','Adquisición Creada Correctamente');\n return redirect('/adquisicion');\n }", "public function store(Request $request)\n {\n //\n if (isset(Auth::user()->id)){\n $id_user=Auth::user()->id;\n $user=User::find($id_user);\n\n $carrito=Carrito::where('user_id',$id_user)->first();\n if ($carrito) {\n $carrito->productos()->attach($request->id_producto);//crea el carrito al agregar el producto\n \n }else{\n $carrito= new Carrito;\n $carrito->estatus=0;\n $carrito->user_id=$id_user;\n $carrito->save();\n }\n\n return redirect('/carrito');\n }else{\n return redirect('/login');\n }\n }", "public function store(Request $request)\n {\n //\n $this->authorize('crear',new MateriaPrima());\n\t MateriaPrima::create([\n 'nombre' => $request['nombre'],\n 'existencia' => $request['existencia'],\n 'precio' => $request['precio'],\n \n ]);\n\n return redirect('/materiaprima')->with('message','store');\n }", "public function store(Request $request)\n {\n Gate::authorize('haveaccess','inscripciones-estudiante.store');\n $inscripcion = Inscripcion::create($request->all());\n $inscripcion->materias()->sync($request->get('materias'));\n $inscripcion->save();\n // if(Inscripcion::where('role_user_id','=',Auth::user()->id ) ){\n // }\n return redirect()->route('home')->with('status_success','Inscripcion creada de manera correcta'); \n }", "public function store(Request $request)\n {\n \n $tick= new Commandes([\n 'nom'=> $request->get('nom'),\n 'quantite'=> $request->get('quantite'),\n 'fournisseur_id'=> $request->get('fournisseur_id'),\n 'produit_id'=> $request->get('produit_id'),\n \n 'etat'=> $request->get('etat'),\n 'user_id'=> auth()->user()->id\n ]);\n if ($tick['etat'] ==\"on\"){\n $tick['etat']=1;\n }if ($tick['etat'] !=\"on\"){\n $tick['etat']=0; \n }\n \n $tick->save();\n if($tick->etat===1){\n $myRequest = new \\Illuminate\\Http\\Request();\n $myRequest=$request;\n $myRequest->request->add(['quantite_initial' => $request->get('quantite')]);\n $myRequest->request->add(['quantite_limite' => $request->get('quantite')]);\n $myRequest->request->add(['produit_id' => $request->get('produit_id')]);\n \n app('App\\Http\\Controllers\\StockController')->store($myRequest);\n\n}\n return redirect(route('commandes.index'));\n \n }", "public function store(CreateDistritoRequest $request)\n {\n $input = $request->all();\n\n $distrito = $this->distritoRepository->create($input);\n\n Flash::success('Distrito guardado correctamente.');\n\n return redirect(route('distritos.index'));\n }", "public function store(Request $request)\n {\n date_default_timezone_set(\"America/La_Paz\");\n $producto=Producto::create([\n 'idCategoria'=>request('idCategoria'),\n 'codigo'=>request('codigo'),\n 'nombre'=>request('nombre'),\n 'precioU'=>request('precioU'),\n 'precioM'=>request('precioM'),\n 'costoPromedio'=>request('costoPromedio'),\n 'descripcion'=>request('descripcion'),\n 'stock'=>0,\n ]);\n\n activity()->useLog('Producto')->log('Nuevo')->subject();\n $lastActivity=Activity::all()->last();\n $lastActivity->subject_id=Producto::all()->last()->id;\n $lastActivity->save();\n return redirect()->route('productos.index');\n }", "public function store(Request $request)\n {\n $request->validate([\n 'customer_id' => 'required',\n 'name_proyect' => 'required',\n 'delivery_place' => 'required',\n 'estimated_time' => 'required',\n 'definite_time'=> 'required',\n 'complexity' => 'required'\n ]);\n\n $pe = count(Ric::all()->where('status','=','1'))+1;\n $p = 'Pedido-'.date('y').'-'.$pe;\n\n $client = Ric::create([\n 'customer_id' => $request->customer_id,\n 'user_id' => auth()->user()->id,\n 'Npedido' => $p,\n 'name_proyect' => $request->name_proyect,\n 'complexity' => $request->complexity,\n 'status' => 1,\n 'delivery_place'=> $request->delivery_place,\n 'estimated_time' => $request->estimated_time,\n 'definite_time' => $request->definite_time\n ]);\n\n return redirect()->route('cotizacion.create')->with('alert',Helpers::alertData('success','','saveSuccess'));\n\n }", "public function store(CreateTipoTramiteRequest $request)\n {\n $input = $request->all();\n\n $tipoTramite = $this->tipoTramiteRepository->create($input);\n\n Flash::success('Tipo Tramite saved successfully.');\n\n return redirect(route('tipoTramites.index'));\n }", "public function store(createPreguntaCliente $request)\n\t{\n\n\t\t$input = $request->all();\n\t\t$input['usu_alta_id']=Auth::user()->id;\n\t\t$input['usu_mod_id']=Auth::user()->id;\n\n\t\t//create data\n\t\tPreguntaCliente::create( $input );\n\n\t\treturn redirect()->route('preguntaClientes.index')->with('message', 'Registro Creado.');\n\t}", "public function store(Request $request)\n {\n $difdayin = Carbon::parse($request->fecha_ini);\n $difdayout = Carbon::parse($request->fecha_term);\n $options = [\n 'rut' => auth()->user()->rut,\n 'nro_licencia' => $request->nro_licencia,\n 'fecha_desde' => $difdayin,\n 'fecha_hasta' => $difdayout,\n 'dias' => $request->dias,\n 'estado' => $request->estado\n\n\n ];\n\n\n $licencia = Licencia::create($options);\n return redirect()->route('licencia.index')\n ->with('info','Licencia ingresada con exito ');\n }", "public function store(Request $request)\n {\n \n //dd($request);\n $propostaItem = $request->all()['id_proposta'];\n $propostaItem = PropostaItem::find($request->id_proposta);\n $propostaItem->id_proposta = $request->id_proposta;\n $propostaItem->nm_tipo_servico = $request->nm_tipo_servico;\n $propostaItem->vlr_servico_item = $request->vlr_servico_item;\n $propostaItem->id_palestrante = $request->id_palestrante;\n $propostaItem->id_solicitante = $request->id_solicitante;\n $propostaItem->save(); \n\n $solicitante = $request->all()['id_solicitante'];\n //$solicitante->id = $request->id_solicitante;\n $solicitante->nm_solicitante = $request->nm_solicitante;\n $solicitante->save(); \n \n \n return redirect('dashboard/propostaItem/'.$id_proposta.'/edit');\n }", "public function store(CreateTipoInternamientoRequest $request)\n {\n //validar requerido y unico\n $this->validate($request, [\n 'descripcion'=>'required|unique:tipo_internamientos'\n ]);\n \n\n $input = $request->all();\n\n $tipoInternamiento = $this->tipoInternamientoRepository->create($input);\n\n Flash::success('Tipo Internamiento guardado correctamente.');\n\n return redirect(route('tipoInternamientos.index'));\n }", "public function store()\n\t{\n\t\t$this->transaction->save(Input::all());\n\t}", "public function store(StoreArticulo $request)\n {\n //dd($request->all());\n \n //dump($request->all());\n\n $input[\"titulo\"] =$request->inputTitulo;\n $input[\"fecha_creacion\"] =date('Y-m-d H:i:s');\n $input[\"estado\"] =$request->inputEstado;\n $input[\"descripcion\"] =$request->inputDescripcion;\n $input[\"cuerpo\"] =$request->inputCuerpo;\n $input[\"categoria_blog_id\"] =$request->inputCategoria;\n\n //dump($input);\n\n $articulo = Articulo::create($input);\n \n //$this->storeRecursos($request, $articulo);\n Session::put('articuloCreate', 'true');\n //return view(\"admin/articuloInfo\", compact('articulo'));\n return redirect()->route('recursoBlog.create', ['articulo' => $articulo->id]);\n\n \n }", "public function store(Request $request)\n {\n $notainscripcion = new Notainscripcion;\n $notainscripcion->fecha=$request->fecha;\n //$notainscripcion->id_tipoinscripcion=$request->id_tipoinscripcion;\n $notainscripcion->id_cliente=$request->id_cliente;\n $notainscripcion->save();\n }", "public function store()\n\t{\n\t\t$partido = new Partido();\n\t\t$partido->equipo_id = Input::get('equipo_id');\n\t\t$partido->torneo_id = Input::get('torneo_id');\n\t\t$partido->cancha_id = Input::get('cancha_id');\n\t\t$partido->dia = Input::get('dia');\n\t\t$partido->horario = Input::get('horario');\n\t\t$partido->fecha = Input::get('fecha');\n\t\t$partido->save();\n\t\treturn Redirect::to('admin/partido')\n\t\t->with('alert-notice', 'Se ha agregado correctamente el partido.');\n\t}", "public function store(Request $request)\n {\n $existe = DB::table('produtos')\n ->select('codigo')\n ->where('ativo', '1')\n ->where('codigo',$request->codigo)\n ->where('quantidade', '>', 0)\n ->exists();\n //dd($request->codigo);\n \n if($existe == true){\n\n $produtoId = DB::table('produtos')->select('id')->where('codigo', $request->codigo)->value('id');\n $produtoValor = DB::table('produtos')->select('valor')->where('codigo', $request->codigo)->value('valor');\n\n $venda = new Venda();\n $venda->produto_id = $produtoId;\n $venda->preco = $produtoValor;\n $venda->data_venda = date(\"Y-m-d H:i:s\");\n $venda->user_id = auth()->user()->id;\n $venda->cesta = 0;\n \n //decrementa uma unidade\n DB::table('produtos')->where('codigo', $request->codigo)->decrement('quantidade', 1);\n \n $venda->save();\n \n return back();\n }else{\n return redirect()->back()->with('alertDanger', 'Produto não encontrado!');\n }\n }", "public function store() {\n \n }", "public function store(CreateInscritoRequest $request)\n {\n $input = $request->all();\n\n $inscrito = $this->inscritoRepository->create($input);\n\n Flash::success('Inscrito saved successfully.');\n\n return redirect(route('inscritos.index'));\n }", "public function store(EntregaElementoProteccionRequest $request)\n {\n \n if($request['respuesta'] != 'falso')\n { \n \\App\\EntregaElementoProteccion::create([\n 'Tercero_idTercero' => $request['Tercero_idTercero'],\n 'fechaEntregaElementoProteccion' => $request['fechaEntregaElementoProteccion'],\n 'Compania_idCompania' => \\Session::get('idCompania')\n ]);\n\n $entregaelementoproteccion = \\App\\EntregaElementoProteccion::All()->last();\n \n // armamos una ruta para el archivo de imagen y volvemos a actualizar el registro\n // esto es porque la creamos con el ID del accidente y debiamos grabar primero para obtenerlo\n $ruta = 'entregaepp/firmaentregaepp_'.$entregaelementoproteccion->idEntregaElementoProteccion.'.png';\n $entregaelementoproteccion->firmaTerceroEntregaElementoProteccion = $ruta;\n\n $entregaelementoproteccion->save();\n\n //----------------------------\n // Guardamos la imagen de la firma como un archivo en disco\n if (isset($request['firmabase64']) and $request['firmabase64'] != '') \n {\n $data = $request['firmabase64'];\n\n list($type, $data) = explode(';', $data);\n list(, $data) = explode(',', $data);\n $data = base64_decode($data);\n\n file_put_contents('imagenes/'.$ruta, $data);\n }\n\n //----------------------------\n //---------------------------------\n // guardamos las tablas de detalle\n //---------------------------------\n $this->grabarDetalle($entregaelementoproteccion->idEntregaElementoProteccion, $request);\n\n return redirect('/entregaelementoproteccion'); \n }\n }", "public function store(ArticuloRequest $request, Articulo $articulo)\n {\n\n \n $articulo= new Articulo;\n $articulo->create($request->all());\n }", "public function store()\r\n\t\t{\r\n\t\t\t//\r\n\t\t}", "public function store(Request $request)\n {\n $this->validate($request, \n [\n 'fkEstudiante' => 'required', \n ]);\n\n //Prestamo::create($request->all());\n $datos = $request->all();\n $datos += ['fecha' => new \\DateTime()];\n $datos += ['estado' => 'Prestado'];\n\n //dd($datos);\n Prestamo::create($datos);\n\n Session::flash('message', 'Prestamo registrado correctamente!');\n Session::flash('status', 'success');\n\n return redirect('listamateriales');\n }", "public function store(Request $request)\n {\n request()->validate([\n 'item_id' => 'required|integer',\n 'category' => 'required|integer',\n 'name' => 'required|string|max:255'\n ]);\n $quizoItem = new QuizoItem;\n $quizoItem->user_id = request('item_id');\n $quizoItem->level = request('category');\n $quizoItem->progress = request('name');\n\n $quizoItem->save();\n\n\n return new QuizoItemResource($quizoItem);\n }", "public function store(Request $request)\n {\n //\n if(Auth::check()){\n $proveedor = Supplier::create([\n 'id_nit'=> $request->input('id_nit'),\n 'razon_social'=> $request->input('razon_social'),\n 'descripcion'=> $request->input('descripcion'),\n 'rep_nombre'=> $request->input('rep_nombre'),\n 'rep_nombre_2'=> $request->input('rep_nombre_2'),\n 'rep_apellido'=> $request->input('rep_apellido'),\n 'rep_apellido_2'=> $request->input('rep_apellido_2'),\n 'sitio_web'=> $request->input('sitio_web'),\n 'telefono'=> $request->input('telefono'),\n 'direccion'=> $request->input('direccion'),\n 'ciudad'=> $request->input('ciudad'),\n 'calificacion'=> $request->input('calificacion'),\n 'user_id' => Auth::id()\n ]);\n if($proveedor){\n return redirect()->route('proveedores.show', ['proveedor'=> $proveedor->id])\n ->with('success' , 'Proveedor creado exitosamente');\n }\n }\n\n return back()->withInput()->with('errors', 'Error al crear nuevo proveedor');\n\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n\t\t\t'nom' => 'required',\n\t\t]);\n $requestData = $request->all();\n $id = Auth::id();\n\n $requestData[\"user_id\"]=$id;\n \n \n Produit::create($requestData);\n\n return redirect('admin/produit')->with('flash_message', 'Produit added!');\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'referencia' => 'required|unique:produtos|min:3', //campo unico no banco\n 'titulo' => 'required|min:3',\n ]);\n\n $produto = new Produto();\n $produto->referencia = $request->input('referencia');\n $produto->titulo = $request->input('titulo');\n $produto->descricao = $request->input('descricao');\n $produto->preco = $request->input('preco');\n if ($produto->save()) {\n Session::flash('mensagem', 'Produto inserido com sucesso!');\n return redirect('produtos');\n }\n }", "public function store(Request $request)\n {\n \n $recorrido = new Recorrido();\n $recorrido->provincia_O = $request ->provincia_O;\n $recorrido->provincia_D = $request ->provincia_D;\n $recorrido->canton_O = $request ->canton_O;\n $recorrido->canton_D = $request ->canton_D;\n $recorrido->direccion_O = $request ->direccion_O;\n $recorrido->direccion_D = $request ->direccion_D;\n $recorrido->save();\n \n }", "public function store(StockCreteRequest $request)\n {\n $productPrice = Product::select(['sellingPrice', 'buyingPrice'])->where('id', $request->productId)->first();\n $request->merge([\n 'transactionNumber' => Str::orderedUuid()->toString(),\n 'sumProductCount' => $request->quantity,\n 'sumTradingVolume' => (doubleval($request->quantity) * doubleval($request->inOrOut === 'out' ? $productPrice->sellingPrice : $productPrice->buyingPrice)),\n 'inOrOut' => $request->inOrOut === 'out' ? 0 : 1,\n ]);\n try {\n Stock::create($request->post());\n toastr('Stok işlemi bir şekilde eklendi.', 'success');\n return redirect()->route('stok.index');\n }catch (Exception $ex){\n toastr('Stok işlemi yapılamadı.', 'success');\n return redirect()->route('urunler.index');\n }\n }", "public function store(Request $request)\n {\n //$instituicao = Instituicao::findOrFail($request->input('instituicao_id'));\n $professor = new Professor;\n //$professor->instituicao_id = Instituicao::fist()->id;//aponta a primeira instituição cadastrada no banco.\n //$professor->instituicao_id = $instituicao->id;\n $professor->instituicao_id = $request->session()->get('instituicao_id');\n $professor->nome = $request->input('nome');\n $professor->matricula = $request->input('matricula');\n $professor->telefone = $request->input('telefone');\n $professor->whatsapp = $request->input('whatsapp');\n $professor->email = $request->input('email');\n //dd($professor);\n \n $professor->save();\n $request->session()->flash('success', 'Professor cadastrado com sucesso');\n return redirect()->route('professores.index');\n }", "public function store(CreateMantenimientoRequest $request)\n {\n $input = $request->all();\n \n $mantenimiento = $this->mantenimientoRepository->create($input);\n if(!empty($input['cite'])){\n //cites\n $gestion = Gestion::find(1);\n $cite = new Cite;\n $cite->gestion_id=$gestion->gestion;\n $cite->mantenimiento_id=$mantenimiento->id;\n $cite->save();\n $cites = cite::find($cite->id-1); \n if ($cites->cite == null) \n {\n $cite->cite=1;\n $cite->save();\n }\n else\n { \n $dato=$cites->cite;\n $cite->cite=$dato+1;\n $cite->save();\n }\n }\n Flash::success('MANTENIMIENTO REALIZADO CORRECTAMENTE.');\n\n return redirect(route('mantenimientos.index'));\n }", "public function store(Request $request)\n {\n //\n //\n $this->validate($request, [\n 'radicacion' => 'required|min:9|max:11',\n 'juzgado' => 'required',\n ]);\n\n $rad = $request->get('radicacion');\n $juzgado = $request->get('juzgado');\n\n $proceso = Proceso::where('procesos.radicacion','=',$rad)\n ->where('procesos.juzgado','=',$juzgado)\n ->first(); \n\n if($proceso == null){\n\n $id = auth()->user()->id;\n $user = User::where('users.id','=',$id)->firstOrFail();\n\n $proceso = new Proceso(array(\n 'radicacion'=>$rad, \n 'juzgado'=>$juzgado,\n ));\n \n $proceso->save();\n $proceso->users()->save($user);\n return redirect('/misprocesos/agregarproceso')->with('status','Proceso agragado correctamente, revisalo en la lista de tus procesos');\n }else{\n return view('agregarmisprocesos',compact('proceso'));\n }\n\n \n }", "public function store(PartidaRequest $request)\n {\n $partida = $request->all();\n Partida::create($partida);\n return redirect()->route('list_partidas')->with('message', ['success', 'Partida Registrado Correctamente!']);\n }", "public function store(Request $request, Requisicao $requisicao, $novo = null)\n {\n $this->validate($request, [\n 'quantidade' => 'required|integer',\n 'codigo' => 'nullable|integer',\n 'objeto' => 'required|string|max:300',\n 'descricao' => 'required|string',\n 'unidade' => 'required|string|exists:unidades,uuid',\n ]);\n\n $return = $this->service->store($request->all(), $requisicao);\n if ($return['status']) {\n if ($novo){ // se verdaderio retorna o formulário para cadastrar novo item\n return redirect()->route('item.create', $requisicao->uuid)\n ->with(['codigo' => 200,'mensagem' => 'O item '.$return['data']->numero.' foi cadastrado com sucesso!']);\n }\n return redirect()->route('requisicao.show', $requisicao->uuid)\n ->with(['codigo' => 200,'mensagem' => 'O item '.$return['data']->numero.' foi cadastrado com sucesso!']);\n } else {\n return redirect()->route('requisicao.show', $requisicao->uuid)\n ->with(['codigo' => 500, 'mensagem' => 'Ocorreu um error durante o cadastro, tente novamente ou contate o administrador!']);\n }\n }", "public function store()\n {\n $data = array('project_name' => $this->project_name, \n 'configuration' => $this->configuration,\n 'attribute' => $this->attribute,\n 'job_id' => $this->job_id,\n 'hash' => $this->hash,\n 'time' => $this->timestamp\n );\n DB::table($this->table)->insert($data);\n }", "public function store(Request $request)\n {\n //\n $Producto = new Producto;\n $Producto -> id = $request -> get('id');\n $Producto -> negocios_id = $request -> get('negocios_id');\n $Producto -> Categoria = $request -> get('Categoria');\n $Producto -> modelos_id = $request -> get('modelos_id');\n $Producto -> tipo_reparacions_id = $request -> get('tipo_reparacions_id');\n $Producto -> Descripcion2 = $request -> get('Descripcion2');\n $Producto -> Stock = $request -> get('Stock');\n $Producto -> Precio = $request -> get('Precio');\n $Producto -> estado ='Activo';\n\n $Producto->save();\n\n\n\n\n return redirect('Producto');\n }", "public function store(Request $request)\n {\n //\n \n $datosFactura = request()->with('contratos_id','estados_id','nombreFactura' ,'numeroFactura' ,'periodo' ,'importe' ,'fechaContrato' ,'datosEmpresa' );\n $contrato= request()->with('id', 'planes_id', 'estados_id', 'sitios_id', 'nombreContrato', 'descripcionContrato', 'periodo', 'fechaContrato', 'fechasPago', 'periodosPago');\n\n $factura = (new Factura)->create($datosFactura);\n\n Contrato::create($contrato);\n \n }", "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()\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(CreateproyectosRequest $request)\n {\n $input = $request->all();\n\n /*$rules = [\n 'fechas' => 'regex: '\n ];\n $this->validate($request, $rules);\n */\n $findstring = \":\";\n $pos = strpos($input['fechas'],$findstring);\n $finicio = substr($input['fechas'], 0, 10);\n $ftermino = substr($input['fechas'], $pos+2, 10);\n $input['finicio'] = date('Y-m-d', strtotime($finicio));\n $input['ftermino'] = date('Y-m-d', strtotime($ftermino));\n\n //dd($input);\n $proyectos = $this->proyectosRepository->create($input);\n\n if(isset($input['documento'])){\n //guardar el documento\n $documento = new documentos;\n\n //$documento->nombre_doc = $request->file('documento')->store('documentos');\n $doc = $request->file('documento')->store('documentos');\n\n $documento->file_servidor = $doc;\n $documento->nombre_doc = $request->file('documento')->getClientOriginalName();\n $documento->descripcion = 'Documento correspondiente al proyecto: '.$request->input('nombre');\n $documento->user_id = Auth::user()->id;\n $documento->categoria_id = 1;\n $documento->save();\n //hacer la referencia muchos a muchos\n $proyectos->documentos()->attach($documento);\n }\n\n\n Flash::success('Proyecto guardado correctamente.');\n Alert::success('Proyecto guardado correctamente.');\n\n //return redirect(route('proyectos.index'));\n return redirect(route('proyectos.show', [$proyectos->id]));\n }", "public function store()\n\t{\n\t\t$fbf_historico_goleiro = new FbfHistoricoGoleiro;\n\t\t$fbf_historico_goleiro->id = Input::get('id');\n$fbf_historico_goleiro->idatleta = Input::get('idatleta');\n$fbf_historico_goleiro->gols_sofridos = Input::get('gols_sofridos');\n$fbf_historico_goleiro->gols_marcados = Input::get('gols_marcados');\n$fbf_historico_goleiro->cartaovermelho = Input::get('cartaovermelho');\n$fbf_historico_goleiro->cartaoazil = Input::get('cartaoazil');\n$fbf_historico_goleiro->cartaoamarelo = Input::get('cartaoamarelo');\n$fbf_historico_goleiro->jogos = Input::get('jogos');\n$fbf_historico_goleiro->titulos = Input::get('titulos');\n\n\t\t$fbf_historico_goleiro->save();\n\n\t\t// redirect\n\t\tSession::flash('message', 'Registro cadastrado com sucesso!');\n\t\treturn Redirect::to('fbf_historico_goleiro');\n\t}", "public function store(Request $request)\n {\n /*$articulos = new Articulo();\n $articulos->codigo = $request->get('codigo');\n $articulos->descripcion = $request->get('descripcion');\n $articulos->cantidad = $request->get('cantidad');\n $articulos->precio = $request->get('precio');\n*/\n /* $articulos->save();*/\n $DNI = $request->get('DNI');\n $nombres = $request->get('nombres');\n $apellidos = $request->get('apellidos');\n $fechadenacimiento = $request->get('fechadenacimiento');\n $localidad = $request->get('localidad');\n $telefono = $request->get('telefono');\n\n DB::insert('insert into estudiantes (DNI, nombres, apellidos, fechadenacimiento, localidad, telefono) values (?, ?, ?, ?, ?, ?)',[$DNI, $nombres, $apellidos, $fechadenacimiento, $localidad, $telefono]);\n return redirect('/estudiantes');\n }", "public function store()\n\t{\n\t\treturn $this->crear();\n\t}", "public function store(Request $request)\n {\n $this->validate($request,[\n 'nombre'=>'required',\n 'rut'=>'required',\n 'lugar_trabajo'=>'required',\n 'anio_titulacion'=>'required',\n 'carrera'=>'required'\n ]);\n $titulado=new Titulado;\n $titulado->nombre=$request->input('nombre');\n $titulado->rut=$request->input('rut');\n $titulado->telefono=$request->input('telefono');\n $titulado->correo=$request->input('correo');\n $titulado->empresa=$request->input('empresa');\n $titulado->lugar_trabajo=$request->input('lugar_trabajo');\n $titulado->anio_titulacion=$request->input('anio_titulacion');\n $titulado->carrera=$request->input('carrera');\n $titulado->indicadorid=3;\n $titulado->save();\n\n $registro=Registro::find(1);\n $registro->cantidad_de_titulados=Titulado::all()->count();\n $registro->save();\n $this->loadData(3,1);\n return redirect('/regitro_titulados')->with('success','Se ha registrado correctamente.');\n }", "public function store(Request $request)\n {\n $produtos = Produto::all();\n $clientes = Cliente::all();\n $funcionarios = Funcionario::all();\n\n $servico = new Servico();\n $servico->id_cliente = $request->id_cliente;\n $servico->nome_cliente = ($clientes->find($request->id_cliente))->nome;\n $servico->id_produto = $request->id_produto;\n $servico->tipo_produto = ($produtos->find($request->id_produto))->tipo;\n $servico->quantidade = $request->quantidade;\n $servico->id_funcionario = $request->id_funcionario;\n $servico->nome_funcionario = ($funcionarios->find($request->id_funcionario))->nome;\n $servico->prazo = $request->prazo;\n $servico->preco_total = $request->preco_total;\n $servico->data_abertura = date($request->data_abertura);\n\n $servico->save();\n return redirect()->route('servicos.index');\n\n }", "public function store()\n {\n // aqui fazemos as validações dos dados\n $this->validate([\n 'nome' => 'required|unique:categorias',\n 'descricao' => 'required',\n ]);\n // aqui o metodo cria um novo ou altera se existir\n Categoria::updateOrCreate(['id' => $this->categoria_id], [\n 'nome' => $this->nome,\n 'descricao' => $this->descricao,\n ]);\n // mensagem dizendo que foi editado ou criado um novo registro\n session()->flash('message',\n $this->categoria_id ? 'Categoria Atulizada com Sucesso.' : 'Categoria Criada com Sucesso.');\n\n $this->closeModal();\n $this->resetInputFields();\n }", "public function store(Request $request)\n {\n $request->validate([\n 'comprobante'=> 'required',\n 'fecha_emision'=> 'required',\n 'profesional'=> 'required',\n 'importe'=> 'required'\n ]);\n\n try{\n $cliente = Cliente::where('email', Auth::user()->email)->get()[0];\n $reintegro = new Reintegro();\n $reintegro->id_cliente = $cliente->id;\n $reintegro->fecha_solicitud = date(Carbon::now()->format('Y-m-d'));\n $reintegro->comprobante_factura = $request->comprobante;\n $reintegro->fecha_emision = date(Carbon::parse($request->fecha_emision)->format('Y-m-d'));\n $reintegro->nombre_profesional = $request->profesional;\n $reintegro->importe_facturado = $request->importe;\n $reintegro->estado = 'PENDIENTE';\n $reintegro->save();\n return redirect()->route('welcome')->with('mensaje','Cargado exitosamente');\n }\n catch(Exception $e){\n return redirect()->back()->with('error',$e->getMessage());\n }\n }", "public function store() {\n\n $tratamiento = new Tratamientos;\n $tratamiento->nombre = Input::get('nombre');\n $tratamiento->codigo = Input::get('codigo');\n $tratamiento->grupostratamientos_id = Input::get('grupostratamientos_id');\n $tratamiento->tipostratamientos_id = Input::get('tipotratamiento');\n $tratamiento->activo = Input::get('activo', 1);\n $tratamiento->imagen = Input::get('imagen_id');\n $tratamiento->quirofano = Input::get('quirofano', 0);\n $tratamiento->historiable = Input::get('historiable', 0);\n $tratamiento->save();\n\n $companias = Companias::all();\n foreach ($companias as $compania) {\n if (Input::has('cid-' . $compania->id)) {\n $input_compania = Input::get('cid-' . $compania->id);\n $input_precio = Input::get('precio-' . $compania->id);\n\n if ($input_precio == '')\n $input_precio = NULL;\n\n $input_precio = str_replace('.', '', $input_precio);\n $input_precio = str_replace(',', '.', $input_precio);\n $pt = array('precio' => $input_precio);\n $tratamiento->precios()->attach($input_compania, $pt);\n }\n }\n\n return Redirect::action('TratamientosController@index')->with('message', '¡Tratamiento guardado con éxito!');\n //return Redirect::action('TratamientosController@edit', $tratamiento->id);\n }", "public function store(CreateConsultanteRequest $request)\n {\n //return $request->all();\n $listaconsultantes = \\App\\Consultante_biblioteca::create( $request->all() );\n $listaconsultantes->perfiles()->attach($request->perfiles);\n\n \n $listaconsultantes->roles()->attach(4);//asigna el rol estudiante por defecto al crear un consultante\n\n return redirect()->route('consultantes.index', compact('listaconsultantes'));\n }", "public function storeNew(Request $request)\n { \n $validation = $request->validate([\n 'nombre' => 'required|string|max:250',\n 'apellido' => 'required|string|max:250',\n 'dni' => 'required|numeric',\n\n 'fechaNacimiento' => 'nullable|date',\n 'observaciones' => 'nullable|string',\n ]);\n \n $asistido=new Asistido($request->all());\n \n $asistido->createdBy=Auth::user()->id;\n $asistido->owner = Auth::user()->id;\n $asistido->user_id = Auth::user()->id;\n\n if (isset($request->comunidad_id)) {\n \n $comunidad=Comunidad::find($request->comunidad_id);\n $comunidad->asistidos()->save($asistido);\n /* Alerto a la comunidad del alta de un nuevo asistido*/\n if (isset($comunidad->users) && count($comunidad->users) > 0){\n foreach ($comunidad->users as $notificar) {\n $notificar->notify(new altaAsistidoComunidad($asistido)); \n }\n }\n }\n \n $asistido->save();\n return redirect()->route('asistido.list');\n }", "public function store(Request $request)\n {\n $produtoestoque = new ProdutoEstoque($request->all());\n if ($produtoestoque->save()) {\n return redirect()->route('produtoestoque.index')->with('message', 'Vendedor criado com sucesso!');\n } else {\n return redirect()->route('produtoestoque.index')->with('message', 'Erro na criação do vendedor!');\n }\n\n }", "public function store(Request $request)\n {\n\n if (!$request->produto_id) {\n return response()->json([\"Erro\" => \"Requisição invalida\"]);\n }\n\n $prod = Produtos::all()->where('id', $request->produto_id)->count();\n\n if ($prod > 0) {\n $userId = auth()->user()->id;\n\n $checkCarinho = Carrinho::all()->where('user_id', $userId)->where('produto_id', $request->produto_id)->first();\n\n if ($checkCarinho) {\n\n $quantidade = $checkCarinho->quantidade;\n\n $checkCarinho->update(['quantidade' => $quantidade]);\n\n return response()->json([\"success\" => \"Mais uma unidade adicionada ao carrinho\"]);\n } else {\n\n Carrinho::create([\n 'user_id' => $userId,\n 'produto_id' => $request->produto_id,\n 'quantidade' => 1,\n\n\n ]);\n\n return response()->json([\"success\" => \"Produto adicionado no carrinho\"]);\n }\n } else {\n\n return response()->json([\n \"error\" => \"Produto não cadastrado na base\",\n \"product_id\" => \"ID Invalido\",\n \"mesage\" => \"Não é possivel adicionar no carrinho\"\n ], 401);\n }\n //\n }", "public function store(Requests\\CreateRutaRequest $request)\n {\n $request->request->add(['IdProyecto' => $request->session()->get('id')]);\n $request->request->add(['usuario_registro' => auth()->user()->idusuario]);\n\n $ruta = Ruta::create($request->all());\n \n $cronometria = new Cronometria();\n $cronometria->IdRuta = $ruta->IdRuta;\n $cronometria->TiempoMinimo = $request->get('TiempoMinimo');\n $cronometria->Tolerancia = $request->get('Tolerancia');\n $cronometria->FechaAlta = Carbon::now()->toDateString();\n $cronometria->HoraAlta = Carbon::now()->toTimeString();\n $cronometria->Registra = auth()->user()->idusuario;\n $cronometria->save();\n \n if($request->hasFile('Croquis')) {\n $croquis = $request->file('Croquis');\n $archivo = new ArchivoRuta();\n $nombre = $archivo->creaNombre($croquis, $ruta);\n $croquis->move($archivo->baseDir(), $nombre);\n $archivo->IdRuta = $ruta->IdRuta;\n $archivo->Tipo = $croquis->getClientMimeType();\n $archivo->Ruta = $archivo->baseDir().'/'.$nombre;\n $archivo->save();\n }\n\n Flash::success('¡RUTA REGISTRADA CORRECTAMENTE!');\n return redirect()->route('rutas.index');\n }", "public function store(Request $request)\n {\n $estudiante = Estudiante::where('cedula', $request->input('cedula'))->first();\n if(! $estudiante)\n {\n return redirect::route('inscripciones.create')\n ->with('error-message', 'El estudiante no está registrado');\n }\n\n $inscrito = Inscripcion::where('estudiante_id', $estudiante->id)\n ->where('escolaridad_id', $request->input('escolaridad_id'))\n ->first();\n\n if($inscrito)\n {\n return redirect::route('inscripciones.create')\n ->with('error-message', 'El Estudiante se encuentra inscrito en la escolaridad actual');\n }\n\n //OBTENGO E INVIERTO EL REPRESENTANTE\n $representante = $estudiante->representantes->reverse();\n $request['estudiante_id'] = $estudiante->id;\n //dd($representante[0]->id);\n $request['representante_id'] = $representante[0]->id;\n $inscripcion = new Inscripcion($request->all());\n $inscripcion->save();\n return redirect::route('estudiante.inscripciones', $estudiante->id);\n }", "public function store(Request $request) {\n\n\t\tValidator::make($request->all(), [\n\t\t\t'rif' => 'required',\n\t\t\t'nombre' => 'required',\n\t\t\t'apellido' => 'required',\n\t\t\t'celular' => 'required',\n\t\t\t'telefono' => 'required',\n\t\t\t'email' => 'required',\n\t\t\t'direccion' => 'required',\n\t\t])->validate();\n\n\t\t$propietarios = new Propietarios();\n\t\t$propietarios->rif = $request->rif;\n\t\t$propietarios->nombre = $request->nombre;\n\t\t$propietarios->apellido = $request->apellido;\n\t\t$propietarios->celular = $request->celular;\n\t\t$propietarios->telefono = $request->telefono;\n\t\t$propietarios->email = $request->email;\n\t\t$propietarios->direccion = $request->direccion;\n\t\t$propietarios->status = 'activo';\n\t\t$propietarios->save();\n\n\t\t$permiso = new PermisosController;\n\t\t$permiso->bitacora('Registró un propietario Rif: ' . $request->rif . '');\n\n\t\treturn redirect('/listprop')->with('message', 'El propietario ha sido guardado exitosamente!');\n\t}", "public function store(Request $request)\n {\n abort_unless(AuthController::currentUserHasPermission('sucursal_producto.guardar'), 403);\n DB::beginTransaction();\n try {\n $idsucursal = AuthController::getIdSucursalOfCurrentUser();\n $request->request->add(['fkidsucursal' => $idsucursal]);\n if (SucursalProducto::where('fkidsucursal', $idsucursal)->where('fkidproducto', $request->fkidproducto)->count() > 0)\n return response([\"data\" => null, 'message' => MessageResponse::REPEAT_PRODUCT], Response::HTTP_INTERNAL_SERVER_ERROR);\n $sucursalProducto = SucursalProducto::create($request->all());\n DB::commit();\n return response([\"data\" => $sucursalProducto, 'message' => MessageResponse::SAVE_OKEY], Response::HTTP_OK);\n } catch (\\Throwable $th) {\n DB::rollback();\n return response([\"message\" => MessageException::DB_SAVEDATA], Response::HTTP_INTERNAL_SERVER_ERROR);\n }\n }", "public function store(StoreTrabajoRequest $request)\n {\n $trabajo = new Trabajo();\n $trabajo->descripcion = $request->descripcion;\n $trabajo->empresa = $request->empresa;\n $rut = preg_replace('/[^k0-9]/i', '', $request->rut);\n $trabajo->rut = substr($rut, 0, strlen($rut)-1);\n if (!empty($request->activar) && $request->activar == 1) {\n $trabajo->estado = 1;\n $fecha = new \\DateTime();\n $trabajo->fecha_inicio = $fecha->format('Y-m-d H:i:s');\n } else {\n $trabajo->estado = 0;\n }\n $trabajo->save();\n return redirect('/')->with('status', '¡Trabajo creado con éxito!');\n }", "public function store(OrdemServicoRequest $request)\n {\n $ordem_servico = new OrdemServico();\n \n $dados = $request->except(['_token', 'cliente_select']);\n $dados['inicio'] = date('Y-m-d H:i:s', time());\n $dados['preco'] = 00;\n $dados['status'] = 1;\n\n //print_r($dados);\n //fazendo pelo eloquent ordem_servico->create($dados) não funcionou\n $id = DB::table('ordem_servicos')->insertGetId($dados);\n \n return redirect()->route('ordemServico.edit', ['ordemServico'=>$id]); \n }", "public function store(Request $request){\n // si necesitamos algo que no esté en nuestro formulario tenemos\n // que hacer un merge sobre el formulario\n // $request->merge([\n // 'recibido' => \\Carbon\\Carbon::now()->toDateString();\n // ]);\n // y se le agrega algo que no tenia y ya no te marcaria error\n $producto = new Producto;\n\n $producto = $request->input('');\n $producto = $request->input('');\n\n Storage::disk('local')->put('file.txt', 'Contents');\n Documento::create($request->all());\n\n $producto->save();\n }", "public function store(Request $request)\n {\n $now = new Datetime('now');\n $ticket= new Abono();\n $ticket->id_prestamo =$request->prestamo;\n $ticket->tipo =$request->tipo;\n $ticket->valor =$request->valor;\n $ticket->id_partner =Auth::user()->partner_id;\n $ticket->created_at = $request->fecha;\n $ticket->save();\n if($ticket->tipo == 2 ){\n $prestamo = Prestamo::find($request->prestamo);\n $prestamo->estado = 2;\n $prestamo->save();\n }\n\n return 'exito';\n }", "public function Save()\n {\n $required = array(\n \"items\" => \"Itens\",\n \"customer\" => \"Dados do comprador\"\n );\n $this->validateData($required);\n parent::Save();\n }", "public function store(Request $request)\n {\n //\n\n\n\n\n\n Proveedor::create([\n 'id_tipo_medio'=>request('id_tipo_medio'),\n 'razon_social'=>request('razon_social'),\n 'representante'=>request('representante'),\n 'cargo'=>request('cargo'),\n 'escritura'=>request('escritura'),\n 'objeto_social'=>request('objeto_social'),\n 'acreditacion_social'=>request('acreditacion_social'),\n 'INE'=>request('INE'),\n 'fecha_sat'=>request('fecha_sat'),\n 'RFC'=>request('RFC'),\n 'PPAPE'=>request('PPAPE'),\n 'domicilio'=>request('domicilio'),\n 'Proveedores_col'=>request('Proveedores_col'),\n\n\n ]);\n return redirect()->route('ruta.listadifucionproveedores');\n\n\n\n }", "public function store(Request $request)\n {\n // $validated = $request->validate([\n // 'email' => 'required',\n // 'nome' => 'required',\n // ]);\n\n $random = Str::random(9);\n $user = auth()->guard('consultor')->user()->id;\n $dados = $request->all();\n \n $comprador = Comprador::create([\n 'user_id' => $user,\n 'name' => $dados['name'],\n 'lastname' => 'coletivo',\n 'telemovel' => $request->telemovel,\n 'email' => $request->email,\n 'password' => Hash::make($random),\n 'codigo' => $random,\n 'type' => 'coletivo',\n ]);\n\n $save = BuyerColective::create([\n 'comprador_id' => $comprador->id,\n 'morada' => $request->morada,\n 'nif' => $request->nif,\n 'contato' => $request->contato,\n 'telefone' => $request->telefone,\n 'telemovel_empresa' => $request->telemovel_empresa,\n 'tipo' => $request->tipo,\n ]);\n\n\n\n return redirect()->route('consultor')->with('success', 'Comprador criado com sucesso!');\n }", "public function store()\n\t{\n\t\t$input = Input::except(array_keys($this->relationships)); // Less safe, more convenient\n\t\t//$input = Input::only(array_keys($this->resource->getFillableLabels())); //More safe, less convenient\n\t\t$this->resource = $this->resource->fill($input);\n\n\t\treturn $this->persist(__FUNCTION__);\n\t}", "public function store(Request $request)\n {\n $request->validate([\n 'fecha_inicio' => ['required', 'date'],\n 'fecha_termino' => ['required', 'date'],\n 'objetivo'=> ['required', 'string', 'max:255'],\n 'dias_c_pernoctar'=> ['required', 'string','max:2'],\n 'dias_s_pernoctar'=> ['required', 'string','max:2'],\n 'tipo_transporte_ida' => ['required', 'integer'],\n 'tipo_transporte_regreso' => ['required', 'integer'],\n 'item_presupuestario_id'=> ['required', 'integer'],\n 'user_jefe_id'=> ['required', 'integer'],\n \n ],\n [\n 'required' => 'Este campo no puede quedar Vacio',\n \n ]);\n $cometido = Cometido::create([\n 'fecha_inicio' => $request['fecha_inicio'],\n 'fecha_termino' => $request['fecha_termino'],\n\n 'objetivo' => $request['objetivo'],\n\n 'dias_c_pernoctar' => $request['dias_c_pernoctar'],\n 'dias_s_pernoctar' => $request['dias_s_pernoctar'],\n 'direccion' => $request['direccion'],\n 'tipo_transporte_ida' => $request['tipo_transporte_ida'],\n 'tipo_transporte_regreso' => $request['tipo_transporte_regreso'],\n 'item_presupuestario_id' => $request['item_presupuestario_id'],\n 'user_jefe_id' => $request['user_jefe_id'],\n 'fecha_emicion' => Carbon::now(),\n\n 'progreso' => 'Solicitud Ingresada',\n\n 'user_solicita_id' => Auth::user()->id,\n ]);\n \n return view('admin.cometido.localidad', compact('cometido'));\n }", "public function store(Request $request)\n {\n\n\n $catalogo1 = new CatalogoTramite;\n $catalogo1->idDependencia = $request->input('idDependencia');\n $catalogo1->nombreCatalogo = $request->input('nombreCatalogo');\n $catalogo1->numeroDocumentos= $request->input('numeroDocumentos');\n $catalogo1->descripcionCatalogo= $request->input('descripcionCatalogo');\n $catalogo1->save();\n\n $numero=$catalogo1;\n\n return view('Cruds.catalogotramite.createD',compact('numero'));\n\n\n }", "public function store()\n\t{\n\t\treturn $this->save('create');\n\t}", "public function store(ArticulosRequest $request)\n {\n $articulo = new Articulos();\n\n $articulo->id_categoria = $request->categoria;\n $articulo->codigo = $request->codigo;\n $articulo->nombre = $request->articulo;\n $articulo->precio_venta = $request->precio_venta;\n $articulo->stock = $request->stock;\n $articulo->descripcion = $request->descripcion;\n $articulo->save(); \n\n\n return redirect()->route('articulos.index')->with('mensaje','Artículo registrado con éxito');\n }", "public function store(Request $request)\n {\n $request->validate([\n 'name' => 'required',\n 'prixu'=>'required',\n 'taxe'=>'required',\n 'Reference' => 'nullable',\n 'categorie_id' => 'nullable'\n \n ]);\n \n Produit::create([\n 'name' => $request->name,\n 'Reference' => $request->Reference,\n 'prixu'=>$request->prixu,\n 'taxe'=>$request->taxe,\n 'categorie_id' => $request->categorie_id,\n \n ]);\n return redirect()->route('produits.index')\n ->with('success','Produit ajouté avec success.');\n\n\n }", "public function store()\n {\n $this->authorize('create',Order::class);\n \n $this->plan=$this->getPlan($this->phone,$this->cost);\n\n $this->validate([\n 'user_id'=>'required',\n 'phone_id'=>'required',\n 'plan'=>'required|boolean',\n 'cost'=>'required|numeric'\n ]);\n\n $newOrder = Order::create([\n 'user_id'=>$this->user_id,\n 'phone_id'=>$this->phone_id,\n 'plan'=>$this->plan,\n 'cost'=>$this->cost\n ]);\n $newOrder->save();\n\n session()->flash('message','Order Made');\n \n $this->closeForm();\n }", "public function store(Request $request)\n {\n\n $produto = new Produto();\n $produto->nome = $request->nome;\n $produto->preco = $request->preco;\n $produto->estoque = $request->estoque;\n $produto->marca_id = $request->marca;\n $produto->save();\n\n return redirect()->route('produtos.index')\n ->with('msg_success', 'Produto criado com sucesso.');\n \n \n }", "public function store(LicenciaEmpresaRequest $request)\n\t{\n\t\t$this->authorize(\"create\", LicenciaEmpresa::class);\n\n\t\t$usuario = \\Auth::user();\n\t\t$addInfo = [\n\t\t\t\"IdEnlaceMunicipal\" => $usuario->enlace->id,\n\t\t\t\"IdUsuario\" => $usuario->id,\n\t\t\t\"MesConcluido\" => 0,\n\t\t];\n\n\t\tLicenciaEmpresa::create(array_merge($request->all(), $addInfo));\n\t\treturn response()->json([\"message\" => \"Registro agregado\"], 201);\n\t}", "public function store();", "public function store(Createtipo_de_servicioRequest $request)\n {\n $input = $request->all();\n\n $tipoDeServicio = $this->tipoDeServicioRepository->create($input);\n\n Flash::success('Tipo De Servicio saved successfully.');\n\n return redirect(route('tipoDeServicios.index'));\n }", "public function store(Request $request)\n {\n\n\n if(!is_null($request->analisis)){\n foreach ($request->analisis as $key => $value) {\n $ana = Analisis::where('id','=',$value)->first();\n $solicitud = new Solicitudes();\n $solicitud->paciente =$request->paciente;\n $solicitud->observacion =$request->observacion;\n $solicitud->hora =$request->hora;\n $solicitud->cliente =Auth::user()->empresa;\n $solicitud->usuario =Auth::user()->id;\n $solicitud->analisis =$value;\n $solicitud->precio =$ana->precio;\n $solicitud->save();\n\n /* $creditos = new Creditos();\n $creditos->solicitud =$solicitud->id;\n $creditos->origen ='SOLICITUD';\n $creditos->descripcion ='REGISTRO DE SOLICITUD';\n $creditos->cliente =Auth::user()->empresa;\n $creditos->usuario =Auth::user()->id;\n $creditos->monto =$ana->precio;\n $creditos->save();*/\n }\n }\n \n\n return redirect()->action('SolicitudesController@index', [\"created\" => true, \"solicitud\" => Solicitudes::all()]);\n\n }", "public function store(Request $request)\n {\n {\n $this->validate($request, [\n 'ragione_sociale' => 'required',\n 'email' => 'required|email',\n ], [\n 'ragione_sociale.required' => 'La ragione sociale è obbligatoria',\n 'email.required' => 'L\\'email è obbligatoria'\n ]);\n\n $societa = new \\App\\societa;\n\n $societa->ragione_sociale= $request->input('ragione_sociale');\n $societa->ateco_id= $request->input('ateco_id');\n $societa->descrizione_attivita = $request->input('descrizione_attivita');\n $societa->ref_aziendale= $request->input('ref_aziendale');\n $societa->n_dipendenti= $request->input('n_dipendenti');\n $societa->piva= $request->input('piva');\n $societa->cod_fiscale= $request->input('cod_fiscale');\n $societa->email= $request->input('email');\n $societa->pec= $request->input('pec');\n $societa->indirizzo_sede_legale= $request->input('indirizzo_sede_legale');\n $societa->telefono= $request->input('telefono');\n $societa->cellulare= $request->input('cellulare');\n $societa->cap= $request->input('cap');\n $societa->regione= $request->input('regione');\n $societa->sito= $request->input('sito');\n $societa->fondo_id= $request->input('fondo_id');\n\n if($request->input('demo')==1)\n $societa->demo= 1;\n\n $societa->save();\n\n\n// CREO L'UTENTE TUTOR DELL'AZIENDA\n $tutor= new \\App\\User;\n $tutor->name= '['.$societa->ragione_sociale.']';\n $tutor->nome = 'Tutor'. '['.$societa->ragione_sociale.']';\n $tutor->cognome = 'Tutor' . '['.$societa->ragione_sociale.']';\n $tutor->email=$societa->email;\n $tutor->societa_id=$societa->id;\n $tutor->password = bcrypt($societa->piva);\n $tutor->attivazione = uniqid();\n \n $tutor->bloccato = 1;\n\n //Mando la mail di attivazione\n Mail::send('emails.attivazione_soc', ['tutor' => $tutor, 'societa' => $societa], function ($m) use ($tutor) {\n $m->from('info@tanitsrl.it', 'TANIT');\n $m->to($tutor->email, $tutor->nome);\n $m->subject('Attivazione account');\n });\n\n\n $tutor->save();\n\n// CREO L'ANAGRAFICA\n $user_profiles= new \\App\\user_profiles();\n $user_profiles->user_id= $tutor->id;\n $user_profiles->id= $tutor->id;\n $user_profiles->save();\n\n// GLI ASSEGNO AI GRUPPI AZIENDA E DEMO OPZIONALE\n $tutor->roles()->attach(['role_id' => 3]); //AZIENDA\n if($request->input('demo')==1)\n $tutor->roles()->attach(['role_id' => 4]); //DEMO\n\n// GLI ASSEGNO COME TUTOR DELL'AZIENDA DEMO\n $tutor->_tutor_societa()->attach(['societa_id' => $societa->id]);\n\n\n// CREO UTENTI DEMO\n if($request->input('demo')==1){\n $nomi = ['Mario', 'Stefano', 'Martina', 'Francesca', 'Angelo', 'Paolo', 'Martina', 'Mattia', 'Massimo'];\n $cognomi = ['Rossi', 'Picasso', 'Cafiero', 'Bianchi', 'Resato', 'Stagnari', 'Ressotti', 'Lombardi', 'Cersoli' ];\n\n for ($i = 0; $i<=3 ; $i++){\n $user_demo= new \\App\\User;\n $user_demo->nome = $nomi[array_rand($nomi)];\n $user_demo->cognome = $cognomi[array_rand($cognomi)];\n $user_demo->name = $user_demo->nome.\".\".$user_demo->cognome;\n $email = strtolower(substr($user_demo->nome, 0 , 1).\".\".$user_demo->nome.\"@test.\".$societa->ragione_sociale.\".it\");\n// $user_demo->email=preg_replace(\"/[^A-Za-z0-9?!]/\",'',$email);\n $user_demo->email = filter_var($email, FILTER_SANITIZE_EMAIL);\n\n $user_demo->societa_id=$societa->id;\n $user_demo->password = bcrypt($user_demo->email);\n $user_demo->save();\n\n\n $user_demo_profiles= new \\App\\user_profiles();\n $user_demo_profiles->user_id= $user_demo->id;\n $user_demo_profiles->id= $user_demo->id;\n $user_demo_profiles->save();\n\n// GRUPPO USER\n $user_demo->roles()->attach(['role_id' => 1]);\n\n\n }\n//NON lo faccio accedere perchè prima deve attivare\n// Auth::login($tutor);\n }\n\n return redirect('attivazione');\n }\n }", "public function store(ConjuntoCrearRequest $request)\n {\n //Obtener pais\n\n $pais = Paises::where('Codigo',$request->pais)->firstOrFail();\n\n $requestData = $request->all();\n\n $requestData['pais'] = $pais->Pais;\n \n //Crear conjunto\n\n $id_conjunto = Conjunto::create($requestData);\n\n $user = Auth::user();\n\n //Colocar como administrador al mismo usuario\n\n if($user->rol == \"Administrador\")\n {\n //Colocar como administrador de conjunto\n\n $admin = Administrador::where('usuario_id', '=', $user->id)->firstOrFail();\n\n $adminConjunto = new AdministradorConjunto();\n $adminConjunto->administrador_id = $admin->id;\n $adminConjunto->conjunto_id = $id_conjunto->id;\n $adminConjunto->save();\n\n Session::flash('message','Conjunto Creado Correctamente.');\n return Redirect::to('/administrador/conjuntos');\n\n }\n\n Session::flash('message','Conjunto Creado Correctamente');\n return Redirect::to('/superadmin/conjuntos');\n }", "public function store(Request $request) {\n //\n $this->permission();\n $this->validate($request, [\n 'item' => 'required'\n ]);\n\n $itens = new Itens;\n\n $itens->tipo_relatorios_id = $request->tipo_relatorios_id;\n $itens->item = $request->item;\n\n $itens->save();\n\n return redirect('analise/item')->with('message', 'Novo item para análise criado');\n }", "public function store(Request $rq)\n {\n request()->validate([\n \"nom\"=>[\"required\",\"min:1\",\"max:100\"],\n \"prenom\"=>[\"required\",\"min:1\",\"max:100\"],\n \"age\"=>[\"required\",\"numeric\"],\n \"tel\"=>[\"required\",\"min:1\",\"max:100\"],\n \"email\"=>[\"required\",\"min:1\",\"max:100\"],\n \"genre\"=>[\"required\"],\n \"pays_origine\"=>[\"required\"],\n \"role_id\"=>[\"required\"],\n ]);\n $newEntry = new Joueur;\n $newEntry->nom = $rq->nom;\n $newEntry->prenom = $rq->prenom;\n $newEntry->age = $rq->age;\n $newEntry->tel = $rq->tel;\n $newEntry->email = $rq->email;\n $newEntry->genre = $rq->genre;\n $newEntry->pays_origine = $rq->pays_origine;\n $newEntry->role_id = $rq->role_id;\n $newEntry->equipe_id = $rq->equipe_id;\n $newEntry->save();\n \n $rq->file(\"photo\")->storePublicly(\"img\",\"public\");\n $photo = new Photo;\n $photo->url = $rq->file('photo')->hashName();\n $photo->joueur_id = $newEntry->id;\n $photo->save();\n\n return redirect()->route('joueurs.index');\n }", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.6685644", "0.6657866", "0.66171163", "0.6530599", "0.6524704", "0.6425879", "0.6424739", "0.6377403", "0.63652945", "0.63600224", "0.63516843", "0.63498944", "0.6344088", "0.634308", "0.6314785", "0.63086814", "0.62772137", "0.62743527", "0.6267042", "0.62610525", "0.6247062", "0.6241224", "0.62337244", "0.62294316", "0.6223915", "0.62228703", "0.62201387", "0.62157303", "0.62151206", "0.62034035", "0.6180625", "0.61803013", "0.61753666", "0.61724627", "0.61629754", "0.6162748", "0.6158707", "0.6155022", "0.6151551", "0.61513317", "0.615076", "0.6138339", "0.6131764", "0.61307317", "0.61257297", "0.61241364", "0.6123347", "0.6123347", "0.6123347", "0.6123347", "0.6123347", "0.6123347", "0.61227596", "0.6121818", "0.6121143", "0.6116815", "0.6114617", "0.6112359", "0.6110251", "0.610974", "0.6109202", "0.61079705", "0.61075014", "0.6107347", "0.60982776", "0.60980564", "0.60974604", "0.6096211", "0.60945624", "0.60941607", "0.6090775", "0.6087267", "0.60846895", "0.60842377", "0.60825944", "0.60820806", "0.608166", "0.60795605", "0.6078001", "0.6072977", "0.6072438", "0.6068124", "0.6066522", "0.60651404", "0.6061213", "0.6060893", "0.6058814", "0.60546917", "0.60546726", "0.605164", "0.6050611", "0.605036", "0.60503453", "0.60503453", "0.60503453", "0.60503453", "0.60503453", "0.60503453", "0.60503453", "0.60503453" ]
0.734802
0
Get default class vars
Получить переменные класса по умолчанию
protected function getShaderClassDefaultVars() { return get_class_vars(get_class($this)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_class_vars() {\n\t\treturn get_class_vars($this->get_class_name());\n\t\t\n\t}", "function getClassVars(){\r\n\t\t\t$class_vars = get_class_vars('OORedaxo');\r\n\t\t\tforeach($class_vars as $key=>$var){\r\n\t\t\t if(substr($key,1)=='_'){\r\n\t\t\t \t$class_vars[$key] = substr($key,1);\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t\treturn $class_vars;\r\n\t}", "public static function get_defaults() {\n\t\treturn self::$defaults;\n\t}", "public function getClassVarsPlaceHolder(){\n return array_fill(0, count($this->getClassVars()), '');\n }", "function get_class_vars($class_name)\n{\n\treturn array();\n}", "protected function getDefaultVars(): array {\n return [];\n }", "public function getDefaults();", "function get_class_vars($class_name)\n{\n return array();\n}", "public function get_defaults() {\n\t\treturn $this->defaults;\n\t}", "public static function getDefaults()\n {\n return self::$_defaults;\n }", "abstract protected function getDefaults();", "public function getClassVars(){\n $reflection = new ReflectionClass($this);\n //$vars = array_keys($reflection->getdefaultProperties());// All kind of properties : static, public, private, protected\n $props = $reflection->getProperties(ReflectionProperty::IS_PRIVATE);\n $vars=array();\n foreach ($props as $prop) {\n $vars[]=$prop->getName();\n }\n $reflection = new ReflectionClass(__CLASS__);\n //$parentVars = array_keys($reflection->getdefaultProperties());// All kind of properties : static, public, private, protected\n $props = array_keys($reflection->getProperties(ReflectionProperty::IS_PRIVATE));\n $parentVars = array();\n foreach ($props as $prop) {\n $parentVars[]=$prop->getName();\n }\n $childVars = array();\n foreach ($vars as $key) {\n if (!in_array($key, $parentVars)) {\n $childVars[] = $key;\n }\n }\n return $childVars;\n }", "public static function getDefaults() {\n\t\treturn self::$_defaults;\n\t}", "public function getClassVarsValues(){\n $reflection = new ReflectionClass($this);\n $varsValues = array();\n $vars = $this->getClassVars();\n foreach ($vars as $var) {\n if($reflection->hasMethod('get'.$var)){\n $val = $this->{'get'.$var}();\n $varsValues[$var] = $val;\n }\n }\n return $varsValues;\n }", "public function getDefaults()\n {\n return $this->_defaults;\n }", "public function getDefaults()\n {\n return $this->_defaults;\n }", "public function getDefaults()\n {\n return $this->_defaults;\n }", "public function getDefaults()\n\t{\n\t\treturn $this->defaults;\n\t}", "public function test_init_defaults() {\n $test = new \\YOURLS\\Config\\InitDefaults();\n\n $expected = array (\n 'include_core_funcs' => true,\n 'default_timezone' => true,\n 'load_default_textdomain' => true,\n 'check_maintenance_mode' => true,\n 'fix_request_uri' => true,\n 'redirect_ssl' => true,\n 'include_db' => true,\n 'include_cache' => true,\n 'return_if_fast_init' => true,\n 'get_all_options' => true,\n 'register_shutdown' => true,\n 'core_loaded' => true,\n 'redirect_to_install' => true,\n 'check_if_upgrade_needed' => true,\n 'load_plugins' => true,\n 'plugins_loaded_action' => true,\n 'check_new_version' => true,\n 'init_admin' => true,\n );\n\n $actual = get_class_vars(get_class($test));\n\n $this->assertSame($expected, $actual);\n }", "protected static function getVars($classname) {\r\n\t\t\t$vars = get_class_vars($classname);\r\n\t\t\treturn $vars;\r\n\t\t}", "public function getDefaults()\n {\n return $this->defaults;\n }", "public function getDefaults()\n {\n return $this->defaults;\n }", "public function getDefaultProperties() {\n $properties = get_object_vars($this);\n $default_properties = [];\n foreach ($properties as $property => $value) {\n if (strpos($property, 'default_') !== FALSE) {\n $default_properties[$property] = $value;\n }\n }\n return $default_properties;\n }", "public function getDefaults() {\r\n return $this->defaults;\r\n }", "public function getDefaults() {\n\n $result = array\n (\n 'arrayFileDir' => $this->arrayFileDir,\n 'classFileDir' => $this->classFileDir,\n 'moduleClassNamePostfix' => $this->moduleClassNamePostfix,\n 'moduleConfigFileNamePostfix' => $this->moduleConfigFileNamePostfix,\n 'moduleConfigVarNamePostfix' => $this->moduleConfigVarNamePostfix,\n 'moduleFileNamePostfix' => $this->moduleFileNamePostfix,\n 'modulesRootFolder' => $this->modulesRootFolder,\n );\n return $result;\n }", "function getDefaults()\n {\n\treturn $this->userDefaults;\n }", "protected function defaults() {\n\t\treturn array();\n\t}", "protected function defaults() {\n\t\treturn array();\n\t}", "function Get_class_vars($param) {\n class myclass {\n \n var $var1; // this has no default value...\n var $var2 = \"xyz\";\n var $var3 = 100;\n private $var4;\n \n // constructor\n function __construct() {\n // change some properties\n $this->var1 = \"foo\";\n $this->var2 = \"bar\";\n return true;\n }\n \n }\n \n $my_class = new myclass();\n \n $class_vars = get_class_vars(get_class($my_class));\n \n foreach ($class_vars as $name => $value) {\n echo \"$name : $value\\n\";\n }\n return \"\";\n }", "private function getStoreDefaultValues() {\n $vars = array(\n 'status' => 0,\n 'projId' => '',\n 'successUrlStd' => 1,\n 'successUrl' => '',\n 'cancelUrlStd' => 1,\n 'cancelUrl' => '',\n 'projectPassword' => '',\n 'notifyPassword'\t=> '',\n 'protection' => 0\n );\n\n return $vars;\n }", "protected function getDefaults()\n {\n $config = new configuration\\config;\n $config->responsibleDefault();\n return $config->getDefaults();\n }", "public function get_fields_defaults(){\r\n\t\t\treturn self::$fields_defaults;\r\n\t\t}", "public function LoadDefaults()\r\n\t{\r\n\t\t$fms = $this->_phreezer->GetFieldMaps(get_class($this));\r\n\r\n\t\tforeach ($fms as $fm)\r\n\t\t{\r\n\t\t\t$prop = $fm->PropertyName;\r\n\t\t\t$this->$prop = $fm->DefaultValue;\r\n\t\t}\r\n\t}", "public function classVarStorage(){\n\t\t\n\t\t\tif(isset($_SESSION)){\n\t\t\t\t\n\t\t\t\tif(!isset($_SESSION['classVars']) || !is_array($_SESSION['classVars'])){\n\t\t\t\t\t$_SESSION['classVars'] = Object::construct('ArrayObject');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//return the reference\n\t\t\t\treturn $_SESSION['classVars'];\n\t\t\t}else{\n\t\t\t\tglobal $__CLASSVARS;\n\t\t\t\tif(!is_array($__CLASSVARS)){\n\t\t\t\t\t$__CLASSVARS = Object::construct('ArrayObject',$__CLASSVARS);\n\t\t\t\t}\n\t\t\t\treturn $__CLASSVARS;\n\t\t\t}\n\t\t\t\n\t\t}", "public static function getDefaultVars()\n {\n $dom = ZLanguage::getModuleDomain(self::MODULENAME);\n\n return array(\n 'posts_per_page' => 15,\n 'topics_per_page' => 15,\n 'hot_threshold' => 20,\n 'email_from' => System::getVar('adminmail'),\n 'url_ranks_images' => \"modules/Dizkus/Zikula/Module/DizkusModule/Resources/public/images/ranks\",\n 'post_sort_order' => 'ASC',\n 'log_ip' => 'no',\n 'extendedsearch' => 'no',\n 'm2f_enabled' => 'no',\n 'favorites_enabled' => 'yes',\n 'removesignature' => 'no',\n 'striptags' => 'yes',\n 'deletehookaction' => 'lock',\n 'rss2f_enabled' => 'no',\n 'timespanforchanges' => 24,\n 'forum_enabled' => 'yes',\n 'forum_disabled_info' => __('Sorry! The forums are currently off-line for maintenance. Please try later.', $dom),\n 'signaturemanagement' => 'no',\n 'signature_start' => '--',\n 'signature_end' => '--',\n 'showtextinsearchresults' => 'yes',\n 'minsearchlength' => 3,\n 'maxsearchlength' => 30,\n 'fulltextindex' => 'no',\n 'solved_enabled' => true,\n 'ajax' => true,\n 'striptagsfromemail' => false,\n 'indexTo' => '',\n 'notifyAdminAsMod' => 2,\n 'defaultPoster' => 2,\n );\n }", "public static function defaults()\n\t{\n\t\tif (is_null(static::$defaults))\n\t\t{\n\t\t\t// Assign default keys\n\t\t\tstatic::$defaults = array(\n\t\t\t\t'error' => Session::get('messages.error'),\n\t\t\t\t'success' => Session::get('messages.success'),\n\t\t\t\t'info' => Session::get('messages.info'),\n\t\t\t\t'appconfig' => Config::get('app'),\n\t\t\t\t'title' => null,\n\t\t\t\t'auth' => Auth::user(),\n\t\t\t\t'manager' => Access::manager(),\n\t\t\t);\n\t\t}\n\n\t\treturn static::$defaults;\n\t}", "public static function defaults()\n\t{\n\t\treturn [];\n\t}", "public function get_default_options() {\n\n\t\t$this->log(sprintf('The get_default_options() method was not over-ridden for the class : %s', $this->get_description()));\n\n\t\treturn array();\n\t}", "public function getMutatedDefaultAttributes()\n {\n $class = static::class;\n\n if (! isset(static::$mutatorDefaultCache[$class])) {\n static::cacheMutatedDefaultAttributes($class);\n }\n\n return static::$mutatorDefaultCache[$class];\n }", "protected function getClass()\n {\n return static::DEFAULT_CLASS;\n }", "public function defaultValues() {\n\t\treturn array();\n\t}", "protected function _get_defaults()\n {\n // Return an empty array\n return array();\n }", "public function default_settings() {\n\t\treturn array();\n\t}", "protected function loadDefaults() {\r\n\t\tforeach (self::$configurationFiles as $xmlfile) {\r\n\t\t\tif (file_exists($xmlfile)) {\r\n\t\t\t\t$xml = simplexml_load_file($xmlfile);\r\n\t\t\t\tforeach ($xml->xpath('//phpunit/php/var') as $node) { /* @var $node SimpleXMLElement */\r\n\t\t\t\t\t$key = (string)$node['name'];\r\n\t\t\t\t\tif (!isset($GLOBALS[$key])) { // only set the default value if no other value is set\r\n\t\t\t\t\t\t$GLOBALS[$key] = (string)$node['value'];\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// storing information to globals instead of static properties. So if globals will\r\n\t\t// be restored this information also gets lost and will trigger reloading of the defaults\r\n\t\t$GLOBALS[__CLASS__.'_defaultsLoaded'] = true;\r\n\t}", "public function getDefaults(): array {\n\t\treturn $this->defaults;\n\t}", "protected function get_default() {\n\t\treturn array(\n\t\t\t'ownerID' => 0,\n\t\t\t'accountID' => '',\n\t\t\t'ampContainerID' => '',\n\t\t\t'containerID' => '',\n\t\t\t'internalContainerID' => '',\n\t\t\t'internalAMPContainerID' => '',\n\t\t\t'useSnippet' => true,\n\t\t\t'gaPropertyID' => '',\n\t\t);\n\t}", "public function getDefaults(): array\n {\n return $this->defaults;\n }", "function get_lista_variables()\n\t{\t//(mmmmm... queda por tomuer compatibility)\n\t\t$vars = get_class_vars(get_class($this));\n\t\t\n\t\t//-- Parametros que no se permiten setear.\n\t\tunset($vars['im']);\n\t\tunset($vars['code']);\n\t\tunset($vars['code_entered']);\n\t\tunset($vars['correct_code']);\n\t\t\n\t\treturn $vars;\n\t}", "public function defaults()\n {\n // Se the default for the first time or reset preferences\n $this->value_text_box = '123';\n $this->value_check_box = '';\n $this->value_combo_box = '';\n $this->value_swipe = '';\n }", "function load_default_vars()\n {\n parent::load_default_vars();\n $this->vars['URL_REPOS'] = '//www.vinexs.com/repos/';\n $this->vars['URL_RSC'] = $this->manifest['url_root'] . '/assets/' . $this->manifest['activity_current'] . '/1.0/';\n $this->load_language();\n }", "public function get_default_params()\n {\n }", "public function getStaticVariables()\n {\n return $this->getReflector()->getStaticVariables();\n }", "function _getDefaults()\n {\n $defaults = array();\n\n $user = \\User::factory($this->identifier);\n // get the user defaults\n $defaults = $user->getData();\n // remove the password hash\n unset($defaults['Password_hash']);\n\n // An array of each field that requires front-end sanitization\n $fieldsThatAreStrings = array(\n 'UserID',\n 'First_name',\n 'Last_name',\n 'Real_name',\n 'Email',\n 'Degree',\n 'Institution',\n 'Address',\n 'City',\n 'State',\n 'Zip_code',\n 'Country',\n 'Fax',\n );\n // Prevent Javascript injection on all fields\n foreach ($fieldsThatAreStrings as $fieldName) {\n // this check prevents PHP Notices\n if (!empty($defaults[$fieldName])) {\n $defaults[$fieldName] = htmlspecialchars($defaults[$fieldName]);\n }\n }\n\n foreach ($defaults['examiner'] as $cid=>$vals) {\n //sets pending approval info\n if ($cid=='pending') {\n $defaults['examiner_pending'] = $vals;\n continue;\n }\n //gets radiologist Y/N from any of the active sites\n if ($vals[0]=='Y') {\n if ($vals[1]==='1') {\n $defaults['examiner_radiologist'] = 'Y';\n } else {\n $defaults['examiner_radiologist'] = 'N';\n }\n }\n if ($vals[0]=='Y') {\n $defaults['ex_'.$cid] ='on';\n }\n }\n\n // Notification defaults\n // \"notif_\".$module.\"_\".$operation.\"_\".$service\n $curr_sub = \\NDB_Notifier::getUserNotificationModuleServices(\n $user->getData(\"ID\")\n );\n foreach ($curr_sub as $module=>$operations) {\n foreach ($operations as $operation => $services) {\n unset($services['desc']);\n foreach ($services as $service => $subscribed) {\n $var_name = \"notif_\".$module.\"_\".$operation.\"_\".$service;\n\n if ($subscribed==='Y') {\n $defaults[$var_name] = 'on';\n }\n }\n }\n }\n return $defaults;\n }", "private function getDefaults()\n {\n if ($this->session->defaults) {\n return $this->session->defaults;\n } else {\n return [\n 'report' => '',\n 'date-from' => '',\n 'date-to' => '',\n 'date-range'=>'',\n 'page' => '',\n ];\n } \n }", "static function getVars(){\r\n\t\t$vars = new SortedCollectionObject(function($a,$b){\r\n\t\t\t$a = strlen($a);\r\n\t\t\t$b = strlen($b);\r\n\t\t\t\t\r\n\t\t\tif($a == $b) return 0;\r\n\t\t\tif($a > $b) return -1;\r\n\t\t\treturn 1;\r\n\t\t});\r\n\t\t\r\n\t\tglobal $BASEPATH;\r\n\t\t$vars['projectBase'] = $BASEPATH;\r\n\t\r\n\t\treturn $vars;\r\n\t}", "protected abstract function defaultProperties();", "public function getDefaultSettings()\n {\n return array(\n 'divisibleBy' => false,\n 'divisibleClass' => '',\n 'childClass' => '',\n );\n }", "public function getMyVars();", "protected function get_default() {\n\t\treturn array(\n\t\t\t'propertyID' => '',\n\t\t\t'ownerID' => '',\n\t\t);\n\t}", "function get_non_class_vars() {\n\t\treturn array_diff_by_key($this->get_object_vars(), $this->get_class_vars());\n\t\t\n\t}", "public function getStubVariables()\n {\n return [\n 'API_NAMESPACE' => $this->apiNamespace,\n 'API_VERSION' => Str::upper($this->version),\n 'NAMESPACE' => $this->getPluralClassName($this->argument('name')),\n 'CLASSNAME' => $this->getSingularClassName($this->argument('name')),\n 'MODELNAME' => $this->getSingularClassName($this->argument('name')),\n ];\n }", "public function getVars();", "public function getVars();", "public static function getDefaultSettings() {\r\n return array(\r\n // directory\r\n 'cacheDir' => 'cache/phpcache',\r\n // caching time in seconds\r\n 'cacheTime' => '360',\r\n // Debugging\r\n 'debug' => false\r\n );\r\n }", "public static function getDefaults()\n {\n return [\n 'params' => [],\n 'weight' => 0,\n ];\n }", "protected function getDefaultParameters()\n {\n return array(\n 'cla' => 'Fo',\n 'ss' => 'Class',\n );\n }", "public static function get_element_defaults() {\n\n\t\t\t\tglobal $fusion_settings;\n\n\t\t\t\treturn [\n\t\t\t\t\t'class' => '',\n\t\t\t\t\t'id' => '',\n\t\t\t\t\t'animation' => false,\n\t\t\t\t\t'delay' => 0,\n\t\t\t\t\t'placement' => 'top',\n\t\t\t\t\t'title' => 'none',\n\t\t\t\t\t'trigger' => 'hover',\n\t\t\t\t];\n\t\t\t}", "protected function initVariables() {}", "protected function initVariables() {}", "public function defaults(): array\n {\n return [\n 'constants' => array_map(function ($value) {\n return $value->default;\n }, $this->constants),\n 'properties' => array_map(function ($value) {\n return $value->default;\n }, $this->properties),\n 'methods' => $this->methods,\n ];\n }", "public function getDefaults() {\n return array(\n 'consumerKey' => '',\n 'consumerSecret' => '',\n 'accessToken' => '',\n 'accessTokenSecret' => '',\n 'twitterHandle' => ''\n );\n }", "static function getClassVariables($object){\n return get_class_vars(get_class($object));\n }", "public function default_data() {\n\t\t$data = array(\n\t\t\t'core_settings' => $this->core_settings,\n\t\t\t'module_status' => $this->module_status,\n\t\t\t'module_settings' => $this->module_settings,\n\t\t);\n\n\t\treturn $data;\n\t}", "public function get_vars()\n\t{\n\t\treturn array(\"TsvCarousel\",\"strategy\",\"height\",\"count_on_page\");\n\t}", "private function defaultTemplateVars()\n\t{\n\t\t$this->data['title'] = $this->t('Default Title');\n\t\t$this->data['keywords'] = $this->t('Default keywords');\n\t\t$this->data['description'] = $this->t('Default - the default description');\n\t\t$this->data['bodyClass'] = $this->t('default');\n\t}", "public static function getDefaultOptions()\n {\n return self::$defaults;\n }", "public static function getDefaultOptions()\n {\n return self::$defaults;\n }", "protected function getVars()\n {\n return [];\n }", "protected function init_defaults() {\n\t\t$this->arguments_defaults = array();\n\t}", "private function defaults()\n {\n\n $defaults = array(\n 'layout_enable' => 'off',\n 'title'=> '',\n 'currency'=> '',\n 'price'=> '',\n 'duration'=> '',\n 'repeaters'=>''\n );\n return $defaults;\n }", "private function getClassVars($class) {\n $tmp = get_class_vars($class);\n\n //Pega os valores das variaveis\n array_walk($tmp, function(&$value, $varName) {\n $value = $this->getVarValue($varName);\n });\n\n //Retira variaveis que tem valor NULL e que sao objetos\n $tmp = array_filter($tmp, function($value, $key) {\n if ($this->getVarValue($key) === NULL) { //se valor for nulo, retira do array\n return false;\n } else if (substr($key, 0, 2) == \"__\") {\n if (substr($key, 2) == \"objects\") { //Retira a variavel da classe DAO __objects\n return false;\n }\n $this->__objects[substr($key, 2)] = $value;\n return false;\n }\n return true;\n }\n , ARRAY_FILTER_USE_BOTH);\n return $tmp;\n }", "protected function defaults() {\n\t\treturn array(\n\t\t\t'top' => true,\n\t\t\t'bottom' => true,\n\t\t\t'left' => true,\n\t\t\t'right' => true,\n\t\t\t'unit' => true,\n\t\t\t'unit_options' => wponion_internal_options_data( 'css-units' ),\n\t\t\t'all' => false,\n\t\t\t'icons' => $this->default_icons(),\n\t\t);\n\t}", "function code_snippets_get_default_settings() {\n\tstatic $defaults;\n\n\tif ( isset( $defaults ) ) {\n\t\treturn $defaults;\n\t}\n\n\t$defaults = array();\n\n\tforeach ( code_snippets_get_settings_fields() as $section_id => $fields ) {\n\t\t$defaults[ $section_id ] = array();\n\n\t\tforeach ( $fields as $field_id => $field_atts ) {\n\t\t\t$defaults[ $section_id ][ $field_id ] = $field_atts['default'];\n\t\t}\n\t}\n\n\treturn $defaults;\n}", "private static function default_settings(){\n\t\t$defaults = array();\n\t\tforeach(Settings::$options as $setting => $config){\n\t\t\t$defaults[$setting] = $config['default'];\n\t\t}\n\t\treturn $defaults;\n\t}", "public function init_variables(){\n parent::init_variables();\n //if you want to force any variables put it after the parent function\n }", "public function init_variables(){\n parent::init_variables();\n //if you want to force any variables put it after the parent function\n }", "protected function get_default_settings()\n\t\t{\n\t\t\treturn array(\n\t\t\t\t'meetup_api_key'\t\t=> '',\n\t\t\t\t'meetup_group_url_name'\t=> '',\n\t\t\t);\n\t\t}", "protected function defaultVariables()\n {\n return array_merge([\n 'id' => $this->id,\n 'name' => $this->formatName($this->column),\n 'label' => $this->label,\n 'value' => $this->normalizeValue(),\n 'width' => $this->width,\n 'style' => $this->style,\n ], $this->presenter()->variables());\n }", "public function vars()\n {\n return array_merge(parent::vars(), [\n 'user' => (string) $this->site->sysuser->name,\n 'site' => (string) $this->site->name\n ]);\n }", "abstract public function getVars();", "public static function get_model_defaults() {\n return static::$model_defaults;\n }", "public function get_vars()\n\t{\n\t\treturn $this->_ci_cached_vars;\n\t}", "public function getObjectVars() {}", "protected function getIniDefaults()\n {\n $this->userIniFileName = ini_get('user_ini.filename');\n $this->userIniTTL = ini_get('user_ini.cache_ttl');\n }", "protected function getDefaultOptions() {\n\t\t$options = array();\n\t\t$options['data_class'] = $this->getEntityType();\n\t\t\n\t\treturn $options;\n\t}", "protected function defaultValues(){\n return [];\n }", "protected function getDefaults()\n {\n return [\n 'client_secret' => '',\n 'scope' => '',\n 'token_url' => 'oauth2/token',\n 'auth_location' => 'headers',\n ];\n }", "public function init_defaults(){\n\t\n\t $arr_defaults = array(\n\n\t\t// 'wp_head' - start\n\t\t\n\t\t'modify_wp_ver'\t\t\t\t\t\t=> false,\n\t\t\n\t\t//set_a\n\t\t'rsd_link'\t \t\t\t\t\t\t=> true, // http://www.themelab.com/remove-code-wordpress-header\n\t\t'wlwmanifest_link'\t\t\t\t\t=> true,\n\t\t'index_rel_link'\t\t\t\t\t=> true,\t\t\t\n\t\t'wp_generator'\t\t\t\t\t\t=> true,\t\t// WP version\n\t\t\n\t\t// set_b\n\t\t'parent_post_rel_link'\t\t\t\t=> true, \t\t// 10, 0\n\t\t'start_post_rel_link' \t\t\t\t=> true,\t\t// 10, 0\n\t\t'adjacent_posts_rel_link_wp_head'\t=> true,\t\t// 10, 0\t\n\t\t'wp_shortlink_wp_head'\t\t\t\t=> true, \t\t// 10, 0 \n\t\t\n\t\t// set_c\n\t\t'feed_links'\t\t\t\t\t\t=> true, \t\t// , 2);\n\t\t\n\t\t//set_d\n\t\t'feed_links_extra'\t\t\t\t\t=> true \t\t// ,3);\n\t\t\n\t\t// 'wp_head' - end\n\t\n ); \n\t return $arr_defaults;\n\t}", "protected function getDefaultAttributes() {}", "public function getDefaultValues();" ]
[ "0.7170517", "0.6946016", "0.68396324", "0.6822035", "0.67706925", "0.67489743", "0.6719495", "0.66375864", "0.6582503", "0.6559633", "0.6523375", "0.6523053", "0.64462525", "0.63584846", "0.63568217", "0.63568217", "0.63568217", "0.63564646", "0.63273364", "0.63095444", "0.6298498", "0.6298498", "0.62971556", "0.6288144", "0.6275245", "0.62729156", "0.62709844", "0.62709844", "0.6196172", "0.61358696", "0.6099424", "0.60961", "0.60921454", "0.6085793", "0.60854536", "0.60743827", "0.6047679", "0.5998149", "0.599406", "0.5987241", "0.5972187", "0.5971717", "0.59707624", "0.5953683", "0.5935652", "0.5935281", "0.59205496", "0.5916318", "0.59113693", "0.59096587", "0.5904291", "0.5904027", "0.5899441", "0.58958536", "0.58899915", "0.5876999", "0.58735555", "0.5861412", "0.5852913", "0.58441126", "0.5830851", "0.582677", "0.582677", "0.58240956", "0.5813178", "0.5809025", "0.5803843", "0.5802381", "0.5802381", "0.5799941", "0.5799482", "0.5799007", "0.5795412", "0.57915163", "0.5778823", "0.5771987", "0.5771987", "0.5763015", "0.5761094", "0.5759242", "0.5759104", "0.57533836", "0.5748963", "0.57457364", "0.574464", "0.574464", "0.57418925", "0.5730183", "0.5728275", "0.5723826", "0.571776", "0.57177514", "0.57073295", "0.57050985", "0.5704706", "0.56985676", "0.5694453", "0.56839", "0.56828576", "0.5679825" ]
0.8134991
0
Add search to a Doctrine query. $q should be a Doctrine query object. $search is the user's search text (don't preclean it for us, we've got it covered). $options may contain 'culture' YOUR QUERY MUST HAVE EXPLICIT addSelect CALLS, OTHERWISE YOU WILL NOT GET RESULTS. You don't want to hydrate all this extra stuff anyway, just your matching objects.
Добавьте поиск в запрос Doctrine. $q должен быть объектом запроса Doctrine. $search — это текст поиска пользователя (не очищайте его для нас, мы это уже учтём). $options может содержать 'culture'. ВАШ ЗАПРОС ДОЛЖЕН СОДЕРЖАТЬ ЯВНЫЕ вызовы addSelect, ВОЗМОЖНО, ВОЗНИКНЕТ ПРОБЛЕМА С РЕЗУЛЬТАТАМИ. Вы не хотите гидратировать всё это лишнее anyway, просто ваши совпадающие объекты.
public function addSearchToQuery($q, $search, $options = array()) { $alias = $q->getRootAlias(); // Uses refclass to get to the search document $q->innerJoin($alias . '.aSearchDocuments asd'); $q->innerJoin('asd.Usages asu'); // Unicode: letters and spaces only, plus wildcard * $words = $this->split($search, true); $wildcards = array(); $nwords = array(); foreach ($words as $word) { if (preg_match('/^(.*?)\*(.*)$/', $word, $matches)) { // Turn it into a LIKE pattern $wildcards[] = $matches[1] . '%' . $matches[2]; } else { $nwords[] = $word; } } $words = $nwords; $q->innerJoin('asu.Word asw'); $q->addGroupBy('asd.id'); $q->addSelect('sum(asu.weight) + (((datediff(NOW(), asd.published_at) < 31) as integer) * 100) as a_search_score, asd.info as a_search_info'); // Build an OR of the wildcard LIKE clauses and an IN clause for the straightforward matches $clause = ''; $args = array(); if (count($wildcards)) { foreach ($wildcards as $wildcard) { if (strlen($clause)) { $clause .= 'OR '; } $clause .= 'asw.text LIKE ? '; $args[] = $wildcard; } } // Don't crash on an empty IN clause if (count($words)) { if (strlen($clause)) { $clause .= 'OR '; } // We'd put this in the innerJoin call but Doctrine doesn't support automatic // parenthesization of lists anywhere but addWhere, it seems $clause .= 'asw.text IN ?'; $args[] = $words; } if (!strlen($clause)) { // Searches for nothing should not return everything $q->andWhere('0 <> 0'); return $q; } $q->andWhere($clause, $args); if (isset($options['culture'])) { $q->addWhere('asd.culture = ?', $options['culture']); } $q->addHaving('a_search_score > 0'); $q->addOrderBy('a_search_score desc'); return $q; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function search(SearchOptions $options);", "public function makeSearchQuery( EarthIT_Storage_Search $search, array $options=array() );", "public function search($q, $options = array())\n\t{\n\t\t// Load Library porterstemmmer search algorithm\n\t\t$this->load->library('search/porterStemmer');\n\n\t\t// Remove some characters and words.($rmWords and $rmSymbols)\n\t\t$rmWords \t= array(\"the\", \"and\", \"a\", \"to\", \"of\", \"in\", \"i\", \"is\",\n\t\t\"that\", \"it\", \"on\", \"you\", \"this\", \"for\", \"but\",\n\t\t\"with\", \"are\", \"have\", \"be\", \"at\", \"or\", \"as\",\n\t\t\"was\", \"so\", \"if\", \"out\", \"not\");\n\t\t$rmSymbols \t= array('\\'s', '.', ',', '\\'', '!', '?', '\"');\n\n\t\t$searchTerms \t= explode(\" \", str_replace($rmSymbols, \"\", $q));\n\t\t$stemmerTerms \t= array();\n\t\tforeach ($searchTerms as $searchTerm) {\n\t\t\t$stem = PorterStemmer::Stem($searchTerm);\n\t\t\tif (!in_array($stem, $rmWords)) {\n\t\t\t\t$stemmerTerms[] = $stem;\n\t\t\t}\n\t\t}\n\n\t\t// Cache query\n\t\tif (isset($options['cache'])) $this->db->cache_on();\n\n\t\t// Set default options\n\t\tif (!isset($options['start'])) $options['start'] = 0;\n\t\t\n\t\t// We cache because we need to remember our filter/where clauses.\n\t\t// This allows us to get both the row count and the query objects in one call\n\t\t// otherwise the CI query builder would reset after getting the row count.\n\t\t$this->db->start_cache();\n\t\t\n\t\t$this->db->from('companies company');\n\t\t\n\t\t$this->db->where('company.active', 1);\n\t\t\n\t\t$this->db->select('company.id');\n\t\t$this->db->select('company.name');\n\t\t$this->db->select('company.slug');\n\t\t$this->db->select('company.logo');\n\t\t$this->db->select('company.preview');\n\t\t$this->db->select('company.email');\n\t\t$this->db->select('company.phone');\n\t\t// Get and Join the doctors count\n\t\t$this->db->select('IFNULL(inner_1.doctors, 0) doctors');\n\t\t$this->db->join(\n\t\t\t'(\n\t\t\tSELECT company_id, COUNT(*) doctors \n\t\t\tFROM companies_users docs \n\t\t\tGROUP BY company_id\n\t\t\t) inner_1',\n\t\t\t'inner_1.company_id = company.id', 'left'\n\t\t);\n\t\t// Get and Join the facilities count\n\t\t$this->db->select('IFNULL(facs.facilities, 0) facilities');\n\t\t$this->db->join(\n\t\t\t'(\n\t\t\t\tSELECT company_id, COUNT(*) facilities\n\t\t\t\tFROM companies_facilities\t\n\t\t\t\tGROUP BY company_id\n\t\t\t) facs',\n\t\t\t'facs.company_id = company.id', 'left'\n\t\t);\n\t\t// Get and Join the location\n\t\t$this->db->select('locations.id AS location_id');\n\t\t$this->db->select('locations.name AS address');\n\t\t// Create a string in mysql result for the search engine to match and rate against.\n\t\t$searchColumn = 'LOWER(CONCAT(\n\t\t\tcompany.name, \" \",\n\t\t\tcompany.description, \" \",\n\t\t\tcompany.email, \" \",\n\t\t\tcompany.address, \" \",\n\t\t\tlocations.name\n\t\t\t))';\n\t\t$this->db->select($searchColumn.' AS searchtext');\n\t\t\n\t\tforeach ($stemmerTerms as $i => $term) {\n\t\t\tif ($i == 0) {\n\t\t\t\t$this->db->like($searchColumn, $term);\n\t\t\t} else {\n\t\t\t\t$this->db->or_like($searchColumn, $term);\n\t\t\t}\n\t\t}\n\n\t\t// Joins\n\t\t$this->db->join('locations', 'locations.id = company.location_id', 'left');\n\t\t\n\t\t// Count the items before applying pagination.\n\t\t$this->count = $this->db->count_all_results();\n\t\t\n\t\t// Limit number of objects in the results.\n\t\t// This is for pagination purposes.\n\t\tif ($options['start'] > 0) $options['start'] = $options['start'] - 1;\n\t\tif (isset($options['limit'])) $this->db->limit($options['limit'], $options['start']);\n\t\t\n\t\t$result = $this->db->get()->result_array();\n\t\t\n\t\t// Don't forget to stop and clear the cache.\n\t\t$this->db->stop_cache();\n\t\t$this->db->flush_cache();\n\n\t\tforeach ($result as $key => $value) {\n\t\t\t$result[$key][\"match_count\"] = 0; // match count\n\t\t\t$result[$key][\"score\"] = 0; // Accurracy rating\n\n\t \t// Remove symbols \n\t\t\t$words \t\t= str_replace($rmSymbols, \" \", $value['searchtext']);\n\t\t\t$words \t\t= explode(\" \", $words);\n\t\t\t$stem_words = array();\n\t\t\t\n\t\t\tforeach($words as $word) {\n\t\t\t\t$stem = strtolower(PorterStemmer::Stem($word));\n\n\t\t\t\tif(!in_array($stem, $rmWords)) {\n\t\t\t\t\t$stem_words[] = $stem;\n\t\t\t\t\t// Increament match count\n\t\t\t\t\tif(in_array($stem, $stemmerTerms)) $result[$key]['match_count']++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($result[$key]['match_count'] > 0) {\n\t\t\t // Generate a score\n\t\t\t\t$result[$key]['score'] = ( $result[$key]['match_count'] / count( $stem_words ) ) * 100;\n\t\t\t}\n\t\t}\n \t// Sort the results\n\t\tusort($result, function($a, $b) {\n\t\t\treturn $b['score'] - $a['score'];\n\t\t});\n\n\t\t// end caching\n\t\tif (isset($options['cache'])) $this->db->cache_off();\n\n\t\treturn $result;\n }", "public function search($options = [])\n {\n $query = $this->queryParts;\n// if (empty($query)) {\n// $query = '{}';\n// }\n// if (is_array($query)) {\n// $query = Json::encode($query);\n// }\n $options = array_merge($query, $options);\n $url = $this->index.'Search';\n\n return $this->db->get($url, $options);\n }", "public function search($term, array $options = []);", "public function addSearchField(FormBuilderInterface $builder, array $options = [])\n {\n $builder->add('q', SearchType::class, [\n 'label' => $this->__('Search for') . ':',\n 'required' => false,\n 'attr' => [\n 'maxlength' => 255\n ]\n ]);\n }", "public function search(SearchOptions $searchOptions): SearchResults\n {\n $queryString = $searchOptions->getQueryString();\n $specifiedField = empty($searchOptions->getField()) ? [] : [$searchOptions->getField()];\n\n $simpleQuery = new Query\\SimpleQueryString($queryString, $specifiedField);\n $simpleQuery->setParam('flags', 'PHRASE|PREFIX|WHITESPACE');\n $simpleQuery->setDefaultOperator(Query\\SimpleQueryString::OPERATOR_AND);\n\n $boolQuery = new BoolQuery();\n $boolQuery->addMust($simpleQuery);\n\n $query = new Query();\n\n $postBoolQuery = new BoolQuery();\n\n // Collection Date Filter\n if ($searchOptions->getDateType() === SearchOptions::DATE_TYPE_COLLECTION) {\n // Bool query to get range temporal extent dates\n $collectionDateBoolQuery = new Query\\BoolQuery();\n if (!empty($searchOptions->getRangeStartDate())) {\n $collectionDateBoolQuery->addMust($this->getCollectionStartDateQuery($searchOptions->getRangeStartDate()));\n }\n if (!empty($searchOptions->getRangeEndDate())) {\n $collectionDateBoolQuery->addMust($this->getCollectionEndDateQuery($searchOptions->getRangeEndDate()));\n }\n $boolQuery->addFilter($collectionDateBoolQuery);\n }\n\n // Published Date Filter\n if (\n $searchOptions->getDateType() === SearchOptions::DATE_TYPE_PUBLISHED &&\n $searchOptions->getRangeEndDate() &&\n $searchOptions->getRangeStartDate()\n ) {\n $boolQuery->addFilter($this->getPublishedDateRangeQuery($searchOptions->getRangeStartDate(), $searchOptions->getRangeEndDate()));\n }\n\n if (!empty($searchOptions->getDataType())) {\n $friendlyNameQueryTerm = new Query\\Terms('friendlyName');\n $friendlyNameQueryTerm->setTerms($searchOptions->getDataType());\n $postBoolQuery->addMust($friendlyNameQueryTerm);\n }\n\n if (!empty($searchOptions->getDatasetStatus())) {\n $statuses = array();\n foreach ($searchOptions->getDatasetStatus() as $key => $value) {\n $statuses[$key] = self::AVAILABILITY_STATUSES[$value];\n }\n\n $availabilityStatusQuery = new Query\\Terms('availabilityStatus');\n $availabilityStatusQuery->setTerms(\n array_reduce($statuses, 'array_merge', array())\n );\n $postBoolQuery->addMust($availabilityStatusQuery);\n }\n\n if (!empty($searchOptions->getTags())) {\n $tagsQuery = new Query\\Terms('tags');\n $tagsQuery->setTerms(\n $searchOptions->getTags()\n );\n $postBoolQuery->addMust($tagsQuery);\n }\n\n if ($searchOptions->isResearchGroupFilterSet()) {\n $postBoolQuery->addMust($this->addResearchGroupFilter($searchOptions));\n }\n\n if ($searchOptions->isFunderFilterSet()) {\n $postBoolQuery->addMust($this->addFunderFilter($searchOptions));\n }\n\n $query->setQuery($boolQuery);\n $query->setPostFilter($postBoolQuery);\n\n // sort by asc when search term doesn't exist\n if ($queryString === '*') {\n $query->addSort(array('acceptedDate' => array('order' => 'DESC')));\n }\n\n // Add sort order\n if ($searchOptions->getSortOrder() !== 'default') {\n $query->addSort(array('publishedDate' => array('order' => $searchOptions->getSortOrder())));\n }\n\n $this->addAggregators($query, $searchOptions);\n $resultsPaginator = $this->finder->findPaginated($query);\n return new SearchResults($resultsPaginator, $searchOptions, $this->entityManager);\n }", "function object_sort_add_search_query_options(array $options = array(), $query = '') {\n\n\tif (!elgg_is_active_plugin('search')) {\n\t\treturn $options;\n\t}\n\n\t$query = sanitize_string($query);\n\t\n\t$dbprefix = elgg_get_config('dbprefix');\n\t$options['joins']['objects_entity'] = \"JOIN {$dbprefix}objects_entity AS objects_entity ON objects_entity.guid = e.guid\";\n\n\t$wheres = array();\n\n\t$fields = array('title', 'description');\n\t$wheres[] = search_get_where_sql('objects_entity', $fields, ['query' => $query], false);\n\n\t$search_tags = elgg_extract('search_tags', $options, elgg_get_plugin_setting('search_tags', 'object_sort'));\n\n\tif ($search_tags) {\n\t\t$valid_tag_names = elgg_get_registered_tag_metadata_names();\n\t\t$options['joins']['tags'] = \"JOIN {$dbprefix}metadata tags on e.guid = tags.entity_guid\";\n\t\t$options['joins']['tag_name'] = \"JOIN {$dbprefix}metastrings tag_name on tags.name_id = tag_name.id\";\n\t\t$options['joins']['tag_value'] = \"JOIN {$dbprefix}metastrings tag_value on tags.value_id = tag_value.id\";\n\n\t\t$access = _elgg_get_access_where_sql(array('table_alias' => 'tags'));\n\t\t$sanitised_tags = array();\n\n\t\tforeach ($valid_tag_names as $tag) {\n\t\t\t$sanitised_tags[] = '\"' . sanitise_string($tag) . '\"';\n\t\t}\n\n\t\t$tags_in = implode(',', $sanitised_tags);\n\n\t\t$wheres[] = \"(tag_name.string IN ($tags_in) AND tag_value.string = '$query' AND $access)\";\n\t}\n\n\t$options['wheres'][] = '(' . implode(' OR ', $wheres) . ')';\n\n\treturn $options;\n}", "public function getSearch(): Option\\Search\n {\n return $this->applyQueryOptions ? $this->transaction->getSearch() : new Option\\Search();\n }", "protected function performSearch(Builder $builder, array $options = [])\n {\n $endpoint = $builder->model->searchableAs();\n // build the query string for the q parameter\n if (is_array($builder->query)) {\n $queryString = collect($builder->query)\n ->map(function ($item, $key) {\n if (is_array($item)) {\n // there are multiple search queries for this term\n $query = [];\n foreach ($item as $query) {\n $query[] = (is_numeric($key)) ? $query : \"$key:$query\";\n }\n\n return implode(' ', $query);\n } else {\n return (is_numeric($key)) ? $query : \"$key:$query\";\n }\n })\n ->filter()\n ->implode(' ');\n } else {\n $queryString = $builder->query;\n }\n $query = $this->client->createSelect();\n if ($builder->isDismax()) {\n $dismax = $query->getDisMax();\n if (empty($queryString)) {\n $dismax->setQueryAlternative('*:*');\n }\n }\n $query->setQuery($queryString);\n\n // get the filter query\n // TODO: this is highly inefficient due to the unique key? Or will the query still be cached?\n $filterQuery = $this->filters($builder);\n $query->createFilterQuery(md5($filterQuery))->setQuery($filterQuery);\n\n // build any faceting\n $facetSet = $query->getFacetSet();\n if (! empty($builder->facetFields)) {\n foreach ($builder->facetFields as $field) {\n $facetSet->createFacetField(\"$field-field\")->setField($field);\n }\n }\n if (! empty($builder->facetQueries)) {\n foreach ($builder->facetQueries as $field => $queries) {\n if (count($queries) > 1) {\n $facet = $facetSet->createFacetMultiQuery(\"$field-multiquery\");\n foreach ($queries as $i => $query) {\n $facet->createQuery(\"$field-multiquery-$i\", $query);\n }\n } else {\n $facetSet->createQuery(\"$field-query\")->setQuery(\"$field:{$queries[0]}\");\n }\n }\n }\n if (! empty($builder->facetPivots)) {\n foreach ($builder->facetPivots as $fields) {\n $facetSet->createFacetPivot(implode('-', $fields))->addFields(implode(',', $fields));\n }\n }\n\n // Set the boost fields\n if (isset($dismax) && $builder->hasBoosts()) {\n $dismax->setQueryFields($builder->getBoosts());\n }\n\n // allow for pagination here\n if (array_key_exists('start', $options)) {\n $query->setStart($options['start']);\n }\n if (array_key_exists('rows', $options)) {\n $query->setRows($options['rows']);\n }\n\n return $this->client->select($query, $endpoint);\n }", "public function search($keyword, array $searchOptions = []);", "public function getByOptionsQuery($options = array(), $limit = 0, $offset = 0)\n {\n $q = $this->createQuery('stu');\n \n if (0 < count($options))\n {\n if (array_key_exists('name', $options) && ('' != $options['name']))\n {\n $q->andWhere('stu.name LIKE ?', '%' . $options['name'] . '%');\n }\n if (array_key_exists('email', $options) && ('' != $options['email']))\n {\n $q->andWhere('stu.email LIKE ?', '%' . $options['email'] . '%');\n }\n if (array_key_exists('status', $options) && -1 < $options['status'])\n {\n $q->andWhere('stu.status = ?', $options['status']);\n }\n }\n \n if (0 < $limit)\n {\n $q->limit($limit);\n }\n \n if (0 < $offset)\n {\n $q->offset($offset);\n }\n \n return $q;\n }", "protected function _addSearch(\\Doctrine\\ORM\\QueryBuilder $queryBuilder)\n {\n if ($this->search == TRUE)\n {\n $request = $this->request;\n $search_fields = array_values($this->fields);\n foreach ($search_fields as $i => $search_field)\n {\n $search_param = $request->get(\"sSearch_{$i}\");\n if ($search_param !== false && $search_param != '')\n {\n $field = explode(' ', trim($search_field));\n $search_field = $field[0];\n\n $queryBuilder->andWhere(\" $search_field like :ssearch{$i} \");\n $queryBuilder->setParameter(\"ssearch{$i}\", '%' . $request->get(\"sSearch_{$i}\") . '%');\n }\n }\n }\n\n if ($this->global_search == TRUE)\n {\n $request = $this->request;\n\n $search_param = null;\n\n if ($search_params = $request->get(\"search\")) {\n // DataTables 1.10\n\n if (isset($search_params['value'])) {\n $search_param = $search_params['value'];\n }\n } else {\n $search_param = $request->get(\"sSearch\") ;\n }\n\n $search_fields = array_values($this->fields);\n\n if ($search_param)\n {\n $where = $queryBuilder->expr()->orX();\n\n\n foreach ($this->global_search_fields as $field) {\n\n $fieldlist = explode(' ',trim($search_fields[$field]));\n $search_field = $fieldlist[0];\n\n $where->add($queryBuilder->expr()->like($search_field, \"'%$search_param%'\"));\n\n }\n\n $queryBuilder->andWhere($where);\n\n }\n\n }\n\n if ($this->date_filter == TRUE) {\n\n\n\n foreach ($this->date_filter_fields as $field) {\n\n list($alias, $column) = explode(\".\", $field);\n\n if ($startDate = $request->get('startDateRange')) {\n $this->_addWhere($queryBuilder, $alias, $queryBuilder->expr()->gte($field, \"'$startDate'\"));\n }\n\n if ($endDate = $request->get('endDateRange')) {\n $this->_addWhere($queryBuilder, $alias, $queryBuilder->expr()->lte($field, \"'$endDate'\"));\n }\n }\n\n }\n\n }", "public function query($query = null, $page = null, $options = array()) {\n if ($query) {\n $this->search_options['query'] = $query;\n }\n\n if ($page) {\n $this->search_options['page'] = intval($page);\n }\n\n foreach ($options as $optionName => $optionValue) {\n $this->search_options[$optionName] = $options[$optionName];\n }\n\n $params = $this->search_options;\n\n // translate filters\n if (!empty($params['filter']))\n {\n foreach($params['filter'] as $filterName => $filterValue){\n $params['filter'][$filterName] = $this->updateFilter($filterValue);\n }\n }\n\n // translate excludes\n if (!empty($params['exclude']))\n {\n foreach($params['exclude'] as $excludeName => $excludeValue){\n $params['exclude'][$excludeName] = $this->updateFilter($excludeValue);\n }\n }\n\n // no query? then match all documents\n if (!$this->optionExists('query') || !trim($this->search_options['query'])){\n $params['query_name'] = 'match_all';\n }\n\n // if filters without query_name, pre-query first to obtain it.\n if (empty($params['query_name']) && !empty($params['filter']))\n {\n $filter = $params['filter'];\n unset($params['filter']);\n $dfResults = new Results($this->apiCall('search', $params));\n $params['query_name'] = $dfResults->getProperty('query_name');\n $params['filter'] = $filter;\n }\n\n $dfResults = new Results($this->apiCall('search', $params));\n $this->page = $dfResults->getProperty('page');\n $this->total = $dfResults->getProperty('total');\n $this->search_options['query'] = $dfResults->getProperty('query');\n $this->maxScore = $dfResults->getProperty('max_score');\n $this->queryName = $dfResults->getProperty('query_name');\n $this->lastQuery = $dfResults->getProperty('query');\n\n return $dfResults;\n }", "protected function applySearch(Builder $q): void\n {\n if (!$this->isSearchable()) {\n return;\n }\n if ($this->searchCallback) {\n ($this->searchCallback)($q, $this->req, $this->searchableFields);\n } elseif ($this->searchableFields && ($search = $this->req->get('search'))) {\n $search = mb_strtolower($search);\n $q->where(function (Builder $q) use ($search) {\n foreach ($this->searchableFields as $field) {\n $q->orWhereRaw('lower(' . $field . ') like ?', ['%' . $search . '%']);\n }\n });\n }\n }", "protected function _generateSelect($member, $options) {\n\t\t$select = $this->select()->setIntegrityCheck(false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ->from(array('e' => 'expenses'),array('id as expenseId','member_id','finance_id','description') )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ->joinLeft(array('f' => 'finances'),'e.finance_id = f.id',array('amount','currency','date') )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ->where('e.member_id = ?', $member->id);\n\n\t\t$dateObject = new Zend_Date();\n\t\t//may be here should be date object\n\t\tif (isset($options['dateFrom']) && $options['dateFrom']) {\n\t\t\t$dateObject->setDate($options['dateFrom'], 'dd/MM/yyyy');\n\t\t\t$dateObject->subTime($dateObject->getTime());\n\t\t\t$select->where('date >= ?', $dateObject->getTimestamp());\n\t\t}\n\t\t//may be here should be date object\n\t\t//this date should include last day\n\t\tif (isset($options['dateTo']) && $options['dateTo']) {\n\t\t\t$dateObject->setDate($options['dateTo'], 'dd/MM/yyyy');\n\t\t\t$dateObject->subTime($dateObject->getTime());\n\t\t\t$dateObject->addDay(1); //add 24 hours\n\t\t\t$dateObject->subSecond(1); // minus 1 second should get 23:59:59 of current date\n\t\t\t$select->where('date < ?', $dateObject->getTimestamp());\n\t\t}\n\n\t\tif (isset($options['currency']) && $options['currency']) {\n\t\t\t$select->where('currency = ?', $options['currency']);\n\t\t}\n\n\t\tif (isset($options['searchString']) && $options['searchString']) {\n\t\t\t$select->where('description like ?', '%'.$options['searchString'].'%');\n\t\t}\n\t\t\n\t\treturn $select;\n\t}", "public function searchBook($searchStr, $searchIn, $options = []) {\n $select = $this->_db->select()\n ->from($this->_name)\n ->distinct(true)\n ->order('title');\n\n if (isset($options['approved_only'])) {\n $select->where('approved = ?', 1);\n }\n\n // Show books available for purchase.\n if (isset($options['access_code_only'])) {\n $select->where('access_code_only = ?', $options['access_code_only']);\n }\n\n if (isset($options['type'])) {\n $select->where('book_type IN (?)', (array)$options['type']);\n }\n\n if (is_string($searchIn)) {\n if ($searchIn == 'title'){\n $titleQuery = $this->getFulltextSearchQuery($searchStr, 'title');\n $select->where($titleQuery);\n } else {\n $select->where(\"`\".$searchIn.\"` LIKE ?\", \"%\".$searchStr.\"%\");\n }\n } elseif (is_array($searchIn)) {\n foreach ($searchIn as $index => $field) {\n if ($field == 'title'){\n $titleQuery = $this->getFulltextSearchQuery($searchStr, 'title');\n if ($index == 0)\n $select->where('('.$titleQuery);\n else \n $select->orWhere($titleQuery); \n } else {\n if ($index == 0)\n $select->where(\"(`\".$field.\"` LIKE ?\", \"%\".$searchStr.\"%\");\n else \n $select->orWhere(\"`\".$field.\"` LIKE ?\", \"%\".$searchStr.\"%\");\n } \n }\n $select->where(true.\")\");\n }\n \n \n if (isset($options['category']) && !empty($options['category'])){\n $select->where('subject = ?', $options['category']);\n }\n\n if (isset($options['api_only'])) {\n $select->where('api_only = ?', (int)$options['api_only']);\n }\n\n if (!isset($options['paginator'])) {\n return $this->_db->fetchAll($select);\n } else {\n $adapter = new Zend_Paginator_Adapter_DbSelect($select);\n $paginator = new Zend_Paginator($adapter);\n return $paginator;\n \n }\n }", "public static function createQuery($options)\n {\n $q = new SolrQuery();\n $q->set('defType', 'edismax');\n $query = @trim($options['query']) ?: '*:*';\n\n //查询结果不包括此id\n if (isset($options['exclude_id']) && $options['exclude_id']) {\n \t$query .= ' -id:'.self::getSolrId($options['exclude_id']);\n }\n\n\n $q->setQuery($query);\n\n $q->set('qf', isset($options['qf']) ? $options['qf'] : 'title');\n\n\n if (!isset($options['show_all']) || !$options['show_all']) {\n $q->addFilterQuery(\"hidden:0\");\n }\n\n //推荐、精华\n if (isset($options['digest']) && $options['digest']) {\n $q->addFilterQuery(\"digest:1\");\n }\n if (isset($options['keyword']) && $options['keyword']){\n $q->setQuery(\"keyword:\".$options['keyword']);\n }\n\n if (isset($options['catalogs'])) {\n $options['catalogs'] = (array)$options['catalogs'];\n array_walk($options['catalogs'], function(&$v, $k) { $v = intval($v); });\n LsSolr::addFilterQuery($q, 'catalog_id', $options['catalogs']);\n }\n\n if (isset($options['shop_ids'])) {\n $options['shop_ids'] = (array)$options['shop_ids'];\n array_walk($options['shop_ids'], function(&$v, $k) { $v = intval($v); });\n LsSolr::addFilterQuery($q, 'shop_id', $options['shop_ids']);\n }\n\n if (isset($options['sort'])) {\n if (is_array($options['sort'])) {\n foreach ($options['sort'] as $sort) {\n LsSolr::addSortField($q, $sort);\n }\n } else {\n LsSolr::addSortField($q, $options['sort']);\n }\n } else {\n $q->addSortField('score', SolrQuery::ORDER_DESC);\n }\n\n if (isset($options['is_video_news'])) {\n $q->addFilterQuery('is_video_news:'.($options['is_video_news'] ? 1 : 0));\n }\n\n if (isset($options['is_discount_news'])) {\n $q->addFilterQuery('is_discount_news:'.($options['is_discount_news'] ? 1 : 0));\n }\n\n if (isset($options['from_shop_admin'])) {\n $q->addFilterQuery('from_shop_admin:'.($options['from_shop_admin'] ? 1 : 0));\n }\n\n if (isset($options['is_img_news']) && $options['is_img_news']) {\n $q->addFilterQuery('is_img_news:1');\n $q->addFilterQuery('(media_id:[1 TO *])');\n }\n\n if (isset($options['is_special']) && $options['is_special']) {\n $q->addFilterQuery('(special_id:[1 TO *])');\n }\n\n if (isset($options['house_id'])) {\n $q->addFilterQuery('house_id:'.intval($options['house_id']));\n }\n \n if (isset($options['market_id'])) {\n $q->addFilterQuery('market_id:'.intval($options['market_id']));\n }\n \n if (isset($options['decormarket_id'])) {\n $q->addFilterQuery('decormarket_id:'.intval($options['decormarket_id']));\n }\n \n if (isset($options['func']) && is_callable($options['func'])) {\n $func = $options['func'];\n $func($q);\n }\n \n if (isset($options['not_news_ids']) && $options['not_news_ids']) { \n $fqs[] = '-news_id:('.implode(' OR ', $options['not_news_ids']).')';\n $q->addFilterQuery(implode(' OR ', $fqs));\n }\n \n if (isset($options['ids']) && is_array($options['ids'])) {\n $ids = array();\n foreach ($options['ids'] as &$id) {\n $ids[] = self::getSolrId($id);\n }\n\n LsSolr::addFilterQuery($q, 'id', $ids);\n }\n\n return $q;\n }", "public function setSearchQuery(string $search)\n {\n $this->searchQuery = $search;\n }", "public function convertSearchToWhere(QueryBuilder $query, $search)\n {\n $allowedOperations = array('AND', 'OR');\n $allowedFields = array('id', 'workorder', 'dateorder', 'numblank', 'forms', 'priority', 'status', 'name', 'position', 'organization', 'executor', 'destinationiso');\n $search = json_decode($search);\n if (is_object($search) && (count($search->rules) < 10)) {\n foreach ($search->rules as $rule) {\n if (in_array($rule->field, $allowedFields)) {\n switch ($rule->field) {\n case 'id':\n $qWhere = 'rn.' . $rule->field . ' = :id';\n $qParametrs = 'id';\n break;\n case 'workorder':\n $qWhere = 'rn.' . $rule->field . ' = :workorder';\n $qParametrs = 'workorder';\n break;\n case 'numblank':\n $qWhere = 'rn.' . $rule->field . ' = :numblank';\n $qParametrs = 'numblank';\n break;\n case 'forms':\n $qWhere = 'f.id = :forms';\n $qParametrs = 'forms';\n break;\n case 'dateorder':\n $qWhere = 'rn.' . $rule->field . ' = :dateorder';\n $qParametrs = 'dateorder';\n break;\n /*case 'priority': $qWhere = 'p.id = :priorityid';\n $qParametrs='priorityid';\n break;*/\n case 'status':\n $qWhere = 's.id = :statusid';\n $qParametrs = 'statusid';\n break;\n case 'name':\n $qWhere = 'u.' . $rule->field . ' = :name';\n $qParametrs = 'name';\n break;\n case 'position':\n $qWhere = 'u.' . $rule->field . ' = :position';\n $qParametrs = 'position';\n break;\n case 'organization':\n $qWhere = 'o.name = :organization';\n $qParametrs = 'organization';\n break;\n case 'executor':\n $qWhere = 'e.id = :executorid';\n $qParametrs = 'executorid';\n break;\n case 'destinationiso':\n $qWhere = 'rn.' . $rule->field . ' = :destinationiso';\n $qParametrs = 'destinationiso';\n break;\n\n }\n if (strcmp($search->groupOp, 'AND') == 0)\n $query->andWhere($qWhere);\n elseif (strcmp($search->groupOp, 'OR') == 0)\n $query->orWhere($qWhere);\n $value = $rule->data;\n if (strcmp('dateorder', $rule->field) == 0)\n $value = $this->convertDataToMysqlFormat($value);\n $query->setParameter($qParametrs, $value);\n }\n }\n }\n return $query;\n }", "public static function appendSearchToQueryBuilder($qb, $search, $config){\n\n $alias = $config['alias'];\n\n if($search instanceof Request){\n $search = $search->query->all();\n }\n\n // TODO: add support multiple orderby's\n $orderby = self::getKeyIfExists($search, 'orderby');\n $orderbydesc = self::getKeyIfExists($search, 'orderbydesc');\n\n\n // objectClass is used to get all possible properties\n $objectClass = $config['objectClass'];\n $reflect = new \\ReflectionClass($objectClass);\n $properties = $reflect->getProperties();\n\n foreach ($properties as $property) {\n $propertyName = $property->getName();\n $fullPropertyName = \"${alias}.$propertyName\";\n $parameterName = \"${alias}___$propertyName\";\n\n if(array_key_exists($propertyName, $search)){\n $value = $search[$propertyName];\n\n if(is_string($value)){\n $value = explode(\"|\", $value); // check if it uses \"1|2|3\" syntax\n if(count($value) == 1){ // otherwise\n $value = $value[0]; // convert to string again\n }\n }\n\n if(is_null($value)){\n // you can search by null too. that is why I use array_key_exists instead of isset\n $andWhere = \"$fullPropertyName IS NULL\";\n } else if(is_array($value)){\n $andWhere = \"$fullPropertyName IN(:$parameterName)\";\n } else { // string or number or bool\n $andWhere = \"$fullPropertyName = :$parameterName \";\n }\n\n $qb->andWhere($andWhere);\n\n if(isset($value)){\n $qb->setParameter($parameterName, $value);\n }\n } // end if exist\n\n\n $orderPropertyName = $fullPropertyName;\n // fix $orderPropertyName if type is object else 500\n if(in_array($propertyName, [$orderby, $orderbydesc])){\n preg_match('/@var\\s+([^\\s]+)/', $property->getDocComment(), $matches);\n $type = self::getKeyIfExists($matches, 1);\n if(substr($type, 0, 1) == '\\\\' && $type !== '\\\\DateTime'){ // if complex type\n $orderPropertyName = \"order__${alias}__${propertyName}\";\n $qb->addSelect(\"IDENTITY($fullPropertyName) as HIDDEN $orderPropertyName\");\n };\n }\n\n if ($orderby == $propertyName) {\n $qb->orderBy(\"$orderPropertyName\", 'ASC');\n } elseif ($orderbydesc == $propertyName) {\n $qb->orderBy(\"$orderPropertyName\", 'DESC');\n }\n } // end foreach possible properties\n\n return $qb;\n\n }", "public function __construct($options=array())\n {\n // If calendar id is provided we will add that to the query\n $this->search_event_calendar = $options['calendar_id'] ?? \"\";\n\n // backwards compatibility\n if (empty($options['type']) && !empty($options['q'])) {\n $options['type'] = $options['q'];\n }\n\n $format_max_limit = $this->max_limit['default'];\n if (array_key_exists($options['format'], $this->max_limit)) {\n $format_max_limit = $this->max_limit[$options['format']];\n }\n\n if (!isset($options['limit']) ||\n empty($options['limit']) ||\n intval($options['limit']) > $format_max_limit ||\n intval($options['limit']) <= 0\n ) {\n $options['limit'] = $this->max_limit['default'];\n }\n\n if (!isset($options['offset']) || empty($options['offset']) || intval($options['offset']) <= 0) {\n $options['offset'] = 0;\n }\n\n $this->limit = $options['limit'] ?? $this->limit;\n $this->offset = $options['offset'] ?? $this->offset;\n\n parent::__construct($options);\n }", "protected function performSearch(Builder $builder, array $options = [])\n {\n $index = $builder->index ?: $builder->model->searchableAs();\n\n if ($builder->callback) {\n return call_user_func(\n $builder->callback,\n $this->query(),\n $builder->query,\n $options\n );\n }\n\n $query = $this->query()\n ->select('objectID')\n ->where('index', '=', $index)\n ->where('entry', 'like', '%' . $builder->query . '%');\n\n foreach ($builder->wheres as $column => $value) {\n $search = preg_replace('/^\\{|\\}$/', '%', json_encode([$column => $value]));\n\n $query->where('entry', 'like', $search);\n }\n\n return $query;\n }", "public function search(SearchQuery $searchQuery);", "function my_epl_add_select_options_search_field($fields) {\n \t$fields[] =array(\n \t\t'key'\t\t\t=>\t'search_open_closed',\n \t\t'meta_key'\t\t=>\t'property_open_closed_example',\n \t\t'label'\t\t\t=>\t__('Open Closed Example','easy-property-listings'),\n \t\t'option_filter'\t\t=>\t'open_closed',\n\n \t\t'options'\t\t=>\tmy_open_closed_options(),\n\t\t'type'\t\t\t=>\t'select',\n \t\t//'exclude'\t\t=>\tarray('land','commercial','commercial_land','business'),\n\t\t'query'\t\t\t=>\tarray(\n\t\t\t\t\t\t\t'query'\t\t=>\t'meta',\n\t\t\t\t\t\t),\n\t\t'class'\t\t\t=>\t'epl-search-row-full',\n\t\t'order'\t\t\t=>\t200\n \t);\n \treturn $fields;\n}", "public function getSearchOptions(array $options = []): array;", "public function createSelect($options = null): \\Solarium\\QueryType\\Select\\Query\\Query;", "public function buildQuery(array $options)\r\n {\r\n $query['apikey'] = $this->apiKey;\r\n\r\n if (! is_null($this->apiToken)) {\r\n $query['access_token'] = $this->apiToken;\r\n }\r\n\r\n if (! is_null($this->jsonP)) {\r\n $query['callback'] = $this->jsonP;\r\n }\r\n\r\n $this->query = array_merge($query, $options);\r\n }", "public function createSearch($query);", "public function searchItems( EarthIT_Storage_Search $search, array $options=array() );", "private function applyRqlQuery()\n {\n $rqlQuery = $this->getRqlQuery();\n\n // Setting RQL Query\n if ($rqlQuery) {\n // Check if search and if this Repository have search indexes.\n if ($query = $rqlQuery->getQuery()) {\n if ($query instanceof AndNode) {\n foreach ($query->getQueries() as $xq) {\n if ($xq instanceof SearchNode && !$this->hasSearchIndex()) {\n throw new \\InvalidArgumentException('Search operation not supported on this endpoint');\n }\n }\n } elseif ($query instanceof SearchNode && !$this->hasSearchIndex()) {\n throw new \\InvalidArgumentException('Search operation not supported on this endpoint');\n }\n }\n\n $this->visitor->setRepository($this->repository);\n $this->queryBuilder = $this->visitor->visit($rqlQuery);\n }\n\n if (is_null($this->getDocumentId()) && $this->queryBuilder instanceof Builder) {\n $currentQuery = $this->queryBuilder->getQuery()->getQuery();\n\n /*** default sort ***/\n\n if (!array_key_exists('sort', $currentQuery)) {\n $this->queryBuilder->sort('_id');\n }\n\n /*** pagination stuff ***/\n if (!array_key_exists('limit', $currentQuery)) {\n $this->queryBuilder->skip($this->getPaginationSkip());\n $this->queryBuilder->limit($this->getPaginationPageSize());\n }\n }\n }", "public function query( $query, $options = 0 );", "public function BMLTPlugin_map_search_search_options(\n $in_options_id, ///< The ID for the options to use for this implementation.\n $in_uid ///< This is the UID of the enclosing div.\n ) {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n $options = $this->getBMLTOptions_by_id($in_options_id);\n $this->adapt_to_lang($options['lang']);\n $ret = '<div class=\"bmlt_map_container_div_search_options_div\" id=\"'.$in_uid.'_options\">';\n $ret .= '<div class=\"bmlt_map_options_1\">';\n $ret .= '<a class=\"bmlt_map_reveal_options\" id=\"'.$in_uid.'_options_1_a\" href=\"javascript:var a=document.getElementById(\\''.$in_uid.'_options_1_a\\');var b=document.getElementById(\\''.$in_uid.'_options_1\\');if(b &amp;&amp; a){if(b.style.display==\\'none\\'){a.className=\\'bmlt_map_hide_options\\';b.style.display=\\'block\\'}else{a.className=\\'bmlt_map_reveal_options\\';b.style.display=\\'none\\'}};c_ms_'.$in_uid.'.recalculateMapExt()\"><span>'.$this->process_text($this->my_current_language->local_new_map_option_1_label).'</span></a>';\n $ret .= '<div class=\"bmlt_map_container_div_search_options_div\" id=\"'.$in_uid.'_options_1\" style=\"display:none\">';\n $ret .= '<form action=\"#\" method=\"get\" onsubmit=\"return false\">';\n $ret .= '<fieldset class=\"bmlt_map_container_div_search_options_div_weekdays_fieldset\">';\n $ret .= '<legend>'.$this->process_text($this->my_current_language->local_new_map_weekdays).'</legend>';\n $ret .= '<div class=\"bmlt_map_container_div_search_options_weekday_checkbox_div\"><input title=\"'.$this->process_text($this->my_current_language->local_new_map_all_weekdays_title).'\" type=\"checkbox\" id=\"weekday_'.$in_uid.'_0\" checked=\"checked\" onchange=\"c_ms_'.$in_uid.'.recalculateMapExt(this)\" />';\n $ret .= '<label title=\"'.$this->process_text($this->my_current_language->local_new_map_all_weekdays_title).'\" for=\"weekday_'.$in_uid.'_0\">'.$this->process_text($this->my_current_language->local_new_map_all_weekdays).'</label></div>';\n for ($index = 1; $index < count($this->my_current_language->local_weekdays); $index++) {\n $weekday_index = ($index - 1) + $options['startWeekday'];\n \n if ($weekday_index > 7) {\n $weekday_index -= 7;\n }\n \n $weekday = $this->my_current_language->local_weekdays[$weekday_index];\n $ret .= '<div class=\"bmlt_map_container_div_search_options_weekday_checkbox_div\">';\n $ret .= '<input title=\"'.$this->process_text($this->my_current_language->local_new_map_weekdays_title.$weekday).'.\" type=\"checkbox\" id=\"weekday_'.$in_uid.'_'.htmlspecialchars($weekday_index).'\" onchange=\"c_ms_'.$in_uid.'.recalculateMapExt(this)\" />';\n $ret .= '<label title=\"'.$this->process_text($this->my_current_language->local_new_map_weekdays_title.$weekday).'.\" for=\"weekday_'.$in_uid.'_'.htmlspecialchars($weekday_index).'\">'.$this->process_text($weekday).'</label>';\n $ret .= '</div>';\n }\n $ret .= '</fieldset>';\n $ret .= '<fieldset class=\"bmlt_map_container_div_search_options_div_formats_fieldset\">';\n $ret .= '<legend>'.$this->process_text($this->my_current_language->local_new_map_formats).'</legend>';\n $ret .= '<div class=\"bmlt_map_container_div_search_options_formats_checkbox_div\">';\n $ret .= '<input title=\"'.$this->process_text($this->my_current_language->local_new_map_all_formats_title).'\" type=\"checkbox\" id=\"formats_'.$in_uid.'_0\" checked=\"checked\" onchange=\"c_ms_'.$in_uid.'.recalculateMapExt(this)\" />';\n $ret .= '<label title=\"'.$this->process_text($this->my_current_language->local_new_map_all_formats_title).'\" for=\"formats_'.$in_uid.'_0\">'.$this->process_text($this->my_current_language->local_new_map_all_formats).'</label>';\n $ret .= '</div>';\n $this->my_driver->set_m_root_uri($options['root_server']);\n $error = $this->my_driver->get_m_error_message();\n \n if ($error) {\n } else {\n $formats = $this->my_driver->get_server_formats();\n \n if (!$this->my_driver->get_m_error_message()) {\n $index = 1;\n foreach ($formats as $id => $format) {\n $ret .= '<div class=\"bmlt_map_container_div_search_options_formats_checkbox_div\"><input type=\"checkbox\" value=\"'.intval($id).'\" id=\"formats_'.$in_uid.'_'.$index.'\" onchange=\"c_ms_'.$in_uid.'.recalculateMapExt(this)\" title=\"'.$this->process_text('('.$format['name_string'] .') '.$format['description_string']).'\" />';\n $ret .= '<label title=\"'.$this->process_text('('.$format['name_string'] .') '.$format['description_string']).'\" for=\"formats_'.$in_uid.'_'.$index.'\">'.$this->process_text($format['key_string']).'</label></div>';\n $index++;\n }\n }\n }\n $ret .= '</fieldset>';\n $ret .= '</form>';\n $ret .= '</div>';\n $ret .= '</div>';\n $ret .= '</div>';\n return $ret;\n }", "public static function query($options = array())\n {\n return parent::query($options + array('order_by' => array('rac_rang')));\n }", "public function performSearch(array $options = [])\n {\n return [];\n }", "public static function find($q = \"\", array $values = null, array $options = array())\n\t{\n\t\t/*\n\t\t * TODO: use options to set sorting, range of result set\n\t\t */\n\t\t$query = \"SELECT * FROM \" . static::table();\n\t\t\n\t\tif($q){\n\t\t\t$query .= \" WHERE \" . $q;\n\t\t}\n\t\t\n\t\t\n\t\tif(!empty($values)){\n\t\t\t$stmt = self::database()->prepare($query);\n\t\t\t$stmt->execute($values);\n\t\t}\n\t\telse {\n\t\t\t$stmt = self::database()->query($query);\n\t\t}\n\t\t\n\t\t$obj = new static();\n\t\t$obj->_inDb = true;\n\t\t$stmt->setFetchMode(PDO::FETCH_CLASS, get_called_class(), array(true));\n\t\t\n\t\treturn $stmt;\n\t}", "public function search($fields, $query, array $options = null)\n {\n // normalize fields to array.\n $fields = (array) $fields;\n\n // split query into words.\n $query = preg_split('/[\\s,]+/', trim($query));\n\n // use default options if none provided.\n $options = $options !== null ? $options : array(\n P4_Model_Iterator::FILTER_CONTAINS,\n P4_Model_Iterator::FILTER_NO_CASE,\n P4_Model_Iterator::FILTER_IMPLODE,\n P4_Model_Iterator::FILTER_MATCH_ALL\n );\n\n // remove models that don't match search query.\n return $this->filter($fields, $query, $options);\n }", "protected function parse_search(&$q)\n {\n }", "public function generateSelect($select) {\n if (count($this->params)) {\n if (isset($this->params['search_type']) && isset($this->params['search_keyword']) && strlen($this->params['search_type']) && strlen($this->params['search_keyword'])) {\n if ($this->params['search_type'] === 'ALL') {\n /**\n * search all\n */\n if (count($this->searchs)) {\n $conditions = array();\n $select->where(function($query) {\n foreach ($this->searchs as $search) {\n $query->orWhere($search, 'like', \"%{$this->params['search_keyword']}%\");\n }\n });\n }\n } else {\n $select->where($this->searchs[$this->params['search_type']], 'like', \"%{$this->params['search_keyword']}%\");\n }\n }\n foreach ($this->params as $paramKey => $paramValue) {\n if (in_array($paramKey, array_keys($this->sorts))) {\n /**\n * sort\n */\n if ($paramValue === 'ASC') {\n $select->orderBy($this->sorts[$paramKey], 'ASC');\n } else {\n $select->orderBy($this->sorts[$paramKey], 'DESC');\n }\n } elseif (in_array($paramKey, array_keys($this->filters))) {\n /**\n * filter\n */\n $select->where($this->filters[$paramKey], $paramValue);\n }\n }\n }\n return $select;\n }", "public function findByQuestionSearch(QuestionSearch $dto)\n {\n $queryBuilder = $this->createQueryBuilder('ta');\n \n\n if(!empty($dto->search)){\n $queryBuilder ->andWhere(\n 'ta.title like :search'\n );\n $queryBuilder->setParameter('search','%'.$dto->search. '%');\n \n }\n \n \n return $queryBuilder->getQuery()->execute();\n }", "protected function searchAddResults(&$values, $q)\n {\n // $q is the Zend query the user typed.\n //\n // Override me! Add more items to the $values array here (note that it was passed by reference).\n // Example: $values[] = array('title' => 'Hi there', 'summary' => 'I like my blog', \n // 'link' => 'http://thissite/wherever', 'class' => 'blog_post', 'score' => 0.8)\n //\n // 'class' is used to set a CSS class (see searchSuccess.php) to distinguish result types.\n //\n // Best when used with results from a aZendSearch::searchLuceneWithValues call.\n //\n // IF YOU CHANGE THE ARRAY you must return true, otherwise it will not be sorted by score.\n return false;\n }", "public function requestSearch($q) {\n\t\t$q = strtoupper($q);\n\t\t$data = array('INVSEARCH', \"QUERY=$q\");\n\t\t$this->sendDplusRequest($data);\n\t}", "public function search(string $query, string $option = \"begin\")\n {\n $query = addslashes(htmlentities($query));\n\n switch ($option) :\n case \"begin\":\n return $this->query(\n \"SELECT * FROM {$this->table} WHERE nom LIKE ? \",\n [\"{$query}%\"],\n true,\n false\n );\n break;\n\n case \"end\":\n return $this->query(\n \"SELECT * FROM {$this->table} WHERE nom LIKE ? \",\n [\"%{$query}\"],\n true,\n false\n );\n break;\n\n case \"within\":\n return $this->query(\n \"SELECT * FROM {$this->table} WHERE nom LIKE ?\",\n [\"%{$query}%\"],\n true,\n false\n );\n break;\n\n case \"concat\":\n return $this->query(\n \"SELECT * FROM {$this->table} WHERE CONCAT(nom,second_nom,type) LIKE ? \",\n [\"%{$query}%\"],\n true,\n false\n );\n break;\n\n default:\n return null;\n endswitch;\n }", "public function searchUsers($q, $limit = null);", "public function search($options = array())\n\t{\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n $criteria=new CDbCriteria;\n $criteria->compare('id',$this->id);\n $criteria->compare('old_value',$this->old_value,true);\n $criteria->compare('new_value',$this->new_value,true);\n $criteria->compare('action',$this->action,true);\n $criteria->compare('model',$this->model,true);\n $criteria->compare('field',$this->field,true); \n \n // BUSCAR POR PERÍODO\n $inicio = explode('/', substr($this->stamp,0,10));\n $fim = explode('/', substr($this->stamp,13,10));\n //$criteria->addBetweenCondition('stamp', '2013/10/09 00:00:00', '2013/10/09 23:59:59');\n if(isset($this->stamp) && $this->stamp != ''){\n $criteria->addBetweenCondition('stamp', $inicio[2]. '-'. $inicio[1]. '-'. $inicio[0]. ' 00:00:00', $fim[2]. '-'. $fim[1]. '-'. $fim[0]. ' 23:59:59' );\n }\n\n $criteria->compare('user_id',$this->user_id);\n $criteria->compare('model_id',$this->model_id);\n $criteria->mergeWith($this->getDbCriteria());\n return new CActiveDataProvider(\n get_class($this),\n array_merge(\n array(\n 'criteria'=>$criteria,\n 'sort'=>array(\n 'defaultOrder'=>'stamp DESC',\n 'attributes'=>array('')\n )\n ),\n $options\n )\n );\n\t}", "protected function setSearch($search = 0) {\n\n $this->search = $search ? 1 : 0;\n }", "protected function getMatchesFromOptionsRecursive($q, array $options, array &$matches, $operator = 'CONTAINS') {\n foreach ($options as $label) {\n if (is_array($label)) {\n $this->getMatchesFromOptionsRecursive($q, $label, $matches, $operator);\n continue;\n }\n\n // Cast TranslatableMarkup to string.\n $label = (string) $label;\n\n if ($operator == 'STARTS_WITH' && stripos($label, $q) === 0) {\n $matches[$label] = [\n 'value' => $label,\n 'label' => $label,\n ];\n }\n // Default to CONTAINS even when operator is empty.\n elseif (stripos($label, $q) !== FALSE) {\n $matches[$label] = [\n 'value' => $label,\n 'label' => $label,\n ];\n }\n\n }\n }", "private function setSearch($search)\n {\n $this->search = $search;\n }", "protected function prepareGenericSearcher(\n array &$options\n ) {\n if (empty($options['searchdef']) || !is_array($options['searchdef'])) {\n $options['searchdef'] = array();\n }\n\n $model = $this->getEmptyModel();\n \\tx_rnbase::load('tx_rnbase_util_Arrays');\n $options['searchdef'] = \\tx_rnbase_util_Arrays::mergeRecursiveWithOverrule(\n // default searcher config\n array(\n 'usealias' => 1,\n 'basetable' => $model->getTableName(),\n 'basetablealias' => 'DEVLOGENTRY',\n 'wrapperclass' => get_class($model),\n 'alias' => array(\n 'DEVLOGENTRY' => array(\n 'table' => $model->getTableName(),\n ),\n ),\n ),\n // searcher config overrides\n $options['searchdef']\n );\n }", "protected function getMatchesFromOptions($q, array $options, $operator = 'CONTAINS', $limit = 10) {\n // Make sure options are populated.\n if (empty($options)) {\n return [];\n }\n\n $matches = [];\n\n // Filter and convert options to autocomplete matches.\n $this->getMatchesFromOptionsRecursive($q, $options, $matches, $operator);\n\n // Sort matches.\n ksort($matches);\n\n // Apply match limit.\n if ($limit) {\n $matches = array_slice($matches, 0, $limit);\n }\n\n return array_values($matches);\n }", "public function search($options = array())\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\t\t$criteria->condition=\"code like '$this->code%'\";\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t\n\t\treturn new CActiveDataProvider($this, CMap::mergeArray(array(\n\t\t\t'criteria'=>$criteria,\n\t\t),$options));\n\t}", "public function search($search, $per_page);", "function SetupSearchOptions() {\n\t\tglobal $Language;\n\t\t$this->SearchOptions = new cListOptions();\n\t\t$this->SearchOptions->Tag = \"div\";\n\t\t$this->SearchOptions->TagClassName = \"ewSearchOption\";\n\n\t\t// Button group for search\n\t\t$this->SearchOptions->UseDropDownButton = FALSE;\n\t\t$this->SearchOptions->UseImageAndText = TRUE;\n\t\t$this->SearchOptions->UseButtonGroup = TRUE;\n\t\t$this->SearchOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonSearch\");\n\n\t\t// Add group option item\n\t\t$item = &$this->SearchOptions->Add($this->SearchOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->Visible = FALSE;\n\n\t\t// Hide search options\n\t\tif ($this->Export <> \"\" || $this->CurrentAction <> \"\")\n\t\t\t$this->SearchOptions->HideAllOptions();\n\t\tglobal $Security;\n\t\tif (!$Security->CanSearch())\n\t\t\t$this->SearchOptions->HideAllOptions();\n\t}", "protected function addSearch(QueryBuilder $queryBuilder)\n {\n if ($this->search !== true) {\n return;\n }\n\n $request = $this->request->getCurrentRequest();\n\n $columns = $request->get('columns', array());\n\n $searchFields = array_intersect_key(array_values($this->fields), $columns);\n\n $globalSearch = $request->get('search');\n\n $orExpr = $queryBuilder->expr()->orX();\n\n $filteringType = $this->getFilteringType();\n\n foreach ($searchFields as $i => $searchField) {\n\n $searchField = $this->getSearchField($searchField);\n\n // Global filtering\n if ((!empty($globalSearch) || $globalSearch['value'] == '0') && $columns[$i]['searchable'] === \"true\") {\n\n $qbParam = \"sSearch_global_\" . $i;\n\n if ($this->isStringDQLQuery($searchField)) {\n\n $orExpr->add(\n $queryBuilder->expr()->eq($searchField, ':' . $qbParam)\n );\n $queryBuilder->setParameter($qbParam, $globalSearch['value']);\n\n } else {\n\n $orExpr->add($queryBuilder->expr()->like($searchField, \":\" . $qbParam));\n $queryBuilder->setParameter($qbParam, \"%\" . $globalSearch['value'] . \"%\");\n\n }\n }\n\n // Individual filtering\n $searchName = \"sSearch_\" . $i;\n\n if($columns[$i]['searchable'] === \"true\" && $columns[$i]['search']['value'] != \"\") {\n\n $queryBuilder->andWhere($queryBuilder->expr()->like($searchField, \":\" . $searchName));\n\n if (array_key_exists($i, $filteringType)) {\n switch ($filteringType[$i]) {\n case 's':\n $queryBuilder->setParameter($searchName, $columns[$i]['search']['value']);\n break;\n case 'f':\n $queryBuilder->setParameter($searchName, sprintf(\"%%%s%%\", $columns[$i]['search']['value']));\n break;\n case 'b':\n $queryBuilder->setParameter($searchName, sprintf(\"%%%s\", $columns[$i]['search']['value']));\n break;\n case 'e':\n $queryBuilder->setParameter($searchName, sprintf(\"%s%%\", $columns[$i]['search']['value']));\n break;\n }\n } else {\n $queryBuilder->setParameter($searchName, sprintf(\"%%%s%%\", $columns[$i]['search']['value']));\n }\n }\n }\n\n if ((!empty($globalSearch) || $globalSearch == '0') && $orExpr->count() > 0) {\n $queryBuilder->andWhere($orExpr);\n }\n }", "public function search($query);", "function SetupSearchOptions() {\n\t\tglobal $Language;\n\t\t$this->SearchOptions = new cListOptions();\n\t\t$this->SearchOptions->Tag = \"div\";\n\t\t$this->SearchOptions->TagClassName = \"ewSearchOption\";\n\n\t\t// Button group for search\n\t\t$this->SearchOptions->UseDropDownButton = FALSE;\n\t\t$this->SearchOptions->UseImageAndText = TRUE;\n\t\t$this->SearchOptions->UseButtonGroup = TRUE;\n\t\t$this->SearchOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonSearch\");\n\n\t\t// Add group option item\n\t\t$item = &$this->SearchOptions->Add($this->SearchOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->Visible = FALSE;\n\n\t\t// Hide search options\n\t\tif ($this->Export <> \"\" || $this->CurrentAction <> \"\")\n\t\t\t$this->SearchOptions->HideAllOptions();\n\t\tglobal $Security;\n\t\tif (!$Security->CanSearch()) {\n\t\t\t$this->SearchOptions->HideAllOptions();\n\t\t\t$this->FilterOptions->HideAllOptions();\n\t\t}\n\t}", "public function searchPosts($q, $limit = null);", "public function search($query, array $options = []) {\n\t\t$options['query'] = $query;\n\t\treturn $this->call('helper/search-campaigns', $options);\n\t}", "public function search($q)\n {\n $qb = $this->createQueryBuilder('j');\n $qb->where(\n $qb->expr()->like(\n new Func(\n 'CONCAT',\n array(\n 'j.name',\n )\n ),\n \"'%$q%'\"\n )\n );\n $query = $qb->getQuery();\n $providers = $query->getResult();\n\n return $providers;\n }", "public function addServicosQuery(Doctrine_Query $q = null, $id)\n {\n if (is_null($q))\n {\n $q = Doctrine_Query::create()\n ->from('Servico_item j');\n }\n\n $alias = $q->getRootAlias();\n $q->andWhere($alias.'.orcamento_id = ?', $id);\n\n return $q;\n }", "function SetupSearchOptions() {\n\t\tglobal $Language;\n\t\t$this->SearchOptions = new cListOptions();\n\t\t$this->SearchOptions->Tag = \"div\";\n\t\t$this->SearchOptions->TagClassName = \"ewSearchOption\";\n\n\t\t// Search button\n\t\t$item = &$this->SearchOptions->Add(\"searchtoggle\");\n\t\t$SearchToggleClass = ($this->SearchWhere <> \"\") ? \" active\" : \" active\";\n\t\t$item->Body = \"<button type=\\\"button\\\" class=\\\"btn btn-default ewSearchToggle\" . $SearchToggleClass . \"\\\" title=\\\"\" . $Language->Phrase(\"SearchPanel\") . \"\\\" data-caption=\\\"\" . $Language->Phrase(\"SearchPanel\") . \"\\\" data-toggle=\\\"button\\\" data-form=\\\"fshift_resultlistsrch\\\">\" . $Language->Phrase(\"SearchBtn\") . \"</button>\";\n\t\t$item->Visible = TRUE;\n\n\t\t// Show all button\n\t\t$item = &$this->SearchOptions->Add(\"showall\");\n\t\t$item->Body = \"<a class=\\\"btn btn-default ewShowAll\\\" title=\\\"\" . $Language->Phrase(\"ShowAll\") . \"\\\" data-caption=\\\"\" . $Language->Phrase(\"ShowAll\") . \"\\\" href=\\\"\" . $this->PageUrl() . \"cmd=reset\\\">\" . $Language->Phrase(\"ShowAllBtn\") . \"</a>\";\n\t\t$item->Visible = ($this->SearchWhere <> $this->DefaultSearchWhere && $this->SearchWhere <> \"0=101\");\n\n\t\t// Button group for search\n\t\t$this->SearchOptions->UseDropDownButton = FALSE;\n\t\t$this->SearchOptions->UseImageAndText = TRUE;\n\t\t$this->SearchOptions->UseButtonGroup = TRUE;\n\t\t$this->SearchOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonSearch\");\n\n\t\t// Add group option item\n\t\t$item = &$this->SearchOptions->Add($this->SearchOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->Visible = FALSE;\n\n\t\t// Hide search options\n\t\tif ($this->Export <> \"\" || $this->CurrentAction <> \"\")\n\t\t\t$this->SearchOptions->HideAllOptions();\n\t\tglobal $Security;\n\t\tif (!$Security->CanSearch()) {\n\t\t\t$this->SearchOptions->HideAllOptions();\n\t\t\t$this->FilterOptions->HideAllOptions();\n\t\t}\n\t}", "public abstract function search($query);", "public function add_search_criteria_to_wp_query_join($join)\n {\n }", "public function search($type = \"Web\", $q = '')\n {\n $this->buildQuery = $type . \"?Query=\" . urlencode(\"'$q'\");\n }", "function search ($searchText, $lang);", "public function search($search);", "function query($search)\n {\n $this->requestDecorator->addParameter('query', '=', $search);\n return $this;\n }", "public function search(){\n $modelCass = $this->models[2];\n $field = $this->data['field'];\n $what = $this->data['recherche'];\n if(!empty($what) && !empty($field)){\n if($this->$modelCass->isDateUsFr($what)){\n $what = $this->$modelCass->dateUs($what);\n }\n $d['searchResults'] = $this->$modelCass->search(array('field' => $field,\n 'what' => $what));\n if($d['searchResults']){\n foreach ($d['searchResults'] as $key => $value){\n $d['searchResults'][$key]['date_sortie'] = $this->$modelCass->dateFr($value['date_sortie']);\n }\n }\n $this->set($d);\n }\n }", "public static function weighted_search($className, $q, array $fields = array('Content' => 1,'Title' => 3), $start = 0, $limit = 10, $filterSql = null, $filterUnionSql = null) {\n\n // sort out the cache\n $implodedArgs = $className . '_' . $q . '_' . implode('_', $fields) . '_' . $start . '_' . $limit . '_' . $filterSql;\n $cachekey = preg_replace(\"/[^A-Za-z0-9]/\", '_', __FUNCTION__ . \"_\" . $implodedArgs);\n $cache = SS_Cache::Factory(\n 'DataObjectSearch',\n 'Output',\n array(\n 'lifetime' => static::get_cache_time(),\n 'automatic_serialization' => true\n )\n );\n $set = $cache->load($cachekey);\n\n // dont hit the db if we don't need to\n if (!$set) {\n\n // parse terms\n // need to analyse various fragments like first 3 words, last 3 words\n $terms = array_merge(static::str_to_terms($q), static::str_to_fragments($q));\n $terms[] = $q;\n $terms = array_unique($terms);\n\n // Set some vars\n $set = new ArrayList;\n $db = AbcDB::getInstance();\n $sql = '';\n\n // expand search to subclasses\n $classes = array_merge(ClassInfo::subclassesFor($className), array($className));\n\n // iterate through list\n foreach ($classes as $className) {\n\n // Fetch Class Data\n $table = DataObjectHelper::getTableForClass($className);\n\n foreach ($fields as $field => $weight) {\n foreach ($terms as $term) {\n\n // init the recivers\n $tables = $joins = $filter = array();\n\n // $tables we are working with\n if ($table) $tables[$table] = $table;\n\n // Where\n if ($table) $where[$table][] = $table . \".ClassName = '\" . $className . \"'\";\n\n // find the table the property is on\n $extTable = DataObjectHelper::getExtensionTableForClassWithProperty($className, $field);\n\n // join\n if ( $table && $extTable && $table!=$extTable ) {\n $joins[$table][] = $extTable;\n } elseif ($extTable) {\n $tables[$extTable] = $extTable;\n }\n\n // ext table\n if ($extTable) {\n $filter[$table][] = $extTable . \".\" . $field . \" LIKE '%\" . Convert::raw2sql($term) . \"%'\";\n } else {\n $filter[$table][] = $table . \".\" . $field . \" LIKE '%\" . Convert::raw2sql($term) . \"%'\";\n }\n\n // Build Query\n foreach($tables as $table){\n\n // Prepare Where Statement\n $uWhere = array_unique($where[$table]);\n $uFilter = array_unique($filter[$table]);\n\n // Where SQL\n $wSql = \"(\".implode(' OR ',$uWhere).\") AND (\".implode(' OR ',$uFilter).\")\";\n\n // Make the rest of the SQL\n if ($sql) $sql.= \" ) UNION ALL (\".\"\\n\\n\";\n $sql.= \"SELECT \" . $table . \".ClassName, \" . $table . \".ID, \" . $weight . \" AS weight\" . \"\\n\";\n $sql.= \"FROM \" . $table . \"\\n\";\n\n // join\n if (array_key_exists($table, $joins)){\n $join = array_unique($joins[$table]);\n foreach($join as $j){\n $sql .= \" LEFT JOIN \" . $j . \" ON \" . $table . \".ID = \" . $j . \".ID\" . \"\\n\";\n }\n }\n\n // Add the WHERE statement\n $sql .= \"WHERE \" . $wSql . \"\\n\\n\";\n }\n\n // Add Global Filter to Query\n if ($filterSql) {\n $sql .= (count($tables) == 1 ? \"AND \" : \"WHERE \") . $filterSql;\n }\n }\n }\n }\n // Add Limits and order to Query\n $sql = \"\n SELECT SQL_CALC_FOUND_ROWS t1.ClassName, t1.ID, SUM(t1.weight) AS total_weight\n FROM ((\" . $sql . \")) AS t1\n \" . ($filterUnionSql != null ? $filterUnionSql : \"\") . \"\n GROUP BY ID, ClassName\n ORDER BY total_weight DESC\n LIMIT \" . $start . \",\" . $limit . \"\n \";\n\n // Get Data\n // die($sql);\n $result = $db->query($sql);\n $result = $result ? $result->fetchAll(PDO::FETCH_OBJ) : array() ;\n\n // Convert to DOs\n foreach( $result as $entry ){\n\n // Make the data easier to work with\n $entry = (object) $entry;\n $className = $entry->ClassName;\n\n // this is slower, but will be more reliable\n $dO = DataObject::get_by_id($className, $entry->ID);\n\n $set->push($dO);\n }\n\n // stash total length\n $res = $db->query('SELECT FOUND_ROWS() AS total');\n $set->unlimitedRowCount = 0;\n if (!empty($res)) {\n $resObj = $res->fetch(PDO::FETCH_OBJ);\n if (!empty($resObj)) {\n $set->unlimitedRowCount = $resObj->total;\n }\n }\n\n // cache\n $cache->save($set, $cachekey);\n }\n\n return $set;\n }", "private function search($what, $class_name, array $options)\n\t{\n\t\t$options[] = Dao::sort();\n\t\tif (\n\t\t\t($what instanceof Logical)\n\t\t\t&& ($what->operator == Logical::OR_OPERATOR)\n\t\t\t&& (count($what->arguments) > 1)\n\t\t) {\n\t\t\t$objects = new Map();\n\t\t\tforeach ($what->arguments as $argument_key => $argument) {\n\t\t\t\t$objects->add(Dao::search([$argument_key => $argument], $class_name, $options));\n\t\t\t}\n\t\t\t$objects = $objects->sort();\n\t\t\tforeach ($options as $option) {\n\t\t\t\tif (($option instanceof Limit) && (count($objects) > $option->count)) {\n\t\t\t\t\t$objects = array_slice($objects, $option->from, $option->count, true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$objects = Dao::search($what, $class_name, $options);\n\t\t}\n\t\treturn $objects;\n\t}", "public function search() {\n $query = new Query();\n $this->addQuery($query, self::SEARCH);\n return $query;\n }", "protected function getSearchForm($options = []) {\n\t\tview()->share('searchFormOptions', $options);\n\t}", "public function setSearchService(SearchService $searchService);", "public function search(array $search, int $page = 1, int $limit = self::LIMIT): PaginationInterface\n {\n $qb = $this->repository->createQueryBuilder('p');\n\n if (!empty($search['search'])) {\n $data = \"%{$search['search']}%\";\n $qb->andWhere($qb->expr()->like('p.birthName', ':search'))\n ->orWhere($qb->expr()->like('p.email', ':search'))\n ->orWhere($qb->expr()->like('p.facebook', ':search'))\n ->orWhere($qb->expr()->like('p.familyName', ':search'))\n ->orWhere($qb->expr()->like('p.givenName', ':search'))\n ->orWhere($qb->expr()->like('p.instagram', ':search'))\n ->orWhere($qb->expr()->like('p.jobTitle', ':search'))\n ->orWhere($qb->expr()->like('p.linkedIn', ':search'))\n ->orWhere($qb->expr()->like('p.twitter', ':search'))\n ->orWhere($qb->expr()->like('p.url', ':search'))\n ->orWhere($qb->expr()->like('p.youtube', ':search'))\n ->setParameter('search', $data);\n }\n\n //TODO Add filter when region are not empty\n if (!empty($search['category'])) {\n $qb->innerJoin('p.category', 'c')\n ->andWhere('c.id = :id')\n ->setParameter('id', $search['category']);\n }\n\n if (!empty($search['department'])) {\n $qb->leftJoin('p.address', 'a')\n ->leftJoin('p.memberOf', 'm')\n ->leftJoin('m.address', 'ao')\n ->andWhere(\n $qb->expr()->orX(\n $qb->expr()->andX(\n $qb->expr()->like('a.postalCode', ':department'),\n $qb->expr()->eq('a.country', ':france')\n ),\n $qb->expr()->andX(\n $qb->expr()->like('ao.postalCode', ':department'),\n $qb->expr()->eq('ao.country', ':france')\n )\n )\n )\n ->setParameter('department', $search['department'].'%')\n ->setParameter('france', 'FR')\n ;\n }\n\n $qb->getQuery();\n\n $pagination = $this->paginator->paginate($qb, $page, $limit);\n\n return $pagination;\n }", "public abstract function searchQuery();", "public function setSearchQuery($query){\n\t\t$this->_query = $query;\n\t}", "public function searchGames(Array $options){\n $paginator = $this->gameRepository->search($options['keyword'],$options['order'],$options['limit'],$options['offset']);\n $games = $paginator->getCurrentPageResults();\n foreach ($games as $game){\n $game->setPicture($this->fileService->getBase64FileDatas($game->getPicture()));\n }\n $result['totalItems'] = $paginator->getNbResults();\n $result['games'] = $games;\n return $result;\n }", "public function where($options) {\n $this->options = $options;\n return $this;\n }", "public function getCharitiesBySearchSelect($search_str) {\n $searchStr = '%'.$search_str.'%';\n $select = new Zend_Db_Select($this->getAdapter());\n $select->from(array('c'=>'charities'))\n ->joinLeft(array('s'=>'pie_slices'),\n 's.recipient_id = c.charity_id AND s.recipient_type = \"CHARITY\"',\n array('followers'=>'COUNT(s.slice_id)')\n )\n ->where('c.name LIKE ?',$searchStr)\n ->group('c.charity_id');\n return $select;\n }", "private function prepareSearchQuery($args) {\n\n // Prepare a query for the respective Search API index.\n $this->query = $this->index->query();\n\n // Adding query conditions if they exist.\n if ($args['conditions']) {\n $this->addConditions($args['conditions']);\n }\n // Adding Solr specific parameters if they exist.\n if ($args['solr_params']) {\n $this->addSolrParams($args['solr_params']);\n }\n // Restrict the search to specific languages.\n if ($args['language']) {\n $this->query->setLanguages($args['language']);\n }\n // Set fulltext search parameters in the query.\n if ($args['fulltext']) {\n $this->setFulltextFields($args['fulltext']);\n }\n // Adding range parameters to the query (e.g for pagination).\n if ($args['range']) {\n $this->query->range($args['range']['start'], $args['range']['end']);\n }\n // Adding sort parameters to the query.\n if ($args['sort']) {\n $this->query->sort($args['sort']['field'], $args['sort']['value']);\n }\n // Adding facets to the query.\n if ($args['facets']) {\n $this->setFacets($args['facets']);\n }\n }", "function SetupSearchOptions() {\n\t\tglobal $Language;\n\t\t$this->SearchOptions = new cListOptions();\n\t\t$this->SearchOptions->Tag = \"div\";\n\t\t$this->SearchOptions->TagClassName = \"ewSearchOption\";\n\n\t\t// Search button\n\t\t$item = &$this->SearchOptions->Add(\"searchtoggle\");\n\t\t$SearchToggleClass = ($this->SearchWhere <> \"\") ? \" active\" : \" active\";\n\t\t$item->Body = \"<button type=\\\"button\\\" class=\\\"btn btn-default ewSearchToggle\" . $SearchToggleClass . \"\\\" title=\\\"\" . $Language->Phrase(\"SearchPanel\") . \"\\\" data-caption=\\\"\" . $Language->Phrase(\"SearchPanel\") . \"\\\" data-toggle=\\\"button\\\" data-form=\\\"fview_e_y_nlistsrch\\\">\" . $Language->Phrase(\"SearchBtn\") . \"</button>\";\n\t\t$item->Visible = TRUE;\n\n\t\t// Show all button\n\t\t$item = &$this->SearchOptions->Add(\"showall\");\n\t\t$item->Body = \"<a class=\\\"btn btn-default ewShowAll\\\" title=\\\"\" . $Language->Phrase(\"ShowAll\") . \"\\\" data-caption=\\\"\" . $Language->Phrase(\"ShowAll\") . \"\\\" href=\\\"\" . $this->PageUrl() . \"cmd=reset\\\">\" . $Language->Phrase(\"ShowAllBtn\") . \"</a>\";\n\t\t$item->Visible = ($this->SearchWhere <> $this->DefaultSearchWhere && $this->SearchWhere <> \"0=101\");\n\n\t\t// Button group for search\n\t\t$this->SearchOptions->UseDropDownButton = FALSE;\n\t\t$this->SearchOptions->UseImageAndText = TRUE;\n\t\t$this->SearchOptions->UseButtonGroup = TRUE;\n\t\t$this->SearchOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonSearch\");\n\n\t\t// Add group option item\n\t\t$item = &$this->SearchOptions->Add($this->SearchOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->Visible = FALSE;\n\n\t\t// Hide search options\n\t\tif ($this->Export <> \"\" || $this->CurrentAction <> \"\")\n\t\t\t$this->SearchOptions->HideAllOptions();\n\t\tglobal $Security;\n\t\tif (!$Security->CanSearch())\n\t\t\t$this->SearchOptions->HideAllOptions();\n\t}", "private function setAdvancedFilters($q, $params)\n {\n // reseta os valores\n $condition = array();\n $values = array();\n\n $filters = $params['advanced'];\n \n if (is_array($filters))\n {\n $encoded = false;\n }\n else\n {\n $encoded = true;\n $filters = json_decode($filters);\n }\n\n if (is_array($filters))\n {\n for ($i=0;$i<count($filters);$i++)\n {\n $filter = $filters[$i];\n\n // assign filter data (location depends if encoded or not)\n if ($encoded)\n {\n $field = $filter->field;\n $value = $filter->value;\n $compare = isset($filter->comparison) ? $filter->comparison : null;\n $filterType = $filter->type;\n } else\n {\n $field = $filter['field'];\n $value = $filter['value'];\n $compare = isset($filter['comparison']) ? $filter['comparison'] : null;\n $filterType = $filter['type'];\n }\n\n if (!preg_match('/\\./', $field))\n {\n $field = 'c.'.$field;\n }\n \n switch($filterType)\n {\n case 'string' : \n $condition[] = $field.\" stringSearch\";\n $values[] = \"%$value%\";\n break;\n case 'list' :\n $q->andWhereIn($field, $value);\n\n /*if (strstr($value,','))\n {\n $fi = explode(',',$value);\n for ($k=0;$k<count($fi);$k++)\n {\n $fi[$k] = \"'\".$fi[$k].\"'\";\n }\n $condition[] = $field.\" listSearch\";\n $value = implode(',',$fi);\n $values[] = $value;\n }\n else\n {\n $condition[] = $field;\n $values[] = $value;\n }*/\n break;\n case 'boolean' :\n $condition[] = $field;\n $values[] = $value;\n break;\n case 'numeric' :\n case 'date':\n switch ($compare)\n {\n case 'eq' : \n $condition[] = $field.\" gt\";\n $values[] = $value.\" 00:00:00\";\n $condition[] = $field.\" lt\";\n $values[] = $value.\" 23:59:59\";\n break;\n case 'lt' : \n $condition[] = $field.\" lt\";\n $values[] = $value;\n break;\n case 'gt' : \n $condition[] = $field.\" gt\";\n $values[] = $value;\n break;\n }\n break;\n }\n }\n }\n\n if (!empty ($condition))\n {\n $str = $this->setSearchTypes(implode(' AND ',$condition));\n //echo $str;\n //print_r($values);\n \n $q->andWhere($str,$values);\n\n }\n \n }", "public function addSearch($title = NULL, $sqlField = NULL, $type = NULL) {\n $this->items[$this->index]['searches'][] = array('title' => $title, 'sqlField' => $sqlField, 'type' => $type);\n return $this;\n }", "public function set_search($search)\n\t\t{\n\t\t\t$this->set_config(\"search\", $search);\n\t\t}", "public function setQueryAlt(string $q): \\SolrDisMaxQuery {}", "public function setSearch($var)\n {\n GPBUtil::checkString($var, True);\n $this->search = $var;\n\n return $this;\n }", "protected function addItemServicoQuery (Doctrine_Query $q = null){\n\n if (is_null($q)) {\n $q = Doctrine_Query::create()\n ->from('Servico_item j');\n }\n\n $alias = $q->getRootAlias();\n\n return $q;\n }", "function forbes_search_add_query_vars_filter( $vars ){\n $vars[] = \"searchOpt\";\n return $vars;\n}", "protected static function buildFindQuery(array $arrOptions)\n {\n $objBase = DcaExtractor::getInstance($arrOptions['table']);\n $hasTranslations = (static::countTranslatedProducts() > 0);\n $hasVariants = (ProductType::countByVariants() > 0);\n\n $arrJoins = array();\n $arrFields = array(\n $arrOptions['table'] . '.*',\n \"'\" . str_replace('-', '_', $GLOBALS['TL_LANGUAGE']) . \"' AS language\",\n );\n\n if ($hasVariants) {\n $arrFields[] = sprintf(\n 'IF(%s.pid>0, parent.type, %s.type) AS type',\n $arrOptions['table'],\n $arrOptions['table']\n );\n }\n\n if ($hasTranslations) {\n foreach (Attribute::getMultilingualFields() as $attribute) {\n $arrFields[] = \"IFNULL(translation.$attribute, \" . $arrOptions['table'] . \".$attribute) AS $attribute\";\n }\n }\n\n foreach (Attribute::getFetchFallbackFields() as $attribute) {\n $arrFields[] = \"{$arrOptions['table']}.$attribute AS {$attribute}_fallback\";\n }\n\n if ($hasTranslations) {\n $arrJoins[] = sprintf(\n \" LEFT OUTER JOIN %s translation ON %s.id=translation.pid AND translation.language='%s'\",\n $arrOptions['table'],\n $arrOptions['table'],\n str_replace('-', '_', $GLOBALS['TL_LANGUAGE'])\n );\n\n $arrOptions['group'] = (empty($arrOptions['group']) ? '' : $arrOptions['group'].', ') . 'translation.id';\n }\n\n if ($hasVariants) {\n $arrJoins[] = sprintf(\n ' LEFT OUTER JOIN %s parent ON %s.pid=parent.id',\n $arrOptions['table'],\n $arrOptions['table']\n );\n }\n\n $arrFields[] = 'GROUP_CONCAT(c.page_id) AS product_categories';\n $arrJoins[] = sprintf(\n ' LEFT OUTER JOIN %s c ON %s=c.pid',\n ProductCategory::getTable(),\n ($hasVariants ? \"IFNULL(parent.id, {$arrOptions['table']}.id)\" : \"{$arrOptions['table']}.id\")\n );\n\n if ('c.sorting' === ($arrOptions['order'] ?? '')) {\n $arrFields[] = 'c.sorting';\n\n $arrOptions['group'] = (null === $arrOptions['group'] ? '' : $arrOptions['group'].', ') . 'c.id';\n }\n\n if ($objBase->hasRelations()) {\n $intCount = 0;\n\n foreach ($objBase->getRelations() as $strKey => $arrConfig) {\n // Automatically join the single-relation records\n if (('eager' === $arrConfig['load'] || ($arrOptions['eager'] ?? false))\n && ('hasOne' === $arrConfig['type'] || 'belongsTo' === $arrConfig['type'])\n ) {\n if (\\is_array($arrOptions['joinAliases'] ?? null)\n && ($key = array_search($arrConfig['table'], $arrOptions['joinAliases'], true)) !== false\n ) {\n $strJoinAlias = $key;\n unset($arrOptions['joinAliases'][$key]);\n } else {\n ++$intCount;\n $strJoinAlias = 'j' . $intCount;\n }\n\n $objRelated = DcaExtractor::getInstance($arrConfig['table']);\n\n foreach ($objRelated->getFields() as $strField => $config) {\n $arrFields[] = $strJoinAlias . '.' . $strField . ' AS ' . $strKey . '__' . $strField;\n }\n\n $arrJoins[] = sprintf(\n ' LEFT JOIN %s %s ON %s.%s=%s.id',\n $arrConfig['table'],\n $strJoinAlias,\n $arrOptions['table'],\n $strKey,\n $strJoinAlias\n );\n }\n }\n }\n\n // Generate the query\n $strQuery = 'SELECT ' . implode(', ', $arrFields) . ' FROM ' . $arrOptions['table'] . implode('', $arrJoins);\n\n // Where condition\n if (!\\is_array($arrOptions['column'] ?? null)) {\n $arrOptions['column'] = array($arrOptions['table'] . '.' . $arrOptions['column'] . '=?');\n }\n\n // The model must never find a language record\n $strQuery .= \" WHERE {$arrOptions['table']}.language='' AND \" . implode(' AND ', $arrOptions['column']);\n\n // Group by\n if (($arrOptions['group'] ?? null) !== null) {\n $strQuery .= ' GROUP BY ' . $arrOptions['group'];\n }\n\n // Order by\n if (($arrOptions['order'] ?? null) !== null) {\n $strQuery .= ' ORDER BY ' . $arrOptions['order'];\n }\n\n return $strQuery;\n }", "public function search($searchTerm)\n {\n if (is_numeric($searchTerm) && $this->_config->get('search.searchForSolutionId')) {\n parent::search($searchTerm);\n } else {\n $relevance = $this->_config->get('search.enableRelevance');\n $columns = $this->getResultColumns();\n\n if ($this->relevanceSupport && $relevance) {\n $columns .= $this->getMatchingColumnsAsResult($searchTerm);\n $orderBy = 'ORDER BY '.$this->getMatchingOrder().' DESC';\n } else {\n $orderBy = '';\n }\n\n $chars = [\n \"\\xe2\\x80\\x98\",\n \"\\xe2\\x80\\x99\",\n \"\\xe2\\x80\\x9c\",\n \"\\xe2\\x80\\x9d\",\n \"\\xe2\\x80\\x93\",\n \"\\xe2\\x80\\x94\",\n \"\\xe2\\x80\\xa6\",\n ];\n $replace = [\"'\", \"'\", '\"', '\"', '-', '--', '...'];\n $searchTerm = str_replace($chars, $replace, $searchTerm);\n\n $query = sprintf(\"\n SELECT\n %s\n FROM \n %s %s %s\n WHERE\n MATCH (%s) AGAINST ('%s' IN BOOLEAN MODE)\n %s\n %s\",\n $columns,\n $this->getTable(),\n $this->getJoinedTable(),\n $this->getJoinedColumns(),\n $this->getMatchingColumns(),\n $this->_config->getDb()->escape($searchTerm),\n $this->getConditions(),\n $orderBy\n );\n\n $this->resultSet = $this->_config->getDb()->query($query);\n\n // Fallback for searches with less than three characters\n if (false !== $this->resultSet && 0 === $this->_config->getDb()->numRows($this->resultSet)) {\n $query = sprintf('\n SELECT\n %s\n FROM \n %s %s %s\n WHERE\n %s\n %s',\n $this->getResultColumns(),\n $this->getTable(),\n $this->getJoinedTable(),\n $this->getJoinedColumns(),\n $this->getMatchClause($searchTerm),\n $this->getConditions()\n );\n\n $this->resultSet = $this->_config->getDb()->query($query);\n }\n }\n\n return $this->resultSet;\n }", "public function search($query)\n {\n $this->_lastQuery = $query;\n $this->_index = $this->queryOptions[\"start\"];\n $this->_result = null;\n }", "public function createQuery($type, $options = null): AbstractQuery;", "protected function getSearchForm($options = [])\n\t{\n\t\tview()->share('searchFormOptions', $options);\n\t}", "function search($options = array()) {\n\t\t\t\t\t\t\n\t\t$query = '/v1/people';\n\t\t\n\t\t$first = true;\n\t\tforeach($options as $key => $value) {\n\t\t\tif($first == true) {\n\t\t\t\t$separator = '?';\n\t\t\t} else {\n\t\t\t\t$separator = '&';\n\t\t\t}\n\t\t\t\n\t\t\t$query .= $separator.$key.'='.urlencode($value);\n\t\t\t\n\t\t\t$first = false;\n\t\t}\n\t\t\n\t\treturn $this->get($this->apiUrl.$query);\n\t}", "public function searchForm ($model = null, $options = array()) {\n \n $label = $this->_extractOption('label', $options, false) ;\n unset($options['label']) ;\n $placeholder = $this->_extractOption('placeholder', $options, 'Search... ') ;\n unset($options['placeholder']) ;\n $button = $this->_extractOption('button', $options, 'Search') ;\n unset($options['button']) ;\n \n $output = '' ;\n \n $output .= $this->create($model, array_merge(array('search' => true, 'inline' => (bool)$label), $options)) ;\n $output .= $this->input('search', array(\n 'label' => $label,\n 'placeholder' => $placeholder,\n 'append' => array(\n $this->button($button, array('style' => 'vertical-align: middle'))\n )\n )) ;\n $output .= $this->end() ;\n \n return $output ;\n }", "public function perform_search($q){\r\n\r\n $result = array();\r\n $limit = get_option('limit_top_search_bar_results_to');\r\n // Clients\r\n $this->db->select()\r\n ->join('tblcountries','tblcountries.country_id = tblclients.country')\r\n ->from('tblclients')\r\n ->like('firstname',$q)\r\n ->or_like('lastname',$q)\r\n ->or_like('email',$q)\r\n ->or_like(\"CONCAT(firstname, ' ', lastname)\", $q)\r\n ->or_like('company',$q)\r\n ->or_like('vat',$q)\r\n ->or_like('phonenumber',$q)\r\n ->or_like('city',$q)\r\n ->or_like('zip',$q)\r\n ->or_like('state',$q)\r\n ->or_like('address',$q)\r\n ->or_like('tblcountries.short_name',$q)\r\n ->or_like('tblcountries.long_name',$q)\r\n ->or_like('tblcountries.numcode',$q)\r\n ->or_like('tblcountries.calling_code',$q)\r\n ->limit($limit);\r\n\r\n $result['clients'] = $this->db->get()->result_array();\r\n\r\n // Staff\r\n $this->db->select()\r\n ->from('tblstaff')\r\n ->like('firstname',$q)\r\n ->or_like('lastname',$q)\r\n ->or_like(\"CONCAT(firstname, ' ', lastname)\", $q, FALSE)\r\n ->or_like('facebook',$q)\r\n ->or_like('linkedin',$q)\r\n ->or_like('phonenumber',$q)\r\n ->or_like('email',$q)\r\n ->or_like('skype',$q)\r\n ->limit($limit);\r\n\r\n $result['staff'] = $this->db->get()->result_array();\r\n\r\n // Tickets\r\n $this->db->select()\r\n ->join('tbldepartments','tbldepartments.departmentid = tbltickets.department')\r\n ->from('tbltickets')\r\n ->like('ticketid',$q)\r\n ->or_like('subject',$q)\r\n ->or_like('message',$q)\r\n ->or_like('tbldepartments.name',$q)\r\n ->limit($limit);\r\n\r\n $result['tickets'] = $this->db->get()->result_array();\r\n\r\n // Surveys\r\n $this->db->select()\r\n ->from('tblsurveys')\r\n ->like('subject',$q)\r\n ->or_like('slug',$q)\r\n ->or_like('description',$q)\r\n ->or_like('viewdescription',$q)\r\n ->limit($limit);\r\n\r\n $result['surveys'] = $this->db->get()->result_array();\r\n\r\n // Knowledge base articles\r\n $this->db->select()\r\n ->from('tblknowledgebase')\r\n ->like('subject',$q)\r\n ->or_like('description',$q)\r\n ->or_like('slug',$q)\r\n ->limit($limit);\r\n\r\n $result['knowledge_base_articles'] = $this->db->get()->result_array();\r\n\r\n // Leads\r\n $this->db->select()\r\n ->from('tblleads')\r\n ->like('name',$q)\r\n ->or_like('email',$q)\r\n ->or_like('phonenumber',$q)\r\n ->or_like('notes',$q)\r\n ->limit($limit);\r\n\r\n $result['leads'] = $this->db->get()->result_array();\r\n\r\n // Staff tasks\r\n $this->db->select()\r\n ->from('tblstafftasks')\r\n ->like('name',$q)\r\n ->or_like('priority',$q)\r\n ->or_like('description',$q)\r\n ->limit($limit);\r\n\r\n $result['tasks'] = $this->db->get()->result_array();\r\n\r\n // Contracts\r\n $this->db->select()\r\n ->from('tblcontracts')\r\n ->like('description',$q)\r\n ->or_like('subject',$q)\r\n ->limit($limit);\r\n\r\n $result['contracts'] = $this->db->get()->result_array();\r\n\r\n // Invoice payment records\r\n $this->db->select('*,tblinvoicepaymentrecords.id as paymentid')\r\n ->from('tblinvoicepaymentrecords')\r\n ->join('tblinvoicepaymentsmodes','tblinvoicepaymentrecords.paymentmode = tblinvoicepaymentsmodes.id','LEFT')\r\n ->like('tblinvoicepaymentrecords.id',$q)\r\n ->or_like('paymentmode',$q)\r\n ->or_like('tblinvoicepaymentsmodes.name',$q)\r\n ->or_like('invoiceid',$q)\r\n ->limit($limit);\r\n\r\n $result['invoice_payment_records'] = $this->db->get()->result_array();\r\n\r\n // Invoices\r\n $this->db->select('*,tblinvoices.id as invoiceid')\r\n ->from('tblinvoices')\r\n ->join('tblclients','tblclients.userid = tblinvoices.clientid')\r\n ->join('tblcurrencies','tblcurrencies.id = tblinvoices.currency')\r\n ->like('number',$q)\r\n ->or_like('year',$q)\r\n ->or_like(\"CONCAT(firstname, ' ', lastname)\", $q, FALSE)\r\n ->or_like('company',$q)\r\n ->or_like('clientnote',$q)\r\n ->or_like('email',$q)\r\n ->or_like('vat',$q)\r\n ->or_like('phonenumber',$q)\r\n ->or_like('city',$q)\r\n ->or_like('zip',$q)\r\n ->or_like('state',$q)\r\n ->or_like('address',$q)\r\n ->or_like('adminnote',$q)\r\n ->or_like('tblinvoices.id',$q)\r\n ->or_like('token',$q)\r\n ->limit($limit);\r\n\r\n $result['invoices'] = $this->db->get()->result_array();\r\n\r\n // Expenses\r\n $this->db->select('*,tblexpenses.amount as amount,tblexpensescategories.name as category_name,tblinvoicepaymentsmodes.name as payment_mode_name,tbltaxes.name as tax_name, tblexpenses.id as expenseid')\r\n ->from('tblexpenses')\r\n ->join('tblclients', 'tblclients.userid = tblexpenses.clientid', 'left')\r\n ->join('tblinvoicepaymentsmodes', 'tblinvoicepaymentsmodes.id = tblexpenses.paymentmode', 'left')\r\n ->join('tbltaxes', 'tbltaxes.id = tblexpenses.tax', 'left')\r\n ->join('tblexpensescategories', 'tblexpensescategories.id = tblexpenses.category')\r\n ->or_like(\"CONCAT(firstname, ' ', lastname)\", $q, FALSE)\r\n ->or_like('company',$q)\r\n ->or_like('paymentmode',$q)\r\n ->or_like('tblinvoicepaymentsmodes.name',$q)\r\n ->or_like('email',$q)\r\n ->or_like('vat',$q)\r\n ->or_like('phonenumber',$q)\r\n ->or_like('city',$q)\r\n ->or_like('zip',$q)\r\n ->or_like('state',$q)\r\n ->or_like('address',$q)\r\n ->or_like('tblexpensescategories.name',$q)\r\n ->or_like('tblexpenses.note',$q)\r\n ->limit($limit);\r\n\r\n $result['expenses'] = $this->db->get()->result_array();\r\n\r\n // Goals\r\n $this->db->select()\r\n ->from('tblgoals')\r\n ->like('description',$q)\r\n ->or_like('subject',$q)\r\n ->limit($limit);\r\n\r\n $result['goals'] = $this->db->get()->result_array();\r\n\r\n // Custom fields\r\n $this->db->select()\r\n ->from('tblcustomfieldsvalues')\r\n ->like('value',$q)\r\n ->limit($limit);\r\n\r\n $result['custom_fields'] = $this->db->get()->result_array();\r\n\r\n // Invoice items\r\n $this->db->select()\r\n ->from('tblinvoiceitems')\r\n ->like('description',$q)\r\n ->or_like('long_description',$q)\r\n ->limit($limit);\r\n\r\n $result['invoice_items'] = $this->db->get()->result_array();\r\n\r\n return $result;\r\n\r\n }", "public function update($options)\n {\n $this->initSql();\n $info = $this->getDocumentInfo($options);\n $document_id = $this->getDocumentId($info);\n $new = false;\n if (!$document_id)\n {\n $this->sql->query('INSERT INTO a_search_document (culture) VALUES (:culture)', $info);\n $document_id = $this->sql->lastInsertId();\n $new = true;\n }\n if (isset($options['info']))\n {\n $this->sql->update('a_search_document', $document_id, array('info' => serialize($options['info'])));\n }\n else\n {\n $this->sql->query('UPDATE a_search_document asd SET asd.info = NULL WHERE asd.id = :document_id', array('id' => $document_id));\n }\n $this->deleteUsages($document_id);\n if ((!isset($options['texts'])) || (!is_array($options['texts'])))\n {\n $options['texts'] = array(array('weight' => 1.0, 'text' => $options['text']));\n }\n $wordWeights = array();\n foreach ($options['texts'] as $textInfo)\n {\n $weight = $textInfo['weight'];\n $text = $textInfo['text'];\n $words = $this->split($text);\n // Index each word just once per document but increase the weight for subsequent usages.\n // If we reversed the order here and multiplied by something a little less than one\n // at each pass we could weight early mentions more heavily\n foreach ($words as $word)\n {\n if (!isset($wordWeights[$word]))\n {\n $wordWeights[$word] = $weight;\n }\n else\n {\n $wordWeights[$word] += $weight;\n }\n }\n }\n foreach ($wordWeights as $word => $weight)\n {\n if (!isset($this->wordCache[$word])) {\n $wordInfo = $this->sql->queryOne('SELECT * FROM a_search_word asw WHERE text = :text', array('text' => $word));\n if (!$wordInfo)\n {\n try\n {\n $this->sql->query('INSERT INTO a_search_word (text) VALUES (:text)', array('text' => $word));\n } catch (Exception $e)\n {\n // Duplicate key errors are unfortunately common because MySQL converts\n // bad UTF8 sequences into shorter keys that wind up redundant. Until I\n // have a better idea of how to quickly validate UTF8 I need to just skip these\n continue;\n }\n $word_id = $this->sql->lastInsertId();\n }\n else\n {\n $word_id = $wordInfo['id'];\n }\n $this->wordCache[$word] = $word_id;\n }\n }\n if (count($wordWeights))\n {\n if ($new)\n {\n // For the sake of speed, hand-tuned SQL for a bulk insert operation\n $pdo = $this->sql->getConn();\n $sql = 'INSERT INTO a_search_usage (word_id, document_id, weight) VALUES ';\n $first = true;\n foreach ($wordWeights as $word => $weight)\n {\n if (!$first)\n {\n $sql .= ',';\n }\n $first = false;\n $sql .= '(' . $this->wordCache[$word] . ',' . $document_id . ',' . $weight . ')';\n }\n // error_log($sql);\n $pdo->exec($sql);\n }\n else\n {\n foreach ($wordWeights as $word => $weight)\n {\n $this->sql->insertOrUpdate('a_search_usage', array('word_id' => $this->wordCache[$word], 'document_id' => $document_id, 'weight' => $weight));\n }\n }\n }\n\n // Relate the search document to a Doctrine object via an intermediate table. Do this\n // last so that if this document is new, nobody else can find it until we're done. This\n // prevents race conditions and allows us to avoid insertOrUpdate\n $relationTableName = $info['item_table'] . '_to_a_search_document';\n $relatedId = $info['item_table'] . '_id';\n $q = \"select * from $relationTableName atsd INNER JOIN a_search_document asd ON asd.id = atsd.a_search_document_id WHERE atsd.$relatedId = :item_id \";\n if (isset($info['culture']))\n {\n $q .= 'AND asd.culture = :culture ';\n }\n $relation = $this->sql->queryOne($q, $info);\n if (!$relation)\n {\n $this->sql->query(\"INSERT INTO $relationTableName ($relatedId, a_search_document_id) VALUES (:item_id, :a_search_document_id)\", array('item_id' => $info['item_id'], 'a_search_document_id' => $document_id));\n }\n else\n {\n $this->sql->update($relationTableName, $relation['id'], array('a_search_document_id' => $document_id));\n }\n }", "public function setQuery($option)\n {\n $this->query = DB::table('users as u')->leftJoin('profiles as p', 'p.user_id', 'u.id');\n\n $this->checkAuthenticatedUser();\n if ($option == self::FOLLOWINGS){\n $this->query = $this->authenticatedUser->followings();\n }\n\n if ($option == self::FOLLOWERS){\n $this->query = $this->authenticatedUser->followers();\n }\n }", "protected function findAll($options = array())\n {\n $select = 'SELECT *';\n $limit = '';\n $offset = '';\n $where = '';\n $order = '';\n \n if (isset($options['select'])) {\n $select = 'SELECT ' . $options['select'];\n if (count(array_keys(array_map(function($v){return trim($v);},\n explode(',',$options['select'])),static::getPrimaryKey())) === 0) {\n \n $select .= ', ' . static::getPrimaryKey();\n }\n }\n if (isset($options['where'])) {\n $where = 'where ' . $options['where'];\n }\n \n if (isset($options['order'])) {\n $offset = 'ORDER BY ' . $options['order'];\n }\n \n if (isset($options['limit'])) {\n $limit = 'LIMIT ' . $options['limit'];\n }\n \n if (isset($options['offset'])) {\n $offset = 'OFFSET ' . $options['offset'];\n }\n \n $table = static::getTable();\n \n return static::query(\"$select from $table $where $order $limit $offset\");\n \n }", "public function search($search)\n {\n // If input parameter is a string add it to search string collection\n if (isset($search{0})) {\n $this->search[] = $search;\n }\n\n // Chaining\n return $this;\n }" ]
[ "0.6512408", "0.64072984", "0.5928674", "0.5907444", "0.5825516", "0.5725141", "0.56710434", "0.56336975", "0.5613251", "0.5603736", "0.5579253", "0.5491134", "0.5399265", "0.53133047", "0.5255204", "0.52329946", "0.52177995", "0.52163273", "0.51442623", "0.5083838", "0.50683206", "0.5052834", "0.50402474", "0.5034146", "0.5015928", "0.5014388", "0.50009716", "0.49973348", "0.49918205", "0.4986484", "0.49513477", "0.49469525", "0.49398363", "0.49396378", "0.49136755", "0.4903431", "0.4899783", "0.48835734", "0.48817906", "0.48761338", "0.4869007", "0.4864479", "0.4863305", "0.48591673", "0.48489502", "0.48470306", "0.48416638", "0.48311263", "0.48243615", "0.4818885", "0.48127723", "0.4803245", "0.48012748", "0.48011172", "0.47831714", "0.4779292", "0.4778687", "0.4777933", "0.47766876", "0.4774235", "0.4770328", "0.47612727", "0.47538716", "0.4753075", "0.47503552", "0.47486997", "0.4741214", "0.47380278", "0.47332656", "0.47274265", "0.4723727", "0.47233972", "0.47230592", "0.47165954", "0.47152883", "0.47144204", "0.47124568", "0.47093588", "0.47051516", "0.46984515", "0.46962422", "0.46930522", "0.46903247", "0.46862015", "0.4682622", "0.46811593", "0.46763927", "0.46719146", "0.4671178", "0.46686006", "0.46669105", "0.46633086", "0.46599388", "0.46596533", "0.4658515", "0.464678", "0.46437958", "0.46354327", "0.46337646", "0.46260136" ]
0.7705925
0
Constructor method for ArrayOfGroupedItemsType
Конструктор метод для ArrayOfGroupedItemsType
public function __construct(array $groupedItems = array()) { $this ->setGroupedItems($groupedItems); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct($array = array())\n {\n $this->items = $array;\n }", "public function __construct(array $itemType = array())\n {\n $this\n ->setItemType($itemType);\n }", "public function __construct(array $groupedItems, $currentPage = 1)\n {\n $this->groupedItems = $groupedItems;\n $this->totalItemsCount = count($groupedItems);\n\n $this->flattenIds();\n $this->calculateTotalPagesCount();\n $this->calculateCurrentPage($currentPage);\n $this->calculateIndexes();\n }", "public function __construct($itemClassName = null)\n {\n $rows = array();\n $has_numeric_key = false;\n $itemClassName = $this->_getItemClassName($itemClassName);\n\n foreach ($this->_data as $key => $item) {\n $row = new $itemClassName($key, $item);\n $rows[$key] = $row;\n $has_numeric_key = $has_numeric_key || strcmp(intval($key), $key) == 0;\n }\n\n parent::__construct($rows);\n\n if (!$has_numeric_key) {\n $this->setFlags(ArrayObject::ARRAY_AS_PROPS);\n }\n }", "public function __construct($items)\n {\n // Check if array is associative then\n // make flatten a multi-dimensional array with dots.\n if ($this->_isAssocArray($items)) {\n $flat_array = [];\n\n foreach ($items as $key => $value) {\n $flat_array[$key] = Arrays::dot($value);\n }\n\n $items = $flat_array;\n }\n\n // Create Array Collection\n $this->collection = new ArrayCollection($items);\n\n // Create Criteria for filtering Selectable collections.\n $this->criteria = new Criteria();\n }", "function pi_create_grouped_item_list($items, $group_field)\n{\n\t$return_array=array();\n\tforeach($items as $key => $item)\n\t{\n\t\t$group_key = $item[$group_field];\n\t\tif(!array_key_exists($group_key, $return_array))\n\t\t{\n\t\t\t$return_array[$group_key]=array();\t\t\n\t\t}\n\t\t$return_array[$group_key][$key] = $item; \n\t}\n\treturn $return_array;\n}", "public function __construct()\n {\n parent::__construct();\n $this->groups = new ArrayCollection();\n }", "public function __construct(\\PhpParser\\Node\\Expr\\Array_ $node)\n {\n $this->items = array();\n parent::__construct($node);\n }", "public function __construct(array $items)\n {\n $this->items = static::collect($items);\n }", "public function __construct(array $item)\n {\n $this->item = $item;\n }", "public function __construct(array $data = array())\n {\n $this->items = $data; \n }", "public function parseGroupByDataProvider() : array {}", "protected function _constructArray(array $array) { }", "public function __construct($items = array())\r\n {\r\n $this->item = $items;\r\n }", "public function __construct(array $array) {\n\t\t$this->collection = new ArrayCollection($array);\n\t}", "public function __construct(Array $collectionItems = [])\n {\n parent::__construct($collectionItems);\n }", "public function __construct($items = array())\r\n {\r\n $this->items = $items;\r\n }", "public function __construct($array = [])\n {\n parent::__construct($array);\n\n // Make each array children a RecusiveSet\n $this->walk(function (&$child) {\n if (is_array($child)) {\n $child = new self($child);\n }\n });\n }", "public function itemDataSet(){\n\n return [\n [ [\n new Item(),\n new Item(),\n new Item()\n ] ]\n ];\n }", "abstract protected function buildItems(): array;", "public function __construct($items = [])\r\n {\r\n $this->items = $this->getArrayItems($items);\r\n }", "public function __construct ($items = NULL)\n {\n if (is_array($items)) {\n $this->import($items);\n ksort($this->data);\n }\n if ($items instanceof AbstractMap) {\n $this->putAll($items);\n }\n }", "public static function of(array $items) : self\n {\n return new self($items);\n }", "protected function __construct(array $items)\n {\n if (!empty($items)) {\n\n $items = array_values($items);\n\n if ($items[0] instanceof AdjacencyInterface) {\n $items = array_map(\n function ($item) {\n return $item->getAdjacency();\n }, $items\n );\n }\n\n foreach ($items as $item) {\n $data = $item;\n\n if (array_key_exists('id', $data) && (array_key_exists('parent', $data))\n && array_key_exists(\n 'data', $data\n )\n ) {\n if (empty($data['parent'])) {\n $this->add($data['id'], $data['parent'], $data['data'], $items);\n }\n } else {\n throw new \\Exception(__CLASS__ . ' item must contain associative array with keys: \"id\", \"parent\" and \"data\"');\n }\n }\n }\n }", "public function __construct(array $items = array()) {\n\t\t$this->items = array();\n\t\t$this->extend($items);\n\t}", "public function __construct($items) {\n $this->items = array_values($items);\n }", "function __construct($arr = array()) {\n parent::__construct($arr);\n\n /*\n $this->item_class = BattleAPI::getItemClassByClassId($this->item_class_id);\n $this->item_type = BattleAPI::getItemTypeByTypeId($this->item_type_id);\n $this->item_material = BattleAPI::getItemMaterialById($this->material_id);\n $this->item_quality = BattleAPI::getItemQualityById($this->quality_id);\n */\n }", "public function __construct($items = [])\n {\n parent::__construct($items);\n\n $this->items = [];\n\n foreach ($this->getArrayableItems($items) as $item) {\n $this->addItem($item);\n }\n }", "function __construct ( Array $items = null, $count = null, $page = null, $per_page = null, $name_key = null) {\n\n\t\t$i = 0;\n\t\t\n\t\t$this->_attributes = Array('total_count'=>$count, 'count'=>sizeof($items), 'page'=>$page, 'per_page'=>$per_page);\n\t\t\n\t\tif (is_array($items) && count($items))\n\t\tforeach ($items as $key=>$item) {\n\t\t\t$key_val = $name_key?$item->$name_key:$i;\n\t\t\t$this->$key_val = $item;\n\t\t\t$i++;\n\t\t}\n\t\t\n\t}", "public function __construct($items = array())\n {\n $this->items = $items;\n }", "public function __construct(array $array, int $itemsPerPage)\n {\n $this->array = $array;\n $this->itemsPerPage = $itemsPerPage;\n }", "public function __construct(array $items = array())\n {\n $this\n ->setItems($items);\n }", "public function __construct(array $items = [])\n {\n $this->_items = $items;\n }", "public function setItemArray(array $itemArray)\n {\n $this->itemArray = $itemArray;\n return $this;\n }", "public function __construct(\\ArrayType\\ArrayOfExtCriteriaGeneral $groupCriterias = null, $groupDescription = null, $groupId = null)\n {\n $this\n ->setGroupCriterias($groupCriterias)\n ->setGroupDescription($groupDescription)\n ->setGroupId($groupId);\n }", "public function __construct($items = [])\n {\n $this->items = $this->getArrayItems($items);\n }", "public function __construct($rawAttributes){\n $this->attributeGroups = [];\n\n foreach ($rawAttributes as $object){\n $newGroup = new AttributeGroup($object);\n $this->attributeGroups[] = $newGroup;\n\n //If this is the object type group - hold onto it too\n if($newGroup->getGroupName() === \"object-type\")\n $this->indexGroup = $newGroup;\n }\n }", "public function __construct ($p_aArray = array(), $p_iFlags = null) {\n $this->setContainer(new ArrayObject($p_aArray, $p_iFlags));\n }", "public function provider_constructor() {\n\t\t\treturn array(\n\t\t\t\tarray(array()),\n\t\t\t\tarray(array(array('ID' => 1, 'Name' => 'A'), array('ID' => 1, 'Name' => 'B'), array('ID' => 1, 'Name' => 'C'))),\n\t\t\t);\n\t\t}", "public function __construct(array $data, int $type)\n {\n $this->data = $data;\n $this->type = $type;\n }", "function & groupCreateFromArray($aParameters) {\n\t$oGroup = & new Group($aParameters[0], $aParameters[1], $aParameters[2], $aParameters[3], $aParameters[4], $aParameters[5], $aParameters[6], $aParameters[7], $aParameters[8], $aParameters[9], $aParameters[10]);\n\treturn $oGroup;\n}", "public function __construct(array $items = [])\n {\n $this->items = $items;\n }", "public function __construct(array $items = [])\n {\n $this->items = $items;\n }", "public function __construct(array $items = [])\n {\n $this->items = $items;\n }", "public function __construct(Collection $groupedNotifications)\n {\n //\n $this->groupedNotifications = $groupedNotifications;\n }", "public function getMultipleGroupedData();", "public function __construct($items = [])\n {\n parent::__construct($items);\n }", "public static function fromArray(IOType|array $importable): static\n {\n $static = new static();\n\n $importable = $importable instanceof IOType ? $importable->toArray() : $importable;\n\n foreach ($importable as $key => $val) {\n if (is_array($val)) {\n foreach ($val as $single) {\n if (in_array($key, ['item', 'items']) && !($importable instanceof ItemType)) {\n $single = Item::fromArray($single);\n }\n\n $static[$key] = $single;\n }\n } else {\n $static[$key] = $val;\n }\n }\n\n return $static;\n }", "public function __construct(array $items = [])\n {\n foreach ($items as $key => $value) {\n $this->items[$key] = $value;\n }\n }", "public function buildGroupedChoices();", "function addSimpleArrayItem($item, $arrayType){\n\t\t $item = trim($item);\n\t\t \n\t\t $okTypes = array(\"linkedPersons\",\n\t\t\t\t\t\"userTags\",\n\t\t\t\t\t\"userTagCreators\",\n\t\t\t\t\t\"creators\",\n\t\t\t\t\t\"contributors\",\n\t\t\t\t\t\"subjects\",\n\t\t\t\t\t\"coverages\",\n\t\t\t\t\t\"classes\",\n\t\t\t\t\t\"alphaNotes\");\n\t\t \n\t\t if(in_array($arrayType, $okTypes)){\n\t\t\t\t$actArray = $this->$arrayType;\n\t\t\t\tif(!$actArray){\n\t\t\t $actArray = array();\n\t\t\t\t}\n\t\t\t\tif(!in_array($item, $actArray)){\n\t\t\t $actArray[] = $item;\n\t\t\t $this->$arrayType = $actArray;\n\t\t\t\t}\n\t\t\t\t\n\t\t }\n }", "public function groupBy(array $groupby)\r\n {\r\n $this->group[] = $groupby;\r\n return $this;\r\n }", "public function createItem(array $item_data, $group_id);", "public function __construct(array $items = NULL)\n\t{\n\t\t$this->items = $items;\n\t}", "public function annotationsCollectionConstructWithArrayParam(UnitTester $I)\n {\n $I->wantToTest('Annotations\\Collection - __construct() with array parameter');\n\n $collection = new Collection(\n [\n [\n 'name' => 'NovAnnotation',\n ],\n ]\n );\n\n $I->assertInstanceOf(\n Collection::class,\n $collection\n );\n }", "public function __construct()\n {\n $this->grupos = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n }", "public function __construct(array $data);", "public function fromArray(array $array) {\n $property = defined('static::$DOMAIN_PROPERTY') ? static::$DOMAIN_PROPERTY : 'items';\n $this->{$property} = $array;\n \n return $array;\n }", "function __construct($array) {\n $this->construct($array);\n }", "public function grouped()\n {\n }", "public function convertItemArray() {}", "function __construct($items = array())\n {\n parent::__construct();\n if (is_array($items)) {\n $this->addItems($items);\n } else {\n throw new \\InvalidArgumentException(\"The Items For The Select Widget Must Be An Array!\");\n }\n }", "abstract protected static function createFromArray(array $data): self;", "public function __construct($items)\n {\n //\n $this->items = $items;\n }", "function __construct($array){\n if(is_array($array)){ // just validation check, not necessary \n $this->elements = $array;\n }\n \n }", "public function __construct($type = NULL, array $arr = NULL)\n {\n if (!isset($type))\n return;\n\n $this->type = $type;\n $this->packlets = $arr;\n }", "function __construct(array $groupOfMvts=[]) {\n if (!$groupOfMvts) {\n $this->groups = [];\n return;\n }\n $groupPerMod = [];\n foreach ($groupOfMvts as $mvt) {\n addValToArray($mvt, $groupPerMod[$mvt['mod']]);\n }\n foreach ($groupPerMod as $mod => $mvts) {\n $this->groups[$mod] = new GroupMvts($mvts);\n }\n if (count($this->groups) != 2)\n throw new Exception(\"Erreur MultiGroupMvts limité à 2 groupes\");\n \n // ordonancement des groupes par ordre chronologique 0 doit s'effectuer avant 1\n $mods = array_keys($this->groups);\n $grp0 = $this->groups[$mods[0]];\n $grp1 = $this->groups[$mods[1]];\n if ($grp1->isBefore($grp0) && $grp0->isBefore($grp1))\n throw new Exception(\"Erreur d'ordonnancement sur $grp0 et $grp1\");\n if ($grp1->isBefore($grp0)) { // si 1 est avant 0 alors je les inverse\n $this->groups = [\n $mods[1] => $grp1,\n $mods[0] => $grp0,\n ];\n }\n }", "public function setItems(array $items): self;", "public function __construct(Array $array = [])\n {\n if(is_null($this->collectionClass())) {\n $this->setCollectionClass(QueryInterface::class);\n }\n parent::__construct($array);\n }", "public function __construct($source = array(), $type = \"numeric\"){\n\t\t\t$this->setType($type);\n\n\t\t\tif(is_array($source) && sizeof($source) > 0){\n\t\t\t\t$this->_bucket = $source;\n\n\t\t\t\t$this->length = sizeof($source);\n\t\t\t}\n\n\t\t\treturn $this;\n\t\t}", "public function __construct($parent) {\r\n parent::__construct($parent);\r\n $this->tagName = 'Group';\r\n }", "public function __construct($_item = NULL)\r\n\t{\r\n\t\tparent::__construct(array('Item'=>$_item));\r\n\t}", "public function collapse()\n {\n $flattenedArray = [];\n\n foreach ($this->items as $item) {\n if (is_array($item)) {\n $flattenedArray = array_merge($flattenedArray, $item);\n }\n }\n\n return new static($flattenedArray);\n }", "function __construct($array)\n\t{\t\n\t\tif (sizeof($array)<3) {\n\t\t\tthrow new Exception(\"invalid N1 init array size\");\n\t\t}\n\t\tparent::__construct($array);\n\t}", "public static function fromArray(array $data) : self\n {\n return new self();\n }", "public static function fromArray(array $data) : self\n {\n return new self();\n }", "public function __construct($items = [])\n {\n $this->items = is_array($items) ? $items : $this->getArrayableItems($items);\n }", "public function collapse(): static\n {\n return new static(Arr::collapse($this->items));\n }", "public function __construct(array $items = null)\n {\n if (!is_null($items)) {\n $this->items = $items;\n }\n }", "public function __construct($items = [])\n {\n $items = ! is_null($items)\n ? $this->getArrayableItems($items)\n : [];\n\n $this->items = (array) $items;\n }", "public function addToGroupedItems(\\Ews\\StructType\\EwsGroupedItemsType $item)\n {\n // validation for constraint: itemType\n if (!$item instanceof \\Ews\\StructType\\EwsGroupedItemsType) {\n throw new \\InvalidArgumentException(sprintf('The GroupedItems property can only contain items of \\Ews\\StructType\\EwsGroupedItemsType, \"%s\" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);\n }\n $this->GroupedItems[] = $item;\n return $this;\n }", "public function array_construct(){\n\t\t\t\t$n=1;\n\t\t\t\tforeach($this ->_my_array as $item){\n\t\t\t\t\t$this -> print_ligne($item);\n\t\t\t\t\t$n++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "function __construct()\n\t\t{\n\t\t\t$this->fillArray();\n\t\t}", "public static function groupBy($array, $groupBy = \"id\")\n\t{\n\t\treturn static::reduce($array, function($arr, $item) use($groupBy) {\n\n\t\t\t// get value of attribute\n\t\t\tif( is_closure($groupBy) )\n\t\t\t{\n\t\t\t\t// execute closure\n\t\t\t\t$value = $groupBy($item);\n\t\t\t} \n\t\t\telse\n\t\t\t{\n\t\t\t\t// get attribute of object\n\t\t\t\t$value = pisc\\upperscore\\def($item, $groupBy);\n\t\t\t}\n\n\t\t\t// build new array with value as keys\n\t\t\tif( isset($arr[$value]) )\n\t\t\t{\n\t\t\t\t$arr[$value][] = $item;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$arr[$value] = [ $item ];\n\t\t\t}\n\n\t\t\treturn $arr;\n\n\t\t}, []);\n\t}", "public function __construct(array $array)\r\n\t{\r\n\t\tparent::__construct($array, ArrayObject::STD_PROP_LIST);\r\n\t}", "function _group( $array )\n\t{\n\t\t// empty array to use\n\t\t$ret = array();\n\t\t\n\t\tif ( count( $array ) > 0 )\n\t\t{\n\t\t\tforeach ( $array as $com )\n\t\t\t{\n\t\t\t\tif ( !isset( $ret[ $com[ 'parent_id' ] ] ) )\n\t\t\t\t{ // make a new slot\n\t\t\t\t\t$ret[ $com[ 'parent_id' ] ] = array();\n\t\t\t\t}\n\t\t\t\t$ret[ $com[ 'parent_id' ] ][] = $com;\n\t\t\t}\n\t\t}else\n\t\t{\n\t\t\treturn $array;\n\t\t}\n\t\t\n\t\t// return it\n\t\treturn $ret;\n\t}", "private function addItem($type, array $item) {\n $this->touchKey($item);\n $key = $item['key'] ?? false;\n if (!is_array($key)) {\n $item['key'] = explode('.', $key);\n } else {\n $item['key'] = array_values($key);\n }\n\n $item = (array)$item;\n\n // Make sure the link has its type.\n $item['type'] = $type;\n\n // Walk into the items list to set the item.\n $items =& $this->items;\n foreach ($item['key'] as $i => $key_part) {\n\n if ($i === count($item['key'] ?? false) - 1) {\n // Add the item here.\n if (array_key_exists($key_part, $items)) {\n // The item is already here so merge this one on top of it.\n if ($items[$key_part]['type'] !== $type)\n throw new \\Exception(($item['key'] ?? '').\" of type $type does not match existing type {$items[$key_part]['type']}.\", 500);\n\n $items[$key_part] = array_merge($items[$key_part], $item);\n } else {\n // The item is new so just add it here.\n touchValue('_sort', $item, count($items));\n $items[$key_part] = $item;\n }\n } else {\n // This is a group.\n if (!array_key_exists($key_part, $items)) {\n // The group doesn't exist so lazy-create it.\n $items[$key_part] = ['type' => 'group', 'text' => '', 'items' => [], '_sort' => count($items)];\n } elseif ($items[$key_part]['type'] !== 'group') {\n throw new \\Exception(\"$key_part is not a group\", 500);\n } elseif (!array_key_exists('items', $items[$key_part])) {\n // Lazy create the items array.\n $items[$key_part]['items'] = [];\n }\n $items =& $items[$key_part]['items'];\n }\n }\n }", "public function addGroupedItems($groupedItems)\n {\n $this->groupedItems = Collection::make($groupedItems);\n }", "abstract static protected function CreateFromArray($data);", "public static function fromJsonArray(array $array, MoufRepository $repository, $parentGroup = \"\") {\r\n\t\t$moufGroupDescriptor = new MoufGroupDescriptor();\r\n\t\tif (isset($array['subgroups'])) {\r\n\t\t\tforeach ($array['subgroups'] as $name => $subgrouparray) {\r\n\t\t\t\t$moufGroupDescriptor->subGroups[$name] = self::fromJsonArray($subgrouparray, $repository, $parentGroup.\"/\".$name);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (isset($array['packages'])) {\r\n\t\t\tforeach ($array['packages'] as $name => $package) {\r\n\t\t\t\t$moufGroupDescriptor->packages[$name] = MoufPackageVersionsContainer::fromJsonArray($package, $parentGroup, $name, $repository);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $moufGroupDescriptor;\r\n\t}", "public function __construct (array $items = null) {\n\t\tif ($items !== null) {\n\t\t\t$this->set($items);\n\t\t}\n\t}", "public function __construct(array $array = null);", "public function __construct($array)\r\n {\r\n if (is_array($array)) {\r\n $this->container = $array;\r\n }\r\n\r\n }", "public function __construct(array $data)\n { $this->class = $data['anzsic']['class'] ? new EnrichedTransactionCategoryClassMetadata($data['anzsic']['class']) : null;\n $this->group = $data['anzsic']['group'] ? new EnrichedTransactionCategoryClassMetadata($data['anzsic']['group']) : null ;\n $this->subdivision = $data['anzsic']['subdivision'] ? new EnrichedTransactionCategoryClassMetadata($data['anzsic']['subdivision']) : null;\n $this->division = $data['anzsic']['division'] ? new EnrichedTransactionCategoryClassMetadata($data['anzsic']['division']) : null;\n }", "private function construct0args()\n {\n parent::_construct(PdfObject::ARRAY);\n arrayList = array();\n }", "abstract public function GetGroupList() : array;", "public function __construct($array){\n $this->data = $array;\n }", "public static function make(array $items): self\n {\n return new static($items);\n }", "public function items(array $items)\n {\n foreach ($items as $key => $val) {\n if (is_int($key)) {\n $this->item($val);\n } else {\n $this->item($key, $val);\n }\n }\n return $this;\n }", "public function createItemMultiple(array $items);" ]
[ "0.6438839", "0.6322356", "0.60599506", "0.5912714", "0.58665425", "0.5861023", "0.5817299", "0.57301676", "0.57156956", "0.57022333", "0.5659073", "0.5616207", "0.56119", "0.5575966", "0.5542998", "0.55323", "0.548748", "0.5486148", "0.54756826", "0.54733175", "0.54636824", "0.5460709", "0.54387033", "0.54371965", "0.542122", "0.5413502", "0.5413099", "0.53845274", "0.53750783", "0.5363256", "0.53471404", "0.53396344", "0.53345543", "0.5331415", "0.53287816", "0.5325631", "0.5323725", "0.5317159", "0.53098494", "0.5304684", "0.5299247", "0.52893746", "0.52893746", "0.52893746", "0.52650326", "0.52625155", "0.526172", "0.5256675", "0.5255573", "0.52531374", "0.5251551", "0.5245378", "0.5245249", "0.52312654", "0.52296495", "0.5208215", "0.5196693", "0.5194109", "0.5188491", "0.5188039", "0.5181303", "0.51728797", "0.51489836", "0.51477605", "0.51320666", "0.5128417", "0.5125884", "0.51160705", "0.511012", "0.5109477", "0.51008385", "0.50974274", "0.50790644", "0.5076052", "0.50725085", "0.50725085", "0.50632507", "0.50553274", "0.5048459", "0.50386566", "0.5034008", "0.50319165", "0.5028564", "0.5027328", "0.50262153", "0.50249517", "0.50224304", "0.5008517", "0.50058043", "0.50042415", "0.49948156", "0.49910116", "0.49863133", "0.49858397", "0.49857444", "0.49786168", "0.49658993", "0.49564737", "0.4950249", "0.49482602" ]
0.74908066
0
Get the number of assets version
Получить количество версий активов
public function getAssetsVersion(){ return self::ASSETS_VERSION; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cp_susty_get_asset_version() {\n\treturn '20181112';\n}", "function versionGet()\n{\n\t$count = trim( shell_exec( 'git rev-list HEAD --count' ) );\n\n\t// And on the thirteenth day of the fourth month of the year two thousand and thirteen,\n\t// The hardware counter stood at six thousand one hundred and two,\n\t// Yet THE COMPUTER spoke of four thousand eight hundred and ninety eight,\n\t// Thus it was deemed that the difference shall be one thousand two hundred and four\n\t// One Thousand two hundred and four shall be the number, no more, no less\n\t// Not one thousand two hundred and three, nor one thousand two hundred and five\n\n\t$count += 1204;\n\n\treturn $count;\n}", "public function getVersion(): int\n {\n return 3;\n }", "public static function getVersion() \n\t{\n\t static $version;\n\t if(!empty($version)) return $version;\n\t $me = JComponentHelper::getComponent('com_jacc');\n\t $db = JFactory::getDbo();\n\t $query = \"SELECT manifest_cache FROM #__extensions WHERE extension_id = \".(int) $me->id;\t\n\t $db->setQuery($query); \n\t $manifest_cache = \t$db->loadResult();\n\t $manifest = json_decode($manifest_cache);\n\t $version = isset($manifest->version) ? $manifest->version : 'unknown'; \t \n\t return $version; \n\t}", "public function getVersion() {\n\t\tif (isset($this -> version)) {\n\t\t\treturn $this -> version;\n\t\t} else {\n\t\t\t// By default return 0\n\t\t\treturn 0;\n\t\t}\n\t}", "public function getVersion() {\r\n\t\t$responseArray = $this->getInfo();\r\n\t\treturn $responseArray['version'];\r\n\t}", "public function version(): int;", "public function getNumberOfVersions()\n {\n return $this->_numberOfVersions;\n }", "public function getVersion()\n {\n $value = $this->get(self::version);\n return $value === null ? (integer)$value : $value;\n }", "public function version() {\n $response = Request::get( $this->api . 'info' )->send();\n return $response->body->info->version;\n }", "protected function getVersionNumber()\n {\n $content = file_get_contents($this->_path . '/index.php');\n $lines = preg_split(\"/((\\r?\\n) | (\\r\\n))/\", $content);\n\n foreach($lines as $line)\n {\n if(strpos($line, 'VERSION') !== false)\n {\n $version = $this->getText($line, 'define', ';');\n $item = explode(',', $version);\n $vString = isset($item[1]) ? rtrim(rtrim(ltrim($item[1], '\\' \\\"'), ')'), '\\'') : '';\n return str_replace('.', '', $vString);\n break;\n }\n }\n }", "public function getVersion()\n {\n $cpuinfo = preg_split(\"/\\n/\", file_get_contents('/proc/cpuinfo'));\n foreach ($cpuinfo as $line) {\n if (preg_match('/Revision\\s*:\\s*([^\\s]*)\\s*/', $line, $matches)) {\n return hexdec($matches[1]);\n }\n }\n\n return 0;\n }", "public function getVersion()\n\t{\n\t\treturn $this->addonJson->version;\n\t}", "public static function version() {\n return self::$manifest['version'];\n }", "public function getVersion()\n {\n $output = $this->querySabnzbd('mode=version&output=json');\n $response = json_decode($output, true);\n\n return $response['version'];\n }", "public static function getNumberOfVendors() {\n $cache = Cache::instance();\n if($cache->test(self::STAT_VENDOR_CACHE)) {\n $data = $cache->load(self::STAT_VENDOR_CACHE);\n }\n else {\n $db = Database::instance();\n $data = $db->select()\n ->from('vendor', 'COUNT(id) as k')\n ->query()->fetch()\n ;\n $cache->save($data, self::STAT_VENDOR_CACHE);\n }\n return $data['k'];\n }", "public function version_count_func(){\n\t\tglobal $post;\n\t\tsetup_postdata($post);\n\t\t$revisions=wp_get_post_revisions(get_the_ID());\n\t\treturn count($revisions);\n\t}", "public function countAssets()\n\t\t{\n\t\t\t$STM = $this->dbo->prepare(\"SELECT count(*) as count FROM asset_masterlist\");\n\t\t\tif (!$STM->execute())\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t$record = $STM->fetch(PDO::FETCH_ASSOC);\n\t\t\treturn $record['count'];\n\t\t}", "public function get_version()\n {\n $l_data = $this->get_info();\n\n return $l_data[\"version\"];\n }", "protected function getVersion()\n {\n static $cacheVersion;\n\n if ( isset($cacheVersion) ) {\n return $cacheVersion;\n }\n\n\n $defaultVersion = 2;\n\n $reply = $this->makeRequest('/files/basic/cmis/my/servicedoc','GET',false);\n if ( !$reply['success'] ) {\n // Return the default version, not much else we can do except not cache this\n return $defaultVersion;\n }\n\n $xml = new DOMDocument();\n $xml->preserveWhiteSpace = false;\n $xml->strictErrorChecking = false;\n $xml->loadXML($reply['rawResponse']);\n if ( !is_object($xml) ) {\n // Return the default version, not much else we can do except not cache this\n return $defaultVersion;\n }\n\n $xp = new DOMXPath($xml);\n\n $results = array();\n\n $versionNodes = $xp->query('//cmisra:repositoryInfo/cmis:productName');\n\n $versionLabel = $versionNodes->item(0)->textContent;\n\n switch ( $versionLabel ) {\n case 'LotusLive Files':\n $version = 1;\n break;\n case 'IBM Connections - Files':\n $version = 2;\n break;\n default:\n $GLOBALS['log']->error('IBM SmartCloud API version could not be detected, the version label returned was: '.$versionLabel);\n $version = 2;\n break;\n }\n\n $cacheVersion = $version;\n return $version;\n }", "public function getVersion()\n\t{\n\t\treturn @$this->data['version']['release'];\n\t}", "public function countVersionnedFiles() {\n\t\treturn count($this->versionningManager->checkoutFromHistory(true));\n\t}", "public static function numberOfReleases(): string\n {\n return 'releases';\n }", "public function getVersionNumber() {\n if (self::$version === null) {\n self::$version = self::VERSION;\n\n if (self::$version === 'dev' && is_dir(__DIR__ . '/../../.git')) {\n // We have a git checkout. Add commit hash\n $current = getcwd();\n chdir(__DIR__ . '/../../.git');\n $hash = exec('git rev-parse --short HEAD');\n self::$version .= '-' . $hash;\n chdir($current);\n }\n }\n\n return self::$version;\n }", "public function version() {\n\t\t$app = $this->app;\n\t\treturn intval($app::VERSION);\n\t}", "public function getVersion() {\n return trim($this->getResource('VERSION'));\n }", "public function getExpectedAssetCount()\n {\n return $this->expected_asset_count;\n }", "public static function getVersion()\n\t{\n\t\tstatic $version;\n\t\tif(!empty($version)) return $version;\n\t\t$jv = new JVersion();\n\t\tif ($jv->RELEASE > 1.5) {\n\t\t\t$me = JComponentHelper::getComponent('com_jacc');\n\t\t\t$db = JFactory::getDbo();\n\t\t\t$query = \"SELECT manifest_cache FROM #__extensions WHERE extension_id = \".(int) $me->id;\n\t\t\t$db->setQuery($query);\n\t\t\t$manifest_cache = \t$db->loadResult();\n\t\t\t$manifest = json_decode($manifest_cache);\n\t\t\t$version = isset($manifest->version) ? $manifest->version : 'unknown';\n\t\t} else {\n\t\t\t$manifest = JApplicationHelper::parseXMLInstallFile(JPATH_COMPONENT_ADMINISTRATOR.DS.'com_jacc.xml');\n\t\t\t$version = isset($manifest['version']) ? $manifest['version'] : 'unknown';\n\t\t}\n\t\treturn $version;\n\t}", "public function get_version()\n {\n return cms_version_number();\n }", "public function get_version()\n {\n return cms_version_number();\n }", "public function get_version()\n {\n return cms_version_number();\n }", "public function get_version()\n {\n return cms_version_number();\n }", "public function get_version()\n {\n return cms_version_number();\n }", "public function getVersion(): int {\n return 2023011200;\n }", "public static function get_version() {\n\t\t$version = \\WC_Cache_Helper::get_transient_version( self::VERSION_OPTION );\n\n\t\treturn $version;\n\t}", "public function getVersion() {\n return (string)$this->getInfoValue('version', '');\n }", "public function getVersion() {\r\r\n\t\treturn self::$version;\r\r\n\t}", "public static function getVersion()\n {\n return self::$requestedVersion;\n }", "public function getArchiveVersion()\n {\n return $this->get('archive.version_num');\n }", "public function nmap_version() {\n\t\treturn $this->attributes['version'];\n\t}", "function version() {\n $file = storage_path() . '/app/__version__';\n\n // The file should exist, so we shouldn't have to run any external commands.\n // If the file exists then we just return the contents of the file.\n\n if (file_exists($file))\n {\n return trim(file_get_contents($file));\n }\n\n // If the file does not exist, we should just return 0. It won't hurt to not\n // have anything in __version__ but it would help with caching problems to\n // have a __version__. Our gulpfile generates this file.\n\n return \"0\";\n}", "public function getLastVersionNumber();", "public static function getVersion () {}", "public static function get()\n {\n $full_version_file_path = base_path() . self::$version_file_path;\n $version = '0';\n\n if (file_exists($full_version_file_path)) {\n $version = trim(file_get_contents($full_version_file_path));\n }\n\n return $version;\n }", "public function getVersion()\n {\n return $this->json['currentVersion'];\n }", "public function getVersion () {\n\treturn ($version = file_get_contents('VERSION'))\n\t ? $version : \"JSunic 0.0 Invalid\";\n }", "public function get_version(){\n\t\treturn $this->version;\n\t}", "protected function getVersion() {\n\n\t \t\t \treturn $this->version;\n\t }", "public function getVersion() {\r\n\t\treturn $this->version;\r\n\t}", "public function getVersion() {\n if (!$this->version) {\n $query = $this->db->prepare(\"\n SELECT c.age\n FROM codepoints c, blocks b\n WHERE replace(replace(lower(b.name), '_', ''), ' ', '') = ?\n AND c.cp >= b.first\n AND c.cp <= b.last\n GROUP BY c.age\");\n $query->execute([Toolkit::normalizeName($this->name)]);\n $r = $query->fetchAll(\\PDO::FETCH_COLUMN, 0);\n if (! $r) {\n $this->version = '1.0';\n } else {\n sort($r, SORT_NUMERIC);\n $this->version = $r[0];\n }\n }\n return $this->version;\n }", "function last_version() {\n\t\t\t$versions = $this->get_versions();\n\t\t\t$ids = array_keys($versions);\n\t\t\treturn (int)end($ids);\n\t\t}", "function getVersion() ;", "function getVersion() ;", "public function getVersion()\n {\n return $this->__get(\"version\");\n }", "public function get_api_version_number($api_version);", "function numeroVersion() {\r\n\r\n\treturn \"5.3.6\";\r\n}", "public function getVersion(){\n\t\t\treturn self::version;\n\t\t}", "public function getVersion()\n {\n $contentOpf = $this->path . '/' . $this->getContentOpfLocation();\n if(!file_exists($contentOpf) || is_dir($contentOpf))\n {\n return FALSE;\n }\n\n $xml = simplexml_load_file($contentOpf);\n $attrs = $xml->attributes();\n if(isset($attrs['version']))\n {\n return (int) $attrs['version'];\n }\n return FALSE;\n }", "public function getVersion()\n {\n return $this->getInfo('Version');\n }", "public static function getVersion() {\n return self::$version;\n }", "public function getVersion() {\n\t\treturn $this->version;\n\t}", "public function getVersion() {\n\t\treturn $this->version;\n\t}", "public function getVersion() {\n\t\treturn $this->version;\n\t}", "public function ts_get_version() {\n $plugin_version = '';\n \n\t\t$plugin_data = get_file_data( self::$plugin_file_path, array( 'Version' => 'Version' ) );\n if ( ! empty( $plugin_data['Version'] ) ) {\n $plugin_version = $plugin_data[ 'Version' ];\n }\n return $plugin_version;;\n }", "public static function get_version() {\n\t\treturn self::$version;\n\t}", "public function getVersion()\n {\n return Application::getRegistryItem('version');\n }", "private function getExtensionVersion()\n {\n $moduleInfo = $this->moduleList->getOne('Thuiswinkel_BewustBezorgd');\n return $moduleInfo['setup_version'];\n }", "public function getVersion()\n {\n return $this->getConfig('version');\n }", "public function getVersion()\n {\n return $this->request('version');\n }", "public function getVersion()\n {\n\t\treturn $this->GetPluginInformationValue('currentVersion');\n }", "public function get_version() { \n\n\t\treturn $this->version; \n\n\t}", "public function getVersion() {\n\t\treturn \"0\";\n\t}", "public function version() {\n return c::get('version');\n }", "public static function version() {\n\t\t\treturn self::$version;\n\t\t}", "public function getVersion() {}", "public function getVersion() {}", "public function getVersion() {}", "public function getVersion() {}", "public static function getVersion()\n {\n return self::$version;\n }", "public function getVersion()\n\t\t{\n\t\t\treturn $this->version;\n\t\t}", "public static function get_version() {\n\t\treturn self::VERSION;\n\t}", "public function getModuleVersionNumber()\n {\n $path = $this->getModulePath() . $this->getModuleName() . '.php';\n\n if (stripos($path, 'modules') === false || !file_exists($path)) {\n return $path;\n }\n\n $module = Module::getInstanceByName($this->getModuleName());\n\n if (!is_object($module)) {\n return '0.0.0';\n }\n\n $module_version_arr = explode('.', $module->version);\n if (file_exists($this->getModulePath() . 'vendor/system/version')) {\n $skeleton_version = (int)Tools::file_get_contents(\n $this->getModulePath() . 'vendor/system/version'\n );\n } else {\n $skeleton_version = 0;\n }\n\n return ((int)$module_version_arr[0]) . '.' . ((int)$module_version_arr[1])\n . '.' . ((int)$skeleton_version + (int)$module_version_arr[2]);\n }", "public function getVersion() {\n return $this->version;\n }", "public function getVersion() {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->uuid->getAt(6) >> 4;\n }", "public function getVersion(): string;", "public function getVersion(): string;", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "static public function version() {\n if (self::$_version === null) {\n if (file_exists(self::appPath('VERSION'))) {\n self::$_version = trim(str_replace(array('SERIAL', \"\\n\"),\n array('0', ''),\n file_get_contents(self::appPath('VERSION'))));\n }\n else {\n self::$_version = '0';\n }\n }\n return self::$_version;\n }", "public function version()\n {\n return $this->data()['Version'];\n }", "public function getVersion ()\n {\n return $this->version;\n }", "public static function get_version() {\n return static::$version;\n }", "public function getVersion() {\n return $this->version;\n }", "public function getVersion() {\n return $this->version;\n }", "function get_version();" ]
[ "0.7087174", "0.69636714", "0.6732113", "0.672034", "0.6623428", "0.6560444", "0.65572464", "0.65461224", "0.65291", "0.65108454", "0.6469767", "0.6429906", "0.6422673", "0.6404625", "0.63796306", "0.6367698", "0.63494235", "0.6343686", "0.63352954", "0.632741", "0.63227224", "0.63199055", "0.63023436", "0.6298883", "0.6265953", "0.6263167", "0.6260049", "0.6239026", "0.62269527", "0.62269527", "0.62269527", "0.62269527", "0.62269527", "0.6220939", "0.6193925", "0.6189091", "0.6188987", "0.6177629", "0.61769944", "0.6175809", "0.6169846", "0.6165851", "0.6165064", "0.61596733", "0.6158943", "0.614869", "0.6146735", "0.6143098", "0.6140311", "0.6137098", "0.61331695", "0.6122724", "0.6122724", "0.6122174", "0.6121529", "0.6120473", "0.611857", "0.6116242", "0.611539", "0.6107275", "0.61032367", "0.61032367", "0.61032367", "0.6101293", "0.60895365", "0.6084596", "0.60731393", "0.6072105", "0.60705394", "0.6066192", "0.60632825", "0.60625774", "0.6047156", "0.6043223", "0.6042851", "0.6042851", "0.6042851", "0.60414636", "0.60413575", "0.604123", "0.6037132", "0.6036264", "0.6030843", "0.6030843", "0.60293186", "0.60221386", "0.60221386", "0.6019887", "0.6019887", "0.6019887", "0.6019887", "0.6019887", "0.6019887", "0.6015694", "0.60104585", "0.6009757", "0.6008509", "0.6006007", "0.6006007", "0.60048175" ]
0.7659826
0
Get if LightCheckout is installed and enabled
Проверить, установлен ли и включен ли LightCheckout
public function getGomageLightCheckoutEnabled(){ return Mage::getStoreConfig('gomage_checkout/general/enabled'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isInstalled() {\n return (bool)defined('MODULE_PAYMENT_PAYPAL_ADV_STATUS');\n }", "function isInstalled() {\n return (bool)defined('MODULE_PAYMENT_WIRECARD_CC_STATUS');\n }", "function isInstalled() {\n return (bool)defined('MODULE_PAYMENT_VIVAWALLET_STATUS');\n }", "public function isInstalled();", "public function isInstalled();", "public function isInstalled();", "public static function isInstalled(){\n return true;\n }", "function isInstalled();", "function yourls_is_installed() {\n\treturn (bool)yourls_apply_filter( 'is_installed', yourls_get_db()->is_installed() );\n}", "public static function isInstalled() : bool {}", "function isInstalled() ;", "public function getIsInstalled()\n\t{\n\t\treturn $this->status == self::STATUS_INSTALLED;\n\t}", "function getEnabled() {\n\t\tif (!Config::getVar('general', 'installed')) return true;\n\t\treturn parent::getEnabled();\n\t}", "public function isInstalled()\n {\n return $this->isRegistered() && $this->isEnabled();\n }", "public function getIsInstalled() {\r\n\t\treturn isset($this->getManager()->getPackages()->{$this->name});\r\n\t}", "public static function isInstalled () {\n return true;\n\t}", "public function isInstalled()\n {\n return !empty($this->config['USER_ID']) && !empty($this->config['LICENSE_KEY']);\n }", "function yourls_is_installing() {\n\treturn (bool)yourls_apply_filter( 'is_installing', defined( 'YOURLS_INSTALLING' ) && YOURLS_INSTALLING );\n}", "public function effectively_installed()\n\t{\n\t\treturn isset($this->config['jfusion_extension_redirect']);\n\t}", "public function isInstalled()\r\n {\r\n return Extension::isInstalled('__name__');\r\n }", "public function getInstalled() {\n if ($this->installed == 1)\n return \"true\";\n else\n return \"false\";\n }", "public function isInstalled()\n {\n return $this->installed;\n }", "public function moduleEnabled(){\n\t\treturn Mage::getStoreConfig('vendors/config/active');\n\t}", "public function getIsCheckonAddtoCart()\n {\n return $this->scopeConfig->getValue('pincode/general/checkaddtocart', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n }", "public function IsInstalled() {\n\t\treturn $this->getAdapter()->IsInstalled();\n\t}", "public function isInstalled()\n\t{\n\t\treturn true;\n\t}", "abstract public function checkIsInstalled();", "public function isInstalled()\n {\n return !!$this->getInstalledVersion();\n }", "public static function is_enabled()\n {\n return wc_coupons_enabled();\n }", "public function isEnabled()\n {\n return $this->enabled && $this->installed;\n }", "public function isStandardCheckoutEnabled()\n {\n }", "function canBeInstalled() ;", "public function isAwShopbybrandInstalled()\n {\n return Mage::getConfig()->getModuleConfig('AW_Shopbybrand')->is('active', 'true');\n }", "public function getEnabled(){\n\t\treturn (Mage::helper('nektria')->getConfig('active') && ! is_null(Mage::helper('nektria')->getConfig('apikey')) );\n\t}", "public static function isInstalled(): bool\n {\n return (static::getBinary() !== false);\n }", "public static function installed()\n {\n return static::$status;\n }", "public function canUseCheckout()\n {\n $this->_canUseCheckout = Mage::getStoreConfigFlag(\n 'payment/' . $this->_code . '/frontend_checkout', $this->getStore()\n );\n return $this->_canUseCheckout;\n }", "protected function isInstalledAndEnabled()\n {\n return $this->isPluginAvailable($this->identifier)\n && SiteSearchSettings::get('radiantweb_problog_enabled', true);\n }", "public function isInstalled()\n {\n return $this->installed ?: (bool) $this->getRepository()->getModuleInstalled($this);\n }", "public function getAllowCheckout()\n {\n return ($this->helper('breadcheckout')->getAllowCheckoutPDP()) ? 'true' : 'false';\n }", "protected function isInstalledAndEnabled()\n {\n return $this->isPluginAvailable($this->identifier)\n && Settings::get('graker_photoalbums_enabled', true);\n }", "function is_checkout()\n {\n }", "public function getModuleEnable()\n {\n $result = boolval($this->scopeConfig->getValue(\n self::PATH_ENABLED_CHECKOUT,\n ScopeInterface::SCOPE_STORE\n ));\n return $result;\n }", "private static function isInstalled(): bool\n\t{\n\t\t$res = \\Bitrix\\Im\\Model\\BotTable::getList([\n\t\t\t'select' => ['BOT_ID'],\n\t\t\t'filter' => [\n\t\t\t\t'=CLASS' => __CLASS__,\n\t\t\t]\n\t\t]);\n\t\tif ($botData = $res->fetch())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public static function is_installed()\n {\n }", "function isInstalled () {\n\t\treturn file_exists ('config.php');\n\t}", "public function checkModuleIsEnabled()\n {\n $grpSecPath = \"carriers/ENWweSmpkg/active\";\n return $this->scopeConfig->getValue($grpSecPath, \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n }", "public static function isInstalled()\n {\n return is_file(self::getConfigFilename());\n }", "public function isExpressCheckoutEnabled()\n {\n }", "public function isActive()\r\n {\r\n return $this->isInstalled() && (int) $this->getSettings()['status'] === 1;\r\n }", "protected static function isInstallToolSession() {}", "public function getAllowCheckout()\n {\n return ($this->helper('breadcheckout')->getAllowCheckoutCP()) ? 'true' : 'false';\n }", "function isActive()\n {\n global $application;\n $active_modules = modApiFunc(\"Checkout\",\"getActiveModules\", \"shipping\");\n return array_key_exists($this->getUid(), $active_modules);\n }", "private function _isEnabled() {\n return Mage::getStoreConfigFlag(\"contactlab_transactional/global/enabled\");\n }", "protected function isInstalledAndEnabled()\n {\n return $this->isPluginAvailable($this->identifier)\n && Settings::get('rainlab_blog_enabled', true);\n }", "public function isInstalled()\n {\n return file_exists($this->config_map_path);\n }", "public function is_enabled() {\n\n\t\treturn 'yes' === get_option( 'sv_wc_apple_pay_enabled' );\n\t}", "function is_installed() {\n\tif (file_exists(INSTALL_CHECK_FILE)) {\n\t\treturn true;\n\t}\n\telse {\n\t\treturn false;\n\t}\n}", "public function isWebhookAvailable(){\n\t$sql = \"SELECT * FROM `paymill_webhook`\";\n\treturn (bool)Shopware()->Db()->fetchOne($sql);\n }", "public function isEnabled(){\n\t\tglobal $wpgmza;\n\n\t\tif(class_exists(\"WooCommerce\")){\n\t\t\tif(!empty($wpgmza->settings->woo_checkout_map_enabled) && !empty($wpgmza->settings->woo_checkout_map_id)){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "function is_available() {\n\t\tif ( $this->enabled == \"yes\" )\n\t\t\treturn true;\n\t}", "public function is_installed() {\n\n\t\t// Create a settings instance.\n\t\t$setting = new Setting;\n\n\t\t// Fetch installed extension setting.\n\t\t$setting->fetch( 'active_extensions', 'setting_key' );\n\n\t\t// Get the settings contents.\n\t\t$active_extensions = explode( ',', $setting->setting_value );\n\n\t\t// Does it exist in the array?\n\t\tif ( array_search( $this->ext_domain, $active_extensions, true ) ) {\n\n\t\t\treturn true;\n\n\t\t}\n\n\t\treturn false;\n\n\t}", "public function is_package_install() {\n\n\t\tif ( empty( $_SESSION['monstroid_install_type'] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$type = esc_attr( $_SESSION['monstroid_install_type'] );\n\n\t\tif ( in_array( $type, array( 'advanced', 'full' ) ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\n\t}", "public function isInstalled()\n {\n foreach ($this->versions as $version) {\n if ($version->isInstalled()) {\n return true;\n }\n }\n return false;\n }", "public function check_availability() {\n\n $config = get_config('local_shop');\n\n // Check if product has handler and is available.\n if ($this->enablehandler) {\n $handler = $this->get_handler();\n if ($handler && !$handler->is_available($this)) {\n /*\n * TODO : defer this check at a shop instance level, using\n * global config key as default setting.\n */\n if ($config->hideproductswhennotavailable) {\n return;\n } else {\n $this->available = false;\n }\n }\n }\n return true;\n }", "public static function enabled() {\n\t\treturn extension_loaded('memcached');\n\t}", "public function isEnabledCheckoutIframe();", "public static function is_connected() {\n\t\t$helper_options = get_option( 'woocommerce_helper_data', array() );\n\t\tif ( array_key_exists( 'auth', $helper_options ) && ! empty( $helper_options['auth'] ) ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function isInstall()\n {\n try {\n $config = $this->container->get(\"config\");\n } catch (NotFoundExceptionInterface $e) {\n return false;\n } catch (ContainerExceptionInterface $e) {\n return false;\n }\n return (\n isset($config[\"dataStore\"][MeshHttp::class])\n );\n }", "public function isEnabledCondition(){\r\n return Mage::getStoreConfig('vendors/pricecomparison2/enable_condition');\r\n }", "public function isOnetimeCheckout(){\r\n\t\treturn Mage::getStoreConfig('vendors/checkout/onetime_checkout');\r\n\t}", "public function isInstalled()\n {\n $sql = \"SHOW TABLES LIKE '{$this->_db->prefix}options'\";\n $tables = $this->_db->fetchAll($sql);\n return !empty($tables);\n }", "public function is_enabled() {\n $settings \t= new WCMCPROD_Core_Settings();\n\t\treturn $settings->debug;\n\t}", "public function isInstalled(): bool\n {\n return $this->program->isInstalled();\n }", "protected function _enabled()\n {\n return Mage::helper('marketingsoftware')->enabled();\n }", "public function isInstalled()\n {\n $plugins = PluginManager::getManager()->getInstalledVersions();\n\n if (!isset($plugins[$this->getMachineName()])) {\n return false;\n }\n\n return true;\n }", "public function isEnabled()\n {\n return $this->config->isEnabledSDK($this->_storeManager->getStore()->getId());\n }", "function getEnabled() {\n\t\tif (!Config::getVar('general', 'installed')) $enabled = true;\n\t\telse $enabled = parent::getEnabled();\n\n\t\tif ($enabled) {\n\t\t\tHookRegistry::register('TemplateManager::display', array(&$this, 'displayTemplateCallback'));\n\t\t}\n\t\treturn $enabled;\n\t}", "public function checkInstalled()\n\t{\n if (file_exists(JPATH_ROOT.'/plugins/content/plg_jwadvanced/plg_jwadvanced.php'))\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public function _isEnableModule()\n {\n $storeId = Mage::app()->getRequest()->getParam('store');\n return Mage::getStoreConfig(self::ENABLE,$storeId);\n }", "function mention_is_installed()\n{\n\treturn mentionMeGetSettingsgroup();\n}", "function ipm_is_installed() {\r\n\tglobal $wpdb;\r\n\r\n\t$installed = get_option('ipm_installed');\r\n\t\r\n\tif(!$installed) {\r\n\t\tipm_install_system();\r\n\t\treturn false;\r\n\t}\r\n\telse {\r\n\t\treturn true;\r\n\t}\r\n\r\n}", "private function isPluginInstalled(){\n\t\n if (!$this->PluginManager->isInstalled($this->GetPluginName() , $this->company_id )) {\n return false;\n }\n return true;\n }", "function onInstall() {\n\t\tglobal $conf;\n\t\t\n\t\tif($conf['services']['web'] == true) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t}", "public function isInstalled()\n\t{\n\t\t$stmt = $this->db->prepare(\"show tables like '\" . $this->table . \"'\");\n\t\t$status = $stmt->execute();\n\t\treturn ($status && $stmt->rowCount());\n\t}", "function themify_is_woocommerce_active() {\n\t\tstatic $is = null;\n\t\tif ( $is===null ) {\n\t\t\t$plugin = 'woocommerce/woocommerce.php';\n\t\t\tinclude_once( ABSPATH . 'wp-admin/includes/plugin.php' );\n\t\t\treturn is_plugin_active( $plugin )\n\t\t\t\t// validate if $plugin actually exists, the plugin might be active however not installed.\n\t\t\t\t&& is_file( trailingslashit( WP_PLUGIN_DIR ) . $plugin );\n\t\t}\n\t\treturn $is;\n\t}", "public function isEnabled() {\n return Mage::getStoreConfig('extension/extension_settings/extension_active');\n }", "public function isInstall()\n {\n return false;\n }", "protected function _isLoginCatalogInstalledAndActive()\n {\n\n if( $node = Mage::getConfig()->getNode( 'modules/Netzarbeiter_LoginCatalog' ) ) {\n return strval( $node->active ) == 'true';\n }\n return FALSE;\n }", "protected function getInstallToolProtectionStatus() {}", "public function is_installed() {\n\n\t\t$sql = \"DESCRIBE `localplay_httpq`\"; \n\t\t$db_results = Dba::query($sql); \n\n\t\treturn Dba::num_rows($db_results); \n\n\n }", "public function IsSetup(){\n $this->InsureHasID();\n return LoanProSDK::GetInstance()->GetApiComm()->IsSetup($this->Get(BASE_ENTITY::ID));\n }", "protected function wc_is_installing()\n {\n }", "protected function wc_is_installing()\n {\n }", "static function isInstalled() {\n return defined('CONFIG_PATH') && is_file(CONFIG_PATH . '/config.php');\n }", "public function isModuleEnabled()\r\n {\r\n return Mage::helper('promopopup')->getModuleStatus();\r\n }", "function wpcd_is_woocommerce_activated() {\n\t\tif ( class_exists( 'woocommerce' ) ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function getCustomerLoginEnable()\n {\n return $this->scopeConfig->getValue(self::CONFIG_LAC_ENABLED);\n }", "public function isExpressCheckoutEnabledInDetails()\n {\n }", "function is_available() {\n\t\t\tif ( 'yes' == $this->enabled && in_array( strtoupper( get_woocommerce_currency() ), $this->currency_list ) && ! empty( $this->secret_key ) && ! empty( $this->public_key ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}" ]
[ "0.7379332", "0.7211772", "0.7185895", "0.6946102", "0.6946102", "0.6946102", "0.6935944", "0.69075596", "0.6839649", "0.68272203", "0.6823664", "0.6821831", "0.6803075", "0.676837", "0.6738573", "0.6682082", "0.66469693", "0.66173536", "0.6594494", "0.6540581", "0.653841", "0.65307474", "0.652904", "0.6507541", "0.6497287", "0.64750576", "0.64597404", "0.64290154", "0.6422541", "0.6417904", "0.6413475", "0.64123845", "0.64080155", "0.639473", "0.63657176", "0.6360923", "0.63512117", "0.63468003", "0.63452226", "0.6334276", "0.63331646", "0.63298154", "0.6293761", "0.6278856", "0.6231321", "0.6230405", "0.62123895", "0.62061095", "0.6186173", "0.6180044", "0.61741394", "0.6164657", "0.6155449", "0.614938", "0.6143055", "0.61350703", "0.61111313", "0.61081266", "0.61070406", "0.61020875", "0.60971385", "0.60833704", "0.60792464", "0.6077237", "0.6071017", "0.60697854", "0.6064787", "0.6063889", "0.6062071", "0.60585225", "0.60455716", "0.604356", "0.6039757", "0.6028665", "0.6010158", "0.5998754", "0.59983337", "0.5992189", "0.59912634", "0.59865886", "0.598319", "0.5979827", "0.59646446", "0.5962487", "0.59621763", "0.5958042", "0.59562284", "0.5954597", "0.5946629", "0.5943582", "0.5939918", "0.593725", "0.59331375", "0.59327996", "0.5926879", "0.5920559", "0.59204847", "0.5917154", "0.59160626", "0.5915746" ]
0.7574852
0
Get if nektria last mile shipping method is selected
Проверить, выбран ли последний милю метод доставки nektria
public function getLastMileSelected(){ $shipping_method = self::getShippingMethod(); //Switch with method type if ($shipping_method == 'nektria_recs_lastmile'){ return TRUE; }else{ return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getShippingMethod();", "public function getShippingMethod();", "public function getShippingMethod();", "public function get_shipping_method()\n {\n }", "function selected_shipping_option()\n\t{\n\t\treturn $this->_get_shipping_option();\n\n\t}", "public function getShippingMethod(){\n\t\t$quote = $checkout = Mage::getSingleton('checkout/session')->getQuote();\n\t \t$address = $quote->getShippingAddress();\n\t \treturn $address->getShippingMethod();\n\t}", "private function caddyWiItemsEvalShipping()\n {\n // RETURN : there aren't any shipping options\n if ( $this->optionsShippingAreEmpty )\n {\n return;\n }\n\n // Get the current payment method\n $calcedCaddy = $this->calc();\n $shippingId = $calcedCaddy[ 'options' ][ 'shipping' ][ 'id' ];\n\n // RETURN : a shipping method is selected\n if ( $shippingId > 0 )\n {\n return;\n }\n\n // RETURN : a prompt, because customer hasn't select any shipping method\n return $this->pi_getLL( 'shippingEnterMethod' );\n }", "public function getShipmentMethod();", "public function getShippingMethod()\n {\n return self::DEFAULT_SHIPPING_METHOD;\n }", "public function getShippingMethods();", "public function getAlternateMethod( $shippingMethod ){\r\n if( $shippingMethod == 'freeshipping_freeshipping' )\r\n return 'tablerate_bestway';\r\n if( $shippingMethod == 'tablerate_bestway' )\r\n return 'freeshipping_freeshipping';\r\n return $shippingMethod;\r\n }", "protected function getSmartboxShippingMethodValue()\n {\n return Mage::helper('smartbox_smartboxparcels')->getShippingMethodCode();\n }", "public function getDefaultShippingMethod()\n {\n return Mage::helper('sveacheckout')\n ->getConfigData('sveacheckout_layout/shipping_method_default');\n }", "public static function is_delivery_slots_allowed_for_current_shipping_method() {\n\t\t$chosen_shipping = Iconic_WDS::get_chosen_shipping_method();\n\t\t$allowed_methods = Iconic_WDS_Settings::get_shipping_methods();\n\n\t\tif ( $allowed_methods && ! empty( $allowed_methods ) ) {\n\t\t\tif ( in_array( 'any', $allowed_methods, true ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tforeach ( $allowed_methods as $allowed_method ) {\n\t\t\t\t$allowed_method = str_replace( 'wc_shipping_', '', $allowed_method );\n\n\t\t\t\tif ( $chosen_shipping === $allowed_method ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "private static function get_active_shipping_methods()\n {\n }", "public function getShippingMethod()\n {\n return $this->getData(self::SHIPPING_METHOD);\n }", "public function getShippingMode()\n {\n return $this->shippingMode;\n }", "abstract public function getShippingCarrier();", "function wc_get_chosen_shipping_method_for_package($key, $package)\n {\n }", "function wc_get_default_shipping_method_for_package($key, $package, $chosen_method)\n {\n }", "public function supports_different_shipping_locations();", "protected function getDoddleShippingMethodValue()\n {\n return Mage::helper('gene_doddle')->getShippingMethodCode();\n }", "protected function getDoddleShippingMethodValue()\n {\n return Mage::helper('gene_doddle')->getShippingMethodCode();\n }", "function get_item_shipping() {}", "public function get_calculated_shipping()\n {\n }", "public function isFreeShipMethod($shippingCode) {\n\t\treturn (isset($this->rateTable[$shippingCode]['free_method'])) ? $this->rateTable[$shippingCode]['free_method'] : false; \n\t}", "public function get_shipping_class()\n {\n }", "public function getShipmentMethod()\n {\n }", "public function hasShipping()\n\t{\n\t\treturn $this->shipping;\n\t}", "public function skipShippingMethod()\n {\n $code = $this->getShippingMethod();\n $noskipGroups = $this->getShippingCustomerGroups();\n $currentGroup = $this->getCurrentCustomersGroup();\n switch ($code) {\n case \"noskip\":\n $return = false;\n break;\n default:\n $return = $this->skipThisSection($currentGroup, $noskipGroups);\n break;\n }\n\n return $return;\n }", "public function getOfferShipping()\r\n {\r\n return $this->offerShipping;\r\n }", "public function getShippingMethod()\n {\n if (is_null($this->shippingMethod)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_SHIPPING_METHOD);\n if (is_null($data)) {\n return null;\n }\n\n $this->shippingMethod = ShippingMethodResourceIdentifierModel::of($data);\n }\n\n return $this->shippingMethod;\n }", "function my_shipping () {\n\t\t$this->internal_name = \"my_shipping\";\n\t\t\n\t\t// $this->name is how the method will appear to end users\n\t\t$this->name = \"My Shipping Method\";\n\n\t\t// Set to FALSE - doesn't really do anything :)\n\t\t$this->is_external = FALSE;\n\n\t\treturn true;\n\t}", "function isOrderWithDynamicShipping()\n {\n return get_option(GootenWCOptionNames::ORDER_DYNAMIC_SHIPPING) === '1';\n }", "public function hasShippingMethods()\n {\n return !empty($this->shippingMethods) ? true : false;\n }", "function selectionShippingType($order_id){\r\n# If invalid or no posted, return default (Standard)\t\r\n\r\nglobal $shippingMethods;\r\n$orderShippingType = queryOrderShippingType($order_id);\r\n\t\r\n\tif(!empty($_POST[\"shipping_type\"])){ // If value posted\r\n\t\t$get_shipping_type = filter_var($_POST['shipping_type'], FILTER_SANITIZE_STRING); // Sanatize input and save as a variable\r\n\r\n\t\tif (in_array($get_shipping_type, $shippingMethods, true)){ // Validate that it is a valid postage method\r\n\t\t\t\r\n\t\t\tif (isSet($orderShippingType) && $get_shipping_type == $orderShippingType){ // Value posted is same as value in DB so just return this\r\n\t\t\t\treturn $get_shipping_type;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tupdateOrderShippingType($get_shipping_type, $order_id);\r\n\t\t\t\treturn $get_shipping_type;\r\n\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn 'Standard'; // No shipping type has been posted, so return default value (standard shipping)\r\n}", "function _wpsc_action_init_shipping_method() {\n\tglobal $wpsc_cart;\n\n\tif ( ! is_object( $wpsc_cart ) ) {\n\t\twpsc_core_setup_cart();\n\t}\n\n\tif ( empty( $wpsc_cart->selected_shipping_method ) ) {\n\t\t$wpsc_cart->get_shipping_method();\n\t}\n}", "abstract public function getShippingTrackingCode();", "public function shipping()\n\t{\n\t\tif ($this->no_shipping)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tif ($this->core->hooks->set_hook('item_shipping_start')->run() && $this->core->hooks->end())\n\t\t{\n\t\t\t$shipping = $this->core->hooks->value();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$shipping = $this->shipping;\n\t\t\t\n\t\t\t/*@TODO bring this back...maybe\n\t\t\t$plugin = ($this->core->store->config('shipping_plugin')) ? Cartthrob_core::create_child($this->core, $this->core->store->config('shipping_plugin')) : NULL;\n\t\t\t\n\t\t\tif (method_exists($plugin, 'get_item_shipping') && is_callable(array($plugin, 'get_item_shipping')))\n\t\t\t{\n\t\t\t\t$shipping = $plugin->get_item_shipping($this);\n\t\t\t}\n\t\t\t*/\n\t\t\t\n\t\t\t$shipping *= $this->quantity();\n\t\t\t\n\t\t\tif ($this->core->hooks->set_hook('item_shipping_end')->run($shipping) && $this->core->hooks->end())\n\t\t\t{\n\t\t\t\t$shipping = $this->core->hooks->value();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this->core->round($shipping);\n\t}", "public function get_shipping_methods()\n {\n }", "public function get_shipping_methods()\n {\n }", "public function saveShippingMethodAction()\n {\n if (!$this->getRequest()->isPost()) {\n $this->_message($this->__('Specified invalid data.'), self::MESSAGE_STATUS_ERROR);\n return;\n }\n\n $data = $this->getRequest()->getPost('shipping_method', '');\n $result = $this->getOnepage()->saveShippingMethod($data);\n if (!$result) {\n\n Mage::dispatchEvent('checkout_controller_onepage_save_shipping_method', array(\n 'request' => $this->getRequest(),\n 'quote' => $this->getOnepage()->getQuote()\n ));\n $this->getOnepage()->getQuote()->collectTotals()->save();\n if ($this->_checkApiForward('paymentmethodlist', Mage_XmlConnect_Helper_Data::DEVICE_API_V_23)) {\n return;\n }\n $this->_message($this->__('Shipping method has been set.'), self::MESSAGE_STATUS_SUCCESS);\n } elseif (isset($result['error'])) {\n if (!is_array($result['message'])) {\n $result['message'] = array($result['message']);\n }\n Mage::dispatchEvent('checkout_controller_onepage_save_shipping_method', array(\n 'request' => $this->getRequest(),\n 'quote' => $this->getOnepage()->getQuote()\n ));\n $this->getOnepage()->getQuote()->collectTotals()->save();\n $this->_message(implode('. ', $result['message']), self::MESSAGE_STATUS_ERROR);\n }\n }", "public function getShippingMethodId();", "protected function get_shipping_methods()\n {\n }", "function store_is_shipping_enabled(){\n\t\t$sw_settings = get_option('store_sw_settings');\n\t\treturn $sw_settings['enabled'];\n\t}", "public function getShippingDestination();", "public function getShipping()\n {\n return $this->shipping;\n }", "public function getShipping()\n {\n return $this->shipping;\n }", "public function getShipping()\n {\n return $this->shipping;\n }", "public function getShipping()\n {\n return $this->shipping;\n }", "public function getShipping()\n {\n return $this->shipping;\n }", "public function zasilkovna_select_option(){\n \n $zasilkovna_option = get_option( 'zasilkovna_option' );\n if ( $zasilkovna_option['hide_packeta'] == 'yes') {\n \n // echo 'zakaz dopravy zasilkovny';\n \n $doprava_name = explode('>', WC()->session->chosen_shipping_methods[0]);\n\n if ( $doprava_name[0] == 'zasilkovna') {\n // echo 'tests'; \n \n }\n }\n \n // unset($rates['shipping_method']);\n // unset( $rates['shipping_method:z-points'] );\n // if (!empty($doprava_name[0]) && $doprava_name[0] == 'zasilkovna') {\n // unset( $rates['shipping_method:0'] ); // shipping method with ID (to find it, see screenshot below)\n \n \n \n\n\n \t$doprava_name = explode('>',WC()->session->chosen_shipping_methods[0]);\n\n \tif ( !empty($doprava_name[1]) ){\n \t\tif ( $doprava_name[1] == 'z-points' ){\n \n \t\t$zasilkovna_mista = get_option( 'zasilkovna_mista');\n \t\t$zasilkovna_option = get_option( 'zasilkovna_option' );\n \t\t$country = woo_get_customer_country();\n\n \t\tif( $country == 'SK' ){\n \t$ico_url = $this->get_zasilkovna_icon( $zasilkovna_option, 'icon_url_sk' ); \n \t$zasilkovna_mista = get_option( 'zasilkovna_mista_sk');\n \t$packeta_country = 'sk';\n \t\t}elseif( $country == 'CZ' ){\n\t $ico_url = $this->get_zasilkovna_icon( $zasilkovna_option, 'icon_url' ); \n \t$zasilkovna_mista = get_option( 'zasilkovna_mista_cz');\n \t$packeta_country = 'cz';\n \t\t}elseif( $country == 'PL' ){\n\t $ico_url = $this->get_zasilkovna_icon( $zasilkovna_option, 'icon_url_pl' ); \n \t$zasilkovna_mista = get_option( 'zasilkovna_mista_pl');\n \t$packeta_country = 'pl';\n \t\t}elseif( $country == 'HU' ){\n\t $ico_url = $this->get_zasilkovna_icon( $zasilkovna_option, 'icon_url_hu' ); \n \t$zasilkovna_mista = get_option( 'zasilkovna_mista_hu');\n \t$packeta_country = 'hu';\n \t\t}elseif( $country == 'RO' ){\n\t $ico_url = $this->get_zasilkovna_icon( $zasilkovna_option, 'icon_url_ro' ); \n \t$zasilkovna_mista = get_option( 'zasilkovna_mista_ro');\n \t$packeta_country = 'ro';\n }elseif( $country == 'AT' ){\n\t // $ico_url = $this->get_zasilkovna_icon( $zasilkovna_option, 'icon_url_at' ); \n \t$zasilkovna_mista = get_option( 'zasilkovna_mista_at');\n \t$packeta_country = 'at';\n }elseif( $country == 'UA' ){\n\t $ico_url = $this->get_zasilkovna_icon( $zasilkovna_option, 'icon_url_ua' ); \n \t$zasilkovna_mista = get_option( 'zasilkovna_mista_ua');\n \t$packeta_country = 'ua';\n \t\t}elseif( $country == 'BL' ){\n\t // $ico_url = $this->get_zasilkovna_icon( $zasilkovna_option, 'icon_url_bl' ); \n \t$zasilkovna_mista = get_option( 'zasilkovna_mista_bl');\n \t$packeta_country = 'bl';\n \t\t} else{\n\t $ico_url = $this->get_zasilkovna_icon( $zasilkovna_option, 'icon_url' ); \n \t $zasilkovna_mista = get_option( 'zasilkovna_mista_cz');\n \t $packeta_country = 'cz';\n \t\t}\n\n \t\tif( empty( $ico_url ) ){ $ico_url = WOOZASILKOVNAURL . 'assets/images/zasilkovna.png'; }\n \n $zasilkovna_option = get_option( 'zasilkovna_option'); \n\t\t\t\techo \"<script type=\\\"text/javascript\\\">\n\t\t\t\t\tjQuery(function($) {\n\t\t\t\t\t\tfunction APIload() {\n\t\t\t\t\t\t\tvar oldZasilkovna = document.querySelector('#zasilkovna-script');\n\t\t\t\t\t\t\tif (oldZasilkovna) {\n\t\t\t\t\t\t\t\toldZasilkovna.parentNode.removeChild(oldZasilkovna);\n\t\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t\tvar ref = window.document.getElementsByTagName(\\\"script\\\")[0];\n\t\t\t\t\t\t\tvar script = window.document.createElement(\\\"script\\\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tscript.src = 'https://widget.packeta.com/v6/www/js/packetaWidget.js';\n\t\t\t\t\t\t\tscript.dataset.apiKey = \\\"\" . $zasilkovna_option['api_key'] . \"\\\";\n\t\t\t\t\t\t\tscript.id = 'zasilkovna-script';\n\t\t\t\t\t\t\tref.parentNode.insertBefore(script, ref);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tAPIload();\n\t\t\t\t\t});\n\t\t\n\t\t\t\t </script>\"; \n \n \techo '<tr>';\n \t\techo '<th class=\"zasikovna-ico\"><img src=\"'.$ico_url.'\" alt=\"Zásilkovna\" /></th>';\n// \t\techo '<td class=\"packeta-widget-btn\">';\n// \t\techo '<a href=\"#\" class=\"button packeta-widget packeta-selector-open\">'.__( 'Vybrat', 'zasilkovna' ) .'</a>';\n// \t\techo '</td>';\n echo '<td class=\"packeta-widget-btn\">';\n \t\techo '<a href=\"#\" class=\"button zasilkovna-open\">'.__( 'Vybrat', 'zasilkovna' ) .'</a><a style=\"display:none;\" href=\"#\" class=\"button packeta-widget packeta-selector-open\">'.__( 'Vybrat', 'zasilkovna' ) .'</a>';\n \t\techo '</td>';\n \techo '</tr>';\n \techo '<tr>';\n \t\techo '<th><span class=\"misto\">'.__( 'Vybraná pobočka', 'zasilkovna' ) .'</span></th>';\n \t\techo '<td>';\n \t\techo '<div class=\"packeta-selector-branch-name\"></div>';\n \t\techo '<input type=\"hidden\" name=\"zasilkovna_id\" class=\"zasilkovna_id\" value=\"default\" />';\n \t\techo '</td>';\n \techo '</tr>';\n \n\n \n\n \t}elseif( $doprava_name[1] == 'pl-paczkomaty' ){\n\t\t\t\t$mista = get_option( 'zasilkovna_3060_branches' );\n\t\t\t\techo '<tr>';\n \t\techo '<th class=\"zasikovna-ico\"><img src=\"'.WOOZASILKOVNAURL . 'assets/images/paczkomaty.png\" alt=\"Zásilkovna\" /></th>';\n \t\techo '<td>';\n \t\techo '<select name=\"zasilkovna_id\" class=\"zasilkovna_id\" style=\"width:100%;\">';\n \t\techo '<option value=\"default\">'.__('Zvolte pobočku', 'zasilkovna').'</option>';\n \t\tforeach($mista as $key => $item){ \n \t\techo '<option value=\"'.$item['code'].'\">'.$item['street'].' '.$item['city'].'</option>';\n \t\t} \n \t\techo '</select>';\n \t\techo '</td>';\n \techo '</tr>';\n\t\t\t}elseif( $doprava_name[1] == 'ua-nova-posta' ){\n\t\t\t\t$mista = get_option( 'zasilkovna_3616_branches' );\n\t\t\t\techo '<tr>';\n \t\techo '<th class=\"zasikovna-ico\"></th>';\n \t\techo '<td>';\n \t\techo '<select name=\"zasilkovna_id\" class=\"zasilkovna_id\" style=\"width:100%;\">';\n \t\techo '<option value=\"default\">'.__('Zvolte pobočku', 'zasilkovna').'</option>';\n \t\tforeach($mista as $key => $item){ \n \t\techo '<option value=\"'.$item['code'].'\">'.$item['street'].' '.$item['city'].'</option>';\n \t\t} \n \t\techo '</select>';\n \t\techo '</td>';\n \techo '</tr>';\n\t\t\t}\n \n \n \n \n else{\n \t\t$ids = Zasilkovna_Helper::set_shipping_ids();\n \t\tif( !empty( $ids[$doprava_name[1]] ) ){\n \t\t\t\techo '<input type=\"hidden\" name=\"zasilkovna_id\" value=\"'.$ids[$doprava_name[1]].'\" />'; \n \t\t\t}\n \t\t} \n \t} //konec uprav z-points zasilkovna \n \n \n $country = woo_get_customer_country();\n \n if( $country == 'CZ' ){\n //ceska posta - do ruky\n if( $doprava_name[1] === 'ceska-posta-cz' ){\n $zasilkovna_prices = get_option( 'zasilkovna_prices' );\n $ico_url = Zasilkovna_Helper::isset_shipping( $zasilkovna_prices, 'ceska-posta-cz-url-ikona' ); \n $zasilkovna_services = get_option( 'zasilkovna_services' );\n $title = $zasilkovna_services['service-label-13'];\n \n ?>\n\t\t<script type=\"text/javascript\">\n \tjQuery(function($) {\n\t\t\t\tfunction CPload() {\n//\tif ($('#billing_address_2').val().length == 0) {\n// $(this).closest('p').addClass('validate-required');\n// $('#billing_address_2').addClass('warning');\n// $('#billing_address_2_field>label').append('<abbr class=\"required test\" title=\"required\">*</abbr>');\n// $('#billing_address_2').attr('required', 'required');\n//}\n\n//funkce pro overeni cislo popisneho\n\n$('#place_order').bind('click.orderclick', function (event) {\n // Check DATE input value\n var dateInput = $('#billing_address_1').val().length;\n console.log('date input:' + dateInput);\n if (dateInput == 0) {\n alert(\"Je potřeba zadat číslo popisné.\");\n event.preventDefault();\n $('#billing_address_1').css({\n 'border': 'solid 1px red'\n });\n $('html, body').animate({\n scrollTop: $(\"#billing_address_2\").offset().top - 130\n }, 1000);\n } else {\n // remove click preventDefault\n $('#place_order').unbind('.orderclick');\n $('#billing_address_1').css({\n 'border': 'none'\n });\n $('#billing_address_1 > label > .required').remove();\n }\n\t\t\t\t});\n \n\t\t\t\t}\n\t\t\t\tCPload();\n \n\n\n\t\t\t\t$(document.body).on('change', 'input[name=\"payment_method\"]', function() {\n\t\t\t\t\tCPload();\n\t\t\t\t\t$('body').trigger('update_checkout');\n\t\t\t\t});\n\t\t\t});\n\n \t\t</script><?php \n \n if (!empty($ico_url)) { \n echo '<tr>';\n echo '<th class=\"doprava-ico cp\"><img src=\"'.$ico_url.'\" alt=\"'.$title.'\" width=\"100\" border=\"0\" /></th>'; \n echo '<td>'.$title.'</td>'; \n echo '</tr>';\n } else {\n echo '<tr>';\n echo '<th class=\"doprava-ico\"><img src=\"'.WOOZASILKOVNAURL.'assets/images/cp-balik-do-ruky.png\" alt=\"'.$title.'\" width=\"100\" border=\"0\" alt=\"cp\" ></th>'; \n echo '<td>'.$title.'</td>'; \n echo '</tr>';\n } \n }\n \n //ceska posta - doruceni na adresu\n if( $doprava_name[1] === 'doruceni-na-adresu-cz' ){\n $zasilkovna_prices = get_option( 'zasilkovna_prices' );\n $ico_url = Zasilkovna_Helper::isset_shipping( $zasilkovna_prices, 'doruceni-na-adresu-cz-url-ikona' ); \n $zasilkovna_services = get_option( 'zasilkovna_services' );\n $title = $zasilkovna_services['service-label-106'];\n\n if (!empty($ico_url)) { \n echo '<tr>';\n echo '<th class=\"doprava-ico cpn\"><img src=\"'.$ico_url.'\" alt=\"'.$title.'\" width=\"100\" border=\"0\" /></th>'; \n echo '<td>'.$title.'</td>'; \n echo '</tr>';\n } else { \n echo '<tr>';\n echo '<th class=\"doprava-ico\"><img src=\"'.WOOZASILKOVNAURL.'assets/images/cp.jpg\" alt=\"'.$title.'\" width=\"50\" border=\"0\" alt=\"cp\" ></th>'; \n echo '<td>'.$title.'</td>'; \n echo '</tr>';\n } \n }\n\t} //konec country cz\n \n }", "public function getShippingMode(): ?string\n {\n return isset($this->ShippingMode) ? $this->ShippingMode : null;\n }", "function wc_cart_totals_shipping_method_label($method)\n {\n }", "public static function update_shipping_method()\n {\n }", "public function saveShippingMethodAction(){\n\t\tif ($this->_expireAjax()) {\n\t\t\treturn;\n\t\t}\n\t\tif ($this->getRequest()->isPost()) {\n\t\t\t$data = $this->getRequest()->getPost('shipping_method', '');\n\t\t\t$result = $this->getOnepage()->saveShippingMethod($data);\n\t\t\t/*\n\t\t\t * $result will have erro data if shipping method is empty\n\t\t\t */\n\t\t\tif (!$result) {\n\t\t\t\tMage::dispatchEvent('checkout_controller_onepage_save_shipping_method', \n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'request' => $this->getRequest(),\n\t\t\t\t\t\t\t'quote' => $this->getOnepage()->getQuote() \n\t\t\t\t\t\t));\n\t\t\t\t$this->getOnepage()->getQuote()->collectTotals();\n\t\t\t\t$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));\n\t\t\t\t\n\t\t\t\t$result['goto_section'] = 'payment';\n\t\t\t\t$result['update_section'] = array(\n\t\t\t\t\t'name' => 'payment-method',\n\t\t\t\t\t'html' => $this->_getPaymentMethodsHtml(),\n\t\t\t\t\t'js' => $this->_getPaymentMethodsJavaScript() \n\t\t\t\t);\n\t\t\t}\n\t\t\t$this->getOnepage()->getQuote()->collectTotals()->save();\n\t\t\t$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));\n\t\t}\n\t}", "function get_shipping_state() {\n\t\tif (isset($_SESSION['customer']['shipping_state'])) return $_SESSION['customer']['shipping_state'];\n\t}", "public function isSellerProductShipping(){\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance ();\n return $objectManager->get ( 'Apptha\\Marketplace\\Block\\Product\\Add' )->isSellerProductShipping();\n }", "public function needs_shipping()\n {\n }", "public function needs_shipping()\n {\n }", "public function isShippingMethodsHidden()\n {\n return Mage::helper('sveacheckout')\n ->getConfigData('sveacheckout_layout/shipping_method_hide');\n }", "public function lastMileAvailabilityRequest(){\n\t\ttry{\n\t\t\t$lmar = new Nektria\\Recs\\MerchantApi\\Requests\\LastMileAvailabilityRequest($this->getOptions());\n\t\t\t$this->lastResponse = $lmar->execute(array(\"service_type\" => $this->getServiceType() ));\n\t\t\t$this->log($this->lastResponse, 'lastMileAvailabilityRequest');\n\t\t}catch(Exception $e){\n\t\t\t$this->lastError = $e;\n\t\t\t$this->log($e->getCode().$e->getMessage(), 'lastMileAvailabilityRequest ERROR');\n\t\t\treturn FALSE;\n\t\t}\n\t\t$lastPriceMatrix = Mage::getSingleton('checkout/session')->getPriceMatrix(FALSE);\n\t\tif (! $lastPriceMatrix){\n\t\t\tMage::getSingleton('checkout/session')->setPriceMatrix($this->lastResponse->getPriceMatrix());\n\t\t}\n\t\t$this->lastPrice = $this->lastResponse->getBestPrice()->getAmount();\n\n\t\t$this->setAvailabilityRequest('lastmile', array(\n\t\t\t'available'=>$this->lastResponse->isAvailable(),\n\t\t\t'price'=>$this->lastPrice,\n\t\t\t'currency_code'=>$this->lastResponse->getBestPrice()->getCurrency(),\n\t\t\t'priceMatrix'=>Mage::getSingleton('checkout/session')->getPriceMatrix(FALSE)\n\t\t) );\n\n\t\treturn $this->lastResponse;\n\t}", "public function isShippingAdminRoute() {\n // Get current route. Skip admin path.\n return \\Drupal::routeMatch()->getRawParameter('commerce_shipment');\n }", "public function getFreeShipping()\n {\n return $this->free_shipping;\n }", "public function isPayLaterPaymentMethod()\n\t{\n\t\treturn $this->_getPaymentMethod() == self::PAYLATER_PAYMENT_METHOD ? TRUE : FALSE;\n\t}", "function save_shipping_option()\n\t{\n\t\tglobal $IN, $TMPL, $FNS;\n\n\t\t$this->_save_shipping_option();\n\n\t\t$this->_redirect($this->_get_redirect_url());\n\n\t\treturn $this->cart_shipping();\n\t}", "public function hasFreeShipping()\n\t{\n\t\treturn $this->freeShipping;\n\t}", "function wc_get_chosen_shipping_method_ids()\n {\n }", "public static function calculate_shipping()\n {\n }", "public function hasFirstcarrier(){\n return $this->_has(6);\n }", "public function getSellerShipping() {\n return Mage::getResourceModel ( 'eav/entity_attribute' )->getIdByCode ( 'catalog_product', 'seller_shipping_option' );\n }", "function move_local_pickup_bottom( $available_shipping_methods, $package ) {\n\n\tif (isset($available_shipping_methods['flat_rate:1'])) {\n\t\t$local = $available_shipping_methods['flat_rate:1'];\n\t\tunset($available_shipping_methods['flat_rate:1']);\n\n\t\t$available_shipping_methods = $available_shipping_methods + [ \"flat_rate:1\" => $local ];\n\t}\n\n\treturn $available_shipping_methods;\n}", "public function getShippingNameEqualIndicator();", "public function saveShippingMethodAction()\n {\n if ($this->_expireAjax()) {\n return;\n }\n if ($this->getRequest()->isPost()) {\n $data = $this->getRequest()->getPost('shipping_method', '');\n $result = $this->getOnestep()->saveShippingMethod($data);\n /*\n $result will have error data if shipping method is empty\n */\n if (!isset($result['error'])) {\n Mage::dispatchEvent(\n 'checkout_controller_onepage_save_shipping_method',\n array(\n 'request' => $this->getRequest(),\n 'quote' => $this->getOnestep()->getQuote()\n )\n );\n $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));\n\n $result['update_step']['payment_method'] = $this->_getPaymentMethodsHtml();\n }\n //update totals\n $this->getOnestep()->getQuote()->getShippingAddress()->setCollectShippingRates(true);\n $this->getOnestep()->getQuote()->setTotalsCollectedFlag(false)->collectTotals()->save();\n\n $result['update_step']['review'] = $this->_getReviewHtml();\n $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));\n }\n }", "public function saveShippingMethodAction()\n {\n if ($this->_expireAjax()) {\n return;\n }\n\n if ($this->isFormkeyValidationOnCheckoutEnabled() && !$this->_validateFormKey()) {\n return;\n }\n\n if ($this->getRequest()->isPost()) {\n $data = $this->getRequest()->getPost('shipping_method', '');\n $result = $this->getOnepage()->saveShippingMethod($data);\n // $result will contain error data if shipping method is empty\n if (!$result) {\n Mage::dispatchEvent(\n 'checkout_controller_onepage_save_shipping_method',\n array(\n 'request' => $this->getRequest(),\n 'quote' => $this->getOnepage()->getQuote()));\n $this->getOnepage()->getQuote()->collectTotals();\n $this->_prepareDataJSON($result);\n\n $result['goto_section'] = 'payment';\n $result['update_section'] = array(\n 'name' => 'payment-method',\n 'html' => $this->_getPaymentMethodsHtml()\n );\n }\n $this->getOnepage()->getQuote()->collectTotals()->save();\n $this->_prepareDataJSON($result);\n }\n }", "public function calculate_shipping()\n {\n }", "public function calculate_shipping()\n {\n }", "function show_hide_custom_shipping_methods( $available_methods ){\r\n\t\t//disable flat rate shipping which may override this, some other shipping methods may work with it\r\n \r\n //get max weight(s)\r\n $HcCustom_Shipping_Method = new HcCustom_Shipping_Method();\r\n $weightLimit = (int) $HcCustom_Shipping_Method->settings['weight'];\r\n \r\n $HcCustom_Shipping_Method_2 = new HcCustom_Shipping_Method_2();\r\n $weightLimit2 = (int) $HcCustom_Shipping_Method_2->settings['weight'];\r\n\r\n //customer location\r\n $location = WC_Geolocation::geolocate_ip();\r\n \r\n //loose product class\r\n $category_loose = 198;\r\n \r\n //basic shipping class\r\n $shipping_class_basic = 'basic';\r\n \r\n //get total weight of cart\r\n $total_cart_weight = WC()->cart->cart_contents_weight;\r\n \r\n //assume we have all loose products to begin with, then disprove this\r\n $all_products_are_loose_or_basic = 1;\r\n\r\n //get product categories\r\n foreach( WC()->cart->get_cart() as $cart_item ){\r\n \r\n //var_dump($cart_item['data']);\r\n $product_type = $cart_item['data']->get_type();\r\n \r\n //is this a simple product or product varation?\r\n if ($product_type == 'simple') {\r\n\r\n $product_type = 'simple'; //has category ids itself\r\n $product_category_ids = $cart_item['data']->get_category_ids();\r\n \r\n } elseif ($product_type == 'variation') {\r\n \r\n $the_product = wc_get_product($cart_item['data']->get_parent_id());\r\n $product_category_ids = $the_product->get_category_ids();\r\n \r\n }\r\n \r\n //is this product Loose or in the basic shipping category?\r\n if(\r\n !in_array($category_loose, $product_category_ids ) &&\r\n $cart_item['data']->get_shipping_class() != $shipping_class_basic\r\n ){\r\n $all_products_are_loose_or_basic = 0;\r\n }\r\n \r\n } \r\n\r\n if($total_cart_weight > $weightLimit || $all_products_are_loose_or_basic == 0 || $location['country'] != 'GB'){\r\n unset( $available_methods['custom-shipping'] ); \r\n }\r\n \r\n //if($total_cart_weight > $weightLimit2 || $all_products_are_loose_or_basic == 0 || $location['country'] != 'GB'){\r\n // unset( $available_methods['custom-shipping2'] ); \r\n //}\r\n \r\n // return the available methods without the one you unset.\r\n return $available_methods;\r\n }", "public function getLastPostalCode(){\n\t\treturn Mage::getSingleton('checkout/session')->getNektriaLastPostalCode(FALSE);\n\t}", "public function getShipmentState();", "public function getDisplayShippingAttribute();", "function get_shipping_options()\n\t{\n\t\t$this->_load_shipping_plugin();\n\n\t\tif (is_object($this->SHP) && $this->_method_exists($this->SHP, 'plugin_shipping_options'))\n\t\t{\n\t\t\treturn $this->SHP->plugin_shipping_options();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn '';\n\t\t}\n\t}", "function getShippingCost($method_id=\"\")\n {\n return 0;// it is used to output the modules in CZ. The unification. PRICE_N_A;\n }", "public function getShippingCode()\n {\n return $this->shipping_code;\n }", "public function has_shipping_method($method_id)\n {\n }", "public function getShippingMethods()\n {\n return ShippingMethod::get()->filter(\"Enabled\", 1);\n }", "public function getAvailableDeliveryMethod() {\n\t\treturn $this->availableDeliveryMethod;\n\t}", "protected function getSupportedShippingMethods(Basket $oBasket)\n {\n $allSets = $this->_getPayment()->getCheckoutShippingSets($this->_oUser);\n $currency = Registry::getConfig()->getActShopCurrencyObject();\n $methods = array();\n if (!is_array($allSets)) {\n return $methods;\n }\n\n $this->_selectedShippingSetId = $oBasket->getShippingId();\n\n $shippingOptions = array();\n $shippingMap = KlarnaUtils::getShopConfVar('aarrKlarnaShippingMap');\n\n foreach ($allSets as $shippingId => $shippingMethod) {\n $assignedShippingMethod = isset($shippingMap[$shippingId]) ? $shippingMap[$shippingId] : false;\n \n $oBasket->setShipping($shippingId);\n $oPrice = $oBasket->tcklarna_calculateDeliveryCost();\n $basketPrice = $oBasket->getPriceForPayment() / $currency->rate;\n if ($this->doesShippingMethodSupportKCO($shippingId, $basketPrice)) {\n $method = clone $shippingMethod;\n\n $price = KlarnaUtils::parseFloatAsInt($oPrice->getBruttoPrice() * 100);\n $tax_rate = KlarnaUtils::parseFloatAsInt($oPrice->getVat() * 100);\n $tax_amount = KlarnaUtils::parseFloatAsInt($price - round($price / ($tax_rate / 10000 + 1), 0));\n $option = array(\n \"id\" => $shippingId,\n \"name\" => html_entity_decode($method->oxdeliveryset__oxtitle->value, ENT_QUOTES),\n \"description\" => null,\n \"promo\" => null,\n \"tax_amount\" => $tax_amount,\n 'price' => $price,\n 'tax_rate' => $tax_rate,\n 'preselected' => $shippingId === $this->_selectedShippingSetId ? true : false,\n );\n \n if ($assignedShippingMethod) {\n if (KlarnaShipping::POSTAL_WITH_DHL_PACK_STATION === $assignedShippingMethod) {\n $selectedShippingDuplicate = Registry::getSession()->getVariable('tcKlarnaSelectedDuplicate');\n $duplicate = $option;\n $duplicate['shipping_method'] = KlarnaShipping::DHL_PACK_STATION;\n $duplicate['id'] = self::PACK_STATION_PREFIX . $option['id'];\n $duplicate['preselected'] = $duplicate['id'] === $selectedShippingDuplicate;\n $shippingOptions[] = $duplicate;\n if ($duplicate['preselected']) {\n $option['preselected'] = false;\n }\n } else {\n $option['shipping_method'] = $assignedShippingMethod;\n }\n }\n $shippingOptions[] = $option;\n }\n }\n // set basket back to selected shipping option\n $oBasket->setShipping($this->_selectedShippingSetId);\n\n if (empty($shippingOptions)) {\n $oCountry = oxNew(Country::class);\n $oCountry->load($this->_oUser->getActiveCountry());\n\n throw new KlarnaConfigException(sprintf(\n Registry::getLang()->translateString('TCKLARNA_ERROR_NO_SHIPPING_METHODS_SET_UP'),\n $oCountry->oxcountry__oxtitle->value\n ));\n }\n\n return empty($shippingOptions) ? null : $shippingOptions;\n }", "public function testSetShippingMethod()\n {\n $this->markTestIncomplete('combine shipping framework with core, or remove reliance');\n }", "protected function _isMatkahuoltoShippingMethod(Order $order) {\n $matkahuoltoMethods = ['matkahuolto_80', 'matkahuolto_10', 'matkahuolto_30', 'matkahuolto_34', 'matkahuolto_local', 'matkahuolto_vak'];\n $shippingMethod = $order->getShippingMethod();\n\n return in_array($shippingMethod, $matkahuoltoMethods);\n }", "function pep_wc_shipping_method() {\n\t\tif ( ! class_exists( 'PEP_WC_Shipping_Method' ) ) {\n\t\t\tclass PEP_WC_Shipping_Method extends WC_Shipping_Method {\n\t\t\t\t/** @noinspection MagicMethodsValidityInspection */\n\t\t\t\t/** @noinspection PhpMissingParentConstructorInspection */\n\t\t\t\tprivate $rate_cache;\n\t\t\t\tprivate $pep_services;\n\t\t\t\tprivate $found_rates;\n\t\t\t\tprivate $origin;\n\t\t\t\tprivate $ordered_services;\n\n\t\t\t\tpublic $cutoff;\n\n\t\t\t\t/** @noinspection MagicMethodsValidityInspection */\n\t\t\t\t/** @noinspection PhpMissingParentConstructorInspection */\n\t\t\t\t/**\n\t\t\t\t * Constructor for your shipping class\n\t\t\t\t *\n\t\t\t\t * @access public\n\t\t\t\t * @return void\n\t\t\t\t */\n\t\t\t\tpublic function __construct() {\n\t\t\t\t\t$this->id = 'pep_transport_api';\n\t\t\t\t\t$this->method_title = __( 'PEP Shipping', 'pep-shipping' );\n\t\t\t\t\t$this->method_description = __( 'Custom Shipping Method for PEP Transport', 'pep-shipping' );\n\n\t\t\t\t\t$this->init();\n\n\t\t\t\t\t$this->enabled = $this->settings['enabled'] ?? 'yes';\n\t\t\t\t\t$this->title = $this->settings['title'] ?? __( 'PEP Shipping', 'pep-shipping' );\n\t\t\t\t\t$this->origin = $this->get_option( 'origin' );\n\t\t\t\t\t$this->cutoff = $this->get_option( 'sameday_cutoff' );\n\t\t\t\t\t$this->pep_services = $this->get_option( 'pep_services' );\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Init your settings\n\t\t\t\t *\n\t\t\t\t * @access public\n\t\t\t\t * @return void\n\t\t\t\t */\n\t\t\t\tpublic function init() {\n\t\t\t\t\t// Load the settings API\n\t\t\t\t\t$this->init_form_fields();\n\t\t\t\t\t$this->init_settings();\n\n\t\t\t\t\t// Save settings in admin if you have any defined\n\t\t\t\t\tadd_action( 'woocommerce_update_options_shipping_' . $this->id, [ $this, 'process_admin_options' ] );\n\t\t\t\t\tadd_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'clear_transients' ) );\n\t\t\t\t}\n\n\n\t\t\t\t/**\n\t\t\t\t * environment_check function.\n\t\t\t\t *\n\t\t\t\t * @access public\n\t\t\t\t * @return void\n\t\t\t\t */\n\t\t\t\tprivate function environment_check() {\n\t\t\t\t\tglobal $woocommerce;\n\n\t\t\t\t\tif ( get_woocommerce_currency() !== 'AUD' ) {\n\t\t\t\t\t\techo '<div class=\"error\"><p>' . __( 'PEP Transport requires that the currency is set to Australian Dollars.', 'pep_transport' ) . '</p></div>';\n\t\t\t\t\t} elseif ( $woocommerce->countries->get_base_country() !== 'AU' ) {\n\t\t\t\t\t\techo '<div class=\"error\"><p>' . __( 'PEP Transport requires that the base country/region is set to Australia.', 'pep_transport' ) . '</p></div>';\n\t\t\t\t\t} elseif ( ! $this->origin && $this->enabled === 'yes' ) {\n\t\t\t\t\t\techo '<div class=\"error\"><p>' . __( 'PEP Transport is enabled, but the origin postcode has not been set.', 'pep_transport' ) . '</p></div>';\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\n\t\t\t\t/**\n\t\t\t\t * admin_options function.\n\t\t\t\t *\n\t\t\t\t * @access public\n\t\t\t\t * @return void\n\t\t\t\t */\n\t\t\t\tpublic function admin_options() {\n\t\t\t\t\t// Check users environment supports this method\n\t\t\t\t\t$this->environment_check();\n\t\t\t\t\t// Show settings\n\t\t\t\t\tparent::admin_options();\n\t\t\t\t}\n\n\n\t\t\t\t/**\n\t\t\t\t * Define settings field for this shipping\n\t\t\t\t * @return void\n\t\t\t\t */\n\t\t\t\tpublic function init_form_fields() {\n\n\t\t\t\t\t$this->form_fields = [\n\t\t\t\t\t\t'enabled' => [\n\t\t\t\t\t\t\t'title' => __( 'Realtime Rates', 'pep_transport' ),\n\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t'label' => __( 'Enable', 'pep_transport' ),\n\t\t\t\t\t\t\t'default' => 'no'\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'title' => [\n\t\t\t\t\t\t\t'title' => __( 'Method Title', 'pep_transport' ),\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'description' => __( 'This controls the title which the user sees during checkout.', 'pep_transport' ),\n\t\t\t\t\t\t\t'default' => $this->method_title,\n\t\t\t\t\t\t\t'desc_tip' => true\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'origin' => [\n\t\t\t\t\t\t\t'title' => __( 'Origin Postcode', 'pep_transport' ),\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'description' => __( 'Enter the postcode for the <strong>sender</strong>.', 'pep_transport' ),\n\t\t\t\t\t\t\t'default' => '6000',\n\t\t\t\t\t\t\t'desc_tip' => true\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'sameday_cutoff' => [\n\t\t\t\t\t\t\t'title' => __( 'Same Day Cutoff', 'pep_transport' ),\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'description' => __( 'Enter the cutoff time for sameday delivery <strong>24 hour format</strong>.', 'pep_transport' ),\n\t\t\t\t\t\t\t'default' => '14:00',\n\t\t\t\t\t\t\t'desc_tip' => true\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'pep_services' => [ 'type' => 'service_codes' ],\n\t\t\t\t\t];\n\n\t\t\t\t}\n\n\n\t\t\t\t/**\n\t\t\t\t * generate the services for the admin section to be displayed\n\t\t\t\t *\n\t\t\t\t * @access public\n\t\t\t\t * @return string\n\t\t\t\t */\n\t\t\t\tpublic function generate_service_codes_html(): string {\n\t\t\t\t\tob_start();\n\t\t\t\t\tinclude __DIR__ . '/includes/PEP_Services.php';\n\t\t\t\t\tinclude __DIR__ . '/partial/wc-admin-html.php';\n\n\t\t\t\t\treturn ob_get_clean();\n\t\t\t\t}\n\n\n\t\t\t\t/**\n\t\t\t\t * validate_services_field function.\n\t\t\t\t *\n\t\t\t\t * @access public\n\t\t\t\t *\n\t\t\t\t * @param mixed $key\n\t\t\t\t *\n\t\t\t\t * @return array $services\n\t\t\t\t */\n\t\t\t\tpublic function validate_service_codes_field( $key ): array {\n\t\t\t\t\t$services = [];\n\n\t\t\t\t\tforeach ( (array) $_POST['pep_transport_service'] as $code => $settings ) {\n\n\t\t\t\t\t\t$services[ $code ] = [\n\t\t\t\t\t\t\t'order' => wc_clean( $settings['order'] ),\n\t\t\t\t\t\t\t'enabled' => isset( $settings['enabled'] ) ? true : false,\n\t\t\t\t\t\t\t'name' => wc_clean( $settings['name'] ),\n\t\t\t\t\t\t\t'description' => wc_clean( $settings['description'] ),\n\t\t\t\t\t\t\t'variables' => $settings['variables']\n\t\t\t\t\t\t];\n\n\t\t\t\t\t}\n\n\t\t\t\t\treturn $services;\n\t\t\t\t}\n\n\n\t\t\t\t/**\n\t\t\t\t * calculate_shipping function.\n\t\t\t\t *\n\t\t\t\t * @access public\n\t\t\t\t *\n\t\t\t\t * @param mixed $package\n\t\t\t\t *\n\t\t\t\t * @return void\n\t\t\t\t */\n\t\t\t\tpublic function calculate_shipping( $package = [] ) {\n\n\t\t\t\t\t$this->rate_cache = get_transient( 'pep_transport_quotes' );\n\t\t\t\t\t$_shipping_details = wc()->customer->get_shipping();\n\n\t\t\t\t\t//\t$chosen_methods = wc()->session->get( 'chosen_shipping_methods' );\n\n\t\t\t\t\t$_checkout_data = $_POST['post_data'] ?? null;\n\n\t\t\t\t\t$_name_fields = array();\n\t\t\t\t\tif ( $_checkout_data ) {\n\n\t\t\t\t\t\t$_pairs = explode( '&', $_checkout_data );\n\t\t\t\t\t\t$_count = 0;\n\t\t\t\t\t\tforeach ( $_pairs as $value ) {\n\t\t\t\t\t\t\t$_key_value = explode( '=', $value );\n\n\t\t\t\t\t\t\tif ( $_count === 2 ) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( 'billing_first_name' === $_key_value[0] ) {\n\t\t\t\t\t\t\t\t$_name_fields['first_name'] = $_key_value[1];\n\t\t\t\t\t\t\t\t$_count ++;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( 'billing_last_name' === $_key_value[0] ) {\n\t\t\t\t\t\t\t\t$_name_fields['last_name'] = $_key_value[1];\n\t\t\t\t\t\t\t\t$_count ++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( ! empty( $_name_fields['first_name'] ) && ! empty( $_name_fields['last_name'] ) ) {\n\n\t\t\t\t\t\t\t$_customer_details['address2'] = wc()->customer->get_shipping_address_2();\n\n\t\t\t\t\t\t\t$_shipping_details['name'] = $_name_fields['first_name'] . ' ' . $_name_fields['last_name'];\n\t\t\t\t\t\t\t$_shipping_details['suburb'] = $_shipping_details['city'];\n\t\t\t\t\t\t\t$_shipping_details['address1'] = $_shipping_details['address_1'];\n\n\t\t\t\t\t\t\t$_pep_api = new Pep_Api_Request( $_shipping_details, $package );\n\n\t\t\t\t\t\t\t$service_codes = $this->filter_services( $_pep_api->get_measurements() );\n\n\t\t\t\t\t\t\tif ( empty( $service_codes ) ) {\n\t\t\t\t\t\t\t\t$message = 'No PEP Services available';\n\t\t\t\t\t\t\t\twc_add_notice( $message, 'error' );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tforeach ( $service_codes as $code => $values ) {\n\n\t\t\t\t\t\t\t\t$_rate = new stdClass();\n\n\t\t\t\t\t\t\t\t$_rate->code = (string) $code;\n\t\t\t\t\t\t\t\t$_rate->name = (string) $values['name'];\n\t\t\t\t\t\t\t\t$_rate->cost = null;\n\n\t\t\t\t\t\t\t\t$_response = $_pep_api->run_query( $_rate->code );\n\n\t\t\t\t\t\t\t\t// adding in for logging\n\t\t\t\t\t\t\t\t$_response['MANIFEST']['CONSIGNMENT']['SERVICE_CODE'] = $_rate->code;\n\t\t\t\t\t\t\t\t$this->log_response( $_response );\n\n\t\t\t\t\t\t\t\tif ( 'SUCCESS' === $_response['MANIFEST']['CONSIGNMENT']['STATUS'] ) {\n\n\t\t\t\t\t\t\t\t\t$_rate->cost = $_response['MANIFEST']['CONSIGNMENT']['COST'];\n\n\t\t\t\t\t\t\t\t\t// logging the response to the plugin settings page\n\t\t\t\t\t\t\t\t\t$this->found_rates[ $_rate->code ] = $this->prepare_rate( $_rate, $_response );\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tset_transient( 'pep_transport_quotes', $this->rate_cache, HOUR_IN_SECONDS / 4 );\n\n\t\t\t\t\t\t\t// Register the rate\n\t\t\t\t\t\t\tforeach ( (array) $this->found_rates as $key => $rate ) {\n\t\t\t\t\t\t\t\t$this->add_rate( $rate );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\n\t\t\t\t/**\n\t\t\t\t * using measurements of the checkout to get correct service\n\t\t\t\t *\n\t\t\t\t * @param $measurements\n\t\t\t\t *\n\t\t\t\t * @return array\n\t\t\t\t */\n\t\t\t\tprivate function filter_services( $measurements ) {\n\n\t\t\t\t\t// complete list of service codes to be filtered down\n\t\t\t\t\t// will return 3 service codes for (next-day/same-day/VIP)\n\t\t\t\t\t$filtered = [];\n\t\t\t\t\t$_services = $this->pep_services;\n\t\t\t\t\t$_totalWeight = $measurements['cart_weight'];\n\t\t\t\t\tunset( $measurements['cart_weight'] );\n\n\t\t\t\t\t// remove the services that do not match the service code variables\n\t\t\t\t\t$checkedWeightServices = array_filter( $_services, function ( $service ) use ( $_totalWeight ) {\n\t\t\t\t\t\tif ( ! $service['enabled'] ) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$variables = explode( ',', $service['variables'] );\n\n\t\t\t\t\t\treturn $_totalWeight >= $variables[0] && $_totalWeight <= $variables[1];\n\t\t\t\t\t} );\n\n\t\t\t\t\t// loop through measurements and find any products that match the checkedWeight Services\n\t\t\t\t\t$productLengths = array_map( function ( $product ) {\n\t\t\t\t\t\treturn $product['length'];\n\t\t\t\t\t}, $measurements );\n\n\n\t\t\t\t\t// @TODO look at changing this a array_map with an array_filter callback\n\t\t\t\t\t// loop through the lengths of each item and check if there are any matches to the services with specific size requirement\n\t\t\t\t\tforeach ( $productLengths as $length ) {\n\t\t\t\t\t\t$filtered = array_filter( $checkedWeightServices, function ( $service ) use ( $length ) {\n\t\t\t\t\t\t\t$variables = explode( ',', $service['variables'] );\n\t\t\t\t\t\t\tif ( empty( $variables[2] ) && empty( $variables[3] ) ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn $length >= $variables[2] && $length <= $variables[3];\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\n\n\t\t\t\t\treturn $filtered;\n\t\t\t\t}\n\n\n\t\t\t\t/**\n\t\t\t\t * prepare the rate to be returned to the checkout\n\t\t\t\t *\n\t\t\t\t * @access private\n\t\t\t\t *\n\t\t\t\t * @param $_rate\n\t\t\t\t * @param $_response\n\t\t\t\t *\n\t\t\t\t * @return array\n\t\t\t\t */\n\t\t\t\tprivate function prepare_rate( $_rate, $_response ): array {\n\n\t\t\t\t\t$rate_code = $_rate->code;\n\t\t\t\t\t$rate_id = \"{$this->id}_{$_rate->name}\";\n\t\t\t\t\t$rate_cost = $_rate->cost;\n\t\t\t\t\t$rate_name = $_rate->name;\n//\t\t\t\t\t$rate_name = $this->title;\n\n\t\t\t\t\t// Enabled check\n\t\t\t\t\tif ( isset( $this->pep_services[ $rate_code ] ) && empty( $this->pep_services[ $rate_code ]['enabled'] ) ) {\n\t\t\t\t\t\treturn [];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Name adjustment\n\t\t\t\t\t$rate_name = ! empty( $this->pep_services[ $rate_code ]['name'] ) ? $this->pep_services[ $rate_code ]['name'] : $rate_name;\n\n\t\t\t\t\t// Merging\n\t\t\t\t\t$packages = 1;\n\t\t\t\t\tif ( isset( $this->found_rates[ $rate_id ] ) ) {\n\t\t\t\t\t\t$rate_cost += $this->found_rates[ $rate_id ]['cost'];\n\t\t\t\t\t\t$packages = 1 + $this->found_rates[ $rate_id ]['packages'];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Sort\n\t\t\t\t\t$sort = isset( $this->pep_services[ $rate_code ]['order'] ) ? (int) $this->pep_services[ $rate_code ]['order'] : 999;\n\n\t\t\t\t\treturn array(\n\t\t\t\t\t\t'id' => $rate_id,\n\t\t\t\t\t\t'label' => $rate_name,\n\t\t\t\t\t\t'cost' => $rate_cost,\n\t\t\t\t\t\t'sort' => $sort,\n\t\t\t\t\t\t'packages' => $packages,\n\t\t\t\t\t\t'calc_tax' => 'per_item',\n\t\t\t\t\t\t'meta_data' => array(\n\t\t\t\t\t\t\t'service_code' => $rate_code,\n\t\t\t\t\t\t\t'reference' => $_response['MANIFEST']['CONSIGNMENT']['REFERENCE'],\n\t\t\t\t\t\t\t'consignment' => $_response['MANIFEST']['CONSIGNMENT']['CONSIGNMENTNUMBER'],\n\t\t\t\t\t\t),\n\t\t\t\t\t);\n\t\t\t\t}\n\n\n\t\t\t\t/**\n\t\t\t\t * logging class functions when required\n\t\t\t\t *\n\t\t\t\t * @param $_response\n\t\t\t\t */\n\t\t\t\tprivate function log_response( $_response ) {\n\n\t\t\t\t\t// output print for post content\n\t\t\t\t\t//\t$content = print_r($_response['MANIFEST']['CONSIGNMENT'] , true);\n\n\t\t\t\t\t// logging the event\n\t\t\t\t\t$log_data = array(\n\t\t\t\t\t\t'post_title' => 'HubSystem_Quote',\n\t\t\t\t\t\t'post_content' => serialize( $_response['MANIFEST']['CONSIGNMENT'] ),\n\t\t\t\t\t\t'post_parent' => '',\n\t\t\t\t\t\t'log_type' => 'event',\n\t\t\t\t\t);\n\n\t\t\t\t\t$log_meta = array(\n\t\t\t\t\t\t'user_id' => get_current_user_id(),\n\t\t\t\t\t\t'customer_ip' => $_SERVER['SERVER_ADDR'],\n\t\t\t\t\t\t'request_uri' => $_SERVER['REQUEST_URI'],\n\t\t\t\t\t);\n\n\t\t\t\t\tWP_Logging::insert_log( $log_data, $log_meta );\n\t\t\t\t}\n\n\n\t\t\t\t/**\n\t\t\t\t * clear any stored settings from WP Transients\n\t\t\t\t *\n\t\t\t\t * @access public\n\t\t\t\t * @return void\n\t\t\t\t */\n\t\t\t\tpublic function clear_transients() {\n\t\t\t\t\tdelete_transient( 'pep_transport_quotes' );\n\t\t\t\t}\n\n\t\t\t} // class PEP_WC_Shipping_Method\n\t\t}\n\t}", "public function getAllowFreeShipping()\n {\n return $this->getData('allow_free_shipping');\n }", "function custom_shipping_methods( $rates, $package ){\n $groups_user = new Groups_User( get_current_user_id() );\n $can_be_registered = $groups_user->can( 'can_be_registered' );\n \n $free = array();\n \n // if the user is a member of a registered company then show methods for the company (and any additional rates) and hide flat rate / free shipping\n if ( $can_be_registered == 1 ) {\n \n foreach ( $rates as $rate_id => $rate ) {\n if($rate->method_id != 'flat_rate' && $rate->method_id != 'free_shipping' ){\n $free[ $rate_id ] = $rate;\n \n }\n }\n }\n \n else {\n \n // the customer does not belong to a company. If free shipping is available then hide all other shipping methods\n foreach ( $rates as $rate_id => $rate ) {\n if ( 'free_shipping' === $rate->method_id ) {\n $free[ $rate_id ] = $rate;\n break;\n }\n }\n\n }\n return ! empty( $free ) ? $free : $rates;\n}", "public function getHasDeliveryMethod() {\n\t\treturn $this->hasDeliveryMethod;\n\t}", "public function getHasDeliveryMethod() {\n\t\treturn $this->hasDeliveryMethod;\n\t}", "public function getHasDeliveryMethod() {\n\t\treturn $this->hasDeliveryMethod;\n\t}", "function dia_reset_default_shipping_method( $method, $available_methods ) {\n\t$method = key($available_methods);\n\treturn $method;\n}", "function have_shipping_params() {\r\n\t\tif (($this->shipping_params['pickup']) || ($this->shipping_params['product'] &&\r\n\t\t\t\t$this->shipping_params['origPostal'] && $this->shipping_params['origCountry']\r\n\t\t\t\t&& $this->shipping_params['destPostal'] && $this->shipping_params['destCountry']\r\n\t\t\t\t&& $this->shipping_params['rateCode']\r\n\t\t\t\t&& $this->shipping_params['shippingContainerCode']\r\n\t\t\t\t&& $this->shipping_params['rescom']\r\n\t\t\t\t)) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public function canViewShippingInfo()\n {\n if (is_object($this->getVendorOrder()->getShippingMethod())\n && !$this->getVendorOrder()->getShippingMethod()->getMethod()) {\n return false;\n } elseif (!$this->getVendorOrder()->getShippingMethod()) {\n return false;\n }\n return true;\n }", "public function getShippingStatus()\n {\n return $this->shipping_status;\n }" ]
[ "0.7326599", "0.7326599", "0.7326599", "0.694747", "0.6718731", "0.6669956", "0.6622325", "0.6527419", "0.6424959", "0.6399789", "0.6380326", "0.6375316", "0.63740945", "0.63738054", "0.63354576", "0.6332067", "0.63092643", "0.62380916", "0.62292266", "0.6206767", "0.61960965", "0.6195276", "0.6195276", "0.61800116", "0.6152737", "0.61036456", "0.6100862", "0.61000353", "0.60965997", "0.6093845", "0.6092048", "0.6072732", "0.6064394", "0.606399", "0.60547614", "0.6028418", "0.59506375", "0.5943329", "0.59417874", "0.59380084", "0.5937549", "0.59251004", "0.5913047", "0.58975166", "0.589232", "0.5884443", "0.5869508", "0.5869508", "0.5869508", "0.5869508", "0.5869508", "0.5861661", "0.5856951", "0.5853385", "0.584759", "0.58315605", "0.5818204", "0.5811306", "0.58080393", "0.58073884", "0.58055514", "0.5802264", "0.58018893", "0.5799299", "0.57889277", "0.57837814", "0.5783656", "0.5773171", "0.5766875", "0.576243", "0.57542104", "0.5747948", "0.5734675", "0.5734228", "0.5732625", "0.5731633", "0.5731028", "0.5728133", "0.5709866", "0.5706898", "0.5697724", "0.5694938", "0.56863195", "0.5678057", "0.5662687", "0.5657606", "0.565345", "0.56521165", "0.56518", "0.563856", "0.5638289", "0.56325996", "0.56292075", "0.562814", "0.562814", "0.562814", "0.56195456", "0.5618562", "0.5618257", "0.56153476" ]
0.7858555
0
Returns the last Mile selected Price
Возвращает последнюю цену, выбранную Mile
public function getLastMileSelectedPrice(){ if ( self::getLastMileSelected() ){ $selectedPrice = Mage::helper('core')->jsonDecode(self::getLastSelection()); return Mage::helper('core')->currency( $selectedPrice['total_price'] ); }else{ return ''; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLastPrice(){\n\t\treturn $this->lastPrice;\n\t}", "public function get_maximum_price() {\n\n\t\tif ( ! isset( $this->maximum_price ) ) {\n\t\t\t$this->maximum_price = give_get_meta( $this->ID, '_give_custom_amount_range_maximum', true, 999999.99 );\n\n\t\t\tif ( ! $this->is_custom_price_mode() ) {\n\t\t\t\t$this->maximum_price = give_get_highest_price_option( $this->ID );\n\t\t\t}\n\t\t}\n\n\t\treturn apply_filters( 'give_get_set_maximum_price', $this->maximum_price, $this->ID );\n\t}", "public function htmlLastMileSelection(){\n\t\t$template = Mage::app()->getLayout()->createBlock('core/template')\n \t->setTemplate('recs/totals/lastmile.phtml');\n return $template->toHtml();\n\t}", "public function getLastMileSelected(){\n\t \t$shipping_method = self::getShippingMethod();\n\n\t //Switch with method type\n\t \tif ($shipping_method == 'nektria_recs_lastmile'){\n\t \t\treturn TRUE;\n\t \t}else{\n\t \t\treturn FALSE;\n\t \t}\n\t}", "function get_op_last_price(){\r\n\t\t$query = isset($_POST['query']) ? @$_POST['query'] : \"\";\r\n\t\t$start = (integer) (isset($_POST['start']) ? @$_POST['start'] : @$_GET['start']);\r\n\t\t$end = (integer) (isset($_POST['limit']) ? @$_POST['limit'] : @$_GET['limit']);\r\n\t\t$master_id = (integer) (isset($_POST['master_id']) ? @$_POST['master_id'] : @$_GET['master_id']);\r\n\t\t$task = isset($_POST['task']) ? @$_POST['task'] : @$_GET['task'];\r\n\t\t$selected_id = isset($_POST['selected_id']) ? @$_POST['selected_id'] : @$_GET['selected_id'];\r\n\t\t$supplier_id = isset($_POST['supplier_id']) ? @$_POST['supplier_id'] : @$_GET['supplier_id'];\r\n\t\t$produk_id = isset($_POST['produk_id']) ? @$_POST['produk_id'] : @$_GET['produk_id'];\r\n\t\t$order_tanggal = isset($_POST['order_tanggal']) ? @$_POST['order_tanggal'] : @$_GET['order_tanggal'];\r\n\t\tif($task=='detail')\r\n\t\t\t$result=$this->m_master_order_beli->get_produk_detail_list($master_id,$query,$start,$end);\r\n\t\telseif($task=='op_last_price')\r\n\t\t\t$result=$this->m_master_order_beli->get_op_last_price($supplier_id, $produk_id, $order_tanggal);\r\n\t\techo $result;\r\n\t}", "public function getMaxPrice()\n {\n return $this->maxPrice;\n }", "function get_pp_last_price($supplier_id, $produk_id, $minta_tanggal){\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\t$sql=\"SELECT dminta_harga , dorder_harga_log, minta_supplier, dminta_produk\r\n\t\t\t\t\tFROM detail_minta_beli \r\n\t\t\t\t\tLEFT JOIN master_order_beli ON (master_order_beli.minta_id = detail_order_beli.dminta_master)\r\n\t\t\t\t\tLEFT JOIN produk on (detail_order_beli.dorder_produk = produk.produk_id)\r\n\t\t\t\t\tWHERE detail_order_beli.dminta_produk = '\".$produk_id.\"' AND master_order_beli.minta_supplier = '\".$supplier_id.\"'\r\n\t\t\t\tORDER BY detail_order_beli.dorder_harga_log DESC LIMIT 0,5\";\r\n\t\t\t\t*/\r\n\t\t\t$sql = \"SELECT * from produk\r\n\t\t\t\t\tWHERE produk_id = '\".$produk_id.\"'\r\n\t\t\t\t\t\";\r\n\t\t\t\t\r\n\t\t\t$result = $this->db->query($sql);\r\n\t\t\t$nbrows = $result->num_rows();\r\n\t\t\t\r\n\t\t\tif($nbrows>0){\r\n\t\t\t\tforeach($result->result() as $row){\r\n\t\t\t\t\t$arr[] = $row;\r\n\t\t\t\t}\r\n\t\t\t\t$jsonresult = json_encode($arr);\r\n\t\t\t\treturn '({\"total\":\"'.$nbrows.'\",\"results\":'.$jsonresult.'})';\r\n\t\t\t} else {\r\n\t\t\t\treturn '({\"total\":\"0\", \"results\":\"\"})';\r\n\t\t\t}\r\n\t\t}", "function listLastProduct(){\n \t$q = $this->db->query(\"SELECT a.*, b.discount, a.price - ( (b.discount/100) * a.price) as hargadisk \n FROM ss_products a\n LEFT JOIN ss_promotiondetails b ON a.productcode = b.productcode\n WHERE a.publish = '1' \n ORDER BY a.createddate DESC LIMIT 10\");\n\n \t$produk = $q->result_array();\n \treturn $produk;\n }", "public function getLast() : float\n {\n return $this->last;\n }", "public function lastMileAvailabilityRequest(){\n\t\ttry{\n\t\t\t$lmar = new Nektria\\Recs\\MerchantApi\\Requests\\LastMileAvailabilityRequest($this->getOptions());\n\t\t\t$this->lastResponse = $lmar->execute(array(\"service_type\" => $this->getServiceType() ));\n\t\t\t$this->log($this->lastResponse, 'lastMileAvailabilityRequest');\n\t\t}catch(Exception $e){\n\t\t\t$this->lastError = $e;\n\t\t\t$this->log($e->getCode().$e->getMessage(), 'lastMileAvailabilityRequest ERROR');\n\t\t\treturn FALSE;\n\t\t}\n\t\t$lastPriceMatrix = Mage::getSingleton('checkout/session')->getPriceMatrix(FALSE);\n\t\tif (! $lastPriceMatrix){\n\t\t\tMage::getSingleton('checkout/session')->setPriceMatrix($this->lastResponse->getPriceMatrix());\n\t\t}\n\t\t$this->lastPrice = $this->lastResponse->getBestPrice()->getAmount();\n\n\t\t$this->setAvailabilityRequest('lastmile', array(\n\t\t\t'available'=>$this->lastResponse->isAvailable(),\n\t\t\t'price'=>$this->lastPrice,\n\t\t\t'currency_code'=>$this->lastResponse->getBestPrice()->getCurrency(),\n\t\t\t'priceMatrix'=>Mage::getSingleton('checkout/session')->getPriceMatrix(FALSE)\n\t\t) );\n\n\t\treturn $this->lastResponse;\n\t}", "public function getCalculatedFinalPrice()\n {\n return $this->_getData('calculated_final_price');\n }", "function last_item() {\n\t\t$offset_end = $this->limit() * $this->number;\n\t\t\n\t\tif ($offset_end > $this->paginator->item_count) {\n\t\t\t$offset_end = $this->paginator->item_count;\n\t\t}\n\t\t\n\t\treturn $offset_end;\n\t}", "public function htmlAdminLastMileSelection($order){\n\t\t$template = Mage::app()->getLayout()->createBlock('core/template')\n\t\t\t->setData('order', $order)\n \t->setTemplate('recs/sales/order/view/lastmile.phtml');\n return $template->toHtml();\n\t}", "public function getLastItem()\n {\n $output = 0;\n $tem_end_item_number = (($this->current_page) * $this->items_per_page);\n if ($this->total_items) {\n if ($tem_end_item_number <= $this->total_items) {\n $output = $tem_end_item_number;\n } else {\n $output = $this->total_items;\n }\n }\n\n return $output;\n }", "public function getMaxPrice()\n {\n if (is_null($this->_maxPrice)) {\n $this->_prepareStatisticsData();\n }\n\n return $this->_maxPrice;\n }", "public function last()\n\t{\n // get data from the database\n $data = $this->get_series_where(NULL);\n \n $index = count($data) - 1;\n return $data[$index];\n\t}", "public function price()\n {\n return (float)$this->get('mt');\n }", "public function addFinalPrice()\n {\n return $this->addPriceData();\n }", "public function getMaximumPrice()\n {\n $optionPrices = [];\n\n foreach ($this->product->bundle_options as $option) {\n foreach ($option->bundle_option_products as $bundleOptionProduct) {\n $variant = $bundleOptionProduct->product;\n\n if (! $variant->getTypeInstance()->isSaleable()) {\n continue;\n }\n\n $variantIndexer = $variant->getTypeInstance()\n ->getPriceIndexer()\n ->setCustomerGroup($this->customerGroup)\n ->setProduct($variant);\n\n if (in_array($option->type, ['multiselect', 'checkbox'])) {\n if (! isset($optionPrices[$option->id][0])) {\n $optionPrices[$option->id][0] = 0;\n }\n\n $optionPrices[$option->id][0] += $bundleOptionProduct->qty * $variantIndexer->getMinimalPrice();\n } else {\n $optionPrices[$option->id][] = $bundleOptionProduct->qty * $variantIndexer->getMinimalPrice();\n }\n\n }\n }\n\n $maxPrice = 0;\n\n foreach ($optionPrices as $optionPrice) {\n $maxPrice += max($optionPrice);\n }\n\n return $maxPrice;\n }", "public function getOriginalRetailPrice()\n {\n return $this->originalRetailPrice;\n }", "public function getRegularMaximumPrice()\n {\n $optionPrices = [];\n\n foreach ($this->product->bundle_options as $option) {\n foreach ($option->bundle_option_products as $index => $bundleOptionProduct) {\n $variant = $bundleOptionProduct->product;\n\n if (! $variant->getTypeInstance()->isSaleable()) {\n continue;\n }\n\n if (in_array($option->type, ['multiselect', 'checkbox'])) {\n if (! isset($optionPrices[$option->id][0])) {\n $optionPrices[$option->id][0] = 0;\n }\n\n $optionPrices[$option->id][0] += $bundleOptionProduct->qty * $variant->price;\n } else {\n $optionPrices[$option->id][] = $bundleOptionProduct->qty * $variant->price;\n }\n\n }\n }\n\n $maxPrice = 0;\n\n foreach ($optionPrices as $key => $optionPrice) {\n $maxPrice += max($optionPrice);\n }\n\n return $maxPrice;\n }", "public function getLast() {\r\n return $this->value[$this->count - 1];\r\n }", "public function last()\n {\n return $this->parts[count($this->parts) - 1];\n }", "public function getScaleLastPage() {\r\n return $this->scaleLast;\r\n }", "public function getPriceEach()\n {\n return $this->priceEach;\n }", "function higher_item() {\n\t\t$finder = $this->finder();\n\t\t$item = $finder->find('first', array('conditions'=>$this->position_field.\" = \".($this->data[$this->position_field] - 1).\" AND \".$this->scope_condition()));\n\t\treturn $item;\n\t}", "public function getLast(){\n\t\treturn $this->last;\n\t}", "public function getLast(){\n return $this->getElem($this->getSize());\n }", "function finalPriceAfterTax($finalPrice,$totalTax){\r\n\t\treturn $finalPrice-$totalTax;\r\n\t}", "function getMostExpensiveWine() {\n global $pdo;\n\n $sql = \"SELECT MAX(i.`cost`) AS \\\"max\\\"\n FROM `inventory` as i\n WHERE i.`on_hand` > 0\";\n\n $statement = $pdo->prepare($sql);\n $statement->execute();\n\n return $statement->fetch(PDO::FETCH_NUM)[0];\n }", "public function getLast()\n {\n return $this->getByIndex($this->count() - 1);\n }", "protected function getHighPrice() {\n\t\treturn method_exists( $this->product, 'get_variation_price' ) ? $this->product->get_variation_price( 'max' ) : '';\n\t}", "public function getBaseOriginalPrice();", "function highestBuy($symbol)\n {\n $this->orderBook->getHigh();\n }", "public function get_minimum_price() {\n\n\t\tif ( ! isset( $this->minimum_price ) ) {\n\n\t\t\t$this->minimum_price = give_get_meta( $this->ID, '_give_custom_amount_range_minimum', true );\n\n\t\t\t// Give backward < 2.1\n\t\t\tif ( empty( $this->minimum_price ) ) {\n\t\t\t\t$this->minimum_price = give_get_meta( $this->ID, '_give_custom_amount_minimum', true );\n\t\t\t}\n\n\t\t\tif ( ! $this->is_custom_price_mode() ) {\n\t\t\t\t$this->minimum_price = give_get_lowest_price_option( $this->ID );\n\t\t\t}\n\n\t\t}\n\n\t\treturn apply_filters( 'give_get_set_minimum_price', $this->minimum_price, $this->ID );\n\t}", "public function getMaxPriceThreshold()\n {\n return $this->getData('max_price_threshold');\n }", "public function lastTrade()\n {\n return $this->orderBook->getLastTrade();\n }", "public function getPricePoint() { return $this->pricePoint; }", "function latestStockPrice($stockId)\n\t{\n\t\tglobal $investDb;\n\t\t$sql = \"SELECT unitPrice FROM broker_security WHERE companyId = \\\"$stockId\\\" ORDER BY createdDate DESC LIMIT 1 \";\n\t\t$query = $investDb->query($sql) or trigger_error($investDb->error);\n\n\t\t$data = $query->fetch_assoc();\n\t\treturn $data['unitPrice']??0;\n\t}", "function dksnippets_extract_highest_price($str = '', $format = true) {\n $prices = dksnippets_extract_prices($str);\n\n /* Store highest amount */\n $highest_amount = 0;\n foreach ($prices as $price) {\n $tmp_nb = floatval($price);\n if ($tmp_nb > $highest_amount) {\n $highest_amount = $tmp_nb;\n }\n }\n\n if ($format) {\n $highest_amount = number_format(floatval(str_replace(',', '.', $highest_amount)), 2, ',', '');\n }\n return $highest_amount;\n}", "public function getLast() {\n return end($this->items);\n }", "public function value()\n {\n $product = $this->getProduct();\n\n return $product->retail_price->multiply($this->qt);\n }", "public function displayFinalPrice()\n {\n return $this->itemPriceRenderer->displayFinalPrice();\n }", "public function getLastSubtotal(){\n\t\treturn Mage::getSingleton('checkout/session')->getNektriaLastSubtotal(FALSE);\n\t}", "function zen_get_attributes_price_final_onetime($attribute, $qty= 1, $pre_selected_onetime) {\n global $db;\n global $cart;\n\n if ($pre_selected_onetime == '' or $attribute != $pre_selected_onetime->fields[\"products_attributes_id\"]) {\n $pre_selected_onetime = $db->Execute(\"select pa.* from \" . TABLE_PRODUCTS_ATTRIBUTES . \" pa where pa.products_attributes_id= '\" . (int)$attribute . \"'\");\n } else {\n // use existing select\n }\n\n// one time charges\n // onetime charge\n $attributes_price_final_onetime += $pre_selected_onetime->fields[\"attributes_price_onetime\"];\n\n // price factor\n $display_normal_price = zen_get_products_actual_price($pre_selected_onetime->fields[\"products_id\"]);\n $display_special_price = zen_get_products_special_price($pre_selected_onetime->fields[\"products_id\"]);\n\n // price factor one time\n $attributes_price_final_onetime += zen_get_attributes_price_factor($display_normal_price, $display_special_price, $pre_selected_onetime->fields[\"attributes_price_factor_onetime\"], $pre_selected_onetime->fields[\"attributes_price_factor_onetime_offset\"]);\n\n // onetime charge qty price\n $attributes_price_final_onetime += zen_get_attributes_qty_prices_onetime($pre_selected_onetime->fields[\"attributes_qty_prices_onetime\"], 1);\n\n return $attributes_price_final_onetime;\n }", "public function get_current_price(){\n\t\treturn (float) $this->v_current_price;\n\t}", "public function GetMaxVat()\n {\n $iPointer = $this->getItemPointer();\n $oMaxVatItem = null;\n $this->GoToStart();\n while ($oItem = $this->Next()) {\n $oCurrentVat = $oItem->GetVat();\n if (!is_null($oCurrentVat)) {\n if (is_null($oMaxVatItem)) {\n $oMaxVatItem = $oCurrentVat;\n } elseif ($oMaxVatItem->fieldVatPercent < $oCurrentVat->fieldVatPercent) {\n $oMaxVatItem = $oCurrentVat;\n }\n }\n }\n $this->setItemPointer($iPointer);\n\n return $oMaxVatItem;\n }", "function getLastValue() {\n\t\treturn $this->_LastValue;\n\t}", "public function getPriceAfterDiscount()\n {\n $discountAmount = $this->discount * $this->price;\n return $this->price - $discountAmount;\n }", "public function getMinPrice()\n\t{\n\t\treturn (float) $this->_db->fetchOne('SELECT MIN(`sponge_price`) FROM `cake_prices` WHERE `cake_id` = ?', $this->getCakeId());\n\t}", "public function latestBid()\n {\n return $this->hasOne(Bid::class)->ofMany('price', 'max');\n }", "public function getLast();", "function getHPModBasePrice($Current, $Default){\n\tglobal $Mod_HP_Cost, $Mod_HP_Cost;\n\tif($Current / $Default < 0.5){\n\t\treturn $Current * 30 + $Mod_HP_Cost;\n\t}\n\telse{\n\t\treturn $Current * 40 + $Mod_HP_UCost;\n\t}\n}", "public function getLast()\n {\n return $this->last;\n }", "public function addMinimalPrice()\n {\n return $this->addPriceData();\n }", "public function addMinimalPrice()\n {\n return $this->addPriceData();\n }", "public function getClearPrice()\n {\n return $this->getPrice();\n }", "public function getHargaMaxProduk()\n {\n $sql = \"SELECT MAX(harga_baju) AS hargaMax FROM baju\";\n $query = koneksi()->query($sql);\n return $query->fetch_assoc();\n }", "function getLast()\r\n\t{\r\n\t\tif($this->page == $this->total_pages)\r\n\t\t{\r\n\t\t\t$this->last=0;\r\n\t\t}else { \r\n\t\t\t$this->last = $this->total_pages;\r\n\t\t}\r\n\t\treturn $this->last; \r\n\t}", "public function GetLast(){\t\t\r\n\t\treturn $this->PageCount - 1;\r\n\t}", "public function getLastRound()\n {\n return $this->getXml()->getElementsByTagName('LastMatchRound')->item(0)->nodeValue;\n }", "private function last(){\n return $this->boards[count($this->boards)-1];\n }", "public function price()\n\t{\n\t\treturn $this->isFrozen() ? $this->price : $this->compute_price();\n\t}", "function getClosingStockDetailsUsingLastPurchasePrice($pid, $from_date, $to_date, $closingUnit) {\n $CI = & get_instance();\n $CI->load->model('reports/admin/inventorymodel');\n $lastPurchasePrice = $CI->inventorymodel->getLastPurchasePriceByProductId($pid, $from_date, $to_date);\n $closingPrice = $lastPurchasePrice * $closingUnit;\n return $closingPrice;\n }", "public function getExtendedPrice();", "private function penultimate(){\n return $this->boards[count($this->boards)-2];\n }", "public function last()\n {\n return $this->data[count($this->data) - 1];\n }", "public function getMaxPriceInt()\n {\n $attribute = $this->getAttributeModel();\n $collection = $this->getLayer()->getProductCollection();\n $inputType = $attribute->getFrontend()->getInputType();\n $typeConverter = new DMC_Solr_Document_TypeConverter($inputType);\n $fieldName = $typeConverter->solr_index_prefix.'index_'.$this->_requestVar;\n $maxPrice = $this->getData('max_price_int');\n if (is_null($maxPrice)) {\n\n if (get_class($this->getLayer()->getProductCollection()) === 'DMC_Solr_Model_SolrServer_Adapter_Product_Collection') {\n $select = $this->getLayer()->getProductCollection()->getSelect();\n $fselect = clone $select;\n $fselect->param('stats', 'true');\n $fselect->param('stats.field', $fieldName);\n $responce = Mage::helper('solr')->getSolrConnector()->fetchAll($fselect);\n $priceStats = $responce->__get('stats')->stats_fields->$fieldName;\n //$price = $this->getLayer()->getProductCollection()->getPriceStats();\n if(is_object($priceStats)) {\n $maxPrice = $priceStats->max;\n $minPrice = $priceStats->min;\n } else { \n $maxPrice = NULL;\n }\n }\n else {\n $maxPrice = $this->_getResource()->getMaxPrice($this);\n }\n $maxPrice = ceil($maxPrice);\n $this->setData('max_price_int', $maxPrice);\n if (isset($minPrice)) {\n $minPrice = floor($minPrice);\n $this->setData('min_price_int', $minPrice);\n } }\n return $maxPrice;\n }", "public function getInitialOptionsPrice()\n {\n return oledrion_handler::getInstance()->h_oledrion_attributes->getInitialOptionsPrice($this);\n }", "public function getBasePrice(){\n\t\treturn $this->base_price; // returns the base price for premiums;\n\t}", "function wc_get_min_max_price_meta_query($args)\n {\n }", "public function last()\n {\n return array_values(array_slice($this->working_array, -1))[0];\n }", "public function last()\r\n\t{\r\n\t\treturn parent::last();\r\n\t}", "function get_lastZip(){\n\treturn queryS('SELECT lastZip FROM Gallery;');}", "public function getCurrentPageLastItem(): float|int|null\n {\n $first = $this->getCurrentPageFirstItem();\n if ($first === null) {\n return null;\n }\n\n $last = $first + $this->itemsPerPage - 1;\n if ($last > $this->totalItems) {\n return $this->totalItems;\n }\n\n return $last;\n }", "public function last()\n {\n $sql = new Sql($this->adapter);\n $select = $sql->select(self::TABLE);\n $select->columns(array(\n 'last' => new Expression('MAX(id)'),\n 'up',\n 'down',\n 'ignore'\n ));\n\n $selectString = $sql->buildSqlString($select);\n $results = $this->adapter->query($selectString, Adapter::QUERY_MODE_EXECUTE);\n\n return $results->current();\n }", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}" ]
[ "0.72962713", "0.68690944", "0.6811796", "0.6722077", "0.6660212", "0.6458978", "0.61920166", "0.6155736", "0.6150499", "0.6121016", "0.5919147", "0.591248", "0.58791494", "0.58782476", "0.58552784", "0.5825218", "0.5821811", "0.5808829", "0.5787055", "0.57797784", "0.5776973", "0.5713708", "0.5698073", "0.565209", "0.56506956", "0.56417316", "0.56399745", "0.56364346", "0.56231785", "0.5621429", "0.5606721", "0.5598037", "0.5585514", "0.5581848", "0.5564003", "0.5558977", "0.5548454", "0.5547548", "0.5547353", "0.55390316", "0.5530884", "0.5530291", "0.5527534", "0.55268747", "0.55141824", "0.55105054", "0.55097544", "0.55057406", "0.5501812", "0.54843736", "0.5482614", "0.5480164", "0.5471676", "0.5462307", "0.54595673", "0.54595673", "0.5453527", "0.54530346", "0.5451813", "0.54498595", "0.5447185", "0.5434398", "0.5405365", "0.53937775", "0.5392242", "0.53906", "0.5389714", "0.5386641", "0.5379075", "0.5376639", "0.5369558", "0.53526247", "0.5351643", "0.53487784", "0.53483456", "0.5348182", "0.53459555", "0.53459555", "0.53459555", "0.53459555", "0.53459555", "0.53459555", "0.53459555", "0.53459555", "0.53459555", "0.53459555", "0.53459555", "0.53459555", "0.53459555", "0.53459555", "0.53459555", "0.53459555", "0.53459555", "0.53459555", "0.53459555", "0.53459555", "0.53459555", "0.53459555", "0.53459555", "0.53459555" ]
0.83950263
0
Get direct payment methods from magento usetting offline methods
Получить прямые методы оплаты из настроек magento, исключая офлайн методы
public function getDirectPaymentMethods(){ $methods = Mage::helper('payment')->getPaymentMethodList(TRUE, TRUE, TRUE); unset($methods['offline']); return $methods; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPaymentMethods();", "public function getPaymentMethods();", "public function getAvailablePaymentMethods () {\n #\t \treturn t3lib_div::xml2array (t3lib_div::getUrl(t3lib_extMgm::extPath ('paymentlib_ipayment').'paymentmethods.xml'));\n }", "public function getAvailablePaymentMethods() {\r\n\t\t\r\n\t//TODO - Insert your code here\r\n\t}", "public function getOfflinePaymentMethods(){\n\t\t$methods = Mage::helper('payment')->getPaymentMethodList(TRUE, TRUE, TRUE);\n\t\t$methods = array_keys( $methods['offline']['value'] );\n\n\t\treturn $methods;\n\t}", "function getAllPaymentMethods() {\n return $this->request('GET', 'https://api.upodi.io/v2/paymentmethods/');\n }", "public function getDisabledPaymentMethods(){\n\t\t$paymentsallow = self::getConfig('paymentsallow');\n\t\t//convert variable to array\n\t\t$paymentsallow = ($paymentsallow)?explode( ',', $paymentsallow ) : array();\n\n\t\t//returns selected direct payment methods and all offline payment methods\n\t\treturn array_merge( $paymentsallow, self::getOfflinePaymentMethods() );\n\t}", "public function getPaymentMethod();", "public function getPaymentMethod();", "public function getPaymentMethod();", "public function getPaymentMethod();", "public static function getPaymentMethod()\n {\n return self::find()->allPayments();\n }", "public function getPaymentMethod()\n {\n }", "public function getAlternativePaymentMethods()\n {\n $apmArray = array();\n $apmSelect = $this->_getConfigModel()->getAlternativePaymentMethods();\n $currencyCode = Mage::app()->getStore()->getCurrentCurrencyCode();\n $quote = Mage::getModel('ckopayment/checkoutcomUtils')->getQuote(null);\n $billingAddress = $quote->getBillingAddress();\n $countryCode = $billingAddress->getCountry();\n\n if ($apmSelect !== 0) {\n $apmArr = explode(',', $apmSelect);\n\n foreach ($apmArr as $value) {\n\n if ($value == 'ideal' && $currencyCode == 'EUR' && $countryCode == 'NL') {\n array_push($apmArray, $value);\n }\n\n if ($value == 'sofort' && $currencyCode == 'EUR') {\n\n if ($countryCode == 'BE'\n || $countryCode == 'DE'\n || $countryCode == 'IT'\n || $countryCode == 'NL'\n || $countryCode == 'AT'\n || $countryCode == 'ES'\n ) {\n array_push($apmArray, $value);\n }\n }\n\n if ($value == 'boleto' && $countryCode == 'BR') {\n if ($currencyCode == 'BRL' || $currencyCode == 'USD' ) {\n array_push($apmArray, $value);\n }\n }\n\n if ($value == 'giropay' && $currencyCode == 'EUR' && $countryCode == 'DE') {\n array_push($apmArray, $value);\n }\n\n if ($value == 'poli') {\n if ($currencyCode == 'AUD' || $currencyCode == 'NZD') {\n if ($countryCode == 'AU' || $countryCode == 'NZ') {\n array_push($apmArray, $value);\n }\n }\n }\n\n if ($value == 'klarna') {\n if ($currencyCode == 'EUR'\n || $currencyCode == 'DKK'\n || $currencyCode == 'GBP'\n || $currencyCode == 'NOR'\n || $currencyCode == 'SEK'\n ) {\n if ($countryCode == 'AT'\n || $countryCode == 'DK'\n || $countryCode == 'FI'\n || $countryCode == 'DE'\n || $countryCode == 'NL'\n || $countryCode == 'NO'\n || $countryCode == 'SE'\n || $countryCode == 'GB'\n ) {\n array_push($apmArray, $value);\n }\n }\n }\n\n if ($value == 'sepa' && $currencyCode == 'EUR') {\n\n if ($countryCode == 'AD'\n || $countryCode == 'AT'\n || $countryCode == 'BE'\n || $countryCode == 'CY'\n || $countryCode == 'EE'\n || $countryCode == 'FI'\n || $countryCode == 'DE'\n || $countryCode == 'GR'\n || $countryCode == 'IE'\n || $countryCode == 'IT'\n || $countryCode == 'LV'\n || $countryCode == 'LT'\n || $countryCode == 'LU'\n || $countryCode == 'MT'\n || $countryCode == 'MC'\n || $countryCode == 'NL'\n || $countryCode == 'PT'\n || $countryCode == 'SM'\n || $countryCode == 'SK'\n || $countryCode == 'SI'\n || $countryCode == 'ES'\n || $countryCode == 'VA'\n || $countryCode == 'BG'\n || $countryCode == 'HR'\n || $countryCode == 'CZ'\n || $countryCode == 'DK'\n || $countryCode == 'HU'\n || $countryCode == 'IS'\n || $countryCode == 'LI'\n || $countryCode == 'NO'\n || $countryCode == 'PL'\n || $countryCode == 'RO'\n || $countryCode == 'SE'\n || $countryCode == 'CH'\n || $countryCode == 'GB' \n ) {\n array_push($apmArray, $value);\n }\n }\n\n if ($value == 'eps' && $currencyCode == 'EUR' && $countryCode == 'AT') {\n array_push($apmArray, $value);\n }\n\n if ($value == 'bancontact' && $currencyCode == 'EUR' && $countryCode == 'BE') {\n array_push($apmArray, $value);\n }\n\n if ($value == 'knet' && $currencyCode == 'KWD' && $countryCode == 'KW') {\n array_push($apmArray, $value);\n }\n\n if ($value == 'fawry' && $currencyCode == 'EGP' && $countryCode == 'EG') {\n array_push($apmArray, $value);\n }\n\n if ($value == 'alipay' && $currencyCode == 'USD' && $countryCode == 'CN') {\n array_push($apmArray, $value);\n }\n }\n }\n\n return $apmArray;\n }", "protected function _getReducedPaymentMethods()\n {\n return array();\n }", "public function getPaymentMethods() {\r\n\t\t$data = array (\r\n\t\t\t'_cmd' => \"psystems\",\r\n\t\t\t'merchant_id'\t=> $this->merchant['id'],\r\n\t\t\t'hash' => md5($this->merchant['id'].$this->merchant['secret'])\r\n\t\t);\r\n\r\n\t\t$response = $this->sendRequest($this->url, $data);\r\n \r\n list ($status, $sarr) = explode(\"\\n\", $response);\r\n\r\n if ($status == 'OK') {\r\n return unserialize($sarr);\r\n }\r\n\r\n $logEvent = new AirpayLogEvent('Response was not OK ('.$response.')', AirpayError::HASH_DOES_NOT_MATCH);\r\n $this->eventDispatcher->dispatch('beinarovic_airpay.log', $logEvent);\r\n $this->errors[] = AirpayError::GOT_WRONG_STATUS;\r\n \r\n\t\treturn false;\r\n\t}", "public function getPaymentMethods()\n {\n $data = [\n 'action' => 'GetPaymentMethods',\n ];\n\n return $this->submitRequest($data);\n }", "protected function getAllPaymentMethods()\n\t{\n\t\t$paymentConfig = Mage::getStoreConfig('payment');\n\t\t\n\t\t/* The getStoreConfig() function returns a nested array representing the\n\t\t * XML but without the <sections> and <groups> tags. */\n\t\t$paymentMethods = array_keys($paymentConfig);\n\t\treturn $paymentMethods;\n\t}", "public function get_payment_methods() {\n\t\t$payment_methods = new ReflectionClass( 'Pronamic_WP_Pay_Gateways_MultiSafepay_Gateways' );\n\n\t\treturn array( array( 'options' => $payment_methods->getConstants() ) );\n\t}", "public function get_payment_methods() {\n\t\treturn Pronamic_WP_Pay_PaymentMethods::IDEAL;\n\t}", "protected function getAvailablePaymentMethods() : array {\n\n return $this->configHelper->getPayUStoreConfigByDynamicField('general', 'payment_methods');\n }", "public function getEnabledGateways()\n {\n $paymentMethods = Mage::getSingleton('payment/config')->getActiveMethods();\n $methods = array();\n foreach ($paymentMethods as $paymentCode => $paymentModel) {\n if (($paymentModel instanceof Multon_Estpay_Model_IPizza)\n\t\t\t\t\t|| ($paymentModel instanceof Multon_Estpay_Model_Estcard)\n\t\t\t\t\t|| ($paymentModel instanceof Multon_Estpay_Model_Nordea)\n\t\t\t\t\t)\n\t\t\t\t{\n $paymentTitle = Mage::getStoreConfig('payment/' . $paymentCode . '/title');\n $formBlockType = $paymentModel->getFormBlockType();\n $formBlockInstance = Mage::getBlockSingleton($formBlockType);\n $methods[] = array(\n 'title' => $paymentTitle,\n 'code' => $paymentCode,\n 'logo' => $formBlockInstance->getMethodLogoUrl()\n );\n }\n }\n return $methods;\n }", "public function getPaymentMethods()\n {\n return $this->payment_methods;\n }", "function emnl_wie_filter_payment_methods ( $gateways_available ) {\r\n if ( ! array_key_exists ( EMNL_INSTORE_ENVIRONMENT_PAYMENT_METHOD, $gateways_available ) ) {\r\n return $gateways_available;\r\n }\r\n\r\n // For debugging purposes: for administrators show ALL payment methods\r\n $role = '';\r\n if ( is_user_logged_in() ) {\r\n\r\n $user = wp_get_current_user();\r\n $roles = ( array ) $user->roles;\r\n $role = $roles[0];\r\n\r\n }\r\n\r\n if ( is_user_logged_in() && 'administrator' === $role ) {\r\n return $gateways_available;\r\n }\r\n\r\n // Unset ALL payment methods EXCEPT instore\r\n if ( emnl_wie_detect_instore_environment() ) {\r\n\r\n $gateway_instore = $gateways_available[EMNL_INSTORE_ENVIRONMENT_PAYMENT_METHOD];\r\n $gateways_available = array();\r\n $gateways_available[EMNL_INSTORE_ENVIRONMENT_PAYMENT_METHOD] = $gateway_instore;\r\n \r\n // Unset ONLY instore payment method\r\n } else {\r\n unset ( $gateways_available[EMNL_INSTORE_ENVIRONMENT_PAYMENT_METHOD]);\r\n }\r\n\r\n return $gateways_available;\r\n\r\n}", "public function ListPaymentMethods() {\n $xml = $this->buildEnvelope();\n $body = $xml->getElementsByTagNameNS('http://schemas.xmlsoap.org/soap/envelope/', 'Body')->item(0);\n\n $operation = $xml->createElementNS('https://www.mpay24.com/soap/etp/1.5/ETP.wsdl', 'etp:ListPaymentMethods');\n $operation = $body->appendChild($operation);\n\n $xmlMerchantID = $xml->createElement('merchantID', substr($this->merchantid, 1));\n $xmlMerchantID = $operation->appendChild($xmlMerchantID);\n\n $this->request = $xml->saveXML();\n\n $this->send();\n\n $result = new ListPaymentMethodsResponse($this->response);\n\n return $result;\n }", "public function get_payment_methods()\n\t{\n\t\t//retrieve all meeting\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}", "function wc_get_account_payment_methods_types()\n {\n }", "function edd_get_mtpayment_ops()\n{\n\tglobal $edd_options;\n\t//get 3ds opts from backend\n\tVeritrans_Config::$is3ds = $edd_options['mt_promo_3ds'] ? true : false;\n\t// error_log('mt_3ds '.$edd_options['mt_3ds']); //debugan\n\t// error_log('credit_card '.$edd_options['mt_credit_card']); //debugan\n// error_log('enabled payments array'.print_r($enabled_payments,true)); //debugan\n return $enabled_payments;\n}", "public function getMethods()\n {\n $methods = $this->getData('methods');\n if (is_null($methods)) {\n $quote = $this->getQuote();\n $store = $quote ? $quote->getStoreId() : null;\n $methods = $this->helper('payment')->getStoreMethods($store, $quote);\n $total = $quote->getBaseSubtotal() + $quote->getShippingAddress()->getBaseShippingAmount();\n foreach ($methods as $key => $method) {\n if ($this->_canUseMethod($method)\n && ($total != 0\n || $method->getCode() == 'free'\n || ($quote->hasRecurringItems() && $method->canManageRecurringProfiles())\n || Mage::helper('aw_sarp2/quote')->isQuoteHasSubscriptionProduct($quote)\n )\n ) {\n $this->_assignMethod($method);\n } else {\n unset($methods[$key]);\n }\n }\n $this->setData('methods', $methods);\n }\n return $methods;\n }", "public function paymentMethodsAction()\n {\n if ($this->_checkApiForward('paymentmethodlist', Mage_XmlConnect_Helper_Data::DEVICE_API_V_23)) {\n return;\n }\n $this->paymentMethodListAction();\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 getPaymentMethodType();", "public function getShippingMethods();", "function woocommerce_account_payment_methods()\n {\n }", "public function items()\n\t{\n\t\t$payments = Mage::getSingleton('payment/config')->getActiveMethods();\n\t\t$methods = array();\n\t\tforeach ($payments as $paymentCode=>$paymentModel) {\n\t\t\tif (strtoupper($paymentCode) != 'GOOGLECHECKOUT') {\n\t\t\t\t$paymentTitle = Mage::getStoreConfig('payment/'.$paymentCode.'/title');\n\t\t\t\t$methods[$paymentCode] = $paymentTitle;\n\t\t\t}\n\t\t}\n\t\treturn $methods;\n\t}", "public function paymentMethods()\n {\n return $this->inputArgs('paymentMethods', []);\n }", "public static function getInstalledPaymentModules()\n {\n }", "public function getPaymentMethodInfo();", "public function getPaymentMethod(){\n return null;\n }", "public static function getPaymentMethods(): array\n {\n return array_keys(static::$paymentMethods);\n }", "private function getPaymentMethods(): array\n {\n /**\n * @var PaymentMethodRepository $paymentMethodRepository\n */\n $paymentMethodRepository = $this->get('catalog.repository.payment_method');\n $availablePaymentMethods = $paymentMethodRepository->findInstalledPaymentMethods(Locale::frontendLanguage());\n $session = Model::getSession();\n\n $paymentMethods = [];\n foreach ($availablePaymentMethods as $paymentMethod) {\n $className = \"\\\\Backend\\\\Modules\\\\Catalog\\\\PaymentMethods\\\\{$paymentMethod}\\\\Checkout\\\\Quote\";\n\n /**\n * @var Quote $class\n */\n $class = new $className($paymentMethod, $this->cart, $session->get('guest_address'));\n foreach ($class->getQuote() as $key => $options) {\n $paymentMethods[$paymentMethod.'.'. $key] = $options;\n }\n }\n\n return $paymentMethods;\n }", "public function listPaymentMethods()\n\t{\n\t\t// make the call\n\t\t$response = $this->doCall('ListPaymentMethods', array('ListPaymentMethods' => null));\n\n\t\t// validate\n\t\tif(!isset($response->PaymentMethods)) throw new RecreatexException('Invalid response.');\n\n\t\t// init var\n\t\t$return = array();\n\n\t\t// loop\n\t\tforeach($response->PaymentMethods->BasketPaymentMethod as $row) $return[] = self::decodeResponse($row);\n\n\t\t// return\n\t\treturn $return;\n\t}", "public function payment_methods()\n {\n return ['code' => 'pickup', 'title' => 'In Store Pickup'];\n }", "public function manage_payment_methods() {\r\n global $plugin_page;\r\n Eabi_Ipenelo_Calendar::service()->import('models/Registrant');\r\n Eabi_Ipenelo_Calendar::service()->get('payment')->detectAvailablePaymentMethods();\r\n $paymentMethods = array(\r\n );\r\n $availablePayments = @unserialize(Eabi_Ipenelo_Calendar::get('available_payments'));\r\n if (!is_array($availablePayments)) {\r\n wp_redirect(admin_url('admin.php?page=' . $plugin_page));\r\n exit;\r\n $availablePayments = array();\r\n }\r\n foreach ($availablePayments as $code => $availablePayment) {\r\n $paymentMethods[$code] = $availablePayment['title'];\r\n }\r\n if (isset($_GET['code']) && isset($paymentMethods[$_GET['code']])) {\r\n //echo the form\r\n $form = Eabi_Ipenelo_Calendar::service()->get('payment')->getByCode($_GET['code'], Eabi_Ipenelo_Calendar::service()->get('models/Registrant'));\r\n } else {\r\n //echo the select field.\r\n if (isset($_GET['noheader'])) {\r\n require_once(ABSPATH . 'wp-admin/admin-header.php');\r\n }\r\n echo Eabi_Ipenelo_Calendar::service()->get('payment')->renderSelect($paymentMethods);\r\n return;\r\n }\r\n\r\n//\t\t$form = new Eabi_Ipenelo_Calendar_Payment_Checkmo(new Eabi_Ipenelo_Calendar_Model_Registrant());\r\n\r\n $needsRedirect = $form->save();\r\n if ($needsRedirect) {\r\n wp_redirect(admin_url('admin.php?noheader=true&page=' . $plugin_page));\r\n\r\n exit;\r\n }\r\n\r\n if (isset($_GET['noheader'])) {\r\n require_once(ABSPATH . 'wp-admin/admin-header.php');\r\n }\r\n if (is_object($form)) {\r\n echo $form->renderConfigurationForm();\r\n }\r\n }", "public function testListPaymentMethods()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "function commerce_expay_rules_remote_method_types() {\n $list = array(\n 'offline' => 'Offline',\n 'online' => 'Online'\n );\n return $list;\n}", "private function getPaymentMethods(): array\n {\n /**\n * @var PaymentMethodRepository $paymentMethodRepository\n */\n $paymentMethodRepository = $this->get('catalog.repository.payment_method');\n $availablePaymentMethods = $paymentMethodRepository->findInstalledPaymentMethods(Locale::frontendLanguage());\n $cart = $this->getActiveCart();\n\n $paymentMethods = [];\n foreach ($availablePaymentMethods as $paymentMethod) {\n $className = \"\\\\Backend\\\\Modules\\\\Catalog\\\\PaymentMethods\\\\{$paymentMethod}\\\\Checkout\\\\Quote\";\n\n /**\n * @var Quote $class\n */\n $class = new $className($paymentMethod, $cart, $this->session->get('guest_address'));\n foreach ($class->getQuote() as $key => $options) {\n $paymentMethods[$paymentMethod.'.'. $key] = $options;\n }\n }\n\n return $paymentMethods;\n }", "public function saved_payment_methods()\n {\n }", "public function getPaymentMethod()\n {\n return $this->_getOrder()->getPayment()->getMethod();\n }", "public function paymentMethodProvider()\n {\n return [\n ['Cash', 'me@mydomain.com', 100.00],\n ['CreditCard', 'me@mydomain.com', 95.00],\n ['PayPal', 'myName@gmail.com', 95.00],\n ['PayPal', 'me@mydomain.com', 0.00]\n ];\n }", "public function getArray() {\n return $this->paymentMethods;\n }", "public function get_payment_methods() {\n\t\t$methods_class = substr_replace( get_class( $this ), 'PaymentMethods', -7, 7 );\n\n\t\tif ( class_exists( $methods_class ) ) {\n\t\t\t$payment_methods = new ReflectionClass( $methods_class );\n\n\t\t\t$groups = array(\n\t\t\t\tarray(\n\t\t\t\t\t'options' => $payment_methods->getConstants(),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\treturn $groups;\n\t\t}\n\n\t\treturn null;\n\t}", "protected function getFreeMethods()\n {\n }", "public function getPayment()\n {\n }", "public function getPayPalPayment()\n {\n }", "private static function get_active_payment_gateways()\n {\n }", "public function getPayment()\n {\n }", "function wc_get_account_saved_payment_methods_list($list, $customer_id)\n {\n }", "public function paymentMethodProvider()\n {\n return [\n ['Cash', 100.00],\n ['Credit Card', 95.00],\n ];\n }", "public function get_wizard_in_cart_payment_gateways()\n {\n }", "public function getPayments()\n {\n }", "public function getGetPaymentMethodsResult()\n {\n return isset($this->GetPaymentMethodsResult) ? $this->GetPaymentMethodsResult : null;\n }", "public function get_transient_payment_methods() {\n\t\t$methods = null;\n\n\t\t// Transient name. Expected to not be SQL-escaped. Should be 45 characters or less in length.\n\t\t$transient = 'pronamic_pay_payment_methods_' . $this->config->id;\n\n\t\t$result = get_transient( $transient );\n\n\t\tif ( is_wp_error( $result ) || false === $result ) {\n\t\t\t$methods = $this->get_payment_methods();\n\n\t\t\tif ( $methods ) {\n\t\t\t\t// Make sure methods are stored as array\n\t\t\t\tif ( is_string( $methods ) ) {\n\t\t\t\t\t$methods = array( $methods );\n\t\t\t\t}\n\n\t\t\t\t// 60 * 60 * 24 = 24 hours = 1 day\n\t\t\t\tset_transient( $transient, $methods, 60 * 60 * 24 );\n\t\t\t}\n\t\t} elseif ( is_array( $result ) ) {\n\t\t\t$methods = $result;\n\t\t}\n\n\t\treturn $methods;\n\t}", "function getPaymentMethod()\n\t{\n\t\treturn $this->payment_method;\n\t}", "public function getAListOfPaymentMethods()\n {\n // Arrange\n $customerId = $this->faker->uuid;\n\n // Act\n $paymentMethods = Ezypay::getPaymentMethods($customerId, false);\n\n // Assert\n $this->assertInternalType('array', $paymentMethods);\n $this->assertEquals($customerId, $paymentMethods['data'][0]['customerId']);\n $this->assertEquals($paymentMethods['paging']['totalCount'], 1);\n }", "public function get_supported_payment_methods() {\n\t\treturn array(\n\t\t\tPronamic_WP_Pay_PaymentMethods::IDEAL => Pronamic_WP_Pay_PaymentMethods::IDEAL,\n\t\t);\n\t}", "protected function _getMethods(){\n\t\t$block = $this->getLayout()->createBlock('payment/form_container', '', array(\n\t\t\t'quote' => $this->getOnepage()->getQuote() \n\t\t));\n\t\treturn $block->getMethods();\n\t}", "public function get_wizard_manual_payment_gateways()\n {\n }", "public function removePaymentMethods($observer) {\n\t\t$event = $observer->getEvent();\n\t\t$method = $event->getMethodInstance();\n\t\t$result = $event->getResult();\n\t\t$isPartial = Mage::getSingleton('checkout/session')->getApprovalRequestSuccess();\n\n\t\tif ($isPartial === 'partial') {\n\t\t\tswitch ($method->getCode()) {\n\t\t\t\tcase 'mundipagg_creditcardoneinstallment':\n\t\t\t\tcase 'mundipagg_creditcard':\n//\t\t\t\tcase 'mundipagg_twocreditcards':\n//\t\t\t\tcase 'mundipagg_threecreditcards':\n//\t\t\t\tcase 'mundipagg_fourcreditcards':\n//\t\t\t\tcase 'mundipagg_fivecreditcards':\n\t\t\t\t\t$active = Mage::getStoreConfig('payment/' . $method->getCode() . '/active');\n\n\t\t\t\t\tif ($active == '1') {\n\t\t\t\t\t\t$result->isAvailable = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$result->isAvailable = false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'mundipagg_boleto':\n\t\t\t\t\t$result->isAvailable = false;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$result->isAvailable = false;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public function getPaymentData();", "function shGetAllShippingMethods( $enabledOnly = false )\r\n{\r\n\tstatic $cache = array();\r\n\tif(!isset($cache[$enabledOnly])){\r\n\t\t$whereClause = \"\";\r\n\t\tif ( $enabledOnly ){\r\n\t\t\t$whereClause = \" WHERE Enabled=1 \";\r\n\t\t}\r\n\t\t$q = db_phquery(\"SELECT * FROM ?#SHIPPING_METHODS_TABLE {$whereClause} ORDER BY sort_order\");\r\n\t\t$cache[$enabledOnly] = array();\r\n\t\twhile( $row = db_fetch_row($q) ){\r\n\t\t\tLanguagesManager::ml_fillFields(SHIPPING_METHODS_TABLE, $row);\r\n\t\t\t$cache[$enabledOnly][] = $row;\r\n\t\t}\r\n\t\t\r\n\t}\r\n\treturn $cache[$enabledOnly];\r\n}", "public function getPaymentsAction()\n {\n try {\n $builder = Shopware()->Models()->createQueryBuilder();\n $builder->select(['payment', 'ruleSets'])\n ->from('Shopware\\Models\\Payment\\Payment', 'payment');\n $builder->leftJoin('payment.ruleSets', 'ruleSets');\n $builder->orderBy('payment.active', 'desc');\n $builder->addOrderBy('payment.id');\n\n $result = $builder->getQuery()->getArrayResult();\n $total = Shopware()->Models()->getQueryCount($builder->getQuery());\n\n // Translate the payment methods\n $translationComponent = $this->get('translation');\n $result = $translationComponent->translatePaymentMethods($result);\n\n $this->View()->assign(['success' => true, 'data' => $result, 'total' => $total]);\n } catch (Exception $e) {\n $this->View()->assign(['success' => false, 'errorMsg' => $e->getMessage()]);\n }\n }", "abstract function getPayment();", "public function getCurrentPaymentMethods() : Response\n {\n $paymentMethod = [];\n\n try {\n $paymentMethod = $this->model->getDefaultPaymentMethod();\n } catch (Exception $e) {\n }\n return $this->response($paymentMethod);\n }", "protected function getPaypalDisabledMethods()\n {\n // Assoc array that contains info about paypal methods (their IDs and corresponding Config Paths)\n $methods = array(\n 'express' => 'payment/paypal_express/active',\n 'wps' => 'payment/paypal_standard/active',\n 'wpp' => 'payment/paypal_direct/active',\n 'wpppe' => 'payment/paypaluk_direct/active',\n 'verisign' => 'payment/verisign/active',\n 'expresspe' => 'payment/paypaluk_express/active'\n );\n // Retrieve a code of the current website\n $website = $this->getRequest()->getParam('website');\n\n $configRoot = Mage::getConfig()->getNode(null, 'website', $website);\n\n $disabledMethods = array();\n foreach ($methods as $methodId => $methodPath) {\n $isEnabled = (int) $configRoot->descend($methodPath);\n if ($isEnabled === 0) {\n $disabledMethods[$methodId] = $isEnabled;\n }\n }\n\n return $disabledMethods;\n }", "function pos_host_get_payment_gateways_ids( $enabled = false ) {\r\n\t$gateways = WC()->payment_gateways()->payment_gateways();\r\n\t$results = array();\r\n\r\n\tforeach ( $gateways as $id => $gateway ) {\r\n\t\tif ( $enabled && 'yes' !== $gateway->enabled ) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n array_push( $results, $id );\r\n\t}\r\n\treturn $results;\r\n \r\n}", "public function get_supported_payment_methods() {\n\t\treturn array(\n\t\t\tPronamic_WP_Pay_PaymentMethods::IDEAL,\n\t\t\tPronamic_WP_Pay_PaymentMethods::BANK_TRANSFER,\n\t\t);\n\t}", "public function getPaymentMethodData()\n {\n return $this->data['payment_method'];\n }", "function getPaymentFields();", "function wcifd_payment_gateway( $method ) {\n\tswitch ( $method ) {\n\t\tcase 'Paypal':\n\t\tcase 'Carta di credito':\n\t\t\treturn array(\n\t\t\t\t'id' => 'paypal',\n\t\t\t\t'title' => 'PayPal',\n\t\t\t);\n\t\tcase 'Contrassegno':\n\t\t\treturn array(\n\t\t\t\t'id' => 'cod',\n\t\t\t\t'title' => 'Cash on Delivery',\n\t\t\t);\n\t\tcase 'Bonifico bancario':\n\t\t\treturn array(\n\t\t\t\t'id' => 'bacs',\n\t\t\t\t'title' => 'Direct Bank Transfer',\n\t\t\t);\n\t\tdefault:\n\t\t\treturn null;\n\t}\n}", "private function getMethodPayment() {\n $cid = vRequest::getvar('cid', NULL, 'array');\n if (is_Array($cid)) {\n $virtuemart_paymentmethod_id = $cid[0];\n } else {\n $virtuemart_paymentmethod_id = $cid;\n }\n if (!($method = $this->getVmPluginMethod($virtuemart_paymentmethod_id))) {\n return NULL; // Another method was selected, do nothing\n }\n return $method;\n }", "public function commerce_registerShippingMethods()\n {\n $settings = craft()->plugins->getPlugin('upsshipping')->getSettings();\n\n $methods = [];\n foreach (static::getSettingsToMethods() as $setting => $method) {\n if ($settings[$setting]) {\n $methods[] = new UpsShipping_BaseMethodModel($method);\n }\n }\n\n return $methods;\n }", "private static function get_active_shipping_methods()\n {\n }", "public function listPaymentMethods()\n {\n $methods = array_map(\n function ($method) {\n return $method->serialize();\n },\n $this->session()->getUser()->getPaymentMethods()->fetch()->all()\n );\n if (empty($methods)) {\n $this->log()->notice('There are no payment methods attached to this account.');\n }\n return new RowsOfFields($methods);\n }", "public function getMethod()\n {\n $settings = new GeneralSettings($this);\n\n $method_data = array(\n 'code' => $settings->getCode(),\n 'title' => $settings->getPaymentTitle(),\n 'terms' => $settings->getTerms(),\n 'sort_order' => $settings->getSortOrder()\n );\n\n return $method_data;\n }", "function wc_get_account_payment_methods_columns()\n {\n }", "public function loadPaymentMethodList() {\n $count = 0;\n $paymentMethodList;\n $link = getConnection();\n $query=\"select \tpayment_method_id,\n payment_method_name,\n payment_method_include_path,\n payment_method_logo,\n payment_method_desc\n from tb_payment_method\";\n\n $result = executeNonUpdateQuery($link , $query);\n closeConnection($link);\n\n while ($newArray = mysql_fetch_array($result)) {\n $paymentMethod = new PaymentMethod();\n $paymentMethod->set_payment_method_id($newArray['payment_method_id']);\n $paymentMethod->set_payment_method_name($newArray['payment_method_name']);\n $paymentMethod->set_payment_method_include_path($newArray['payment_method_include_path']);\n $paymentMethod->set_payment_method_logo($newArray['payment_method_logo']);\n $paymentMethod->set_payment_method_desc($newArray['payment_method_desc']);\n\n $paymentMethodList[$count] = $paymentMethod;\n $count++;\n }\n return $paymentMethodList;\n }", "public function add_my_payment_methods() {\n\n\t\t$gateway = new WC_Gateway_Authorize_Net_CIM();\n\n\t\t$gateway->show_my_payment_methods();\n\t}", "public function getPaymentMethods($year){\n\t\tif($this->db->platform() == \"sqlite3\"){\n\t\t\t$q = \"SELECT modeOfPayment FROM transactions WHERE strftime('%Y', transDate) GROUP BY ref\";\n\t\t\t\n\t\t\t$run_q = $this->db->query($q);\n\t\t}\n\t\t\n\t\telse{\n\t\t\t$this->db->select('GROUP_CONCAT(DISTINCT modeOfPayment) as modeOfPayment');\n\t\t\t$year ? $this->db->where('YEAR(transDate)', $year) : \"\";\n\t\t\t$this->db->group_by('ref');\n\t\t\t$run_q = $this->db->get('transactions');\n\t\t}\n \n if($run_q->num_rows()){\n return $run_q->result();\n }\n \n else{\n return FALSE;\n }\n }", "public function get_shipping_methods()\n {\n }", "public function get_shipping_methods()\n {\n }", "public function getShippingMethods()\n {\n return ShippingMethod::get()->filter(\"Enabled\", 1);\n }", "public function paymentmethods()\n {\n return view('home.payment_methods');\n }", "public function paymentMethod()\n {\n return $this->hasMany(PaymentMethod::class, PaymentMethod::COLUMN_GATEWAY, static::COLUMN_PAYMENT_METHOD);\n }", "protected function _getPaymentMethodsHtml(){\n\t\t$layout = $this->getLayout();\n\t\t$update = $layout->getUpdate();\n\t\t$update->load('checkout_onepage_paymentmethod');\n\t\t$layout->generateXml();\n\t\t$layout->generateBlocks();\n\t\tforeach($layout->getAllBlocks() as $block){\n\t\t\tif($block instanceof Customweb_UnzerCw_Block_Form){\n\t\t\t\t$block->disableJavascript();\n\t\t\t}\n\t\t}\n\t\t$output = $layout->getOutput();\n\t\treturn $output;\n\t}", "public function getMethodPayment()\n {\n return $this->paymentMethod;\n }", "public function getAllShippingMethods()\n {\n //SHQ16-1708\n Mage::helper('shipperhq_shipper')->saveConfig(\n Shipperhq_Shipper_Helper_Data::SHIPPERHQ_INVALID_CREDENTIALS_SUPPLIED,\n 0);\n $ourCarrierCode = $this->getId();\n $result = array();\n $allowedMethods = array();\n $allowedMethodUrl = Mage::helper('shipperhq_shipper')->getAllowedMethodGatewayUrl();\n $timeout = Mage::helper('shipperhq_shipper')->getWebserviceTimeout();\n $shipperMapper = Mage::getSingleton('Shipperhq_Shipper_Model_Carrier_Convert_ShipperMapper');\n $allMethodsRequest = $shipperMapper->getCredentialsTranslation();\n $requestString = serialize($allMethodsRequest);\n $resultSet = $this->_getCachedQuotes($requestString);\n $timeout = Mage::helper('shipperhq_shipper')->getWebserviceTimeout();\n if (!$resultSet) {\n $resultSet = $this->_getShipperInstance()->sendAndReceive($allMethodsRequest, $allowedMethodUrl, $timeout);\n if(is_object($resultSet['result'])) {\n $this->_setCachedQuotes($requestString, $resultSet);\n }\n }\n $allowedMethodResponse = $resultSet['result'];\n\n if (Mage::helper('shipperhq_shipper')->isDebug()) {\n Mage::helper('wsalogger/log')->postDebug('Shipperhq_Shipper', 'Allowed methods response:',\n $resultSet['debug']);\n }\n if (!is_object($allowedMethodResponse)) {\n if (Mage::helper('shipperhq_shipper')->isDebug()) {\n Mage::helper('wsalogger/log')->postInfo('Shipperhq_Shipper',\n 'Allowed Methods: No or invalid response received from Shipper HQ',\n $allowedMethodResponse);\n }\n\n $shipperHQ = \"<a href=https://shipperhq.com/ratesmgr/websites>ShipperHQ</a> \";\n $result['result'] = false;\n $result['error'] = 'ShipperHQ is not contactable, verify the details from the website configuration in ' .$shipperHQ;\n return $result;\n }\n else if (count($allowedMethodResponse->errors)){\n if (Mage::helper('shipperhq_shipper')->isDebug()) {\n Mage::helper('wsalogger/log')->postInfo('Shipperhq_Shipper', 'Allowed methods: response contained following errors',\n $allowedMethodResponse);\n\n }\n $error = 'ShipperHQ Error: ';\n foreach($allowedMethodResponse->errors as $anError) {\n if(isset($anError->internalErrorMessage)) {\n $error .= ' ' .$anError->internalErrorMessage;\n }\n elseif(isset($anError->externalErrorMessage) && $anError->externalErrorMessage != '') {\n $error .= ' ' .$anError->externalErrorMessage;\n }\n\n //SHQ16-1708\n if(isset($anError->errorCode) && $anError->errorCode == '3') {\n Mage::helper('shipperhq_shipper')->saveConfig(\n Shipperhq_Shipper_Helper_Data::SHIPPERHQ_INVALID_CREDENTIALS_SUPPLIED,\n 1);\n }\n }\n $result['result'] = false;\n $result['error'] = $error;\n return $result;\n }\n else if ( !count($allowedMethodResponse->carrierMethods)) {\n if (Mage::helper('shipperhq_shipper')->isDebug()) {\n Mage::helper('wsalogger/log')->postInfo('Shipperhq_Shipper',\n 'Allowed methods web service did not return any carriers or shipping methods',\n $allowedMethodResponse);\n }\n $result['result'] = false;\n $result['warning'] = 'ShipperHQ Warning: No carriers setup, log in to ShipperHQ Dashboard and create carriers';\n return $result;\n }\n\n $carriers = $allowedMethodResponse->carrierMethods;\n\n $carrierConfig = array();\n\n foreach ($carriers as $carrierMethod) {\n\n $methodList = $carrierMethod->methods;\n $methodCodeArray = array();\n foreach ($methodList as $method) {\n if(!is_null($ourCarrierCode) && $carrierMethod->carrierCode != $ourCarrierCode) {\n continue;\n }\n\n $allowedMethodCode = /*$carrierMethod->carrierCode . '==' .*/ $method->methodCode;\n $allowedMethodCode = preg_replace('/&|;| /', \"_\", $allowedMethodCode);\n\n if (!array_key_exists($allowedMethodCode, $allowedMethods)) {\n $methodCodeArray[$allowedMethodCode] = $method->name;\n }\n }\n $allowedMethods[$carrierMethod->carrierCode] = $methodCodeArray;\n $carrierConfig[$carrierMethod->carrierCode]['title'] = $carrierMethod->title;\n if(isset($carrierMethod->sortOrder)) {\n $carrierConfig[$carrierMethod->carrierCode]['sortOrder'] = $carrierMethod->sortOrder;\n }\n }\n\n if (Mage::helper('shipperhq_shipper')->isDebug()) {\n Mage::helper('wsalogger/log')->postDebug('Shipperhq_Shipper', 'Allowed methods parsed result: ', $allowedMethods);\n }\n // go set carrier titles\n $this->setCarrierConfig($carrierConfig);\n $this->saveAllowedMethods($allowedMethods);\n return $allowedMethods;\n }", "public function getCollection()\n {\n\n $pgofflinePayment = PGOfflinePayment::select('tbl_pgoffline_payment.*');\n return $pgofflinePayment->get();\n }", "public function getPaymentMethod()\n {\n return $this->payment_method;\n }", "protected function get_wizard_available_in_cart_payment_gateways()\n {\n }" ]
[ "0.79380524", "0.79380524", "0.7807638", "0.76991117", "0.76251733", "0.7501499", "0.7419279", "0.70570874", "0.70570874", "0.70570874", "0.70570874", "0.6976074", "0.6969126", "0.6952408", "0.69340354", "0.69306666", "0.69303584", "0.6842864", "0.68244284", "0.6784446", "0.67517", "0.6703374", "0.6699434", "0.66723156", "0.66603947", "0.6646269", "0.66379493", "0.66370976", "0.66353464", "0.6630166", "0.661479", "0.655413", "0.65458834", "0.65158975", "0.6501875", "0.6457192", "0.64537376", "0.6408877", "0.6405135", "0.6378423", "0.63775194", "0.6377354", "0.6355321", "0.6352511", "0.6344097", "0.6327653", "0.6317409", "0.63119143", "0.62800545", "0.6276811", "0.6254166", "0.6221175", "0.62175804", "0.62099034", "0.6198284", "0.6188492", "0.61832297", "0.61530054", "0.61305225", "0.6125278", "0.61095166", "0.6107291", "0.6103461", "0.6088655", "0.6080353", "0.6078168", "0.6069913", "0.60669947", "0.6054882", "0.60296404", "0.6026719", "0.60250247", "0.6023677", "0.59797835", "0.597428", "0.5967008", "0.5958987", "0.5951683", "0.59458286", "0.5936898", "0.59316593", "0.5930327", "0.59241027", "0.59180826", "0.59177905", "0.59059775", "0.5899006", "0.5891972", "0.5883737", "0.588118", "0.58811164", "0.58789414", "0.58723885", "0.58723176", "0.58711493", "0.58651906", "0.58555806", "0.5854955", "0.5853815", "0.58494055" ]
0.83371645
0
Returns the list of offline payment methods names
Возвращает список имен методов оплаты в оффлайне
public function getOfflinePaymentMethods(){ $methods = Mage::helper('payment')->getPaymentMethodList(TRUE, TRUE, TRUE); $methods = array_keys( $methods['offline']['value'] ); return $methods; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDirectPaymentMethods(){\n\t\t$methods = Mage::helper('payment')->getPaymentMethodList(TRUE, TRUE, TRUE);\n \t\tunset($methods['offline']);\n \t\treturn $methods;\n\t}", "public function getAvailablePaymentMethods () {\n #\t \treturn t3lib_div::xml2array (t3lib_div::getUrl(t3lib_extMgm::extPath ('paymentlib_ipayment').'paymentmethods.xml'));\n }", "public function getDisabledPaymentMethods(){\n\t\t$paymentsallow = self::getConfig('paymentsallow');\n\t\t//convert variable to array\n\t\t$paymentsallow = ($paymentsallow)?explode( ',', $paymentsallow ) : array();\n\n\t\t//returns selected direct payment methods and all offline payment methods\n\t\treturn array_merge( $paymentsallow, self::getOfflinePaymentMethods() );\n\t}", "public function getPaymentMethods();", "public function getPaymentMethods();", "public function getAvailablePaymentMethods() {\r\n\t\t\r\n\t//TODO - Insert your code here\r\n\t}", "function getAllPaymentMethods() {\n return $this->request('GET', 'https://api.upodi.io/v2/paymentmethods/');\n }", "public static function getPaymentMethods(): array\n {\n return array_keys(static::$paymentMethods);\n }", "protected function _getReducedPaymentMethods()\n {\n return array();\n }", "function commerce_expay_rules_remote_method_types() {\n $list = array(\n 'offline' => 'Offline',\n 'online' => 'Online'\n );\n return $list;\n}", "public function items()\n\t{\n\t\t$payments = Mage::getSingleton('payment/config')->getActiveMethods();\n\t\t$methods = array();\n\t\tforeach ($payments as $paymentCode=>$paymentModel) {\n\t\t\tif (strtoupper($paymentCode) != 'GOOGLECHECKOUT') {\n\t\t\t\t$paymentTitle = Mage::getStoreConfig('payment/'.$paymentCode.'/title');\n\t\t\t\t$methods[$paymentCode] = $paymentTitle;\n\t\t\t}\n\t\t}\n\t\treturn $methods;\n\t}", "public function ListPaymentMethods() {\n $xml = $this->buildEnvelope();\n $body = $xml->getElementsByTagNameNS('http://schemas.xmlsoap.org/soap/envelope/', 'Body')->item(0);\n\n $operation = $xml->createElementNS('https://www.mpay24.com/soap/etp/1.5/ETP.wsdl', 'etp:ListPaymentMethods');\n $operation = $body->appendChild($operation);\n\n $xmlMerchantID = $xml->createElement('merchantID', substr($this->merchantid, 1));\n $xmlMerchantID = $operation->appendChild($xmlMerchantID);\n\n $this->request = $xml->saveXML();\n\n $this->send();\n\n $result = new ListPaymentMethodsResponse($this->response);\n\n return $result;\n }", "protected function getAllPaymentMethods()\n\t{\n\t\t$paymentConfig = Mage::getStoreConfig('payment');\n\t\t\n\t\t/* The getStoreConfig() function returns a nested array representing the\n\t\t * XML but without the <sections> and <groups> tags. */\n\t\t$paymentMethods = array_keys($paymentConfig);\n\t\treturn $paymentMethods;\n\t}", "public function get_payment_methods()\n\t{\n\t\t//retrieve all meeting\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 getPaymentMethods()\n {\n $data = [\n 'action' => 'GetPaymentMethods',\n ];\n\n return $this->submitRequest($data);\n }", "protected function getAvailablePaymentMethods() : array {\n\n return $this->configHelper->getPayUStoreConfigByDynamicField('general', 'payment_methods');\n }", "function wc_get_account_payment_methods_types()\n {\n }", "public function getPaymentMethods() {\r\n\t\t$data = array (\r\n\t\t\t'_cmd' => \"psystems\",\r\n\t\t\t'merchant_id'\t=> $this->merchant['id'],\r\n\t\t\t'hash' => md5($this->merchant['id'].$this->merchant['secret'])\r\n\t\t);\r\n\r\n\t\t$response = $this->sendRequest($this->url, $data);\r\n \r\n list ($status, $sarr) = explode(\"\\n\", $response);\r\n\r\n if ($status == 'OK') {\r\n return unserialize($sarr);\r\n }\r\n\r\n $logEvent = new AirpayLogEvent('Response was not OK ('.$response.')', AirpayError::HASH_DOES_NOT_MATCH);\r\n $this->eventDispatcher->dispatch('beinarovic_airpay.log', $logEvent);\r\n $this->errors[] = AirpayError::GOT_WRONG_STATUS;\r\n \r\n\t\treturn false;\r\n\t}", "public function payment_methods()\n {\n return ['code' => 'pickup', 'title' => 'In Store Pickup'];\n }", "public function get_payment_methods() {\n\t\treturn Pronamic_WP_Pay_PaymentMethods::IDEAL;\n\t}", "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 static function getInstalledPaymentModules()\n {\n }", "public function getPaymentMethods()\n {\n return $this->payment_methods;\n }", "public function testListPaymentMethods()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function getEnabledGateways()\n {\n $paymentMethods = Mage::getSingleton('payment/config')->getActiveMethods();\n $methods = array();\n foreach ($paymentMethods as $paymentCode => $paymentModel) {\n if (($paymentModel instanceof Multon_Estpay_Model_IPizza)\n\t\t\t\t\t|| ($paymentModel instanceof Multon_Estpay_Model_Estcard)\n\t\t\t\t\t|| ($paymentModel instanceof Multon_Estpay_Model_Nordea)\n\t\t\t\t\t)\n\t\t\t\t{\n $paymentTitle = Mage::getStoreConfig('payment/' . $paymentCode . '/title');\n $formBlockType = $paymentModel->getFormBlockType();\n $formBlockInstance = Mage::getBlockSingleton($formBlockType);\n $methods[] = array(\n 'title' => $paymentTitle,\n 'code' => $paymentCode,\n 'logo' => $formBlockInstance->getMethodLogoUrl()\n );\n }\n }\n return $methods;\n }", "public static function getPaymentMethod()\n {\n return self::find()->allPayments();\n }", "function wc_get_account_saved_payment_methods_list($list, $customer_id)\n {\n }", "public function paymentMethods()\n {\n return $this->inputArgs('paymentMethods', []);\n }", "public function paymentMethodProvider()\n {\n return [\n ['Cash', 'me@mydomain.com', 100.00],\n ['CreditCard', 'me@mydomain.com', 95.00],\n ['PayPal', 'myName@gmail.com', 95.00],\n ['PayPal', 'me@mydomain.com', 0.00]\n ];\n }", "public function get_payment_methods() {\n\t\t$payment_methods = new ReflectionClass( 'Pronamic_WP_Pay_Gateways_MultiSafepay_Gateways' );\n\n\t\treturn array( array( 'options' => $payment_methods->getConstants() ) );\n\t}", "function mje_get_payment_list($not_allowed = array()) {\n\t$default_payment_list = array(\n\t\t'cash' => __(\"Cash\", 'enginethemes'),\n\t\t'paypal' => __(\"PayPal\", 'enginethemes'),\n\t\t'2checkout' => __(\"2Checkout\", 'enginethemes'),\n\t\t'credit' => __(\"Credit\", 'enginethemes'),\n\t);\n\n\t$payment_list = array_diff_key($default_payment_list, array_flip($not_allowed));\n\n\treturn apply_filters('mje_payment_list', $payment_list);\n}", "public function getPaymentMethod();", "public function getPaymentMethod();", "public function getPaymentMethod();", "public function getPaymentMethod();", "public function listPaymentMethods()\n\t{\n\t\t// make the call\n\t\t$response = $this->doCall('ListPaymentMethods', array('ListPaymentMethods' => null));\n\n\t\t// validate\n\t\tif(!isset($response->PaymentMethods)) throw new RecreatexException('Invalid response.');\n\n\t\t// init var\n\t\t$return = array();\n\n\t\t// loop\n\t\tforeach($response->PaymentMethods->BasketPaymentMethod as $row) $return[] = self::decodeResponse($row);\n\n\t\t// return\n\t\treturn $return;\n\t}", "private function getPaymentMethods(): array\n {\n /**\n * @var PaymentMethodRepository $paymentMethodRepository\n */\n $paymentMethodRepository = $this->get('catalog.repository.payment_method');\n $availablePaymentMethods = $paymentMethodRepository->findInstalledPaymentMethods(Locale::frontendLanguage());\n $session = Model::getSession();\n\n $paymentMethods = [];\n foreach ($availablePaymentMethods as $paymentMethod) {\n $className = \"\\\\Backend\\\\Modules\\\\Catalog\\\\PaymentMethods\\\\{$paymentMethod}\\\\Checkout\\\\Quote\";\n\n /**\n * @var Quote $class\n */\n $class = new $className($paymentMethod, $this->cart, $session->get('guest_address'));\n foreach ($class->getQuote() as $key => $options) {\n $paymentMethods[$paymentMethod.'.'. $key] = $options;\n }\n }\n\n return $paymentMethods;\n }", "function woocommerce_account_payment_methods()\n {\n }", "public function get_supported_payment_methods() {\n\t\treturn array(\n\t\t\tPronamic_WP_Pay_PaymentMethods::IDEAL => Pronamic_WP_Pay_PaymentMethods::IDEAL,\n\t\t);\n\t}", "public function getShippingMethods();", "function emnl_wie_filter_payment_methods ( $gateways_available ) {\r\n if ( ! array_key_exists ( EMNL_INSTORE_ENVIRONMENT_PAYMENT_METHOD, $gateways_available ) ) {\r\n return $gateways_available;\r\n }\r\n\r\n // For debugging purposes: for administrators show ALL payment methods\r\n $role = '';\r\n if ( is_user_logged_in() ) {\r\n\r\n $user = wp_get_current_user();\r\n $roles = ( array ) $user->roles;\r\n $role = $roles[0];\r\n\r\n }\r\n\r\n if ( is_user_logged_in() && 'administrator' === $role ) {\r\n return $gateways_available;\r\n }\r\n\r\n // Unset ALL payment methods EXCEPT instore\r\n if ( emnl_wie_detect_instore_environment() ) {\r\n\r\n $gateway_instore = $gateways_available[EMNL_INSTORE_ENVIRONMENT_PAYMENT_METHOD];\r\n $gateways_available = array();\r\n $gateways_available[EMNL_INSTORE_ENVIRONMENT_PAYMENT_METHOD] = $gateway_instore;\r\n \r\n // Unset ONLY instore payment method\r\n } else {\r\n unset ( $gateways_available[EMNL_INSTORE_ENVIRONMENT_PAYMENT_METHOD]);\r\n }\r\n\r\n return $gateways_available;\r\n\r\n}", "public function getAllowedMethods()\n {\n $methods = [];\n $activeMethods = $this->getShippingMethodService()->getActiveMethods();\n if (!empty($activeMethods)) {\n $activeMethods[] = $this->createBackupMethod();\n }\n\n foreach ($activeMethods as $method) {\n $methods[] = $method->getTitle();\n }\n\n return $methods;\n }", "public function saved_payment_methods()\n {\n }", "private function getPaymentMethods(): array\n {\n /**\n * @var PaymentMethodRepository $paymentMethodRepository\n */\n $paymentMethodRepository = $this->get('catalog.repository.payment_method');\n $availablePaymentMethods = $paymentMethodRepository->findInstalledPaymentMethods(Locale::frontendLanguage());\n $cart = $this->getActiveCart();\n\n $paymentMethods = [];\n foreach ($availablePaymentMethods as $paymentMethod) {\n $className = \"\\\\Backend\\\\Modules\\\\Catalog\\\\PaymentMethods\\\\{$paymentMethod}\\\\Checkout\\\\Quote\";\n\n /**\n * @var Quote $class\n */\n $class = new $className($paymentMethod, $cart, $this->session->get('guest_address'));\n foreach ($class->getQuote() as $key => $options) {\n $paymentMethods[$paymentMethod.'.'. $key] = $options;\n }\n }\n\n return $paymentMethods;\n }", "public function getMethods()\n {\n $methods = $this->getData('methods');\n if (is_null($methods)) {\n $quote = $this->getQuote();\n $store = $quote ? $quote->getStoreId() : null;\n $methods = $this->helper('payment')->getStoreMethods($store, $quote);\n $total = $quote->getBaseSubtotal() + $quote->getShippingAddress()->getBaseShippingAmount();\n foreach ($methods as $key => $method) {\n if ($this->_canUseMethod($method)\n && ($total != 0\n || $method->getCode() == 'free'\n || ($quote->hasRecurringItems() && $method->canManageRecurringProfiles())\n || Mage::helper('aw_sarp2/quote')->isQuoteHasSubscriptionProduct($quote)\n )\n ) {\n $this->_assignMethod($method);\n } else {\n unset($methods[$key]);\n }\n }\n $this->setData('methods', $methods);\n }\n return $methods;\n }", "public function get_transient_payment_methods() {\n\t\t$methods = null;\n\n\t\t// Transient name. Expected to not be SQL-escaped. Should be 45 characters or less in length.\n\t\t$transient = 'pronamic_pay_payment_methods_' . $this->config->id;\n\n\t\t$result = get_transient( $transient );\n\n\t\tif ( is_wp_error( $result ) || false === $result ) {\n\t\t\t$methods = $this->get_payment_methods();\n\n\t\t\tif ( $methods ) {\n\t\t\t\t// Make sure methods are stored as array\n\t\t\t\tif ( is_string( $methods ) ) {\n\t\t\t\t\t$methods = array( $methods );\n\t\t\t\t}\n\n\t\t\t\t// 60 * 60 * 24 = 24 hours = 1 day\n\t\t\t\tset_transient( $transient, $methods, 60 * 60 * 24 );\n\t\t\t}\n\t\t} elseif ( is_array( $result ) ) {\n\t\t\t$methods = $result;\n\t\t}\n\n\t\treturn $methods;\n\t}", "public function get_shipping_methods() {\n\t\t\t$shipping_methods = WC()->shipping()->get_shipping_method_class_names();\n\t\t\techo '<p>Liste des méthodes disponibles, correspondant au champ \"Carrier\" -> \"id\"</p>';\n\t\t\techo '<ul>';\n\t\t\tforeach ( $shipping_methods as $key => $value ) {\n\t\t\t\techo '<li>' . $key . '</li>';\n\t\t\t}\n\t\t\techo '</ul>';\n\t\t}", "public function GetAvailableDeliveryMethods()\n\t\t{\n\t\t\t// Return quotes for all available OCASASUCURSAL service types\n\t\t\t$methods = $this->GetValue(\"deliverytypes\");\n\n\t\t\tif (!is_array($methods) && $methods != \"\") {\n\t\t\t\t$methods = array($methods);\n\t\t\t} elseif (!is_array($methods)) {\n\t\t\t\t$methods = array();\n\t\t\t}\n\n\t\t\t$displayName = $this->GetDisplayName();\n\n\t\t\tforeach ($methods as $key => $method) {\n\t\t\t\t$methods[$key] = $displayName.' ('.$this->_deliverytypes[$method].')';\n\t\t\t}\n\n\t\t\treturn $methods;\n\t\t}", "protected function getFreeMethods()\n {\n }", "public function languageMethodsList()\n {\n return [\n self::COOKIE_TYPE => 'COOKIE TYPE',\n self::SESSION_TYPE => 'SESSION TYPE'\n ];\n }", "public function paymentMethodsAction()\n {\n if ($this->_checkApiForward('paymentmethodlist', Mage_XmlConnect_Helper_Data::DEVICE_API_V_23)) {\n return;\n }\n $this->paymentMethodListAction();\n }", "public function loadPaymentMethodList() {\n $count = 0;\n $paymentMethodList;\n $link = getConnection();\n $query=\"select \tpayment_method_id,\n payment_method_name,\n payment_method_include_path,\n payment_method_logo,\n payment_method_desc\n from tb_payment_method\";\n\n $result = executeNonUpdateQuery($link , $query);\n closeConnection($link);\n\n while ($newArray = mysql_fetch_array($result)) {\n $paymentMethod = new PaymentMethod();\n $paymentMethod->set_payment_method_id($newArray['payment_method_id']);\n $paymentMethod->set_payment_method_name($newArray['payment_method_name']);\n $paymentMethod->set_payment_method_include_path($newArray['payment_method_include_path']);\n $paymentMethod->set_payment_method_logo($newArray['payment_method_logo']);\n $paymentMethod->set_payment_method_desc($newArray['payment_method_desc']);\n\n $paymentMethodList[$count] = $paymentMethod;\n $count++;\n }\n return $paymentMethodList;\n }", "public function getPaymentMethod()\n {\n }", "public static function all(): array\n {\n return static::$discovered->map(function ($billingMethod) {\n return $billingMethod->name;\n })->toArray();\n }", "public function getAlternativePaymentMethods()\n {\n $apmArray = array();\n $apmSelect = $this->_getConfigModel()->getAlternativePaymentMethods();\n $currencyCode = Mage::app()->getStore()->getCurrentCurrencyCode();\n $quote = Mage::getModel('ckopayment/checkoutcomUtils')->getQuote(null);\n $billingAddress = $quote->getBillingAddress();\n $countryCode = $billingAddress->getCountry();\n\n if ($apmSelect !== 0) {\n $apmArr = explode(',', $apmSelect);\n\n foreach ($apmArr as $value) {\n\n if ($value == 'ideal' && $currencyCode == 'EUR' && $countryCode == 'NL') {\n array_push($apmArray, $value);\n }\n\n if ($value == 'sofort' && $currencyCode == 'EUR') {\n\n if ($countryCode == 'BE'\n || $countryCode == 'DE'\n || $countryCode == 'IT'\n || $countryCode == 'NL'\n || $countryCode == 'AT'\n || $countryCode == 'ES'\n ) {\n array_push($apmArray, $value);\n }\n }\n\n if ($value == 'boleto' && $countryCode == 'BR') {\n if ($currencyCode == 'BRL' || $currencyCode == 'USD' ) {\n array_push($apmArray, $value);\n }\n }\n\n if ($value == 'giropay' && $currencyCode == 'EUR' && $countryCode == 'DE') {\n array_push($apmArray, $value);\n }\n\n if ($value == 'poli') {\n if ($currencyCode == 'AUD' || $currencyCode == 'NZD') {\n if ($countryCode == 'AU' || $countryCode == 'NZ') {\n array_push($apmArray, $value);\n }\n }\n }\n\n if ($value == 'klarna') {\n if ($currencyCode == 'EUR'\n || $currencyCode == 'DKK'\n || $currencyCode == 'GBP'\n || $currencyCode == 'NOR'\n || $currencyCode == 'SEK'\n ) {\n if ($countryCode == 'AT'\n || $countryCode == 'DK'\n || $countryCode == 'FI'\n || $countryCode == 'DE'\n || $countryCode == 'NL'\n || $countryCode == 'NO'\n || $countryCode == 'SE'\n || $countryCode == 'GB'\n ) {\n array_push($apmArray, $value);\n }\n }\n }\n\n if ($value == 'sepa' && $currencyCode == 'EUR') {\n\n if ($countryCode == 'AD'\n || $countryCode == 'AT'\n || $countryCode == 'BE'\n || $countryCode == 'CY'\n || $countryCode == 'EE'\n || $countryCode == 'FI'\n || $countryCode == 'DE'\n || $countryCode == 'GR'\n || $countryCode == 'IE'\n || $countryCode == 'IT'\n || $countryCode == 'LV'\n || $countryCode == 'LT'\n || $countryCode == 'LU'\n || $countryCode == 'MT'\n || $countryCode == 'MC'\n || $countryCode == 'NL'\n || $countryCode == 'PT'\n || $countryCode == 'SM'\n || $countryCode == 'SK'\n || $countryCode == 'SI'\n || $countryCode == 'ES'\n || $countryCode == 'VA'\n || $countryCode == 'BG'\n || $countryCode == 'HR'\n || $countryCode == 'CZ'\n || $countryCode == 'DK'\n || $countryCode == 'HU'\n || $countryCode == 'IS'\n || $countryCode == 'LI'\n || $countryCode == 'NO'\n || $countryCode == 'PL'\n || $countryCode == 'RO'\n || $countryCode == 'SE'\n || $countryCode == 'CH'\n || $countryCode == 'GB' \n ) {\n array_push($apmArray, $value);\n }\n }\n\n if ($value == 'eps' && $currencyCode == 'EUR' && $countryCode == 'AT') {\n array_push($apmArray, $value);\n }\n\n if ($value == 'bancontact' && $currencyCode == 'EUR' && $countryCode == 'BE') {\n array_push($apmArray, $value);\n }\n\n if ($value == 'knet' && $currencyCode == 'KWD' && $countryCode == 'KW') {\n array_push($apmArray, $value);\n }\n\n if ($value == 'fawry' && $currencyCode == 'EGP' && $countryCode == 'EG') {\n array_push($apmArray, $value);\n }\n\n if ($value == 'alipay' && $currencyCode == 'USD' && $countryCode == 'CN') {\n array_push($apmArray, $value);\n }\n }\n }\n\n return $apmArray;\n }", "public function paymentMethodListAction()\n {\n try {\n $this->loadLayout(false);\n /** @var $paymentMethodsBlock Mage_XmlConnect_Block_Checkout_Payment_Method_List */\n $paymentMethodsBlock = $this->getLayout()->getBlock('payment.methods');\n $response = $paymentMethodsBlock->toHtml();\n $this->getResponse()->setBody($response);\n return;\n } catch (Mage_Core_Exception $e) {\n $result['error'] = $e->getMessage();\n }\n $this->_message($result['error'], self::MESSAGE_STATUS_ERROR);\n }", "public function paymentMethodProvider()\n {\n return [\n ['Cash', 100.00],\n ['Credit Card', 95.00],\n ];\n }", "public function get_supported_payment_methods() {\n\t\treturn array(\n\t\t\tPronamic_WP_Pay_PaymentMethods::IDEAL,\n\t\t\tPronamic_WP_Pay_PaymentMethods::BANK_TRANSFER,\n\t\t);\n\t}", "function shGetAllShippingMethods( $enabledOnly = false )\r\n{\r\n\tstatic $cache = array();\r\n\tif(!isset($cache[$enabledOnly])){\r\n\t\t$whereClause = \"\";\r\n\t\tif ( $enabledOnly ){\r\n\t\t\t$whereClause = \" WHERE Enabled=1 \";\r\n\t\t}\r\n\t\t$q = db_phquery(\"SELECT * FROM ?#SHIPPING_METHODS_TABLE {$whereClause} ORDER BY sort_order\");\r\n\t\t$cache[$enabledOnly] = array();\r\n\t\twhile( $row = db_fetch_row($q) ){\r\n\t\t\tLanguagesManager::ml_fillFields(SHIPPING_METHODS_TABLE, $row);\r\n\t\t\t$cache[$enabledOnly][] = $row;\r\n\t\t}\r\n\t\t\r\n\t}\r\n\treturn $cache[$enabledOnly];\r\n}", "public function getMethods()\n {\n// if ($isSearch)\n// return array();\n \n \n // class names. order defines the position in the dropdown\n $methods = array(\n 'new', \n 'saving',\n 'bestselling', \n 'mostviewed', \n 'toprated', \n 'commented', \n 'wished',\n 'qty',\n 'profit',\n 'revenue',\n 'revenueview',\n 'orderview',\n ); \n\n return $methods;\n }", "public function getArray() {\n return $this->paymentMethods;\n }", "protected function getPaypalDisabledMethods()\n {\n // Assoc array that contains info about paypal methods (their IDs and corresponding Config Paths)\n $methods = array(\n 'express' => 'payment/paypal_express/active',\n 'wps' => 'payment/paypal_standard/active',\n 'wpp' => 'payment/paypal_direct/active',\n 'wpppe' => 'payment/paypaluk_direct/active',\n 'verisign' => 'payment/verisign/active',\n 'expresspe' => 'payment/paypaluk_express/active'\n );\n // Retrieve a code of the current website\n $website = $this->getRequest()->getParam('website');\n\n $configRoot = Mage::getConfig()->getNode(null, 'website', $website);\n\n $disabledMethods = array();\n foreach ($methods as $methodId => $methodPath) {\n $isEnabled = (int) $configRoot->descend($methodPath);\n if ($isEnabled === 0) {\n $disabledMethods[$methodId] = $isEnabled;\n }\n }\n\n return $disabledMethods;\n }", "public function listMethods() {\n $methods = array_keys($this->services);\n sort($methods);\n return $methods;\n }", "public function getActiveMethods()\n {\n $methods = [];\n foreach ($this->_scopeConfig->getValue('payment', ScopeInterface::SCOPE_STORE, null) as $code => $data) {\n if (isset($data['active'], $data['model']) && (bool)$data['active']) {\n /** @var MethodInterface $methodModel Actually it's wrong interface */\n $methodModel = $this->_paymentMethodFactory->create($data['model']);\n $methodModel->setStore(null);\n if ($methodModel->getConfigData('active', null)) {\n $methods[$code] = $methodModel;\n }\n }\n }\n return $methods;\n }", "public function get_payment_methods() {\n\t\t$methods_class = substr_replace( get_class( $this ), 'PaymentMethods', -7, 7 );\n\n\t\tif ( class_exists( $methods_class ) ) {\n\t\t\t$payment_methods = new ReflectionClass( $methods_class );\n\n\t\t\t$groups = array(\n\t\t\t\tarray(\n\t\t\t\t\t'options' => $payment_methods->getConstants(),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\treturn $groups;\n\t\t}\n\n\t\treturn null;\n\t}", "public function getShippingMethods()\n {\n return ShippingMethod::get()->filter(\"Enabled\", 1);\n }", "public function getAllowedMethods()\n {\n $methods = $this->_home_methods;\n if(count($methods)>0){\n foreach($methods as $carrier){\n $array['shipping_'.$carrier->shipping_method_code] = $carrier->name;\n }\n return $array;\n }\n\n }", "public function getAListOfPaymentMethods()\n {\n // Arrange\n $customerId = $this->faker->uuid;\n\n // Act\n $paymentMethods = Ezypay::getPaymentMethods($customerId, false);\n\n // Assert\n $this->assertInternalType('array', $paymentMethods);\n $this->assertEquals($customerId, $paymentMethods['data'][0]['customerId']);\n $this->assertEquals($paymentMethods['paging']['totalCount'], 1);\n }", "public function getLanguagesMethodList()\n {\n return Language::getInstance()->languageMethodsList();\n }", "public function getPaymentMethodType();", "public function getCurrentPaymentMethods() : Response\n {\n $paymentMethod = [];\n\n try {\n $paymentMethod = $this->model->getDefaultPaymentMethod();\n } catch (Exception $e) {\n }\n return $this->response($paymentMethod);\n }", "public function listPaymentMethods()\n {\n $methods = array_map(\n function ($method) {\n return $method->serialize();\n },\n $this->session()->getUser()->getPaymentMethods()->fetch()->all()\n );\n if (empty($methods)) {\n $this->log()->notice('There are no payment methods attached to this account.');\n }\n return new RowsOfFields($methods);\n }", "public static function get_supported_methods() {\r\n\t\t$methodConfig = Config::inst()->get('PaymentProcessor', 'supported_methods');\r\n\t\t$environment = PaymentGateway::get_environment();\r\n\r\n\t\t// Check if all methods are defined in factory\r\n\t\tforeach ($methodConfig[$environment] as $method) {\r\n\t\t\tif (! PaymentFactory::get_factory_config($method)) {\r\n\t\t\t\tuser_error(\"Method $method not defined in factory\", E_USER_ERROR);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $methodConfig[$environment];\r\n\t}", "public function removePaymentMethods($observer) {\n\t\t$event = $observer->getEvent();\n\t\t$method = $event->getMethodInstance();\n\t\t$result = $event->getResult();\n\t\t$isPartial = Mage::getSingleton('checkout/session')->getApprovalRequestSuccess();\n\n\t\tif ($isPartial === 'partial') {\n\t\t\tswitch ($method->getCode()) {\n\t\t\t\tcase 'mundipagg_creditcardoneinstallment':\n\t\t\t\tcase 'mundipagg_creditcard':\n//\t\t\t\tcase 'mundipagg_twocreditcards':\n//\t\t\t\tcase 'mundipagg_threecreditcards':\n//\t\t\t\tcase 'mundipagg_fourcreditcards':\n//\t\t\t\tcase 'mundipagg_fivecreditcards':\n\t\t\t\t\t$active = Mage::getStoreConfig('payment/' . $method->getCode() . '/active');\n\n\t\t\t\t\tif ($active == '1') {\n\t\t\t\t\t\t$result->isAvailable = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$result->isAvailable = false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'mundipagg_boleto':\n\t\t\t\t\t$result->isAvailable = false;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$result->isAvailable = false;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "private static function get_active_shipping_methods()\n {\n }", "protected function getAllShippingMethods()\n\t{\n\t\t$carriersConfig = Mage::getStoreConfig('carriers');\n\t\t\n\t\t/* The getStoreConfig() function returns a nested array representing the\n\t\t * XML but without the <sections> and <groups> tags. */\n\t\t$carriers = array_keys($carriersConfig);\n\t\treturn $carriers;\n\t}", "protected function get_payment_method_icons()\n {\n $output = '';\n $payment_method_icons = json_decode(get_option('hb_sharegroop_icons'));\n if (!is_array($payment_method_icons)) {\n $payment_method_icons = [];\n }\n\n foreach ($payment_method_icons as $icon_id) {\n if ($icon_id != 'sharegroop') {\n $output .= ' ';\n $output .= '<img ';\n $output .= 'src=\"' . plugin_dir_url(__FILE__) . 'img/' . $icon_id . '.png\" ';\n $output .= 'alt=\"' . $this->payment_methods[$icon_id] . '\" ';\n $output .= 'title=\"' . $this->payment_methods[$icon_id] . '\" ';\n $output .= '/>';\n }\n }\n\n return $output;\n }", "public function getPaymentMethodsAsSimpleArray(){\n \t$rows = $this->getAllPaymentMethods();\n \tif($rows){\n \t\t$aResult = array();\n\t \t$rows->translate();\n\t \t\n\t \tforeach($rows as $row){\n\t \t\t$aResult[] = array(\n\t \t\t\t$row->getId(),\n\t \t\t\t$row->__get('name')\n\t \t\t);\n\t \t}\n\t \treturn $aResult;\n \t}\n \t// return empty arra\n \treturn array();\n }", "public function listWSMethods()\n {\n if ($_ENV['debug_action']) {\n $this->config->load('cit_webservices', TRUE);\n $all_methods = $this->config->item('cit_webservices');\n }\n $all_methods = empty($all_methods) ? array() : $all_methods;\n $render_arr = array(\n 'all_methods' => $all_methods,\n 'ws_url' => $this->config->item('site_url') . \"WS/\"\n );\n $this->smarty->assign($render_arr);\n }", "public function shipment_methods()\n {\n return ['code' => 'free', 'title' => 'Free Shipping', 'price' => '0.00'];\n }", "public function mb_get_payment_method() {\n\t\treturn version_compare( WC_VERSION, '3.0', '>=' ) ? $this->get_payment_method() : $this->payment_method;\n\t}", "public function getFormattedCustomPaymentMethods()\n {\n $customPaymentMethods = $this->mb->GetCustomPaymentMethods();\n\n $formattedCustomPaymentMethods = [];\n // throw new \\Exception(print_r($customPaymentMethods,true));\n if ($customPaymentMethods['GetCustomPaymentMethodsResult']['ResultCount'] === 1) {\n $customPaymentMethod = $customPaymentMethods['GetCustomPaymentMethodsResult']['PaymentMethods']['CustomPaymentInfo'];\n $formattedCustomPaymentMethods[$customPaymentMethod['Name']] = $customPaymentMethod['ID'];\n } else {\n foreach ($customPaymentMethods['GetCustomPaymentMethodsResult']['PaymentMethods']['CustomPaymentInfo'] as $customPaymentMethod) {\n $formattedCustomPaymentMethods[$customPaymentMethod['Name']] = $customPaymentMethod['ID'];\n }\n }\n\n return $formattedCustomPaymentMethods;\n }", "public function getPaymentMethodInfo();", "public function commerce_registerShippingMethods()\n {\n $settings = craft()->plugins->getPlugin('upsshipping')->getSettings();\n\n $methods = [];\n foreach (static::getSettingsToMethods() as $setting => $method) {\n if ($settings[$setting]) {\n $methods[] = new UpsShipping_BaseMethodModel($method);\n }\n }\n\n return $methods;\n }", "public function getAvailableShippingMethods($module_srl)\n {\n return $this->getAvailablePlugins($module_srl);\n }", "public function getMethods();", "function wc_get_customer_saved_methods_list($customer_id)\n {\n }", "public function manage_payment_methods() {\r\n global $plugin_page;\r\n Eabi_Ipenelo_Calendar::service()->import('models/Registrant');\r\n Eabi_Ipenelo_Calendar::service()->get('payment')->detectAvailablePaymentMethods();\r\n $paymentMethods = array(\r\n );\r\n $availablePayments = @unserialize(Eabi_Ipenelo_Calendar::get('available_payments'));\r\n if (!is_array($availablePayments)) {\r\n wp_redirect(admin_url('admin.php?page=' . $plugin_page));\r\n exit;\r\n $availablePayments = array();\r\n }\r\n foreach ($availablePayments as $code => $availablePayment) {\r\n $paymentMethods[$code] = $availablePayment['title'];\r\n }\r\n if (isset($_GET['code']) && isset($paymentMethods[$_GET['code']])) {\r\n //echo the form\r\n $form = Eabi_Ipenelo_Calendar::service()->get('payment')->getByCode($_GET['code'], Eabi_Ipenelo_Calendar::service()->get('models/Registrant'));\r\n } else {\r\n //echo the select field.\r\n if (isset($_GET['noheader'])) {\r\n require_once(ABSPATH . 'wp-admin/admin-header.php');\r\n }\r\n echo Eabi_Ipenelo_Calendar::service()->get('payment')->renderSelect($paymentMethods);\r\n return;\r\n }\r\n\r\n//\t\t$form = new Eabi_Ipenelo_Calendar_Payment_Checkmo(new Eabi_Ipenelo_Calendar_Model_Registrant());\r\n\r\n $needsRedirect = $form->save();\r\n if ($needsRedirect) {\r\n wp_redirect(admin_url('admin.php?noheader=true&page=' . $plugin_page));\r\n\r\n exit;\r\n }\r\n\r\n if (isset($_GET['noheader'])) {\r\n require_once(ABSPATH . 'wp-admin/admin-header.php');\r\n }\r\n if (is_object($form)) {\r\n echo $form->renderConfigurationForm();\r\n }\r\n }", "public function getMethodsInfo()\n {\n return $this->_dataStorage->get('methods');\n }", "public function getMethodsInfo()\n {\n return $this->_dataStorage->get('methods');\n }", "public function paymentmethods()\n {\n return view('home.payment_methods');\n }", "public function get_shipping_methods()\n {\n }", "public function get_shipping_methods()\n {\n }", "private static function get_active_payment_gateways()\n {\n }", "public function getActiveMethods()\n {\n $methods = [];\n if (isset($data['active'], $data['model']) && (bool)$data['active']) {\n /** @var MethodInterface $methodModel Actually it's wrong interface */\n $methodModel = $this->_paymentMethodFactory->create($data['model']);\n $methodModel->setId($code);\n $methodModel->setStore(null);\n if ($methodModel->getConfigData('active', null)) {\n $methods[$code] = $methodModel;\n }\n }\n return $methods;\n }", "public function getActiveShippingMethods()\n {\n $activeCarriers = $this->shipconfig->getActiveCarriers();\n $methods = [];\n foreach ($activeCarriers as $carrierCode => $carrierModel) {\n\n if ($carrierMethods = $carrierModel->getAllowedMethods()) {\n foreach ($carrierMethods as $methodCode => $method) {\n $code = $carrierCode . '_' . $methodCode;\n $carrierTitle = $this->scopeConfig->getValue('carriers/' . $carrierCode . '/title');\n $cost = $this->scopeConfig->getValue('carriers/' . $carrierCode . '/price');\n $allowSpecific = $this->scopeConfig->getValue('carriers/' . $carrierCode . '/sallowspecific');\n $specificCountry = '';\n if ($allowSpecific == 1) {\n $specificCountry = $this->scopeConfig->getValue('carriers/' . $carrierCode . '/specificcountry');\n }\n if (empty($cost)) {\n $cost = '0.00';\n }\n $methods[] = ['rateId' => $code, 'methodId' => $methodCode, 'instanceId' => $carrierCode, 'name' => $carrierTitle, 'cost' => $cost, 'countryCode' => $specificCountry];\n }\n }\n }\n\n return $methods;\n }", "public function getPaymentName()\n {\n return self::METHOD_NAME;\n }", "public function test_get_payout_method_class_names() {\n $payout_methods = EDD_Commissions_Payouts()->helper->get_payout_methods();\n\n $this->assertTrue( is_array( $payout_methods ) );\n $this->assertInstanceOf( 'EDD_Commissions_Payouts_Method', current( $payout_methods ) );\n }", "public function getPaymentMethodName()\n {\n }", "protected function _getPaymentMethodsHtml(){\n\t\t$layout = $this->getLayout();\n\t\t$update = $layout->getUpdate();\n\t\t$update->load('checkout_onepage_paymentmethod');\n\t\t$layout->generateXml();\n\t\t$layout->generateBlocks();\n\t\tforeach($layout->getAllBlocks() as $block){\n\t\t\tif($block instanceof Customweb_UnzerCw_Block_Form){\n\t\t\t\t$block->disableJavascript();\n\t\t\t}\n\t\t}\n\t\t$output = $layout->getOutput();\n\t\treturn $output;\n\t}" ]
[ "0.77610844", "0.75420266", "0.7540085", "0.745775", "0.745775", "0.7400144", "0.73286", "0.6731759", "0.6707511", "0.66277903", "0.66090035", "0.6600392", "0.6599338", "0.6587044", "0.65699553", "0.6564822", "0.6562674", "0.65252775", "0.6516253", "0.6509505", "0.6485117", "0.6470306", "0.6456695", "0.6440842", "0.6429007", "0.63915503", "0.636207", "0.6331232", "0.63085514", "0.6284093", "0.6264346", "0.6252077", "0.6252077", "0.6252077", "0.6252077", "0.623229", "0.62224245", "0.6210296", "0.619677", "0.61901325", "0.618336", "0.61760294", "0.61540025", "0.6134649", "0.6108681", "0.6101513", "0.60966", "0.60960996", "0.60947484", "0.6088779", "0.602827", "0.6012961", "0.6004632", "0.6002632", "0.60023123", "0.59944403", "0.5986387", "0.59722304", "0.5967961", "0.59573394", "0.5938492", "0.59339637", "0.5903005", "0.58993304", "0.58912146", "0.5889982", "0.587093", "0.58684486", "0.5868267", "0.58638304", "0.58577347", "0.5831604", "0.58274275", "0.58231807", "0.5795519", "0.57774", "0.574014", "0.5735937", "0.57353556", "0.570834", "0.57028747", "0.5656436", "0.5639179", "0.5633229", "0.56315815", "0.56232846", "0.5619312", "0.5614884", "0.56097144", "0.56097144", "0.56083226", "0.5591398", "0.55910975", "0.55902874", "0.5577383", "0.5562", "0.55606514", "0.5555576", "0.5554472", "0.5549023" ]
0.86459744
0
Get backend disabled by the admin payment methods
Платежные методы, отключенные администратором backend
public function getDisabledPaymentMethods(){ $paymentsallow = self::getConfig('paymentsallow'); //convert variable to array $paymentsallow = ($paymentsallow)?explode( ',', $paymentsallow ) : array(); //returns selected direct payment methods and all offline payment methods return array_merge( $paymentsallow, self::getOfflinePaymentMethods() ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPaymentMethod();", "public function getPaymentMethod();", "public function getPaymentMethod();", "public function getPaymentMethod();", "function edd_get_mtpayment_ops()\n{\n\tglobal $edd_options;\n\t//get 3ds opts from backend\n\tVeritrans_Config::$is3ds = $edd_options['mt_promo_3ds'] ? true : false;\n\t// error_log('mt_3ds '.$edd_options['mt_3ds']); //debugan\n\t// error_log('credit_card '.$edd_options['mt_credit_card']); //debugan\n// error_log('enabled payments array'.print_r($enabled_payments,true)); //debugan\n return $enabled_payments;\n}", "private static function get_active_payment_gateways()\n {\n }", "protected function getPaypalDisabledMethods()\n {\n // Assoc array that contains info about paypal methods (their IDs and corresponding Config Paths)\n $methods = array(\n 'express' => 'payment/paypal_express/active',\n 'wps' => 'payment/paypal_standard/active',\n 'wpp' => 'payment/paypal_direct/active',\n 'wpppe' => 'payment/paypaluk_direct/active',\n 'verisign' => 'payment/verisign/active',\n 'expresspe' => 'payment/paypaluk_express/active'\n );\n // Retrieve a code of the current website\n $website = $this->getRequest()->getParam('website');\n\n $configRoot = Mage::getConfig()->getNode(null, 'website', $website);\n\n $disabledMethods = array();\n foreach ($methods as $methodId => $methodPath) {\n $isEnabled = (int) $configRoot->descend($methodPath);\n if ($isEnabled === 0) {\n $disabledMethods[$methodId] = $isEnabled;\n }\n }\n\n return $disabledMethods;\n }", "public function getPaymentMethods();", "public function getPaymentMethods();", "public function getAvailablePaymentMethods() {\r\n\t\t\r\n\t//TODO - Insert your code here\r\n\t}", "public function getPaymentMethod()\n {\n }", "function emnl_wie_filter_payment_methods ( $gateways_available ) {\r\n if ( ! array_key_exists ( EMNL_INSTORE_ENVIRONMENT_PAYMENT_METHOD, $gateways_available ) ) {\r\n return $gateways_available;\r\n }\r\n\r\n // For debugging purposes: for administrators show ALL payment methods\r\n $role = '';\r\n if ( is_user_logged_in() ) {\r\n\r\n $user = wp_get_current_user();\r\n $roles = ( array ) $user->roles;\r\n $role = $roles[0];\r\n\r\n }\r\n\r\n if ( is_user_logged_in() && 'administrator' === $role ) {\r\n return $gateways_available;\r\n }\r\n\r\n // Unset ALL payment methods EXCEPT instore\r\n if ( emnl_wie_detect_instore_environment() ) {\r\n\r\n $gateway_instore = $gateways_available[EMNL_INSTORE_ENVIRONMENT_PAYMENT_METHOD];\r\n $gateways_available = array();\r\n $gateways_available[EMNL_INSTORE_ENVIRONMENT_PAYMENT_METHOD] = $gateway_instore;\r\n \r\n // Unset ONLY instore payment method\r\n } else {\r\n unset ( $gateways_available[EMNL_INSTORE_ENVIRONMENT_PAYMENT_METHOD]);\r\n }\r\n\r\n return $gateways_available;\r\n\r\n}", "public function getDisabledPlans()\n {\n if (array_key_exists(\"disabledPlans\", $this->_propDict)) {\n return $this->_propDict[\"disabledPlans\"];\n } else {\n return null;\n }\n }", "public function getPaymentMethod(){\n return null;\n }", "public function get_payment_methods() {\n\t\treturn Pronamic_WP_Pay_PaymentMethods::IDEAL;\n\t}", "public function getAvailablePaymentMethods () {\n #\t \treturn t3lib_div::xml2array (t3lib_div::getUrl(t3lib_extMgm::extPath ('paymentlib_ipayment').'paymentmethods.xml'));\n }", "public function getDirectPaymentMethods(){\n\t\t$methods = Mage::helper('payment')->getPaymentMethodList(TRUE, TRUE, TRUE);\n \t\tunset($methods['offline']);\n \t\treturn $methods;\n\t}", "public function getEnabledGateways()\n {\n $paymentMethods = Mage::getSingleton('payment/config')->getActiveMethods();\n $methods = array();\n foreach ($paymentMethods as $paymentCode => $paymentModel) {\n if (($paymentModel instanceof Multon_Estpay_Model_IPizza)\n\t\t\t\t\t|| ($paymentModel instanceof Multon_Estpay_Model_Estcard)\n\t\t\t\t\t|| ($paymentModel instanceof Multon_Estpay_Model_Nordea)\n\t\t\t\t\t)\n\t\t\t\t{\n $paymentTitle = Mage::getStoreConfig('payment/' . $paymentCode . '/title');\n $formBlockType = $paymentModel->getFormBlockType();\n $formBlockInstance = Mage::getBlockSingleton($formBlockType);\n $methods[] = array(\n 'title' => $paymentTitle,\n 'code' => $paymentCode,\n 'logo' => $formBlockInstance->getMethodLogoUrl()\n );\n }\n }\n return $methods;\n }", "public function disable()\n {\n $sql = \"UPDATE `s_core_paymentmeans` SET `active` = 0 WHERE `name` LIKE 'rpayratepay%'\";\n\n Shopware()->Db()->query($sql);\n\n return true;\n }", "public function getApplePayDisabled()\n {\n if (array_key_exists(\"applePayDisabled\", $this->_propDict)) {\n return $this->_propDict[\"applePayDisabled\"];\n } else {\n return null;\n }\n }", "public function getBackend() {\n\n }", "public function getBackend() {}", "public function getDisabledWithoutValidRates()\n {\n return $this->getData('disabled_without_valid_rates');\n }", "public function GetDisabled ();", "public static function getBackend() {}", "public function getAlternativePaymentMethods()\n {\n $apmArray = array();\n $apmSelect = $this->_getConfigModel()->getAlternativePaymentMethods();\n $currencyCode = Mage::app()->getStore()->getCurrentCurrencyCode();\n $quote = Mage::getModel('ckopayment/checkoutcomUtils')->getQuote(null);\n $billingAddress = $quote->getBillingAddress();\n $countryCode = $billingAddress->getCountry();\n\n if ($apmSelect !== 0) {\n $apmArr = explode(',', $apmSelect);\n\n foreach ($apmArr as $value) {\n\n if ($value == 'ideal' && $currencyCode == 'EUR' && $countryCode == 'NL') {\n array_push($apmArray, $value);\n }\n\n if ($value == 'sofort' && $currencyCode == 'EUR') {\n\n if ($countryCode == 'BE'\n || $countryCode == 'DE'\n || $countryCode == 'IT'\n || $countryCode == 'NL'\n || $countryCode == 'AT'\n || $countryCode == 'ES'\n ) {\n array_push($apmArray, $value);\n }\n }\n\n if ($value == 'boleto' && $countryCode == 'BR') {\n if ($currencyCode == 'BRL' || $currencyCode == 'USD' ) {\n array_push($apmArray, $value);\n }\n }\n\n if ($value == 'giropay' && $currencyCode == 'EUR' && $countryCode == 'DE') {\n array_push($apmArray, $value);\n }\n\n if ($value == 'poli') {\n if ($currencyCode == 'AUD' || $currencyCode == 'NZD') {\n if ($countryCode == 'AU' || $countryCode == 'NZ') {\n array_push($apmArray, $value);\n }\n }\n }\n\n if ($value == 'klarna') {\n if ($currencyCode == 'EUR'\n || $currencyCode == 'DKK'\n || $currencyCode == 'GBP'\n || $currencyCode == 'NOR'\n || $currencyCode == 'SEK'\n ) {\n if ($countryCode == 'AT'\n || $countryCode == 'DK'\n || $countryCode == 'FI'\n || $countryCode == 'DE'\n || $countryCode == 'NL'\n || $countryCode == 'NO'\n || $countryCode == 'SE'\n || $countryCode == 'GB'\n ) {\n array_push($apmArray, $value);\n }\n }\n }\n\n if ($value == 'sepa' && $currencyCode == 'EUR') {\n\n if ($countryCode == 'AD'\n || $countryCode == 'AT'\n || $countryCode == 'BE'\n || $countryCode == 'CY'\n || $countryCode == 'EE'\n || $countryCode == 'FI'\n || $countryCode == 'DE'\n || $countryCode == 'GR'\n || $countryCode == 'IE'\n || $countryCode == 'IT'\n || $countryCode == 'LV'\n || $countryCode == 'LT'\n || $countryCode == 'LU'\n || $countryCode == 'MT'\n || $countryCode == 'MC'\n || $countryCode == 'NL'\n || $countryCode == 'PT'\n || $countryCode == 'SM'\n || $countryCode == 'SK'\n || $countryCode == 'SI'\n || $countryCode == 'ES'\n || $countryCode == 'VA'\n || $countryCode == 'BG'\n || $countryCode == 'HR'\n || $countryCode == 'CZ'\n || $countryCode == 'DK'\n || $countryCode == 'HU'\n || $countryCode == 'IS'\n || $countryCode == 'LI'\n || $countryCode == 'NO'\n || $countryCode == 'PL'\n || $countryCode == 'RO'\n || $countryCode == 'SE'\n || $countryCode == 'CH'\n || $countryCode == 'GB' \n ) {\n array_push($apmArray, $value);\n }\n }\n\n if ($value == 'eps' && $currencyCode == 'EUR' && $countryCode == 'AT') {\n array_push($apmArray, $value);\n }\n\n if ($value == 'bancontact' && $currencyCode == 'EUR' && $countryCode == 'BE') {\n array_push($apmArray, $value);\n }\n\n if ($value == 'knet' && $currencyCode == 'KWD' && $countryCode == 'KW') {\n array_push($apmArray, $value);\n }\n\n if ($value == 'fawry' && $currencyCode == 'EGP' && $countryCode == 'EG') {\n array_push($apmArray, $value);\n }\n\n if ($value == 'alipay' && $currencyCode == 'USD' && $countryCode == 'CN') {\n array_push($apmArray, $value);\n }\n }\n }\n\n return $apmArray;\n }", "protected function getAvailablePaymentMethods() : array {\n\n return $this->configHelper->getPayUStoreConfigByDynamicField('general', 'payment_methods');\n }", "function pos_host_get_payment_gateways_ids( $enabled = false ) {\r\n\t$gateways = WC()->payment_gateways()->payment_gateways();\r\n\t$results = array();\r\n\r\n\tforeach ( $gateways as $id => $gateway ) {\r\n\t\tif ( $enabled && 'yes' !== $gateway->enabled ) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n array_push( $results, $id );\r\n\t}\r\n\treturn $results;\r\n \r\n}", "public function getOfflinePaymentMethods(){\n\t\t$methods = Mage::helper('payment')->getPaymentMethodList(TRUE, TRUE, TRUE);\n\t\t$methods = array_keys( $methods['offline']['value'] );\n\n\t\treturn $methods;\n\t}", "function getBackend() ;", "public function getPaymentHandler(): string;", "public function get_wizard_in_cart_payment_gateways()\n {\n }", "protected function get_wizard_available_in_cart_payment_gateways()\n {\n }", "public function getBackendUrl(){\n\t\tif ($return_value = Mage::getSingleton('checkout/session')->getNektriaBackendUrl( FALSE ) ){\n\t\t\treturn $return_value;\n\t\t}\n\n\t\ttry{\n\t\t\t$cr = new Nektria\\Recs\\MerchantApi\\Requests\\BackendAccessRequest( $this->getOptions() );\n\t\t\t$this->lastResponse = $cr->execute();\n\t\t}catch(Exception $e){\n\t\t\t$this->lastError = $e;\n\t\t\t$this->log($e->getCode().$e->getMessage(), 'getBackendUrl ERROR');\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t$response = $this->lastResponse->getBackendUrl();\n\t\t$this->log($response, 'getBackendUrl response');\n\t\tMage::getSingleton('checkout/session')->setNektriaBackendUrl( $response );\n\n\t\treturn $response;\n\t}", "public function getDisabledModules()\n {\n return $this->getConfig()->getConfigParam('aDisabledModules');\n }", "protected function disableOrphanedPaymentMethods(): void\n\t{\n\t\ttry {\n\t\t\t$query = \"UPDATE payment_method \n\t\t\t\t \t SET active=0 \n\t\t\t\t \t WHERE handler_identifier=:handler_identifier AND id NOT IN (\n\t\t\t\t \t \tSELECT payment_method_id FROM wallee_payment_method_configuration\n\t\t\t\t \t )\";\n\n\t\t\t$params = [\n\t\t\t\t'handler_identifier' => WalleePaymentHandler::class,\n\t\t\t];\n\n\t\t\t$connection = $this->container->get(Connection::class);\n\t\t\t$connection->executeQuery($query, $params);\n\t\t} catch (\\Exception $exception) {\n\t\t\t$this->logger->critical($exception->getMessage());\n\t\t}\n\t}", "public function get_wizard_manual_payment_gateways()\n {\n }", "public static function getInstalledPaymentModules()\n {\n }", "protected function _hidePaymentMethod()\r\n {\r\n Mage::getSingleton('ratepaypayment/session')->setRatepayMethodHide(true);\r\n }", "function mje_get_payment_list($not_allowed = array()) {\n\t$default_payment_list = array(\n\t\t'cash' => __(\"Cash\", 'enginethemes'),\n\t\t'paypal' => __(\"PayPal\", 'enginethemes'),\n\t\t'2checkout' => __(\"2Checkout\", 'enginethemes'),\n\t\t'credit' => __(\"Credit\", 'enginethemes'),\n\t);\n\n\t$payment_list = array_diff_key($default_payment_list, array_flip($not_allowed));\n\n\treturn apply_filters('mje_payment_list', $payment_list);\n}", "public function getSellerThirdPartyCheckoutDisabled()\n {\n return $this->sellerThirdPartyCheckoutDisabled;\n }", "public function getIsDisabled() {}", "public function getPaymentMethodType();", "function getPaymentMethod()\n\t{\n\t\treturn $this->payment_method;\n\t}", "public function payment_gateways_setting()\n {\n }", "public function get_enabled_payment_gateways() {\n\n $_enabled_gateways = array();\n\n $gateways = \\WC_Payment_Gateways::instance();\n\n if ( sizeof( $gateways->payment_gateways ) > 0 ) {\n foreach ( $gateways->payment_gateways() as $gateway ) {\n if ( $this->is_enabled( $gateway ) ) {\n $_enabled_gateways[ $gateway->id ] = $gateway;\n }\n }\n }\n\n return $_enabled_gateways;\n }", "protected function _getPaymentMethodsHtml(){\n\t\t$layout = $this->getLayout();\n\t\t$update = $layout->getUpdate();\n\t\t$update->load('checkout_onepage_paymentmethod');\n\t\t$layout->generateXml();\n\t\t$layout->generateBlocks();\n\t\tforeach($layout->getAllBlocks() as $block){\n\t\t\tif($block instanceof Customweb_UnzerCw_Block_Form){\n\t\t\t\t$block->disableJavascript();\n\t\t\t}\n\t\t}\n\t\t$output = $layout->getOutput();\n\t\treturn $output;\n\t}", "public function mb_get_payment_method() {\n\t\treturn version_compare( WC_VERSION, '3.0', '>=' ) ? $this->get_payment_method() : $this->payment_method;\n\t}", "abstract public function getPaymentConfiguration();", "public function getOnlyDeactivatedWebsites();", "public function is_disabled();", "public static function getAllowedPayments() {\n $allowed = array();\n\n $config = Zend_Registry::get('configuration');\n\n if ($config->payment->bar->enabled == 1) {\n $allowed[] = 'bar';\n }\n\n if ($config->payment->bill->enabled == 1) {\n $allowed[] = 'bill';\n }\n\n if ($config->payment->debit->enabled == 1) {\n $allowed[] = 'debit';\n }\n\n if ($config->payment->credit->enabled == 1) {\n $allowed[] = 'credit';\n }\n\n if ($config->payment->paypal->enabled == 1) {\n $allowed[] = 'paypal';\n }\n\n if ($config->payment->ebanking->enabled == 1) {\n $allowed[] = 'ebanking';\n }\n\n return $allowed;\n }", "public function blacklistMode() {\n\t\t$blacklistEnabled = false;\n\t\ttry {\n\t\t\t$wafEnabled = !(!WFWAF_ENABLED || wfWAF::getInstance()->getStorageEngine()->isDisabled());\n\t\t\t$blacklistEnabled = $wafEnabled && !wfWAF::getInstance()->getStorageEngine()->getConfig('disableWAFBlacklistBlocking');\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\t//Do nothing\n\t\t}\n\t\t\n\t\tif (wfConfig::get('isPaid') && $blacklistEnabled) {\n\t\t\treturn self::BLACKLIST_MODE_ENABLED;\n\t\t}\n\t\treturn self::BLACKLIST_MODE_DISABLED;\n\t}", "protected function getPaymentHelper()\n {\n return Mage::helper('expercash/payment');\n }", "function getAllPaymentMethods() {\n return $this->request('GET', 'https://api.upodi.io/v2/paymentmethods/');\n }", "public function choosePaymentMethod()\n {\n return false;\n\n // Or get the payment methods and create HTML with options.\n $html = \"<select name=\\\"paynl_bank\\\">\";\n $html .= \"<option value=\\\"\\\"></option>\";\n $html .= \"</select>\";\n\n return $html;\n }", "protected function _getReducedPaymentMethods()\n {\n return array();\n }", "public function getPaymentMethod()\n {\n return $this->_getOrder()->getPayment()->getMethod();\n }", "public function getBackend()\n {\n return $this->backend;\n }", "public function getBackend()\n {\n return $this->backend;\n }", "public function manage_payment_methods() {\r\n global $plugin_page;\r\n Eabi_Ipenelo_Calendar::service()->import('models/Registrant');\r\n Eabi_Ipenelo_Calendar::service()->get('payment')->detectAvailablePaymentMethods();\r\n $paymentMethods = array(\r\n );\r\n $availablePayments = @unserialize(Eabi_Ipenelo_Calendar::get('available_payments'));\r\n if (!is_array($availablePayments)) {\r\n wp_redirect(admin_url('admin.php?page=' . $plugin_page));\r\n exit;\r\n $availablePayments = array();\r\n }\r\n foreach ($availablePayments as $code => $availablePayment) {\r\n $paymentMethods[$code] = $availablePayment['title'];\r\n }\r\n if (isset($_GET['code']) && isset($paymentMethods[$_GET['code']])) {\r\n //echo the form\r\n $form = Eabi_Ipenelo_Calendar::service()->get('payment')->getByCode($_GET['code'], Eabi_Ipenelo_Calendar::service()->get('models/Registrant'));\r\n } else {\r\n //echo the select field.\r\n if (isset($_GET['noheader'])) {\r\n require_once(ABSPATH . 'wp-admin/admin-header.php');\r\n }\r\n echo Eabi_Ipenelo_Calendar::service()->get('payment')->renderSelect($paymentMethods);\r\n return;\r\n }\r\n\r\n//\t\t$form = new Eabi_Ipenelo_Calendar_Payment_Checkmo(new Eabi_Ipenelo_Calendar_Model_Registrant());\r\n\r\n $needsRedirect = $form->save();\r\n if ($needsRedirect) {\r\n wp_redirect(admin_url('admin.php?noheader=true&page=' . $plugin_page));\r\n\r\n exit;\r\n }\r\n\r\n if (isset($_GET['noheader'])) {\r\n require_once(ABSPATH . 'wp-admin/admin-header.php');\r\n }\r\n if (is_object($form)) {\r\n echo $form->renderConfigurationForm();\r\n }\r\n }", "public static function disabled()\r\n {\r\n return self::$_disabled;\r\n }", "public static function getPaymentMethod()\n {\n return self::find()->allPayments();\n }", "public function is_disabled()\n {\n }", "public function get_disabled(){return $this->_disabled; }", "public function filterpaymentmethod(Varien_Event_Observer $observer) {\n $method = $observer->getEvent()->getMethodInstance();\n\n /* get Quote */\n $quote = $observer->getEvent()->getQuote();\n\n $result = $observer->getEvent()->getResult();\n\n /* Disable Your payment method for adminStore */\n if($method->getCode()=='dropshipping' ){\n //Mage::helper('checkout/cart')->getSummaryCount()\n if(count($quote->getAllItems())>5){\n $result->isAvailable = false;\n }\n }\n }", "public function getEnabled(){\n\t\treturn (Mage::helper('nektria')->getConfig('active') && ! is_null(Mage::helper('nektria')->getConfig('apikey')) );\n\t}", "public function getDisableAppEncryptionIfDeviceEncryptionIsEnabled()\n {\n if (array_key_exists(\"disableAppEncryptionIfDeviceEncryptionIsEnabled\", $this->_propDict)) {\n return $this->_propDict[\"disableAppEncryptionIfDeviceEncryptionIsEnabled\"];\n } else {\n return null;\n }\n }", "public function getDisableAppEncryptionIfDeviceEncryptionIsEnabled()\n {\n if (array_key_exists(\"disableAppEncryptionIfDeviceEncryptionIsEnabled\", $this->_propDict)) {\n return $this->_propDict[\"disableAppEncryptionIfDeviceEncryptionIsEnabled\"];\n } else {\n return null;\n }\n }", "public function getEmptyPayPalPayment();", "public function isApiEnabled()\n {\n\n return Mage::getStoreConfig('sms/main_conf/active');\n\n }", "public function getPaymentType()\n {\n return 'Web Money';\n }", "function BPC_getProcessingLink()\n{ //dev or prod token\n $bitpay_checkout_options = get_option('woocommerce_bitpay_checkout_gateway_settings');\n $bitpay_checkout_endpoint = $bitpay_checkout_options['bitpay_checkout_endpoint'];\n switch ($bitpay_checkout_endpoint) {\n case 'test':\n default:\n return 'https://test.bitpay.com/dashboard/settings/edit/order';\n break;\n case 'production':\n return 'https://test.bitpay.com/dashboard/settings/edit/order';\n break;\n }\n}", "public function getPaymentState(): string;", "public function payment_methods()\n {\n return ['code' => 'pickup', 'title' => 'In Store Pickup'];\n }", "private function getActiveBackend()\n {\n $backendManager = new BackendManager();\n $availableBackends = $backendManager->getBackends();\n $activeBackendName = PiwikConfig::getInstance()->DynamicJS['default_backend'];\n $activeBackend = StaticContainer::getContainer()->get($availableBackends[$activeBackendName]);\n // Fallback to piwik backend\n if($activeBackend === null){\n $activeBackend = StaticContainer::getContainer()->get(\"Piwik\\Plugins\\DynamicJS\\Backend\\PiwikBackend\");\n }\n return $activeBackend;\n }", "public function get_payment_method() {\n\t\treturn $this->payment_method;\n\t}", "public function getForBackend()\n {\n return $this->model::enabled()\n ->forArea(Announcement::AREA_BACKEND)\n ->inTimeFrame()\n ->get();\n }", "public function get_supported_payment_methods() {\n\t\treturn array(\n\t\t\tPronamic_WP_Pay_PaymentMethods::IDEAL => Pronamic_WP_Pay_PaymentMethods::IDEAL,\n\t\t);\n\t}", "protected function helperNovalnetPayment()\n {\n return Mage::helper('novalnet_payment');\n }", "public static function isBackend()\n {\n return (bool) self::getProperty('redaxo', false);\n }", "public function getPaymentMethod()\n {\n return $this->payment_method;\n }", "public function getPayPalPayment()\n {\n }", "public function getBackend()\n {\n return $this->_backend;\n }", "public function enablePaymentPlugin() {\n return Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('payment');\n }", "public function getPaymentMethods()\n {\n return $this->payment_methods;\n }", "function is_backend() {\r\n\t\treturn false;\r\n\t}", "public function paymentMethods()\n {\n return $this->inputArgs('paymentMethods', []);\n }", "public function isBackend()\n {\n return $this->get(self::BACKEND);\n }", "public function getMethodPayment()\n {\n return $this->paymentMethod;\n }", "public function getDisabled()\n {\n return $this->disabled;\n }", "public function getDisabled()\n {\n return $this->disabled;\n }", "public function getDisabled()\n {\n return $this->disabled;\n }", "public function getDisabled()\n {\n return $this->disabled;\n }", "public function getDisabled()\n {\n return $this->disabled;\n }", "public function getDisabled()\n {\n return $this->disabled;\n }", "function _webform_form_builder_properties_currency() {\n return array(\n 'options_enabled' => array(\n 'form' => 'webform_currency_form_builder_property_currency_form',\n ),\n );\n}", "public function moduleEnabled(){\n\t\treturn Mage::getStoreConfig('vendors/config/active');\n\t}", "public function getFieldBackend()\n {\n return $this->getCustomField('backend', 'backend');\n }", "function wc_get_account_payment_methods_types()\n {\n }" ]
[ "0.64092743", "0.64092743", "0.64092743", "0.64092743", "0.6401646", "0.636214", "0.6357392", "0.63485616", "0.63485616", "0.62837434", "0.62446743", "0.6215961", "0.6205168", "0.6192287", "0.6186732", "0.61841", "0.61772865", "0.6160663", "0.6117061", "0.61069995", "0.60961914", "0.60812885", "0.60462594", "0.5977289", "0.5975705", "0.5972757", "0.59698236", "0.5967498", "0.59366494", "0.5920131", "0.5905697", "0.5904848", "0.5900982", "0.5886937", "0.5838591", "0.5837774", "0.58357275", "0.5813775", "0.579617", "0.57781875", "0.5769002", "0.5768996", "0.57628465", "0.5754085", "0.5725772", "0.5709841", "0.57079524", "0.5704891", "0.56917757", "0.5687028", "0.56838816", "0.56765425", "0.56749314", "0.566077", "0.5651455", "0.5645381", "0.56326085", "0.5625341", "0.56222814", "0.56222814", "0.55999136", "0.5598447", "0.5597139", "0.5593777", "0.55926776", "0.5582437", "0.5575727", "0.55738497", "0.55738497", "0.55714995", "0.556402", "0.5560962", "0.5557603", "0.55566204", "0.55559415", "0.55532277", "0.5551453", "0.55502707", "0.5544333", "0.5543231", "0.5541716", "0.55416787", "0.5540847", "0.55380034", "0.55352145", "0.553163", "0.5521106", "0.55185413", "0.5518445", "0.55050933", "0.5499916", "0.5499916", "0.5499916", "0.5499916", "0.5499916", "0.5499916", "0.5499573", "0.5496929", "0.54832304", "0.5480865" ]
0.73612344
0
Write html template with the Last Mile Selection
Напишите html-шаблон с выбором Последнего Километра
public function htmlLastMileSelection(){ $template = Mage::app()->getLayout()->createBlock('core/template') ->setTemplate('recs/totals/lastmile.phtml'); return $template->toHtml(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function htmlAdminLastMileSelection($order){\n\t\t$template = Mage::app()->getLayout()->createBlock('core/template')\n\t\t\t->setData('order', $order)\n \t->setTemplate('recs/sales/order/view/lastmile.phtml');\n return $template->toHtml();\n\t}", "private function getLastPage()\n\t{\n\t\tif($this->currentPage != $this->getTotalPages())\n\t\t\treturn \"<li id=\\\"lastPage\\\"><a href=\\\"\". $this->linkTo .\"&p=\". $this->getTotalPages() .\"\\\" title=\\\"Ultima pagina\\\">Fine(\". $this->getTotalPages() .\")</a></li>\";\n\t\telse\n\t\t\treturn \"\";\n\t\t\t//return \"<li id=\\\"lastPage\\\">Fine(\". $this->getTotalPages() .\")</li>\";\n\t}", "private function endGen()\n\t\t{\n\t\t\techo \"</ul>\"; \n\t\t\techo \"</div>\"; \n\t\t}", "function show_last_company()\r\n {\r\n \t$html = '';\r\n $db = $GLOBALS['DB'];\r\n $sql = sprintf('SELECT company, link FROM user order by id desc LIMIT 0,10');\r\n if ($result = $db->query($sql)) {\r\n \t$rows = $result->num_rows;\r\n while($rows) { \r\n $row = $result->fetch_assoc();\r\n $this->id = $uid;\r\n $this->company = $row['company'];\r\n $this->link = $row['link'];\r\n \r\n // save to html file\r\n $url = 'http://www.wanet.cn'.$this->link;\r\n $li = '<li class=\"last\"><a href=\"'.$url.'\">'.$this->company.'</a></li>';\r\n $html = $html.$li;\r\n $rows--;\r\n }\r\n $result->close();\r\n }\r\n return $html;\r\n }", "function task_manager_logsshow_wrapper( $last5 ) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<div class='tableborder'>\n <div class='tableheaderalt'>:Журнал выполненных задач</div>\n <table cellpadding='0' cellspacing='0' width='100%'>\n <tr>\n <td class='tablesubheader'>Задача</td>\n <td class='tablesubheader'>Время запуска</td>\n <td class='tablesubheader'>Информация</td>\n </tr>\n $last5\n </table>\n</div>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "public function lastmilegridAction() {\r\n $this->_initAction();\r\n $this->getResponse()->setBody(\r\n $this->getLayout()->createBlock('lastmile/adminhtml_pincode_edit_tab_lastmile')->toHtml()\r\n );\r\n }", "function push($currDate, $header, $entries, &$mpdf)\n{\n $html = \"\n<div class='row'>\n <div class='columns small-5'>\n <p class='float-left'>Gymnasium Lohmar - Nachhilfe</p>\n </div>\n \n <div class='columns small-5 float-right'>\n <p class='right'>{$currDate}</p>\n </div>\n \n</div>\n\n<div class='row'>\n <div class='columns small-12'>\n <h3>{$header}</h3>\n </div>\n \n</div>\n<div class='row'>\n {$entries}\n</div>\";\n //var_dump($html);\n $mpdf->WriteHTML($html, 2);\n}", "public function endIterate()\n {\n return \"{{% } }}\";\n }", "public function getLastMileSelectedPrice(){\n\t\tif ( self::getLastMileSelected() ){\n\t\t\t$selectedPrice = Mage::helper('core')->jsonDecode(self::getLastSelection());\n\t\t\treturn Mage::helper('core')->currency( $selectedPrice['total_price'] );\n\t\t}else{\n\t\t\treturn '';\n\t\t}\n\t}", "function finish() {\r\n\t\t$this->title();\r\n\t\techo $this->template;\r\n\t}", "public function displayHtmlEnd();", "function CreateHtmlSkeletonBottom() {\r\n echo \"</body>\";\r\n echo \"</html>\";\r\n }", "function render_last($anchor=true)\n {\n global $PHP_SELF;\n \n if (!$this->db->pageExecuteCountRows) return;\n\n if ($anchor)\n {\n ?>\n <a href=\"<?php echo $PHP_SELF,'?',$this->getString,$this->id,'_next_page=',$this->rs->LastPageNo() ?>\"><?php echo $this->last;?></a> &nbsp; \n <?php\n } \n else \n {\n print \"$this->last &nbsp; \";\n }\n }", "public function last()\n\t{\n\t\tif($this->current + $this->links < $this->total)\n\t\t{\n\t\t\treturn HTML::tag('li', HTML::link($this->url($this->total), _('Last &gt;')), array('class' => 'last'));\n\t\t}\n\t}", "public function actionLastDigitized() \n\t{\n\t\t$this->model = new Art();\n\t\t$this->render('lastDigitized');\n\t}", "function last(){\n\t\t// Zeiger verschieben\n\t\t$this->pointerToCurrent = count($this->imageArray)-1;\n\t\t$this->save();\n\t\t\n\t\t// Das Bild ausgeben\n\t\t//$this->show();\n\t\t$temp = $GLOBALS['CunddController']->init(\"CunddGalerie::printDetailOfSelf\");\n\t}", "protected function generatePageFooter()\n {\n // to do: output common end of HTML code\n }", "function twig_last(Twig_Environment $env, $item) {}", "public function lastPageText();", "public function last() {\r\n\t\t\t$debug = debug_backtrace();\r\n\t\t\t$i = 1;\r\n\t\t\techo '<pre style=\"background:#fef;border:solid 1px #fcf;line-height:130%;margin:5px;font:12px \\'courier new\\';padding:5px;text-align:left;color:#808;\">',\r\n\t\t\t'<h2 style=\"border-bottom:solid 2px #fcf;color:#f0f;font:bold 16px \\'courier new\\';margin:0 0 5px;padding:0;\">MEMCACHED #'.self::$COUNT.': '.str_replace(BASE_PATH,'/',$debug[$i]['file']).'\" on line \"'.$debug[$i]['line'].'\" - '.Debug::timer().'</h2>',\r\n\t\t\ttrim(str_replace(array('<','>'),array('&lt;','&gt;'),preg_replace('/([\\t]+)/is','',self::$LAST))),';',\r\n\t\t\t'</pre>';\r\n\t\t}", "protected function emitSectionEnd(): string {\n\t\treturn \"</template>\";\n\t}", "function render_last($anchor=true)\n\t{\n\tglobal $PHP_SELF;\n\n\t\tif (!$this->db->pageExecuteCountRows) return;\n\n\t\tif ($anchor) {\n\t\t?>\n\t\t\t<a href=\"<?php echo $PHP_SELF,'?',$this->id,'_next_page=',$this->rs->LastPageNo() ?><?php echo $this->linkfilter; ?>\"><?php echo $this->last;?></a> &nbsp;\n\t\t<?php\n\t\t} else {\n\t\t\tprint \"$this->last &nbsp; \";\n\t\t}\n\t}", "function task_manager_logsshow_wrapper( $last5 ) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<div class='tableborder'>\n <div class='tableheaderalt'>任务管理日志</div>\n <table cellpadding='0' cellspacing='0' width='100%'>\n <tr>\n <td class='tablesubheader'>任务执行</td>\n <td class='tablesubheader'>执行日期</td>\n <td class='tablesubheader'>日志信息</td>\n </tr>\n $last5\n </table>\n</div>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "public function getLastMileSelected(){\n\t \t$shipping_method = self::getShippingMethod();\n\n\t //Switch with method type\n\t \tif ($shipping_method == 'nektria_recs_lastmile'){\n\t \t\treturn TRUE;\n\t \t}else{\n\t \t\treturn FALSE;\n\t \t}\n\t}", "function lastLink(){\n\t\tif($this->pointerToCurrent < count($this->imageArray)-1){\n\t\t\t// Den Link erstellen\n\t\t\t$wert['aufruf'] = 'Cundd'.ucfirst($this->classPrefix).'::last';\n\t\t\t$wert['title'] = CunddLang::get(\"CunddGalerie_lastLinkTitle\");\n\t\t\t$wert['classPrefix'] = $this->classPrefix;\n\t\t\t\n\t\t\t// Link ausgeben\n\t\t\techo CunddTemplate::inhalte_einrichten($wert, 4, $this->classPrefix.'_show_last_'.$this->classPrefix.'_link', 'output');\n\t\t}\n\t}", "function megatron_pager($variables) {\n $output = \"\";\n $tags = $variables['tags'];\n $element = $variables['element'];\n $parameters = $variables['parameters'];\n $quantity = $variables['quantity'];\n global $pager_page_array, $pager_total;\n\n // Calculate various markers within this pager piece:\n // Middle is used to \"center\" pages around the current page.\n $pager_middle = ceil($quantity / 2);\n // current is the page we are currently paged to\n $pager_current = $pager_page_array[$element] + 1;\n // first is the first page listed by this pager piece (re quantity)\n $pager_first = $pager_current - $pager_middle + 1;\n // last is the last page listed by this pager piece (re quantity)\n $pager_last = $pager_current + $quantity - $pager_middle;\n // max is the maximum page number\n $pager_max = $pager_total[$element];\n // End of marker calculations.\n\n // Prepare for generation loop.\n $i = $pager_first;\n if ($pager_last > $pager_max) {\n // Adjust \"center\" if at end of query.\n $i = $i + ($pager_max - $pager_last);\n $pager_last = $pager_max;\n }\n if ($i <= 0) {\n // Adjust \"center\" if at start of query.\n $pager_last = $pager_last + (1 - $i);\n $i = 1;\n }\n\n // End of generation loop preparation.\n $li_first = theme('pager_first', array('text' => (isset($tags[0]) ? $tags[0] : t('first')), 'element' => $element, 'parameters' => $parameters));\n $li_previous = theme('pager_previous', array('text' => (isset($tags[1]) ? $tags[1] : t('previous')), 'element' => $element, 'interval' => 1, 'parameters' => $parameters));\n $li_next = theme('pager_next', array('text' => (isset($tags[3]) ? $tags[3] : t('next')), 'element' => $element, 'interval' => 1, 'parameters' => $parameters));\n $li_last = theme('pager_last', array('text' => (isset($tags[4]) ? $tags[4] : t('last')), 'element' => $element, 'parameters' => $parameters));\n\n if ($pager_total[$element] > 1) {\n /*\n if ($li_first) {\n $items[] = array(\n 'class' => array('pager-first'),\n 'data' => $li_first,\n );\n }\n */\n if ($li_previous) {\n $items[] = array(\n 'class' => array('prev'),\n 'data' => $li_previous,\n );\n }\n\n // When there is more than one page, create the pager list.\n if ($i != $pager_max) {\n if ($i > 1) {\n $items[] = array(\n 'class' => array('pager-ellipsis'),\n 'data' => '…',\n );\n }\n // Now generate the actual pager piece.\n for (; $i <= $pager_last && $i <= $pager_max; $i++) {\n if ($i < $pager_current) {\n $items[] = array(\n // 'class' => array('pager-item'),\n 'data' => theme('pager_previous', array('text' => $i, 'element' => $element, 'interval' => ($pager_current - $i), 'parameters' => $parameters)),\n );\n }\n if ($i == $pager_current) {\n $items[] = array(\n 'class' => array('active'), // Add the active class\n 'data' => l($i, '#', array('fragment' => '', 'external' => TRUE)),\n );\n }\n if ($i > $pager_current) {\n $items[] = array(\n //'class' => array('pager-item'),\n 'data' => theme('pager_next', array('text' => $i, 'element' => $element, 'interval' => ($i - $pager_current), 'parameters' => $parameters)),\n );\n }\n }\n if ($i < $pager_max) {\n $items[] = array(\n 'class' => array('pager-ellipsis'),\n 'data' => '…',\n );\n }\n }\n // End generation.\n if ($li_next) {\n $items[] = array(\n 'class' => array('next'),\n 'data' => $li_next,\n );\n }\n /*\n if ($li_last) {\n $items[] = array(\n 'class' => array('pager-last'),\n 'data' => $li_last,\n );\n }\n */\n\n return '<div class=\"pagination\">'. theme('item_list', array(\n 'items' => $items,\n //'attributes' => array('class' => array('pager')),\n )) . '</div>';\n }\n\n return $output;\n}", "public function set_component_end() {\n\n if ( $this->template == \"four-up\" ) {\n $compenent_four_up_end = \"<div class=\\\"row\\\">\";\n $compenent_four_up_end .= \"<div role=\\\"main\\\" class=\\\"content\\\">\";\n }\n\n $component_end = \"</div> <!-- end image-block -->\";\n $component_end .= \"</div> <!-- end row -->\";\n\n echo $component_end;\n\n if ( $this->template == \"four-up\" ) {\n echo $compenent_four_up_end;\n\n }\n }", "public function set_component_end() {\n\n if ( $this->template == \"four-up\" ) {\n $compenent_four_up_end = \"<div class=\\\"row\\\">\";\n $compenent_four_up_end .= \"<div role=\\\"main\\\" class=\\\"content\\\">\";\n }\n\n $component_end = \"</div> <!-- end image-block -->\";\n $component_end .= \"</div> <!-- end row -->\";\n\n echo $component_end;\n\n if ( $this->template == \"four-up\" ) {\n echo $compenent_four_up_end;\n\n }\n }", "function end_el(&$output, $item, $depth=0, $args=array()) {\n //if ($this->display_current) $output .= \"</div>\\n\";\n //$this->display_current = false;\n }", "function kcw_movies_ui_GetListEndHTML() {\n return \" </ul>\n </center>\n <div class='kcw-movies-pagination-wrapper'>\n <ul class='kcw-movies-pagination pagination-bottom'></ul>\n </div>\n </div>\n <div class='kcw-movies-playbutton'><div class='kcw-movies-triangle'></div></div>\";\n}", "function last($last = 'last >>', $options = array()) {\n\t\t$options = array_merge(\n\t\t\tarray(\n\t\t\t\t'tag' => 'span',\n\t\t\t\t'before'=> null,\n\t\t\t\t'model' => $this->defaultModel(),\n\t\t\t\t'separator' => ' | ',\n\t\t\t),\n\t\t(array)$options);\n\n\t\t$params = array_merge(array('page'=> 1), (array)$this->params($options['model']));\n\t\tunset($options['model']);\n\n\t\tif ($params['pageCount'] <= 1) {\n\t\t\treturn false;\n\t\t}\n\n\t\textract($options);\n\t\tunset($options['tag'], $options['before'], $options['model'], $options['separator']);\n\n\t\t$out = '';\n\t\t$lower = $params['pageCount'] - $last + 1;\n\n\t\tif (is_int($last) && $params['page'] < $lower) {\n\t\t\tif ($before === null) {\n\t\t\t\t$before = '...';\n\t\t\t}\n\t\t\tfor ($i = $lower; $i <= $params['pageCount']; $i++) {\n\t\t\t\t$out .= $this->Html->tag($tag, $this->link($i, array('page' => $i), $options));\n\t\t\t\tif ($i != $params['pageCount']) {\n\t\t\t\t\t$out .= $separator;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$out = $before . $out;\n\t\t} elseif ($params['page'] < $params['pageCount']) {\n\t\t\t$out = $before . $this->Html->tag(\n\t\t\t\t$tag, $this->link($last, array('page' => $params['pageCount']), $options\n\t\t\t));\n\t\t}\n\t\treturn $out;\n\t}", "function win_body_close(){\n global $config, $prefix;\n print \"</td>\\n\"; \t\n \tprint \" <td width=\\\"1\\\" background=\\\"\";\n \t$this->path($prefix . $config->theme_config['box']['img']['middle']['right']);\n \tprint \"\\\"><img alt=\\\"\\\" src=\\\"\";\n// \t$this->img(\"_img/_mask.gif\");\n \t$this->path($prefix . $config->theme_config['box']['img']['middle']['right']);\n \tprint \"\\\" ></td>\\n\";\n \tprint \" </tr>\";\n \tprint \" </table>\";\n\n \treturn;\n }", "function task_manager_last5_row( $data ) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<tr>\n <td width='25%' class='tablerow1'><strong>{$data['log_title']}</strong></td>\n <td width='15%' class='tablerow2'>{$data['log_date']}</td>\n <td width='45%' class='tablerow2'>{$data['log_desc']}</td>\n</tr>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "function task_manager_last5_row( $data ) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<tr>\n <td width='25%' class='tablerow1'><strong>{$data['log_title']}</strong></td>\n <td width='15%' class='tablerow2'>{$data['log_date']}</td>\n <td width='45%' class='tablerow2'>{$data['log_desc']}</td>\n</tr>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "function mediz_footer() {\n\n\t\t$templates = new MEDIZ_Template_Loader;\n\n\t\tob_start();\n\t\t$templates->get_template_part( 'mediz_footer', 'mediz_footer' );\n\t\treturn ob_get_clean();\n\n\t}", "function getJSStatisticsFooterHtmlCodeTpl() {\r\n\t\t$JSTemplate = new js_JSTemplate();\r\n\r\n\t\t$html = '\r\n\t\t</td>\r\n\t\t</tr>' . \"\\n\"\r\n\t\t. '</table>' . \"\\n\"\r\n\t\t;\r\n\r\n\t\t$html .= $JSTemplate->generateEndOfAdminForm();\r\n\t\t//$html .= '</div><!-- needed by j1.0.15 -->';//can not be used for lists! (in FF mosPageNav generate footer that is left justified instead of center)\r\n\r\n\t\treturn $html;\r\n\t}", "public function show_last_maptag()\n\t{\n\t\t\n $insert_id = $this->input->post('insert_id');\n \n $query = $this->db->get_where('custom_track', array('id' => $insert_id) );\n \n foreach ($query->result_array() as $maptag_name) {\n\n \techo json_encode($maptag_name);\n \t\n }\n \t\t\n\t\texit;\n\t}", "public function generate_screen() {\n\t\t\t$bootstrap = new HTMLWriter();\n\t\t\t$content = $this->generate_salesusagetable();\n\t\t\t\n\t\t\tforeach (array_keys($this->json['data']['24month']) as $warehouse) {\n\t\t\t\tif ($warehouse != 'zz') {\n\t\t\t\t\t$content .= $this->generate_warehousediv($warehouse);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$content .= $this->generate_warehousediv('zz');\n\t\t\treturn $content;\n\t\t}", "public function WriteSecondPart()\n {\n echo $this->Link($this->PageCount, $this->LastPageText, $this->LastCssClass);\n }", "public function lastPage();", "function page_end() {\r\n\t\t$this->tag = \"</BODY></HTML>\";\r\n\t\treturn $this->tag;\r\n\t}", "public function htmlEnd(){\n\t\t\n\t\t$html = \"</body>\\n\";\n\t\t$html .= \"</html>\\n\";\n\t\treturn $html;\n\t}", "public function getLastPage()\n {\n return 'page=' . Contract::paginate(CrmHelper::PER_PAGE)->lastPage() ;\n }", "function front_pager_last($variables) {\n $text = $variables['text'];\n $element = $variables['element'];\n $parameters = $variables['parameters'];\n global $pager_page_array, $pager_total;\n $output = '';\n\n // If we are anywhere but the last page\n if ($pager_page_array[$element] < ($pager_total[$element] - 1)) {\n $output = theme('pager_link', array('text' => $text, 'page_new' => pager_load_array($pager_total[$element] - 1, $element, $pager_page_array), 'element' => $element, 'parameters' => $parameters));\n }\n\n return $output;\n}", "function makePageEnd(){\n $pageEndContent = <<<PAGEEND\n </html>\nPAGEEND;\n\n $pageEndContent .=\"\\n\";\n return $pageEndContent;\n}", "function getOutput()\n\t{\n\t\tglobal $ilBench, $tpl;\n\n\t\t$ilBench->start(\"Explorer\", \"getOutput\");\n\n\t\t$this->format_options[0][\"tab\"] = array();\n\n\t\t$depth = $this->tree->getMaximumDepth();\n\n\t\tfor ($i=0;$i<$depth;++$i)\n\t\t{\n\t\t\t$this->createLines($i);\n\t\t}\n\t\t\n\t\t// set global body class\n\t\t$tpl->setBodyClass(\"il_Explorer\");\n\t\t\n\t\t$tpl_tree = new ilTemplate(\"tpl.tree_form.html\", true, true, \"Modules/LearningModule\");\n\t\t\n\t\t$cur_depth = -1;\n\t\tforeach ($this->format_options as $key => $options)\n\t\t{\n//echo \"-\".$options[\"depth\"].\"-\";\n\t\t\tif (!$options[\"visible\"])\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// end tags\n\t\t\t$this->handleListEndTags($tpl_tree, $cur_depth, $options[\"depth\"]);\n\t\t\t\n\t\t\t// start tags\n\t\t\t$this->handleListStartTags($tpl_tree, $cur_depth, $options[\"depth\"]);\n\t\t\t\n\t\t\t$cur_depth = $options[\"depth\"];\n\t\t\t\n\t\t\tif ($options[\"visible\"] and $key != 0)\n\t\t\t{\n\t\t\t\t$this->formatObject($tpl_tree, $options[\"child\"],$options,$options['obj_id']);\n\t\t\t}\n\t\t\tif ($key == 0)\n\t\t\t{\n\t\t\t\t$this->formatHeader($tpl_tree, $options[\"child\"],$options);\n\t\t\t}\n\t\t\t\t\t\t\n\t\t}\n\t\t\n\t\t$this->handleListEndTags($tpl_tree, $cur_depth, -1);\n\t\t\n\t\t$ilBench->stop(\"Explorer\", \"getOutput\");\n\t\t\n\t\treturn $tpl_tree->get();\n\t}", "public function renderEndTag($writer)\r\n\t{\r\n\t\t$writer->write($this->getContentListItem($this->contentId,$this->maxIntroLength));\r\n\t\tparent::renderEndTag($writer);\r\n\t}", "function cp_print_endPage(){\r\n echo '</main>',\r\n '<footer>',\r\n '<p> &copy; Licence Informatique - Janvier 2020 - Tous droits réservés</p>',\r\n '</footer>',\r\n '</body>',\r\n '</html>'; \r\n}", "function gazebo_ubc_clf_visual_identity_footer($variables) {\n\n $output = '<div id=\"UbcBottomInfoWrapper\">\n <div id=\"UbcBottomInfo\" class=\"UbcContainer\">\n <div id=\"UbcBottomLeft\" >\n <p>';\n $image = array(\n 'path' => base_path() . path_to_theme() . '/_ubc_clf/img/footer/logo.gif', \n 'alt' => t('A place of mind, The University of British Columbia'),\n 'title' => t('A place of mind, The University of British Columbia'),\n );\n \n $output .= '<a href=\"http://www.ubc.ca\">' . theme('image', $image) . '</a>'; \n $output .= '</p>\n </div><!-- End UbcBottomLeft -->\n <div id=\"UbcBottomCenter\">';\n $output .= variable_get('clf_umbrella_hcard');\n $output .= '</div><!-- End UbcBottomCenter -->\n <div id=\"UbcBottomRight\">';\n $output .= variable_get('clf_unit_hcard'); \n $output .= '</div><!-- End UbcBottomRight -->\n </div><!-- End UbcBottomInfo UbcContainer -->\n </div><!-- End UbcBottomInfoWrapper -->';\n \n return $output;\n}", "function gen_large_goal($row)\r\n{\r\n\techo '<div class=\"stream-goal\">';\r\n\t\techo '<a href=\"goal.php?id='.$row[8].'\"><h2>'.html_entity_decode($row[0]).\"</h2></a>\";\r\n\t\techo '<img src=\"'.$row[4].'\">';\r\n\t\techo '<div class=\"small-space\"></div>';\r\n\techo '</div>';\r\n\techo '<div class=\"space\"></div>';\r\n}", "public function generate()\n\t{\n\n\t\tif(TL_MODE == 'BE')\n\t\t{\n\t\t\t$this->Template = new BackendTemplate('be_wildcard');\n\t\t\t$this->Template->wildcard = '### CE Slider jQuery '.sprintf($GLOBALS['TL_LANG']['MSC']['ce_slider_jquery_endElem']);\n\n\t\t\treturn $this->Template->parse();\n\t\t}\n\t\treturn parent::generate();\n\t}", "function render_template_end($model) {\n __render_template($model, 'site_footer.php');\n}", "private function _htmlEnd ()\n {\n $htmlOut = \"</html>\";\n\n return $htmlOut;\n }", "public function renderTemplate(){\n\n $value = $this->getValue();\n $iteration = 1;\n\n if( !empty( $value ) ){\n $iteration = count( $value );\n }\n\n //make a clonable item, for javascript:\n $html = '<script type=\"text/template\" id=\"taxonomy_select_item\">';\n $html .= $this->makeItem( '<%= iteration %>' );\n $html .= '</script>';\n $html .= '<script type=\"text/javascript\">';\n $html .= \"var Taxonomies = '\".json_encode( $this->taxonomies ).\"';\";\n $html .= '</script>';\n\n return $html;\n }", "static function displayLastNews(){\n $criterias = \"ORDER BY creationDate DESC LIMIT \".NB_NEWS_TO_DISPLAY;\n $themes = ThemeManager::init()->getAll($criterias);\n $levels = LevelManager::init()->getAll(\"WHERE levelStatus='\"\n .LEVEL_STATUS::ACCEPTED.\"' $criterias\");\n $authors = UserManager::init()->getPseudos();\n \n // extract the 5 recent addons (theme or level)\n $merge = array_merge($themes, $levels);\n usort($merge, array(\"Addon\", \"compareCreationDate\")); \n $addons = array_slice(array_reverse($merge), 0, NB_NEWS_TO_DISPLAY);\n \n // formate the news\n foreach($addons as $addon){\n $news = $addon->formateAsNews();\n $author = $authors[ $addon->getIdCreator() ];\n $news->setAuthor($author);\n echo $news->getMessage();\n }\n }", "function themefooter() {\r\n global $index, $foot1, $foot2, $foot3, $foot4;\r\n if ($index == 1) {\r\n\t$tmpl_file = \"themes/3D-Fantasy/center_right.html\";\r\n\t$thefile = implode(\"\", file($tmpl_file));\r\n\t$thefile = addslashes($thefile);\r\n\t$thefile = \"\\$r_file=\\\"\".$thefile.\"\\\";\";\r\n\teval($thefile);\r\n\tprint $r_file;\r\n\tblocks(right);\r\n }\r\n $footer_message = \"$foot1<br>$foot2<br>$foot3<br>$foot4\";\r\n $tmpl_file = \"themes/3D-Fantasy/footer.html\";\r\n $thefile = implode(\"\", file($tmpl_file));\r\n $thefile = addslashes($thefile);\r\n $thefile = \"\\$r_file=\\\"\".$thefile.\"\\\";\";\r\n eval($thefile);\r\n print $r_file;\r\n}", "public function actionLargeformat()\r\n {\r\n $path = \\yii::$app->request->baseUrl . \"images/printing/large_format/\";\r\n $files = FileHelper::findFiles($path, ['recursive' => FALSE]);\r\n //print_r($files); exit;\r\n \r\n return $this->render('large_format', ['files' => $files]);\r\n }", "public function end() {\r\n\r\n $this->current = 0;\r\n\r\n // remove the suffix which was set by self::start()\r\n $suffixes = \\Zend_Registry::get(\"pimcore_tag_block_current\");\r\n array_pop($suffixes);\r\n \\Zend_Registry::set(\"pimcore_tag_block_current\", $suffixes);\r\n\r\n $this->outputEditmode(\"</div>\");\r\n }", "function template_manual_below()\n{\n\tglobal $context, $settings, $options, $txt, $scripturl;\n\n\techo '\n\t\t\t\t</div>\n\t\t\t\t<span class=\"botslice\"><span></span></span>\n\t\t\t</div>\n\t\t</div>';\n}", "public function WriteSecondPart()\n {\n for ($i = max($this->TargetedPage + $this->ProtectedDistance + 1, $this->PageCount - $this->BeginEndPagesCount + 1);\n $i > $this->TargetedPage && $i <= $this->PageCount; \n $i++ )\n echo $this->Link($i, $i, $this->LinkCssClass);\n \n }", "function render_set_end() {\n\t\techo '</tbody>', \"\\n\";\n\techo '</table>', \"\\n\";\n\treturn true;\n}", "public function additionsBottom( )\n\t\t{\n\t\t\tif( $this->objectFormat == '<object id=\"{comment}\" model=\"{model}\" posX=\"{x}\" posY=\"{y}\" posZ=\"{z}\" rotX=\"{rx}\" rotY=\"{ry}\" rotZ=\"{rz}\" dimension=\"{vw}\" interior=\"{int}\" />' ||\n\t\t\t\t$this->vehicleFormat == '<vehicle model=\"{model}\" posX=\"{x}\" posY=\"{y}\" posZ=\"{z}\" rotX=\"{rx}\" rotY=\"{ry}\" rotZ=\"{r}\" color=\"{c1},{c2}\" />' ||\n\t\t\t\t$this->objectFormat == '<object name=\"{comment}\"><position>{x} {y} {z}</position><rotation>{rx} {ry} {rz}</rotation><model>{model}</model></object>' ||\n\t\t\t\t$this->vehicleFormat == '<spawnpoint name=\"{comment}\"><vehicle>{model}</vehicle><position>{x} {y} {z}</position><rotation>{r}</rotation></spawnpoint>' )\n\t\t\t{\n\t\t\t\treturn '</map>';\n\t\t\t}\n\t\t\tif( $this->convertOptions[ 'ADD_TO_SAMP_SCRIPT' ] == 'Gamemode' )\n\t\t\t{\n\t\t\t\treturn @file_get_contents( 'http://www.convertffs.com/files/gamemode_bottom.txt' );\n\t\t\t}\n\t\t\tif( $this->convertOptions[ 'ADD_TO_SAMP_SCRIPT' ] == 'Filterscript' )\n\t\t\t{\n\t\t\t\treturn @file_get_contents( 'http://www.convertffs.com/files/filterscript_bottom.txt' );\n\t\t\t}\n\t\t\treturn '';\n\t\t}", "public function WriteSecondPart()\n {\n for ($i = $this->TargetedPage + 1; \n $i <= min($this->TargetedPage + $this->NeighbourPagesCount, $this->PageCount); \n $i++ )\n echo $this->Link($i, $i, $this->LinkCssClass);\n \n if (min($this->TargetedPage + $this->NeighbourPagesCount, $this->PageCount) != $this->PageCount)\n echo $this->MorePagesSeparator.\" \";\n echo $this->Separator.\" \";\n\n }", "protected static function putBlocksEnd()\n {\n echo '</div>' . \"\\n\";\n }", "public function iconbox_tail() {\n?>\n\t</div>\n</div>\n\t\t<?php\n\t}", "public function getLastPage();", "public function showLatestGenerated($template);", "function makeFooter() {\n\t$t = new Template();\n\t$t->setFile(\"tplfile\", $this->libjsdir . \"layersmenu-footer.ijs\");\n\t$t->setVar(array(\n\t\t\"packageName\"\t=> $this->_packageName,\n\t\t\"version\"\t=> $this->version,\n\t\t\"copyright\"\t=> $this->copyright,\n\t\t\"author\"\t=> $this->author,\n\t\t\"footer\"\t=> $this->footer\n\n\t));\n\t$this->footer = $t->parse(\"out\", \"tplfile\");\n\treturn $this->footer;\n}", "function DisplayMileBasedSplits()\n{\n global $secsPerMile;\n global $totalMiles;\n global $totalSeconds;\n global $distance;\n \n echo \"<table class=\\\"myTable\\\">\";\n echo \"<th>Mile</th><th>Split</th>\";\n \n $i = 1;\n while ($i < $totalMiles) // $totalMiles will never be a whole number\n {\n $secondsSplit = $i * $secsPerMile;\n $timeFormatted = FormatTime($secondsSplit);\n echo \"<tr><td>$i</td><td>$timeFormatted</td></tr>\";\n $i++;\n }\n $i--;\n if ($i <= $totalMiles)\n {\n $timeFormatted = FormatTime($totalSeconds);\n $displayDistance = DisplayableDistanceValue($distance);\n $displayDistance = round($distance * MILE_PER_KM, 1);\n echo \"<tr><td>$displayDistance</td><td>$timeFormatted</td></tr>\";\n }\n echo \"</table>\";\n}", "protected function endSlide() {\n\n return '</div></div></div>';\n }", "function nakedfooter() {\n return '</td></tr></table> </form></body></html>';\n }", "public function menuAction($limit)\n {\n /** @var EntityManager $entityManager */\n $entityManager = $this->getDoctrine()->getManager();\n\n $list = $entityManager\n ->getRepository('AppMainBundle:Post')\n ->findBy([], ['created' => 'DESC'], $limit, 0);\n\n return $this->render('AppFrontBundle:Core:last-post.html.twig',\n [\n 'list' => $list\n ]\n );\n\n\n }", "function makeFooter() {\n\n\t$t = new Template();\n\n\t$t->setFile(\"tplfile\", $this->libjsdir . \"layersmenu-footer.ijs\");\n\n\t$t->setVar(array(\n\n\t\t\"packageName\"\t=> $this->_packageName,\n\n\t\t\"version\"\t=> $this->version,\n\n\t\t\"copyright\"\t=> $this->copyright,\n\n\t\t\"author\"\t=> $this->author,\n\n\t\t\"footer\"\t=> $this->footer\n\n\t\t\n\n\t));\n\n\t$this->footer = $t->parse(\"out\", \"tplfile\");\n\n\treturn $this->footer;\n\n}", "public function end($options=array()){\n /**\n * Finaliza o top do template da tabela\n */\n //Verifica se foi requisitado um template fora do padrao\n $templateName = (isset($options['template']))?$options['template']:'index-table-footer';\n\n //Carrega o template do elemento\n $this->bottomTemplate = $this->AppUtils->loadTemplate($templateName);\n\n //Carrega os valores pdroes do input\n $defaults = array(\n 'end_form' => $this->AppForm->end($options),\n 'qtRows' => count($this->rows),\n 'labelLeft' => date('d/m/Y - H:i:s'),\n 'labelRight' => 'Quantidade listada aqui'\n );\n $vet = array_merge($defaults, $options);\n\n //Altera as chaves do array para o padrao de variaveis do template\n $values = $this->AppUtils->key2var($vet);\n\n //Carrega as variaveis do template com os valores passados por parametro\n $this->bottomTemplate = str_replace(array_keys($values), $values, $this->bottomTemplate);\n\n //Retona as tags HTML geradas\n return $this->bottomTemplate;\n }", "public function createTile()\n {\n return '\n <div class=\"albumTileDiv commonText\">\n <div class=\"albumTile itemTile\" onclick=\"javascript: show_overlay_'.$this->gphotoID.'()\">\n <div class=\"overlayDiv\">\n <div class=\"albumThumbnail\">\n <img src=\"'.$this->thumbnail[0]->getURL().'\">\n </div>\n <div class=\"albumCaption\">'.$this->title.'</div>\n </div>\n </div>\n <form method=\\'post\\' action=\\'\\' name=\\'show_album_'.$this->gphotoID.'\\'>\n <input type=\\'hidden\\' name=\\'album_id\\' value=\\''.$this->gphotoID.'\\' />\n </form>\n </div>';\n }", "function printCloseHTML () {\n\n printf(\"</table>\");\n printf(\"</div>\");\n printf(\"</body>\");\n printf(\"</html>\");\n\n}", "function generate_muestrario_item_view($cat)\n{\n\t$output = '';\n\t$presetname = 'muestrario_miniatura';\n\t$res = db_query('SELECT * FROM {muestitem} WHERE bid = '.$cat);\n\t$flag = 0;\n\twhile($row = db_fetch_array($res))\n\t{\n\t\t//determinamos si es el segundo elemento para agregar la clase item-middle\n\t\tif($flag == 1)\n\t\t{\n\t\t\t$intclass = ' item-middle';\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$intclass = '';\n\t\t}\n\t\t\n\t\t\n\t\t$output .= '<div class=\"muest-item'.$intclass.'\">';\n\t\t//generamos la url de la imagen dependiente de imagecache\n\t\t$output .= '<a href=\"'.$row['url'].'\" class=\"m-img\" target=\"_blank\"><img src=\"'.base_path().imagecache_create_path($presetname,_get_muestrario_filepath($row['cid'])).'\" /></a>';\n\t\t$output .= '<a href=\"'.$row['url'].'\" class=\"m-link\" target=\"_blank\">ver '.$row['nombre'].'</a>';\n\t\t$output .= '</div>';\n\t\t\n\t\t\n\t\t//establecemos el contador para identificar el elemento del centro\n\t\t\n\t\tif($flag >= 2)\n\t\t{\n\t\t\t$flag = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$flag++;\n\t\t}\n\t}\n\treturn $output;\n}", "public function selectPageMax();", "public function lastAction($count)\n {\n // @todo здесь нужно будет добавить ограничение\n $news = $this->getDoctrine()->getEntityManager()\n ->getRepository('StfalconNewsBundle:News')->getLastNews($count);\n\n return $this->render('StfalconNewsBundle:News:last.html.twig', array('news' => $news));\n }", "public function write() {\n\n echo $this->renderPage('preview', true );\n\n }", "function sambatech_chamado_footer($pageid, $i){\r\n\t $pagina = get_post($pageid);\r\n\t $html = '';\r\n\t $html = $html . '<div id=\"footer-copyright\" >';\r\n\t $html = $html . ' <div class=\"container pageWidth\">';\r\n\t $html = $html . ' <div class=\"row\">';\r\n\t $html = $html . ' <div id=\"copyright-controller\" class=\"col-md-4\">';\r\n\t $html = $html . '<span class=\"list-inline copyright\">Copyright &copy; Samba Tech e Ciclos.Todos os direitos reservados'. '</span>';\r\n\t $html = $html . '</div>';\r\n\t $html = $html . '<div id=\"copyright-controller-detail\" class=\"col-md-4\">';\r\n\t $html = $html . '<ul class=\"list-inline quicklinks\">';\r\n\t $html = $html . '<li>Powered by <img id=\"image-logo\" src=\"'.get_template_directory_uri().'/images/imagemfooter.png\"</img>';\r\n\t $html = $html . '</li>';\r\n\t $html = $html . '</ul>';\r\n\t $html = $html . '</div>';\r\n\t $html = $html . '</div>';\r\n\t $html = $html . '</div>';\r\n\t $html = $html . '</div>';\r\n\t return $html;\r\n}", "public abstract function last_error_as_html ();", "public static function end() {\n\t\t\techo \"\n\t\t\t</div>\n\t\t\t<div class=\\\"vertical-centerer\\\"></div>\n\t\t\t<div class=\\\"footer\\\">\n\t\t\t\t<span>© \" . date(\"Y\") . \" Manuel Sollberger</span>\n\t\t\t\t<span>・</span>\n\t\t\t\t<a href=\\\"privacy.php\\\">Datenschutz</a>\n\t\t\t</div>\n\t\t</div>\n\t</body>\n</html>\";\n\t\t}", "public function get_template_bottom()\n {\n return \"content/bottom/content/object_table_list.tpl\";\n }", "function form_smiles(){\r\n\r\n\tglobal $bName, $db;\r\n\r\n\t//TODO improve this so that it works with pages not needing this check.\r\n\tif ($bName['Smiles'] == 0){\r\n\t\t$smile = '';\r\n\t}else{\r\n\t\t$smile = '';\r\n\t\t$x = 0;\r\n\t\t$db->SQL = \"SELECT DISTINCT img_name, code FROM ebb_smiles limit 30\";\r\n\t\t$smiles = $db->query();\r\n\r\n\t\twhile($row = mysql_fetch_assoc($smiles)){\r\n\t\t\tif (($x % 30) == 0) {\r\n\t\t\t\t//line break once we've reached our number per row assigned.\r\n\t\t\t\t$smile .= \"<br />\";\r\n\r\n\t\t\t\t//reset counter for next row.\r\n\t\t\t\t$x = 0;\r\n\t\t\t}\r\n\r\n\t\t\t//output smiles and increment counter.\r\n\t\t\t$smile .= '<a href=\"#smiles\" title=\"'.$row['code'].'\"><img src=\"images/smiles/'.$row['img_name'].'\" alt=\"'.$row['code'].'\" /></a>';\r\n\t\t\t$x++;\r\n\t\t}\r\n\t}\r\n\treturn ($smile);\r\n}", "public function footer() {\n\t\t// depending on the search string, the result set can be\n\t\t// limited. So we need first to count the total number of\n\t\t// corresponding items. Then get a slice of them in the\n\t\t// generation of the body.\n\t\tif (!is_null($this->model)) {\n\t\t\t$nb_items = $this->model->getCount(array('view' => $this->model_view, 'filter' => $this->filter()));\n\t\t} else {\n\t\t\t$nb_items = $this->items->count();\n\t\t}\n\t\t$this->nb_items = $nb_items;\n\t\tif ($nb_items <= $this->items_per_page) {\n\t\t\treturn '';\n\t\t}\n\t\t$this->page_number = ceil($nb_items / $this->items_per_page);\n\t\tif ($this->current_page > $this->page_number) {\n\t\t\t$this->current_page = 1;\n\t\t}\n\t\t$params = $this->initial_params;\n\t\tif (!empty($this->search_fields)) {\n\t\t\tif (!empty($this->search_string)) {\n\t\t\t\t$params['s'] = $this->search_string;\n\t\t\t}\n\t\t\t$params['p'] = $this->current_page;\n\t\t}\n\t\tif (!empty($this->sort_order)) {\n\t\t\t$params['sk'] = $this->sort_order[0];\n\t\t\t$params['so'] = ($this->sort_order[1] == 'ASC') ? 'a' : 'd';\n\t\t}\n\t\t// Add the filtering\n\t\tif (!empty($this->active_list_filter)) {\n\t\t\t$params['fk'] = $this->active_list_filter[0];\n\t\t\t$params['fv'] = $this->active_list_filter[1];\n\t\t}\n\t\t$out = '<tfoot><tr><th colspan=\"'.count($this->list_display).'\">'.\"\\n\";\n\t\tif ($this->current_page != 1) {\n\t\t\t$params['p'] = $this->current_page - 1;\n\t\t\t$url = $this->getUrl($params);\n\t\t\t$this->symbol_prev = ($this->symbol_prev == null) ? __('Prev') : $this->symbol_prev;\n\t\t\t$out .= '<a href=\"'.$url.'\">'.$this->symbol_prev.'</a> ';\n\t\t}\n\t\t// Always display the link to Page#1\n\t\t$i=1;\n\t\t$params['p'] = $i;\n\t\t$class = ($i == $this->current_page) ? ' class=\"px-current-page\"' : '';\n\t\t$url = $this->getUrl($params);\n\t\t$out .= '<a'.$class.' href=\"'.$url.'\">'.$this->symbol_first.'</a> ';\n\t\t// Display the number of pages given $this->max_number_pages\n\t\tif ($this->max_number_pages > 0) {\n\t\t\t$nb_pa = floor($this->max_number_pages/2);\n\t\t\t$imin = $this->current_page - $nb_pa;\n\t\t\t$imax = $this->current_page + $nb_pa;\n\t\t\t// We put the separator if $imin is at leat greater than 2\n\t\t\tif ($imin > 2) {\n\t\t\t\t$out .= ' '.$this->max_number_pages_separator.' ';\n\t\t\t}\n\t\t\tif ($imin <= 1) {\n\t\t\t\t$imin=2;\n\t\t\t}\n\t\t\tif ($imax >= $this->page_number) {\n\t\t\t\t$imax = $this->page_number - 1;\n\t\t\t}\n\t\t} else {\n\t\t\t$imin = 2;\n\t\t\t$imax = $this->page_number - 1;\n\t\t}\n\t\tfor ($i=$imin; $i<=$imax; $i++) {\n\t\t\t$params['p'] = $i;\n\t\t\t$class = ($i == $this->current_page) ? ' class=\"px-current-page\"' : '';\n\t\t\t$url = $this->getUrl($params);\n\t\t\t$out .= '<a'.$class.' href=\"'.$url.'\">'.$i.'</a> ';\n\t\t}\n\t\tif (($this->max_number_pages > 0) && $imax < ($this->page_number - 1)) {\n\t\t\t$out .= ' '.$this->max_number_pages_separator.' ';\n\t\t}\n\t\t// Always display the link to last Page\n\t\t$i = $this->page_number;\n\t\t$params['p'] = $i;\n\t\t$class = ($i == $this->current_page) ? ' class=\"px-current-page\"' : '';\n\t\t$url = $this->getUrl($params);\n\t\tif ($this->symbol_last == null) {\n\t\t\t$this->symbol_last=$i;\n\t\t}\n\t\t$out .= '<a'.$class.' href=\"'.$url.'\">'.$this->symbol_last.'</a> ';\n\t\tif ($this->current_page != $this->page_number) {\n\t\t\t$params['p'] = $this->current_page + 1;\n\t\t\t$url = $this->getUrl($params);\n\t\t\t$this->symbol_next = ($this->symbol_next == null) ? __('Next') : $this->symbol_next;\n\t\t\t$out .= '<a href=\"'.$url.'\">'.$this->symbol_next.'</a> ';\n\t\t}\n\t\t$out .= '</th></tr></tfoot>'.\"\\n\";\n\t\treturn $out;\n\t}", "private function computepagelimit() {\n $this->pageparam->yend = 0;\n $this->pageparam->ytabstart = 0;\n foreach ($this->template as $elt) {\n if ($elt->type == \"activities\") {\n $this->pageparam->ytabstart = $elt->location->y;\n }\n $this->pageparam->yend = $elt->location->y;\n }\n $this->pageparam->ytabend = -1;\n foreach ($this->template as $elt) {\n if ($elt->location->y > $this->pageparam->ytabstart && $this->pageparam->ytabend == -1) {\n $this->pageparam->ytabend = $elt->location->y;\n }\n }\n if ($this->pageparam->ytabend == -1) {\n $this->pageparam->ytabend = $this->pageparam->pageheight - 30;\n }\n if ($this->pageparam->yend == $this->pageparam->ytabstart) {\n $this->pageparam->yend = $this->pageparam->ytabend;\n }\n }", "public function generate_html();", "function htmlEnd() {\n\techo <<<'EOD'\n\t</body>\n</html>\nEOD;\n}", "function output(){\n\n\t\tif ($this->breadcrumbs) {\n\t\t\t\n\t\t\t$output = $this->start;\n\n\t\t\tforeach ($this->breadcrumbs as $key => $crumb) {\n\t\t\t\tif ($key){ \n\t\t\t\t\t$output .= $this->separator;\n\t\t\t\t}\n\n\t\t\t\tif (end(array_keys($this->breadcrumbs)) == $key) {\n// \t\t\t\t\t$output .= '<span>' . $crumb['title'] . '</span>';\t\n\t\t\t\t\t$output .= '<li><strong>'.$crumb['title'].'</strong></li>'; //=> add new\n\t\t\t\t} else {\n// \t\t\t\t\t$output .= '<a href=\"' . $crumb['href'] . '\">' . $crumb['title'] . '</a>';\n\t\t\t\t\t$output .= '<li><strong><a href=\"' . $crumb['href'] . '\">' . $crumb['title'] . '</a></strong></li>'; //=> add new\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\treturn $output . $this->end . PHP_EOL;\n\t\t}\n\t\t\n\t\treturn '';\n\t}", "public function getLastUrl()\n {\n $url = '';\n $total_pages = $this->getTotalPages();\n if ($this->current_page < $total_pages) {\n $url = $this->getBaseUrl();\n\n if ($this->friendly_url) {\n $url .= $this->page_index.$total_pages.'/';\n } else {\n $url = $this->appendQueryString($url, $this->page_index.'='.$total_pages);\n }\n\n $url = sprintf('<li><a href=\\'%s\\' class=\\'pagination_last\\'><span>%s</span></a></li>', $url, $this->last_text);\n }\n\n return $url;\n }", "public function includes_toprank_mrmonthly() \n\t{\n\t\tglobal $home_module; // PHP Globals\r\n\r\n\t\t$CTM_HTML = NULL;\n\t\t$CTM_HTML .= \" \t<div id=\\\"Ranking_MResetsMonthly\\\" class=\\\"currentRanking\\\">\r\n \t\".(count($home_module['rankings']['mresetsMonthly']) > 0 ? \"\".($this->settings['HOME']['TOP_RANK']['MR_MONTHLY'][2] == true ? \"<ul class=\\\"topRanks\\\">\r\n \t\".$this->loop__includes_toprank_mrmonthly__0x0E().\"\r\n \t\t</ul>\" : \"<ul class=\\\"ranks-classic\\\">\r\n <li>\r\n <span>{$this->lang->words['Home']['TopRank']['Words']['Position']}</span>\r\n <span>{$this->lang->words['Home']['TopRank']['Words']['Name']}</span>\r\n <span>{$this->lang->words['Home']['TopRank']['Words']['MRMonthly']}</span>\r\n </li>\r\n \".$this->loop__includes_toprank_mrmonthly__0x0F().\"\r\n </ul>\").\"\" : NULL).\"\r\n \t\t</div>\";\n\t\treturn $CTM_HTML;\n\t}", "public static function getTuileAdd() {\n $html = '<div class=\"col-md-4 col-sm-6 col-xs-12\"><div class=\"cov-group add-group\">';\n $html .= '<h3>Ajouter un groupe</h3>';\n $html .= '<hr />';\n $html .= '<a href=\"' . EditVue::getUrl() . '\">'.Html::getIcon('plus-circle').'</a>';\n $html .= '</div></div>';\n return $html;\n }", "function caden_onefourthlast( $atts, $content = null) {\n\treturn '<div class=\"one_fourth last\">' . remove_wpautop($content) . '</div>';\n}", "public function endPage(){\n\t\tglue::trigger('afterRender');\n\n\t\t$content = ob_get_clean();\n\t\techo strtr($content, array(\n\t\t\t$this->tpl_head => $this->renderHeadHtml(),\n\t\t\t$this->tpl_body_begin => $this->renderBodyBeginHtml(),\n\t\t\t$this->tpl_body_end => $this->renderBodyEndHtml(),\n\t\t));\n\n\t\tunset(\n\t\t\t\t$this->metaTags,\n\t\t\t\t$this->linkTags,\n\t\t\t\t$this->css,\n\t\t\t\t$this->cssFiles,\n\t\t\t\t$this->js,\n\t\t\t\t$this->jsFiles\n\t\t);\n\t}", "function wrap_html_finish() {\r\n $html .= '</div>';\r\n }", "function rect_end()\r\n{\r\n return \"</div>\";\r\n}", "function jig_blank_gallery($output, $attr) {\r\n\t\t\treturn '';\r\n\t\t}", "public function getEndTag(){\n return '</form';\n }", "abstract function writeHTML();" ]
[ "0.7057202", "0.60201615", "0.57433707", "0.55165046", "0.54295474", "0.54063106", "0.5405165", "0.5403709", "0.5345788", "0.5342127", "0.5313218", "0.52836573", "0.5281412", "0.5269514", "0.52665347", "0.52644557", "0.52455693", "0.52351534", "0.5232924", "0.52235943", "0.5222227", "0.5217076", "0.521584", "0.5121766", "0.51172006", "0.510227", "0.5097061", "0.5097061", "0.5093689", "0.50822586", "0.50602543", "0.5048086", "0.5046255", "0.5046255", "0.5036945", "0.50299156", "0.5027298", "0.50241524", "0.5022387", "0.5019803", "0.50040066", "0.4984243", "0.49813938", "0.4979236", "0.4977702", "0.49742344", "0.49679402", "0.49589157", "0.49544626", "0.49442232", "0.49354523", "0.49298978", "0.49227315", "0.4921315", "0.49181828", "0.49179924", "0.49160594", "0.4912839", "0.49102986", "0.4905265", "0.49045417", "0.49020916", "0.49018684", "0.49018446", "0.48945928", "0.48903218", "0.48820198", "0.48734257", "0.48639143", "0.4850908", "0.48479807", "0.48408464", "0.48372474", "0.48364288", "0.48323277", "0.4831856", "0.48270288", "0.48256648", "0.482409", "0.48218378", "0.4820823", "0.48203465", "0.48161468", "0.48063046", "0.48012573", "0.47974154", "0.4794519", "0.47942692", "0.47899976", "0.47818738", "0.47736928", "0.4770876", "0.4765554", "0.47637033", "0.4761071", "0.4755256", "0.47458777", "0.47451216", "0.4744621", "0.473603" ]
0.8242224
0
Write html template with the Last Mile Selection
Напишите html-шаблон с выбором Последнего Километра
public function htmlAdminLastMileSelection($order){ $template = Mage::app()->getLayout()->createBlock('core/template') ->setData('order', $order) ->setTemplate('recs/sales/order/view/lastmile.phtml'); return $template->toHtml(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function htmlLastMileSelection(){\n\t\t$template = Mage::app()->getLayout()->createBlock('core/template')\n \t->setTemplate('recs/totals/lastmile.phtml');\n return $template->toHtml();\n\t}", "private function getLastPage()\n\t{\n\t\tif($this->currentPage != $this->getTotalPages())\n\t\t\treturn \"<li id=\\\"lastPage\\\"><a href=\\\"\". $this->linkTo .\"&p=\". $this->getTotalPages() .\"\\\" title=\\\"Ultima pagina\\\">Fine(\". $this->getTotalPages() .\")</a></li>\";\n\t\telse\n\t\t\treturn \"\";\n\t\t\t//return \"<li id=\\\"lastPage\\\">Fine(\". $this->getTotalPages() .\")</li>\";\n\t}", "private function endGen()\n\t\t{\n\t\t\techo \"</ul>\"; \n\t\t\techo \"</div>\"; \n\t\t}", "function show_last_company()\r\n {\r\n \t$html = '';\r\n $db = $GLOBALS['DB'];\r\n $sql = sprintf('SELECT company, link FROM user order by id desc LIMIT 0,10');\r\n if ($result = $db->query($sql)) {\r\n \t$rows = $result->num_rows;\r\n while($rows) { \r\n $row = $result->fetch_assoc();\r\n $this->id = $uid;\r\n $this->company = $row['company'];\r\n $this->link = $row['link'];\r\n \r\n // save to html file\r\n $url = 'http://www.wanet.cn'.$this->link;\r\n $li = '<li class=\"last\"><a href=\"'.$url.'\">'.$this->company.'</a></li>';\r\n $html = $html.$li;\r\n $rows--;\r\n }\r\n $result->close();\r\n }\r\n return $html;\r\n }", "function task_manager_logsshow_wrapper( $last5 ) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<div class='tableborder'>\n <div class='tableheaderalt'>:Журнал выполненных задач</div>\n <table cellpadding='0' cellspacing='0' width='100%'>\n <tr>\n <td class='tablesubheader'>Задача</td>\n <td class='tablesubheader'>Время запуска</td>\n <td class='tablesubheader'>Информация</td>\n </tr>\n $last5\n </table>\n</div>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "function push($currDate, $header, $entries, &$mpdf)\n{\n $html = \"\n<div class='row'>\n <div class='columns small-5'>\n <p class='float-left'>Gymnasium Lohmar - Nachhilfe</p>\n </div>\n \n <div class='columns small-5 float-right'>\n <p class='right'>{$currDate}</p>\n </div>\n \n</div>\n\n<div class='row'>\n <div class='columns small-12'>\n <h3>{$header}</h3>\n </div>\n \n</div>\n<div class='row'>\n {$entries}\n</div>\";\n //var_dump($html);\n $mpdf->WriteHTML($html, 2);\n}", "public function lastmilegridAction() {\r\n $this->_initAction();\r\n $this->getResponse()->setBody(\r\n $this->getLayout()->createBlock('lastmile/adminhtml_pincode_edit_tab_lastmile')->toHtml()\r\n );\r\n }", "public function endIterate()\n {\n return \"{{% } }}\";\n }", "public function getLastMileSelectedPrice(){\n\t\tif ( self::getLastMileSelected() ){\n\t\t\t$selectedPrice = Mage::helper('core')->jsonDecode(self::getLastSelection());\n\t\t\treturn Mage::helper('core')->currency( $selectedPrice['total_price'] );\n\t\t}else{\n\t\t\treturn '';\n\t\t}\n\t}", "function finish() {\r\n\t\t$this->title();\r\n\t\techo $this->template;\r\n\t}", "public function displayHtmlEnd();", "function CreateHtmlSkeletonBottom() {\r\n echo \"</body>\";\r\n echo \"</html>\";\r\n }", "function render_last($anchor=true)\n {\n global $PHP_SELF;\n \n if (!$this->db->pageExecuteCountRows) return;\n\n if ($anchor)\n {\n ?>\n <a href=\"<?php echo $PHP_SELF,'?',$this->getString,$this->id,'_next_page=',$this->rs->LastPageNo() ?>\"><?php echo $this->last;?></a> &nbsp; \n <?php\n } \n else \n {\n print \"$this->last &nbsp; \";\n }\n }", "public function last()\n\t{\n\t\tif($this->current + $this->links < $this->total)\n\t\t{\n\t\t\treturn HTML::tag('li', HTML::link($this->url($this->total), _('Last &gt;')), array('class' => 'last'));\n\t\t}\n\t}", "public function actionLastDigitized() \n\t{\n\t\t$this->model = new Art();\n\t\t$this->render('lastDigitized');\n\t}", "function last(){\n\t\t// Zeiger verschieben\n\t\t$this->pointerToCurrent = count($this->imageArray)-1;\n\t\t$this->save();\n\t\t\n\t\t// Das Bild ausgeben\n\t\t//$this->show();\n\t\t$temp = $GLOBALS['CunddController']->init(\"CunddGalerie::printDetailOfSelf\");\n\t}", "protected function generatePageFooter()\n {\n // to do: output common end of HTML code\n }", "public function lastPageText();", "function twig_last(Twig_Environment $env, $item) {}", "protected function emitSectionEnd(): string {\n\t\treturn \"</template>\";\n\t}", "public function last() {\r\n\t\t\t$debug = debug_backtrace();\r\n\t\t\t$i = 1;\r\n\t\t\techo '<pre style=\"background:#fef;border:solid 1px #fcf;line-height:130%;margin:5px;font:12px \\'courier new\\';padding:5px;text-align:left;color:#808;\">',\r\n\t\t\t'<h2 style=\"border-bottom:solid 2px #fcf;color:#f0f;font:bold 16px \\'courier new\\';margin:0 0 5px;padding:0;\">MEMCACHED #'.self::$COUNT.': '.str_replace(BASE_PATH,'/',$debug[$i]['file']).'\" on line \"'.$debug[$i]['line'].'\" - '.Debug::timer().'</h2>',\r\n\t\t\ttrim(str_replace(array('<','>'),array('&lt;','&gt;'),preg_replace('/([\\t]+)/is','',self::$LAST))),';',\r\n\t\t\t'</pre>';\r\n\t\t}", "function task_manager_logsshow_wrapper( $last5 ) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<div class='tableborder'>\n <div class='tableheaderalt'>任务管理日志</div>\n <table cellpadding='0' cellspacing='0' width='100%'>\n <tr>\n <td class='tablesubheader'>任务执行</td>\n <td class='tablesubheader'>执行日期</td>\n <td class='tablesubheader'>日志信息</td>\n </tr>\n $last5\n </table>\n</div>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "function render_last($anchor=true)\n\t{\n\tglobal $PHP_SELF;\n\n\t\tif (!$this->db->pageExecuteCountRows) return;\n\n\t\tif ($anchor) {\n\t\t?>\n\t\t\t<a href=\"<?php echo $PHP_SELF,'?',$this->id,'_next_page=',$this->rs->LastPageNo() ?><?php echo $this->linkfilter; ?>\"><?php echo $this->last;?></a> &nbsp;\n\t\t<?php\n\t\t} else {\n\t\t\tprint \"$this->last &nbsp; \";\n\t\t}\n\t}", "public function getLastMileSelected(){\n\t \t$shipping_method = self::getShippingMethod();\n\n\t //Switch with method type\n\t \tif ($shipping_method == 'nektria_recs_lastmile'){\n\t \t\treturn TRUE;\n\t \t}else{\n\t \t\treturn FALSE;\n\t \t}\n\t}", "function lastLink(){\n\t\tif($this->pointerToCurrent < count($this->imageArray)-1){\n\t\t\t// Den Link erstellen\n\t\t\t$wert['aufruf'] = 'Cundd'.ucfirst($this->classPrefix).'::last';\n\t\t\t$wert['title'] = CunddLang::get(\"CunddGalerie_lastLinkTitle\");\n\t\t\t$wert['classPrefix'] = $this->classPrefix;\n\t\t\t\n\t\t\t// Link ausgeben\n\t\t\techo CunddTemplate::inhalte_einrichten($wert, 4, $this->classPrefix.'_show_last_'.$this->classPrefix.'_link', 'output');\n\t\t}\n\t}", "function megatron_pager($variables) {\n $output = \"\";\n $tags = $variables['tags'];\n $element = $variables['element'];\n $parameters = $variables['parameters'];\n $quantity = $variables['quantity'];\n global $pager_page_array, $pager_total;\n\n // Calculate various markers within this pager piece:\n // Middle is used to \"center\" pages around the current page.\n $pager_middle = ceil($quantity / 2);\n // current is the page we are currently paged to\n $pager_current = $pager_page_array[$element] + 1;\n // first is the first page listed by this pager piece (re quantity)\n $pager_first = $pager_current - $pager_middle + 1;\n // last is the last page listed by this pager piece (re quantity)\n $pager_last = $pager_current + $quantity - $pager_middle;\n // max is the maximum page number\n $pager_max = $pager_total[$element];\n // End of marker calculations.\n\n // Prepare for generation loop.\n $i = $pager_first;\n if ($pager_last > $pager_max) {\n // Adjust \"center\" if at end of query.\n $i = $i + ($pager_max - $pager_last);\n $pager_last = $pager_max;\n }\n if ($i <= 0) {\n // Adjust \"center\" if at start of query.\n $pager_last = $pager_last + (1 - $i);\n $i = 1;\n }\n\n // End of generation loop preparation.\n $li_first = theme('pager_first', array('text' => (isset($tags[0]) ? $tags[0] : t('first')), 'element' => $element, 'parameters' => $parameters));\n $li_previous = theme('pager_previous', array('text' => (isset($tags[1]) ? $tags[1] : t('previous')), 'element' => $element, 'interval' => 1, 'parameters' => $parameters));\n $li_next = theme('pager_next', array('text' => (isset($tags[3]) ? $tags[3] : t('next')), 'element' => $element, 'interval' => 1, 'parameters' => $parameters));\n $li_last = theme('pager_last', array('text' => (isset($tags[4]) ? $tags[4] : t('last')), 'element' => $element, 'parameters' => $parameters));\n\n if ($pager_total[$element] > 1) {\n /*\n if ($li_first) {\n $items[] = array(\n 'class' => array('pager-first'),\n 'data' => $li_first,\n );\n }\n */\n if ($li_previous) {\n $items[] = array(\n 'class' => array('prev'),\n 'data' => $li_previous,\n );\n }\n\n // When there is more than one page, create the pager list.\n if ($i != $pager_max) {\n if ($i > 1) {\n $items[] = array(\n 'class' => array('pager-ellipsis'),\n 'data' => '…',\n );\n }\n // Now generate the actual pager piece.\n for (; $i <= $pager_last && $i <= $pager_max; $i++) {\n if ($i < $pager_current) {\n $items[] = array(\n // 'class' => array('pager-item'),\n 'data' => theme('pager_previous', array('text' => $i, 'element' => $element, 'interval' => ($pager_current - $i), 'parameters' => $parameters)),\n );\n }\n if ($i == $pager_current) {\n $items[] = array(\n 'class' => array('active'), // Add the active class\n 'data' => l($i, '#', array('fragment' => '', 'external' => TRUE)),\n );\n }\n if ($i > $pager_current) {\n $items[] = array(\n //'class' => array('pager-item'),\n 'data' => theme('pager_next', array('text' => $i, 'element' => $element, 'interval' => ($i - $pager_current), 'parameters' => $parameters)),\n );\n }\n }\n if ($i < $pager_max) {\n $items[] = array(\n 'class' => array('pager-ellipsis'),\n 'data' => '…',\n );\n }\n }\n // End generation.\n if ($li_next) {\n $items[] = array(\n 'class' => array('next'),\n 'data' => $li_next,\n );\n }\n /*\n if ($li_last) {\n $items[] = array(\n 'class' => array('pager-last'),\n 'data' => $li_last,\n );\n }\n */\n\n return '<div class=\"pagination\">'. theme('item_list', array(\n 'items' => $items,\n //'attributes' => array('class' => array('pager')),\n )) . '</div>';\n }\n\n return $output;\n}", "public function set_component_end() {\n\n if ( $this->template == \"four-up\" ) {\n $compenent_four_up_end = \"<div class=\\\"row\\\">\";\n $compenent_four_up_end .= \"<div role=\\\"main\\\" class=\\\"content\\\">\";\n }\n\n $component_end = \"</div> <!-- end image-block -->\";\n $component_end .= \"</div> <!-- end row -->\";\n\n echo $component_end;\n\n if ( $this->template == \"four-up\" ) {\n echo $compenent_four_up_end;\n\n }\n }", "public function set_component_end() {\n\n if ( $this->template == \"four-up\" ) {\n $compenent_four_up_end = \"<div class=\\\"row\\\">\";\n $compenent_four_up_end .= \"<div role=\\\"main\\\" class=\\\"content\\\">\";\n }\n\n $component_end = \"</div> <!-- end image-block -->\";\n $component_end .= \"</div> <!-- end row -->\";\n\n echo $component_end;\n\n if ( $this->template == \"four-up\" ) {\n echo $compenent_four_up_end;\n\n }\n }", "function end_el(&$output, $item, $depth=0, $args=array()) {\n //if ($this->display_current) $output .= \"</div>\\n\";\n //$this->display_current = false;\n }", "function kcw_movies_ui_GetListEndHTML() {\n return \" </ul>\n </center>\n <div class='kcw-movies-pagination-wrapper'>\n <ul class='kcw-movies-pagination pagination-bottom'></ul>\n </div>\n </div>\n <div class='kcw-movies-playbutton'><div class='kcw-movies-triangle'></div></div>\";\n}", "function last($last = 'last >>', $options = array()) {\n\t\t$options = array_merge(\n\t\t\tarray(\n\t\t\t\t'tag' => 'span',\n\t\t\t\t'before'=> null,\n\t\t\t\t'model' => $this->defaultModel(),\n\t\t\t\t'separator' => ' | ',\n\t\t\t),\n\t\t(array)$options);\n\n\t\t$params = array_merge(array('page'=> 1), (array)$this->params($options['model']));\n\t\tunset($options['model']);\n\n\t\tif ($params['pageCount'] <= 1) {\n\t\t\treturn false;\n\t\t}\n\n\t\textract($options);\n\t\tunset($options['tag'], $options['before'], $options['model'], $options['separator']);\n\n\t\t$out = '';\n\t\t$lower = $params['pageCount'] - $last + 1;\n\n\t\tif (is_int($last) && $params['page'] < $lower) {\n\t\t\tif ($before === null) {\n\t\t\t\t$before = '...';\n\t\t\t}\n\t\t\tfor ($i = $lower; $i <= $params['pageCount']; $i++) {\n\t\t\t\t$out .= $this->Html->tag($tag, $this->link($i, array('page' => $i), $options));\n\t\t\t\tif ($i != $params['pageCount']) {\n\t\t\t\t\t$out .= $separator;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$out = $before . $out;\n\t\t} elseif ($params['page'] < $params['pageCount']) {\n\t\t\t$out = $before . $this->Html->tag(\n\t\t\t\t$tag, $this->link($last, array('page' => $params['pageCount']), $options\n\t\t\t));\n\t\t}\n\t\treturn $out;\n\t}", "function win_body_close(){\n global $config, $prefix;\n print \"</td>\\n\"; \t\n \tprint \" <td width=\\\"1\\\" background=\\\"\";\n \t$this->path($prefix . $config->theme_config['box']['img']['middle']['right']);\n \tprint \"\\\"><img alt=\\\"\\\" src=\\\"\";\n// \t$this->img(\"_img/_mask.gif\");\n \t$this->path($prefix . $config->theme_config['box']['img']['middle']['right']);\n \tprint \"\\\" ></td>\\n\";\n \tprint \" </tr>\";\n \tprint \" </table>\";\n\n \treturn;\n }", "function task_manager_last5_row( $data ) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<tr>\n <td width='25%' class='tablerow1'><strong>{$data['log_title']}</strong></td>\n <td width='15%' class='tablerow2'>{$data['log_date']}</td>\n <td width='45%' class='tablerow2'>{$data['log_desc']}</td>\n</tr>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "function task_manager_last5_row( $data ) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<tr>\n <td width='25%' class='tablerow1'><strong>{$data['log_title']}</strong></td>\n <td width='15%' class='tablerow2'>{$data['log_date']}</td>\n <td width='45%' class='tablerow2'>{$data['log_desc']}</td>\n</tr>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "function mediz_footer() {\n\n\t\t$templates = new MEDIZ_Template_Loader;\n\n\t\tob_start();\n\t\t$templates->get_template_part( 'mediz_footer', 'mediz_footer' );\n\t\treturn ob_get_clean();\n\n\t}", "function getJSStatisticsFooterHtmlCodeTpl() {\r\n\t\t$JSTemplate = new js_JSTemplate();\r\n\r\n\t\t$html = '\r\n\t\t</td>\r\n\t\t</tr>' . \"\\n\"\r\n\t\t. '</table>' . \"\\n\"\r\n\t\t;\r\n\r\n\t\t$html .= $JSTemplate->generateEndOfAdminForm();\r\n\t\t//$html .= '</div><!-- needed by j1.0.15 -->';//can not be used for lists! (in FF mosPageNav generate footer that is left justified instead of center)\r\n\r\n\t\treturn $html;\r\n\t}", "public function generate_screen() {\n\t\t\t$bootstrap = new HTMLWriter();\n\t\t\t$content = $this->generate_salesusagetable();\n\t\t\t\n\t\t\tforeach (array_keys($this->json['data']['24month']) as $warehouse) {\n\t\t\t\tif ($warehouse != 'zz') {\n\t\t\t\t\t$content .= $this->generate_warehousediv($warehouse);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$content .= $this->generate_warehousediv('zz');\n\t\t\treturn $content;\n\t\t}", "public function show_last_maptag()\n\t{\n\t\t\n $insert_id = $this->input->post('insert_id');\n \n $query = $this->db->get_where('custom_track', array('id' => $insert_id) );\n \n foreach ($query->result_array() as $maptag_name) {\n\n \techo json_encode($maptag_name);\n \t\n }\n \t\t\n\t\texit;\n\t}", "public function WriteSecondPart()\n {\n echo $this->Link($this->PageCount, $this->LastPageText, $this->LastCssClass);\n }", "public function lastPage();", "function page_end() {\r\n\t\t$this->tag = \"</BODY></HTML>\";\r\n\t\treturn $this->tag;\r\n\t}", "public function htmlEnd(){\n\t\t\n\t\t$html = \"</body>\\n\";\n\t\t$html .= \"</html>\\n\";\n\t\treturn $html;\n\t}", "public function getLastPage()\n {\n return 'page=' . Contract::paginate(CrmHelper::PER_PAGE)->lastPage() ;\n }", "function getOutput()\n\t{\n\t\tglobal $ilBench, $tpl;\n\n\t\t$ilBench->start(\"Explorer\", \"getOutput\");\n\n\t\t$this->format_options[0][\"tab\"] = array();\n\n\t\t$depth = $this->tree->getMaximumDepth();\n\n\t\tfor ($i=0;$i<$depth;++$i)\n\t\t{\n\t\t\t$this->createLines($i);\n\t\t}\n\t\t\n\t\t// set global body class\n\t\t$tpl->setBodyClass(\"il_Explorer\");\n\t\t\n\t\t$tpl_tree = new ilTemplate(\"tpl.tree_form.html\", true, true, \"Modules/LearningModule\");\n\t\t\n\t\t$cur_depth = -1;\n\t\tforeach ($this->format_options as $key => $options)\n\t\t{\n//echo \"-\".$options[\"depth\"].\"-\";\n\t\t\tif (!$options[\"visible\"])\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// end tags\n\t\t\t$this->handleListEndTags($tpl_tree, $cur_depth, $options[\"depth\"]);\n\t\t\t\n\t\t\t// start tags\n\t\t\t$this->handleListStartTags($tpl_tree, $cur_depth, $options[\"depth\"]);\n\t\t\t\n\t\t\t$cur_depth = $options[\"depth\"];\n\t\t\t\n\t\t\tif ($options[\"visible\"] and $key != 0)\n\t\t\t{\n\t\t\t\t$this->formatObject($tpl_tree, $options[\"child\"],$options,$options['obj_id']);\n\t\t\t}\n\t\t\tif ($key == 0)\n\t\t\t{\n\t\t\t\t$this->formatHeader($tpl_tree, $options[\"child\"],$options);\n\t\t\t}\n\t\t\t\t\t\t\n\t\t}\n\t\t\n\t\t$this->handleListEndTags($tpl_tree, $cur_depth, -1);\n\t\t\n\t\t$ilBench->stop(\"Explorer\", \"getOutput\");\n\t\t\n\t\treturn $tpl_tree->get();\n\t}", "function makePageEnd(){\n $pageEndContent = <<<PAGEEND\n </html>\nPAGEEND;\n\n $pageEndContent .=\"\\n\";\n return $pageEndContent;\n}", "function front_pager_last($variables) {\n $text = $variables['text'];\n $element = $variables['element'];\n $parameters = $variables['parameters'];\n global $pager_page_array, $pager_total;\n $output = '';\n\n // If we are anywhere but the last page\n if ($pager_page_array[$element] < ($pager_total[$element] - 1)) {\n $output = theme('pager_link', array('text' => $text, 'page_new' => pager_load_array($pager_total[$element] - 1, $element, $pager_page_array), 'element' => $element, 'parameters' => $parameters));\n }\n\n return $output;\n}", "public function renderEndTag($writer)\r\n\t{\r\n\t\t$writer->write($this->getContentListItem($this->contentId,$this->maxIntroLength));\r\n\t\tparent::renderEndTag($writer);\r\n\t}", "function cp_print_endPage(){\r\n echo '</main>',\r\n '<footer>',\r\n '<p> &copy; Licence Informatique - Janvier 2020 - Tous droits réservés</p>',\r\n '</footer>',\r\n '</body>',\r\n '</html>'; \r\n}", "function gazebo_ubc_clf_visual_identity_footer($variables) {\n\n $output = '<div id=\"UbcBottomInfoWrapper\">\n <div id=\"UbcBottomInfo\" class=\"UbcContainer\">\n <div id=\"UbcBottomLeft\" >\n <p>';\n $image = array(\n 'path' => base_path() . path_to_theme() . '/_ubc_clf/img/footer/logo.gif', \n 'alt' => t('A place of mind, The University of British Columbia'),\n 'title' => t('A place of mind, The University of British Columbia'),\n );\n \n $output .= '<a href=\"http://www.ubc.ca\">' . theme('image', $image) . '</a>'; \n $output .= '</p>\n </div><!-- End UbcBottomLeft -->\n <div id=\"UbcBottomCenter\">';\n $output .= variable_get('clf_umbrella_hcard');\n $output .= '</div><!-- End UbcBottomCenter -->\n <div id=\"UbcBottomRight\">';\n $output .= variable_get('clf_unit_hcard'); \n $output .= '</div><!-- End UbcBottomRight -->\n </div><!-- End UbcBottomInfo UbcContainer -->\n </div><!-- End UbcBottomInfoWrapper -->';\n \n return $output;\n}", "function gen_large_goal($row)\r\n{\r\n\techo '<div class=\"stream-goal\">';\r\n\t\techo '<a href=\"goal.php?id='.$row[8].'\"><h2>'.html_entity_decode($row[0]).\"</h2></a>\";\r\n\t\techo '<img src=\"'.$row[4].'\">';\r\n\t\techo '<div class=\"small-space\"></div>';\r\n\techo '</div>';\r\n\techo '<div class=\"space\"></div>';\r\n}", "public function generate()\n\t{\n\n\t\tif(TL_MODE == 'BE')\n\t\t{\n\t\t\t$this->Template = new BackendTemplate('be_wildcard');\n\t\t\t$this->Template->wildcard = '### CE Slider jQuery '.sprintf($GLOBALS['TL_LANG']['MSC']['ce_slider_jquery_endElem']);\n\n\t\t\treturn $this->Template->parse();\n\t\t}\n\t\treturn parent::generate();\n\t}", "function render_template_end($model) {\n __render_template($model, 'site_footer.php');\n}", "public function renderTemplate(){\n\n $value = $this->getValue();\n $iteration = 1;\n\n if( !empty( $value ) ){\n $iteration = count( $value );\n }\n\n //make a clonable item, for javascript:\n $html = '<script type=\"text/template\" id=\"taxonomy_select_item\">';\n $html .= $this->makeItem( '<%= iteration %>' );\n $html .= '</script>';\n $html .= '<script type=\"text/javascript\">';\n $html .= \"var Taxonomies = '\".json_encode( $this->taxonomies ).\"';\";\n $html .= '</script>';\n\n return $html;\n }", "private function _htmlEnd ()\n {\n $htmlOut = \"</html>\";\n\n return $htmlOut;\n }", "public function actionLargeformat()\r\n {\r\n $path = \\yii::$app->request->baseUrl . \"images/printing/large_format/\";\r\n $files = FileHelper::findFiles($path, ['recursive' => FALSE]);\r\n //print_r($files); exit;\r\n \r\n return $this->render('large_format', ['files' => $files]);\r\n }", "static function displayLastNews(){\n $criterias = \"ORDER BY creationDate DESC LIMIT \".NB_NEWS_TO_DISPLAY;\n $themes = ThemeManager::init()->getAll($criterias);\n $levels = LevelManager::init()->getAll(\"WHERE levelStatus='\"\n .LEVEL_STATUS::ACCEPTED.\"' $criterias\");\n $authors = UserManager::init()->getPseudos();\n \n // extract the 5 recent addons (theme or level)\n $merge = array_merge($themes, $levels);\n usort($merge, array(\"Addon\", \"compareCreationDate\")); \n $addons = array_slice(array_reverse($merge), 0, NB_NEWS_TO_DISPLAY);\n \n // formate the news\n foreach($addons as $addon){\n $news = $addon->formateAsNews();\n $author = $authors[ $addon->getIdCreator() ];\n $news->setAuthor($author);\n echo $news->getMessage();\n }\n }", "function themefooter() {\r\n global $index, $foot1, $foot2, $foot3, $foot4;\r\n if ($index == 1) {\r\n\t$tmpl_file = \"themes/3D-Fantasy/center_right.html\";\r\n\t$thefile = implode(\"\", file($tmpl_file));\r\n\t$thefile = addslashes($thefile);\r\n\t$thefile = \"\\$r_file=\\\"\".$thefile.\"\\\";\";\r\n\teval($thefile);\r\n\tprint $r_file;\r\n\tblocks(right);\r\n }\r\n $footer_message = \"$foot1<br>$foot2<br>$foot3<br>$foot4\";\r\n $tmpl_file = \"themes/3D-Fantasy/footer.html\";\r\n $thefile = implode(\"\", file($tmpl_file));\r\n $thefile = addslashes($thefile);\r\n $thefile = \"\\$r_file=\\\"\".$thefile.\"\\\";\";\r\n eval($thefile);\r\n print $r_file;\r\n}", "public function end() {\r\n\r\n $this->current = 0;\r\n\r\n // remove the suffix which was set by self::start()\r\n $suffixes = \\Zend_Registry::get(\"pimcore_tag_block_current\");\r\n array_pop($suffixes);\r\n \\Zend_Registry::set(\"pimcore_tag_block_current\", $suffixes);\r\n\r\n $this->outputEditmode(\"</div>\");\r\n }", "function template_manual_below()\n{\n\tglobal $context, $settings, $options, $txt, $scripturl;\n\n\techo '\n\t\t\t\t</div>\n\t\t\t\t<span class=\"botslice\"><span></span></span>\n\t\t\t</div>\n\t\t</div>';\n}", "public function WriteSecondPart()\n {\n for ($i = max($this->TargetedPage + $this->ProtectedDistance + 1, $this->PageCount - $this->BeginEndPagesCount + 1);\n $i > $this->TargetedPage && $i <= $this->PageCount; \n $i++ )\n echo $this->Link($i, $i, $this->LinkCssClass);\n \n }", "function render_set_end() {\n\t\techo '</tbody>', \"\\n\";\n\techo '</table>', \"\\n\";\n\treturn true;\n}", "public function WriteSecondPart()\n {\n for ($i = $this->TargetedPage + 1; \n $i <= min($this->TargetedPage + $this->NeighbourPagesCount, $this->PageCount); \n $i++ )\n echo $this->Link($i, $i, $this->LinkCssClass);\n \n if (min($this->TargetedPage + $this->NeighbourPagesCount, $this->PageCount) != $this->PageCount)\n echo $this->MorePagesSeparator.\" \";\n echo $this->Separator.\" \";\n\n }", "public function additionsBottom( )\n\t\t{\n\t\t\tif( $this->objectFormat == '<object id=\"{comment}\" model=\"{model}\" posX=\"{x}\" posY=\"{y}\" posZ=\"{z}\" rotX=\"{rx}\" rotY=\"{ry}\" rotZ=\"{rz}\" dimension=\"{vw}\" interior=\"{int}\" />' ||\n\t\t\t\t$this->vehicleFormat == '<vehicle model=\"{model}\" posX=\"{x}\" posY=\"{y}\" posZ=\"{z}\" rotX=\"{rx}\" rotY=\"{ry}\" rotZ=\"{r}\" color=\"{c1},{c2}\" />' ||\n\t\t\t\t$this->objectFormat == '<object name=\"{comment}\"><position>{x} {y} {z}</position><rotation>{rx} {ry} {rz}</rotation><model>{model}</model></object>' ||\n\t\t\t\t$this->vehicleFormat == '<spawnpoint name=\"{comment}\"><vehicle>{model}</vehicle><position>{x} {y} {z}</position><rotation>{r}</rotation></spawnpoint>' )\n\t\t\t{\n\t\t\t\treturn '</map>';\n\t\t\t}\n\t\t\tif( $this->convertOptions[ 'ADD_TO_SAMP_SCRIPT' ] == 'Gamemode' )\n\t\t\t{\n\t\t\t\treturn @file_get_contents( 'http://www.convertffs.com/files/gamemode_bottom.txt' );\n\t\t\t}\n\t\t\tif( $this->convertOptions[ 'ADD_TO_SAMP_SCRIPT' ] == 'Filterscript' )\n\t\t\t{\n\t\t\t\treturn @file_get_contents( 'http://www.convertffs.com/files/filterscript_bottom.txt' );\n\t\t\t}\n\t\t\treturn '';\n\t\t}", "protected static function putBlocksEnd()\n {\n echo '</div>' . \"\\n\";\n }", "public function iconbox_tail() {\n?>\n\t</div>\n</div>\n\t\t<?php\n\t}", "public function getLastPage();", "public function showLatestGenerated($template);", "function makeFooter() {\n\t$t = new Template();\n\t$t->setFile(\"tplfile\", $this->libjsdir . \"layersmenu-footer.ijs\");\n\t$t->setVar(array(\n\t\t\"packageName\"\t=> $this->_packageName,\n\t\t\"version\"\t=> $this->version,\n\t\t\"copyright\"\t=> $this->copyright,\n\t\t\"author\"\t=> $this->author,\n\t\t\"footer\"\t=> $this->footer\n\n\t));\n\t$this->footer = $t->parse(\"out\", \"tplfile\");\n\treturn $this->footer;\n}", "function DisplayMileBasedSplits()\n{\n global $secsPerMile;\n global $totalMiles;\n global $totalSeconds;\n global $distance;\n \n echo \"<table class=\\\"myTable\\\">\";\n echo \"<th>Mile</th><th>Split</th>\";\n \n $i = 1;\n while ($i < $totalMiles) // $totalMiles will never be a whole number\n {\n $secondsSplit = $i * $secsPerMile;\n $timeFormatted = FormatTime($secondsSplit);\n echo \"<tr><td>$i</td><td>$timeFormatted</td></tr>\";\n $i++;\n }\n $i--;\n if ($i <= $totalMiles)\n {\n $timeFormatted = FormatTime($totalSeconds);\n $displayDistance = DisplayableDistanceValue($distance);\n $displayDistance = round($distance * MILE_PER_KM, 1);\n echo \"<tr><td>$displayDistance</td><td>$timeFormatted</td></tr>\";\n }\n echo \"</table>\";\n}", "protected function endSlide() {\n\n return '</div></div></div>';\n }", "function nakedfooter() {\n return '</td></tr></table> </form></body></html>';\n }", "public function menuAction($limit)\n {\n /** @var EntityManager $entityManager */\n $entityManager = $this->getDoctrine()->getManager();\n\n $list = $entityManager\n ->getRepository('AppMainBundle:Post')\n ->findBy([], ['created' => 'DESC'], $limit, 0);\n\n return $this->render('AppFrontBundle:Core:last-post.html.twig',\n [\n 'list' => $list\n ]\n );\n\n\n }", "function makeFooter() {\n\n\t$t = new Template();\n\n\t$t->setFile(\"tplfile\", $this->libjsdir . \"layersmenu-footer.ijs\");\n\n\t$t->setVar(array(\n\n\t\t\"packageName\"\t=> $this->_packageName,\n\n\t\t\"version\"\t=> $this->version,\n\n\t\t\"copyright\"\t=> $this->copyright,\n\n\t\t\"author\"\t=> $this->author,\n\n\t\t\"footer\"\t=> $this->footer\n\n\t\t\n\n\t));\n\n\t$this->footer = $t->parse(\"out\", \"tplfile\");\n\n\treturn $this->footer;\n\n}", "public function end($options=array()){\n /**\n * Finaliza o top do template da tabela\n */\n //Verifica se foi requisitado um template fora do padrao\n $templateName = (isset($options['template']))?$options['template']:'index-table-footer';\n\n //Carrega o template do elemento\n $this->bottomTemplate = $this->AppUtils->loadTemplate($templateName);\n\n //Carrega os valores pdroes do input\n $defaults = array(\n 'end_form' => $this->AppForm->end($options),\n 'qtRows' => count($this->rows),\n 'labelLeft' => date('d/m/Y - H:i:s'),\n 'labelRight' => 'Quantidade listada aqui'\n );\n $vet = array_merge($defaults, $options);\n\n //Altera as chaves do array para o padrao de variaveis do template\n $values = $this->AppUtils->key2var($vet);\n\n //Carrega as variaveis do template com os valores passados por parametro\n $this->bottomTemplate = str_replace(array_keys($values), $values, $this->bottomTemplate);\n\n //Retona as tags HTML geradas\n return $this->bottomTemplate;\n }", "public function createTile()\n {\n return '\n <div class=\"albumTileDiv commonText\">\n <div class=\"albumTile itemTile\" onclick=\"javascript: show_overlay_'.$this->gphotoID.'()\">\n <div class=\"overlayDiv\">\n <div class=\"albumThumbnail\">\n <img src=\"'.$this->thumbnail[0]->getURL().'\">\n </div>\n <div class=\"albumCaption\">'.$this->title.'</div>\n </div>\n </div>\n <form method=\\'post\\' action=\\'\\' name=\\'show_album_'.$this->gphotoID.'\\'>\n <input type=\\'hidden\\' name=\\'album_id\\' value=\\''.$this->gphotoID.'\\' />\n </form>\n </div>';\n }", "function printCloseHTML () {\n\n printf(\"</table>\");\n printf(\"</div>\");\n printf(\"</body>\");\n printf(\"</html>\");\n\n}", "function generate_muestrario_item_view($cat)\n{\n\t$output = '';\n\t$presetname = 'muestrario_miniatura';\n\t$res = db_query('SELECT * FROM {muestitem} WHERE bid = '.$cat);\n\t$flag = 0;\n\twhile($row = db_fetch_array($res))\n\t{\n\t\t//determinamos si es el segundo elemento para agregar la clase item-middle\n\t\tif($flag == 1)\n\t\t{\n\t\t\t$intclass = ' item-middle';\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$intclass = '';\n\t\t}\n\t\t\n\t\t\n\t\t$output .= '<div class=\"muest-item'.$intclass.'\">';\n\t\t//generamos la url de la imagen dependiente de imagecache\n\t\t$output .= '<a href=\"'.$row['url'].'\" class=\"m-img\" target=\"_blank\"><img src=\"'.base_path().imagecache_create_path($presetname,_get_muestrario_filepath($row['cid'])).'\" /></a>';\n\t\t$output .= '<a href=\"'.$row['url'].'\" class=\"m-link\" target=\"_blank\">ver '.$row['nombre'].'</a>';\n\t\t$output .= '</div>';\n\t\t\n\t\t\n\t\t//establecemos el contador para identificar el elemento del centro\n\t\t\n\t\tif($flag >= 2)\n\t\t{\n\t\t\t$flag = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$flag++;\n\t\t}\n\t}\n\treturn $output;\n}", "public function selectPageMax();", "public function write() {\n\n echo $this->renderPage('preview', true );\n\n }", "function sambatech_chamado_footer($pageid, $i){\r\n\t $pagina = get_post($pageid);\r\n\t $html = '';\r\n\t $html = $html . '<div id=\"footer-copyright\" >';\r\n\t $html = $html . ' <div class=\"container pageWidth\">';\r\n\t $html = $html . ' <div class=\"row\">';\r\n\t $html = $html . ' <div id=\"copyright-controller\" class=\"col-md-4\">';\r\n\t $html = $html . '<span class=\"list-inline copyright\">Copyright &copy; Samba Tech e Ciclos.Todos os direitos reservados'. '</span>';\r\n\t $html = $html . '</div>';\r\n\t $html = $html . '<div id=\"copyright-controller-detail\" class=\"col-md-4\">';\r\n\t $html = $html . '<ul class=\"list-inline quicklinks\">';\r\n\t $html = $html . '<li>Powered by <img id=\"image-logo\" src=\"'.get_template_directory_uri().'/images/imagemfooter.png\"</img>';\r\n\t $html = $html . '</li>';\r\n\t $html = $html . '</ul>';\r\n\t $html = $html . '</div>';\r\n\t $html = $html . '</div>';\r\n\t $html = $html . '</div>';\r\n\t $html = $html . '</div>';\r\n\t return $html;\r\n}", "public function lastAction($count)\n {\n // @todo здесь нужно будет добавить ограничение\n $news = $this->getDoctrine()->getEntityManager()\n ->getRepository('StfalconNewsBundle:News')->getLastNews($count);\n\n return $this->render('StfalconNewsBundle:News:last.html.twig', array('news' => $news));\n }", "public abstract function last_error_as_html ();", "public static function end() {\n\t\t\techo \"\n\t\t\t</div>\n\t\t\t<div class=\\\"vertical-centerer\\\"></div>\n\t\t\t<div class=\\\"footer\\\">\n\t\t\t\t<span>© \" . date(\"Y\") . \" Manuel Sollberger</span>\n\t\t\t\t<span>・</span>\n\t\t\t\t<a href=\\\"privacy.php\\\">Datenschutz</a>\n\t\t\t</div>\n\t\t</div>\n\t</body>\n</html>\";\n\t\t}", "function form_smiles(){\r\n\r\n\tglobal $bName, $db;\r\n\r\n\t//TODO improve this so that it works with pages not needing this check.\r\n\tif ($bName['Smiles'] == 0){\r\n\t\t$smile = '';\r\n\t}else{\r\n\t\t$smile = '';\r\n\t\t$x = 0;\r\n\t\t$db->SQL = \"SELECT DISTINCT img_name, code FROM ebb_smiles limit 30\";\r\n\t\t$smiles = $db->query();\r\n\r\n\t\twhile($row = mysql_fetch_assoc($smiles)){\r\n\t\t\tif (($x % 30) == 0) {\r\n\t\t\t\t//line break once we've reached our number per row assigned.\r\n\t\t\t\t$smile .= \"<br />\";\r\n\r\n\t\t\t\t//reset counter for next row.\r\n\t\t\t\t$x = 0;\r\n\t\t\t}\r\n\r\n\t\t\t//output smiles and increment counter.\r\n\t\t\t$smile .= '<a href=\"#smiles\" title=\"'.$row['code'].'\"><img src=\"images/smiles/'.$row['img_name'].'\" alt=\"'.$row['code'].'\" /></a>';\r\n\t\t\t$x++;\r\n\t\t}\r\n\t}\r\n\treturn ($smile);\r\n}", "public function get_template_bottom()\n {\n return \"content/bottom/content/object_table_list.tpl\";\n }", "public function generate_html();", "public function footer() {\n\t\t// depending on the search string, the result set can be\n\t\t// limited. So we need first to count the total number of\n\t\t// corresponding items. Then get a slice of them in the\n\t\t// generation of the body.\n\t\tif (!is_null($this->model)) {\n\t\t\t$nb_items = $this->model->getCount(array('view' => $this->model_view, 'filter' => $this->filter()));\n\t\t} else {\n\t\t\t$nb_items = $this->items->count();\n\t\t}\n\t\t$this->nb_items = $nb_items;\n\t\tif ($nb_items <= $this->items_per_page) {\n\t\t\treturn '';\n\t\t}\n\t\t$this->page_number = ceil($nb_items / $this->items_per_page);\n\t\tif ($this->current_page > $this->page_number) {\n\t\t\t$this->current_page = 1;\n\t\t}\n\t\t$params = $this->initial_params;\n\t\tif (!empty($this->search_fields)) {\n\t\t\tif (!empty($this->search_string)) {\n\t\t\t\t$params['s'] = $this->search_string;\n\t\t\t}\n\t\t\t$params['p'] = $this->current_page;\n\t\t}\n\t\tif (!empty($this->sort_order)) {\n\t\t\t$params['sk'] = $this->sort_order[0];\n\t\t\t$params['so'] = ($this->sort_order[1] == 'ASC') ? 'a' : 'd';\n\t\t}\n\t\t// Add the filtering\n\t\tif (!empty($this->active_list_filter)) {\n\t\t\t$params['fk'] = $this->active_list_filter[0];\n\t\t\t$params['fv'] = $this->active_list_filter[1];\n\t\t}\n\t\t$out = '<tfoot><tr><th colspan=\"'.count($this->list_display).'\">'.\"\\n\";\n\t\tif ($this->current_page != 1) {\n\t\t\t$params['p'] = $this->current_page - 1;\n\t\t\t$url = $this->getUrl($params);\n\t\t\t$this->symbol_prev = ($this->symbol_prev == null) ? __('Prev') : $this->symbol_prev;\n\t\t\t$out .= '<a href=\"'.$url.'\">'.$this->symbol_prev.'</a> ';\n\t\t}\n\t\t// Always display the link to Page#1\n\t\t$i=1;\n\t\t$params['p'] = $i;\n\t\t$class = ($i == $this->current_page) ? ' class=\"px-current-page\"' : '';\n\t\t$url = $this->getUrl($params);\n\t\t$out .= '<a'.$class.' href=\"'.$url.'\">'.$this->symbol_first.'</a> ';\n\t\t// Display the number of pages given $this->max_number_pages\n\t\tif ($this->max_number_pages > 0) {\n\t\t\t$nb_pa = floor($this->max_number_pages/2);\n\t\t\t$imin = $this->current_page - $nb_pa;\n\t\t\t$imax = $this->current_page + $nb_pa;\n\t\t\t// We put the separator if $imin is at leat greater than 2\n\t\t\tif ($imin > 2) {\n\t\t\t\t$out .= ' '.$this->max_number_pages_separator.' ';\n\t\t\t}\n\t\t\tif ($imin <= 1) {\n\t\t\t\t$imin=2;\n\t\t\t}\n\t\t\tif ($imax >= $this->page_number) {\n\t\t\t\t$imax = $this->page_number - 1;\n\t\t\t}\n\t\t} else {\n\t\t\t$imin = 2;\n\t\t\t$imax = $this->page_number - 1;\n\t\t}\n\t\tfor ($i=$imin; $i<=$imax; $i++) {\n\t\t\t$params['p'] = $i;\n\t\t\t$class = ($i == $this->current_page) ? ' class=\"px-current-page\"' : '';\n\t\t\t$url = $this->getUrl($params);\n\t\t\t$out .= '<a'.$class.' href=\"'.$url.'\">'.$i.'</a> ';\n\t\t}\n\t\tif (($this->max_number_pages > 0) && $imax < ($this->page_number - 1)) {\n\t\t\t$out .= ' '.$this->max_number_pages_separator.' ';\n\t\t}\n\t\t// Always display the link to last Page\n\t\t$i = $this->page_number;\n\t\t$params['p'] = $i;\n\t\t$class = ($i == $this->current_page) ? ' class=\"px-current-page\"' : '';\n\t\t$url = $this->getUrl($params);\n\t\tif ($this->symbol_last == null) {\n\t\t\t$this->symbol_last=$i;\n\t\t}\n\t\t$out .= '<a'.$class.' href=\"'.$url.'\">'.$this->symbol_last.'</a> ';\n\t\tif ($this->current_page != $this->page_number) {\n\t\t\t$params['p'] = $this->current_page + 1;\n\t\t\t$url = $this->getUrl($params);\n\t\t\t$this->symbol_next = ($this->symbol_next == null) ? __('Next') : $this->symbol_next;\n\t\t\t$out .= '<a href=\"'.$url.'\">'.$this->symbol_next.'</a> ';\n\t\t}\n\t\t$out .= '</th></tr></tfoot>'.\"\\n\";\n\t\treturn $out;\n\t}", "private function computepagelimit() {\n $this->pageparam->yend = 0;\n $this->pageparam->ytabstart = 0;\n foreach ($this->template as $elt) {\n if ($elt->type == \"activities\") {\n $this->pageparam->ytabstart = $elt->location->y;\n }\n $this->pageparam->yend = $elt->location->y;\n }\n $this->pageparam->ytabend = -1;\n foreach ($this->template as $elt) {\n if ($elt->location->y > $this->pageparam->ytabstart && $this->pageparam->ytabend == -1) {\n $this->pageparam->ytabend = $elt->location->y;\n }\n }\n if ($this->pageparam->ytabend == -1) {\n $this->pageparam->ytabend = $this->pageparam->pageheight - 30;\n }\n if ($this->pageparam->yend == $this->pageparam->ytabstart) {\n $this->pageparam->yend = $this->pageparam->ytabend;\n }\n }", "function htmlEnd() {\n\techo <<<'EOD'\n\t</body>\n</html>\nEOD;\n}", "function output(){\n\n\t\tif ($this->breadcrumbs) {\n\t\t\t\n\t\t\t$output = $this->start;\n\n\t\t\tforeach ($this->breadcrumbs as $key => $crumb) {\n\t\t\t\tif ($key){ \n\t\t\t\t\t$output .= $this->separator;\n\t\t\t\t}\n\n\t\t\t\tif (end(array_keys($this->breadcrumbs)) == $key) {\n// \t\t\t\t\t$output .= '<span>' . $crumb['title'] . '</span>';\t\n\t\t\t\t\t$output .= '<li><strong>'.$crumb['title'].'</strong></li>'; //=> add new\n\t\t\t\t} else {\n// \t\t\t\t\t$output .= '<a href=\"' . $crumb['href'] . '\">' . $crumb['title'] . '</a>';\n\t\t\t\t\t$output .= '<li><strong><a href=\"' . $crumb['href'] . '\">' . $crumb['title'] . '</a></strong></li>'; //=> add new\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\treturn $output . $this->end . PHP_EOL;\n\t\t}\n\t\t\n\t\treturn '';\n\t}", "public function includes_toprank_mrmonthly() \n\t{\n\t\tglobal $home_module; // PHP Globals\r\n\r\n\t\t$CTM_HTML = NULL;\n\t\t$CTM_HTML .= \" \t<div id=\\\"Ranking_MResetsMonthly\\\" class=\\\"currentRanking\\\">\r\n \t\".(count($home_module['rankings']['mresetsMonthly']) > 0 ? \"\".($this->settings['HOME']['TOP_RANK']['MR_MONTHLY'][2] == true ? \"<ul class=\\\"topRanks\\\">\r\n \t\".$this->loop__includes_toprank_mrmonthly__0x0E().\"\r\n \t\t</ul>\" : \"<ul class=\\\"ranks-classic\\\">\r\n <li>\r\n <span>{$this->lang->words['Home']['TopRank']['Words']['Position']}</span>\r\n <span>{$this->lang->words['Home']['TopRank']['Words']['Name']}</span>\r\n <span>{$this->lang->words['Home']['TopRank']['Words']['MRMonthly']}</span>\r\n </li>\r\n \".$this->loop__includes_toprank_mrmonthly__0x0F().\"\r\n </ul>\").\"\" : NULL).\"\r\n \t\t</div>\";\n\t\treturn $CTM_HTML;\n\t}", "public function getLastUrl()\n {\n $url = '';\n $total_pages = $this->getTotalPages();\n if ($this->current_page < $total_pages) {\n $url = $this->getBaseUrl();\n\n if ($this->friendly_url) {\n $url .= $this->page_index.$total_pages.'/';\n } else {\n $url = $this->appendQueryString($url, $this->page_index.'='.$total_pages);\n }\n\n $url = sprintf('<li><a href=\\'%s\\' class=\\'pagination_last\\'><span>%s</span></a></li>', $url, $this->last_text);\n }\n\n return $url;\n }", "public static function getTuileAdd() {\n $html = '<div class=\"col-md-4 col-sm-6 col-xs-12\"><div class=\"cov-group add-group\">';\n $html .= '<h3>Ajouter un groupe</h3>';\n $html .= '<hr />';\n $html .= '<a href=\"' . EditVue::getUrl() . '\">'.Html::getIcon('plus-circle').'</a>';\n $html .= '</div></div>';\n return $html;\n }", "function caden_onefourthlast( $atts, $content = null) {\n\treturn '<div class=\"one_fourth last\">' . remove_wpautop($content) . '</div>';\n}", "public function endPage(){\n\t\tglue::trigger('afterRender');\n\n\t\t$content = ob_get_clean();\n\t\techo strtr($content, array(\n\t\t\t$this->tpl_head => $this->renderHeadHtml(),\n\t\t\t$this->tpl_body_begin => $this->renderBodyBeginHtml(),\n\t\t\t$this->tpl_body_end => $this->renderBodyEndHtml(),\n\t\t));\n\n\t\tunset(\n\t\t\t\t$this->metaTags,\n\t\t\t\t$this->linkTags,\n\t\t\t\t$this->css,\n\t\t\t\t$this->cssFiles,\n\t\t\t\t$this->js,\n\t\t\t\t$this->jsFiles\n\t\t);\n\t}", "function wrap_html_finish() {\r\n $html .= '</div>';\r\n }", "function jig_blank_gallery($output, $attr) {\r\n\t\t\treturn '';\r\n\t\t}", "function rect_end()\r\n{\r\n return \"</div>\";\r\n}", "public function getEndTag(){\n return '</form';\n }", "abstract function writeHTML();" ]
[ "0.824187", "0.6016124", "0.5742102", "0.5513325", "0.542914", "0.5406722", "0.54057807", "0.5400331", "0.53458476", "0.5338813", "0.5311363", "0.52825874", "0.527697", "0.5264651", "0.5262619", "0.5260395", "0.52432334", "0.52293086", "0.522926", "0.52194566", "0.52188754", "0.5215406", "0.5212738", "0.51198435", "0.5112601", "0.51034176", "0.50944245", "0.50944245", "0.5092001", "0.50828177", "0.5056726", "0.5045618", "0.50441056", "0.50441056", "0.50340486", "0.5029235", "0.50255966", "0.5025255", "0.5020694", "0.5014888", "0.50011706", "0.49823284", "0.4976822", "0.49759716", "0.49753925", "0.49739483", "0.49670792", "0.49570546", "0.49534303", "0.4944252", "0.49345803", "0.49252978", "0.49227118", "0.49209523", "0.49155974", "0.49152535", "0.49151096", "0.49095145", "0.49088657", "0.49049193", "0.490409", "0.49015945", "0.48994267", "0.4898986", "0.4891661", "0.48853204", "0.487905", "0.4870906", "0.48654127", "0.48462728", "0.48457578", "0.4838714", "0.483483", "0.48337573", "0.48331288", "0.48307857", "0.4827326", "0.48267823", "0.482224", "0.48212385", "0.48180667", "0.4817643", "0.48131222", "0.48028737", "0.480187", "0.47976282", "0.47962648", "0.47929594", "0.47880176", "0.4780986", "0.47723195", "0.47697797", "0.47674638", "0.4759946", "0.4756158", "0.4754052", "0.47456962", "0.4743698", "0.47428885", "0.47392577" ]
0.70564574
1
Gets the currency symbol associated to a Currency Code
Получает символ валюты, связанный с кодом валюты
public function getCurrencySymbol(){ $currency_code = Mage::app()->getStore()->getBaseCurrencyCode(); return Mage::app()->getLocale()->currency( $currency_code )->getSymbol(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCurrencySymbol($code)\n {\n $currency = $this->_localeCurrency->getCurrency($code);\n return $currency->getSymbol() ? $currency->getSymbol() : $currency->getShortName();\n }", "function getCurrencySymbol() {\n\treturn Cache::rememberForever('symbol', function() {\n\t return Currency::where('code', getSetting('CURRENCY'))->first()->symbol;\n\t});\n}", "public function getBaseCurrencySymbol();", "public function getCurrencySymbol(){\n\t\t$currency \t= $this->input->post('currency');\n\t\t$symbol \t= $this->currency_converter->get_currency_symbol($currency);\n\t\techo $symbol;\n\t}", "public function getCurrencySymbol($code)\n {\n $format = new NumberFormatter(\"en-GB@currency=$code\", NumberFormatter::CURRENCY);\n $symbol = $format->getSymbol(NumberFormatter::CURRENCY_SYMBOL);\n // check if the string has a symbol\n if(preg_match('/[^a-zA-Z\\d]/', $symbol)) {\n // remove alpha characters leaving just the symbol\n return preg_replace(\"/[a-zA-Z]/\", \"\", $symbol);\n }\n return $symbol;\n }", "function currency()\n {\n $school = School::setup();\n $currency = new Gerardojbaez\\Money\\Currency($school->currency);\n return $currency->getSymbol(); \n }", "function fine_get_currency_symbol($isocode) {\r\n\treturn FineCurrencyUtils::getCurrencySymbol($isocode);\r\n}", "public function getCurrencyCode();", "public function getCurrencyCode();", "public function getCurrencyCode();", "public function getCurrencyCode();", "public function getCurrentCurrencySymbol()\n {\n return $this->_currency->getCurrencySymbol();\n }", "public function getCurrentCurrencySymbol(): string\n {\n return $this->currency->getCurrencySymbol();\n }", "public function getSymbol(string $currency): ?string;", "public function getCurrencyCode(): string\n {\n \\Logger::getLogger(\\get_class($this))\n ->info(\\sprintf(__METHOD__.\" get '%s'\", $this->currencyCode));\n return $this->currencyCode;\n }", "public function getCurrencySymbol($currency_code, $forceloadall = 0)\n {\n\t\t$currency_sign = '';\t// By default return iso code\n\n\t\tif (function_exists(\"mb_convert_encoding\"))\n\t\t{\n\t\t\t$this->loadCacheCurrencies($forceloadall?'':$currency_code);\n\n\t\t\tif (isset($this->cache_currencies[$currency_code]) && ! empty($this->cache_currencies[$currency_code]['unicode']) && is_array($this->cache_currencies[$currency_code]['unicode']))\n\t\t\t{\n\t\t\t\tforeach($this->cache_currencies[$currency_code]['unicode'] as $unicode)\n\t\t\t\t{\n\t\t\t\t\t$currency_sign .= mb_convert_encoding(\"&#{$unicode};\", \"UTF-8\", 'HTML-ENTITIES');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn ($currency_sign?$currency_sign:$currency_code);\n }", "public function getCurrencySymbol(){\n\t\treturn $this->_data->itemAt('geoplugin_currencySymbol');\n\t}", "public function getCurrencySymbolAttribute()\n {\n $trips= Trips::where('request_id', $this->attributes['id']);\n if ($trips->count()) {\n $code = @$trips->get()->first()->currency_code;\n\n return Currency::where('code', $code)->first()->symbol;\n } else {\n return \"$\";\n }\n }", "public function getCurrencyCode() {\n \tif( version_compare( VERSION , '2.2.0.0' , '>=' ) ) {\n \t\treturn $this->session->data[ 'currency' ];\n \t}\n \telse {\n \t\treturn $this->currency->getCode();\n \t}\n }", "public function getCurrencyCode()\n {\n return isset($this->currency_code) ? $this->currency_code : '';\n }", "public static function getCurrencyCode(){\r\n\t\treturn self::getQuote()->getQuoteCurrencyCode();\r\n\t}", "public function getCurrencyCode()\n\t{\n\t\treturn $this->currency_code;\n\t}", "public function getCurrencyCode(){\n\t\treturn $this->_data->itemAt('geoplugin_currencyCode');\n\t}", "public function getCurrencyCode()\n {\n return $this->currency_code;\n }", "public function getCurrencySymbol($currencyCode = null): string\n {\n if (!extension_loaded('intl')) {\n throw new InvalidConfigException('Locale component requires PHP intl extension to be installed.');\n }\n\n $locale = $this->locale;\n\n if ($currencyCode !== null) {\n $locale = $locale->withCurrency($currencyCode);\n }\n\n $formatter = new NumberFormatter((string)$locale, NumberFormatter::CURRENCY);\n return $formatter->getSymbol(NumberFormatter::CURRENCY_SYMBOL);\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getBaseCurrencyCode();", "public function getBaseCurrencyCode();", "public function getCalcCurrencyCode();", "public function getCurrencyCode()\n {\n return $this->getParameter('CurrencyCode');\n }", "public function getCurrencyCode()\n {\n return $this->getParameter('CurrencyCode');\n }", "function getCurrencyCode() {\n\t\treturn $this->m_currencyCode;\n\t}", "public function _getSymbol(){\n if(is_null($this->CryptoCoinSymbol)) throw new Exception(\"Error : CryptoCoinSymbol is not defined\", 1);\n return $this->CryptoCoinSymbol;\n }", "public function getCurrencyCode()\n\t{\n\t\t$column = self::COL_CURRENCY_CODE;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (string)$v;\n\t\t}\n\n\t\treturn $v;\n\t}", "public function getCurrencyCode()\n {\n return $this->_currencyCode;\n }", "public function currencyCode()\n\t{\n\t\t$currencies = array(\n\t\t\t\t\t'AUD' => array(\n\t\t\t\t\t'label' => 'Australian Dollar',\n\t\t\t\t\t'format' => '$',\n\t\t\t\t\t),\n\t\t\t\t\t'CAD' => array(\n\t\t\t\t\t'label' => 'Canadian Dollar',\n\t\t\t\t\t'format' => '$',\n\t\t\t\t\t),\n\t\t\t\t\t'EUR' => array(\n\t\t\t\t\t\t'label' => 'Euro',\n\t\t\t\t\t\t'format' => '€',\n\t\t\t\t\t),\n\t\t\t\t\t'GBP' => array(\n\t\t\t\t\t\t'label' => 'Pound Sterling',\n\t\t\t\t\t\t'format' => '£',\n\t\t\t\t\t),\n\t\t\t\t\t'JPY' => array(\n\t\t\t\t\t\t'label' => 'Japanese Yen',\n\t\t\t\t\t\t'format' => '¥',\n\t\t\t\t\t),\n\t\t\t\t\t'USD' => array(\n\t\t\t\t\t\t'label' => 'U.S. Dollar',\n\t\t\t\t\t\t'format' => '$',\n\t\t\t\t\t),\n\t\t\t\t\t'NZD' => array(\n\t\t\t\t\t\t'label' => 'N.Z. Dollar',\n\t\t\t\t\t\t'format' => '$',\n\t\t\t\t\t),\n\t\t\t\t\t'CHF' => array(\n\t\t\t\t\t\t'label' => 'Swiss Franc',\n\t\t\t\t\t\t'format' => 'Fr',\n\t\t\t\t\t),\n\t\t\t\t\t'HKD' => array(\n\t\t\t\t\t\t'label' => 'Hong Kong Dollar',\n\t\t\t\t\t\t'format' => '$ ',\n\t\t\t\t\t),\n\t\t\t\t\t'SGD' => array(\n\t\t\t\t\t\t'label' => 'Singapore Dollar',\n\t\t\t\t\t\t'format' => '$',\n\t\t\t\t\t),\n\t\t\t\t\t'SEK' => array(\n\t\t\t\t\t\t'label' => 'Swedish Krona',\n\t\t\t\t\t\t'format' => 'kr',\n\t\t\t\t\t),\n\t\t\t\t\t'DKK' => array(\n\t\t\t\t\t\t'label' => 'Danish Krone',\n\t\t\t\t\t\t'format' => 'kr',\n\t\t\t\t\t),\n\t\t\t\t\t'PLN' => array(\n\t\t\t\t\t\t'label' => 'Polish Zloty',\n\t\t\t\t\t\t'format' => 'zł',\n\t\t\t\t\t),\n\t\t\t\t\t'NOK' => array(\n\t\t\t\t\t\t'label' => 'Norwegian Krone',\n\t\t\t\t\t\t'format' => 'kr',\n\t\t\t\t\t),\n\t\t\t\t\t'HUF' => array(\n\t\t\t\t\t\t'label' => 'Hungarian Forint',\n\t\t\t\t\t\t'format' => 'Ft',\n\t\t\t\t\t),\n\t\t\t\t\t'CZK' => array(\n\t\t\t\t\t\t'label' => 'Czech Koruna',\n\t\t\t\t\t\t'format' => 'Kč',\n\t\t\t\t\t),\n\t\t\t\t\t'ILS' => array(\n\t\t\t\t\t\t'label' => 'Israeli New Sheqel',\n\t\t\t\t\t\t'format' => '₪',\n\t\t\t\t\t),\n\t\t\t\t\t'MXN' => array(\n\t\t\t\t\t\t'label' => 'Mexican Peso',\n\t\t\t\t\t\t'format' => '$',\n\t\t\t\t\t),\n\t\t\t\t\t'BRL' => array(\n\t\t\t\t\t\t'label' => 'Brazilian Real',\n\t\t\t\t\t\t'format' => 'R$ ',\n\t\t\t\t\t),\n\t\t\t\t\t'MYR' => array(\n\t\t\t\t\t\t'label' => 'Malaysian Ringgit',\n\t\t\t\t\t\t'format' => 'RM ',\n\t\t\t\t\t),\n\t\t\t\t\t'PHP' => array(\n\t\t\t\t\t\t'label' => 'Philippine Peso',\n\t\t\t\t\t\t'format' => '₱ ',\n\t\t\t\t\t),\n\t\t\t\t\t'TWD' => array(\n\t\t\t\t\t\t'label' => 'New Taiwan Dollar',\n\t\t\t\t\t\t'format' => 'NT$ ',\n\t\t\t\t\t),\n\t\t\t\t\t'THB' => array(\n\t\t\t\t\t\t'label' => 'Thai Baht',\n\t\t\t\t\t\t'format' => '฿ ',\n\t\t\t\t\t),\n\t\t\t\t\t'TRY' => array(\n\t\t\t\t\t\t'label' => 'Turkish Lira',\n\t\t\t\t\t\t'format' => 'TRY ', // Unicode is ₺ but this doesn't seem to be widely supported yet (introduced Sep 2012)\n\t\t\t\t\t),\n\t\t\t\t\t'RUB' => array(\n\t\t\t\t\t\t\t'label'=>'Russian Rubel',\n\t\t\t\t\t\t\t'format'=>'руб'\n\t\t\t\t\t),\n\t\t\t);\n\t\n\t\n\t\treturn $currencies;\n\t}", "public static function currencySymbol()\n {\n return static::randomElement(static::$currencySymbol);\n }", "public function symbol(Currency $currency)\n {\n return $this->moneyFormatter->formatCurrencyAsSymbol($currency);\n }", "public function getCurrency()\n {\n return \\XLite\\Core\\Database::getRepo('\\XLite\\Model\\Currency')->findOneByCode($this->currency)\n ?: $this->currency;\n }", "function wppb_get_currency_symbol( $currency_code ) {\r\n\r\n $currency_symbols = array(\r\n 'AED' => '&#1583;.&#1573;', // ?\r\n 'AFN' => '&#65;&#102;',\r\n 'ALL' => '&#76;&#101;&#107;',\r\n 'AMD' => '',\r\n 'ANG' => '&#402;',\r\n 'AOA' => '&#75;&#122;', // ?\r\n 'ARS' => '&#36;',\r\n 'AUD' => '&#36;',\r\n 'AWG' => '&#402;',\r\n 'AZN' => '&#1084;&#1072;&#1085;',\r\n 'BAM' => '&#75;&#77;',\r\n 'BBD' => '&#36;',\r\n 'BDT' => '&#2547;', // ?\r\n 'BGN' => '&#1083;&#1074;',\r\n 'BHD' => '.&#1583;.&#1576;', // ?\r\n 'BIF' => '&#70;&#66;&#117;', // ?\r\n 'BMD' => '&#36;',\r\n 'BND' => '&#36;',\r\n 'BOB' => '&#36;&#98;',\r\n 'BRL' => '&#82;&#36;',\r\n 'BSD' => '&#36;',\r\n 'BTN' => '&#78;&#117;&#46;', // ?\r\n 'BWP' => '&#80;',\r\n 'BYR' => '&#112;&#46;',\r\n 'BZD' => '&#66;&#90;&#36;',\r\n 'CAD' => '&#36;',\r\n 'CDF' => '&#70;&#67;',\r\n 'CHF' => '&#67;&#72;&#70;',\r\n 'CLF' => '', // ?\r\n 'CLP' => '&#36;',\r\n 'CNY' => '&#165;',\r\n 'COP' => '&#36;',\r\n 'CRC' => '&#8353;',\r\n 'CUP' => '&#8396;',\r\n 'CVE' => '&#36;', // ?\r\n 'CZK' => '&#75;&#269;',\r\n 'DJF' => '&#70;&#100;&#106;', // ?\r\n 'DKK' => '&#107;&#114;',\r\n 'DOP' => '&#82;&#68;&#36;',\r\n 'DZD' => '&#1583;&#1580;', // ?\r\n 'EGP' => '&#163;',\r\n 'ETB' => '&#66;&#114;',\r\n 'EUR' => '&#8364;',\r\n 'FJD' => '&#36;',\r\n 'FKP' => '&#163;',\r\n 'GBP' => '&#163;',\r\n 'GEL' => '&#4314;', // ?\r\n 'GHS' => '&#162;',\r\n 'GIP' => '&#163;',\r\n 'GMD' => '&#68;', // ?\r\n 'GNF' => '&#70;&#71;', // ?\r\n 'GTQ' => '&#81;',\r\n 'GYD' => '&#36;',\r\n 'HKD' => '&#36;',\r\n 'HNL' => '&#76;',\r\n 'HRK' => '&#107;&#110;',\r\n 'HTG' => '&#71;', // ?\r\n 'HUF' => '&#70;&#116;',\r\n 'IDR' => '&#82;&#112;',\r\n 'ILS' => '&#8362;',\r\n 'INR' => '&#8377;',\r\n 'IQD' => '&#1593;.&#1583;', // ?\r\n 'IRR' => '&#65020;',\r\n 'ISK' => '&#107;&#114;',\r\n 'JEP' => '&#163;',\r\n 'JMD' => '&#74;&#36;',\r\n 'JOD' => '&#74;&#68;', // ?\r\n 'JPY' => '&#165;',\r\n 'KES' => '&#75;&#83;&#104;', // ?\r\n 'KGS' => '&#1083;&#1074;',\r\n 'KHR' => '&#6107;',\r\n 'KMF' => '&#67;&#70;', // ?\r\n 'KPW' => '&#8361;',\r\n 'KRW' => '&#8361;',\r\n 'KWD' => '&#1583;.&#1603;', // ?\r\n 'KYD' => '&#36;',\r\n 'KZT' => '&#1083;&#1074;',\r\n 'LAK' => '&#8365;',\r\n 'LBP' => '&#163;',\r\n 'LKR' => '&#8360;',\r\n 'LRD' => '&#36;',\r\n 'LSL' => '&#76;', // ?\r\n 'LTL' => '&#76;&#116;',\r\n 'LVL' => '&#76;&#115;',\r\n 'LYD' => '&#1604;.&#1583;', // ?\r\n 'MAD' => '&#1583;.&#1605;.', //?\r\n 'MDL' => '&#76;',\r\n 'MGA' => '&#65;&#114;', // ?\r\n 'MKD' => '&#1076;&#1077;&#1085;',\r\n 'MMK' => '&#75;',\r\n 'MNT' => '&#8366;',\r\n 'MOP' => '&#77;&#79;&#80;&#36;', // ?\r\n 'MRO' => '&#85;&#77;', // ?\r\n 'MUR' => '&#8360;', // ?\r\n 'MVR' => '.&#1923;', // ?\r\n 'MWK' => '&#77;&#75;',\r\n 'MXN' => '&#36;',\r\n 'MYR' => '&#82;&#77;',\r\n 'MZN' => '&#77;&#84;',\r\n 'NAD' => '&#36;',\r\n 'NGN' => '&#8358;',\r\n 'NIO' => '&#67;&#36;',\r\n 'NOK' => '&#107;&#114;',\r\n 'NPR' => '&#8360;',\r\n 'NZD' => '&#36;',\r\n 'OMR' => '&#65020;',\r\n 'PAB' => '&#66;&#47;&#46;',\r\n 'PEN' => '&#83;&#47;&#46;',\r\n 'PGK' => '&#75;', // ?\r\n 'PHP' => '&#8369;',\r\n 'PKR' => '&#8360;',\r\n 'PLN' => '&#122;&#322;',\r\n 'PYG' => '&#71;&#115;',\r\n 'QAR' => '&#65020;',\r\n 'RON' => '&#108;&#101;&#105;',\r\n 'RSD' => '&#1044;&#1080;&#1085;&#46;',\r\n 'RUB' => '&#1088;&#1091;&#1073;',\r\n 'RWF' => '&#1585;.&#1587;',\r\n 'SAR' => '&#65020;',\r\n 'SBD' => '&#36;',\r\n 'SCR' => '&#8360;',\r\n 'SDG' => '&#163;', // ?\r\n 'SEK' => '&#107;&#114;',\r\n 'SGD' => '&#36;',\r\n 'SHP' => '&#163;',\r\n 'SLL' => '&#76;&#101;', // ?\r\n 'SOS' => '&#83;',\r\n 'SRD' => '&#36;',\r\n 'STD' => '&#68;&#98;', // ?\r\n 'SVC' => '&#36;',\r\n 'SYP' => '&#163;',\r\n 'SZL' => '&#76;', // ?\r\n 'THB' => '&#3647;',\r\n 'TJS' => '&#84;&#74;&#83;', // ? TJS (guess)\r\n 'TMT' => '&#109;',\r\n 'TND' => '&#1583;.&#1578;',\r\n 'TOP' => '&#84;&#36;',\r\n 'TRY' => '&#8356;', // New Turkey Lira (old symbol used)\r\n 'TTD' => '&#36;',\r\n 'TWD' => '&#78;&#84;&#36;',\r\n 'TZS' => '',\r\n 'UAH' => '&#8372;',\r\n 'UGX' => '&#85;&#83;&#104;',\r\n 'USD' => '&#36;',\r\n 'UYU' => '&#36;&#85;',\r\n 'UZS' => '&#1083;&#1074;',\r\n 'VEF' => '&#66;&#115;',\r\n 'VND' => '&#8363;',\r\n 'VUV' => '&#86;&#84;',\r\n 'WST' => '&#87;&#83;&#36;',\r\n 'XAF' => '&#70;&#67;&#70;&#65;',\r\n 'XCD' => '&#36;',\r\n 'XDR' => '',\r\n 'XOF' => '',\r\n 'XPF' => '&#70;',\r\n 'YER' => '&#65020;',\r\n 'ZAR' => '&#82;',\r\n 'ZMK' => '&#90;&#75;', // ?\r\n 'ZWL' => '&#90;&#36;',\r\n );\r\n\r\n if( !empty( $currency_symbols[$currency_code] ) )\r\n return $currency_symbols[$currency_code];\r\n else\r\n return '';\r\n\r\n}", "public function getCurrencyCode()\n {\n $value = $this->get(self::CURRENCYCODE);\n return $value === null ? (integer)$value : $value;\n }", "public function getCurrencyCode() { return $this->currencyCode; }", "function get_currency_code (){\n return $this->currency_code ;\n }", "public function getCurrency(): string\n {\n return $this->_data->currency;\n }", "public function getCurrencySymbol() { return $this->currencySymbol; }", "public function getCurrencyCode()\n {\n return Mage::app()->getStore()->getCurrentCurrencyCode();\n }", "public function getCurrencyCode()\n {\n if (is_null($this->currencyCode)) {\n /** @psalm-var ?string $data */\n $data = $this->raw(self::FIELD_CURRENCY_CODE);\n if (is_null($data)) {\n return null;\n }\n $this->currencyCode = (string) $data;\n }\n\n return $this->currencyCode;\n }", "function ecommerce_get_currency_symbol()\n{\n\t$currency=get_option('currency');\n\tswitch ($currency)\n\t{\n\t\tcase 'USD':\n\t\t\t$currency='$';\n\t\t\tbreak;\n\t\tcase 'CAD':\n\t\t\t$currency='$';\n\t\t\tbreak;\n\t\tcase 'EUR':\n\t\t\t$currency='&euro;';\n\t\t\tbreak;\n\t\tcase 'GBP':\n\t\t\t$currency='&pound;';\n\t\t\tbreak;\n\t\tcase 'JPY':\n\t\t\t$currency='&yen;';\n\t\t\tbreak;\n\t\tcase 'AUD':\n\t\t\t$currency='$';\n\t\t\tbreak;\n\t}\n\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($currency);\n\treturn $currency;\n}", "function learn_press_get_currency_symbol( $currency = '' ) {\n\tif ( ! $currency ) {\n\t\t$currency = learn_press_get_currency();\n\t}\n\t$symbols = learn_press_currency_symbols();\n\t$currency_symbol = isset( $symbols[ $currency ] ) ? $symbols[ $currency ] : '';\n\n\t$currency_symbol = apply_filters( 'learn_press_currency_symbol', $currency_symbol, $currency );\n\n\treturn apply_filters( 'learn-press/currency-symbol', $currency_symbol, $currency );\n}", "public function getCurrentCurrencyCode()\n {\n return $this->_storeManager->getStore()->getCurrentCurrencyCode();\n }", "public function getCurrency(): string\n {\n return $this->currency;\n }", "public function getCurrency(): string\n {\n\n return $this->currency;\n }", "public function getCurrency()\n {\n return Currency::find($this->attributes['currency']);\n }", "public function get_currency_alphabetic_code() {\n\t\treturn 'EUR';\n\t}", "public function getCurrency(): string {\n return $this->currency;\n }", "protected function getCurrentCurrencyCode()\n {\n return $this->storeManager->getStore()->getCurrentCurrency()->getCode();\n }", "function get_woocommerce_currency_symbol($currency = '')\n {\n }", "public function getCurrencyNumber();", "public function get_currencyCode() {\n\n return $this->currencyCode;\n\n }", "public function getCurrency(): string {\n return $this->currency;\n }", "public function getCurrencyName(): string;", "public function getCurrencyCode()\n {\n $curr = Mage::app()->getStore()->getCurrentCurrencyCode();\n\n if (strlen($curr)) {\n return $curr;\n }\n\n return self::DEFAULT_CURRENCY_CODE;\n }", "public static function getCode($currency)\n {\n if (array_key_exists($currency, static::$names)) return $currency;\n return array_search($currency, static::$names) ? : array_search($currency, static::$signs) ? : null;\n\n }", "public function getCurrentCurrencyCode()\n {\n // try to get currently set code among allowed\n $code = $this->_getSession()->getCurrencyCode();\n if (empty($code)) {\n $code = $this->getDefaultCurrencyCode();\n }\n if (in_array($code, $this->getAvailableCurrencyCodes(true))) {\n return $code;\n }\n\n // take first one of allowed codes\n $codes = array_values($this->getAvailableCurrencyCodes(true));\n if (empty($codes)) {\n // return default code, if no codes specified at all\n return $this->getDefaultCurrencyCode();\n }\n return array_shift($codes);\n }", "public function getCurrency() : string;", "function GetCurrencyCode($CurrencyCodeText)\n\t{\n\t\t$CurrencyCodes = array_flip($this->CurrencyCodes);\n\t\treturn $CurrencyCodes[$CurrencyCodeText];\n\t}", "public function getSymbol();", "public function getPricingCurrencyCode()\n {\n return $this->pricingCurrencyCode;\n }", "public function getCurrency(): string;", "public function getCurrency()\n {\n return $this->source['currency'];\n }", "public function getSpecificSymbol();", "function currency_symbol() {\n\t\treturn DEFAULT_CURRENCY;\n\t}", "public function symbol($currency = null)\n {\n if (!$currency) {\n $currency = $this->config->get('streams::currencies.default');\n }\n\n return $this->config->get('streams::currencies.supported.' . strtoupper($currency) . '.symbol');\n }", "public static function getCRMCurrencyName($code)\n\t{\n\t\treturn (new \\App\\Db\\Query())\n\t\t\t->select(['currency_name'])\n\t\t\t->from('vtiger_currencies')\n\t\t\t->where(['currency_code' => $code])\n\t\t\t->limit(1)->scalar();\n\t}", "function GetCurrencyCodeText($CurrencyCode)\n\t{\n\t\treturn $this->CurrencyCodes[$CurrencyCode];\n\t}", "private function getCurrencyCode()\n\t{\n\t\tif(is_null($this->currency)){\n\t\t\t$this->error('UNDEFINED_CURRENCY_CODE');\n\t\t\treturn false;\n\t\t}\n\t\t$currency = $this->currency;\n\t\t$this->currency = null;\n\t\treturn $currency;\n\t}", "public function getSymbol(): string\n {\n return $this->symbol;\n }", "public function getSymbol(): string\n {\n return $this->symbol;\n }", "public function getCurrency($currency);", "public function getCurrency()\n {\n return $this->order->getOrderCurrencyCode();\n }", "public function getBaseCurrency(): string;", "public function getCurrencyName($isoCode) {\n global $currencyConversion;\n return (isset($currencyConversion[$isoCode]) ? $currencyConversion[$isoCode] : '');\n }", "function getStoreCurrencysymbol($domain_id)\r\n {\r\n global $CFG, $objSmarty;\r\n $sel_qry = \"SELECT st.tax_rate,st.currency, cur.currency_type, cur.currency_symbol, cur.currency_image \".\r\n \" FROM \".$CFG['table']['store_details'].\" as st \".\r\n \" LEFT JOIN \".$CFG['table']['currencymanage'].\" as cur ON st.currency = cur.currency_code \".\r\n \" WHERE st.domain_id = '\".$this->filterInput($domain_id).\"'\";\r\n $res = $this->ExecuteQuery($sel_qry,'select');\r\n \r\n if($res[0]['currency_type'] == 'I'){\r\n $CFG['site']['currency_image']\t= $CFG['site']['photo_sitelogo_url'].'/'.$res['0']['currency_image']; \r\n \t\t\t$currency = '<img src=\"'.$CFG['site']['currency_image'].'\" title=\"\" alt=\"Currency\" width=\"10\" height=\"10\"/>';\r\n define(\"CURRENCY_SYMBOL\",$currency);\r\n \t\t}else{\r\n \t\t\t$currency = $res['0']['currency_symbol'];\r\n define(\"CURRENCY_SYMBOL\",$currency);\r\n \t\t}\t\r\n $currency_rate = 1.00;\r\n $objSmarty->assign(\"symbol\", CURRENCY_SYMBOL);\r\n $objSmarty->assign(\"rate\", $currency_rate);\r\n }", "public static function getCurrency(string $currencyCode)\n {\n return self::get('currencies', $currencyCode);\n }", "function _get_currency_symbol( $money_symbol )\n{\n if( $money_symbol =='dollar'){\n return '$';\n } \n\n if( $money_symbol =='pound'){\n return '&pound';\n } \n\n}", "public static function getBaseCurrencyCode(){\r\n\t\treturn self::getStore()->getBaseCurrencyCode();\r\n\t}", "public function getPaymentCurrencyCode()\n {\n return $this->paymentCurrencyCode;\n }", "function get_currency_symbol($id)\n{\n $ci = & get_instance();\n $ci->db->select('symbol');\n $ci->db->where('id',$id);\n return $ci->db->get('ci_currency')->row_array()['symbol'];\n}", "public static function getLabel($currencyCode)\n {\n return (string) $GLOBALS['TL_LANG']['CUR'][$currencyCode];\n }", "public function getSymbol()\n {\n return isset($this->symbol) ? $this->symbol : null;\n }", "public function getBaseCurrencyCode()\n {\n return $this->_storeManager->getStore()->getBaseCurrencyCode();\n }", "public function getCurrency();", "public function getCurrency();", "public function getCurrency();", "public function getBaseCurrencyCode(): string\n {\n try {\n return $this->storeManager->getStore()->getBaseCurrencyCode();\n } catch (NoSuchEntityException $e) {\n return $e->getMessage();\n }\n }" ]
[ "0.80351865", "0.8012351", "0.7996106", "0.7943977", "0.78381664", "0.7761684", "0.7750778", "0.7732496", "0.7732496", "0.7732496", "0.7732496", "0.7727348", "0.7693522", "0.76932716", "0.7603332", "0.75400317", "0.753985", "0.75129765", "0.746362", "0.7446806", "0.7385093", "0.7329827", "0.7319787", "0.7297494", "0.72788596", "0.7256228", "0.7256228", "0.7256228", "0.7256228", "0.7256228", "0.7256228", "0.7245663", "0.7245663", "0.72338665", "0.72062826", "0.72062826", "0.7198172", "0.71728873", "0.7169226", "0.71636194", "0.7139299", "0.71391284", "0.71267587", "0.71145576", "0.7113278", "0.7108363", "0.70789546", "0.7069131", "0.70499796", "0.70385766", "0.70203227", "0.701656", "0.69917077", "0.6964656", "0.6963593", "0.69258", "0.69143957", "0.68992287", "0.6892811", "0.6890835", "0.6873487", "0.6870473", "0.6836482", "0.6822902", "0.6810603", "0.680357", "0.6796827", "0.6781401", "0.6780176", "0.67781824", "0.67754537", "0.67680824", "0.6758623", "0.6752116", "0.67235005", "0.6723107", "0.6717329", "0.6716221", "0.6710949", "0.6702321", "0.66919136", "0.66887736", "0.66887736", "0.66742486", "0.66736555", "0.66735566", "0.6653985", "0.6651409", "0.6643575", "0.6629103", "0.6620726", "0.6603312", "0.6600311", "0.6597392", "0.6596909", "0.6594489", "0.6582345", "0.6582345", "0.6582345", "0.6580822" ]
0.8324204
0
/ funciones para transformar temperatura de celsius a fahrenheit
/ функции для преобразования температуры сельсия в фаренгейт
function fahrenheitCelsius($temperatura){ return ($temperatura-32)*5/9; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convertFtoC($tempValue) {\n // Fahrenheit to Celsius\n $calcTemp = ($tempValue - 32) * (5 / 9); \n return $calcTemp; \n}", "function convertTemp ($rawtemp,$useunit) {\r\n\t $dpTemp = 1;\r\n\t if(!is_numeric($rawtemp)) { return($rawtemp); } // no conversions for missing values\r\n\t if (preg_match('|C|i',$useunit)) { // convert F to C\r\n\t\treturn( sprintf(\"%01.${dpTemp}f\",round(($rawtemp-32.0) / 1.8,$dpTemp)));\r\n\t } else { // leave as F\r\n\t\treturn (sprintf(\"%01.${dpTemp}f\", round($rawtemp*1.0,$dpTemp)));\r\n\t }\r\n}", "function celciusToFarenhaite($celcius)\n{\n $convert=($celcius*9/5)+32;\n\n echo \"$celcius Celcius = $convert\";\n}", "function celciusToFahrenheit($celcius)\n{\n $conversi=($celcius * 9/5)+32;\n\n echo \"$celcius celcius = $conversi fahrenheit\";\n}", "function celciustofarenheit( $celcius)\n{\n $convernsi=($celcius*9/5)+32;\n\n echo \"$celcius celcius = $convernsi farenheit\";\n}", "protected static function convertCelsius(int $temp = 0)\n {\n $fahrenheit = $temp*(9/5)+32;\n \n return round($fahrenheit, -1, PHP_ROUND_HALF_UP);\n }", "protected static function convertCelsius(int $temp = 0): float\n {\n $fahrenheit = $temp*(9/5)+32;\n \n return round($fahrenheit, -1);\n }", "function my_ftoc($temp) {\n return( intval((5/9)*($temp -32)) );\n}", "function my_ctof($temp) {\n return( intval((9/5)* $temp + 32) );\n}", "static private function convert_fahrenheit_to_celsius( $fahrenheit ){\n\n return round( (($fahrenheit-32)*5)/9, 1 );\n\n }", "public function get_alt_temp($unit, $temp) {\r\n\t if($unit === 'F') {\r\n\t return $this->fahrenheit_to_celsius($temp);\r\n\t } \r\n\t else {\r\n\t return $this->celsius_to_fahrenheit($temp);\r\n\t }\r\n\t}", "function f2c($temp){\n return ($temp - 32) * 5/9;\n}", "function calcul_hours($temps)\n{\n //combien d'heures ?\n $hours = floor($temps / 3600);\n //combien de minutes ?\n $min = floor(($temps - ($hours * 3600)) / 60);\n if ($min < 10)\n $min = \"0\".$min;\n //combien de secondes\n $sec = $temps - ($hours * 3600) - ($min * 60);\n if ($sec < 10)\n $sec = \"0\".$sec;\n echo $hours.\"h\".$min.\"m\".$sec.\"s\";\n}", "function convertir($unidad,$cantidad){\n #de peso\n $conversiones['qq']=100;#quintal 100kg\n $conversiones['ton']=1000;\n $conversiones['g']=0.001;\n $conversiones['kg']=1;\n $conversiones['oz']=0.03;\n $conversiones['lb']=0.45;\n #de volumen\n $conversiones['ml']=0.001;\n $conversiones['lt']=1;\n $resultado=$conversiones[$unidad]*floatval($cantidad);\n return $resultado; \n}", "private function getTemp($temperature){\r\n\t\tif($this->temp_ == \"c\"){\r\n\t\t\treturn round(($temperature - 32) /1.8) . \"&deg;c\";\r\n\t\t} \r\n\t\t\r\n\t\treturn $temperature.\"&deg;f\";\r\n\t}", "function tempo()\n {\n return $this->km(pow($this->vdot, 1.73) - $this->vdot * 36 + 1340);\n }", "function convert_to() {\n\t\t\tif($this->type_param == \"fahrenheit\") {\n\t\t\t\treturn $this->to_fahrenheit();\n\t\t\t}\n\t\t\telse if($this->type_param == \"celsius\") {\n\t\t\t\treturn $this->to_celcius();\n\t\t\t}\n\t\t}", "function litres($t): float\n{\n return floor($t / 2);\n}", "function convertCtoF($C) {\n $F = ($C * 1.8) + 32;\n echo \"$C\" .\"Degrees Celcius\" . \" is equal to $F\" .\"Degrees Fahrenheit\";\n}", "function calculateCircuitTemp($params) {\n $desiredCircuitTemp=$params[\"MinFloorTemp\"];\n $addTemp=$params[\"MaxFloorTemp\"]-$params[\"MinFloorTemp\"];\n $tempspan=$params[\"OutsideNoHeatTemp\"]-$params[\"MinYearTemp\"];\n if ($tempspan==0) return 10; //Max-Temp=Min-Temp: No Heating\n $aktspan=$params[\"outsideTemp\"]-$params[\"MinYearTemp\"];\n if ($aktspan<0) return $params[\"MaxFloorTemp\"];\n if ($aktspan>$tempspan) return 10; //No Heating if actual Temp > Max-Temp for Heating\n $factor=$addTemp*(1-($aktspan/$tempspan));\n $desiredCircuitTemp+=ceil($factor);\n if ($params[\"BurnerState\"]) $desiredCircuitTemp+=$params[\"Hysteresis\"];\n return $desiredCircuitTemp;\n}", "function to_celsius() {\n\t\t\treturn ($this->weight_param - 32) * 1.8;\n\t\t}", "protected function convert°CTo°K() : float\n {\n return $this->input + 273.15;\n }", "protected function convert°FTo°C() : float\n {\n return ($this->input - 32) / 1.8;\n }", "function KtC($k)\n {\n return $k - 273.15; \n }", "function regla_tres($valor){\n $res = ($valor * PORCENTAJE) / SINTOMAS;\n return $res;\n }", "protected function convert°KTo°C() : float\n {\n return $this->input - 273.15;\n }", "protected function fahrenheitToCelsius($fahrenheit){\n \n $celsius = round(($fahrenheit - 32) / (9/5));\n $celsius = $celsius . \" C\";\n\n return $celsius;\n }", "public function prixTTC(){\n $prix_ttc = $this->prix_ht * self::$facteur_tva;\n return number_format($prix_ttc, 2);\n }", "function _computeInteretEmprunt($inempmtt, $inempduree, $inemptx) {\n // $tetxmens: taux mensuel de l'emprunt\n // $inempduree: durée emprunt\n $tetxmens=$inemptx/12;\n $temttmens= ($inempmtt * $tetxmens) / ( 1- pow(1+$tetxmens,$inempduree*12*-1)); //Montant des mensualités \n\n $crd=array(); // Tableau du capital restant dû chaque fin de mois\n $crd[0]=$inempmtt;\n $mip=array(); // Tableau des intérêts de chaque mois\n $mip[0]=0;\n for($mois=1;$mois<=$inempduree*12;$mois++) {\n $mip[$mois]=$crd[$mois-1]*$tetxmens;\n $crd[$mois] = ( pow(1+$tetxmens,$mois) * ($inempmtt - ( $temttmens/$tetxmens) ) ) + ($temttmens / $tetxmens );\n }\n array_shift($mip); // Supprime le mois 0\n array_shift($crd); // Supprime le mois 0\n return array($crd,$mip);\n }", "public function celsius_to_fahrenheit($given_value)\r\n {\r\n $fahrenheit=$given_value*9/5+32;\r\n return $fahrenheit ;\r\n }", "function tiempo_transcurrido($fecha_hace)\n{\n\tif(empty($fecha_hace))\n\t{\n\t\t return \"No hay fecha\";\n\t}\n \n\t$intervalos = array(\"segundo\", \"minuto\", \"hora\", \"día\", \"semana\", \"mes\", \"año\");\n\t$duraciones = array(\"60\",\"60\",\"24\",\"7\",\"4.35\",\"12\");\n \n\t$ahora = time();\n\t$Fecha_Unix = strtotime($fecha_hace);\n\t\n\tif(empty($Fecha_Unix))\n\t{ \n\t\t return \"Fecha incorracta\";\n\t}\n\n\tif($ahora > $Fecha_Unix)\n\t{ \n\t\t $diferencia = $ahora - $Fecha_Unix;\n\t\t $tiempo = \"Hace\";\n\t}\n\telse\n\t{\n\t\t $diferencia = $Fecha_Unix -$ahora;\n\t\t $tiempo = \"Dentro de\";\n\t}\n\n\tfor($j = 0; $diferencia >= $duraciones[$j] && $j < count($duraciones)-1; $j++)\n\t{\n\t $diferencia /= $duraciones[$j];\n\t}\n \n\t$diferencia = round($diferencia);\n\t\n\tif($diferencia != 1)\n\t{\n\t\t$intervalos[5].=\"e\"; //meses\n\t\t$intervalos[$j].= \"s\";\n\t}\n \n return \"$tiempo $diferencia $intervalos[$j]\";\n}", "protected function convert°FTo°K() : float\n {\n return ((($this->input - 32) * 5) / 9) + 273.15;\n }", "protected function convert°CTo°F() : float\n {\n return ($this->input * 1.8) + 32;\n }", "private function getTemp($temperature)\n {\n if ($this->temp_ == \"c\") {\n return round(($temperature - 32) / 1.8) . \"&deg;c\";\n }\n\n return $temperature . \"&deg;f\";\n }", "public function fahrenheit_to_celsius($given_value)\r\n {\r\n $celsius=5/9*($given_value-32);\r\n return $celsius ;\r\n }", "function tiempo_de_carga () {\r\n\t$tiempo_fin = getmicrotime();\r\n\t$tiempo = sprintf('%.4f', $tiempo_fin - TIEMPO_INICIO);\r\n\treturn $tiempo;\r\n}", "public static function montantTTC($montant){\nreturn $montant * 1.20;\n}", "function lcdproc_get_cpu_temperature() {\n\tglobal $config;\n\t$unit = config_get_path('installedpackages/lcdprocscreens/config/0/scr_cputemperature_unit', []);\n\n\t$temp_out = \"\";\n\t$temp_out = get_temp(); // Use function from includes/functions.inc.php\n\tif ($temp_out !== \"\") {\n\t\tswitch ($unit) {\n\t\t\tcase \"f\":\n\t\t\t\t$cputemperature = ($temp_out * 1.8) + 32;\n\t\t\t\treturn $cputemperature . \"F\";\n\t\t\t\tbreak;\n\t\t\tcase \"c\":\n\t\t\tdefault:\n\t\t\t\treturn $temp_out . \"C\";\n\t\t\t\tbreak;\n\t\t}\n\t} else {\n\t\t// sysctl probably returned \"unknown oid\"\n\t\treturn 'CPU Temp N/A';\n\t}\n}", "function prixttc($prixht, $tva){\n\t$prix_ht = (float)$prixht;\n\t$tvaAppliquer = (float)$tva;\n\n\treturn round($prixttc = $prix_ht + ($prix_ht * $tvaAppliquer),1, PHP_ROUND_HALF_EVEN);\n}", "public function toFahrenheit($c)\n {\n return ($c * (9/5)) + 32;\n }", "function mtr_get_temperature($part)\n{\n global $lang, $Debug, $mtrInfo, $metarPtr, $group, $UOMS;\n if (preg_match('/^(M?[0-9]{2})\\/(M?[0-9]{2}|[X]{2})?$/', $part, $pieces)) {\n $doMetric = preg_match('|C|', $UOMS['TEMP']);\n $tempC = (integer)strtr($pieces[1], 'M', '-');\n $tempF = round(1.8 * $tempC + 32);\n if (!$doMetric) {\n $mtrInfo['TEMP'] = $tempF . \"&deg;F (\" . $tempC . \"&deg;C)\";\n }\n else {\n $mtrInfo['TEMP'] = $tempC . \"&deg;C\";\n }\n\n mtr_get_wind_chill($tempF);\n if (isset($pieces[2]) and strlen($pieces[2]) != 0 && $pieces[2] != 'XX') {\n $dewC = (integer)strtr($pieces[2], 'M', '-');\n $dewF = round(1.8 * $dewC + 32);\n if (!$doMetric) {\n $mtrInfo['DEWPT'] = $dewF . \"&deg;F (\" . $dewC . \"&deg;C)\";\n }\n else {\n $mtrInfo['DEWPT'] = $dewC . \"&deg;C\";\n }\n\n $rh = round(100 * pow((112 - (0.1 * $tempC) + $dewC) / (112 + (0.9 * $tempC)) , 8));\n $mtrInfo['HUMIDITY'] = $rh . '%';\n mtr_get_heat_index($tempF, $rh);\n }\n\n $metarPtr++;\n $group++;\n }\n else {\n $group++;\n }\n}", "public function prixTTC() {\n return number_format($this->prix_ht * 1.2,2);\n }", "protected function convert°KTo°F() : float\n {\n return (($this->input - 273.15) * 1.8) + 32;\n }", "public static function getCpuTemperatureCelsius(): Measurement\n\t{\n\t\t$raw = trim(file_get_contents(self::TEMPERATURE_SENSOR));\n\t\t$temperature = bcdiv($raw, '1000', 1);\n\n\t\treturn new Measurement($temperature, Units::CELSIUS);\n\t}", "function calcularTiempos(&$grafo){\n\t\tcalcularTEI($grafo, $grafo[\"Inicio\"]);\n\t\tforeach($grafo as $value)\n\t\t{\n $value->setTLI($grafo[\"Fin\"]->getTEI());\n\t\t}\t\n\t\tcalcularTLI($grafo, $grafo[\"Fin\"]);\n\t}", "function calcHumidex ($temp,$humidity,$useunit) {\r\n// Source of calculation: http://www.physlink.com/reference/weather.cfm\r\n global $Status;\r\n $T= convertTemp($temp,'C');\r\n $H = $humidity;\r\n\r\n $t=7.5*$T/(237.7+$T);\r\n $et=pow(10,$t);\r\n $e=6.112*$et*($H/100);\r\n $humidex=$T+(5/9)*($e-10);\r\n $Status .= \"// calcHumidex T=$T C, H=$H calc=$humidex \";\r\n if ($humidex < $T) {\r\n\t $humidex=$T;\r\n $Status .= \" set to T, \";\r\n }\r\n if(preg_match('|F|i',$useunit)) {\r\n # convert to F\r\n $humidex = sprintf(\"%01.1f\",round((1.8 * $humidex) + 32.0,1));\r\n }\r\n $humidex = round($humidex,1);\r\n $Status .= \" humidex=$humidex $useunit\\n\";\r\n return($humidex);\r\n}", "function getTargetCoolTemperature()\n{\n // guest bedroom work\n if (time() < strtotime('2017-07-25 18:00:00')) {\n return ftoc(71);\n }\n $hour = (int)date('H');\n switch (date('N')) {\n case 1: // Mon\n case 2: // Tue\n case 3: // Wed\n case 4: // Thu\n case 5: // Fri\n // Same schedule for all weekdays\n // 22-5: 23, 5-8: 24.5, 8-16: 28, 16-22: 24.5\n if ('2017-07-05' == date('Y-m-d')) {\n return 22;\n }\n if ($hour<5 || $hour>=21) {\n return 22;\n } elseif($hour<8 || $hour>=20) {\n return 24.5;\n } else {\n return 28;\n }\n break;\n case 6: // Sat\n case 7: // Sun\n // Same schedule for both days of weekend\n if ($hour<7 || $hour>=22) {\n return 22;\n } else {\n return 24.5;\n }\n break;\n }\n}", "function temp_to_str($temp)\n{\n\tif($temp==0){\n\t\treturn '0°';\n\t}elseif($temp>0){\n\t\treturn $temp.'°';\n\t}else{\n\t\treturn $temp.'°';\n\t}\n}", "function convert_minutes_heures($minutes)\n{\n\t//combien d'heures ?\n\t$heure = floor($minutes / 60);\n\n\t//combien de minutes ?\n\t$minute = floor(($minutes - ($heure * 60)));\n\t if ($minute < 10) { $minute = \"0\".$minute; }\n\n\t$temps = $heure.\"h\".$minute;\n\n return($temps);\n}", "function valor_extenso($valor=0, $maiusculas=false)\n{\n if (strpos($valor,\",\") > 0)\n {\n // retira o ponto de milhar, se tiver\n $valor = str_replace(\".\",\"\",$valor);\n \n // troca a virgula decimal por ponto decimal\n $valor = str_replace(\",\",\".\",$valor);\n }\n$singular = array(\"centavo\", \"real\", \"mil\", \"milhão\", \"bilhão\", \"trilhão\", \"quatrilhão\");\n$plural = array(\"centavos\", \"reais\", \"mil\", \"milhões\", \"bilhões\", \"trilhões\",\n\"quatrilhões\");\n \n$c = array(\"\", \"cem\", \"duzentos\", \"trezentos\", \"quatrocentos\",\n\"quinhentos\", \"seiscentos\", \"setecentos\", \"oitocentos\", \"novecentos\");\n$d = array(\"\", \"dez\", \"vinte\", \"trinta\", \"quarenta\", \"cinquenta\",\n\"sessenta\", \"setenta\", \"oitenta\", \"noventa\");\n$d10 = array(\"dez\", \"onze\", \"doze\", \"treze\", \"quatorze\", \"quinze\",\n\"dezesseis\", \"dezesete\", \"dezoito\", \"dezenove\");\n$u = array(\"\", \"um\", \"dois\", \"três\", \"quatro\", \"cinco\", \"seis\",\n\"sete\", \"oito\", \"nove\");\n \n $z=0;\n \n $valor = number_format($valor, 2, \".\", \".\");\n $inteiro = explode(\".\", $valor);\n\t\t$cont=count($inteiro);\n\t\t for($i=0;$i<$cont;$i++)\n for($ii=strlen($inteiro[$i]);$ii<3;$ii++)\n $inteiro[$i] = \"0\".$inteiro[$i];\n \n $fim = $cont - ($inteiro[$cont-1] > 0 ? 1 : 2);\n for ($i=0;$i<$cont;$i++) {\n $valor = $inteiro[$i];\n $rc = (($valor > 100) && ($valor < 200)) ? \"cento\" : $c[$valor[0]];\n $rd = ($valor[1] < 2) ? \"\" : $d[$valor[1]];\n $ru = ($valor > 0) ? (($valor[1] == 1) ? $d10[$valor[2]] : $u[$valor[2]]) : \"\";\n \n $r = $rc.(($rc && ($rd || $ru)) ? \" e \" : \"\").$rd.(($rd &&\n$ru) ? \" e \" : \"\").$ru;\n $t = $cont-1-$i;\n $r .= $r ? \" \".($valor > 1 ? $plural[$t] : $singular[$t]) : \"\";\n if ($valor == \"000\")$z++; elseif ($z > 0) $z--;\n if (($t==1) && ($z>0) && ($inteiro[0] > 0)) $r .= (($z>1) ? \" de \" : \"\").$plural[$t];\n if ($r) $rt = $rt . ((($i > 0) && ($i <= $fim) &&\n($inteiro[0] > 0) && ($z < 1)) ? ( ($i < $fim) ? \", \" : \" e \") : \" \") . $r;\n }\n \n if(!$maiusculas)\n\t\t {\n return($rt ? $rt : \"zero\");\n } elseif($maiusculas == \"2\") {\n return (strtoupper($rt) ? strtoupper($rt) : \"Zero\");\n } else {\n return (ucwords($rt) ? ucwords($rt) : \"Zero\");\n }\n \n}", "function to_fahrenheit() {\n\t\t\treturn ($this->weight_param * 1.8) + 32;\n\t\t}", "function inch2cm($num_inches){\n\t\treturn $num_inches * 2.54;\n}", "function transformacja()\n\t{\n\t\t\n\t\t for ($i=0; $i < $this->liczba_zadan_c; $i++)\n\t\t {\n\t\t\t$this->transformacja_c[$i] = round( $this->czestotliwosc_c[$i] * $this->NWW_c,0) ;\n\t\t }\n\t\t\t \n\t\t\t\n\t}", "function value_unit_accuenergy($value)\n{\n return hex2float(dechex($value));\n}", "public function getNumeroCelular()\n {\n return $this->numeroCelular;\n }", "public function getNumeroCelular()\n {\n return $this->numeroCelular;\n }", "function calculerTTC ($prixHT, $taux=20)\r\n{\r\n return $prixHT * (1 + $taux / 100);\r\n}", "public function calcularSueldo(){\n $this->horas_trabajadas * 540;\n }", "function f2c($givenValue)\n{\n\t$celsius=5/9*($givenValue-32);\n\treturn $celsius;\n}", "function foot2inch($numero_foot){\n\treturn $numero_foot *12;\t\t\n}", "function ciform_ini_to_num($valeur){ \n\t$valeur = trim($valeur);\n $unite = substr($valeur, -1);\n $return = substr($valeur, 0, -1);\n $return = floatval($return);\n \n switch(strtoupper($unite)){\n case 'G':\n $return *= 1073741824;\n break;\n case 'M':\n $return *= 1048576;\n break;\n case 'K':\n $return *= 1024;\n break;\n }\n\n return $return;\n}", "public function prixTTC()\n {\n return number_format($this->prix_ht * 1.2, 2);\n }", "function calculerTTC($prixHT, $tauxTVA)\n{\n $prixTTC = $prixHT + ($prixHT * $tauxTVA / 100);\n // ON AFFICHE LE RESULTAT\n echo \"<h2>LE PRIX TTC EST $prixTTC euros</h2>\";\n}", "public function prixTTCPanier()\n {\n return $this->prix_ht * 1.2;\n }", "public function getTemperatura()\n {\n return $this->temperatura;\n }", "public function getTemperatura()\n {\n return $this->temperatura;\n }", "public function converEurosUs(){\n $valorDollar= 1.17;\n $dollares=($this -> dollares *$valorDollar );\n return $dollares;\n }", "function uptab13() {\r\n\r\n global $x, $st, $kztab, $abjuli;\r\n\r\n if ($x < 8131)\r\n $st = 0;\r\n else {\r\n if ($x < 13470) {\r\n $y = ($x - 8130) / 10000;\r\n $rw = $y * 933.70;\r\n $rw = $rw + 1400;\r\n $st = floor($rw * $y);\r\n }\r\n else {\r\n if ($x < 52882) {\r\n $y = ($x - 13469) / 10000;\r\n $rw = $y * 228.74;\r\n $rw = $rw + 2397;\r\n $rw = $rw * $y;\r\n $st = floor($rw + 1014);\r\n }\r\n else {\r\n if( $x < 250731)\r\n $st = floor($x * 0.42 - 8196);\r\n else\r\n $st = floor($x * 0.45 - 15718);\r\n }\r\n }\r\n }\r\n\r\n $st = $st * $kztab;\r\n}", "function temps($time){\r\n\t$texte = null;\r\n\t$tempsReel = time()+3600;\r\n\t$resultat = $tempsReel-$time;\r\n\tif($resultat < 60)\r\n\t\t$texte = 'il y a '.$resultat.' secondes';\r\n\telse if($resultat > 60 and $resultat < 3600){\r\n\t\t$resultat = intval($resultat/60);\r\n\t\tif($resultat == 1)\r\n\t\t\t$texte= 'il y a '.$resultat.' minute';\r\n\t\telse\r\n\t\t\t$texte= 'il y a '.$resultat.' minutes';\r\n\t}\r\n\telse if($resultat > 3600 and $resultat < 86400){\r\n\t\t$resultat = intval($resultat/3600);\r\n\t\tif($resultat == 1)\r\n\t\t\t$texte = 'il y a '.$resultat.' heure';\r\n\t\telse\r\n\t\t\t$texte = 'il y a '.$resultat.' heures';\r\n\t}\r\n\telse{\r\n\t\t$texte = 'le '.date('j/m/Y à G:i:s',$time);\r\n\t}\r\n\treturn $texte;\r\n}", "function cf($c){\r\n return $c*(9/5)+32;\r\n \r\n }", "public function getTemperatureComfort($ain)\n {\n return $this->getTemperatureHkr($ain, \"gethkrkomfort\");\n }", "public function darCosto(){\n $precio = parent::darCosto();\n $precioCine = $precio * 1.65;\n return $precioCine;\n }", "public function converUsEuro(){\n $valorEUR= 0.85;\n $euros=($this -> dollares *$valorEUR );\n return $euros;\n }", "function totalTva()\n{\n\t$total_tva = totalHt() * 0.2;\n\treturn round($total_tva, 2);\n}", "function valorPorExtenso($valor=0)\n\t{\n\t\t$singular = array(\"centavo\", \"real\", \"mil\", \"milhão\", \"bilhão\", \"trilhão\", \"quatrilhão\");\n\t\t$plural = array(\"centavos\", \"reais\", \"mil\", \"milhões\", \"bilhões\", \"trilhões\",\"quatrilhões\");\n\t\t$c = array(\"\", \"cem\", \"duzentos\", \"trezentos\", \"quatrocentos\",\"quinhentos\", \"seiscentos\", \"setecentos\", \"oitocentos\", \"novecentos\");\n\t\t$d = array(\"\", \"dez\", \"vinte\", \"trinta\", \"quarenta\", \"cinquenta\",\"sessenta\", \"setenta\", \"oitenta\", \"noventa\");\n\t\t$d10 = array(\"dez\", \"onze\", \"doze\", \"treze\", \"quatorze\", \"quinze\",\"dezesseis\", \"dezesete\", \"dezoito\", \"dezenove\");\n\t\t$u = array(\"\", \"um\", \"dois\", \"três\", \"quatro\", \"cinco\", \"seis\",\"sete\", \"oito\", \"nove\");\n\t\t$z=0;\n\t\t$valor = number_format($valor, 2, \".\", \".\");\n\t\t$inteiro = explode(\".\", $valor);\n\t\tfor($i=0;$i<count($inteiro);$i++)\n\t\t\tfor($ii=strlen($inteiro[$i]);$ii<3;$ii++)\n\t\t\t\t$inteiro[$i] = \"0\".$inteiro[$i];\n\t\t$rt = \"\";\n\t\t// $fim identifica onde que deve se dar junção de centenas por \"e\" ou por \",\" ;) \n\t\t$fim = count($inteiro) - ($inteiro[count($inteiro)-1] > 0 ? 1 : 2);\n\t\tfor ($i=0;$i<count($inteiro);$i++)\n\t\t{\n\t\t\t$valor = $inteiro[$i];\n\t\t\t$rc = (($valor > 100) && ($valor < 200)) ? \"cento\" : $c[$valor[0]];\n\t\t\t$rd = ($valor[1] < 2) ? \"\" : $d[$valor[1]];\n\t\t\t$ru = ($valor > 0) ? (($valor[1] == 1) ? $d10[$valor[2]] : $u[$valor[2]]) : \"\";\n\t\t\t$r = $rc.(($rc && ($rd || $ru)) ? \" e \" : \"\").$rd.(($rd && $ru) ? \" e \" : \"\").$ru;\n\t\t\t$t = count($inteiro)-1-$i;\n\t\t\t$r .= $r ? \" \".($valor > 1 ? $plural[$t] : $singular[$t]) : \"\";\n\t\t\tif ($valor == \"000\")$z++; elseif ($z > 0) $z--;\n\t\t\tif (($t==1) && ($z>0) && ($inteiro[0] > 0)) $r .= (($z>1) ? \" de \" : \"\").$plural[$t]; \n\t\t\tif ($r) $rt = $rt . ((($i > 0) && ($i <= $fim) && ($inteiro[0] > 0) && ($z < 1)) ? ( ($i < $fim) ? \", \" : \" e \") : \" \") . $r;\n\t\t}\n\t\treturn($rt ? $rt : \"zero\");\n\t}", "function cek_telat($jam,$jam_masuk){\n\t\n\t$hasil = abs(strtotime($jam)-strtotime($jam_masuk));\n\t$detik = $hasil;\n\t$menit = floor($detik/60);\n\t$detik-=60*$menit;\n\t$jam2 = floor($menit/60);\n\t$menit -= $jam2*60;\n\t\n\treturn ($jam2<10?\"0\".$jam2:$jam2).\":\".($menit<10?\"0\".$menit:$menit).\":\".($detik<10?\"0\".$detik:$detik);\n\t\n}", "function timenow() {\n\t\treturn doubleval(ereg_replace('^0\\.([0-9]*) ([0-9]*)$','\\\\2.\\\\1',microtime()));\n\t}", "function get_temperature_tings($celsius) {\n $celsius = round($celsius);\n\n // much switch. so array.\n switch(true) {\n case ($celsius <= -30):\n return array(\n 'winter',\n 'freeze',\n 'polar vortex',\n 'ridiculous',\n 'hibernate',\n 'climate change',\n 'doom',\n );\n\n case ($celsius > -30 && $celsius <= -15):\n return array(\n 'cold',\n 'freeze',\n 'shiver',\n 'ice',\n 'yuck',\n 'climate change',\n 'popsicle',\n );\n\n case ($celsius > -15 && $celsius <= -7):\n return array(\n 'icy',\n 'winter',\n 'chill',\n 'crisp',\n 'brrrrr',\n 'cool',\n 'not okay',\n );\n\n case ($celsius > -7 && $celsius <= 0):\n return array(\n 'icy',\n 'frost',\n 'numb',\n 'shiver',\n 'brrr',\n 'chilly',\n 'below freezing point',\n );\n\n case ($celsius > 0 && $celsius <= 10):\n return array(\n 'chilly',\n 'concern',\n 'coat',\n 'frosty',\n 'uh oh',\n 'brrrr',\n 'almost freezing',\n );\n\n case ($celsius > 10 && $celsius <= 20):\n return array(\n 'moderate',\n 'mild',\n 'okay',\n 'medium',\n 'cool',\n 'whatever',\n 'brisk',\n );\n\n case ($celsius > 20 && $celsius <= 30):\n return array(\n 'heat',\n 'warmth',\n 'climate',\n 'sweating',\n 'balmy',\n 'nice day',\n 'ambient',\n );\n\n case ($celsius > 30):\n return array(\n 'boiling',\n 'bake',\n 'melt',\n 'dying',\n 'suffer',\n 'global warming',\n 'tropical heat',\n );\n\n default:\n return array(\n 'concern',\n 'climate',\n 'degrees',\n 'shrug',\n 'wow',\n 'celsius',\n 'farenheit',\n );\n }\n}", "function meteo($saison, $temperature){\n echo \"Nous sommes en $saison et il fait $temperature °C <br>\";\n }", "public function darCosto(){\n $precio = parent::darCosto();\n $precioTeatro = $precio * 1.45;\n return $precioTeatro;\n }", "public function number_conv($value)\n\t\t{\n\t\t\t$nilai = abs($value);\n\t\t\t$huruf = array(\"\", \"Satu\", \"Dua\", \"Tiga\", \"Empat\", \"Lima\", \"Enam\", \"Tujuh\", \"Delapan\", \"Sembilan\", \"Sepuluh\", \"Sebelas\");\n\t\t\t$temp = \"\";\n\t\t\tif ($nilai < 12) \n\t\t\t{\n\t\t\t\t$temp = \" \". $huruf[$nilai];\n\t\t\t} \n\t\t\telse if ($nilai <20) \n\t\t\t{\n\t\t\t\t$temp = $this->number_conv($nilai - 10). \" Belas \";\n\t\t\t} \n\t\t\telse if ($nilai < 100) \n\t\t\t{\n\t\t\t\t$temp = $this->number_conv($nilai/10).\" Puluh \". $this->number_conv($nilai % 10);\n\t\t\t} \n\t\t\telse if ($nilai < 200) \n\t\t\t{\n\t\t\t\t$temp = \" Seratus \" . $this->number_conv($nilai - 100);\n\t\t\t} \n\t\t\telse if ($nilai < 1000) \n\t\t\t{\n\t\t\t\t$temp = $this->number_conv($nilai/100) . \" Ratus \" . $this->number_conv($nilai % 100);\n\t\t\t} \n\t\t\telse if ($nilai < 2000) \n\t\t\t{\n\t\t\t\t$temp = \" Seribu \" . $this->number_conv($nilai - 1000);\n\t\t\t} \n\t\t\telse if ($nilai < 1000000) \n\t\t\t{\n\t\t\t\t$temp = $this->number_conv($nilai/1000) . \" Ribu \" . $this->number_conv($nilai % 1000);\n\t\t\t} \n\t\t\telse if ($nilai < 1000000000) \n\t\t\t{\n\t\t\t\t$temp = $this->number_conv($nilai/1000000) . \" Juta \" . $this->number_conv($nilai % 1000000);\n\t\t\t} \n\t\t\telse if ($nilai < 1000000000000) \n\t\t\t{\n\t\t\t\t$temp = $this->number_conv($nilai/1000000000) . \" Milyar \" . $this->number_conv(fmod($nilai,1000000000));\n\t\t\t} \n\t\t\telse if ($nilai < 1000000000000000) \n\t\t\t{\n\t\t\t\t$temp = $this->number_conv($nilai/1000000000000) . \" Trilyun \" . $this->number_conv(fmod($nilai,1000000000000));\n\t\t\t}\n\t\t\tif($value<0) \n\t\t\t{\n\t\t\t\t$hasil = \"Minus \". trim($temp);\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\t$hasil = trim($temp);\n\t\t\t}\n\t\t\treturn $hasil;\n\t\t}", "function konfersitotalwaktu($total_detik){\n\t$jam = floor($total_detik/3600);\n\t$sisa = $total_detik% 3600;\n\t$menit = floor($sisa/60);\n\t$sisa = $sisa % 60;\n\t$detik = floor($sisa/1);\n\t\n\treturn($jam, $menit, $detik);\n}", "public function tieneCelular()\n {\n return strlen($this->celular) > 0;\n }", "function conversione ($risorsa) {\nif ($risorsa >= 1000000) $risorsa = round($risorsa/1000000,2).' Mio.';\nelseif ($risorsa >= 1000) $risorsa= round($risorsa/1000,0).'k';\nelse $risorsa= round($risorsa,0);\nreturn ($risorsa);\n}", "function convertmilestokilometers($dist)\n{\n return $dist * 1.60935;\n}", "function escreverValorMoeda($n){\n\t//Converte para o formato float\n\tif(strpos($n, ',') !== FALSE){\n\t\t$n = str_replace('.','',$n);\n\t\t$n = str_replace(',','.',$n);\n\t}\n\n\t//Separa o valor \"reais\" dos \"centavos\";\n\t$n = explode('.',$n);\n\n\treturn ucfirst(numeroEscrito($n[0])). ' reais' . ((isset($n[1]) && $n[1] > 0)?' e '.numeroEscrito($n[1]).' centavos':'');\n\n}", "function scale_value($value, $scale)\n{\n\n if ($scale == '161616') // This is used by Accuview Accuvim II\n {\n //CLEANME. Not required anymore, use unit name \"accuenergy\"\n return hex2float(dechex($value));\n } else if($scale != 0) {\n return $value * $scale;\n } else {\n return $value;\n }\n\n}", "function totalTtc()\n{\n\t$total_ttc = totalHt() + totalTva(); \n\treturn round($total_ttc, 2);\n}", "function convertTo($input) {\n $pounds = ($input * 2.205);\n $yards = ($input * 1.094);\n $fahrenheit = (($input * 1.8) + 32);\n\n echo \"$input kilos equals $pounds pounds<br>\";\n echo \"$input meters equals $yards yards<br>\";\n echo \"$input celcius equals $fahrenheit fahrenheit<br>\";\n }", "function tei_editions_degrees_to_metres($lon_lat)\n{\n $half_circumference = 20037508.34;\n\n $x = $lon_lat[0] * $half_circumference / 180;\n $y = log(tan((90 + $lon_lat[1]) * pi() / 360)) / (pi() / 180);\n $y = $y * $half_circumference / 180;\n return array($x, $y);\n}", "function getSimulatedTemperature($step) {\n\n if ($step <= 10)\n $t = 68.0 + ($step * 0.3);\n else\n $t = 71.0 - ($step * 0.6);\n return $t;\n\n}", "function extenso($valor = 0, $maiusculas = false) {\n\n\t$singular = array(\"centavo\", \"real\", \"mil\", \"milh&atilde;o\", \"bilhão\", \"trilh&atilde;o\", \"quatrilh&atilde;o\");\n\t$plural = array(\"centavos\", \"reais\", \"mil\", \"milh&otilde;es\", \"bilh&otilde;es\", \"trilh&otilde;es\", \"quatrilh&otilde;es\");\n\n\t$c = array(\"\", \"cem\", \"duzentos\", \"trezentos\", \"quatrocentos\", \"quinhentos\", \"seiscentos\", \"setecentos\", \"oitocentos\", \"novecentos\");\n\t$d = array(\"\", \"dez\", \"vinte\", \"trinta\", \"quarenta\", \"cinquenta\", \"sessenta\", \"setenta\", \"oitenta\", \"noventa\");\n\t$d10 = array(\"dez\", \"onze\", \"doze\", \"treze\", \"quatorze\", \"quinze\", \"dezesseis\", \"dezesete\", \"dezoito\", \"dezenove\");\n\t$u = array(\"\", \"um\", \"dois\", \"tr&ecirc;s\", \"quatro\", \"cinco\", \"seis\", \"sete\", \"oito\", \"nove\");\n\n\t$z = 0;\n\t$rt = \"\";\n\n\t$valor = number_format($valor, 2, \".\", \".\");\n\t$inteiro = explode(\".\", $valor);\n\tfor ($i = 0; $i < count($inteiro); $i++)\n\t\tfor ($ii = strlen($inteiro[$i]); $ii < 3; $ii++)\n\t\t\t$inteiro[$i] = \"0\" . $inteiro[$i];\n\n\t$fim = count($inteiro) - ($inteiro[count($inteiro) - 1] > 0 ? 1 : 2);\n\tfor ($i = 0; $i < count($inteiro); $i++) {\n\t\t$valor = $inteiro[$i];\n\t\t$rc = (($valor > 100) && ($valor < 200)) ? \"cento\" : $c[$valor[0]];\n\t\t$rd = ($valor[1] < 2) ? \"\" : $d[$valor[1]];\n\t\t$ru = ($valor > 0) ? (($valor[1] == 1) ? $d10[$valor[2]] : $u[$valor[2]]) : \"\";\n\n\t\t$r = $rc . (($rc && ($rd || $ru)) ? \" e \" : \"\") . $rd . (($rd && $ru) ? \" e \" : \"\") . $ru;\n\t\t$t = count($inteiro) - 1 - $i;\n\t\t$r .= $r ? \" \" . ($valor > 1 ? $plural[$t] : $singular[$t]) : \"\";\n\t\tif ($valor == \"000\")\n\t\t\t$z++;\n\t\telseif ($z > 0)\n\t\t\t$z--;\n\t\tif (($t == 1) && ($z > 0) && ($inteiro[0] > 0))\n\t\t\t$r .= (($z > 1) ? \" de \" : \"\") . $plural[$t];\n\t\tif ($r)\n\t\t\t$rt = $rt . ((($i > 0) && ($i <= $fim) && ($inteiro[0] > 0) && ($z < 1)) ? (($i < $fim) ? \", \" : \" e \") : \" \") . $r;\n\t}\n\n\tif (!$maiusculas) {\n\t\treturn ($rt ? $rt : \"zero\");\n\t} else {\n\t\tif ($rt)\n\t\t\t$rt = preg_replace(\"{ E }\", \" e \", ucwords($rt));\n\t\treturn (($rt) ? ($rt) : \"Zero\");\n\t}\n\n}", "function cr($t)\n{\n return $t[1]/$t[0];\n}", "public function tes(){\n\t\techo 0/0;\n\t}", "public function afficheheure()\n {\n return $this->creneauDbt->format('H:i');\n }", "public function toFahrenheit(): self\n {\n if (! isset($this->celsius)) {\n throw new MissingConversionUnitException();\n }\n\n $this->temperature = ($this->celsius * 1.8) + 32;\n\n return $this;\n }", "public function createTemperature()\n {\n $current = new Reading();\n $current->name = \"Aktualna temperatura\";\n $current->units = Uniter::temp;\n $current->value = $this->lastArchive->getOutTemp();\n\n\n $real = new Reading();\n $real->name = \"Odczuwalna temperatura\";\n $real->units = Uniter::temp;\n $real->value = Uniter::getWindChill($this->lastArchive->getWindGust(), $current->value);\n\n $dewPoint = new Reading();\n $dewPoint->name = \"Punkt rosy\";\n $dewPoint->units = Uniter::temp;\n $dewPoint->value = $this->lastArchive->getDewpoint();\n\n\n $trend = new Reading();\n $trend->name = \"Tendencja temperatury\";\n $trend->units = Uniter::temp.Uniter::trend;\n $trend->value = $this->archiveRepository->getLastTrend('outTemp');\n\n $temperature = new Temperature($current);\n $temperature->setReal($real);\n $temperature->setDewPoint($dewPoint);\n return $temperature->setTrend($trend);\n }", "function extenso($valor=0, $maiusculas=false) {\n if (strpos($valor, \",\") > 0) {\n // retira o ponto de milhar, se tiver\n $valor = str_replace(\".\", \"\", $valor);\n\n // troca a virgula decimal por ponto decimal\n $valor = str_replace(\",\", \".\", $valor);\n }\n $singular = array(\"centavo\", \"real\", \"mil\", \"milhão\", \"bilhão\", \"trilhão\", \"quatrilhão\");\n $plural = array(\"centavos\", \"reais\", \"mil\", \"milhões\", \"bilhões\", \"trilhões\",\n \"quatrilhões\");\n\n $c = array(\"\", \"cem\", \"duzentos\", \"trezentos\", \"quatrocentos\",\n \"quinhentos\", \"seiscentos\", \"setecentos\", \"oitocentos\", \"novecentos\");\n $d = array(\"\", \"dez\", \"vinte\", \"trinta\", \"quarenta\", \"cinquenta\",\n \"sessenta\", \"setenta\", \"oitenta\", \"noventa\");\n $d10 = array(\"dez\", \"onze\", \"doze\", \"treze\", \"quatorze\", \"quinze\",\n \"dezesseis\", \"dezesete\", \"dezoito\", \"dezenove\");\n $u = array(\"\", \"um\", \"dois\", \"três\", \"quatro\", \"cinco\", \"seis\",\n \"sete\", \"oito\", \"nove\");\n\n $z = 0;\n\n $valor = number_format($valor, 2, \".\", \".\");\n $inteiro = explode(\".\", $valor);\n $cont = count($inteiro);\n for ($i = 0; $i < $cont; $i++)\n for ($ii = strlen($inteiro[$i]); $ii < 3; $ii++)\n $inteiro[$i] = \"0\" . $inteiro[$i];\n\n $fim = $cont - ($inteiro[$cont - 1] > 0 ? 1 : 2);\n $rt = '';\n for ($i = 0; $i < $cont; $i++) {\n $valor = $inteiro[$i];\n $rc = (($valor > 100) && ($valor < 200)) ? \"cento\" : $c[$valor[0]];\n $rd = ($valor[1] < 2) ? \"\" : $d[$valor[1]];\n $ru = ($valor > 0) ? (($valor[1] == 1) ? $d10[$valor[2]] : $u[$valor[2]]) : \"\";\n\n $r = $rc . (($rc && ($rd || $ru)) ? \" e \" : \"\") . $rd . (($rd &&\n $ru) ? \" e \" : \"\") . $ru;\n $t = $cont - 1 - $i;\n $r .= $r ? \" \" . ($valor > 1 ? $plural[$t] : $singular[$t]) : \"\";\n if ($valor == \"000\"\n\n )$z++; elseif ($z > 0)\n $z--;\n if (($t == 1) && ($z > 0) && ($inteiro[0] > 0))\n $r .= ( ($z > 1) ? \" de \" : \"\") . $plural[$t];\n if ($r)\n $rt = $rt . ((($i > 0) && ($i <= $fim) &&\n ($inteiro[0] > 0) && ($z < 1)) ? ( ($i < $fim) ? \", \" : \" e \") : \" \") . $r;\n }\n\n if (!$maiusculas) {\n return($rt ? $rt : \"zero\");\n } elseif ($maiusculas == \"2\") {\n return (strtoupper($rt) ? strtoupper($rt) : \"Zero\");\n } else {\n return (ucwords($rt) ? ucwords($rt) : \"Zero\");\n }\n }", "function calcularIMC($peso, $altura)\n{\n return $peso / pow($altura, 2);\n}", "public function get_compTempChg(): float\n {\n // $res is a double;\n if ($this->_cacheExpiration <= YAPI::GetTickCount()) {\n if ($this->load(YAPI::$_yapiContext->GetCacheValidity()) != YAPI::SUCCESS) {\n return self::COMPTEMPCHG_INVALID;\n }\n }\n $res = $this->_compTempChg;\n return $res;\n }" ]
[ "0.697914", "0.68215775", "0.6624428", "0.6610483", "0.6560781", "0.6541088", "0.65350306", "0.6257619", "0.61620325", "0.61469847", "0.61401135", "0.610481", "0.6037851", "0.6004", "0.59874296", "0.5987306", "0.59345984", "0.58969367", "0.5828631", "0.5827862", "0.5821057", "0.5800437", "0.5782796", "0.5756348", "0.5749171", "0.57451683", "0.57429564", "0.57377106", "0.57375544", "0.5729932", "0.5674036", "0.5663722", "0.5656158", "0.5618274", "0.56117666", "0.5611143", "0.5573471", "0.55712676", "0.55672514", "0.5549921", "0.55412877", "0.55402035", "0.5531211", "0.5521885", "0.55150896", "0.55109245", "0.54962605", "0.54645365", "0.5457744", "0.5436308", "0.5433672", "0.5400313", "0.5396579", "0.53713745", "0.5364042", "0.5364042", "0.5359742", "0.53523105", "0.534861", "0.5325478", "0.53244203", "0.5321712", "0.5321444", "0.53144383", "0.53081495", "0.53081495", "0.52450746", "0.52272046", "0.5226323", "0.52022004", "0.51992846", "0.51991224", "0.519801", "0.5174912", "0.5156868", "0.51554734", "0.5144127", "0.514307", "0.5132631", "0.511587", "0.5107273", "0.5089943", "0.5086743", "0.5085164", "0.5078978", "0.5076515", "0.5074981", "0.50660485", "0.50611514", "0.5060979", "0.5060497", "0.5051702", "0.5048501", "0.5043147", "0.50367403", "0.50272506", "0.50213957", "0.50189024", "0.5017731", "0.50174373" ]
0.8001208
0
////////////////////////////////////////////////////////////////////////////////////////////// Function : twe_get_zone_code Arguments : country country code string zone state/province zone_id def_state default string if zone==0 Return : state_prov_code state/province code Description : Function to retrieve the state/province code (as in FL for Florida etc) //////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////// Функция : twe_get_zone_code Аргументы : country код страны строка zone состояние/провинция zone_id def_state строка по умолчанию если zone == 0 Возвращаемое значение : state_prov_code код состояния/провинции Описание : Функция для получения кода состояния/провинции (вроде FL для Флориды и т.д.) //////////////////////////////////////////////////////////////////////////////////////////////
function twe_get_zone_code($country, $zone, $def_state) { global $db; $state_prov_values = $db->Execute("select zone_code from " . TABLE_ZONES . " where zone_country_id = '" . $country . "' and zone_id = '" . $zone . "'"); if ($state_prov_values->RecordCount() < 1) { $state_prov_code = $def_state; } else { $state_prov_code = $state_prov_values->fields['zone_code']; } return $state_prov_code; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tep_get_zone_code($country_id, $zone_id, $default_zone) {\n $zone_query = tep_db_query(\"select zone_code from \" . TABLE_ZONES . \" where zone_country_id = '\" . (int)$country_id . \"' and zone_id = '\" . (int)$zone_id . \"'\");\n if (tep_db_num_rows($zone_query)) {\n $zone = tep_db_fetch_array($zone_query);\n return $zone['zone_code'];\n } else {\n return $default_zone;\n }\n }", "function osc_get_zone_code($country_id, $zone_id, $default_zone) {\n $zone_query = osc_db_query(\"select zone_code from \" . TABLE_ZONES . \" where zone_country_id = '\" . (int)$country_id . \"' and zone_id = '\" . (int)$zone_id . \"'\");\n if (osc_db_num_rows($zone_query)) {\n $zone = osc_db_fetch_array($zone_query);\n return $zone['zone_code'];\n } else {\n return $default_zone;\n }\n }", "function COUNTRY_CODE()\n\t{\n\t\treturn GETSEGMENT(1);\n\t}", "function lookupZenZoneId ( $countryId, $zone )\n\t{\n\t\t// default to USA\n\t\t$zoneId\t\t\t\t\t= 0;\n\n\t\t$query\t\t\t\t\t= \"\n\t\t\tSELECT\n\t\t\t\tzone_id\n\t\t\tFROM zen_zones\n\t\t\tWHERE\n\t\t\t\t1 = 1\n\t\t\t\tAND zone_country_id = $countryId\n\t\t\t\tAND (\n\t\t\t\t\tzone_code = '$zone'\n\t\t\t\t\tOR zone_name = '$zone'\n\t\t\t\t)\n\t\t\";\n\n\t\t$results\t\t\t\t= $this->db->Execute( $query );\n\n\t\treturn ( ! $results->EOF && $results->fields[ 'zone_id' ] )\n\t\t\t? $results->fields[ 'zone_id' ]\n\t\t\t: $zoneId;\n\t}", "function tep_get_zone_id($country_id, $zone_name) {\n\n $zone_id_query = tep_db_query(\"select * from \" . TABLE_ZONES . \" where zone_country_id = '\" . $country_id . \"' and zone_name = '\" . tep_db_input($zone_name) . \"'\");\n\n if (!tep_db_num_rows($zone_id_query)) {\n return 0;\n }\n else {\n $zone_id_row = tep_db_fetch_array($zone_id_query);\n return $zone_id_row['zone_id'];\n }\n }", "public function get_country_code() {\r\n\t\tcheck_ajax_referer( 'gf_stripe_create_payment_intent', 'nonce' );\r\n\r\n\t\t$feed = $this->get_feed( intval( rgpost( 'feed_id' ) ) );\r\n\t\t$billing_country = rgars( $feed, 'meta/billingInformation_address_country' );\r\n\t\t$country = sanitize_text_field( rgpost( 'country' ) );\r\n\t\t$code = $country;\r\n\r\n\t\tif ( ! empty( $billing_country ) && strlen( $country ) > 2 ) {\r\n\t\t\t$code = GF_Fields::get( 'address' )->get_country_code( $country );\r\n\t\t}\r\n\r\n\t\twp_send_json_success( array( 'code' => $code ) );\r\n\t}", "function tep_get_zone_name($country_id, $zone_id, $default_zone) {\n $zone_query = tep_db_query(\"select zone_name from \" . TABLE_ZONES . \" where zone_country_id = '\" . (int)$country_id . \"' and zone_id = '\" . (int)$zone_id . \"'\");\n if (tep_db_num_rows($zone_query)) {\n $zone = tep_db_fetch_array($zone_query);\n return $zone['zone_name'];\n } else {\n return $default_zone;\n }\n }", "public function getCountryIsoCode();", "public function countryCode() {\n return $this->execByPosition('countryCode');\n }", "function _domain_variants_get_country_code() {\n $country_code = NULL;\n\n if (function_exists('geoip_record_by_name')) {\n $geoip = @geoip_record_by_name(ip_address());\n if ($geoip && !empty($geoip['country_code'])) {\n $country_code = $geoip['country_code'];\n }\n }\n if (!$country_code) {\n if (!empty($_SERVER['HTTP_X_GEO_COUNTRY']) && $_SERVER['HTTP_X_GEO_COUNTRY'] != 'AA') {\n $country_code = $_SERVER['HTTP_X_GEO_COUNTRY'];\n }\n }\n if (!$country_code) {\n if (!empty($_SERVER['HTTP_GEOIP_COUNTRY_CODE'])) {\n $country_code = $_SERVER['HTTP_GEOIP_COUNTRY_CODE'];\n }\n }\n\n if ($country_code) {\n $country_code = drupal_strtolower(drupal_substr($country_code, 0, 2));\n }\n return $country_code;\n}", "function CountryCode($ip=null)\n\t{\n\t\tif(!$json = self::GetGeo($ip)){\n\t\t\t$this->mark($json);\n\t\t\treturn false;\n\t\t}\n\t\treturn $json['geo']['code'];\n\t}", "function GetStateCode($StateOrProvinceName)\n\t{\n\t\treturn $this->States[$StateOrProvinceName];\n\t}", "function oos_get_zone_name($country_id, $zone_id, $default_zone)\n{\n\n // Get database information\n $dbconn =& oosDBGetConn();\n $oostable =& oosDBGetTables();\n\n $zonesstable = $oostable['zones'];\n $query = \"SELECT zone_name\n FROM $zonesstable\n WHERE zone_country_id = '\" . intval($country_id) . \"' AND\n zone_id = '\" . intval($zone_id) . \"'\";\n $zone = $dbconn->Execute($query);\n if ($zone->RecordCount() > 0) {\n return $zone->fields['zone_name'];\n } else {\n return $default_zone;\n }\n}", "function getRegionCode();", "function cityCode()\n {\n $city_zone = \"05\";\n\n foreach (range(1, 9999) as $n) {\n foreach ($this->cities as $city) {\n $city_code = $city_zone . str_pad($n, 4, \"0\", STR_PAD_LEFT);\n\n if ($this->getCity($city_code)) {\n // Code doesn't exist\n break;\n }\n }\n if ($n >= 9999) {\n $this->thing->log(\n \"No City code available in zone \" . $city_zone . \".\",\n \"WARNING\"\n );\n return;\n }\n }\n }", "function getZipcode();", "public function getStateProvinceCode()\n {\n return $this->stateProvinceCode;\n }", "public function getCountryIsoCode2(){\n\n \treturn $this->cityGeoIp->country->isoCode;\n }", "public static function get_zone($zone_id)\n {\n }", "public function getStateCodeById($id)\n {\n $stateCode = $this->getConnection()->fetchOne(\"SELECT code from \" .$this->getTable('directory_country_region').\" where region_id='\" . $id . \"'\");\n return $stateCode;\n }", "public function getRegionCode();", "public function getRegionCode();", "public static function getIsoCodebyIdCountry($idcountry)\n\t{\n\t\t$sql = '\n\t\tSELECT `iso_code`\n\t\tFROM `'._DB_PREFIX_.'country`\n\t\tWHERE `id_country` = \\''.pSQL($idcountry).'\\'';\n\n\t\t$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql);\n\n\t\t$isops = array('DE', 'AD', 'AT', 'BE', 'BA', 'BG', 'HR', 'DK', 'ES', 'EE', 'FI', 'FR', 'GB', 'GR', 'GG', 'HU', 'IM', 'IE', 'IT', 'JE', 'LV', 'LI', 'LT', 'LU', 'NO', 'NL', 'PL', 'PT', 'CZ', 'RO', 'RS', 'SK', 'SI', 'SE', 'CH');\n\t\t$isoep = array('D', 'AND', 'A', 'B', 'BA', 'BG', 'CRO', 'DK', 'E', 'EST', 'SF', 'F', 'GB', 'GR', 'GG', 'H', 'IM', 'IRL', 'I', 'JE', 'LET', 'LIE', 'LIT', 'L', 'N', 'NL', 'PL', 'P', 'CZ', 'RO', 'RS', 'SK', 'SLO', 'S', 'CH');\n\n\t\tif (in_array($result['iso_code'], $isops)) // If the ISO code is in Europe, then convert it to DPD Station format\n\t\t\t$code_iso = str_replace($isops, $isoep, $result['iso_code']);\n\t\telse\n\t\t\t$code_iso = str_replace($result['iso_code'], 'INT', $result['iso_code']); // If not, then it will be 'INT' (intercontinental)\n\treturn $code_iso;\n\t}", "function tep_get_country_iso_code_2($country_id) {\n\n $country_iso_query = tep_db_query(\"select * from \" . TABLE_COUNTRIES . \" where countries_id = '\" . $country_id . \"'\");\n\n if (!tep_db_num_rows($country_iso_query)) {\n return 0;\n }\n else {\n $country_iso_row = tep_db_fetch_array($country_iso_query);\n return $country_iso_row['countries_iso_code_2'];\n }\n }", "public function getPostalCode()\n {\n return $this->getValueByKey($this->response['return'], 'plz');\n }", "function osc_get_zone_name($country_id, $zone_id, $default_zone) {\n $zone_query = osc_db_query(\"select zone_name from \" . TABLE_ZONES . \" where zone_country_id = '\" . (int)$country_id . \"' and zone_id = '\" . (int)$zone_id . \"'\");\n if (osc_db_num_rows($zone_query)) {\n $zone = osc_db_fetch_array($zone_query);\n return $zone['zone_name'];\n } else {\n return $default_zone;\n }\n }", "public function getProvinceCode()\n {\n return isset($this->province_code) ? $this->province_code : '';\n }", "public function getCountryCode($threeLetterCode = false)\n {\n // Try overwrite information first\n if ($countryCode = parent::getCountryCode($threeLetterCode)) {\n return $countryCode;\n }\n\n if ($threeLetterCode) {\n return geoip_country_code3_by_name($this->ip);\n }\n\n return geoip_country_code_by_name($this->ip);\n }", "public function get_iso_country_code_for_ip($ip_address)\n {\n }", "function pzdc_merchant_country_code($echo = TRUE, $identifier = FALSE) {\n global $PraizedCommunity;\n return $PraizedCommunity->tpt_attribute_helper('merchant', 'location->country->code', $echo, $identifier);\n}", "public function getProvinceCode(): ?string\n {\n return $this->provinceCode;\n }", "private function getStateId($currentState)\n {\n $qry = \"SELECT z.zone_id FROM \" . TABLE_ZONES . \" AS z where z.zone_code = \\\"{$currentState}\\\" ;\";\n $result = ShopgateWrapper::db_query_print_on_err($qry);\n $resultArray = ShopgateWrapper::db_fetch_array($result);\n\n return $resultArray['zone_id'];\n }", "public static function getLocationPostCode($post_code, $country=''){\r\n \t$url_zip = '';\r\n \tif($country){\r\n \t\t$url_zip = '&address='.urlencode($country);\r\n \t}\r\n \t$url = self::$url.$url_zip.\"&components=postal_code:\".urlencode($post_code);\r\n \t \r\n \t$resp_json = self::curl_file_get_contents($url);\r\n \t$resp = json_decode($resp_json, true);\r\n \tif($resp['status']='OK' && isset($resp['results'][0])){\r\n \t\treturn $resp['results'][0]['geometry']['location'];\r\n \t}else{\r\n \t\treturn false;\r\n \t}\r\n }", "function getCountryCode();", "public function getPostcode();", "protected function determineCurrentCodeFromIp() {\n\t\t$countryCode = $this->determineCurrentCountryCode();\n\t\tif (empty($countryCode)) {\n\t\t\treturn false;\n\t\t}\n\t\t$countryCode = strtolower($countryCode);\n\t\t$countryLanguageCodes = array_change_key_case($this->getCountryLanguageCodes(), CASE_LOWER);\n\t\tif (array_key_exists($countryCode, $countryLanguageCodes)) {\n\t\t\t$code = $countryLanguageCodes[$countryCode];\n\t\t} else {\n\t\t\t$code = $countryCode;\n\t\t}\n\t\treturn $code;\n\t}", "public function getZone()\n {\n $value = $this->get(self::ZONE);\n return $value === null ? (string)$value : $value;\n }", "public static function getCountryCode(){\r\n\t\tif (($q = self::getQuote()) && ($m = $q->getBillingAddress()) && ($m = $m->getCountryId()))\r\n\t\t\treturn $m;\r\n\t\treturn self::getStore()->getConfig('general/country/default');\r\n\t}", "public function getStateCode($state)\n {\n if (strlen($state) == 2 && is_string($state)) {\n return mb_convert_case($state, MB_CASE_UPPER);\n } elseif (strlen($state) > 2 && is_string($state)) {\n $state = $this->normalizeChars($state);\n $state = trim($state);\n $state = $this->stripAccents($state);\n $state = mb_convert_case($state, MB_CASE_UPPER);\n $codes = [\n 'AC'=>'ACRE',\n 'AL'=>'ALAGOAS',\n 'AM'=>'AMAZONAS',\n 'AP'=>'AMAPA',\n 'BA'=>'BAHIA',\n 'CE'=>'CEARA',\n 'DF'=>'DISTRITO FEDERAL',\n 'ES'=>'ESPIRITO SANTO',\n 'GO'=>'GOIAS',\n 'MA'=>'MARANHAO',\n 'MT'=>'MATO GROSSO',\n 'MS'=>'MATO GROSSO DO SUL',\n 'MG'=>'MINAS GERAIS',\n 'PA'=>'PARA',\n 'PB'=>'PARAIBA',\n 'PR'=>'PARANA',\n 'PE'=>'PERNAMBUCO',\n 'PI'=>'PIAUI',\n 'RJ'=>'RIO DE JANEIRO',\n 'RN'=>'RIO GRANDE DO NORTE',\n 'RO'=>'RONDONIA',\n 'RS'=>'RIO GRANDE DO SUL',\n 'RR'=>'RORAIMA',\n 'SC'=>'SANTA CATARINA',\n 'SE'=>'SERGIPE',\n 'SP'=>'SAO PAULO',\n 'TO'=>'TOCANTINS'\n ];\n $code = array_search($state, $codes);\n if (false !== $code) {\n return $code;\n }\n }\n return $state;\n }", "function get_state_codes($country)\r\n {\r\n //SELECT zone.state_code\r\n $this->db->select($this->zone_table . '.state_code'); \r\n //FROM `zone` \r\n $this->db->from($this->zone_table);\r\n //INNER JOIN `country` ON zone.country_id = country.id\r\n $country_id = $this->countries . '.id';\r\n $zone_country_id = $this->zone_table . '.country_id';\r\n $this->db->join($this->countries, $zone_country_id . ' = '. $country_id);\r\n //LEFT JOIN state ON zone.state_id = state.id\r\n $state_id = $this->state_table . '.id';\r\n $zone_state_id = $this->zone_table . '.state_id';\r\n $this->db->join($this->state_table, $zone_state_id . ' = ' . $state_id, 'LEFT');\r\n //WHERE LOWER(country.name) = LOWER('Malaysia')\r\n $this->db->where('LOWER('.$this->countries . '.name) = ', strtolower($country));\r\n $query = $this->db->get();\r\n return $query->result_array();\r\n }", "public function getProvinceCode()\n {\n return $this->province_code;\n }", "public static function getClassName() { return 'Geocoder_ZipCanada'; }", "public function countryCode(): string\n {\n return substr($this->value, 0, 2);\n }", "protected abstract function getZone();", "public function getCountry()\n {\n return $this->getValueByKey($this->response['return'], 'land');\n }", "public function getPostalCode();", "public function getCountryCode();", "public function getCountryCode();", "public function getCountryCode();", "public function getCountryCode();", "public function getZone(): ?string\n {\n return $this->zone;\n }", "public function getZoneId () {\n\t\t\t$data = Mage::helper (\"cloudflare/data\");\n\t\t\treturn $data->getAuthZone ();\n\t\t}", "public function get_iso_country_code_for_ip( $ip_address ) {\n\t\t$country_code = '';\n\n\t\tif ( ! class_exists( 'MaxMind\\Db\\Reader' ) ) {\n\t\t\twc_get_logger()->notice( __( 'Missing MaxMind Reader library!', 'woocommerce' ), array( 'source' => 'maxmind-geolocation' ) );\n\t\t\treturn $country_code;\n\t\t}\n\n\t\t$database_path = $this->get_database_path();\n\t\tif ( ! file_exists( $database_path ) ) {\n\t\t\treturn $country_code;\n\t\t}\n\n\t\ttry {\n\t\t\t$reader = new MaxMind\\Db\\Reader( $database_path );\n\t\t\t$data = $reader->get( $ip_address );\n\n\t\t\tif ( isset( $data['country']['iso_code'] ) ) {\n\t\t\t\t$country_code = $data['country']['iso_code'];\n\t\t\t}\n\n\t\t\t$reader->close();\n\t\t} catch ( Exception $e ) {\n\t\t\twc_get_logger()->notice( $e->getMessage(), array( 'source' => 'maxmind-geolocation' ) );\n\t\t}\n\n\t\treturn $country_code;\n\t}", "public function getZoneId(): string\n {\n return $this->zoneId;\n }", "public static function getcountry($code='')\n\t{\n\t\t$name = '';\n\t\tif ($code)\n\t\t{\n\t\t\tif (!($gdb = self::getGeoDBO()))\n\t\t\t{\n\t\t\t\treturn $name;\n\t\t\t}\n\n\t\t\t$gdb->setQuery(\"SELECT name FROM countries WHERE code = \" . $gdb->quote($code));\n\t\t\t$name = stripslashes($gdb->loadResult());\n\t\t}\n\t\treturn $name;\n\t}", "public function add_country($provider, $country_code, $country_name, $condition, $condition_value, $zone){\n global $wpdb;\n\n $wpdb->insert($wpdb->prefix .'expandore_shipping', array(\n 'name' => strtoupper($country_code) .'_'. esc_attr( $country_name ),\n 'type' => 'zone',\n 'provider' => sanitize_title( esc_attr( $provider ) ),\n 'condition_type' => $condition,\n 'condition_value' => $condition_value,\n 'value' => esc_attr( $zone )\n ));\n\n return $wpdb->insert_id;\n }", "function sx_getCountryCode($ip=null){\n\tglobal $cfg, $SxCountry, $sx_bulkmode, $sx_country, $sx_ip;\n\tif (is_null($ip)) $ip = $sx_ip;\n if($cfg['plugin']['sxgeo']['userestapi']) {\n $iso_code = sx_getRestApi($ip, 'country');\n $sx_country['iso'] = $iso_code = $iso_code['iso'];\n } else {\n \tif (!$SxCountry) $SxCountry = new SxGeo('plugins/sxgeo/data/SxGeo.dat');\n \t$sx_country['iso'] = $iso_code = $SxCountry->getCountry($ip); // возвращает двухзначный ISO-код страны\n \tif (!$sx_bulkmode) unset($SxCountry); // Если нужно освободить ресурсы - удаляем объект\n }\n\treturn $iso_code;\n}", "private static function get_country_code_from_headers()\n {\n }", "public function getId_zone()\n {\n return $this->id_zone;\n }", "public function get_continent_code_for_country($cc)\n {\n }", "public function getCountryState($argArrPost)\n\t{\n // Check country id should be interger value and not empty\n if($argArrPost['country_id'] != '' && ctype_digit($argArrPost['country_id']))\n {\n $varWhereClause = \"country_id='\".$argArrPost['country_id'].\"'\";\n $argSelectFlds = array('zone_id','code as zonecode','name as zonename');//'country_id',\n $arrData = $this->select(ZONE_TABLE, $argSelectFlds, $varWhereClause);\n if(is_array($arrData))\n {\n $arrNewData = array(\"status\"=>\"200\",\"country_zone_list\"=>$arrData);\n } else {\n $arrNewData = array(\"status\"=>\"400\",\"message\"=>\"Data not found.\");\n }\n } else {\n $arrNewData = array(\"status\"=>\"400\",\"message\"=>VALID_DATA.\" country id.\");\n }\n return $this->replaceAndConvertToJson($arrNewData);\n\t}", "function getCountryCode($country) {\n global $SITE_PREFIX;\n\t$response = httpGet(\"http://\".$SITE_PREFIX.\"/crud/get_country_countrycode.php\");\n\n\t$respArray = json_decode($response, true);\n\t$countrycode = \"\";\n\tforeach ($respArray[\"Options\"] as $item) {\n\t\tif ($item['DisplayText'] == $country) {\n\t\t\t$countrycode = $item['Value'];\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn $countrycode;\n}", "public function getLastCountryCode(){\n\t\treturn Mage::getSingleton('checkout/session')->getNektriaLastCountryCode(FALSE);\n\t}", "public function getContinentCode()\n {\n return geoip_continent_code_by_name($this->ip);\n }", "public function getCountryCode(): string\n {\n return substr($this->iban, static::COUNTRY_CODE_OFFSET, static::COUNTRY_CODE_LENGTH);\n }", "function get_dial_code()\n{\n return is_object(visitor_ip_details()) ? dial_code(visitor_ip_details()->country) : 234 /* Default to Nigeria. */;\n}", "private function get_timezone($zone, $language = null) {\n $check_zone = explode(\"/\", $zone);\n if (isset($check_zone[0]) && isset($check_zone[1])) {\n return $zone;\n } elseIf (!empty($zone)) { // check from place\n $allzones = timezone_identifiers_list();\n foreach ($allzones as $key => $place) {\n if (strstr($place, $zone, true)) {\n return ($allzones[$key]);\n }\n }\n } elseIf (isset($language) && function_exists(\"geoip_time_zone_by_country_and_region\")) {\n return geoip_time_zone_by_country_and_region($language);\n } else {\n return null;\n }\n }", "public function getUserCountryCodeIdFromSession()\n {\n\n $customerCountryId = Registry::getSession()->getUser()->oxuser__oxcountryid->value;\n\n switch ($customerCountryId) {\n case 'a7c40f6320aeb2ec2.72885259':\n $customerCountryCode = 'AT';\n break;\n case 'a7c40f6321c6f6109.43859248':\n $customerCountryCode = 'CH';\n break;\n case 'a7c40f632cdd63c52.64272623':\n $customerCountryCode = 'NL';\n break;\n case 'a7c40f632e04633c9.47194042':\n $customerCountryCode = 'BE';\n break;\n case 'a7c40f631fc920687.20179984':\n default:\n $customerCountryCode = 'DE';\n break;\n }\n\n return $customerCountryCode;\n }", "public function geoip_country_code_by_addr($addr)\n {\n }", "public function getIsoAlpha2CodeReturnsIsoAlpha2CodeOfNorthRhineWestphalia() {\n\t\t$model = Tx_Oelib_MapperRegistry::get('tx_oelib_Mapper_FederalState')->find(88);\n\n\t\t$this->assertSame(\n\t\t\t'DE',\n\t\t\t$model->getIsoAlpha2Code()\n\t\t);\n\t}", "function geoip_country_code3_by_name($hostname)\n{\n}", "public function get_country_codes() {\n\n\t\t$codes = array(\n\t\t\t__( 'AUSTRIA', 'gravityforms' ) => 'AT',\n\t\t\t__( 'BELGIUM', 'gravityforms' ) => 'BE',\n\t\t\t__( 'BULGARIA', 'gravityforms' ) => 'BG',\n\t\t\t__( 'CROATIA', 'gravityforms' ) => 'HR',\n\t\t\t__( 'CYPRUS', 'gravityforms' ) => 'CY',\n\t\t\t__( 'CZECH REPUBLIC', 'gravityforms' ) => 'CZ',\n\t\t\t__( 'DENMARK', 'gravityforms' ) => 'DK',\n\t\t\t__( 'ESTONIA', 'gravityforms' ) => 'EE',\n\t\t\t__( 'FINLAND', 'gravityforms' ) => 'FI',\n\t\t\t__( 'FRANCE', 'gravityforms' ) => 'FR',\n\t\t\t__( 'GERMANY', 'gravityforms' ) => 'DE',\n\t\t\t__( 'HUNGARY', 'gravityforms' ) => 'HU',\n\t\t\t__( 'IRELAND', 'gravityforms' ) => 'IE',\n\t\t\t__( 'ITALY', 'gravityforms' ) => 'IT',\n\t\t\t__( 'LATVIA', 'gravityforms' ) => 'LV',\n\t\t\t__( 'LITHUANIA', 'gravityforms' ) => 'LT',\n\t\t\t__( 'LUXEMBOURG', 'gravityforms' ) => 'LU',\n\t\t\t__( 'MALTA', 'gravityforms' ) => 'MT',\n\t\t\t__( 'NETHERLANDS', 'gravityforms' ) => 'NL',\n\t\t\t__( 'POLAND', 'gravityforms' ) => 'PL',\n\t\t\t__( 'PORTUGAL', 'gravityforms' ) => 'PT',\n\t\t\t__( 'ROMANIA', 'gravityforms' ) => 'RO',\n\t\t\t__( 'SLOVAKIA', 'gravityforms' ) => 'SK',\n\t\t\t__( 'SLOVENIA', 'gravityforms' ) => 'SI',\n\t\t\t__( 'SPAIN', 'gravityforms' ) => 'ES',\n\t\t\t__( 'SWEDEN', 'gravityforms' ) => 'SE',\n\t\t\t__( 'UNITED KINGDOM', 'gravityforms' ) => 'GB',\n\t\t);\n\n\t\treturn $codes;\n\t}", "public function cityStateCountry()\n\t{\n\t\t$address = $this->address();\n\t\tif(!empty($address))\n\t\t{\n\t\t\treturn $address->city . ', ' . $address->state . ', ' . $address->country;\n\t\t}\n\t\treturn null;\n\t}", "public function getCountryToFilter() {\n $countryCode = null;\n if(!empty($_COOKIE['wordpress_countryFilter'])) {\n $getCountryCode = explode('@@', base64_decode($_COOKIE['wordpress_countryFilter']));\n if($getCountryCode[0] === site_url()) {\n $countryCode = $getCountryCode[1];\n }\n }\n return $countryCode;\n }", "public function getTimeZone(): ?string\n {\n return $this->city->getTimeZone() ??\n $this->region->getTimeZone() ??\n $this->country->getTimeZone();\n }", "function lookupZenCountryId ( $country )\n\t{\n\t\t// default to USA\n\t\t$countryId\t\t\t\t= 223;\n\n\t\t$query\t\t\t\t\t= \"\n\t\t\tSELECT\n\t\t\t\tcountries_id\n\t\t\tFROM zen_countries\n\t\t\tWHERE\n\t\t\t\t1 = 1\n\t\t\t\tAND (\n\t\t\t\t\tcountries_iso_code_2 = '$country'\n\t\t\t\t\tOR countries_iso_code_3 = '$country'\n\t\t\t\t)\n\t\t\";\n\n\t\t$results\t\t\t\t= $this->db->Execute( $query );\n\n\t\treturn ( ! $results->EOF && $results->fields[ 'countries_id' ] )\n\t\t\t? $results->fields[ 'countries_id' ]\n\t\t\t: $countryId;\n\t}", "function getCountryIdByIso3Code($code) {\n\t\t\t$country = $this->getCountryByAttribute( 'iso3_code', $code );\n\n\t\t\tif ($country) {\n\t\t\t\treturn $country->getId( );\n\t\t\t}\n\n\t\t}", "function _getCountryCode($ip = '')\n {\n if($ip=='') {\n $ip = get_ip();\n }\n\n $aIP = explode('.', $IP);\n\n if( count($aIP) != 4 ) {\n return false;\n }\n\n $numIP = (16777216 * $aIP[0]) + (65536 * $aIP[1]) + (256 * $aIP[2]) + $aIP[3];\n\n $this->dao->select();\n $this->dao->from(DB_TABLE_PREFIX . 't_ip_range');\n $this->dao->where('ip_from <=', $numIP);\n $this->dao->where('ip_to >=', $numIP);\n $this->dao->limit(1);\n\n $result = $this->dao->get();\n if($result!==FALSE) {\n $aux = $result->row();\n return $aux['code'];\n }\n return '';\n }", "protected function determineCurrentCountryCode() {\n\t\tif (!isset($_SERVER['REMOTE_ADDR'])) {\n\t\t\treturn '';\n\t\t}\n\t\t$clientIp = $_SERVER['REMOTE_ADDR'];\n\t\tif (extension_loaded('geoip')) {\n\t\t\t$countryCode = geoip_country_code_by_name($clientIp);\n\t\t} else {\n\t\t\t$countryCode = exec('whois '.escapeshellarg($clientIp).' | grep -i country');\n\t\t\t$countryCode = str_ireplace('country:', '', $countryCode);\n\t\t\t$countryCode = trim($countryCode);\n\t\t}\n\t\treturn $countryCode;\n\t}", "public function getCustomer_zone()\n {\n return $this->customer_zone;\n }", "function pzdc_merchant_city_code($echo = TRUE, $identifier = FALSE) {\n global $PraizedCommunity;\n return $PraizedCommunity->tpt_attribute_helper('merchant', 'location->city->code', $echo, $identifier);\n}", "private function getCountryCode($country)\n {\n $country_code = '';\n\n if (!empty($country)) {\n $country_code = db_get_field('SELECT code_N3 FROM ?:countries WHERE code = ?s', $country);\n }\n\n return $country_code;\n }", "public function zone_a_country($zone_id,$country_id)\n\t{\n\t\tif(!( $this->db->where('zone_id',$zone_id)->where('country_id',$country_id)->get('nct_zones_countries')->row()) )\n\t\t{\n\t\t\tif($arow = $this->db->where('id',$country_id)->get('nct_countries')->row())\n\t\t\t{\n\t\t\t\t//not found\n\t\t\t\t$status = $this->db->insert('nct_zones_countries', array('country_t'=>$arow->name, 'zone_id'=>$zone_id, 'country_id' =>$country_id, 'created' => date(\"Y-m-d H:i:s\"),'created_by' => $this->current_user->id ) );\n\t\t\t\tif($status)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\n\t}", "function getCountryIdByIso2Code($code) {\n\t\t\t$country = $this->getCountryByAttribute( 'iso2_code', $code );\n\n\t\t\tif ($country) {\n\t\t\t\treturn $country->getId( );\n\t\t\t}\n\n\t\t}", "function webform_civicrm_state_abbr($input, $ret = 'abbreviation', $country_id = NULL) {\n $input_type = $ret == 'id' ? 'abbreviation' : 'id';\n $sql = \"SELECT $ret FROM civicrm_state_province WHERE $input_type = %1\";\n $vars = array(1 => array($input, $ret == 'id' ? 'String' : 'Integer'));\n if ($country_id) {\n $sql .= \" AND country_id = %2\";\n $vars[2] = array($country_id, 'Integer');\n }\n $sql .= \" LIMIT 0, 1\";\n return CRM_Core_DAO::singleValueQuery($sql, $vars);\n}", "public function get_country_calling_code($cc)\n {\n }", "public function getCustomerBankZipCode()\n {\n return $this->customerBankZipCode;\n }", "public function getCountryIsoCode3(){\n\n \treturn $this->isoCode3;\n }", "public function getAddressZone() {\n\n\t\t$formatted_address = str_replace(' ', '+', $_POST['address'].'+'.$_POST['city'].'+'.$_POST['state'].'+'.$_POST['country']);\n\t\t$response_data = json_decode(file_get_contents(\"https://maps.googleapis.com/maps/api/geocode/json?address=\".$formatted_address.\"&key=AIzaSyB66f0D1_ZoQwTil30dESztDj42zsDBtNE\"));\n\t\t$return['location'] = $response_data->results[0]->geometry->location;\n\t\t$return['formatted_address'] = $response_data->results[0]->formatted_address;\n\t\t\n\t\theader('Content-Type: application/json');\n\t\techo json_encode($return);\n\t}", "public static function getRegionCode($ip = null): ?string\n {\n $ip = $ip ?? Yii::$app->request->getUserIP();\n\n return static::getGeoManager()->getRegionCode($ip);\n }", "public function getZone()\n {\n return isset($this->zone) ? $this->zone : '';\n }", "public function getZone()\n {\n return isset($this->zone) ? $this->zone : '';\n }", "public function getZone()\n {\n return isset($this->zone) ? $this->zone : '';\n }", "public function getCountryIsoCode()\n {\n return $this->countryIsoCode;\n }", "function lookupCountryCode($code){\n\t\tif( !isset($this->_countryCodes) ){\n\t\t\t$this->_countryCodes = parse_ini_file(dirname( __FILE__ ).'/ini/countryCodes.ini');\n\t\t}\n\t\treturn $this->_countryCodes[\"'\".$code.\"'\"];\n\t}", "public function getCountryCode(): ?string;", "function getCountryCode(){\r\n\t\tif(strlen($res = @json_decode(file_get_contents(\"http://ip-api.com/json/\".$this->ip.\"?fields=175647\"), TRUE)[\"countryCode\"]) == 2){\r\n\t\t\treturn $res;\r\n\t\t}\r\n\r\n\t\t$this->error = array(\"code\" => 2, \"message\" => \"Our third party Ip checking service ipapi.com returned anb unknown error.\");\r\n\t\treturn FALSE;\r\n\t}", "function getzonedetails( $zone_id ){\n\t\t \n\t\t $sql = \"SELECT \n\t\t\t\t\t a.*,\n\t\t\t\t\t\tb.*,\n\t\t\t\t\t\tc.*\n\t\t\t\t\t\t\n\t\t\t\t\tFROM \n\t\t\t\t\t ec_zone_to_location as a\n\t\t\t\t\t\tLEFT JOIN ec_country as b ON ( a.`iso2_cnt` = b.`iso2_cnt` )\n\t\t\t\t\t\tLEFT JOIN ec_state as c ON ( a.`code_sta` = c.`code_sta` AND b.`id_cnt` = c.`idcnt_sta` )\n\t\t\t\t\t\t\n\t\t\t\t\tWHERE \n\t\t\t\t\t a.zone_id = %s\n\t\t\t\t\t\n\t\t\t\t\tORDER BY \n\t\t\t\t\t b.name_cnt\";\n\t\t \n\t\t $results = $this->db->get_results( $this->db->prepare( $sql, $zone_id ) );\n\t\t \n\t\t if( !empty( $results ) ){\n\t\t\t return $results;\n\t\t }else{\n\t\t\t return array( \"noresults\" );\n\t\t }\n\t\t \n\t}", "private function getCountry($country_id){\n\t\t$country ='';\n\t\t$s = array(\n\t\t\t'Af'=>'Afghanistan',\n\t\t\t'AL'=>'Albania',\n\t\t\t'DZ'=>'Algeria',\n\t\t\t'AS'=>'American Samoa',\n\t\t\t'AD'=>'Andorra',\n\t\t\t'AO'=>'Angola',\n\t\t\t'Av'=>'Anguilla',\n\t\t\t'AQ'=>'Antarctica',\n\t\t\t'AG'=>'Antigua and Barbuda',\n\t\t\t'AR'=>'Argentina',\n\t\t\t'AM'=>'Armenia',\n\t\t\t'AA'=>'Aruba',\n\t\t\t'AU'=>'Australia',\n\t\t\t'AT'=>'Austria',\n\t\t\t'AZ'=>'Azerbaijan',\n\t\t\t'BH'=>'Bahrain',\n\t\t\t'BB'=>'Barbados',\n\t\t\t'BD'=>'Bangladesh',\n\t\t\t'BY'=>'Belarus',\n\t\t\t'BE'=>'Belgium',\n\t\t\t'BZ'=>'Belize',\n\t\t\t'BJ'=>'Benin',\n\t\t\t'BM'=>'Bermuda',\n\t\t\t'BO'=>'Bolivia',\n\t\t\t'BA'=>'Bosnia and Herzegovina',\n\t\t\t'BV'=>'Bouvet Island',\n\t\t\t'BR'=>'Brazil',\n\t\t\t'BN'=>'Brunei Darussalam',\n\t\t\t'BG'=>'Bulgaria',\n\t\t\t'BF'=>'Burkina Faso',\n\t\t\t'BI'=>'Burundi',\n\t\t\t'KH'=>'Cambodia (Internet)',\n\t\t\t'CB'=>'Cambodia (CIA World Fact Book)',\n\t\t\t'CM'=>'Cameroon',\n\t\t\t'CA'=>'Canada',\n\t\t\t'CV'=>'Cape Verde',\n\t\t\t'KY'=>'Cayman Islands',\n\t\t\t'CF'=>'Central African Republic',\n\t\t\t'TD'=>'Chad',\n\t\t\t'CL'=>'Chile',\n\t\t\t'CN'=>'China',\n\t\t\t'CX'=>'Christmas Island',\n\t\t\t'CC'=>'Cocos (Keeling) Islands',\n\t\t\t'CO'=>'Colombia',\n\t\t\t'KM'=>'Comoros',\n\t\t\t'CG'=>'Congo',\n\t\t\t'CD'=>'Congo, Democratic Republic',\n\t\t\t'CK'=>'Cook Islands',\n\t\t\t'CR'=>'Costa Rica',\n\t\t\t'CI'=>'Cote DIvoire (Ivory Coast)',\n\t\t\t'HR'=>'Croatia (Hrvatska)',\n\t\t\t'CU'=>'Cuba',\n\t\t\t'CY'=>'Cyprus',\n\t\t\t'CZ'=>'Czech Republic',\n\t\t\t'CS'=>'Czechoslovakia (former)',\n\t\t\t'DK'=>'Denmark',\n\t\t\t'DJ'=>'Djibouti',\n\t\t\t'DM'=>'Dominica',\n\t\t\t'DO'=>'Dominican Republic',\n\t\t\t'TP'=>'East Timor',\n\t\t\t'EC'=>'Ecuador',\n\t\t\t'EG'=>'Egypt',\n\t\t\t'SV'=>'El Salvador',\n\t\t\t'GQ'=>'Equatorial Guinea',\n\t\t\t'ER'=>'Eritrea',\n\t\t\t'EE'=>'Estonia',\n\t\t\t'ET'=>'Ethiopia',\n\t\t\t'FK'=>'Falkland Islands (Malvinas)',\n\t\t\t'FO'=>'Faroe Islands',\n\t\t\t'FJ'=>'Fiji',\n\t\t\t'FI'=>'Finland',\n\t\t\t'FR'=>'France',\n\t\t\t'FX'=>'France, Metropolitan',\n\t\t\t'GF'=>'French Guiana',\n\t\t\t'PF'=>'French Polynesia',\n\t\t\t'TF'=>'French Southern Territories',\n\t\t\t'MK'=>'F.Y.R.O.M. (Macedonia)',\n\t\t\t'GA'=>'Gabon',\n\t\t\t'GM'=>'Gambia',\n\t\t\t'GE'=>'Georgia',\n\t\t\t'DE'=>'Germany',\n\t\t\t'GH'=>'Ghana',\n\t\t\t'GI'=>'Gibraltar',\n\t\t\t'GB'=>'Great Britain (UK)',\n\t\t\t'GR'=>'Greece',\n\t\t\t'GL'=>'Greenland',\n\t\t\t'GD'=>'Grenada',\n\t\t\t'GP'=>'Guadeloupe',\n\t\t\t'GU'=>'Guam',\n\t\t\t'GT'=>'Guatemala',\n\t\t\t'GN'=>'Guinea',\n\t\t\t'GW'=>'Guinea-Bissau',\n\t\t\t'GY'=>'Guyana',\n\t\t\t'HT'=>'Haiti',\n\t\t\t'HM'=>'Heard and McDonald Islands',\n\t\t\t'HN'=>'Honduras',\n\t\t\t'HK'=>'Hong Kong',\n\t\t\t'HU'=>'Hungary',\n\t\t\t'IS'=>'Iceland',\n\t\t\t'IN'=>'India',\n\t\t\t'ID'=>'Indonesia',\n\t\t\t'IR'=>'Iran',\n\t\t\t'IQ'=>'Iraq',\n\t\t\t'IE'=>'Ireland',\n\t\t\t'IL'=>'Israel',\n\t\t\t'IT'=>'Italy',\n\t\t\t'JM'=>'Jamaica',\n\t\t\t'JP'=>'Japan',\n\t\t\t'JO'=>'Jordan',\n\t\t\t'KZ'=>'Kazakhstan',\n\t\t\t'KE'=>'Kenya',\n\t\t\t'KI'=>'Kiribati',\n\t\t\t'KP'=>'Korea (North)',\n\t\t\t'KR'=>'Korea (South)',\n\t\t\t'KW'=>'Kuwait',\n\t\t\t'KG'=>'Kyrgyzstan',\n\t\t\t'LA'=>'Laos',\n\t\t\t'LV'=>'Latvia',\n\t\t\t'LB'=>'Lebanon',\n\t\t\t'LI'=>'Liechtenstein',\n\t\t\t'LR'=>'Liberia',\n\t\t\t'LY'=>'Libya',\n\t\t\t'LS'=>'Lesotho',\n\t\t\t'LT'=>'Lithuania',\n\t\t\t'LU'=>'Luxembourg',\n\t\t\t'MO'=>'Macau',\n\t\t\t'MG'=>'Madagascar',\n\t\t\t'MW'=>'Malawi',\n\t\t\t'MY'=>'Malaysia',\n\t\t\t'MV'=>'Maldives',\n\t\t\t'ML'=>'Mali',\n\t\t\t'MT'=>'Malta',\n\t\t\t'MH'=>'Marshall Islands',\n\t\t\t'MQ'=>'Martinique',\n\t\t\t'MR'=>'Mauritania',\n\t\t\t'MU'=>'Mauritius',\n\t\t\t'YT'=>'Mayotte', \n\t\t\t'MX'=>'Mexico',\n\t\t\t'FM'=>'Micronesia',\n\t\t\t'MC'=>'Monaco',\n\t\t\t'MD'=>'Moldova',\n\t\t\t'MA'=>'Morocco',\n\t\t\t'MN'=>'Mongolia',\n\t\t\t'MS'=>'Montserrat',\n\t\t\t'MZ'=>'Mozambique',\n\t\t\t'RU'=>'Russian Federation', \n\t\t\t'SA'=>'Saudi Arabia',\n\t\t\t'ES'=>'Spain',\n\t\t\t'LK'=>'Sri Lanka',\n\t\t\t'SH'=>'St. Helena ',\n\t\t\t'PM'=>'St. Pierre and Miquelon',\n\t\t\t'SD'=>'Sudan',\n\t\t\t'SR'=>'Suriname',\n\t\t\t'SJ'=>'Svalbard and Jan Mayen Islands',\n\t\t\t'SZ'=>'Swaziland',\n\t\t\t'SE'=>'Sweden',\n\t\t\t'CH'=>'Switzerland',\n\t\t\t'SY'=>'Syria',\n\t\t\t'TW'=>'Taiwan', \n\t\t\t'TJ'=>'Tajikistan',\n\t\t\t'TZ'=>'Tanzania', \n\t\t\t'TH'=>'Thailand',\n\t\t\t'TG'=>'Togo',\n\t\t\t'TK'=>'Tokelau',\n\t\t\t'TO'=>'Tonga',\n\t\t\t'TT'=>'Trinidad and Tobago',\n\t\t\t'TN'=>'Tunisia',\n\t\t\t'TR'=>'Turkey',\n\t\t\t'TM'=>'Turkmenistan',\n\t\t\t'TC'=>'Turks and Caicos Islands',\n\t\t\t'TV'=>'Tuvalu',\n\t\t\t'UG'=>'Uganda',\n\t\t\t'UA'=>'Ukraine',\n\t\t\t'AE'=>'United Arab Emirates',\n\t\t\t'UK'=>'United Kingdom',\n\t\t\t'US'=>'United States',\n\t\t\t'UM'=>'US Minor Outlying Islands',\n\t\t\t'UY'=>'Uruguay',\n\t\t\t'SU'=>'USSR (former)',\n\t\t\t'UZ'=>'Uzbekistan',\n\t\t\t'VU'=>'Vanuatu',\n\t\t\t'VG'=>'Virgin Islands (British)',\n\t\t\t'VI'=>'Virgin Islands (U.S.)',\n\t\t\t'WF'=>'Wallis and Futuna Islands',\n\t\t\t'EH'=>'Western Sahara',\n\t\t\t'YE'=>'Yemen',\n\t\t\t'YU'=>'Yugoslavia',\n\t\t\t'ZM'=>'Zambia',\n\t\t\t'ZW'=>'Zimbabwe'\n\t\t\t);\n\t\t\tforeach($s as $key=>$value){\n\t\t\t\tif($key == $country_id){\n\t\t\t\t\t$country = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $country;\n\t}", "function get_region_states($region) {\n switch($region) {\n case 'hhs1': return \"'VT', 'CT', 'ME', 'MA', 'NH', 'RI'\";\n case 'hhs2': return \"'NJ', 'NY'\";\n case 'hhs3': return \"'DE', 'DC', 'MD', 'PA', 'VA', 'WV'\";\n case 'hhs4': return \"'AL', 'FL', 'GA', 'KY', 'MS', 'NC', 'TN', 'SC'\";\n case 'hhs5': return \"'IL', 'IN', 'MI', 'MN', 'OH', 'WI'\";\n case 'hhs6': return \"'AR', 'LA', 'NM', 'OK', 'TX'\";\n case 'hhs7': return \"'IA', 'KS', 'MO', 'NE'\";\n case 'hhs8': return \"'CO', 'MT', 'ND', 'SD', 'UT', 'WY'\";\n case 'hhs9': return \"'AZ', 'CA', 'HI', 'NV'\";\n case 'hhs10': return \"'AK', 'ID', 'OR', 'WA'\";\n case 'cen1': return \"'CT', 'ME', 'MA', 'NH', 'RI', 'VT'\";\n case 'cen2': return \"'NJ', 'NY', 'PA'\";\n case 'cen3': return \"'IL', 'IN', 'MI', 'OH', 'WI'\";\n case 'cen4': return \"'IA', 'KS', 'MN', 'MO', 'NE', 'ND', 'SD'\";\n case 'cen5': return \"'DE', 'DC', 'FL', 'GA', 'MD', 'NC', 'SC', 'VA', 'WV'\";\n case 'cen6': return \"'AL', 'KY', 'MS', 'TN'\";\n case 'cen7': return \"'AR', 'LA', 'OK', 'TX'\";\n case 'cen8': return \"'AZ', 'CO', 'ID', 'MT', 'NV', 'NM', 'UT', 'WY'\";\n case 'cen9': return \"'AK', 'CA', 'HI', 'OR', 'WA'\";\n }\n return null;\n}" ]
[ "0.7654502", "0.7424421", "0.63839656", "0.6309676", "0.6291127", "0.62611824", "0.6172892", "0.60914236", "0.60889286", "0.5992337", "0.59561956", "0.59435874", "0.59254855", "0.59147567", "0.5914421", "0.58831686", "0.58718413", "0.5862948", "0.58269143", "0.58195955", "0.58072746", "0.58072746", "0.57977873", "0.5767719", "0.5745806", "0.5739792", "0.5725655", "0.5718364", "0.57037586", "0.57033736", "0.5686757", "0.5654908", "0.5651063", "0.5603475", "0.5588508", "0.55818874", "0.55701125", "0.5568862", "0.55634683", "0.5558873", "0.5546758", "0.5543828", "0.55363166", "0.5505108", "0.5504862", "0.5503177", "0.54983443", "0.54983443", "0.54983443", "0.54983443", "0.5479095", "0.5473674", "0.54458636", "0.542245", "0.5419752", "0.5419509", "0.54121447", "0.5400247", "0.53963065", "0.53738165", "0.537341", "0.5370229", "0.53700465", "0.53642553", "0.53521377", "0.53449523", "0.53387016", "0.5331895", "0.53304386", "0.52998364", "0.5291716", "0.52902853", "0.5287837", "0.5281754", "0.52801317", "0.52694434", "0.52617747", "0.5257542", "0.52564985", "0.525453", "0.52475786", "0.5247343", "0.5243238", "0.5242901", "0.52356905", "0.5231615", "0.522914", "0.5227185", "0.52247965", "0.5223359", "0.52173066", "0.52173066", "0.52173066", "0.52049613", "0.520237", "0.51917857", "0.5191497", "0.51863056", "0.5186156", "0.51819575" ]
0.83337086
0
// Return the manufacturers URL in the needed language TABLES: manufacturers_info
// Возвращать URL производителя на нужном языке ТАБЛИЦЫ: manufacturers_info
function twe_get_manufacturer_url($manufacturer_id, $language_id) { global $db; $manufacturer_query = "select manufacturers_url from " . TABLE_MANUFACTURERS_INFO . " where manufacturers_id = '" . $manufacturer_id . "' and languages_id = '" . $language_id . "'"; $manufacturer = $db->Execute($manufacturer_query); return $manufacturer->fields['manufacturers_url']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function AdminManufacturers(){\n\t\t$categories = $this->manufacturerTable->findAll();\n\t\t\n\t\treturn [\n\t\t\t\t'template' => 'admin/manufacturers.html.php',\n\t\t\t\t'title' => 'Claires\\'s Cars - Admin Manufacturer',\n\t\t\t\t'variables' => [\n\t\t\t\t\t\t\t\t'categories' => $categories\n\t\t\t\t\t\t\t\t]\n\t\t];\n\t}", "function getManufacturersData($pid) {\n \n\t$query = xtDBquery(\"select \n\t\tm.manufacturers_id, m.manufacturers_name, m.manufacturers_image, mi.manufacturers_url \n\t\tfrom \".TABLE_MANUFACTURERS.\" m left join \".TABLE_MANUFACTURERS_INFO.\" mi \n\t\ton (m.manufacturers_id = mi.manufacturers_id and mi.languages_id = '\" . (int)$_SESSION['languages_id'].\"'), \".TABLE_PRODUCTS.\" p \n\t\twhere p.products_id = '\".$pid.\"' and p.manufacturers_id = m.manufacturers_id\"\n\t);\n\t\n\tif (xtc_db_num_rows($query,true)) {\n\t\t$data = xtc_db_fetch_array($query,true); $image = '';\n\t\tif (xtc_not_null($data['manufacturers_image'])) $image = DIR_WS_IMAGES.$data['manufacturers_image'];\n\t\t\n\t\t$return['image'] = $image;\n\t\t$return['name'] = $data['manufacturers_name'];\n\t\t$return['link'] = xtc_href_link( FILENAME_DEFAULT, xtc_manufacturer_link($data['manufacturers_id'],$data['manufacturers_name']) );\n\t\tif ($data['manufacturers_url']!='')\n \t\t$return['website'] = xtc_href_link(FILENAME_REDIRECT,'action=manufacturer&'.xtc_manufacturer_link($data['manufacturers_id'],$data['manufacturers_name']));\n\t\t\n\t\treturn $return;\n\t}\n}", "static function get_manufaturer($urls){\n $data=[];\n $url=explode('-cp-', $urls);\n if(isset($url[1])){\n $category=Category_product_model::find($url[1]);\n if($category){\n $data=Manufacturer_model::join('product', 'product.id_manufacturer', '=', 'manufacturer.id')->where('product.id_category','=',$category->id)->select('manufacturer.id','manufacturer.name')->distinct()->get();\n }\n }\n return $data;\n }", "public function AdminAddManufacturers(){\n\t\tif (isset($_POST['submit'])) {\n\t\t\t$this->manufacturerTable->addManufacturer($_POST);\n\t\t}\n\t\treturn [\n\t\t\t\t'template' => 'admin/addmanufacturer.html.php',\n\t\t\t\t'title' => 'Claires\\'s Cars - Admin Manufacturer',\n\t\t\t\t'variables' => []\n\t\t\t\t];\n\t}", "public function getManufacturerURLKeyword($manufacturer_id) {\n\t\t$url_keyword = array();\n\t\t\n\t\tif (VERSION >= '3.0.0.0') {\t\n\t\t\t$query = $this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"seo_url WHERE query = 'manufacturer_id=\" . (int)$manufacturer_id . \"'\");\n\t\t} else {\n\t\t\t$query = $this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"d_url_keyword WHERE route = 'manufacturer_id=\" . (int)$manufacturer_id . \"'\");\n\t\t}\n\t\t\n\t\tforeach ($query->rows as $result) {\n\t\t\t$url_keyword[$result['store_id']][$result['language_id']] = $result['keyword'];\n\t\t}\n\t\t\t\t\t\n\t\treturn $url_keyword;\n\t}", "public function getManufacturerUri($oManufacturer, $iLang = null, $blRegenerate = false)\n {\n if (!isset($iLang)) {\n $iLang = $oManufacturer->getLanguage();\n }\n // load from db\n if ($blRegenerate || !($sSeoUrl = $this->_loadFromDb('oxmanufacturer', $oManufacturer->getId(), $iLang))) {\n\n if ($iLang != $oManufacturer->getLanguage()) {\n $sId = $oManufacturer->getId();\n $oManufacturer = oxNew('oxmanufacturer');\n $oManufacturer->loadInLang($iLang, $sId);\n }\n\n $sSeoUrl = '';\n if ($oManufacturer->getId() != 'root') {\n if (!isset($this->_aRootManufacturerUri[$iLang])) {\n $oRootManufacturer = oxNew('oxmanufacturer');\n $oRootManufacturer->loadInLang($iLang, 'root');\n $this->_aRootManufacturerUri[$iLang] = $this->getManufacturerUri($oRootManufacturer, $iLang);\n }\n $sSeoUrl .= $this->_aRootManufacturerUri[$iLang];\n }\n\n $sSeoUrl .= $this->_prepareTitle($oManufacturer->oxmanufacturers__oxtitle->value, false, $oManufacturer->getLanguage()) . '/';\n $sSeoUrl = $this->_processSeoUrl($sSeoUrl, $oManufacturer->getId(), $iLang);\n\n // save to db\n $this->_saveToDb('oxmanufacturer', $oManufacturer->getId(), $oManufacturer->getBaseStdLink($iLang), $sSeoUrl, $iLang);\n }\n\n return $sSeoUrl;\n }", "function tep_get_manufacturers_name($manufacturers_id) {\n\n $manufactures_query = tep_db_query(\"select manufacturers_name from \" . TABLE_MANUFACTURERS . \" where manufacturers_id = '\" . (int)$manufacturers_id . \"'\");\n $manufactures = tep_db_fetch_array($manufactures_query);\n\n return $manufactures['manufacturers_name'];\n }", "protected function _getManufacturers($blReset = false)\n {\n if ($this->_aManufacturers !== null && !$blReset) {\n return $this->_aManufacturers;\n }\n $sManufacturersTable = getViewName('oxmanufacturers');\n $sLangTag = $this->_getLanguageTagForTable($sManufacturersTable);\n $sTitleField = 'OXTITLE'.$sLangTag;\n $sSQL = \" SELECT OXID, {$sTitleField} as OXTITLE FROM {$sManufacturersTable} \";\n $this->_aManufacturers = $this->_dbGetAll($sSQL);\n return $this->_aManufacturers;\n }", "public function importManufacturers()\n {\n\n $db = $this->dbSrc;\n $shopId = 1;\n\n\n $rows = QuickPdo::fetchAll(\"\nselect \nm.id_manufacturer,\nm.name\nfrom $db.ps_manufacturer m \n \");\n\n\n $manufacturer = EkomApi::inst()->manufacturer();\n foreach ($rows as $row) {\n $manufacturer->push([\n \"id\" => $row['id_manufacturer'],\n \"shop_id\" => $shopId,\n ], [\n \"shop_id\" => $shopId,\n \"name\" => $row['name'],\n \"id\" => $row['id_manufacturer'],\n ]);\n }\n }", "public function getManufacturerLink($manufacturer, $alias = null, $id_lang = null)\n {\n }", "public function testFrontendManufacturer()\n {\n $this->openShop();\n $this->clickAndWait(\"//dl[@id='footerManufacturers']//a[text()='Manufacturer [EN] šÄßüл']\");\n $this->assertEquals(\"%YOU_ARE_HERE%: / %BY_MANUFACTURER% / Manufacturer [EN] šÄßüл\", $this->getText(\"breadCrumb\"));\n $this->assertEquals(\"Manufacturer [EN] šÄßüл\", $this->getText(\"//h1\"));\n $this->assertEquals(\"Manufacturer description [EN] šÄßüл\", $this->getText(\"catDesc\"));\n $this->_checkArticleList();\n\n //going to vendor root by path link (you are here)\n $this->clickAndWait(\"//nav[@id='breadCrumb']/a[1]\");\n $this->assertEquals(\"%YOU_ARE_HERE%: / %BY_MANUFACTURER%\", $this->getText(\"breadCrumb\"));\n $this->assertElementNotPresent(\"//h1\");\n //going to vendor via menu link\n $this->assertEquals(\"Manufacturer [EN] šÄßüл\", $this->clearString($this->getAttribute(\"//a[@id='moreSubCat_8']/@title\")));\n\n $this->clickAndWait(\"moreSubCat_8\");\n $this->assertEquals(\"%YOU_ARE_HERE%: / %BY_MANUFACTURER% / Manufacturer [EN] šÄßüл\", $this->getText(\"breadCrumb\"));\n $this->assertEquals(\"Manufacturer [EN] šÄßüл\", $this->getText(\"//h1\"));\n $this->assertEquals(\"Manufacturer description [EN] šÄßüл\", $this->getText(\"catDesc\"));\n $this->_checkArticleList();\n\n //manufacturers tree is disabled\n $this->callShopSC(\"oxConfig\", null, null, array(\"bl_perfLoadManufacturerTree\" => array(\"type\" => \"bool\", \"value\" => \"false\")));\n $this->clearCache();\n $this->openShop();\n $this->assertElementNotPresent(\"footerManufacturers\");\n\n }", "public function index(ManufacturersDatatable $manufacturers)\r\n {\r\n $notifications = new Notifications();\r\n return $manufacturers->render('mall_manager.manufacturers.index', ['title' => trans('admin.manufacturers_control'), 'notifications' => $notifications]);\r\n }", "public static function getAllCartManufacturers() {\n\t\t$sql = 'select `manufacturers_id` from cart_manufacturers order by manufacturers_name';\n\t\t$results = Database::singleton()->query_fetch_all($sql);\n\t\t\n\t\tforeach ($results as &$result) {\n\t\t\t$result = new CartManufacturer($result['manufacturers_id']);\n\t\t}\n\t\t\n\t\treturn $results;\n\t}", "private function getManufacturersForSitemap(ShopContextInterface $shopContext)\n {\n $categoryId = $shopContext->getShop()->getCategory()->getId();\n\n /** @var QueryBuilder $query */\n $query = $this->connection->createQueryBuilder();\n $query->select(['manufacturer.id', 'manufacturer.name', 'manufacturer.changed']);\n\n $query->from('s_articles_supplier', 'manufacturer');\n $query->innerJoin('manufacturer', 's_articles', 'product', 'product.supplierID = manufacturer.id')\n ->innerJoin('product', 's_articles_categories_ro', 'categories', 'categories.articleID = product.id AND categories.categoryID = :categoryId')\n ->setParameter(':categoryId', $categoryId);\n\n $query->groupBy('manufacturer.id');\n\n /** @var \\PDOStatement $statement */\n $statement = $query->execute();\n\n return $statement->fetchAll(\\PDO::FETCH_ASSOC);\n }", "public function transform($manufacturer)\n {\n\t\treturn [\n 'id' => $manufacturer->id,\n 'name' => $manufacturer->name,\n 'logo' => config('app.url'). $manufacturer->logo,\n ];\n\t}", "public function getManuProducts()\n {\n $sql = \"SELECT * FROM `manufactures`\";\n // thuc thi cau truy van\n $result = self::$conn->query($sql);\n return $this->getData($result);\n }", "protected function _getManufacturerLink(&$linkSitemap, $lang, &$index, &$i, $idManufacturer = 0)\n {\n $link = new Link();\n if (method_exists('ShopUrl', 'resetMainDomainCache')) {\n ShopUrl::resetMainDomainCache();\n }\n $manufacturersId = Db::getInstance()->ExecuteS(\n 'SELECT m.`id_manufacturer` FROM `'._DB_PREFIX_.'manufacturer` m\n\t\t\tINNER JOIN `'._DB_PREFIX_.'manufacturer_lang` ml on m.`id_manufacturer` = ml.`id_manufacturer`'.\n ($this->tableColumnExists(_DB_PREFIX_.'manufacturer_shop') ? ' INNER JOIN `'._DB_PREFIX_.'manufacturer_shop` ms ON m.`id_manufacturer` = ms.`id_manufacturer` ' : '').\n ' WHERE m.`active` = 1 AND m.`id_manufacturer` >= '.(int) $idManufacturer.\n ($this->tableColumnExists(_DB_PREFIX_.'manufacturer_shop') ? ' AND ms.`id_shop` = '.(int) $this->context->shop->id : '').\n ' AND ml.`id_lang` = '.(int) $lang['id_lang'].\n ' ORDER BY m.`id_manufacturer` ASC'\n );\n foreach ($manufacturersId as $manufacturerId) {\n $manufacturer = new Manufacturer((int) $manufacturerId['id_manufacturer'], $lang['id_lang']);\n $url = $link->getManufacturerLink($manufacturer, $manufacturer->link_rewrite, $lang['id_lang']);\n\n $imageLink = 'http'.(Configuration::get('PS_SSL_ENABLED') ? 's' : '').'://'.Tools::getMediaServer(_THEME_MANU_DIR_)._THEME_MANU_DIR_.((!file_exists(_PS_MANU_IMG_DIR_.'/'.(int) $manufacturer->id.'-medium_default.jpg')) ? $lang['iso_code'].'-default' : (int) $manufacturer->id).'-medium_default.jpg';\n $imageLink = (!in_array(rtrim(Context::getContext()->shop->virtual_uri, '/'), explode('/', $imageLink))) ? str_replace(\n [\n 'https',\n Context::getContext()->shop->domain.Context::getContext()->shop->physical_uri,\n ], [\n 'http',\n Context::getContext()->shop->domain.Context::getContext()->shop->physical_uri.Context::getContext()->shop->virtual_uri,\n ], $imageLink\n ) : $imageLink;\n\n $fileHeaders = (Configuration::get('SITEMAP_CHECK_IMAGE_FILE')) ? @get_headers($imageLink) : true;\n $manifacturerImage = [];\n if ($fileHeaders[0] != 'HTTP/1.1 404 Not Found' || $fileHeaders === true) {\n $manifacturerImage = [\n 'title_img' => htmlspecialchars(strip_tags($manufacturer->name)),\n 'caption' => htmlspecialchars(strip_tags($manufacturer->short_description)),\n 'link' => $imageLink,\n ];\n }\n if (!$this->_addLinkToSitemap(\n $linkSitemap,\n [\n 'type' => 'manufacturer',\n 'page' => 'manufacturer',\n 'lastmod' => $manufacturer->date_upd,\n 'link' => $url,\n 'image' => $manifacturerImage,\n ],\n $lang['iso_code'],\n $index,\n $i,\n $manufacturerId['id_manufacturer']\n )) {\n return false;\n }\n }\n\n return true;\n }", "public function getManufacturerUrl($oManufacturer, $iLang = null)\n {\n if (!isset($iLang)) {\n $iLang = $oManufacturer->getLanguage();\n }\n\n return $this->_getFullUrl($this->getManufacturerUri($oManufacturer, $iLang), $iLang);\n }", "public function getmultiselectUrl() {\n return Mage::getUrl('marketplace/product/managedeals');\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $manufacturers = $em->getRepository('AppBundle:Manufacturer')->findBy([], ['description' => 'ASC']);\n\n return $this->render('manufacturer/index.html.twig', array(\n 'manufacturers' => $manufacturers,\n ));\n }", "public function index(ManufacturerDatatable $manufacturer)\n {\n return $manufacturer->render('dashboard.manufacturers.index', ['title' => __('admin.manufacturers')]);\n }", "public function getCataloguePageUrl();", "function legume_organism_chado_node_default_url_format() {\n return '/organism/[organism.genus]/[organism.species]';\n}", "function hbdata_url()\n {\n $module = $this->hbdata_module();\n foreach ((array) $module['column'] as $module_id)\n $url[$module_id] = $this->rewrite_url($module_id . '_category');\n foreach ((array) $module['single'] as $module_id)\n $url[$module_id] = $this->rewrite_url($module_id);\n\n // cart url\n $url['cart'] = $this->rewrite_url('order', 'cart');\n\n // user common url\n foreach (explode('|', 'login|register|logout|order|order_list') as $value)\n $url[$value] = $this->rewrite_url('user', $value);\n\n // url of cur module's child\n if ($GLOBALS['subbox']['sub']) // use column value to split url\n foreach (explode('|', $GLOBALS['subbox']['sub']) as $value)\n $url[$value] = $this->rewrite_url($GLOBALS['subbox']['module'], $value);\n\n return $url;\n }", "public function getManufacturer() {\n $result = $this->db->query(\"SELECT oxarticles.OXID,oxarticles.OXMANUFACTURERID,oxmanufacturers.OXTITLE FROM oxarticles LEFT JOIN oxmanufacturers ON oxarticles.OXMANUFACTURERID = oxmanufacturers.OXID\n WHERE oxmanufacturers.OXTITLE IS NOT NULL AND oxarticles.OXID='\".$this->db->validate($this->id).\"'\");\n if($result->num_rows == 0) return \"\";\n $data = $result->fetch_object();\n return $data->OXTITLE;\n }", "function seo_urls(){\n\n\t\t$method = $this->router->fetch_method();\n\t\t//die($method);\t\t\t\t\n\t\tif( $this->uri->segment(2) != ''){\n\t\t\t \n\n\t\t\t$updated_string = uri_string();\n\t\t \n\t\t\t$updated_string=explode(\"/\", $updated_string, 3);\n\n\t\t\tif( $method=='material'){\n\t\t\t$updated_string1=explode(\"/\", $updated_string[2], 3);\n\t\t\t$str =\t$updated_string1[0];\n\t\t\t$this->title = $this->title . \" | \" .ucfirst($str) . \" \" .ucfirst($updated_string1[1]);\n\t\t\t//print_r($this->title);die;\n\t\t\t}\n\t\t\telse{\n\t\t\t$str = rtrim($updated_string[2], '/');\n\n\t\t\t$str = str_replace(array('/', '-'), ' ', $str);\n\t\t\t\n\t\t\t// $str =\t$this->home_model->get_translated_version($str);\n \n\t\t\t$this->title = ucfirst($str) . \" | \".$this->title;\n\t\t\t}\n\t\t\t\n \n\t\t\t$this->desc = $this->desc .\" \".ucfirst($str);\n\t\t\t}\n\n\t\t\t//die($this->title);\n\t}", "public function index()\n {\n $manufacturers = Manufacturer::select()->paginate(10);\n\n return view('frontend.manufacturer.index', compact('manufacturers'));\n }", "public function getListingUrl();", "public function getProductDescription()\n {\n return Mage::registry('product')->getProductUrl();\n }", "public function url()\n {\n return '/admin/stores/' . $this->store->id;\n }", "public function save_all_manufacturer_info(){\n\n\t \t\t$query = \"SELECT * FROM tbl_manufacturer\";\n\t \t\t$show_manufacturer_query = mysqli_query($this->connection,$query);\n\n\t \t\tif($show_manufacturer_query){\n\t \t\t\treturn $show_manufacturer_query;\n\t \t\t}else {\n\t \t\t\tdie(\"Query Failed\".mysqli_error($this->connection));\n\t \t\t}\n\n\t }", "function adelman_product_artist() {\n $providers = get_field('provider'); ?>\n <?php if( $providers ): ?>\n <?php foreach( $providers as $provider ): ?>\n Artist: <a href=\"<?php echo get_permalink( $provider->ID ); ?>\">\n <?php echo get_the_title( $provider->ID ); ?>\n </a>\n <?php endforeach; ?>\n <?php endif; \n}", "public function medicine_search_manufacture($manufacturer_id=null)\n\t{\n\t\t$this->db->select(\"a.*,d.*\");\n\t\t$this->db->from('product_information a');\n\t\t$this->db->join('manufacturer_information d','d.manufacturer_id = a.manufacturer_id','left');\n\t\t$this->db->where('c.manufacturer_id',$manufacturer_id);\n\t\t$this->db->group_by('a.product_id');\n\t\t$this->db->order_by('a.product_id','desc');\n\t\t$query = $this->db->get();\n\n\t\treturn $stok_report = $query->result_array();\n\t}", "public function getUrlSatuanBesar(){\n\t\treturn $this->module->id.'/satuanBesarMGF/admin';\n\t}", "public function getManufacturerPageUrl($oManufacturer, $iPage, $iLang = null, $blFixed = null)\n {\n if (!isset($iLang)) {\n $iLang = $oManufacturer->getLanguage();\n }\n $sStdUrl = $oManufacturer->getBaseStdLink($iLang) . '&amp;pgNr=' . $iPage;\n $sParams = $sParams = (int) ($iPage + 1);\n\n $sStdUrl = $this->_trimUrl($sStdUrl, $iLang);\n $sSeoUrl = $this->getManufacturerUri($oManufacturer, $iLang) . $sParams . \"/\";\n\n if ($blFixed === null) {\n $blFixed = $this->_isFixed('oxmanufacturers', $oManufacturer->getId(), $iLang);\n }\n\n return $this->_getFullUrl($this->_getPageUri($oManufacturer, 'oxmanufacturers', $sStdUrl, $sSeoUrl, $sParams, $iLang, $blFixed), $iLang);\n }", "public function getPickupInfoUrl()\n {\n $_url = Mage::getUrl('mondialrelay/index/pickupinfo', array('_secure' => Mage::app()->getFrontController()->getRequest()->isSecure())); \n return $_url;\n }", "function getURL()\r\n\t{\r\n\t\treturn 'http://www.slightlysome.net/nucleus-plugins/np_lmurlparts';\r\n\t}", "function getProductUrl($x) {\r\n\r\n\t$temp = seo_friendly_url($x['name']);\r\n\t// return url('item/' . $x['code'] . '/' . urlencode($temp), 'product');\r\n\treturn url('' . $x['code'] . '/' . urlencode($temp), 'collection');\r\n\r\n}", "static function getSupportedManufacturerArray() {\r\n return explode(\",\", self::SUPPORTED_MANUFACTURERS);\r\n }", "function cf7_add_product_manufacturer(){\n\n if(isset($_GET['product_id'])){\n\n $product_id = intval( esc_attr($_GET['product_id']));\n if($product_id == 0){ return false; }\n\n $product_manufacturer = strip_tags( get_the_term_list( $product_id, 'manufacturer', '', ' / ' ) );\n\n return $product_manufacturer;\n }\n return false;\n\n}", "public static function getManufacturers($id_shop)\n {\n $sql = 'SELECT m.`id_manufacturer`\n FROM '._DB_PREFIX_.'manufacturer m\n LEFT JOIN '._DB_PREFIX_.'manufacturer_shop ms\n ON(ms.`id_manufacturer` = m.`id_manufacturer`)\n WHERE ms.`id_shop` = '.(int)$id_shop.'\n AND m.`active` = 1';\n\n return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);\n }", "function geturl()\n {\n $type = $this->EE->TMPL->fetch_param('type');\n return $this->EE->store_model->build_url_types($type,$this->site_id);\n }", "public function manufacturer_id() {\n \n $this->load->language('api/manufacturer');\n $json = array();\n \n if (!isset($this->session->data['api_id'])) {\n $json['error']['warning'] = $this->language->get('error_permission');\n } else {\n if (isset($this->request->get['man_id'])) {\n\t\t\t$man_id = $this->request->get['man_id'];\n\t\t} else {\n\t\t\t$man_id = 0;\n\t\t\t$json['status'] = 'error';\n\t\t\t$json['message'] = 'NO man_id provided';\n\t\t\t$this->response->addHeader('Content-Type: application/json');\n\t\t\treturn $this->response->setOutput(json_encode($json));\n\t\t}\n\t\t\n\t\t// load model\n $this->load->model('catalog/manufacturer');\n \n $manufacturer = $this->model_catalog_manufacturer->getManufacturer($man_id);\n $json['success']['manufacturer'] = $manufacturer;\n }\n \n \n\t\t\n if (isset($this->request->server['HTTP_ORIGIN'])) {\n $this->response->addHeader('Access-Control-Allow-Origin: ' . $this->request->server['HTTP_ORIGIN']);\n $this->response->addHeader('Access-Control-Allow-Methods: GET, PUT, POST, DELETE, OPTIONS');\n $this->response->addHeader('Access-Control-Max-Age: 1000');\n $this->response->addHeader('Access-Control-Allow-Headers: Content-Type, Authorization, X-Requested-With');\n }\n \n $this->response->addHeader('Content-Type: application/json');\n $this->response->setOutput(json_encode($json));\n // echo \"start\";\n }", "public function index()\n {\n $manufactures=Manufacture::orderBy('id', 'DESC')->get();;\n return view('admin.manufactures.index',[\n 'manufactures' => $manufactures,\n ]);\n }", "public function getUrl()\n {\n if ($this->type == 'mirna') {\n return 'http://www.mirbase.org/cgi-bin/query.pl?terms=' . $this->accession;\n } elseif ($this->type == 'gene') {\n return 'https://www.ncbi.nlm.nih.gov/gene/' . $this->accession;\n } else {\n return 'http://www.kegg.jp/dbget-bin/www_bget?' . $this->accession;\n }\n }", "function acf_get_admin_tools_url() {}", "public function index()\n\t{\n\t $manus = Manu::all();\n\t\treturn view('admin.manufactures',[\n\t\t 'manus'=> $manus\n ]);\n\t}", "public function getUrlTabularList(){\n\t\treturn $this->module->id.'/TabularListMRJ/Admin';\n\t}", "public static function getManufacturers()\n {\n $makes=Bikes::find()->select('Make')->distinct()->asArray()->All();\n/*\n $primaryConnection = \\Yii::$app->db;\n $command = $primaryConnection->createCommand('select distinct `Make` from tbl_bikestock where sold = 0 and trim < \"D\" order by make');\n $rows = $command->queryAll();\n $makes=[];\n// dicked around with to correct 2nd hand bike filtering using form rather than dropdown. \n foreach ($rows as $make){\n // $makes[]=array('label'=>$make['Make'],'url'=>'?BikeSearch[make]='.trim($make['Make']).'&page=1');\n $makes[]=$make;\n }\n */\n return $makes;\n }", "public static function getModulesListUrl() { }", "public function getManufacturerName(){\r\n\t\t$this->initDb();\r\n\t\tif($this->manufacturer_id !=0){\r\n\t\t\t//$this->manufacturer_name = getResultSet(\"SET NAMES UTF8\");\r\n\t\t\t$this->manufacturer_name = getValue(\"SELECT name FROM tbl_manufacturer WHERE manufacturer_id=\".$this->manufacturer_id);\r\n\t\t}\r\n\t\treturn $this->manufacturer_name;//.\"lag= \".$this->getLanguageId();\t\r\n\t}", "public function getAdminURL()\n\t{\n\t\treturn '/admin/complects/complect/'.$this->id.'/';\n\t}", "public function getProductsbyManufacturer($manufacture_string) {\n\t\ttry {\n\t\t$pdocon = $this->ConnectPDO();\n\t\t\n\t\t$pdoStatement = $pdocon->prepare(\"CALL h14viwib_getProductsbyManufacturer('{$manufacture_string}')\");\n\t\t$pdoStatement->execute();\n\t\t$productsbyManufacturer = $pdoStatement->fetchAll();\n\t\t$pdocon = NULL;\n\t\t\n\t\treturn $productsbyManufacturer;\n\t\t}\n\t\tcatch (PDOException $pdoexp){\n\t\t\t$pdocon = NULL;\n\t\t\tthrow new Exception('Databasfel - kan ej hämta produkter '.$pdoexp->getMessage());\n\t\t}\n\t}", "public function URLProvider()\n {\n return [[\"http://example.com\"], [\"https://example.com\"]];\n }", "public function getUrlGenerik(){\n\t\treturn $this->module->id.'/generikMGF/admin';\n\t}", "function getURL() {\r\n\t\treturn 'http://japan.nucleuscms.org/wiki/plugins:related'; \r\n\t}", "function get_manufacturers_value($product_id = '') {\n global $db;\n \n/*\n <orderIcpNo>880001</orderIcpNo>\n <orderNo>100812145518-0M00007</orderNo>\n <orderAmt>222</orderAmt>\n <orderNotifyUrl>http://61.220.207.137:8080/twweb/payreceive.action</orderNotifyUrl>\n <orderDate>2010-08-12 14:55:18</orderDate>\n <orderDesc>牛肉乾</orderDesc>\n <orderIcpName>twra</orderIcpName>\n <orderReturnUrl>http://61.220.207.137:8080/twweb/product.action</orderReturnUrl>\n <orderTelNo>0920780842</orderTelNo>\n <orderPid>A123456789</orderPid>\n <orderBirthday>1960-12-12</orderBirthday>\n <orderUserEmail>test4@twra.com.tw</orderUserEmail>\n <orderSendedAddress>台北市中正區羅斯福路一段100號</orderSendedAddress>\n\n */\n if ($product_id) {\n $query_str = \"select p.products_price as products_price, \";\n $query_str .= \"m.manufacturers_id as manufacturers_id, m.manufacturers_name as manufacturers_name \";\n $query_str .= \"FROM products as p, manufacturers as m \";\n $query_str .= \" where p.products_id = \".$product_id.\" AND p.manufacturers_id = m.manufacturers_id\";\n } else {\n \tdie();\n }\n\n $query_value = $db->Execute($query_str);\n\n twe_session_register('customer_geninfo_value');\nreturn $query_value;\n}", "public function getUrlInfo();", "public function getUrlGenerik(){\n\t\treturn '/sistemAdministrator/generikM/admin';\n\t}", "public function manufactures()\n {\n return $this->hasMany(Manufacture::class);\n }", "public function getUrlKadarObat(){\n\t\treturn $this->module->id.'/kadarObatMGF/admin';\n\t}", "public function get_manage_url() : string\n {\n }", "public function getCatalogUrl()\n {\n if ($this->url != \"\") {\n return $this->url;\n } else if ($this->article_id != 0) {\n return url(\"A\", $this->article_id);\n } else {\n return url(\"L\", $this->id);\n }\n }", "public function getManufacturerIconName(){\r\n\t\t$this->initDb();\r\n\t\tif($this->manufacturer_id !=0){\r\n\t\t\t$this->manufacturer_picture = getValue(\"SELECT picture FROM tbl_manufacturer WHERE manufacturer_id=\".$this->manufacturer_id);\r\n\t\t}\r\n\t\treturn $this->manufacturer_picture;\t\r\n\t}", "public function url()\n {\n return '/artists/' . $this->artist->slug;\n }", "abstract protected function infoURL();", "public function getUrlTherapiObat(){\n\t\treturn $this->module->id.'/therapiObatMGF/Admin';\n\t}", "public function manufacturer()\n {\n \treturn $this->BelongsTo('App\\Models\\Manufacturer', 'manufacturer_id');\n }", "public static function getProductSetsHelpLink(): ?array\n\t{\n\t\treturn self::getHelpLink(self::PRODUCT_SETS);\n\t}", "protected function getOverviewUrl()\n {\n return \"/\" . strtolower(WMLanguage::translate(\"cursussen\"));\n }", "function index() {\n\t\t$customer_type_id = $this->Manufacturer->Product->CustomerTypeProductPrice->CustomerType->get_id($this->Session->read());\n\t\t\n\t\t$this->Manufacturer->virtualFields['products_count'] = 'COUNT(Product.id)';\n\t\t$manufacturers = $this->Manufacturer->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'Product.active' => true,\n\t\t\t\t'Category.active' => true,\n\t\t\t\t$this->Manufacturer->Product->price . ' > 0',\n\t\t\t\t'Manufacturer.name !=' => ''\n\t\t\t),\n\t\t\t'contain' => array(),\n\t\t\t'joins' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'table' => 'products',\n\t\t\t\t\t'alias' => 'Product',\n\t\t\t\t\t'type' => 'LEFT',\n\t\t\t\t\t'conditions' => array('Product.manufacturer_id = Manufacturer.id')\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'table' => 'customer_type_product_prices',\n\t\t\t\t\t'alias' => 'CustomerTypeProductPrice',\n\t\t\t\t\t'type' => 'LEFT',\n\t\t\t\t\t'conditions' => array('Product.id = CustomerTypeProductPrice.product_id AND CustomerTypeProductPrice.customer_type_id = ' . $customer_type_id)\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'table' => 'customer_type_product_prices',\n\t\t\t\t\t'alias' => 'CustomerTypeProductPriceCommon',\n\t\t\t\t\t'type' => 'LEFT',\n\t\t\t\t\t'conditions' => array('Product.id = CustomerTypeProductPriceCommon.product_id AND CustomerTypeProductPriceCommon.customer_type_id = 2')\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'table' => 'categories_products',\n\t\t\t\t\t'alias' => 'CategoriesProduct',\n\t\t\t\t\t'type' => 'INNER',\n\t\t\t\t\t'conditions' => array('Product.id = CategoriesProduct.product_id')\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'table' => 'categories',\n\t\t\t\t\t'alias' => 'Category',\n\t\t\t\t\t'type' => 'INNER',\n\t\t\t\t\t'conditions' => array('Category.id = CategoriesProduct.category_id')\n\t\t\t\t),\n\t\t\t),\n\t\t\t'fields' => array('Manufacturer.id', 'Manufacturer.name', 'Manufacturer.products_count'),\n\t\t\t'group' => array('Manufacturer.id'),\n\t\t));\n\t\t\n\t\tforeach ($manufacturers as $index => &$manufacturer) {\n\t\t\t$manufacturer['Manufacturer']['url'] = $this->Manufacturer->get_url($manufacturer['Manufacturer']['id']);\n\t\t\t$manufacturer['Manufacturer']['name'] = trim(mb_convert_case(mb_strtolower($manufacturer['Manufacturer']['name']), MB_CASE_TITLE));\n\t\t}\n\t\tusort($manufacturers, array('Manufacturer', 'sortByName'));\n\n\t\t$this->set('manufacturers', $manufacturers);\n\t\t\n\t\t$this->layout = REDESIGN_PATH . 'content';\n\t\t$this->set('_title', 'Výrobci');\n\t\t$this->set('_description', 'LékárnaTypos CZ prodává zboží těchto výrobců');\n\t\t\n\t\t// sestavim breadcrumbs\n\t\t$breadcrumbs = array(\n\t\t\tarray('anchor' => 'Domů', 'href' => '/'),\n\t\t\tarray('anchor' => 'Výrobci', 'href' => '/vyrobci')\n\t\t);\n\t\t$this->set('breadcrumbs', $breadcrumbs);\n\t}", "public function index()\n {\n return view('backend.pages.manufactures.index')->with(['manufactures'=>$this->manufactureProceed->index()]);\n }", "public function saveManufacturerURLKeyword($data) {\n\t\t$this->load->model('extension/module/' . $this->codename);\n\t\t\n\t\tif (VERSION >= '3.0.0.0') {\n\t\t\t$this->db->query(\"DELETE FROM \" . DB_PREFIX . \"seo_url WHERE query = 'manufacturer_id=\" . (int)$data['manufacturer_id'] . \"'\");\n\t\t} else {\n\t\t\t$this->db->query(\"DELETE FROM \" . DB_PREFIX . \"d_url_keyword WHERE route = 'manufacturer_id=\" . (int)$data['manufacturer_id'] . \"'\");\n\t\t\t$this->db->query(\"DELETE FROM \" . DB_PREFIX . \"url_alias WHERE query = 'manufacturer_id=\" . (int)$data['manufacturer_id'] . \"'\");\n\t\t}\n\t\t\n\t\tif (isset($data['url_keyword'])) {\t\n\t\t\tforeach ($data['url_keyword'] as $store_id => $language_url_keyword) {\n\t\t\t\tforeach ($language_url_keyword as $language_id => $url_keyword) {\n\t\t\t\t\tif ($url_keyword) {\n\t\t\t\t\t\tif (VERSION >= '3.0.0.0') {\n\t\t\t\t\t\t\t$this->db->query(\"INSERT INTO \" . DB_PREFIX . \"seo_url SET query = 'manufacturer_id=\" . (int)$data['manufacturer_id'] . \"', store_id='\" . (int)$store_id . \"', language_id='\" . (int)$language_id . \"', keyword = '\" . $this->db->escape($url_keyword) . \"'\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->db->query(\"INSERT INTO \" . DB_PREFIX . \"d_url_keyword SET route = 'manufacturer_id=\" . (int)$data['manufacturer_id'] . \"', store_id='\" . (int)$store_id . \"', language_id='\" . (int)$language_id . \"', keyword = '\" . $this->db->escape($url_keyword) . \"'\");\n\t\t\t\t\n\t\t\t\t\t\t\tif (($store_id == 0) && ($language_id == (int)$this->config->get('config_language_id'))) {\n\t\t\t\t\t\t\t\t$this->db->query(\"INSERT INTO \" . DB_PREFIX . \"url_alias SET query = 'manufacturer_id=\" . (int)$data['manufacturer_id'] . \"', keyword = '\" . $this->db->escape($url_keyword) . \"'\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$cache_data = array(\n\t\t\t'route' => 'manufacturer_id=' . $data['manufacturer_id']\n\t\t);\n\t\t\n\t\t$this->{'model_extension_module_' . $this->codename}->refreshURLCache($cache_data);\n\t}", "public function urlProvider()\n {\n return [\n ['https://localhost', 'https', 'localhost', 8332, '', ''],\n ['https://localhost:8000', 'https', 'localhost', 8000, '', ''],\n ['http://localhost', 'http', 'localhost', 8332, '', ''],\n ['http://localhost:8000', 'http', 'localhost', 8000, '', ''],\n ['http://testuser@127.0.0.1:8000/', 'http', '127.0.0.1', 8000, 'testuser', ''],\n ['http://testuser:testpass@localhost:8000', 'http', 'localhost', 8000, 'testuser', 'testpass'],\n ];\n }", "public function getProductUrl()\n {\n return Mage::registry('product')->getProductUrl();\n }", "function a_recipe_show_link() {\n\t\t$segments = array('admin','recipes','show');\n\t\t$url = generate_url($segments);\n\t\treturn $url;\n\t}", "public function index()\n {\n $manufacturers = $this->manufacturer->all();\n\n $trashes = $this->manufacturer->trashOnly();\n\n return view('admin.manufacturer.index', compact('manufacturers', 'trashes'));\n }", "public function index()\n {\n $manufacture = productmanufacturer::where('user_id',Auth::User()->id)->get();\n \n\n return view('vendors.manufacture.index',compact('manufacture'));\n }", "public function getUrlSatuanKecil(){\n\t\treturn $this->module->id.'/satuanKecilMGF/admin';\n\t}", "public function ShowSelectManufacturers($name,$firstItem = null,$selected = null,$attribsSelect = null)\r\n {\r\n\t\t$objManus = new Virtuemart_Models_Manufacturers();\r\n\t\t$rsManus = $objManus->fetchAll();\r\n\t\t\r\n \t$options = array();\r\n \tif(!is_null($firstItem))\r\n \t\t$options[0] = $firstItem; \r\n\r\n\t\tforeach ($rsManus as $rowManu)\r\n\t\t\t$options[$rowManu->manu_id] = $this->view->h($rowManu->name); \r\n\t\t\r\n\t\treturn $this->view->formSelect($name, $selected, $attribsSelect, $options); \t\t\r\n }", "private function getUrl(){\n $aliases = $this->getAliases();\n return $aliases[0]->getAlias();\n }", "public function Manufacturer()\n {\n return $this->core->Manufacturer();\n }", "public function actionIndex($url)\n\t{//DebugBreak();\n $this->model = StoreManufacturer::model()->findByAttributes(array('url'=>$url));\n if (!$this->model)\n throw new CHttpException(404, Yii::t('StoreModule.core', 'Производитель не найден.' . $url));\n \n $categories = $this->getManufacturerCategories($this->model->id, 12);\n $this->render('categories', array(\n 'popular' => $categories,\n ));\n\t}", "public function getShowAllUrl()\n {\n return $this->getUrl('elasticsuiteseller/result', ['q' => $this->getQueryText()]);\n }", "public function listing()\n\t{\n\t\treturn ADMIN_URL.'/list?item='.$this->get_table();\n\t}", "public function getManufacturer() {\n return $this->manufacturer;\n }", "public static function get_url() {\n return new \\moodle_url('/mod/dataform/admin/admintools.php', array('tool' => 'patternvalidator'));\n }", "public function getManufacturer()\n {\n if (array_key_exists(\"manufacturer\", $this->_propDict)) {\n return $this->_propDict[\"manufacturer\"];\n } else {\n return null;\n }\n }", "public function getManufacturer()\n {\n if (array_key_exists(\"manufacturer\", $this->_propDict)) {\n return $this->_propDict[\"manufacturer\"];\n } else {\n return null;\n }\n }", "public function getManufacturer()\n {\n if (array_key_exists(\"manufacturer\", $this->_propDict)) {\n return $this->_propDict[\"manufacturer\"];\n } else {\n return null;\n }\n }", "function acf_get_admin_tool_url($tool = '') {}", "public function index() {\n $add_manufacturer = view('admin.pages.add_manufacturer');\n return view('admin.admin_master')->with('main_content', $add_manufacturer);\n }", "function ceneo_prepare_url() {\n global $mdbd;\n global $config;\n\n $data=$mdbd->select(\"partner_id,name\",\"partners\",\"name=?\",array($this->partner_name=>\"string\"));\n $partner_id=$data['partner_id'];\n $code=md5(\"partner_id.$partner_id.$config->salt\"); // wygenerowanie kodu kontrolnego\n $link=\"&partner_id=\".$partner_id.\"&code=\".$code; // budowanie linku\n return $link;\n }", "public function url()\n {\n return route('products.index', ['category' => $this->slug]);\n }", "public function getUrlBatasKarakteristik(){\r\n\t\treturn $this->module->id.'/BatasKarakteristikAS/admin';\r\n\t}", "public function __construct( $manufacturers_id = null ) {\n\t\tif (!is_null($manufacturers_id)) {\n\t\t\t$sql = 'select * from cart_manufacturers where manufacturers_id=' . $manufacturers_id;\n\t\t\tif (!$result = Database::singleton()->query_fetch($sql)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$this->setId($result['manufacturers_id']);\n\t\t\t$this->setName($result['manufacturers_name']);\n\t\t\t$this->setImage($result['manufacturers_image']);\n\t\t\t$this->setDate_added($result['date_added']);\n\t\t\t$this->setLast_modified($result['last_modified']);\n\t\t\t@$this->setDescription($result['manufacturers_description']);\n\t\t} else {\n\t\t\t$this->setImage(null);\n\t\t}\n\t}", "function manage_library_url( $echo = true ) {\r\n global $mrl_url;\r\n if ( can_my_reading_library_admin() )\r\n echo apply_filters('book_manage_url', $mrl_url->urls['manage']);\r\n}", "public function getPaymentInfoUrl();", "public function url()\n {\n return '/vendors/'.$this->vendor->id;\n }", "function get_vendor_uri()\n{\n\treturn VENDOR_URI;\n}" ]
[ "0.66267705", "0.6359472", "0.61279225", "0.5955283", "0.58499396", "0.5822027", "0.5799836", "0.5799356", "0.5652617", "0.5644559", "0.5639781", "0.5619294", "0.5554454", "0.5543141", "0.54932475", "0.54864246", "0.5422441", "0.53989166", "0.53557235", "0.5345861", "0.5323859", "0.5285596", "0.5279225", "0.52718526", "0.52587074", "0.5218018", "0.5202734", "0.5169741", "0.5163458", "0.51611066", "0.51557875", "0.51431185", "0.5114977", "0.50882125", "0.50873727", "0.5081651", "0.50748783", "0.50743425", "0.50691366", "0.50504935", "0.5039623", "0.5038126", "0.5025892", "0.5023364", "0.5008353", "0.50049794", "0.50032693", "0.49941838", "0.49896133", "0.49878442", "0.4985138", "0.49811897", "0.498003", "0.49647757", "0.4964169", "0.4958755", "0.49580917", "0.4951972", "0.494946", "0.49478114", "0.49442205", "0.4939742", "0.49350944", "0.49172205", "0.49150383", "0.49134314", "0.49121755", "0.49033874", "0.49018288", "0.48966658", "0.48897547", "0.4880742", "0.48732755", "0.4873013", "0.4870441", "0.48689875", "0.48559287", "0.48518482", "0.4849351", "0.48459968", "0.48434526", "0.48429072", "0.48416913", "0.48233798", "0.48191687", "0.48124322", "0.4805915", "0.48004222", "0.48004222", "0.48004222", "0.479918", "0.4798771", "0.47945553", "0.47894982", "0.4783968", "0.47753957", "0.47750923", "0.47721443", "0.477145", "0.4769246" ]
0.73273027
0
// Get list of address_format_id's
// Получить список идентификаторов address_format_id
function twe_get_address_formats() { global $db; $address_format_values = $db->Execute("select address_format_id from " . TABLE_ADDRESS_FORMAT . " order by address_format_id"); $address_format_array = array(); while (!$address_format_values->EOF) { $address_format_array[] = array('id' => $address_format_values->fields['address_format_id'], 'text' => $address_format_values->fields['address_format_id']); $address_format_values->MoveNext(); } return $address_format_array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_address_formats()\n {\n }", "function &getFormatIds()\n\t{\n\t\tinclude_once 'Services/MetaData/classes/class.ilMDFormat.php';\n\n\t\treturn ilMDFormat::_getIds($this->getRBACId(),$this->getObjId());\n\t}", "protected static function libphonenumberFormats(): array\n {\n return with(new ReflectionClass(PhoneNumberFormat::class))\n ->getConstants();\n }", "public function getAddressOptions()\n {\n return Address::get()->pluck('name', 'id')->toArray();\n }", "public function getFormats()\n {\n $queryString = 'SELECT `id`, `name` FROM `format`';\n try {\n $stmt = $this->dbConnection->query($queryString);\n $formats = $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n\n } catch (\\PDOException $e) {\n $formats = ['error' => 'Error'];\n }\n\n return $formats;\n }", "function osc_get_address_format_id($country_id) {\n $address_format_query = osc_db_query(\"select address_format_id as format_id from \" . TABLE_COUNTRIES . \" where countries_id = '\" . (int)$country_id . \"'\");\n if (osc_db_num_rows($address_format_query)) {\n $address_format = osc_db_fetch_array($address_format_query);\n return $address_format['format_id'];\n } else {\n return '1';\n }\n }", "public static function getAllFormats()\n {\n return array(self::CCNN,\n self::IDDCCNN,\n self::NDDNN,\n self::NN,\n self::SN);\n }", "function listOfContactIDs(){\n\t\t$array = [];\n\t\tforeach ($this->userContactOptions as $option){\n\t\t\t$id = $option['ContactOptionID'];\n\t\t\tarray_push($array, $id);\n\t\t}\n\t\treturn $array;\n\t}", "function tep_get_address_format_id($country_id) {\n $address_format_query = tep_db_query(\"select address_format_id as format_id from \" . TABLE_COUNTRIES . \" where countries_id = '\" . (int)$country_id . \"'\");\n if (tep_db_num_rows($address_format_query)) {\n $address_format = tep_db_fetch_array($address_format_query);\n return $address_format['format_id'];\n } else {\n return '1';\n }\n }", "public function getAddressTypes()\n {\n return $this->_addressTypes;\n }", "public function getAddressFormatAttribute() {\n $addressFormatRepository = resolve(AddressFormatRepositoryInterface::class);\n return $addressFormatRepository->get($this->country_code);\n }", "public function getAddressFormatAttribute() {\n $addressFormatRepository = resolve(AddressFormatRepositoryInterface::class);\n return $addressFormatRepository->get($this->country_code);\n }", "public function getAddressOptions()\n {\n $options = $this->getData('address_options');\n if (is_null($options)) {\n $options = array();\n foreach ($this->getCustomer()->getAddresses() as $address) {\n $options[] = array(\n 'value'=>$address->getId(),\n 'label'=>$address->format('oneline')\n );\n }\n $this->setData('address_options', $options);\n }\n return $options;\n }", "protected function get_lists_address_book() {\n\n\t\t$books = array();\n\n\t\tif ( $this->api ) {\n\t\t\t$response = $this->api->listAddressBooks();\n\n\t\t\tif ( is_array( $response ) ) {\n\t\t\t\t$books = $response;\n\t\t\t} else {\n\t\t\t\t$this->error = __( 'Error API. Please try again later', 'sendbox-email-marketing-newsletter' );\n\t\t\t}\n\t\t}\n\n\t\treturn $books;\n\t}", "public function getAllAddressDataRegistered(){\n\t\t$sql = \"SELECT * FROM address_table\";\n\t\t/**\n\t\t * Faça essa query no banco de dados\n\t\t */\n\t\t$sql = $this->db->query($sql);\n\t\tif($sql->rowCount() > 0){\n\t\t\treturn $sql->fetchAll();\n\t\t} else {\n\t\t\treturn array();\n\t\t}\n\t}", "public function getIdList()\n {\n return $this->getModel()->lists('id');\n }", "public function getId_list()\n {\n return $this->_id_list;\n }", "public function getIdAddress()\n {\n return $this->idAddress;\n }", "public function getIds() {\n return [\n 'identifier' => [\n 'type' => 'string',\n 'alias' => 'i',\n ],\n ];\n }", "public static function get_list_ids()\n {\n }", "public function getFormats()\n {\n return Format::getList();\n }", "public function getIdAddress() \n\t{\n\t\treturn $this->idAddress;\n\t}", "public function getAddresses();", "public function getAddresses();", "public function hydrateAddressList()\n {\n $this->setEntity($this->entity);\n return $this->profileHydrator->hydrateAddressList();\n }", "protected function getAddresses() {\n\t\tif (!$this->_addresses) {\n\t\t\t$memberAddressesMapper = $this->getServiceLocator()->get('\\Account\\Mapper\\MemberAddressesMapper'); /* @var $memberAddressesMapper \\Account\\Mapper\\MemberAddressesMapper */\n\t\t\t$this->_addresses = $memberAddressesMapper->fetchManyForMemberId($this->id);\n\t\t}\n\t\treturn $this->_addresses;\n\t}", "function store_get_address_fields(){\n\n\t\t$fields = array();\n\t\t$fields[] = 'first_name';\n\t\t$fields[] = 'last_name';\n\t\t$fields[] = 'line_1';\n\t\t$fields[] = 'line_2';\n\t\t$fields[] = 'city';\n\t\t$fields[] = 'state';\n\t\t$fields[] = 'country';\n\t\t$fields[] = 'zip';\n\n\t\treturn $fields;\n\t}", "public function hydrateEmailAddressList()\n {\n $this->setEntity($this->entity);\n return $this->profileHydrator->hydratePhoneNumberList();\n }", "public function getSrcAddressGroups()\n {\n return $this->src_address_groups;\n }", "public function getAddresses()\n {\n $addresses = [];\n\n if (!$this->hasError()) {\n foreach ($this->addresses->all() as $address) {\n $addresses[] = $address->toArray();\n }\n }\n\n return $addresses;\n }", "public function getServiceIdList() {\n $list = array();\n \n $list[] = $this->getBaseServiceId();\n \n if(!empty($this->_serviceSection['additional'])) {\n foreach($this->_serviceSection['additional'] as $additionalService) {\n $list[] = $additionalService['service_id'];\n }\n }\n \n return $list;\n }", "public function getAddresses(): array;", "public function getIdFormat()\n {\n return $this->widgetSchema->getOption('id_format');\n }", "public function dataForAddress()\n {\n return [\n [\"1234 Test Rd.<br/>\\nSt. Peter, MN 56082\", null, '1234 Test Rd.', 'St. Peter', 'MN', '56082'],\n [\"Gustavus Adolphus College<br/>\\n1234 Test Rd.<br/>\\nSt. Peter, MN 56082\", 'Gustavus Adolphus College', '1234 Test Rd.', 'St. Peter', 'MN', '56082'],\n [\"Gustavus Adolphus College<br/>\\n1234 Test Rd.<br/>\\nSt. Peter, 56082\", 'Gustavus Adolphus College', '1234 Test Rd.', 'St. Peter', '', '56082'],\n [\"Gustavus Adolphus College<br/>\\n1234 Test Rd.<br/>\\nSt. Peter\", 'Gustavus Adolphus College', '1234 Test Rd.', 'St. Peter', '', ''],\n [\"Gustavus Adolphus College<br/>\\n1234 Test Rd.<br/>\\nSt. Peter, 56082<br/>\\nUnited States of America\", 'Gustavus Adolphus College', '1234 Test Rd.', 'St. Peter', '', '56082', 'United States of America'],\n ['', '', '', '', '', ''],\n ];\n }", "function qode_listing_get_address_params($id){\n\n\t\t$address_array = array();\n\t\t$address_string = get_post_meta( $id, 'geolocation_formatted_address', true );\n\t\t$address_lat = get_post_meta( $id, 'geolocation_lat', true );\n\t\t$address_long = get_post_meta( $id, 'geolocation_long', true );\n\n\t\t$address_array['address'] = $address_string !== '' ? $address_string : '';\n\t\t$address_array['address_lat'] = $address_lat !== '' ? $address_lat : '';\n\t\t$address_array['address_long'] = $address_long !== '' ? $address_long : '';\n\n\t\treturn $address_array;\n\n\t}", "public function getIds() {\n $ids = ['url' => ['type' => 'string']];\n return $ids;\n }", "public function get_user_address_list () {\n\t\t\n\t\t$addressList = M('user_address')\n\t\t\t->where(\"`user_id` = $this->userID \")\n\t\t\t->select();\n\t\t\n\t\t\n\t\t$this->return_data($addressList);\n\t}", "function getAddressList () {\n $query = \"SELECT * FROM vw_CustomerList\";\n $addressList = array();\n\n if($result = $this->connection->query($query)){\n foreach($result as $address){\n $addressList[] = $address;\n }\n }\n return $addressList;\n }", "function snax_get_active_formats_ids( $default = array(), $post = null ) {\n\t$post = get_post( $post );\n\n\t$formats_ids = (array) get_option( 'snax_active_formats', $default );\n\n\treturn apply_filters( 'snax_active_formats', $formats_ids, $post );\n}", "public function getAddresses() : array\n {\n return $this->addresses;\n }", "public function getAllAddresses()\n {\n $sql = \"SELECT * FROM {$this->_tableName}\";\n\n return $this->_adapter->fetchAll($sql);\n }", "function install_get_format_id($name) {\n static $formats = array();\n if (empty($formats[$name])) {\n $formats[$name] = db_result(db_query_range(\"SELECT format FROM {filter_formats} WHERE name ='%s'\", $name, 0, 1));\n }\n return $formats[$name];\n}", "private function getAttributesList()\n {\n if (!$this->attributesList) {\n $attributesList = $this->attributeMetadataDataProvider->loadAttributesCollection(\n 'customer_address',\n 'customer_register_address'\n );\n $attributesList->addFieldToFilter('is_user_defined', 1);\n $attributesList->addFieldToFilter('frontend_input', ['in' => ['file', 'multiselect']]);\n\n $this->attributesList = $attributesList;\n }\n return $this->attributesList;\n }", "public function getVerifacationAddressByIds()\n {\n $ajax_data = array();\n $user_id = $this->user_session->getUserId();\n $post = $this->request->request->all();\n $territory_id = (isset($post['territory_id']) AND ! empty($post['territory_id'])) ? $post['territory_id'] : '';\n\n $territory = $this->territory_logic->getTerritoryByIds($territory_id);\n\n if ($territory !== false) {\n $ajax_data['code'] = 0;\n\n if (count($territory) == 1) {\n $territory = array_pop($territory);\n }\n\n $ajax_data['data'] = $territory;\n $ajax_data['message'] = 'Success';\n } else {\n $ajax_data['code'] = 1;\n $ajax_data['message'] = 'Error';\n }\n\n $this->ajax_respond($ajax_data);\n }", "public function getListOfIdps() {\n\t\t$result = [];\n\n\t\t$providerIds = explode(',', $this->config->getAppValue('user_saml', 'providerIds', '1'));\n\t\tnatsort($providerIds);\n\n\t\tforeach ($providerIds as $id) {\n\t\t\t$prefix = $id === '1' ? '' : $id .'-';\n\t\t\t$result[$id] = $this->config->getAppValue('user_saml', $prefix . 'general-idp0_display_name', '');\n\t\t}\n\n\t\tasort($result);\n\n\t\treturn $result;\n\t}", "public function postalCodes()\n\t{\n\t\treturn array_spin($this->entity->postal_codes);\n\t}", "public function getIDs();", "public static function availableFormats() {\n return [\n PhoneNumberFormat::INTERNATIONAL => t('International'),\n PhoneNumberFormat::E164 => t('E164'),\n PhoneNumberFormat::NATIONAL => t('National'),\n PhoneNumberFormat::RFC3966 => t('RFC3966'),\n ];\n }", "public function getAddresses()\n {\n return $this->getResponse()['data']['addresses'];\n }", "function getGemzAddressType(){\n \t$categories = array();\n\t\t$results = ClassRegistry::init('ApiTools')->getGemzAddressType();\n\t\tforeach (array_values($results) as $arr){\n\t\t\t$prop = @array_pop($arr);\n\t\t\t$at = new AddressType($prop['at_address_type_id'], $prop['at_address_type']);\n\t\t\t$atypes[] = $at; \n\t\t}\n\t\treturn $atypes;\n }", "function getAddressBookOrder()\n {\n $i = 0;\n $lines = explode(\"\\n\", $GLOBALS['prefs']->getValue('addressbooks'));\n $temp = $lines;\n $addressbooks = array();\n foreach ($lines as $line) {\n $line = trim($line);\n if ($line && isset($GLOBALS['cfgSources'][$line])) {\n $addressbooks[$line] = $i++;\n }\n }\n return $addressbooks;\n }", "function getAddressBookProperties($store = null)\n\t\t{\n\t\t\t$this->Init();\n\t\t\t\n\t\t\t$properties = array();\n\t\t\t$properties[\"entryid\"] = PR_ENTRYID;\n\t\t\t$properties[\"smtp_address\"] = PR_SMTP_ADDRESS;\n\t\t\t$properties[\"email_address\"] = PR_EMAIL_ADDRESS;\n\t\t\t$properties[\"display_name\"] = PR_DISPLAY_NAME;\n\t\t\t$properties[\"display_type\"] = PR_DISPLAY_TYPE;\n\t\t\t$properties[\"display_type_ex\"] = PR_DISPLAY_TYPE_EX;\n\t\t\t$properties[\"account\"] = PR_ACCOUNT;\n\t\t\t$properties[\"addrtype\"] = PR_ADDRTYPE;\n\t\t\t$properties[\"objecttype\"] = PR_OBJECT_TYPE;\n\t\t\t$properties[\"search_key\"] = PR_SEARCH_KEY;\n\t\t\t$properties[\"office_phone\"] = PR_OFFICE_TELEPHONE_NUMBER;\n\t\t\t$properties[\"location\"] = PR_OFFICE_LOCATION;\n\t\t\t$properties[\"fax\"] = PR_PRIMARY_FAX_NUMBER;\n\t\t\t$properties[\"department\"] = PR_DEPARTMENT_NAME;\n\n\t\t\treturn getPropIdsFromStrings($store !== null ? $store : $this->store, $properties);\n\t\t}", "public function listId() {\n\t\treturn $this->branch->all()->pluck('id')->all();\n\t}", "function getAllAddress($upload_id){\n \n $this->db->select('*');\n $this->db->from('droppy_address_emails');\n $this->db->order_by('id','DESC');\n $query = $this->db->get()->result();\n\t\n return $query;\n }", "public function getAddresses()\r\n {\r\n return $this->addresses;\r\n }", "public function listAddressGroupings(): array\n {\n return $this->request('listAddressGroupings');\n }", "public function listIdentifiers()\n {\n return $this->time_zone->listIdentifiers();\n }", "public function getSuggesterIds();", "public function getValidIdAttributes(): array\n {\n return [\n 'Starts with _' => [\n 'sequence_id_0001.xsd', '_foo', \n ], \n 'Starts with letter' => [\n 'sequence_id_0002.xsd', 'f', \n ], \n 'Contains letter' => [\n 'sequence_id_0003.xsd', 'foo', \n ], \n 'Contains digit' => [\n 'sequence_id_0004.xsd', 'f00', \n ], \n 'Contains .' => [\n 'sequence_id_0005.xsd', 'f.bar', \n ], \n 'Contains -' => [\n 'sequence_id_0006.xsd', 'f-bar', \n ], \n 'Contains _' => [\n 'sequence_id_0007.xsd', 'f_bar', \n ], \n 'Surrounded by whitespaces' => [\n 'sequence_id_0008.xsd', 'foo_bar', \n ], \n ];\n }", "function getIDPList()\n\t{\n\t\tglobal $ilSetting;\n\t\t\n\t\t$idp_list = array();\n\t\t\n\t\t$idp_raw_list = split(\"\\n\", $ilSetting->get(\"shib_idp_list\"));\n\t\t\n\t\tforeach ($idp_raw_list as $idp_line){\n\t\t\t$idp_data = split(',', $idp_line);\n\t\t\tif (isset($idp_data[2]))\n\t\t\t{\n\t\t\t\t$idp_list[trim($idp_data[0])] = array(trim($idp_data[1]),trim($idp_data[2])); \n\t\t\t}\n\t\t\telseif(isset($idp_data[1]))\n\t\t\t{\n\t\t\t\t$idp_list[trim($idp_data[0])] = array(trim($idp_data[1]));\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $idp_list;\n\t\tprint_r($idp_list);exit;\n\t}", "public function getAddresses()\n {\n return $this->addresses;\n }", "public function getAddresses()\n {\n return $this->addresses;\n }", "public function getGatewayIDs() {\n $gatewayIDs = array();\n $data = $this->getParsedData();\n foreach ($data as $record) {\n $gatewayIDs[] = $record['gateway_txn_id'];\n }\n return $gatewayIDs;\n }", "public function getAddresses()\n {\n return $this->callApi('/api/addresses');\n }", "public function getIds();", "protected function get_format_array( $form_data ) {\r\n\t\t$formats = array();\r\n\t\tforeach ( $form_data as $key => $value ) {\r\n\t\t\tswitch ( $key ) {\r\n\t\t\t\tcase 'impressions':\r\n\t\t\t\tcase 'submissions':\r\n\t\t\t\tcase 'redirect_user_on_submit':\r\n\t\t\t\tcase 'redirect_page':\r\n\t\t\t\tcase 'id':\r\n\t\t\t\t\t$formats[] = '%d';\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\t$formats[] = '%s';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $formats;\r\n\t}", "public static function GetUserAddressList($userID)\n {\n return UserAddress::all()->where('user_id', $userID);\n }", "public function getAllIds(): array;", "function pconfig_to_idinfo($prefix, $pconfig)\n{\n $type = isset($pconfig[$prefix.\"id_type\"]) ? $pconfig[$prefix.\"id_type\"] : null;\n $address = isset($pconfig[$prefix.\"id_address\"]) ? $pconfig[$prefix.\"id_address\"] : null;\n $netbits = isset($pconfig[$prefix.\"id_netbits\"]) ? $pconfig[$prefix.\"id_netbits\"] : null;\n\n switch ($type) {\n case \"address\":\n return array('type' => $type, 'address' => $address);\n case \"network\":\n return array('type' => $type, 'address' => $address, 'netbits' => $netbits);\n default:\n return array('type' => $type );\n }\n}", "protected function getTypeAndId(): array\n {\n /** @var Uri $oUri */\n $oUri = Factory::service('Uri');\n /** @var Input $oInput */\n $oInput = Factory::service('Input');\n\n $sType = $oUri->segment(4);\n $iId = (int) $oUri->segment(5) ?: null;\n\n $this->validateType($sType);\n\n return [$sType, $iId];\n }", "public function getPostalCodes()\n {\n return $this->postal_codes;\n }", "public function getBillingAddressId();", "public function getAddresses()\n {\n if (is_null($this->addresses)) {\n /** @psalm-var ?list<stdClass> $data */\n $data = $this->raw(self::FIELD_ADDRESSES);\n if (is_null($data)) {\n return null;\n }\n $this->addresses = BaseAddressCollection::fromArray($data);\n }\n\n return $this->addresses;\n }", "private function getPacklinkCarrierIds()\n {\n $query = new \\DbQuery();\n $query->select('id_carrier')\n ->from('carrier')\n ->where('external_module_name = \\'packlink\\'')\n ->where('deleted = 0');\n\n $result = \\Db::getInstance()->executeS($query);\n\n return Php55::arrayColumn($result, 'id_carrier');\n }", "public function toArray()\n {\n $address = [\n self::ID_FIELD => $this->getId(),\n self::LINE_1_FIELD => $this->getLine1(),\n self::LINE_2_FIELD => $this->getLine2(),\n self::LINE_3_FIELD => $this->getLine3(),\n self::CITY_FIELD => $this->getCity(),\n self::STATE_FIELD => $this->getState(),\n self::POSTAL_CODE_FIELD => $this->getPostalCode(),\n self::COUNTRY_REGION_FIELD => $this->getCountryRegion(),\n self::CONTACT_PERSON_FIELD => $this->getContactPerson()\n ];\n\n $address[self::INTERNET_ADDRESSES_FIELD] = (!empty($this->getInternetAddressCollection())) ? $this->getInternetAddressCollection()->toArray() : null;\n $address[self::PHONE_1_FIELD] = ($this->getPhone1()) ? $this->getPhone1()->toArray() : null;\n $address[self::PHONE_2_FIELD] = ($this->getPhone2()) ? $this->getPhone2()->toArray() : null;\n $address[self::PHONE_3_FIELD] = ($this->getPhone3()) ? $this->getPhone3()->toArray() : null;\n $address[self::FAX_FIELD] = ($this->getFax()) ? $this->getFax()->toArray() : null;\n\n return $address;\n }", "public function get_invalid_addresses()\n {\n return $this->invalid_addresses;\n }", "public function getAddresses() {\n\t\treturn $this->addresses;\n\t}", "public function getAddresses()\n {\n return $this->_addresses;\n }", "public function getAddressFormatter(): AddressFormatter;", "function getIds() {\n return array();\n}", "function osc_address_format($address_format_id, $address, $html, $boln, $eoln) {\n $address_format_query = osc_db_query(\"select address_format as format from \" . TABLE_ADDRESS_FORMAT . \" where address_format_id = '\" . (int)$address_format_id . \"'\");\n $address_format = osc_db_fetch_array($address_format_query);\n\n $company = osc_output_string_protected($address['company']);\n if (isset($address['firstname']) && osc_not_null($address['firstname'])) {\n $firstname = osc_output_string_protected($address['firstname']);\n $lastname = osc_output_string_protected($address['lastname']);\n } elseif (isset($address['name']) && osc_not_null($address['name'])) {\n $firstname = osc_output_string_protected($address['name']);\n $lastname = '';\n } else {\n $firstname = '';\n $lastname = '';\n }\n $street = osc_output_string_protected($address['street_address']);\n $suburb = osc_output_string_protected($address['suburb']);\n $city = osc_output_string_protected($address['city']);\n $state = osc_output_string_protected($address['state']);\n if (isset($address['country_id']) && osc_not_null($address['country_id'])) {\n $country = osc_get_country_name($address['country_id']);\n\n if (isset($address['zone_id']) && osc_not_null($address['zone_id'])) {\n $state = osc_get_zone_code($address['country_id'], $address['zone_id'], $state);\n }\n } elseif (isset($address['country']) && osc_not_null($address['country'])) {\n $country = osc_output_string_protected($address['country']['title']);\n } else {\n $country = '';\n }\n $postcode = osc_output_string_protected($address['postcode']);\n $zip = $postcode;\n\n if ($html) {\n// HTML Mode\n $HR = '<hr />';\n $hr = '<hr />';\n if ( ($boln == '') && ($eoln == \"\\n\") ) { // Values not specified, use rational defaults\n $CR = '<br />';\n $cr = '<br />';\n $eoln = $cr;\n } else { // Use values supplied\n $CR = $eoln . $boln;\n $cr = $CR;\n }\n } else {\n// Text Mode\n $CR = $eoln;\n $cr = $CR;\n $HR = '----------------------------------------';\n $hr = '----------------------------------------';\n }\n\n $statecomma = '';\n $streets = $street;\n if ($suburb != '') $streets = $street . $cr . $suburb;\n if ($state != '') $statecomma = $state . ', ';\n\n $fmt = $address_format['format'];\n eval(\"\\$address = \\\"$fmt\\\";\");\n\n if ( (ACCOUNT_COMPANY == 'true') && (osc_not_null($company)) ) {\n $address = $company . $cr . $address;\n }\n\n return $address;\n }", "public function getBccAddresses()\n {\n }", "public function getShippingAddressId();", "public function getAddresses()\n {\n return $this->get(\"account/addresses\", array());\n }", "public function fields_Ids(){\n\t\treturn $this->fields('ids');\n\t}", "protected function getAddress($prefix) {\n $fields = array();\n\n foreach ($this->fields as $field => $value) {\n if (strpos($field, $prefix) === 0) // Strip off address prefix, store.\n $fields[substr($field, strlen($prefix))] = $value;\n }\n\n return $fields;\n }", "function GetTemplateIDS() {\n $t = array();\n $matches = array();\n preg_match_all('/(?<={{)(.*?)(?=}})/', $this->template, $matches);\n foreach ($matches[0] as $match) {\n $is_id = substr($match, 0, 3);\n if (strcmp($is_id, \"id_\") === 0) {\n array_push($t, $match);\n }\n }\n return $t;\n }", "public function _GetAll(): array\n {\n return $this->client->request('Addresses_GetAll', 'GET', 'shipping/v3/addresses',\n [\n ]\n );\n }", "public function getAddressId()\n {\n return $this->address_id;\n }", "public function ids() {\n\t\t$q = $this->query();\n\t\t$q->select(ArRouteCode::aliasproperty('id'));\n\t\treturn $q->find()->toArray();\n\t}", "public function getAllBookingIdsForSequence($a_seq_id) {\r\n\t\t$set = $this->ilDB->query('SELECT id FROM ' . dbc::BOOKINGS_TABLE . ' WHERE seq = ' . $this->ilDB->quote($a_seq_id, 'integer')\r\n\t\t\t. ' AND pool_id = ' . $this->ilDB->quote($this->pool_id, 'integer'));\r\n\r\n\t\t$booking_ids = array();\r\n\t\twhile ($row = $this->ilDB->fetchAssoc($set)) {\r\n\t\t\t$booking_ids[] = $row;\r\n\t\t}\r\n\r\n\t\treturn $booking_ids;\r\n\t}", "protected function getValues(AddressInterface $address, AddressFormat $address_format) {\n $values = [];\n foreach (AddressField::getAll() as $field) {\n $getter = 'get' . ucfirst($field);\n $values[$field] = $address->$getter();\n }\n\n $original_values = [];\n $subdivision_fields = $address_format->getUsedSubdivisionFields();\n $parents = [];\n foreach ($subdivision_fields as $index => $field) {\n $value = $values[$field];\n // The template needs access to both the subdivision code and name.\n $values[$field] = [\n 'code' => $value,\n 'name' => '',\n ];\n\n if (empty($value)) {\n // This level is empty, so there can be no sublevels.\n break;\n }\n $parents[] = $index ? $original_values[$subdivision_fields[$index - 1]] : $address->getCountryCode();\n $subdivision = $this->subdivisionRepository->get($value, $parents);\n if (!$subdivision) {\n break;\n }\n\n // Remember the original value so that it can be used for $parents.\n $original_values[$field] = $value;\n // Replace the value with the expected code.\n if (Locale::matchCandidates($address->getLocale(), $subdivision->getLocale())) {\n $values[$field] = [\n 'code' => $subdivision->getLocalCode(),\n 'name' => $subdivision->getLocalName(),\n ];\n }\n else {\n $values[$field] = [\n 'code' => $subdivision->getCode(),\n 'name' => $subdivision->getName(),\n ];\n }\n\n if (!$subdivision->hasChildren()) {\n // The current subdivision has no children, stop.\n break;\n }\n }\n\n return $values;\n }", "public function allAddresses()\n {\n return $this->addresses;\n }", "public function ids()\n {\n return $this->extract('id');\n }", "public function getAllRecipientAddresses()\n {\n }", "public function getAllFormats() {\n\t}", "public function addressDataProvider()\n {\n return [\n [\n [\n 'country_id' => 'US',\n 'street' => ['Green str, 67'],\n 'company' => 'CompanyName',\n 'telephone' => '5127779999',\n 'postcode' => '77777',\n 'city' => 'CityM',\n 'firstname' => 'Johny',\n 'lastname' => 'Smith',\n 'middlename' => 'A',\n 'prefix' => 'Mr.',\n 'suffix' => 'Esq',\n 'default_shipping' => true,\n 'default_billing' => true,\n 'region' => [\n 'region_code' => 'AL',\n 'region' => 'Alabama',\n 'region_id' => 1\n ],\n 'extension_attributes' => []\n ]\n ]\n ];\n }", "abstract public function getIds();", "public static function formats()\n {\n return self::$formats;\n }", "private function get_address_pieces() {\n\t\treturn array(\n\t\t\t'country' => __( 'Country', 'woocommerce-shipping-local-pickup-plus' ),\n\t\t\t'state' => __( 'State', 'woocommerce-shipping-local-pickup-plus' ),\n\t\t\t'address_1' => __( 'Address Line 1', 'woocommerce-shipping-local-pickup-plus' ),\n\t\t\t'address_2' => __( 'Address Line 2', 'woocommerce-shipping-local-pickup-plus' ),\n\t\t\t'city' => __( 'City', 'woocommerce-shipping-local-pickup-plus' ),\n\t\t\t'postcode' => __( 'Postcode', 'woocommerce-shipping-local-pickup-plus'),\n\t\t);\n\t}" ]
[ "0.67114466", "0.6201433", "0.5951543", "0.58282137", "0.5717334", "0.5589226", "0.55653423", "0.5552003", "0.55445904", "0.55338216", "0.54289323", "0.54289323", "0.541282", "0.53780484", "0.5241833", "0.52317554", "0.5228323", "0.52274346", "0.5182968", "0.5179275", "0.51754946", "0.516979", "0.5168449", "0.5168449", "0.51664525", "0.5143852", "0.5135556", "0.5134101", "0.5130102", "0.5128551", "0.5124803", "0.51204073", "0.5099866", "0.5085159", "0.5079913", "0.50793487", "0.5077993", "0.507531", "0.5063842", "0.50585717", "0.5047375", "0.50402415", "0.5039736", "0.5035942", "0.50342745", "0.5027887", "0.5017638", "0.50172573", "0.5016142", "0.49947178", "0.49863786", "0.4985787", "0.4983393", "0.49811277", "0.4978065", "0.4977305", "0.497405", "0.49501133", "0.49427962", "0.49282196", "0.4927767", "0.4927767", "0.49224928", "0.49186558", "0.49180874", "0.49173838", "0.49106705", "0.49081463", "0.49075046", "0.49068767", "0.49033555", "0.48989326", "0.48966953", "0.48930886", "0.48865205", "0.4885091", "0.48823723", "0.48811013", "0.487841", "0.48724198", "0.48604602", "0.4857105", "0.4856038", "0.48523477", "0.48500952", "0.48496547", "0.48406515", "0.4826879", "0.48260143", "0.48229724", "0.48153007", "0.4811989", "0.48115978", "0.48064935", "0.48051038", "0.48039427", "0.4801886", "0.4800368", "0.47975355", "0.4791823" ]
0.76715416
0
// Sets the status of a banner
// Устанавливает статус баннера
function twe_set_banner_status($banners_id, $status) { global $db; if ($status == '1') { return $db->Execute("update " . TABLE_BANNERS . " set status = '1', expires_impressions = NULL, expires_date = NULL, date_status_change = NULL where banners_id = '" . $banners_id . "'"); } elseif ($status == '0') { return $db->Execute("update " . TABLE_BANNERS . " set status = '0', date_status_change = now() where banners_id = '" . $banners_id . "'"); } else { return -1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setInBanner(): void\n {\n $this->banner = true;\n }", "public function changeStatusActive()\n\t{\n\t\t$id = $this->input->_request('id');\n\t\t$sql = \"update banners set status=1 where id={$id}\";\n\t\t$query = $this->db->query($sql);\n\t\t$this->banner_list();\n\t}", "public function updateStatus($id,$status){ \n $banner=Banner::find($id);\n $banner->status = $status;\n $banner->save();\n \n \n \n }", "public function actionUpdatestatus($id) {\n\t\t$newStatus = ($_REQUEST['status'] == 1)?0:1;\n\t \t$model = $this->loadModel($id);\n\t\t$model->updateByPk($id, array('showBanner' => $newStatus));\n\t\t$this->redirect(array('/banners'));\n }", "public function testSetBanner()\n {\n $this->assertSame(\n $this->stub,\n $this->stub->setBanner('test'),\n 'The method should return its object.'\n );\n\n $this->assertEquals(\n 'test',\n Property::get($this->stub, 'banner'),\n 'The banner comment should be set.'\n );\n }", "public function changeBannerStatus()\n {\n $this->session->set_flashdata(\"flash_msg\", \"<div id='flash_msg' class='alert alert-success background-success'>Banner Status Changed Successfully..!(Insert/Update/Delete not allowed in Demo)</div>\");\n }", "public function setNotInBanner(): void\n {\n $this->banner = false;\n }", "public function setStatus(int $status) {}", "public function setbanner($id = null) {\n\t\treturn $this->upload($id, 'banner');\n\t}", "public function setStatus($status);", "public function setStatus($status);", "public function setStatus($status);", "public function setStatus($status);", "public function setStatus($status);", "public function setStatus($status) {\n $this->status = $status;\n }", "public function setStatus($status) {\n $this->status = $status;\n }", "public function updated(Banner $banner)\n {\n //\n }", "function setStatus($status);", "public function setStatus($status) \n {\n $this->status = $status;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n }", "public function setStatus($status): void\n {\n $this->status = $status;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n }", "public function setStatus($status)\n {\n $this->status = $status;\n }", "function setStatus($status){\t\t$this->status = $status;\t\n\t}", "public function setStatus($status) {\n $this->status = $status;\n }", "public function setStatus($status) {\n $this->status = $status;\n }", "public function setStatus($status) {\n $this->status = $status;\n }", "public function setStatus($status) {\n $this->status = $status;\n }", "public function setStatus($status) {\n $this->status = $status;\n }", "public function setStatus($status) {\n $this->status = $status;\n }", "public function banner($banner) {\n $this->banner = $banner;\n\n return $this;\n }", "public function setActiveBanner(Banner $banner = null)\n {\n if ($banner === null) {\n $this->activeBanner = null;\n } else {\n $this->activeBanner = $banner;\n $this->banners->contains($banner) ?: $banner->setDomain($this);\n }\n }", "public function actionChangeStatus(){\n\n\t\t$newStatus = ($_GET['status'] == 1)?0:1;\n $model = Locations::model()->findByPk($_GET['id']);\n $model->showBanner = $newStatus;\n\t\tif($model->save())\n\t\t\techo 'ok';\n\t\telse\n\t\t\tthrow new Exception(\"Sorry\",500);\n\t}", "public function setStatus(int $status)\n {\n $this->status = $status;\n }", "public function setStatus($status)\n {\n $this->_status = $status;\n }", "public function setStatus($status)\n {\n $this->_status = $status;\n }", "public function setStatus($status){\n\t\t$this->status = $status;\n\t}", "public function setStatus($status) {\n $this->_status = $status;\n }", "public function setStatus($status)\r\n\t{\r\n\t\t$this->status = $status;\r\n\t}", "public function setStatus(string $status): void\n {\n $this->status = $status;\n }", "public function setStatus($status) {\n\t\t$this->status = $status;\n\t}", "public function setStatus($status) {\n\t\t$this->status = $status;\n\t}", "public function setStatus($status)\r\n\t\t{\r\n\t\t\t$this->status = $status;\r\n\t\t}", "public function set_status($status)\n {\n $this->status = $status;\n }", "public function setStatus ($status) {\n\t\t$this->status = $status;\n\t}", "public function setStatus($status)\n\t{\n\t\t$this->status = $status;\n\t}", "public function updateBanner($image)\n {\n $this->image = $image;\n }", "public function setStatus(?string $status): void\n {\n $this->status = $status;\n }", "public function setStatus(?string $status): void\n {\n $this->status = $status;\n }", "public function setStatus($status) \n\t{\n\t\t$this->_status = $status;\n\t}", "public function update(Banner $banner){\n\n if($banner->getImagem()){\n $sql = UPDATE . \" Banner\" . \" \n SET titulo = '\".$banner->getTitulo().\"',\n texto = '\".$banner->getTexto().\"',\n href = '\".$banner->getHref().\"',\n nomeBotao = '\".$banner->getNomeBotao().\"',\n href = '\".$banner->getHref().\"',\n imagem = '\".$banner->getImagem().\"'\n WHERE idBanner = '\".$banner->getIdBanner().\"';\";\n }else{\n $sql = UPDATE . \" Banner\" . \" \n SET titulo = '\".$banner->getTitulo().\"',\n texto = '\".$banner->getTexto().\"',\n href = '\".$banner->getHref().\"',\n nomeBotao = '\".$banner->getNomeBotao().\"',\n href = '\".$banner->getHref().\"'\n WHERE idBanner = '\".$banner->getIdBanner().\"';\";\n }\n\n\n //Abrindo conexão com o BD\n $PDO_conex = $this->conex->connectDataBase();\n\n //Executa no BD o script Insert e retorna verdadeiro/falso\n if($PDO_conex->query($sql)){\n $erro = false;\n }else{\n $erro = true;\n }\n //Fecha a conexão com o BD\n $this->conex->closeDataBase();\n return $erro;\n }", "public function setStatus($status)\n {\n $this->status = (string)$status;\n }", "public function set_status($status) {\n $this->status = $status;\n }", "public function setStatus($Status){\n $this->Status = $Status;\n }", "public function setStatus($Status){\n $this->Status = $Status;\n }", "function set_status($status)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n Validation_Exception::is_valid($this->validate_status($status));\n\n $this->_set_parameter('status', $status);\n }", "protected function setStatusDescription($statusDescription)\n {\n $this->_statusDescription = $statusDescription;\n }", "public function setStatus(?AlertStatus $value): void {\n $this->getBackingStore()->set('status', $value);\n }", "public function banner_toggle($bannerid){\n\t\t\n\t\t//Check for AJAX request - kill if false\n\t\tif($this->validation->is_ajax_request() == FALSE){\n\t\t\techo \"Error: access forbidden\";\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t//Load model\n\t\t$this->load->model('Banners_model','Banners');\n\t\t\n\t\t//Validation - attempt to fetch the banner\n\t\t$banner = $this->Banners->fetch_banners($bannerid);\n\t\tif(!$banner){\n\t\t\t$this->data['errors'] = array(\"Banner could not be found!\");\n\t\t\t$this->load->view('admin/shared/admin_form_errors',$this->data);\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t//Determine the opposite of what the banner is currently set to\n\t\t$active \t= \"Y\";\n\t\t$active_msg = \"\";\n\t\tif($banner->banner_active == 'Y'){\n\t\t\t$active \t= \"N\";\n\t\t\t$active_msg = \"not\";\n\t\t}\n\t\t\n\t\t//Attempt to update the banner's status\n\t\tif(!$this->Banners->update_banner_visibility($bannerid,$active)){\n\t\t\t\n\t\t\t//Feedback\n\t\t\t$this->data['errors'] = array(\"Banner status could not be saved.\");\n\t\t\t$this->load->view('admin/shared/admin_form_errors',$this->data);\n\t\t\treturn FALSE;\n\t\t\t\n\t\t}\n\n\t\t//Success!\n\t\techo $this->set_alert(\"Banner '\" . $banner->filename . \"' will \" . $active_msg . \" display on website.\",\"success\");\n\t\treturn TRUE;\n\t\t\n\t}", "public function setStatus(string $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 }", "function set_status($status)\r\n {\r\n $this->set_default_property(self :: PROPERTY_STATUS, $status);\r\n }", "public function update(BannerResquest $request, $banner)\n {\n $data = $request->all();\n \n $banner = $this->banner->find($banner);\n\n if ($request->status == 1) {\n $data['status'] = 1;\n } else {\n $data['status'] = 0;\n }\n\n if ($request->title_active == 1) {\n $data['title_active'] = 1;\n } else {\n $data['title_active'] = 0;\n }\n\n if ($request->hasFile('image')) {\n\n if (Storage::exists($banner->image)) {\n Storage::delete($banner->image);\n }\n\n $image = $request->file('image')->store('banners', 'public');\n $data['image'] = $image;\n\n // Redimensionando a imagem\n $image = Image::make(public_path(\"storage/{$image}\"))->fit(1800, 870);\n $image->save();\n }\n\n $banner->update($data);\n\n flash('Banner Atualizado com Sucesso!')->success();\n return redirect()->route('admin.banners.index');\n }", "function setStatus($status) {\n $this->status = $status; \n // and update the database\n $query = \"update `\".GALAXIA_TABLE_PREFIX.\"instances` set `status`=? where `instance_id`=?\";\n $this->mDb->query($query,array($status,(int)$this->instance_id)); \n }", "public function update(User $user, Banner $banner)\n {\n //\n }", "public function setStatus(?Status $value): void {\n $this->getBackingStore()->set('status', $value);\n }", "public function setStatus($status)\n {\n // check if correct status line format is given\n if (preg_match('/(\\d+)\\s+(.*)/', $status, $matches) > 0) {\n $this->setStatusCode(trim($matches[1]));\n $this->setStatusReasonPhrase($matches[2]);\n }\n }", "public function setStatus(string $status): self;", "public function testGetSetBanner()\n {\n $blackBerry = new BlackBerry();\n $this->assertSame($blackBerry, $blackBerry->setHeader('header'));\n $this->assertSame('header', $blackBerry->getHeader());\n }", "function set_status()\n\t{\n\t}", "public function setStatus($Status) {\n $this->Status = $Status;\n }", "public function setStatus($status)\n {\n // check if correct status line format is given\n $matches = array();\n if (preg_match('/(\\d+)\\s+(.*)/', $status, $matches) > 0) {\n $this->setStatusCode(trim($matches[1]));\n $this->setStatusReasonPhrase($matches[2]);\n }\n }", "public function setStatus( $pValue )\n {\n $this->intStatus = $pValue;\n }", "public function setStatus(int $status)\n\t{\n\t\t$this->status=$status; \n\t\t$this->keyModified['status'] = 1; \n\n\t}", "public function setStatus($value)\n {\n $this->setProperty(\"Status\", $value, true);\n }", "public function setHttpStatus($status = 200)\n\t{\n\t\t$this->_httpStatus = $status;\n\t}", "public function banner($id , ChangeVirtualServerBannerRequest $request)\n {\n $this->serverManager($id)\n ->modify(\n $request->only([\n \"virtualserver_hostbanner_url\",\n \"virtualserver_hostbanner_gfx_url\",\n \"virtualserver_hostbanner_gfx_interval\",\n \"virtualserver_hostbanner_mode\",\n ])\n );\n return redirect()->route('account.virtual.settings',['id'=> $id]);\n }", "public function markAs(string $status): void\n {\n if ($this->status !== $status) {\n $this->setAttribute('status', $status)->save();\n }\n }", "public function __construct(Banner $banner) {\n $this->banner = $banner;\n $this->defaultimage = \"defaultimage.jpg\";\n }", "public function __construct(Banner $banner)\n {\n $this->banner = $banner;\n }", "public function update(Request $request, Banner $banner)\n {\n //\n }", "public function update(Request $request, Banner $banner)\n {\n //\n }", "public function update(Request $request, Banner $banner)\n {\n //\n }", "public function _set_obj_banner_size()\n {\n $banner = $this->get('banner');\n\n // return size zero, if not banner\n $size = &$this->_banner_handler->get_remote_banner_size($banner);\n\n if (is_array($size) && isset($size[0]) && isset($size[1])) {\n $this->setVar('width', $size[0]);\n $this->setVar('height', $size[1]);\n } elseif (!$size) {\n $this->_banner_error_code = $this->_banner_handler->getErrorCode();\n $this->_banner_errors = $this->_banner_handler->getErrors();\n }\n }", "public function update(Request $request, Banner $banner)\n {\n $this->validate($request, [\n 'title' => 'string|required',\n 'description' => 'string|required',\n 'photo' => 'nullable|image',\n 'status' => 'required|in:active,inactive',\n ]);\n \n $slug = Str::slug($request->title);\n $count = Banner::where('slug', $slug)->count();\n \n $public_path = public_path('images');\n $image = $request->file('photo');\n if ( $request->hasfile('photo') && isset($image)) { \n $imageName = $slug . '-' . date('ymdis') . '-' . time() . '-'. rand(0, 999). '.' . $image->extension();\n $imageSize = Image::make($image->path());\n $imageSize->resize(1600, 600, function ($constraint) {\n $constraint->aspectRatio();\n })->save($public_path.'/sliders/'. $imageName);\n \n if(file_exists( $public_path . '/sliders/'. $banner->photo)){\n unlink( $public_path . '/sliders/' . $banner->photo );\n }\n\n } else {\n $imageName = $banner->photo;\n }\n if($count>1){\n $slug = $slug . '-' . date('ymdis') . '-' . time() . '-'. rand(0, 999);\n }\n $status = $banner->update([\n 'title' => $request->title,\n 'photo' => $imageName,\n 'slug' => $slug,\n 'description'=> $request->description,\n 'status' => $request->status,\n ]);\n if($status) {\n request()->session()->flash('success', 'Banner has been updated successfully......');\n }\n else {\n request()->session()->flash('error', 'Error! Please try again......');\n }\n return redirect()->route('admin.banners.index');\n }", "public function update(Request $request, Banner $banner)\n {\n if ($banner->fill($request->all())->save()) {\n return $this->response(['message' => trans('message.edit_success')]);\n }\n\n return $this->response(['message' => trans('message.edit_success')], 401);\n }", "public function update_status($status)\n {\n }", "function updateStatus($assetID, $status) {\n $statusconArray = array (\n STATUS_RUNNING,\n STATUS_STOPPED,\n STATUS_NIL \n );\n if (! in_array ( $status, $statusconArray )) {\n \n $this->logHelper->log ( ERROR, \"Invalid status\" );\n return false;\n }\n $statusArray = array (\n \"status\" => $status \n );\n $this->updateAsset ( $assetID, $statusArray );\n }", "public function setStatus(?AuthenticationAppPolicyStatus $value): void {\n $this->getBackingStore()->set('status', $value);\n }", "public function update(Request $request, Banner $banner)\n {\n $request->validate([\n 'title' => 'required',\n 'link' => 'required'\n ]);\n\n if($request->status == 0){\n $banner->status = 0;\n } else {\n $banner->status = 1;\n }\n\n if($request->file('image')){\n $img_tmp = Input::file('image');\n if($img_tmp->isValid()){\n\n $filename = $img_tmp->getClientOriginalName();\n $banner_path = 'images/banners/' . $filename;\n\n Image::make($img_tmp)->save($banner_path);\n\n $oldfilename = $banner->image;\n $banner_old_path = 'images/banners/' . $oldfilename;\n\n unlink ($banner_old_path);\n\n $banner->image = $filename;\n\n }\n\n \n }\n $banner->title = $request->title;\n $banner->link = $request->link;\n\n $banner->save();\n\n return redirect()->route('banners.index')->with('success', 'Banner updated successfully.');\n\n }", "function setActivityStatus($activity_id,$status) {\n// for($i=0;$i<count($this->activities);$i++) {\n// if($this->activities[$i]['activity_id']==$activity_id) {\n// $this->activities[$i]['status']=$status;\n $query = \"update `\".GALAXIA_TABLE_PREFIX.\"instance_activities` set `status`=? where `activity_id`=? and `instance_id`=?\";\n $this->mDb->query($query,array($status,(int)$activity_id,(int)$this->instance_id));\n// }\n// } \n }", "public function setSuccessStatus(int $status, string $description = \"\");", "public function setStatus($id)\n\t{\n\t\t$this->status = $id;\n\t}", "public function setBan()\n {\n $this->status = 1;\n $this->save();\n }", "public function setStatus($status)\n {\n if ($status === 0 || $status === false) {\n $status = 'inactive';\n } elseif ($status === 1 || $status === true) {\n $status = 'active';\n }\n if ($status == 'active' || $status == 'inactive') {\n $this->status = $status;\n }\n }", "public function activate_banner($banner_website)\n\t{\n\t\tif($this->banner_model->activate_banner($banner_website))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'Banner activated successfully');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'Unable to activate banner. Please ensure you have the priviledges to do so then try again');\n\t\t}\n\t\t\n\t\tredirect('banner/'.$banner_website);\n\t}", "public function set_status_code($status) {\n $this->status_code = $status;\n }" ]
[ "0.7045017", "0.6861155", "0.6588873", "0.6587825", "0.64489144", "0.6445366", "0.6248308", "0.62322426", "0.6206283", "0.6187845", "0.6187845", "0.6187845", "0.6187845", "0.6187845", "0.61841047", "0.61841047", "0.6181516", "0.61483955", "0.6147337", "0.6137052", "0.6130202", "0.6099336", "0.6099336", "0.6099336", "0.6099336", "0.6099336", "0.6088366", "0.60798323", "0.60798323", "0.60798323", "0.60798323", "0.60798323", "0.60798323", "0.607371", "0.6065834", "0.60542375", "0.6053005", "0.60237616", "0.60237616", "0.60197884", "0.6008418", "0.6000497", "0.59989655", "0.5990262", "0.5990262", "0.5986336", "0.59722465", "0.5971283", "0.59705776", "0.59509456", "0.59453416", "0.59453416", "0.58955926", "0.58932304", "0.587993", "0.5875608", "0.5875536", "0.58679", "0.5852691", "0.5835747", "0.5831785", "0.581242", "0.579664", "0.5782243", "0.5782243", "0.57697344", "0.57690716", "0.5761928", "0.5756215", "0.5750142", "0.57356024", "0.57154506", "0.57132596", "0.5709877", "0.57083905", "0.57029533", "0.56887966", "0.56883967", "0.5686912", "0.56732434", "0.56725967", "0.5651463", "0.56512254", "0.56346613", "0.56346613", "0.56346613", "0.5631697", "0.56254107", "0.5620734", "0.56030947", "0.5600848", "0.5591652", "0.5584649", "0.5567935", "0.55634624", "0.5555045", "0.555044", "0.55490375", "0.55259526", "0.5524002" ]
0.75908464
0
// Sets the status of a product
// Устанавливает статус продукта
function twe_set_product_status($products_id, $status) { global $db; if ($status == '1') { return $db->Execute("update " . TABLE_PRODUCTS . " set products_status = '1', products_last_modified = now() where products_id = '" . $products_id . "'"); } elseif ($status == '0') { return $db->Execute("update " . TABLE_PRODUCTS . " set products_status = '0', products_last_modified = now() where products_id = '" . $products_id . "'"); } else { return -1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateproductstatusAction()\n {\n try\n {\n $em = EntityManagerSingleton::getInstance();\n\n $in_stock = $em->getReference('Library\\Model\\Product\\Status', 1);\n $out_of_stock = $em->getReference('Library\\Model\\Product\\Status', 2);\n $disabled = $em->getReference('Library\\Model\\Product\\Status', 3);\n $preorder = $em->getReference('Library\\Model\\Product\\Status', 5);\n $count = 0;\n\n echo \"--- Updating product statuses ---\\n\";\n\n echo \"--- Loading up all the products ---\\n\";\n $products = $em->getRepository('Library\\Model\\Product\\Product')->findAll();\n\n /** @var Product $product */\n foreach ($products as $product)\n {\n echo \"-- Evaluating product {$product->getId()}\\n\";\n\n if ($product->getStatusOverride() instanceof Status)\n {\n $product->setStatus($product->getStatusOverride());\n } else\n {\n // If this has a default sku set, use the status override or quantity to get status\n if (count($product->getSkus()) == 1 && ($product->getDefaultSku() instanceof Sku))\n {\n // If there is no status override, use quantity to determine status\n if ($product->getDefaultSku()->getQuantity() <= 0)\n {\n $product->getDefaultSku()->setQuantity(0);\n $product->getDefaultSku()->setStatus($out_of_stock);\n $product->setStatus($out_of_stock);\n } else\n {\n $product->setStatus($in_stock);\n $product->getDefaultSku()->setStatus($in_stock);\n }\n } else\n {\n // Get status from skus\n $all_out_of_stock = true;\n $all_disabled = true;\n $all_preorder = true;\n\n $product_skus = $product->getSkus();\n\n foreach ($product_skus as $product_sku)\n {\n // This should never actually run because we're not suppose to have default skus here\n if ($product_sku->getIsDefault()) continue;\n\n if ($product_sku->getStatus() != $out_of_stock) $all_out_of_stock = false;\n\n if ($product_sku->getStatus() != $disabled) $all_disabled = false;\n\n if ($product_sku->getStatus() != $preorder) $all_preorder = false;\n }\n\n if ($all_out_of_stock == true) $product->setStatus($out_of_stock); elseif ($all_disabled == true) $product->setStatus($disabled);\n elseif ($all_preorder == true) $product->setStatus($preorder);\n else\n $product->setStatus($in_stock);\n }\n }\n\n $count++;\n }\n\n echo \"--- Flushing changes ---\\n\";\n $em->flush();\n $em->clear();\n\n echo \"--- Done update products! ---\\n\";\n echo \"--- Updated {$count} products ---\\n\";\n }\n catch (\\Exception $ex)\n {\n echo \"Error: \" . $ex->getMessage() . \"\\n\";\n exit(1);\n }\n exit(0);\n }", "protected function update_product_status(){\r\n $response = new AjaxResponse( $this->verified() );\r\n\r\n $response->check( isset( $_POST['product_id'], $_POST['status'] ), 'Error while trying to process your request, please try again' );\r\n\r\n // If there is an error or now user id, return\r\n if ( $response->has_error() )\r\n return $response;\r\n\r\n // Instantiate objects\r\n $product = new Product();\r\n $account_product = new AccountProduct();\r\n\r\n // Get product\r\n $account_product->get( $_POST['product_id'], $this->user->account->id );\r\n\r\n // Make sure we have permission\r\n $response->check( $account_product->product_id, 'You do not have permission to modify this product');\r\n\r\n // If there is an error or now user id, return\r\n if ( $response->has_error() )\r\n return $response;\r\n\r\n // Get product\r\n $product->get( $account_product->product_id );\r\n\r\n // Change visibility\r\n $product->publish_visibility = ( 'private' == $_POST['status'] ) ? Product::PUBLISH_VISIBILITY_PRIVATE : Product::PUBLISH_VISIBILITY_PUBLIC;\r\n $product->save();\r\n\r\n return $response;\r\n }", "public function toggleStatus(): void\n {\n $data = filter_var_array($_REQUEST, FILTER_SANITIZE_STRIPPED);\n\n $product = (new ModelProduct())->findById($data['id']);\n\n $product->status = $data['status'];\n\n if (!$product->save()) {\n die($this->ajaxResponse(\"message\", [\n \"type\" => \"error\",\n \"message\" => $product->fail()->getMessage()\n ]));\n }\n }", "public function changeProductStatus($productId)\n {\n $product = Product::findByPk($productId);\n if (false == $product['isBindCode']) {\n Product::updateAll(['isBindCode' => true], ['_id' => $productId]);\n }\n }", "function wc_update_product_stock_status( $product_id, $status ) {\n\t$product = wc_get_product( $product_id );\n\n\tif ( $product ) {\n\t\t$product->set_stock_status( $status );\n\t\t$product->save();\n\t}\n}", "function wc_update_product_stock_status($product_id, $status)\n {\n }", "public static function setNewStatus($parameters) {\n\t\t$items = !empty($parameters['item']) && is_array($parameters['item']) ? $parameters['item'] : array();\n\t\t$status = !empty($parameters['status']) ? $parameters['status'] : null;\n\t\t\n\t\tforeach($items as $item){\n\t\t\t// Load the product details\r\n\t\t\t$product = Doctrine_Query::create ()->from ( 'Products p' )\r\n\t\t\t\t\t\t\t\t\t\t\t->where('product_id = ?', $item)\r\n\t\t\t\t\t\t\t\t\t\t\t->addWhere( \"p.isp_id = ?\", Isp::getCurrentId() )->fetchOne();\r\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t$product->status_id = $status;\n\t\t\t$product->save ();\n\t\t}\n\n\t\treturn true;\n\t}", "public function set_product($product)\n {\n }", "private function maybe_update_stock_status($product, $stock_status)\n {\n }", "public function sync_stock_status(&$product)\n {\n }", "public static function updateProductStatusRequest($product)\n {\n if (!empty($product)) {\n foreach ($product as $productkey => $productvalue) {\n $postData = '{\"OperationType\":\"DailyInventoryReportRequest\",\"RequestBody\":{\"DailyInventoryReportCriteria\":{\"RequestType\":\"DAILY_INVENTORY_REPORT\",\"FileType\":\"CSV\"}}}';\n $merchantId = $productvalue['merchant_id'];\n $configData = Helper::configurationDetail($merchantId);\n $obj = new Neweggapi($configData['seller_id'], $configData['authorization'], $configData['secret_key'], true);\n $response = $obj->postRequest('/reportmgmt/report/submitrequest', ['body' => $postData]);\n $server_output = json_decode($response, true);\n if (isset($server_output['IsSuccess']) && $server_output['IsSuccess']) {\n foreach ($server_output['ResponseBody'] as $key => $value) {\n foreach ($value as $key1 => $val1) {\n $old_date_timestamp = strtotime($val1['RequestDate']);\n $new_date = date('Y-m-d H:i:s', $old_date_timestamp);\n $query = \"INSERT INTO `newegg_can_product_feed` (`merchant_id`,`feed_id`,`product_ids`,`status`,`created_at`,`request_for`)VALUES(\" . $merchantId . \",'\" . $val1['RequestId'] . \"','-','\" . $val1['RequestStatus'] . \"','\" . $new_date . \"','\" . Data::FEED_PRODUCT_STATUS . \"')\";\n Data::sqlRecords($query, null, 'insert');\n $logPath = $merchantId . '/cron/productStatusUpdate/' . time() . '/' . $val1['RequestId'];\n Helper::createLog($postData, $logPath);\n }\n\n }\n }\n }\n\n }\n }", "public function sync_managed_variation_stock_status(&$product)\n {\n }", "public function sync_managed_variation_stock_status(&$product);", "private function setAvailability(): void\n {\n if ($this->amount == 0) {\n $this->status = ProductStatus::UNAVAILABLE;\n return;\n }\n\n $this->status = ProductStatus::AVAILABLE;\n }", "public function setProduct($product)\n {\n $this->product = $product;\n }", "public function setProduct($product)\n {\n $this->product = $product;\n }", "public static function updateStatus($product, $merchant_id)\n {\n $count = 0;\n $obj = new Neweggapi(SELLER_ID, AUTHORIZATION, SECRET_KEY);\n foreach ($product as $key => $value) {\n if ($value['type'] == 'simple') {\n\n $params['body'] = json_encode([\n \"Type\" => \"1\",\n \"Value\" => $value['sku']\n ]);\n $response = $obj->postRequest('/contentmgmt/item/price', $params);\n $response = json_decode($response, true);\n\n if (isset($response['Code']) && $response['Code'] == 'CT026') {\n $updateMainProduct = \"UPDATE `newegg_can_product` SET upload_status='\" . Data::PRODUCT_STATUS_NOT_UPLOADED . \"' WHERE `merchant_id`='\" . MERCHANT_ID . \"' AND `product_id`='\" . $value['product_id'] . \"'\";\n Data::sqlRecords($updateMainProduct, null, 'update');\n }\n if (isset($response['Active'])) {\n if ($response['Active'] == '1') {\n $updateMainProduct = \"UPDATE `newegg_can_product` SET upload_status='\" . Data::PRODUCT_STATUS_ACTIVATED . \"' WHERE `merchant_id`='\" . MERCHANT_ID . \"' AND `product_id`='\" . $value['product_id'] . \"'\";\n Data::sqlRecords($updateMainProduct, null, 'update');\n $count++;\n } else {\n $updateMainProduct = \"UPDATE `newegg_can_product` SET upload_status='\" . Data::PRODUCT_STATUS_DEACTIVATED . \"' WHERE `merchant_id`='\" . MERCHANT_ID . \"' AND `product_id`='\" . $value['product_id'] . \"'\";\n Data::sqlRecords($updateMainProduct, null, 'update');\n $count++;\n }\n }\n } else {\n\n $query = 'select `option_sku`,`ngg`.`product_id`,`ngg`.`option_id` from (SELECT * FROM `jet_product_variants` WHERE `merchant_id`= \"' . MERCHANT_ID . '\" and `product_id`=\"' . $value['product_id'] . '\") as jet INNER JOIN (SELECT * FROM `newegg_can_product_variants` WHERE `merchant_id`= \"' . MERCHANT_ID . '\" and `product_id`=\"' . $value['product_id'] . '\") as ngg ON jet.option_id=ngg.option_id where ngg.merchant_id=\"' . MERCHANT_ID . '\" and `jet`.`product_id`=\"' . $value['product_id'] . '\"';\n $variproducts = Data::sqlRecords($query, \"all\", \"select\");\n\n if (count($variproducts) > 0) {\n foreach ($variproducts as $variproduct) {\n $params['body'] = json_encode([\n \"Type\" => \"1\",\n \"Value\" => $variproduct['option_sku']\n ]);\n $response = $obj->postRequest('/contentmgmt/item/price', $params);\n $response = json_decode($response, true);\n if (count($response) > 0) {\n if (isset($response['Code']) && $response['Code'] == 'CT026') {\n $mainProductSelectQuery = \"SELECT * FROM jet_product WHERE `merchant_id`='\" . MERCHANT_ID . \"' AND `variant_id`='\" . $variproduct['option_id'] . \"'\";\n $mainProductData = Data::sqlRecords($mainProductSelectQuery, null, 'select');\n if (count($mainProductData) > 0) {\n $updateMainProduct = \"UPDATE `newegg_can_product` SET upload_status='\" . Data::PRODUCT_STATUS_NOT_UPLOADED . \"' WHERE `merchant_id`='\" . MERCHANT_ID . \"' AND `product_id`='\" . $variproduct['product_id'] . \"'\";\n Data::sqlRecords($updateMainProduct, null, 'update');\n $updateChildProduct = \"UPDATE `newegg_can_product_variants` SET upload_status='\" . Data::PRODUCT_STATUS_NOT_UPLOADED . \"' WHERE `merchant_id`='\" . MERCHANT_ID . \"' AND `option_id`='\" . $variproduct['option_id'] . \"'\";\n Data::sqlRecords($updateChildProduct, null, 'update');\n $count++;\n\n } else {\n $updateChildProduct = \"UPDATE `newegg_can_product_variants` SET upload_status='\" . Data::PRODUCT_STATUS_NOT_UPLOADED . \"' WHERE `merchant_id`='\" . MERCHANT_ID . \"' AND `option_id`='\" . $variproduct['option_id'] . \"'\";\n Data::sqlRecords($updateChildProduct, null, 'update');\n $count++;\n }\n } else {\n if (isset($response['Active'])) {\n if ($response['Active'] == '1') {\n\n $mainProductSelectQuery = \"SELECT * FROM jet_product WHERE `merchant_id`='\" . MERCHANT_ID . \"' AND `variant_id`='\" . $variproduct['option_id'] . \"'\";\n $mainProductData = Data::sqlRecords($mainProductSelectQuery, null, 'select');\n if (count($mainProductData) > 0) {\n $updateMainProduct = \"UPDATE `newegg_can_product` SET upload_status='\" . Data::PRODUCT_STATUS_ACTIVATED . \"' WHERE `merchant_id`='\" . MERCHANT_ID . \"' AND `product_id`='\" . $variproduct['product_id'] . \"'\";\n Data::sqlRecords($updateMainProduct, null, 'update');\n $updateChildProduct = \"UPDATE `newegg_can_product_variants` SET upload_status='\" . Data::PRODUCT_STATUS_ACTIVATED . \"' WHERE `merchant_id`='\" . MERCHANT_ID . \"' AND `option_id`='\" . $variproduct['option_id'] . \"'\";\n Data::sqlRecords($updateChildProduct, null, 'update');\n $count++;\n\n } else {\n $updateChildProduct = \"UPDATE `newegg_can_product_variants` SET upload_status='\" . Data::PRODUCT_STATUS_ACTIVATED . \"' WHERE `merchant_id`='\" . MERCHANT_ID . \"' AND `option_id`='\" . $variproduct['option_id'] . \"'\";\n Data::sqlRecords($updateChildProduct, null, 'update');\n $count++;\n }\n } else {\n $mainProductSelectQuery = \"SELECT * FROM jet_product WHERE `merchant_id`='\" . MERCHANT_ID . \"' AND `variant_id`='\" . $variproduct['option_id'] . \"'\";\n $mainProductData = Data::sqlRecords($mainProductSelectQuery, null, 'select');\n if (count($mainProductData) > 0) {\n $updateMainProduct = \"UPDATE `newegg_can_product` SET upload_status='\" . Data::PRODUCT_STATUS_DEACTIVATED . \"' WHERE `merchant_id`='\" . MERCHANT_ID . \"' AND `product_id`='\" . $variproduct['product_id'] . \"'\";\n Data::sqlRecords($updateMainProduct, null, 'update');\n $updateChildProduct = \"UPDATE `newegg_can_product_variants` SET upload_status='\" . Data::PRODUCT_STATUS_DEACTIVATED . \"' WHERE `merchant_id`='\" . MERCHANT_ID . \"' AND `option_id`='\" . $variproduct['option_id'] . \"'\";\n Data::sqlRecords($updateChildProduct, null, 'update');\n $count++;\n\n } else {\n $updateChildProduct = \"UPDATE `newegg_can_product_variants` SET upload_status='\" . Data::PRODUCT_STATUS_DEACTIVATED . \"' WHERE `merchant_id`='\" . MERCHANT_ID . \"' AND `option_id`='\" . $variproduct['option_id'] . \"'\";\n Data::sqlRecords($updateChildProduct, null, 'update');\n $count++;\n }\n }\n }\n }\n }\n }\n }\n }\n\n\n }\n return ['count' => $count];\n }", "public function setReviewToActive(){\n\t\tforeach($this->reviewProducts as $review){\n\t\t\t$review->status = ReviewProduct::STATUS_PUBLISHED;\n\t\t\t$review->save(false);\n\t\t}\n\n\t}", "public function massStatusAction()\n {\n $productIds = (array)$this->getRequest()->getParam('ordertags');\n \n $storeId = (int)$this->getRequest()->getParam('store', 0);\n $status = (int)$this->getRequest()->getParam('status');\n \n try {\n // $this->_validateMassStatus($productIds, $status);\n /*Mage::getSingleton('catalog/product_action')\n ->updateAttributes($productIds, array('status' => $status), $storeId);*/\n foreach($productIds as $productId)\n {\n $statusData = Mage::getModel('ordertags/ordertags')->chagneTagsStatus($productId, $status);\n }\n \n\n $this->_getSession()->addSuccess(\n $this->__('Total of %d record(s) have been updated.', count($productIds))\n );\n }\n catch (Mage_Core_Model_Exception $e) {\n $this->_getSession()->addError($e->getMessage());\n } catch (Mage_Core_Exception $e) {\n $this->_getSession()->addError($e->getMessage());\n } catch (Exception $e) {\n $this->_getSession()\n ->addException($e, $this->__('An error occurred while updating the product(s) status.'));\n }\n\n $this->_redirect('*/*/', array('store'=> $storeId));\n }", "public function update(&$product)\n {\n }", "public function update(&$product)\n {\n }", "public function child_has_stock_status($product, $status)\n {\n }", "public function setProductId($productId) {\n $this->productIds = array($productId);\n $this->getDataProvider()->setParam('id', $productId);\n $this->recommendationUpToDate = false;\n }", "public function setProductId($value)\n {\n $this->setProperty(\"ProductId\", $value, true);\n }", "private function assertEditProduct($status) {\n $response = $this->putJson(\n $this->endpoint,\n [\n 'name' => $this->faker->word,\n 'category' => $this->faker->word,\n 'supplier' => $this->faker->company,\n 'description' => $this->faker->text(200),\n 'price' => $this->faker->randomFloat(2, 0, 100000),\n 'quantity' => $this->faker->numberBetween(0, 100000)\n ]\n );\n\n $response->assertStatus($status);\n }", "public function testProductsDifferentStatusesUpdate(): void\n {\n $firstProduct = $this->productRepository->get('simple_with_custom_flat_attribute');\n $secondProduct = $this->productRepository->get('simple-1');\n\n $this->processor->getIndexer()->setScheduled(true);\n $this->productRepository->save($secondProduct->setStatus(Status::STATUS_DISABLED));\n $this->processor->reindexList([$firstProduct->getId(), $secondProduct->getId()], true);\n $collection = $this->productCollectionFactory->create();\n\n $this->assertCount(1, $collection);\n $this->assertEquals($firstProduct->getId(), $collection->getFirstItem()->getId());\n }", "public function updateProduct(Product &$product);", "public function setProductId($productId) {\n $this->productId = $productId;\n }", "public function updateOrderProductStatus($orderProduct, $status)\n {\n $orderProduct->status = $status;\n $orderProduct->save();\n \n return $orderProduct;\n }", "public function setProduct( $product ) {\n\t\trequire_once('CartProduct.php');\n\t\t$this->product = new CartProduct($product);\n\t}", "public function setProductId($productId)\n {\n $this->_productId = $productId;\n }", "public function setProductId($productId);", "function update_product_status($status,$productId,$choice){\r\n\tif($status==1){$status_query = \"UPDATE products SET status = 0 WHERE productId='$productId' \";}\r\n\tif($status==0){$status_query = \"UPDATE products SET status = 1 WHERE productId='$productId' \";}\r\n\t$status_result = mysql_query($status_query);\r\n\tif($status_result)\r\n\t{\r\n\t\theader(\"Location:inventory_view.php?flag=epsilon&choice={$choice}\");\r\n\t\texit;\r\n\t}\r\n\telse\r\n\t{\r\n\t\theader(\"Location:inventory_view.php?flag=delta&choice={$choice}\");\r\n\t\texit;\r\n\t}\r\n}", "public function updateProductsInventory(string $sku, int $qty, ?bool $status = null);", "public function testUpdateProduct()\n {\n }", "public function setProductId($productId)\n {\n $this->productId = $productId;\n }", "function setProduct( &$product )\r\n {\r\n if ( is_a ( $product, \"eZProduct\" ) )\r\n $this->ProductID = $product->id();\r\n elseif ( is_numeric ( $user ) )\r\n $this->ProductID = $product;\r\n }", "public static function setActive(IsotopeProduct $objProduct)\n {\n static::$arrActive[] = $objProduct;\n }", "public static function activateProduct($id){\r\n\t\t$query = SharIt::db()->createCommand()-> from(SharDB::tableName('product'))\r\n\t\t\t\t->where('id = :id ', array(':id' => $id))\r\n\t\t\t\t->select('status');\r\n\t\tif($query->fetch('status')==SharQuery::$STATUSCODE['product_status']['DELETE_ONSELL']){\r\n\t\t\t$status=array('status' => SharQuery::$STATUSCODE['product_status']['ONSELL']);\r\n\t\t}\r\n\t\telseif($query->fetch('status')==SharQuery::$STATUSCODE['product_status']['DELETE_SOLDOUT']){\r\n\t\t\t$status=array('status' => SharQuery::$STATUSCODE['product_status']['SOLDOUT']);\r\n\t\t}\r\n\t\t$query = SharIt::db()->createCommand()->update(SharDB::tableName('product'),\r\n\t\t\t$status, $id)->limit(1)->execute();\r\n return true;\r\n\t}", "public function set_product_as_sold()\n {\n $product_id = $this->input->post('product_id', true);\n if (auth_check()) {\n $this->product_model->set_product_as_sold($product_id);\n }\n }", "public function productStatus($p) {\n return $this->c['product-service']->productStatus($p);\n }", "public function setProduct($mProduct);", "public function setProduct($value)\n {\n return $this->set(self::PRODUCT, $value);\n }", "public function getProductStatusModel()\n {\n return Mage::getSingleton('catalog/product_status');\n }", "protected function update_version_and_type(&$product)\n {\n }", "protected function update_version_and_type(&$product)\n {\n }", "function sh_product($choice,$flag,$productId){\r\n\t$query = \"SELECT * FROM products WHERE productId = '{$productId}' \";\r\n\t$result = mysql_query($query);\r\n\tconfirm_query($result);\r\n\t$products = mysql_fetch_assoc($result);\r\n\t$status = $products['status'];\r\n\tupdate_product_status($status,$productId,$choice);\r\n}", "public function toggle(Request $request, $product)\n {\n $product = Product::where('UniqueID','=',$product)->first();\n $product->Status = !$product->Status;\n $product->save();\n return redirect()->to('/product/view/'.$product->UniqueID);\n }", "protected function setProductName()\n {\n $this->printLabels('Product');\n\n $product = $this->laravel['config']->get('mtn-momo.product');\n $products = ['collection', 'disbursement', 'remittance'];\n $index = array_search($product, $products);\n $default = ($index === false) ? 0 : $index;\n\n $product = $this->choice('MOMO_PRODUCT', $products, $default);\n\n $this->updateSetting('MOMO_PRODUCT', 'mtn-momo.product', $product);\n }", "public function productChangeStatus(Request $request,$id){\n\t\t$status='ERROR';\n\t\t$msg=\"Please try again later.\";\n\t\t$change_status=\"\";\n\t\ttry{\n\t\t\t$products=Product::findOrFail($request->id);\n\t\t\t$change_status=trim($products->status)=='ACTIVE' ? \"INACTIVE\" : \"ACTIVE\";\n\t\t\t$products->status=$change_status;\n\t\t\tif($products->save()){\n\t\t\t\t$status='SUCCESS';\n\t\t\t\t$msg=\"Record status has been changed successfully.\";\n\t\t\t}else{\n\t\t\t\t$change_status=trim($products->status)=='INACTIVE' ? \"ACTIVE\" : \"INACTIVE\";\n\t\t\t\t$status='ERROR';\n\t\t\t\t$msg=\"Please try again later.\";\n\t\t\t}\n\t\t}catch(ModelNotFoundException $e){\n\t\t\t$status='ERROR';\n\t\t\t$msg=\"Please try again later.\";\n\t\t\t$change_status=\"\";\n\t\t}\n\t\techo json_encode(array(\"status\"=>$status,\"msg\"=>$msg,\"change_status\"=>$change_status));\n\t\texit;\n\t}", "public function changeProductStatus ($orderProductEntities = array(), $orderProductStatus)\r\n {\r\n $orderProductStatusRepository = $this->em->getRepository('YilinkerCoreBundle:OrderProductStatus');\r\n $orderProductStatusEntity = $orderProductStatusRepository->findByOrderProductStatusId($orderProductStatus);\r\n\r\n foreach ($orderProductEntities as $orderProductEntity) {\r\n $orderProductEntity->setOrderProductStatus($orderProductStatusEntity[0]);\r\n $this->em->persist($orderProductEntity);\r\n $this->addOrderProductHistory($orderProductStatusEntity[0], $orderProductEntity);\r\n }\r\n\r\n $this->em->flush();\r\n\r\n return true;\r\n }", "public function set_status($p_status){\n\t\t$this->v_status = (int) $p_status;\n\t}", "public function saveProductStatus($productId, $status, $qty = 0, $stockId = 1, $websiteId = null)\n {\n $this->getResource()->saveProductStatus($this, $productId, $status, $qty, $stockId, $websiteId);\n return $this;\n }", "public function updateProduct(){\n $product = $this->getData();\n $id = \\MongoDB\\BSON\\toPHP(\\MongoDB\\BSON\\fromJson(json_encode($product)))->_id;\n $product = \\MongoDB\\BSON\\toPHP(\\MongoDB\\BSON\\fromJson(json_encode($product)));\n unset($product->_id);\n $response = $this->model->updateProduct($product,$id);\n if ($response>0) {\n $this->view->response($response, 200); \n } else {\n $this->view->response(\"No se pudo modificar el producto\", 404);\n }\n }", "public function show(ProductStatus $productStatus)\n {\n //\n }", "public function saveProductStatus(Mage_CatalogInventory_Model_Stock_Status $object, $productId, $status, $qty = 0,\n $stockId = 1, $websiteId = null)\n {\n $websites = array_keys($object->getWebsites($websiteId));\n $adapter = $this->_getWriteAdapter();\n foreach ($websites as $websiteId) {\n $select = $adapter->select()\n ->from($this->getMainTable())\n ->where('product_id = :product_id')\n ->where('website_id = :website_id')\n ->where('stock_id = :stock_id');\n $bind = array(\n ':product_id' => $productId,\n ':website_id' => $websiteId,\n ':stock_id' => $stockId\n );\n if ($row = $adapter->fetchRow($select, $bind)) {\n $bind = array(\n 'qty' => $qty,\n 'stock_status' => $status\n );\n $where = array(\n $adapter->quoteInto('product_id=?', (int)$row['product_id']),\n $adapter->quoteInto('website_id=?', (int)$row['website_id']),\n $adapter->quoteInto('stock_id=?', (int)$row['stock_id']),\n );\n $adapter->update($this->getMainTable(), $bind, $where);\n } else {\n $bind = array(\n 'product_id' => $productId,\n 'website_id' => $websiteId,\n 'stock_id' => $stockId,\n 'qty' => $qty,\n 'stock_status' => $status\n );\n $adapter->insert($this->getMainTable(), $bind);\n }\n }\n\n return $this;\n }", "public function set_product_type($product_type)\n {\n }", "public function fixskustatusAction()\n {\n echo \"--Updating statuses of skus that are missing statuses--\\n\";\n $em = $this->getServiceLocator()->get('entity_manager');\n $results = $em->getRepository('Library\\Model\\Product\\Sku')->findBy(['status' => null]);\n if (count($results) > 0)\n {\n foreach ($results as $result)\n {\n $product = $result->getProduct();\n $result->setStatus($product->getStatus());\n }\n\n $em->flush();\n }\n echo \"--Finished updating statuses--\\n\";\n }", "public function updateProduct_put(){\n\t\t$id = $this->put('productId');\n\t\t$price = $this->put('productPrice');\n\n\t\t$errorMsg='';\n\t\tif(trim($id)=='' || $id==null){\n\t\t\t$errorMsg.=' Complete product id. ';\n\t\t}\n\t\tif(trim($price)=='' || $price==null){\n\t\t\t$errorMsg.=' Complete product price. ';\n\t\t}\n\n\t\tif($errorMsg!=''){\n\t\t\t$this->response(array(\n\t\t\t\t'status' => false,\n\t\t\t\t'statusCode' => 500,\n\t\t\t\t'info' => \"Error\",\n\t\t\t\t'data' => $errorMsg\n\t\t\t),201);\n\t\t}\n\n\t\t$dataUpdate = $this->updateDataProduct($id,$price);\n\t\tif($dataUpdate==true){\n\t\t\t$status=true;\n\t\t\t$statusCode=200;\n\t\t\t$info=\"Success\";\n\t\t}\n\t\telse{\n\t\t\t$status=false;\n\t\t\t$statusCode=500;\n\t\t\t$info=\"Error\";\n\t\t}\n\n\t\t$this->response(array(\n\t\t\t'status' => $status, \n\t\t\t'statusCode' => $statusCode,\n\t\t\t'info' => $info\n\t\t),201);\n\n\t}", "private function updateStatus(string $sku, string $status) : Response\n {\n return $this->client->put(new Route([static::PRODUCT_ROUTE, $sku]), [\n 'product' => [\n 'status' => $status\n ] \n ]);\n }", "public function SetAsProcessedAction()\n {\n $productIds = $this->getRequest()->getPost('pending_products');\n mage::helper('ProductReturn/pendingProducts')->processProducts($productIds);\n\n\n Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Products processed'));\n $this->_redirect('ProductReturn/PendingProducts/Grid');\n }", "public function changeStatus($id)\n {\n $user = auth()->user();\n $product = $user->products()->findOrFail($id);\n\n if($product->is_active){\n $product->markAsInactive();\n } elseif($product->is_inactive) {\n $product->markAsActive();\n }\n\n return redirect($product->link('/edit'));\n }", "function set_product_confirm ($product_id, $product_version, $state)\n {\n // $state is ['preferred'|'confirmed'|'unconfirmed']\n global $connection;\n switch ($state)\n {\n case 'preferred':\n $confirmed = -1;\n break;\n case 'confirmed':\n $confirmed = 1;\n break;\n case 'unconfirmed':\n $confirmed = 0;\n break;\n }\n $query = '\n UPDATE\n '.NEW_TABLE_PRODUCTS.'\n SET\n confirmed = \"'.mysql_real_escape_string($confirmed).'\"\n WHERE\n product_id = \"'.mysql_real_escape_string($product_id).'\"\n AND product_version = \"'.mysql_real_escape_string($product_version).'\"';\n $result = mysql_query($query, $connection) or die (debug_print (\"ERROR: 354218 \", array ($query,mysql_error()), basename(__FILE__).' LINE '.__LINE__));\n }", "public function setProductCode($value);", "function setProduct(Product $oProduct) {\n\n parent::setProduct($oProduct);\n $this->setPricePaid($oProduct->getPrice());\n\n }", "public function changeProduct(Request $request){\n if($request->ajax()){\n\n $c_id = $request->input('id');\n $status = $request->input('status');\n\n if($status == 0){\n $status = 1; //deactivate the product \n }\n else {\n $status = 0; //activate the product\n }\n\n $check = DB::table('products')->where('id',$c_id)->update(['status'=> $status]);\n if($check){\n return ['status' => true]; //product active->visible to user\n } else {\n return ['status' => false]; //product inactive->not visible in front end \n }\n\n }\n }", "public function setProductType($value){ // to assign a value in the parameter $type.\n\t\t$this -> type = $value;\n\t}", "function setProduct( &$object )\r\n {\r\n if( is_a( $object, \"eZProduct\" ) )\r\n {\r\n $this->Product = $object;\r\n }\r\n }", "public function update_review_count($product)\n {\n }", "public function testGettingProductsStatus()\n {\n $this->assertSame('Published', $this->groschen->getStatus());\n\n // Product with a different status code\n $groschen = new Groschen('9789510426159');\n $this->assertSame('Development-Confidential', $groschen->getStatus());\n }", "public static function activateProduct($id,PDO $db) {\r\n\t\t$req = $db->prepare('UPDATE '.NAME_DB_SELLABLE_PROD.' SET available=1 WHERE id_product=:id');\r\n\t\t$req->execute(array('id'=>$id));\r\n\t}", "public static function sync_stock_status($product, $save = \\true)\n {\n }", "public function updated(Product $product)\n {\n //\n }", "function set_product_id( $product_id ) {\n\t\t$this->product_id = $product_id;\n\t}", "protected function get_column_value_stock_status($product)\n {\n }", "public function setStatus($status) {\n $this->status = $status;\n }", "public function setStatus($status) {\n $this->status = $status;\n }", "public function setStockStatusAttribute($observer)\n {\n $quoteItem = $observer->getQuoteItem();\n $product = $observer->getProduct();\n $quoteItem->setCustomStockstatus($product->getCustomStockstatus());\n $quoteItem->setHideDefaultStockstatus($product->getHideDefaultStockstatus());\n }", "public function setStatus($status) \n {\n $this->status = $status;\n }", "public function updateOrderProductByIdAction()\n {\n $id = intval($this->getParamList('id'));\n if ($id) {\n $param = array();\n $param['status'] = intval($this->getParamList('status'));\n $param['memo'] = trim($this->getParamList('memo'));\n $param['adminid'] = intval($this->getParamList('adminid'));\n $param['token'] = trim($this->getParamList('token'));\n\n if ($param['adminid'] <= 0) {\n $param['adminid'] = intval(Auth_Login::getToken($param['token'], 2));\n if ($param['adminid'] <= 0) {\n $this->throwException(3, 'token已过期,请重新登录');\n }\n }\n\n // status or memo need to be set\n if ($param['status'] == 0 && empty($param['memo'])) {\n $this->throwException(1, 'Param lack');\n }\n $data = $this->model->updateOrderProductById($param, $id);\n if ($data) {\n $this->echoSuccessData($data);\n $this->model->notifyOrderProductStatus($id, $param['status']);\n } else {\n $this->throwException(1, 'DB fail');\n }\n } else {\n $this->throwException(1, 'id不能为空');\n }\n }", "public function testUpdateProductSuccess()\n {\n $this->testProduct = factory(App\\Product::class)->create();\n $updatedName = 'Default test product with name changed';\n $updatedPrice = 99999;\n $updatedDescription = 'Default test product description is changed';\n $response = $this->put('/product/' . $this->testProduct->id, [\n 'name' => $updatedName,\n 'price' => $updatedPrice,\n 'description' => $updatedDescription,\n ]);\n $this->assertResponseStatus(302);\n $product = \\App\\Product::findOrFail($this->testProduct->id);\n if ($product) {\n $this->assertEquals($product->name, $updatedName);\n $this->assertEquals($product->price, $updatedPrice);\n $this->assertEquals($product->description, $updatedDescription);\n $this->assertEquals($product->picture, $this->testProduct->picture);\n }\n }", "public function getProductStatusEnabled()\n {\n return Mage_Catalog_Model_Product_Status::STATUS_ENABLED;\n }", "public function productoEnviado($ordenes_productos_id) {\n DB::table('ordenes_productos')->where('id', $ordenes_productos_id)->update(['enviado' => 1]);\n\n }", "function set_status($status)\r\n {\r\n $this->set_default_property(self :: PROPERTY_STATUS, $status);\r\n }", "function set_status($status)\r\n {\r\n $this->set_default_property(self :: PROPERTY_STATUS, $status);\r\n }", "function clients_set_vendors_status_status() {\n $UriArray = $this->uri->uri_to_assoc(3);\n $post_array = $this->input->post();\n $client_id = $this->common_lib->getParameter($this, $UriArray, $post_array, 'client_id');\n $provides_vendor_id = $this->common_lib->getParameter($this, $UriArray, $post_array, 'provides_vendor_id');\n $new_status = $this->common_lib->getParameter($this, $UriArray, $post_array, 'new_status');\n\n if ( empty($client_id) or empty($provides_vendor_id) or empty($new_status) ) {\n $this->output->set_content_type('application/json')->set_output(json_encode(array('ErrorMessage' => 'Invalid parameters !', 'ErrorCode' => 1, 'ret' => 0 )));\n return;\n }\n $ret = $this->clients_mdl->update_clients_vendors( $client_id, $provides_vendor_id, $new_status );\n $this->output->set_content_type('application/json')->set_output(json_encode(array('ErrorMessage' => '', 'ErrorCode' => 0, 'ret' => $ret )));\n }", "public function set_status($status)\n {\n $this->status = $status;\n }", "public function updateStatus($model, $status){\n // Sanity check\n if(empty($model)) throw new \\Exception('Specificati modelul produsului');\n\n // Set method and action\n $method = 'products';\n $action = 'updateStatus';\n\n // Set data\n $data = array(\n 'model' => $model,\n 'status' => $status\n );\n\n // Send request and retrieve response\n $result = Dispatcher::send($method, $action, $data);\n\n return $result;\n }", "private function SetProduct($productKey){\n\t\t$this->productKey = $productKey;\n\t\t$this->product = $this->products->search($this->productKey);\n\t\t$this->product['total_amount'] = $this->product['value'] * $this->quantity;\n\t}", "public function update(Product $product)\n {\n $product->save();\n }", "public function setNewProduct($productId)\n {\n $this->newProduct[] = $productId;\n }", "public function change_product_comment_status(){\n\t\tif ($this->checkLogin('A') == ''){\n\t\t\tredirect('admin');\n\t\t}else {\n\t\t\t$mode = $this->uri->segment(4,0);\n\t\t\t$user_id = $this->uri->segment(5,0);\n\t\t\t$product_id = $this->uri->segment(6,0);\n\t\t\t$status = ($mode == '0')?'InActive':'Active';\n\t\t\tif($status=='Active'){\n\t\t\t\t$this->product_model->Update_Product_Comment_Count_Reduce($product_id);\n\t\t\t\t$datestring = \"%Y-%m-%d %h:%i:%s\";\n\t\t\t\t$time = time();\n\t\t\t\t$createdTime = mdate($datestring,$time);\n\t\t\t\t$actArr = array(\n\t\t\t\t\t'activity'\t\t=>\t'comment',\n\t\t\t\t\t'activity_id'\t=>\t$product_id,\n\t\t\t\t\t'user_id'\t\t=>\t$this->uri->segment(7,0),\n\t\t\t\t\t'activity_ip'\t=>\t$this->input->ip_address(),\n\t\t\t\t\t'comment_id'\t=>\t$this->uri->segment(5,0),\n\t\t\t\t\t'created'\t\t=>\t$createdTime\n\t\t\t\t);\n\t\t\t\t$this->product_model->simple_insert(NOTIFICATIONS,$actArr);\n\t\t\t}else{\n\t\t\t$this->product_model->Update_Product_Comment_Count($product_id);\n\t\t\t\n\t\t\t}\n\t\t\t$newdata = array('status' => $status);\n\t\t\t$condition = array('id' => $user_id);\n\t\t\t$this->product_model->update_details(PRODUCT_COMMENTS,$newdata,$condition);\n\t\t\t$this->setErrorMessage('success','Comment Status Changed Successfully');\n\t\t\tredirect('admin/comments/view_product_comments');\n\t\t}\n\t}", "public function update(Request $request, Product $product)\n {\n $request->validate([\n 'category_id' => 'required',\n 'vendor_id' => 'required',\n 'name' => 'required',\n 'brand' => 'required',\n 'description' => 'required',\n 'unit_price' => 'required',\n 'stock' => 'required|int',\n 'status' => 'required|in:'.Product::ACTIVE_STATUS.','.Product::INACTIVE_STATUS,\n ]);\n DB::beginTransaction();\n try{\n $product->update($request->except('_token'));\n DB::commit();\n }\n catch (\\Exception $exception)\n {\n DB::rollBack();\n Log::error($exception->getMessage());\n }\n\n session()->flash('message','Product Updated Successfully!');\n return redirect()->route('product.index');\n\n }", "public function getProductStatusProvider();", "public function update(Product $product){\n\t\t$sql = 'UPDATE prod_product SET T_I_TITLE_NED = ?, T_I_TITLE_FR = ?, T_I_DESCR_NED = ?, T_I_DESCR_FR = ?, T_I_PAGE_NED = ?, T_I_PAGE_FR = ?, T_I_IMAGE = ?, L_I_ACTIVE = ?, S_I_MOD_TECH = ? WHERE O_I_IDF_TECH = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t\n\t\t$sqlQuery->setString($product->titleNed);\n\t\t$sqlQuery->setString($product->titleFr);\n\t\t$sqlQuery->setString($product->descrNed);\n\t\t$sqlQuery->setString($product->descrFr);\n\t\t$sqlQuery->setString($product->pageNed);\n\t\t$sqlQuery->setString($product->pageFr);\n\t\t$sqlQuery->set($product->image);\n\t\t$sqlQuery->set($product->active);\n\t\t//$sqlQuery->set((new \\DateTime())->format('Y-m-d H:i:s'));\n\t\t//$sqlQuery->set(new \\DateTime( 'now' ));\n\t\t$sqlQuery->set(date('Y-m-d H:i:s'));\n\n\t\t$sqlQuery->setNumber($product->id);\n\t\t\n// \t\techo 'update<br/>';\n// \t\techo $sqlQuery->getQuery();\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "public function setStatus($status)\n {\n $this->status = $status;\n }", "public function changeUserProductBatchStatus($batchDetails){\n if($batchDetailsResult = $this->mongoBatchObject->findAll([\n 'orgID' => $batchDetails['orgID'],\n 'status' => 'A',\n 'name' => ['$ne' => $batchDetails['name']]\n ]) ?? false){\n foreach($batchDetailsResult as $dBatchDetails){\n $this->mongoBatchObject->update( ['batchID' => $dBatchDetails['batchID'] ], ['status' => 'D' ]);\n }\n }\n }", "public function ChangeStatus()\n {\n if ($this->checkLogin('U') == '') {\n redirect(base_url());\n } else {\n $ingIDD = $this->input->post('imgId');\n $Status = $this->input->post('cste');\n $currentPage = $this->input->post('cpage');\n $condition = array('id' => $ingIDD);\n\n $newdata = array('status' => $Status);\n $condition = array('id' => $ingIDD);\n $this->product_model->update_details(PRODUCT, $newdata, $condition);\n echo $result = 1;\n }\n }", "public function setStatus($status){\n\t\t$this->status = $status;\n\t}", "public function set_status($status) {\n $this->status = $status;\n }" ]
[ "0.7403991", "0.72599304", "0.72179043", "0.7180285", "0.7153858", "0.694334", "0.684648", "0.6789561", "0.6762725", "0.6757044", "0.67243844", "0.6534594", "0.6493157", "0.6485558", "0.64736533", "0.64736533", "0.647279", "0.64652354", "0.6442536", "0.6412575", "0.6412575", "0.63720316", "0.6370073", "0.63441736", "0.6313433", "0.6309955", "0.63050914", "0.627783", "0.6257888", "0.6236447", "0.6229505", "0.622637", "0.6223689", "0.6216484", "0.6167492", "0.6166218", "0.6166123", "0.6162223", "0.6116683", "0.6112789", "0.61046", "0.60971284", "0.6088143", "0.60752153", "0.60588175", "0.6058412", "0.60442173", "0.60362756", "0.6031793", "0.6026283", "0.602102", "0.5996084", "0.5991794", "0.59904796", "0.5984992", "0.59513724", "0.5947399", "0.5942601", "0.5930366", "0.5928782", "0.5903853", "0.5865767", "0.5860325", "0.58578974", "0.58578587", "0.58413696", "0.5837837", "0.58277625", "0.58235866", "0.5823064", "0.5822365", "0.58215094", "0.5810507", "0.580799", "0.58066124", "0.5802854", "0.5802854", "0.5798046", "0.5795979", "0.5792771", "0.5790049", "0.57891077", "0.5788259", "0.5786217", "0.5786217", "0.5786082", "0.5785548", "0.5780272", "0.5775223", "0.57607853", "0.5756625", "0.57549137", "0.57520473", "0.57450074", "0.5744181", "0.5743729", "0.574268", "0.57399243", "0.57387835", "0.5737915" ]
0.74058133
0
Update the Customers GV account
Обновить учетную запись клиента GV
function twe_gv_account_update($customer_id, $gv_id) { global $db; $customer_gv_query = "select amount from " . TABLE_COUPON_GV_CUSTOMER . " where customer_id = '" . $customer_id . "'"; $customer_gv = $db->Execute($customer_gv_query); $coupon_gv_query = "select coupon_amount from " . TABLE_COUPONS . " where coupon_id = '" . $gv_id . "'"; $coupon_gv = $db->Execute($coupon_gv_query); if ($customer_gv->RecordCount() > 0) { $new_gv_amount = $customer_gv->fields['amount'] + $coupon_gv->fields['coupon_amount']; $gv_query = $db->Execute("update " . TABLE_COUPON_GV_CUSTOMER . " set amount = '" . $new_gv_amount . "' where customer_id = '" . $customer_id . "'"); } else { $gv_query = $db->Execute("insert into " . TABLE_COUPON_GV_CUSTOMER . " (customer_id, amount) values ('" . $customer_id . "', '" . $coupon_gv->fields['coupon_amount'] . "')"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tep_gv_account_update($customer_id, $gv_id) {\n\t\t$Customer = Doctrine_Manager::getInstance()\n\t\t\t->getCurrentConnection()\n\t\t\t->fetchAssoc(\"select amount from \" . TABLE_COUPON_GV_CUSTOMER . \" where customer_id = '\" . $customer_id . \"'\");\n\t\t$Coupon = Doctrine_Manager::getInstance()\n\t\t\t->getCurrentConnection()\n\t\t\t->fetchAssoc(\"select coupon_amount from \" . TABLE_COUPONS . \" where coupon_id = '\" . $gv_id . \"'\");\n if (sizeof($Customer) > 0) {\n $new_gv_amount = $Customer[0]['amount'] + $Coupon[0]['coupon_amount'];\n $query = \"update \" . TABLE_COUPON_GV_CUSTOMER . \" set amount = '\" . $new_gv_amount . \"' where customer_id = '\" . $customer_id . \"'\";\n } else {\n $query = \"insert into \" . TABLE_COUPON_GV_CUSTOMER . \" (customer_id, amount) values ('\" . $customer_id . \"', '\" . $Coupon[0]['coupon_amount'] . \"')\";\n }\n\t\tDoctrine_Manager::getInstance()\n\t\t\t->getCurrentConnection()\n\t\t\t->exec($query);\n }", "public function testUpdateAnAccount()\n {\n }", "function tep_gv_account_update($customer_id, $gv_id) {\r\n return;\r\n $customer_gv_query = tep_db_query(\"select amount from \" . TABLE_COUPON_GV_CUSTOMER . \" where customer_id = '\" . $customer_id . \"'\");\r\n $coupon_gv_query = tep_db_query(\"select coupon_amount from \" . TABLE_COUPONS . \" where coupon_id = '\" . $gv_id . \"'\");\r\n $coupon_gv = tep_db_fetch_array($coupon_gv_query);\r\n if (tep_db_num_rows($customer_gv_query) > 0) {\r\n $customer_gv = tep_db_fetch_array($customer_gv_query);\r\n $new_gv_amount = $customer_gv['amount'] + $coupon_gv['coupon_amount'];\r\n // new code bugfix\r\n $gv_query = tep_db_query(\"update \" . TABLE_COUPON_GV_CUSTOMER . \" set amount = '\" . $new_gv_amount . \"' where customer_id = '\" . $customer_id . \"'\"); \r\n\t // original code $gv_query = tep_db_query(\"update \" . TABLE_COUPON_GV_CUSTOMER . \" set amount = '\" . $new_gv_amount . \"'\");\r\n } else {\r\n $gv_query = tep_db_query(\"insert into \" . TABLE_COUPON_GV_CUSTOMER . \" (customer_id, amount) values ('\" . $customer_id . \"', '\" . $coupon_gv['coupon_amount'] . \"')\");\r\n }\r\n }", "function update($gigyaAccount);", "public function updateAccount($account) {\n \n }", "public function updateAccountData($new_data);", "public function testUpdateLinkedAccount()\n {\n\n }", "public function update(&$customer)\n {\n }", "public function update(&$customer)\n {\n }", "function woocommerce_account_edit_account()\n {\n }", "public function update() {\n\t\t$currentUserUpdated = $this->lending->updateAccount($this->input->post());\n\t\t$this->session->set_userdata($currentUserUpdated);\n\t\t$this->load->view('edit');\n\t}", "public static function edit_account()\n {\n }", "static public function update(UserAccount $obj){\n\t\t// Code here...\n\t}", "function updateUserBillingDetails()\n{\n\t$cf = new Fwcore();\n\t$cf->updateUserBillingDetails(); \n}", "function update(){\n\t\tglobal $errors;\n\t\tglobal $connection;\n\t\t//$result = array();\n\t\t$result['count'] = 0;\n\t\t\n\t\tif($this->_username_changed == 1){\n\t\t\t$query = $connection->prepare('CALL customer_exists(:username)');\n\t\t\t$query->bindParam(':username', $this->_username);\n\t\t\t$query->execute();\n\t\t\t$result = $query->fetch(PDO::FETCH_ASSOC);\n\t\t}\n\t\tif($result['count'] == 0){\n\n\t\t\t$query = $connection->prepare('CALL update_customer(:customersID, :firstname, :lastname, :address, :city, :province, :postalcode, :username, :pwd)');\n\t\t\t$query->bindParam(':customersID', $this->customersID);\n\t\t\t$query->bindParam(':firstname', $this->_firstname);\n\t\t\t$query->bindParam(':lastname', $this->_lastname);\n\t\t\t$query->bindParam(':address', $this->_address);\n\t\t\t$query->bindParam(':city', $this->_city);\n\t\t\t$query->bindParam(':province', $this->_province);\n\t\t\t$query->bindParam(':postalcode', $this->_postalcode);\n\t\t\t$query->bindParam(':username', $this->_username);\n\t\t\t$query->bindParam(':pwd', $this->_pwd);\n\t\t\t$query->execute();\n\t\t}else{\n\t\t\t$errors['username'] = \"Username is already taken, choose another...\";\n\t\t\t$errors['error_count'] = true;\n\t\t}\n\t}", "function updateZencartCustomers ( $user )\n\t{\n\t\t// as you cycle through fe_users update the zen_address_book,\n\t\t// zen_customers, and zen_customers_info entries.\n\t\t$this->customersUpdate( $user );\n\n\t\t// cross-reference zen_address_book and zen_customers\n\t\t$this->customersAddressUpdate( $user );\n\n\t\t$this->customersInfoUpdate( $user );\n\t}", "public function testUpdateCustomerProfileV2()\n {\n }", "function update_customer() {\n \n $up_id = $_POST['id'];\n\n if ($this->customers->get($up_id) == null)\n $this->data['errors'][] = 'Record does not exist.';\n \n //Get the old record\n $changedrecord = $this->customers->get_array($up_id);\n //Merge with post\n $changedrecord = array_merge($changedrecord, $_POST);\n //Update in DB\n $this->customers->update($changedrecord);\n redirect('/ar/welcome');\n \n }", "public function update()\n\t{\n\t\t\n\t\t// Get a db connection.\n\t\t$paymentMethod = 'os_cloud_payment';\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true);\n\t\t$query\n\t\t\t->select($db->quoteName(array('params')))\n\t\t\t->from($db->quoteName('#__osmembership_plugins', 'a'))\n\t\t\t->where($db->quoteName('a.name').\" = \".$db->quote($paymentMethod));\n\t\t$db->setQuery($query);\n\t\t$plugin = $db->loadObject();\n\t\t$params = $plugin->params;\n\t\t$params = new JRegistry($params);\n\t\t$aid = $params->get('cp_api_id_login');\n\n\n\t\t$Itemid = $this->input->getInt('Itemid', 0);\n\t\t$data = $this->input->getData();\n\n\n\t\t/**@var OSMembershipModelUpdate $model **/\n\t\t$model = $this->getModel();\n\t\t$data['id'] = (int) $data['cid'][0];\n\n\n\t\t$subscriber_id = $data['id'];\n\t\t$new_email = $data['email'];\n\n\t\t$db = JFactory::getDbo();\n\n // Get $user_id\n\t\t$sql2=\"SELECT user_id FROM `#__osmembership_subscribers` WHERE id=\" . $subscriber_id . \" ; \";\n\t\t$db->setQuery($sql2);\n\t\t$db->query();\n\t\t$user_id = $db->loadResult();\n\n // Get $acid\t\n\t\t$query = $db->getQuery(true);\n\t\t$query->select('acid')\n\t\t\t ->from('#__osmembership_users_acid')\n\t\t\t ->where('user_id = ' . $db->quote($user_id));\n\t\t$db->setQuery($query);\n\t\t$acid = (int) $db->loadResult();\n\n\n // Get $old_email\n $query_x = $db->getQuery(true);\n\t\t$query_x->select('email')\n\t\t\t\t->from('#__users')\n\t\t\t\t->where('id = ' . $db->quote($user_id));\n\t\t$db->setQuery($query_x);\n\t\t$old_email = $db->loadResult();\n \n\t\t/*\n\t\techo \"<pre>\";\n\t\tprint_r($acid);\n\t\techo \"<pre>\";\n\n\t\techo \"<pre>\";\n\t\tprint_r($data);\n\t\techo \"<pre>\";\n\n\t\techo \"<pre>\";\n\t\tprint_r('https://credit.j-payment.co.jp/gateway/accgate.aspx?aid=101964&cmd=1&acid='.$acid.'&em='.$new_email);\n\t\techo \"</pre>\";\n\n\t\texit();\n\t\t*/\n\n\t\ttry\n\t\t{\n\t\t\t$model->updateUpdate($data, $this->input);\n\t\t\t$message = JText::_('OSM_YOUR_PROFILE_UPDATED');\n\t\t\t$type = 'message';\n\n\t\t\t\n if($new_email <> $old_email)\n { \n\n\t $ch_x = curl_init();\n\n\t\t\t\tcurl_setopt($ch_x, CURLOPT_URL, 'https://credit.j-payment.co.jp/gateway/accgate.aspx?aid='.$aid.'&cmd=1&acid='.$acid.'&em='.$new_email);\n\n\t\t\t\t// curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\t\t\tcurl_setopt($ch_x, CURLOPT_RETURNTRANSFER, true);\n\n\t\t\t\t// curl_setopt($ch, CURLOPT_HTTPHEADER, array(\"Content-Type: text/xml\"));\n\t\t\t\tcurl_setopt($ch_x, CURLOPT_HTTPHEADER, false);\n\n\t\t\t\tcurl_setopt($ch_x, CURLOPT_CONNECTTIMEOUT, 15);\n\n\t\t\t\t$jp_result_x = curl_exec($ch_x); \n\n } \n\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\t$message = $e->getMessage();\n\t\t\t$type = 'error';\n\t\t}\n\n\t\t//Redirect to the profile page\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_osmembership&view=Update&Itemid=' . $Itemid), $message, $type);\n\t}", "public function updated(Customer $customer)\n {\n \\LogActivity::addToLog('Modificó al cliente: '.$customer->name);\n }", "public function actionUpdate()\n {\n $user = $this->loadModel(Yii::app()->user->id, 'YdUser');\n $user->scenario = 'account';\n\n if (isset($_POST['YdUser'])) {\n $user->attributes = $_POST['YdUser'];\n if ($user->save()) {\n Yii::app()->user->addFlash('Your account has been saved.', 'success');\n $this->redirect(Yii::app()->returnUrl->getUrl(array('/account/index')));\n }\n }\n\n $this->render('update', array(\n 'user' => $user,\n ));\n }", "public function updated(Account $account)\n {\n //\n }", "public function update_account()\n\t{\n\t\t//form validation rules\n\t\t$this->form_validation->set_rules('last_name', 'Last Names', 'required|xss_clean');\n\t\t$this->form_validation->set_rules('first_name', 'First Name', 'required|xss_clean');\n\t\t$this->form_validation->set_rules('phone', 'Phone', 'required|xss_clean');\n\t\t\n\t\t//if form has been submitted\n\t\tif ($this->form_validation->run() == FALSE)\n\t\t{\n\t\t\t$this->session->set_userdata('front_error_message', validation_errors());\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t//check if user has valid login credentials\n\t\t\tif($this->users_model->edit_frontend_user($this->session->userdata('user_id')))\n\t\t\t{\n\t\t\t\t$this->session->set_userdata('front_success_message', 'Your details have been successfully updated');\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->session->set_userdata('front_error_message', 'Oops something went wrong and we were unable to update your details. Please try again');\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->my_details();\n\t}", "public function update(Request $request)\n {\n Auth::guard('customer')->user()->update($request->all());\n\n return redirect()->route('account', 'account#settings')->with('success', trans('notify.info_updated'));\n }", "public function testUpdateAudienceCustomersAttributes()\n {\n }", "public function testUpdateAccountDomain()\n {\n }", "public function testUpdateCustomerProfilesV2()\n {\n }", "public static function update_customer() {\n $response = array(\n 'error' => false,\n 'message' => 'Successfully updated customer'\n );\n\n if(isset($_REQUEST['stripe_customer_updates'])) {\n $updates = $_REQUEST['stripe_customer_updates'];\n $user_id = $_REQUEST['user_id'];\n Stripe::update_customer($user_id, $updates);\n \n $response['updates'] = $updates;\n \n } else {\n $response = array(\n 'error' => true,\n 'message' => 'stripe_update_customer or user_id request not set.'\n );\n }\n\n echo json_encode($response);\n\n wp_die();\n }", "public function update(Customer $customer)\n {\n\n }", "public static function update_registered_customer($user_id)\n {\n }", "public function update_customers(){\n\t\textract($this->security->xss_clean(html_escape(array_merge($this->data,$_POST))));\n\n\t\t//Validate This customers already exist or not\n\t\t$query=$this->db->query(\"select * from db_customers where upper(customer_name)=upper('$customer_name') and id<>$q_id\");\n\t\tif($query->num_rows()>0){\n\t\t\treturn \"This Customers Name already Exist.\";\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\t$query1=\"update db_customers set customer_name='$customer_name',mobile='$mobile',phone='$phone',\n\t\t\t\t\t\t\temail='$email',country_id='$country',state_id='$state',opening_balance='',\n\t\t\t\t\t\t\tpostcode='$postcode',address='$address',gstin='$gstin',tax_number='$tax_number'\n\t\t\t\t\t\t\t where id=$q_id\";\n\t\t\tif ($this->db->simple_query($query1)){\n\t\t\t\t\t$this->session->set_flashdata('success', 'Success!! Customer Updated Successfully!');\n\t\t\t return \"success\";\n\t\t\t}\n\t\t\telse{\n\t\t\t return \"failed\";\n\t\t\t}\n\t\t}\n\t}", "public function action_update_user()\n\t{\n\t\t/*\n\t\t * KEY OPTIONS\n\t\t * \n\t\t * name\n\t\t * email\n\t\t * blog\n\t\t * company\n\t\t * location\n\t\t */\n\t\t$array = array(\n\t\t\t\t\t\t'name' => 'Testing API',\n\t\t\t\t\t\t'location' => 'Kohanaville',\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t$this->g->update_user($array);\n\t}", "public function updateAccount(Account $account)\n {\n $reponse=$this->bdd->prepare('UPDATE Accounts set nameUser=:nameUser,sold=:sold,dateModif=CURRENT_TIMESTAMP WHERE idAccount=:id');\n $reponse->execute(array(\n 'id' => $account->getIdAccount(),\n 'nameUser' => $account->getNameUser(),\n 'sold' => $account->getSold(),\n\n\n ));\n }", "protected function updateAccount()\n {\n $query = 'UPDATE bank_account SET balance = ? WHERE account_number = ?';\n\n $statement = $this->pdo->prepare($query);\n $statement->execute([$this->balance, $this->accountNumber]);\n }", "private function update_user_meta($customer)\n {\n }", "public function update(Request $request, Customers $customers) {\n//\n\t}", "private function billingInfoUpdatedNotification() {\n $this->setCommonAccountFields($this->accountData);\n $this->saveAccountData();\n }", "public function testUpdateAccountSsoIdp()\n {\n }", "public function update() {\r\n\t\t$query = \"UPDATE Payees\r\n\t\t\t\t\tSET accountName = :accountName,\r\n\t\t \t\t\taccountNickname = :accountNickname,\r\n \t\t\t\t\tbsb = :bsb,\r\n \t\t\t\t\taccountNumber = :accountNumber\r\n \t\t\t\tWHERE payeeID = :payeeID\";\r\n\t\t\r\n\t\t$db = Database::getInstance ();\r\n\t\t$stmt = $db->prepare ( $query );\r\n\t\t$stmt->bindParam ( ':payeeID', $this->_payeeID );\r\n\t\t$stmt->bindParam ( ':accountName', $this->_accountName );\r\n\t\t$stmt->bindParam ( ':accountNickname', $this->_accountNickname );\r\n\t\t$stmt->bindParam ( ':bsb', $this->_bsb );\r\n\t\t$stmt->bindParam ( ':accountNumber', $this->_accountNumber );\r\n\t\t$stmt->execute ();\r\n\t\treturn true;\r\n\t}", "function update()\n\n {\n\n\t\n\n \t\t$sql = \t\"UPDATE customers SET \";\n\n\t\t\tif(!empty($this->name)) $sql .=\t\" name = '\" . $this->name . \"'\";\n\n \t\tif(!empty($this->phone)) $sql .=\t\", phone = '\" . $this->phone . \"'\";\n\n\t\t\tif(!empty($this->email)) $sql .=\t\", email = '\" . $this->email . \"'\";\n\n\t\t\tif(!empty($this->dob)) $sql .=\t\", DOB = '\" . $this->dob . \"'\";\n\n\t\t\tif(!empty($this->username)) $sql .=\t\", username = '\" . $this->username . \"' \";\n\n\t\t\t\n\n \t\t$sql .= \" WHERE customers.Id = \" . $this->id;\n\n \t\t\n\n\t\t\t//echo $sql;\n\n\t\t\t \n\n\t \tif ( mysql_query( $sql ) == false )\n\n\t \t{\n\n\t\t\t \tthrow new Exception(\"dbcustomers error update id=\" . $this->id );\n\n\t\t\t \treturn false;\n\n\t \t}\n\n \t\n\n \treturn true;\n\n }", "public function update(){\r\n\t\t$log = Log::getInstance();\r\n\t\t$db = Database::getInstance();\t\t\r\n\t\t\r\n\t\t$this->setupSafeInput();\r\n\t\t$sql = \"UPDATE \".TBL_CUSTOMER.\" SET \".\r\n\t\t\t\"name='$this->name',\".\r\n\t\t\t\"address='$this->address',\".\r\n\t\t\t\"phone='$this->phone',\".\r\n\t\t\t\"cell='$this->cell',\".\r\n\t\t\t\"nit='$this->nit',\".\r\n\t\t\t\"active=$this->active,\".\r\n\t\t\t\"email='$this->email',\".\r\n\t\t\t\"date_modified=NOW() \".\r\n\t\t\t\"WHERE id=$this->id\";\r\n\t\t\r\n\t\tif (!$db->query($sql)){\r\n\t\t\t$log->addError(\"No se pudo actualizar datos de Cliente.\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "public function updated(Customer $customer)\n {\n //\n }", "public function updated(Customer $customer)\n {\n //\n }", "function edit_account($account)\n\t{\n\t\t$this->db->where($account);\n\t\tif($this->db->update('ospos_t_accounts'))\n\t\t{\n\t\t\tReturn \"Account updated Successful\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tReturn \"Error Occured During Account Update\";\n\t\t}\n\t}", "function eca_profile_update_old_customer_number() {\n\t$user_id = get_user_id_for_viewed_profile();\n\t\n //if ( current_user_can('edit_user', $user_id) )\n update_user_meta($user_id, 'old_customer_number', $_POST['old_customer_number']);\n\tupdate_user_meta($user_id, 'my_child_id', $_POST['my_child_id']);\n\tupdate_user_meta($user_id, 'discount_tickets_number', $_POST['discount_tickets_number']);\n\tupdate_user_meta($user_id, 'free_tickets_number', $_POST['free_tickets_number']);\n}", "static public function update(BankAccount $obj){\n\t\t// Code here...\n\t}", "function updateAccount($formData){\n if(isset($formData['_token'])){$token = $formData['_token'];}else{$token='';}\n if(isset($formData['billing_first_name'])){$billing_first_name = $formData['billing_first_name'];}else{$billing_first_name='';}\n if(isset($formData['billing_last_name'])&&$formData['billing_last_name']!=''){$billing_last_name = $formData['billing_last_name'];}else{$billing_last_name='';}\n if(isset($formData['billing_telephone'])){$billing_telephone = $formData['billing_telephone'];}else{$billing_telephone='';}\n\n if(isset($formData['billing_email'])){$billing_email = $formData['billing_email'];}else{$billing_email='';}\n if(isset($formData['password'])){$password = $formData['password'];}else{$password='';}\n if(isset($formData['billing_address'])){$billing_address = $formData['billing_address'];}else{$billing_address='';}\n if(isset($formData['billing_city'])){$billing_city = $formData['billing_city'];}else{$billing_city='';}\n if(isset($formData['billing_post_code'])){$billing_post_code = $formData['billing_post_code'];}else{$billing_post_code='';}\n if(isset($formData['billing_state'])){$billing_state = $formData['billing_state'];}else{$billing_state='';}\n if(isset($formData['billing_country'])){$billing_country = $formData['billing_country'];}else{$billing_country='';}\n if(isset($formData['birth_date'])){ $input= $formData['birth_date'];\n $old_date =strtotime($input);\n $birth_date = date('Y-m-d H:i:s',($old_date));}else{$birth_date='';}\n\n $data['token'] = $token;\n $data['billing_first_name'] = $billing_first_name ;\n $data['billing_last_name'] = $billing_last_name;\n $data['billing_telephone'] = $billing_telephone;\n $data['birth_date'] = $birth_date;\n $data['billing_email'] = $billing_email;\n if($password!=''){\n $data['password'] = Hash::make($password);\n }\n $data['billing_address'] = $billing_address;\n $data['billing_city'] = $billing_city;\n $data['billing_post_code'] = $billing_post_code;\n $data['billing_state'] = $billing_state;\n $data['billing_country'] = $billing_country;\n\n\n if(isset($formData['status'])){$status = $formData['status'];}else{$status='1';}\n $data['status'] = $status;\n\n $data['modifydate'] = date('Y-m-d H:i:s');\n\n $data['first_name'] = $billing_first_name ;\n $data['last_name'] = $billing_last_name;\n $data['telephone'] = $billing_telephone;\n $data['email'] = $billing_email;\n\n DB::table('customers')->where('id', $formData['userId'])->update($data);\n return true;\n }", "public function updateAccount($data)\n {\n // Update access credentials\n $this->email = $data['email'];\n\n if($data['password'])\n {\n $this->password = $data['password'];\n }\n\n // Update profile\n if ($data['first_name'] && $data['last_name'])\n {\n $this->name = $data['name']; // check if works on profile update\n\n $this->assignProfile($data);\n }\n\n // Update roles\n if($data['role_id'])\n {\n $this->assignRole($data['role_id']);\n }\n\n $this->save();\n\n // Important for sending an email\n return $this;\n }", "public function testUpdateAnAccount()\n {\n $config = Configuration::getDefaultConfiguration()\n ->setHost('http://127.0.0.1:4010')\n ->setUsername('YOUR_ACCOUNT_ID')\n ->setPassword('YOUR_API_KEY');\n\n\n $apiInstance = new DefaultApi(\n new Client(),\n $config\n );\n\n //$account_id = $account_id_test_value;\n //$account_request = $account_request_test_value;\n \n $response = $apiInstance->updateAnAccount($this->account_request_updateAnAccount_test_value());\n \n $this->assertNull($response);\n }", "function update()\n\t{\n\t\tglobal $cmn;\n\t\t$strquery='UPDATE '.DB_PREFIX.'contact_person SET \n\t\t\t\t\tclient_id\t\t= \\''.$this->client_id.'\\',\n\t\t\t\t\tfull_name\t\t\t= \\''.$this->full_name.'\\',\n\t\t\t\t\temail\t\t\t= \\''.$this->email.'\\',\n\t\t\t\t\toffice_phone\t\t\t= \\''.$this->office_phone.'\\',\n\t\t\t\t\tmobile\t\t= \\''.$this->mobile.'\\',\n\t\t\t\t\tfax\t\t= \\''.$this->fax.'\\',\n\t\t\t\t\tupdated_date= NOW(),\n\t\t\t\t\tupdated_by\t= \\''.$cmn->get_session(ADMIN_USER_ID).'\\',\n\t\t\t\t\tstatus\t\t= \\'active\\'\n\t\t\t\t\tWHERE id\t\t= '.$this->id;\n\n\t\treturn mysql_query($strquery) or die(mysql_error());\t\n\t}", "public function update(Request $request, Customers $customers)\n {\n //\n }", "public function hookActionCustomerAccountUpdate($params)\n\t{\n\t\t$sql_result = Db::getInstance()->getRow(\n\t\t\t\t'SELECT * FROM '._DB_PREFIX_.$this->db_name_mp_link.\n\t\t\t\t' WHERE idPresta= '.pSQL($params['customer']->id));\n\t\tif ($sql_result && isset($sql_result['idMP']) && !empty($sql_result['idMP'])) //if entry exist\n\t\t{\n\t\t\t$apikey = unserialize(Configuration::get(Constants::SETTINGS_STR));\n\t\t\tif (isset($apikey) && $this->apiConnexion($apikey['alkey']) && isset($params['customer'])) // if connexion go on\n\t\t\t{\n\t\t\t\t$send_array = $this->getCustomerBindArray($params['customer']);\n\n\t\t\t\t// saves target in mailPerformance\n\t\t\t\t$this->mperf->targets->updateTargetFromValues($sql_result['idMP'], $send_array);\n\t\t\t}\n\t\t}\n\t\telse //if the user is not linked to MailPerf\n\t\t\t$this->hookActionCustomerAccountAdd(array('newCustomer' => $params['customer']));\n\t}", "public function updateAccountInfo($data) {\n\t\t$error = '';\n\t\tif(!isset($_SESSION['user']['table_users']['id'])) $this->redirect('login');\n\t\tif(isset($data['password']) && $data['password'] != '') $error .= (Validate::string($data['password'],array('min_length'=>4))) ? '' : 'Passwords must be atleast 4 characters long';\n\t\tif($error) return $error;\n\t\t\n\t\t// create the users table data set\n\t\t$user['id'] = $_SESSION['user']['table_users']['id'];\n\t\t$user['firstname'] = $data['firstname'];\n\t\t$user['lastname'] = $data['lastname'];\n\t\tif(isset($data['password']) && $data['password'] != '') $user['password'] = md5($data['password']);\n\t\t\n\t\tunset($data['password']);\n\t\tunset($data['password2']);\n\t\t$Database = Registry::getKey('Database');\n\t\t$Database->perform('users',$user,'update','id='.$_SESSION['user']['table_users']['id']);\n\t\t$Database->perform('addresses',$data,'update','default_address=1 and user_id='.$_SESSION['user']['table_users']['id']);\n\t}", "public function gravityUserUpdate(Varien_Event_Observer $observer)\n {\n if (!$this->_getGravityHelper()->isFullyEnabled() || !$this->_getGravityHelper()->getCustomerUpdateEnabled()) {\n return false;\n }\n\n try {\n\n $customer = $observer->getCustomer();\n if (!is_null($customer) && $customer->getId()) {\n\n $parameters = array(\n 'type' => Me_Gravity_Model_Method_Request::EVENT_TYPE_CUSTOMER_UPDATE\n );\n\n $exportModel = Mage::getModel('me_gravity/customers');\n foreach ($exportModel->getExportHeaders() as $attribute) {\n if ($attribute == 'userid') {\n $parameters[$attribute] = $customer->getId();\n } elseif ($attributeValue = $exportModel->getAttributeValueByCode($customer, $attribute)) {\n $parameters[$attribute] = $attributeValue;\n }\n }\n\n Mage::getModel('me_gravity/method_request')->sendRequest(\n Me_Gravity_Model_Method_Request::EVENT_TYPE_UPDATE,\n $parameters\n );\n\n }\n\n } catch (Mage_Core_Exception $e) {\n $this->_getGravityHelper()->getLogger($e->getMessage());\n } catch (Exception $e) {\n $this->_getGravityHelper()->getLogger(\n $e->getMessage(),\n $this->_getGravityHelper()->__('An error occurred while sending customer update event to Gravity.')\n );\n }\n\n return $this;\n }", "function update_account($acc_id, $params) {\n $this->db->where('acc_id', $acc_id);\n $response = $this->db->update('accounts', $params);\n if ($response) {\n return TRUE;\n } else {\n return FALSE;\n }\n }", "public function update_customer_profile($host_obj, $customer, $data)\n\t\t{\n\t\t\tthrow new Phpr_SystemException('The update_customer_profile() method is not supported by the payment module.');\n\t\t}", "function updateAccount(){\n global $db;\n\n $firstname = $_SESSION[\"firstname\"];\n $lastname = $_SESSION['lastname'];\n $address = $_SESSION['address'] ;\n $state = $_SESSION['state'];\n $country = $_SESSION['country'];\n $city = $_SESSION['city'];\n $company = $_SESSION['company'];\n $postcode = $_SESSION['postcode'];\n $email = $_SESSION['email'];\n $phone = $_SESSION['phone'];\n $emaildb = $_SESSION['emaildb'];\n $password = $_SESSION['password'] ;\n\n //login to database and get details\n $query = \"SELECT * FROM Users WHERE password = '$password' AND email ='$email' \" ;\n\n \n\n $stmt = oci_parse($db, $query); \n \n if(!$stmt) {\n echo \"An error occurred in parsing the sql string.\\n\"; \n exit; \n } \n \n oci_execute($stmt);\n\n while(oci_fetch_array($stmt)){\n $User_id = oci_result($stmt,\"USER_ID\");\n }\n\n $query = \"UPDATE Users SET firstname ='$firstname', lastname = '$lastname', address = '$address', state = '$state', country = '$country', company='$company', email = '$emaildb', city ='$city', postcode='$postcode', phone = '$phone' WHERE USER_ID='$User_id'\"; \n\n \n\n $stmt = oci_parse($db, $query); \n \n if(!$stmt) {\n echo \"An error occurred in parsing the sql string.\\n\"; \n exit; \n } \n \n oci_execute($stmt);\n\n\n $_SESSION['email'] = $_SESSION['emaildb'];\n return \"Your Account Details have been updated.\";\n\n}", "public function updateAccount(){\n if($this->change_password($_POST[\"username\"], $_POST[\"password\"])){\n $this->redirect(\"/staff/account/?password_changed=true\");\n } else {\n $this->redirect(\"/staff/register/?password_changed=true\");\n }\n }", "function updateCustomer($customerID) {\n\t\t// params for Update Customer\n\t\t$updateResult = $gateway->customer()->update(\n\t\t\t$customerID,\n\t\t\t[\n\t\t\t 'firstName' => 'New First',\n\t\t\t 'lastName' => 'New Last',\n\t\t\t 'company' => 'New Company',\n\t\t\t 'email' => 'new.email@example.com',\n\t\t\t 'phone' => 'new phone',\n\t\t\t 'fax' => 'new fax',\n\t\t\t 'website' => 'http://new.example.com'\n\t\t\t]\n\t\t);\n\t\t\n\t\tif($updateResult->success) {\n\t\t\techo \"UPDATED CUSTOMER SUCCESS\";\n\t\t}\n\t\t\n\t}", "function update() {\n if (!$this->classes['auth']->validateFormToken('editToken', $_POST['token'])) {\n header(\"location: http://{$_SERVER['SERVER_NAME']}/mailmaid/account\");\n die();\n }\n if (($this->classes['auth']->checkLevel() == 2) && ($this->classes['auth']->getId() != $_POST['editId'])) {\n header(\"location: http://{$_SERVER['SERVER_NAME']}/mailmaid/account\");\n die();\n }\n $update = array();\n if (!empty($_POST['username']) && !$this->classes['auth']->checkUserExist($_POST['username'])) {\n $update['username'] = $_POST['username'];\n }\n if (!empty($_POST['password'])) {\n $update['password'] = password_hash($_POST['password'], PASSWORD_DEFAULT);\n }\n if (!empty($_POST['role'])) {\n $update['level'] = $_POST['role'];\n }\n $db = $this->classes['db'];\n $db->update('users', $update);\n $db->where('id', '=', $_POST['editId']);\n $db->execute();\n $db->reset();\n header(\"location: http://{$_SERVER['SERVER_NAME']}/mailmaid/account\");\n }", "public function update_customer_stats($customer, $total){\n //update amount of transactions for customer_id\n $customer = Customer::find($customer);\n $no_of_transactions = $customer->no_of_transactions;\n $transaction_total = $customer->total_transactions;\n $customer->no_of_transactions = $no_of_transactions +1;\n $customer->total_transactions = $transaction_total + $total;\n $customer->save();\n }", "public function testUpdateCustomerProfileAudiences()\n {\n }", "public function update($customer_id, $customer_details);", "public function update():void{\n\t\t$user = $this->session->get('user');\n\n\t\t$input = $this->request;\n\t\t$this->validateEditInput($input, 'settings');\n\n\t\t// Handle password update\n\t\tif(isset($this->request['password']) && $this->request['password'] != '' && isset($this->request['confirmPassword'])){\n\t\t\t$user->setPassword($this->pass_hash($input['password']));\n\t\t}\n\t\t// Handle name updated\n\t\tif($input['firstName'].' '.$input['lastName'] != $user->getFirstName().' '.$user->getLastName()){\n\t\t\t$user->setFirstname($input['firstName']);\n\t\t\t$user->setLastName($input['lastName']);\n\t\t}\n\n\t\t$this->userRepository->save($user);\n\n\t\t// Update user in the session\n\t\t$this->session->add('user', $user);\n\n\t\t// Handle email updated\n\t\tif($input['email'] != $user->getEmail()){\n\t\t\t// Check if email addr is already in use\n\t\t\tif($this->userRepository->get('email',$input['email']) !== NULL){\n\t\t\t\t$this->session->flashMessage('danger', 'This email address is already in use.');\n\t\t\t\tRedirect::toControllerMethod('Account', 'settings');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// send Email\n\t\t\t$emailHandler = new Email();\n\t\t\t$emailHandler->sendEmailUpdateConfirm($input['email'],$user->getEmail());\n\t\t\t$this->session->flashMessage('success', 'A confirmation email has been sent to '.$input['email'].'. Please confirm to update.');\n\t\t\tRedirect::toControllerMethod('Account', 'settings');\n\t\t\treturn;\n\t\t}\n\n\t\t$this->session->flashMessage('success', 'Your account has been updated. Return to <a href=\"/Account/dashboard/\">Dashboard</a>.');\n\t\tRedirect::toControllerMethod('Account', 'settings');\n\n\t}", "function ciniki_customers_addressUpdate(&$ciniki) {\n // \n // Find all the required and optional arguments\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'), \n 'customer_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Customer'), \n 'address_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Address ID'), \n 'address1'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Address Line 1'), \n 'address2'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Address Line 2'), \n 'city'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'City'), \n 'province'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Province/State'), \n 'postal'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Postal/Zip Code'), \n 'country'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Country'), \n 'latitude'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Latitude'), \n 'longitude'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Longitude'), \n 'phone'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Phone'), \n 'flags'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Flags'), \n 'address_flags'=>array('required'=>'no', 'default'=>'', 'blank'=>'yes', 'name'=>'Flags'), \n 'notes'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Notes'), \n )); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n $args = $rc['args'];\n \n // \n // Make sure this module is activated, and\n // check permission to run this function for this tenant\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'customers', 'private', 'checkAccess');\n $rc = ciniki_customers_checkAccess($ciniki, $args['tnid'], 'ciniki.customers.addressUpdate', $args['customer_id']); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n\n if( (!isset($args['flags']) || $args['flags'] == '') && isset($args['address_flags']) && $args['address_flags'] != '' ) {\n $args['flags'] = $args['address_flags'];\n }\n \n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbQuote');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQuery');\n\n //\n // Check the address ID belongs to the requested customer\n //\n $strsql = \"SELECT ciniki_customer_addresses.id, customer_id, \"\n . \"ciniki_customer_addresses.address1, \"\n . \"ciniki_customer_addresses.address2, \"\n . \"ciniki_customer_addresses.city, \"\n . \"ciniki_customer_addresses.province, \"\n . \"ciniki_customer_addresses.postal, \"\n . \"ciniki_customer_addresses.country, \"\n . \"ciniki_customer_addresses.latitude, \"\n . \"ciniki_customer_addresses.longitude, \"\n . \"ciniki_customer_addresses.phone, \"\n . \"ciniki_customer_addresses.flags \"\n . \"FROM ciniki_customers, ciniki_customer_addresses \"\n . \"WHERE ciniki_customer_addresses.id = '\" . ciniki_core_dbQuote($ciniki, $args['address_id']) . \"' \"\n . \"AND customer_id = '\" . ciniki_core_dbQuote($ciniki, $args['customer_id']) . \"' \"\n . \"AND customer_id = ciniki_customers.id \"\n . \"AND ciniki_customers.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.customers', 'address');\n if( $rc['stat'] != 'ok' ) { \n return $rc;\n }\n if( !isset($rc['address']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.customers.57', 'msg'=>'Access denied'));\n }\n $item = $rc['address'];\n\n $old_address = '';\n $old_address .= ($item['address1']!=''?($old_address!=''?', ':'').$item['address1']:'');\n $old_address .= ($item['address2']!=''?($old_address!=''?', ':'').$item['address2']:'');\n $old_address .= ($item['city']!=''?($old_address!=''?', ':'').$item['city']:'');\n $old_address .= ($item['province']!=''?($old_address!=''?', ':'').$item['province']:'');\n $old_address .= ($item['country']!=''?($old_address!=''?', ':'').$item['country']:'');\n $old_address .= ($item['phone']!=''?($old_address!=''?', ':'').$item['phone']:'');\n\n $new_address = '';\n if( isset($args['address1']) ) {\n $new_address .= ($args['address1']!=''?($new_address!=''?', ':'').$args['address1']:'');\n } else {\n $new_address .= ($item['address1']!=''?($new_address!=''?', ':'').$item['address1']:'');\n }\n if( isset($args['address2']) ) {\n $new_address .= ($args['address2']!=''?($new_address!=''?', ':'').$args['address2']:'');\n } else {\n $new_address .= ($item['address2']!=''?($new_address!=''?', ':'').$item['address2']:'');\n }\n if( isset($args['city']) ) {\n $new_address .= ($args['city']!=''?($new_address!=''?', ':'').$args['city']:'');\n } else {\n $new_address .= ($item['city']!=''?($new_address!=''?', ':'').$item['city']:'');\n }\n if( isset($args['province']) ) {\n $new_address .= ($args['province']!=''?($new_address!=''?', ':'').$args['province']:'');\n } else {\n $new_address .= ($item['province']!=''?($new_address!=''?', ':'').$item['province']:'');\n }\n if( isset($args['country']) ) {\n $new_address .= ($args['country']!=''?($new_address!=''?', ':'').$args['country']:'');\n } else {\n $new_address .= ($item['country']!=''?($new_address!=''?', ':'').$item['country']:'');\n }\n if( isset($args['phone']) ) {\n $new_address .= ($args['phone']!=''?($new_address!=''?', ':'').$args['phone']:'');\n } else {\n $new_address .= ($item['phone']!=''?($new_address!=''?', ':'').$item['phone']:'');\n }\n\n //\n // If the address has changed, and the latitude and longitude were not also updated,\n // then lookup the new address\n //\n // FIXME: This is broken, need to figure out google api from php.\n/* if( $new_address != $old_address \n && (!isset($args['latitude']) || $args['latitude'] == $item['latitude'])\n && (!isset($args['longitude']) || $args['longitude'] == $item['longitude'])\n ) {\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'geocodeAddressLookupLatLong');\n $rc = ciniki_core_geocodeAddressLookupLatLong($ciniki, $new_address);\n if( $rc['stat'] == 'ok' ) {\n $args['latitude'] = $rc['latitude'];\n $args['longitude'] = $rc['longitude'];\n }\n }\n*/\n\n //\n // Update the address\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectUpdate');\n $rc = ciniki_core_objectUpdate($ciniki, $args['tnid'], 'ciniki.customers.address', $args['address_id'], $args, 0x07);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Update the short_description\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'customers', 'private', 'customerUpdateShortDescription');\n $rc = ciniki_customers_customerUpdateShortDescription($ciniki, $args['tnid'], $args['customer_id'], 0x07);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Update the web index if enabled\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'hookExec');\n ciniki_core_hookExec($ciniki, $args['tnid'], 'ciniki', 'web', 'indexObject', array('object'=>'ciniki.customers.customer', 'object_id'=>$args['customer_id']));\n ciniki_core_hookExec($ciniki, $args['tnid'], 'ciniki', 'web', 'indexObject', array('object'=>'ciniki.customers.members', 'object_id'=>$args['customer_id']));\n ciniki_core_hookExec($ciniki, $args['tnid'], 'ciniki', 'web', 'indexObject', array('object'=>'ciniki.customers.dealers', 'object_id'=>$args['customer_id']));\n ciniki_core_hookExec($ciniki, $args['tnid'], 'ciniki', 'web', 'indexObject', array('object'=>'ciniki.customers.distributors', 'object_id'=>$args['customer_id']));\n\n return array('stat'=>'ok');\n}", "public function testUpdateChildAccountStatus()\n {\n }", "public function updateCurrencyAddress()\r\n {\r\n }", "public function update()\n {\n $table = $this->getTable();\n for($x=0;$x<count($table->fields);$x++)\n {\n $customer[$table->fields[$x]->name] = $this->input->post($table->fields[$x]->name);\n }\n $customers = $customer;\n\n\n $this->db->where($table->ID,$this->input->post($table->ID));\n $this->db->update($table->table,$customers);\n $this->createKeyJson();\n $data[\"data\"] = \"\";\n $data[\"status\"] = \"success\";\n $data[\"xhr\"] = \"\";\n $this->output->set_content_type('application/json');\n $this->output->set_output(json_encode($data));\n }", "function customersUpdate( $user )\n\t{\n\t\t$password\t\t\t\t= zen_encrypt_password( $user[ 'password' ] );\n\t\t$newsletter\t\t\t\t= ( $user[ 'module_sys_dmail_category' ] )\n\t\t\t\t\t\t\t\t\t? 1\n\t\t\t\t\t\t\t\t\t: 0;\n\t\t$emailFormat\t\t\t= ( $user[ 'module_sys_dmail_html' ] )\n\t\t\t\t\t\t\t\t\t? 'HTML'\n\t\t\t\t\t\t\t\t\t: 'TEXT';\n\n\t\t$user\t\t\t\t\t= $this->escapeArray( $user );\n\n\t\t$update\t\t\t\t\t= \"\n\t\t\tUPDATE zen_customers\n\t\t\tSET\n\t\t\t\tcustomers_firstname = '{$user[ 'first_name' ]}'\n\t\t\t\t, customers_lastname = '{$user[ 'last_name' ]}'\n\t\t\t\t, customers_dob = '{$user[ 'date_of_birth' ]}'\n\t\t\t\t, customers_email_address = '{$user[ 'email' ]}'\n\t\t\t\t, customers_telephone = '{$user[ 'telephone' ]}'\n\t\t\t\t, customers_fax = '{$user[ 'fax' ]}'\n\t\t\t\t, customers_password = '{$password}'\n\t\t\t\t, customers_newsletter = '{$newsletter}'\n\t\t\t\t, customers_email_format = '{$emailFormat}'\n\t\t\tWHERE\n\t\t\t\tcustomers_id = {$user[ 'customers_id' ]}\n\t\t\";\n\n\t\treturn $this->db->Execute( $update );\n\t}", "public function syncAccounts();", "public static function update_company(){\n\n\t\tsession_start();\n\n\t\t$user = $_SESSION['logged_user'];\n\t\t$userId = $user->id;\n\n\t\tView::set(\"user\", $user);\n\n\t\tif ( $_SESSION['role_user'] == \"manager\" && isset( $_POST['company_pbx'] ) ){\n\n\t\t\t$company = stripslashes( $_POST['company'] );\n\t\t\t$company_razon = stripslashes( $_POST['company_razon'] );\n\t\t\t$company_nit = stripslashes( $_POST['company_nit'] );\n\t\t\t$company_pais = stripslashes( $_POST['company_pais'] );\n\t\t\t$company_estado = stripslashes( $_POST['company_estados'] );\n\t\t\t$company_city = stripslashes( $_POST['company_city'] );\n\t\t\t$company_direcc = stripslashes( $_POST['company_direccion'] );\n\t\t\t$company_web = stripslashes( $_POST['company_web'] );\n\t\t\t$company_pbx = stripslashes( $_POST['company_pbx'] );\n\t\t\t$company_email = stripslashes( $_POST['company_email'] );\n\n\t\t\t$empresaId = $_SESSION['logged_user_empresaId'];\n\n\t\t\t$count = Company::update($empresaId, $company, $company_razon, $company_nit, \n\t\t\t\t\t$company_pais, $company_estado, $company_city, $company_direcc,\n\t\t\t\t\t$company_web, $company_pbx, $company_email);\n\n\t\t\t$tipoTransaccion = \"Usuario_Actualizar\";\n\t\t\tif ( $count == 1 ){\n\t\t\t\t$info = \"EMPRESA_ACTUALIZADA\";\n\t\t\t\tTransaccion::insertTransaccion($tipoTransaccion, \"Ok\", $userId, $_SESSION['role_user'], $_SESSION['logged_user_empresaId'] , $info);\n\n\t\t\t\t$updated_info = \"Datos de la Empresa actualizados.\";\n\n\t\t\t} else {\n\t\t\t\t$info = \"$empresaId, $company, $company_razon, $company_nit, $company_pais, $company_estado, $company_city, $company_direcc, $company_web, $company_pbx, $company_email, count_NOT_1: $count - EMPRESA_NO_ACTUALIZADA\";\n\t\t\t\tTransaccion::insertTransaccion($tipoTransaccion, \"Not_Ok\", $userId, $_SESSION['role_user'], $_SESSION['logged_user_empresaId'] , $info );\n\t\t\t}\n\t\t\t\n\t\t\tView::set(\"updated_info\", $updated_info);\n\n\t\t\t$empresa = Company::getEmpresaById( $empresaId );\n\t\t\tView::set(\"empresa\", $empresa);\n\n\t\t\t/* VISTA */\n\t\t\t$opcionMenu = \"actualizar_perfil\";\n\t\t\tView::set(\"opcionMenu\", $opcionMenu);\n\n\t\t\tView::set(\"pageTitle\", $_SESSION['logged_user_saludo'] . \" | Perfil Actualizado\");\n\n\t\t\tView::render( \"portal_manager_home\" );\n\t\t}\n\t}", "public function testUpdateCustomerSessionV2()\n {\n }", "function editCustomerInfo($customerSageNumber=null){\n\t\tif(!empty($this->group_permissions) && in_array(16,$this->group_permissions)){\n\t\t\t$customerInfo\t= '';\n\t\t\tif(!empty($customerSageNumber)){\n\t\t\t\t$customerInfo\t= getAllCustomers($customerSageNumber,'all','all','all','all',0,1);\n\t\t\t}\n\t\t\t//dump($customerInfo);die;\n\t\t\tif(empty($customerInfo[0])){\n\t\t\t\tredirect('customers');\n\t\t\t}\n\t\t\t$postData\t= $this->input->post();\n\t\t\tif(!empty($postData)){\n\t\t\t\t$response\t= addUpdateCustomer($postData);\n\t\t\t\t//dump($response);die;\n\t\t\t\tif(!empty($response)){\n\t\t\t\t\t$message='<div class=\"alert alert-block alert-success\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\"><i class=\"ace-icon fa fa-times\"></i></button><p>Account updated successfully.</p></div>';\n\t\t\t\t\t$this->session->set_flashdata('message',$message);\n\t\t\t\t\tredirect('customers');\n\t\t\t\t}\n\t\t\t}\n\t\t\t$data['js']\t\t= array('jquery-min','jquery-ui','jquery.selectBoxIt','jquery.tokenize','jquery.mCustomScrollbar','parsley.min','parsley-fields-comparison-validators','jquery.table2excel','jquery-customselect-1.9.1.min','bootstrap','pop-up-model'); \n\t\t\t$data['css']\t= array('common','index','jquery-ui','jquery.mCustomScrollbar','jquery-customselect-1.9.1','font-awesome.min','bootstrap','pop-up-model');\n\t\t\t$data['title']\t= 'account';\n\t\t\t$data['customerInfo']\t= $customerInfo[0];\n\t\t\t$data['countries']\t\t= getAllCountry();\n\t\t\t$this->load->view('frontend/update_customer', $data);\n\t\t}else{\n\t\t\t$message='<div class=\"alert alert-block alert-danger\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\"><i class=\"ace-icon fa fa-times\"></i></button><p>'.$this->NotAuthorizedMsg.'</p></div>';\n\t\t\t$this->session->set_flashdata('message',$message);\n\t\t\tredirect('customers');\n\t\t}\n\t}", "public function update() {\n\t\t// has anything been submitted?\n\t\tif (empty($this->data)) {\n\t\t\t$this->redirect('/accounts');\n\t\t}\n\t\t\n\t\t// pull out the account ID and the post content\n\t\t$id = $this->data['Account']['uaid'];\n\t\t$post = $this->data['Account']['status'];\n\t\t\n\t\t// get the account properties\n\t\t$account = $this->findAccount($id);\n\t\tif (!$account) {\n\t\t\t$this->redirect('/accounts');\n\t\t} else if (strlen($post) == 0) {\n\t\t\t$this->redirect('view/' . $id);\n\t\t}\n\t\t// reset the oauth object so we have the OAuth tokens\n\t\t$this->$account['Account']['accountname']->reset($account['Account']['oauth_token'], \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$account['Account']['oauth_token_secret']);\n\t\t// submit the post!\n\t\t$retval = $this->$account['Account']['accountname']->updateStatus($account['Account']['account_uid'], $post);\n\t\t\n\t\t// redirect the user back to the view for this network\n\t\t$this->redirect(array('action' => 'view', $id));\n\t}", "function modifica_myAccount($id, $nome, $cognome, $codfiscale, $indirizzo, $telefono, $email, $pass, $rag_sociale, $piva, $attivita, $descrizione, $pagamento, $limite_spesa, $nome_azienda, $dati_contatto, $minuti_attesa, $fornitore, $principale){\n\n if($fornitore == 1) {\n $minuti = \", minuti_attesa=\".$minuti_attesa.\"\";\n } else {\n $minuti = \"\";\n }\n\n\t$query = \"\n\t UPDATE Users\n\t SET nome='\".$nome.\"', cognome='\".$cognome.\"', codfiscale='\".$codfiscale.\"', indirizzo='\".mysql_real_escape_string($indirizzo).\"', telefono='\".$telefono.\"', email='\".$email.\"',\n\t password='\".$pass.\"', dati_contatto='\".$dati_contatto.\"'\".$minuti.\"\n\t WHERE id=\".$id;\n\t$r = mysql_query($query) or die(mysql_error());\n\t$affected = mysql_affected_rows(); //restituisce il numero di righe aggiornate, -1 indica un errore\n\n\tif($principale == 1) {\n\n $query_ = \"UPDATE Aziende\n\t SET nome_azienda='\".$nome_azienda.\"', ragione_sociale='\".$rag_sociale.\"', tipo_attivita='\".$attivita.\"', descrizione='\".$descrizione.\"', modalita_pagamento='\".$pagamento.\"',\n\t limite_spesa='\".$limite_spesa.\"'\n\t WHERE partita_iva='\".$piva.\"'\";\n $r_ = mysql_query($query_) or die(mysql_error());\n $affected = mysql_affected_rows();\n\t}\n\tif($affected >= 0){\n\t return true;\n\t} else {\n\t return false;\n\t}\n}", "function update_account($username, $data){\n $this->db->where('username', $username);\n $query = $this->db->update('tbl_user', $data);\n }", "function wc_customer_edit_account_url()\n {\n }", "function update()\n\t{\n\t\tglobal $cmn;\n\t\t$strquery='UPDATE '.DB_PREFIX.'client SET \n\t\t\t\t\tcompany_name\t\t\t= \\''.$this->company_name.'\\',\n\t\t\t\t\tmain_location\t\t= \\''.$this->main_location.'\\',\n\t\t\t\t\taddress\t\t= \\''.$this->address.'\\',\n\t\t\t\t\tstreet\t= \\''.$this->street.'\\',\n\t\t\t\t\tcity\t\t\t= \\''.$this->city.'\\',\n\t\t\t\t\tzip\t\t= \\''.$this->zip.'\\',\n\t\t\t\t\tstate\t\t= \\''.$this->state.'\\',\n\t\t\t\t\tcountry\t= \\''.$this->country.'\\',\n\t\t\t\t\temail\t\t\t= \\''.$this->email.'\\',\n\t\t\t\t\tprimary_phone\t\t\t= \\''.$this->primary_phone.'\\',\n\t\t\t\t\tsecondary_phone\t\t= \\''.$this->secondary_phone.'\\',\n\t\t\t\t\tfax\t\t= \\''.$this->fax.'\\',\n\t\t\t\t\tnote\t= \\''.$this->note.'\\',\n\t\t\t\t\tcase_policies\t\t\t= \\''.$this->case_policies.'\\',\n\t\t\t\t\tinvoice_policies\t\t= \\''.$this->invoice_policies.'\\',\n\t\t\t\t\tupdated_date= NOW(),\n\t\t\t\t\tupdated_by\t= \\''.$cmn->get_session(ADMIN_USER_ID).'\\',\n\t\t\t\t\tstatus\t\t= \\'active\\'\n\t\t\t\t\tWHERE id\t\t= '.$this->id;\n\n\t\treturn mysql_query($strquery) or die(mysql_error());\t\n\t}", "public function update(Request $request)\n {\n //\n\t\tDB::table('customer')->where('CUSTOMER_ID',$request->idcus)->update([\n\t\t\t'FIRST_NAME' => $request->firstcus,\n\t\t\t'LAST_NAME' => $request->lastcus,\n\t\t\t'PHONE' => $request->phonecus,\n\t\t\t'EMAIL' => $request->emailcus,\n\t\t\t'STREET' => $request->streetcus,\n\t\t\t'CITY' => $request->citycus,\n\t\t\t'STATE' => $request->statecus,\n\t\t\t'ZIP_CODE' => $request->zccus,\n\t\t\t'CUSTOMER_STATUS' => $request->cuss\n\t\t]);\n\t\t// alihkan halaman ke halaman pegawai\n\t\treturn redirect('CustomerIndex');\n }", "public function update()\n {\n $updateAccount = new UpdateAccount();\n if ($updateAccount->execute()) {\n return new RedirectResponse('/admin/accounts');\n }\n\n return $this->edit();\n }", "public function updateAccount($conn, $surname, $lastname, $email, $id){\r\n $sth = $conn->prepare(\"update utente set nome = :surname, cognome = :lastname, email = :email where id = :id\");\r\n $sth->bindParam(':id', $id, PDO::PARAM_INT);\r\n $sth->bindParam(':email', $email, PDO::PARAM_STR);\r\n $sth->bindParam(':surname', $surname, PDO::PARAM_STR);\r\n $sth->bindParam(':lastname', $lastname, PDO::PARAM_STR);\r\n $sth->execute();\r\n\r\n }", "public function updateAccountInformation(UpdateAccountInformation $newAccountInformation): AccountInformation;", "function ciniki_poma_customerLedgerUpdate(&$ciniki) {\n //\n // Find all the required and optional arguments\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'),\n 'entry_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Customer Ledger Entry'),\n 'customer_id'=>array('required'=>'no', 'blank'=>'no', 'name'=>'Customer'),\n 'order_id'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Order'),\n 'transaction_type'=>array('required'=>'no', 'blank'=>'no', 'name'=>'Type'),\n 'transaction_date_date'=>array('required'=>'no', 'blank'=>'no', 'type'=>'date', 'name'=>'Date'),\n 'transaction_date_time'=>array('required'=>'no', 'blank'=>'no', 'type'=>'time', 'name'=>'Date'),\n 'source'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Source'),\n 'description'=>array('required'=>'no', 'blank'=>'no', 'name'=>'Description'),\n 'customer_amount'=>array('required'=>'no', 'blank'=>'no', 'type'=>'currency', 'name'=>'Customer Amount'),\n 'transaction_fees'=>array('required'=>'no', 'blank'=>'yes', 'type'=>'currency', 'name'=>'Transaction Fees'),\n 'tenant_amount'=>array('required'=>'no', 'blank'=>'no', 'type'=>'currency', 'name'=>'Tenant Amount'),\n 'balance'=>array('required'=>'no', 'blank'=>'no', 'name'=>'Balance'),\n 'notes'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Notes'),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args = $rc['args'];\n\n //\n // Make sure this module is activated, and\n // check permission to run this function for this tenant\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'poma', 'private', 'checkAccess');\n $rc = ciniki_poma_checkAccess($ciniki, $args['tnid'], 'ciniki.poma.customerLedgerUpdate');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\nreturn array('stat'=>'fail', 'err'=>array('code'=>'ciniki.poma.112', 'msg'=>'Not yet implemented'));\n\n //\n // Start transaction\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionStart');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionRollback');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionCommit');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbAddModuleHistory');\n $rc = ciniki_core_dbTransactionStart($ciniki, 'ciniki.poma');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Update the Customer Ledger Entry in the database\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectUpdate');\n $rc = ciniki_core_objectUpdate($ciniki, $args['tnid'], 'ciniki.poma.customerledger', $args['entry_id'], $args, 0x04);\n if( $rc['stat'] != 'ok' ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.poma');\n return $rc;\n }\n\n //\n // Update account balances\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'poma', 'private', 'accountUpdate');\n $rc = ciniki_poma_accountUpdate($ciniki, $args['tnid'], array('customer_id'=>$args['customer_id']));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Commit the transaction\n //\n $rc = ciniki_core_dbTransactionCommit($ciniki, 'ciniki.poma');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Update the last_change date in the tenant modules\n // Ignore the result, as we don't want to stop user updates if this fails.\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'tenants', 'private', 'updateModuleChangeDate');\n ciniki_tenants_updateModuleChangeDate($ciniki, $args['tnid'], 'ciniki', 'poma');\n\n return array('stat'=>'ok');\n}", "public function updateProfileContactInformation()\n {\n $this->resetErrorBag();\n $user = Auth::user();\n $user->facebook = $this->state['facebook'];\n $user->instagram = $this->state['instagram'];\n $user->save();\n $this->emit('saved');\n $this->emit('refresh-navigation-menu');\n }", "public function update()\n\t{\n\t\t$this->user->db_update();\n\t}", "public function updated(Customer $customer)\n {\n if($customer -> isDirty('databond_source_id')) {\n $response = DataBondService ::dataBondLogin();\n $bearerToken = json_decode($response) -> data;\n try {\n (new DataBondService) -> setBearerToken($bearerToken) -> addDataBondRateClient($customer -> databond_client_id, $customer -> databond_source_id);\n } catch (Exception $e) {\n Log ::critical($e -> getMessage());\n }\n }\n }", "public function update(Request $request, Customers $customers)\n {\n DB::table('customers')\n ->where('id',$request->id)\n ->update([\n 'name' => $request->name,\n 'l_name' => $request->lname,\n 'email' => $request->email\n ]);\n return back();\n }", "public function processAccountUpdate(AccountUpdate $request)\n {\n $data = $request->except(['_token', 'id']);\n $twoFactor = $this->currentUser->getTwoFactor();\n\n if (isset($data['password'])) {\n $data['password'] = bcrypt($data['password']);\n }\n\n $emailVerification = $data['email'] != $this->currentUser->email ? [\n 'email_verified' => false,\n 'email_verified_at' => null\n ] : [];\n\n $phoneVerification = $data['phone'] != $this->currentUser->phone ? [\n 'phone_verified' => false,\n 'phone_verified_at' => null\n ] : [];\n\n $countryVerification = $data['country'] !== $this->currentUser->country;\n\n if ($phoneVerification || $countryVerification) {\n array_set($twoFactor, 'phone.enabled', false);\n }\n\n $this->users->update($request->get('id'), $data + $emailVerification + $phoneVerification + $twoFactor);\n\n return intend([\n 'back' => true,\n 'with' => [\n 'rinvex.fort.alert.success' => Lang::get('rinvex.fort::message.account.'.(! empty($emailVerification) ? 'reverify' : 'updated')),\n ] + ($twoFactor !== $this->currentUser->getTwoFactor() ? ['rinvex.fort.alert.warning' => Lang::get('rinvex.fort::message.verification.twofactor.phone.auto_disabled')] : []),\n ]);\n }", "public function update()\n {\n $data = [\n 'first_name' => \"Code\",\n 'last_name' => \"Gorilla\",\n 'email' => \"toby@codegorilla.nl\",\n 'password' => \"q3234234q3213^^!^w23123\",\n 'birthday' => \"1990-12-31\",\n 'created' => date(\"Y-m-d H:i:s\"),\n ];\n\n UserModel::update($data, 1);\n }", "public function update(Request $request)\n {\n $account = Account::find($request->account_id); //form id \n $account->account_name = $request->account_name; \n \t$account->save();\n\n return redirect('/admin/account/manage')->with('message','Store Updated Successfully.'); \n }", "public function testUpdate()\n {\n $id = $this->tester->grabRecord('common\\models\\Curtidas', ['id_user'=>1]);\n $user = Curtidas::findOne($id);\n $user->status = 1;\n $user->update();\n $this->tester->seeRecord('common\\models\\Curtidas', ['id_user' => 1,'status'=> 1]);\n }", "function update($id) {\n //Set the page body\n $this->data['pagebody'] = 'ar/manage';\n //Get the record we want to update\n $record = $this->customers->get_array($id);\n //Merge with working set\n $this->data = array_merge($this->data, $record);\n //Set the function that will be called with ok button\n $this->data['function'] = 'update_customer';\n $this->render();\n }", "function update_account($conn, $db, $accountid, $firstname, $lastname, $phone) {\n\t//sql statement to be executed\n\t\t$sql = \"update tbl_account set FirstName = '$firstname',Surname = '$lastname', Phone = '$phone' where accountid=$accountid\";\n\t\t//this executes the above sql statement\n\t\t$result = mysqli_query($conn, $sql);\n\t\t//return the success\n\t\treturn '<div class=\"alert alert-success alert-dismissable\"> record updated</div>';\n\n}", "public function vUpdateUser(){\n\t\t$oDB = self::oDB(self::$sDBName);\n\t\t$oCurrentUser = self::$session->get('oCurrentUser');\n\t\ttry{\n\t\t\t$oDB->vBegin();\n\t\t\tparent::vUpdateUser();\n\t\t\t$aValues = array(\t'dept_no'=>$this->iDeptNo,\n\t\t\t\t\t\t\t\t'status'=>$this->bStatus\n\t\t\t\t\t\t\t\t);\n\t\t\t$oDB->sUpdate(\"`galaxy_user_iwant`\", array_keys($aValues), array_values($aValues), \"`user_no` = {$this->iUserNo}\");\n\t\t\t$oDB->vCommit();\n\t\t\t$oCurrentUser->vAddUserLog(\"galaxy_user_iwant\",$this->iUserNo,'user_iwant','edit');\n\t\t}catch (Exception $e){\n\t\t\t$oDB->vRollback();\n\t\t\tthrow new Exception(\"CUserIwant->vUpdateUser: \".$e->getMessage());\n\t\t}\n\t}", "public function testUpdateCustomerInvoiceByInvoiceId()\n {\n }", "public function update($data){\n\t\t//$siteid = $this->member->getSiteId();\n\t\t$firstname = $this->db->escape(@$data['firstname']);\n\t\t$lastname = $this->db->escape(@$data['lastname']);\n\t\t$birthdate = $this->date->formatViewDate($this->db->escape(@$data['birthdate']));\n\t\t$birthplace = $this->db->escape(@$data['birthplace']);\n\t\t$telephone = $this->db->escape(@$data['telephone']);\n\t\t$identification = $this->db->escape(@$data['identification']);\n\t\t$address = $this->db->escape(@$data['address']);\n\t\t$issuedate = $this->date->formatViewDate($this->db->escape(@$data['issuedate']));\n\t\t$gender = $this->db->escape(@$data['gender']);\n $customertype = $this->db->escape(@$data['customertype']);\n\n\t\t$field = array(\n\t\t\t\t\t\t'`firstname`',\n\t\t\t\t\t\t'`lastname`',\n\t\t\t\t\t\t'`birthdate`',\n\t\t\t\t\t\t'`birthplace`',\n\t\t\t\t\t\t'`telephone`',\n\t\t\t\t\t\t'`identification`',\n\t\t\t\t\t\t'`address`',\n\t\t\t\t\t\t'`issuedate`',\n\t\t\t\t\t\t'`gender`',\n '`customertype`'\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t$value = array(\n\t\t\t\t\t\t$firstname,\n\t\t\t\t\t\t$lastname,\n\t\t\t\t\t\t$birthdate,\n\t\t\t\t\t\t$birthplace,\n\t\t\t\t\t\t$telephone,\n\t\t\t\t\t\t$identification,\n\t\t\t\t\t\t$address,\n\t\t\t\t\t\t$issuedate,\n\t\t\t\t\t\t$gender,\n $customertype\n\t\t\t\t\t);\n\t\t\n\t\t$where = \" customerid = '\" . $data['customerid'] . \"'\";\n\t\t$this->db->updateData(\"customer\", $field, $value,$where);\n\t}", "public function editCustomer(){\n\t}", "public function updateCustomer(Varien_Event_Observer $observer)\n {\n $customer = Mage::getSingleton('customer/session')->getCustomer();\n $event = $observer->getEvent()->setCustomer($customer);\n \n $this->setCustomer($observer);\n \n return;\n }", "public function update_billing_entry($data, $customer_id)\n {\n $this->db->where('customer_id', $customer_id);\n $this->db->update('customer_information', $data);\n }", "public function update(Request $request, Customer $customers)\n {\n //\n }" ]
[ "0.7563341", "0.70631444", "0.6922764", "0.67650896", "0.6622127", "0.64717555", "0.63193065", "0.62966424", "0.6296518", "0.62888926", "0.6258954", "0.6256669", "0.6206238", "0.61698675", "0.61570954", "0.6146159", "0.6136283", "0.6070302", "0.6054365", "0.604682", "0.6015271", "0.6010715", "0.6002444", "0.5991976", "0.5975302", "0.59519655", "0.59491605", "0.5949061", "0.59456116", "0.5934996", "0.593056", "0.5929152", "0.5899755", "0.5887733", "0.5882604", "0.58744276", "0.5853557", "0.58441323", "0.582442", "0.5820484", "0.58187574", "0.5811741", "0.5811741", "0.58099496", "0.58024067", "0.57926095", "0.5776259", "0.5764664", "0.57557446", "0.5740093", "0.5735716", "0.5730941", "0.5730615", "0.5727787", "0.57264966", "0.57253283", "0.57218015", "0.5711409", "0.57096297", "0.5702907", "0.56989247", "0.56860185", "0.5685274", "0.56639457", "0.5647597", "0.5640359", "0.5637248", "0.56346744", "0.56083804", "0.56076896", "0.56049013", "0.56018996", "0.5598562", "0.5592729", "0.55835086", "0.5579654", "0.5577503", "0.5560767", "0.5554677", "0.5551091", "0.55439866", "0.55433834", "0.55431753", "0.5539194", "0.553134", "0.55264705", "0.55187535", "0.5517034", "0.55143553", "0.55129665", "0.5512112", "0.5510902", "0.5508309", "0.5503745", "0.55013216", "0.5500311", "0.5499443", "0.54985774", "0.54974484", "0.54963243" ]
0.72937846
1
Calculates and returns current GMT offset
Вычисляет и возвращает текущий смещение по Гринвичу
public static function getGmtOffset() { $gmtOffset = date('Z') / 60 / 60; $gmtOffset = round($gmtOffset); return $gmtOffset; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getGmtOffset()\n\t{\n\t\treturn $this->gmt_offset;\n\t}", "function get_gmt_offset( $timezone = false ){\n\tif( $timezone == false ){\n\t\t$timezone = date_default_timezone_get();\n\t}\n\t\n\treturn get_timezone_offset( $timezone, 'UTC' );\n\t\n}", "function getServerTimeZoneOffset()\n{\n return date(\"O\") / 100 * 60 * 60; // Seconds from GMT\n}", "public static function get_time_offset() {\n\t\t\t$self = self::get_instance();\n\n\t\t\treturn $self->current_time - $self->current_time_gmt;\n\t\t}", "public static function getTimezoneOffset()\n {\n return + 2 * 60;\n }", "function getLocalTimeZoneOffset($tz)\n{\n return getTimeZone($tz) / 100 * 60 * 60; // Seconds from user GMT\n}", "protected static function get_local_timezone_offset() {\n\t\t$timezone = get_option( 'timezone_string' );\n\n\t\tif ( $timezone ) {\n\t\t\t$timezone_object = new DateTimeZone( $timezone );\n\t\t\treturn $timezone_object->getOffset( new DateTime( 'now' ) );\n\t\t} else {\n\t\t\treturn floatval( get_option( 'gmt_offset', 0 ) ) * HOUR_IN_SECONDS;\n\t\t}\n\t}", "function learn_press_timezone_offset() {\n\tif ( $tz = get_option( 'timezone_string' ) ) {\n\t\t$timezone = new DateTimeZone( $tz );\n\n\t\treturn $timezone->getOffset( new DateTime( 'now' ) );\n\t} else {\n\t\treturn floatval( get_option( 'gmt_offset', 0 ) ) * HOUR_IN_SECONDS;\n\t}\n}", "function tve_ult_gmt_offset() {\n\t$gmt_offset = get_option( TVE_Ult_Const::SETTINGS_TIME_ZONE_OFFSET );\n\n\treturn false === $gmt_offset ? get_option( 'gmt_offset' ) : $gmt_offset;\n}", "public function getTimeZoneOffset()\n {\n return $this->time_zone->getOffset($this->local_date_time);\n }", "function wc_timezone_offset()\n {\n }", "public function timezone_offset() {\n\t\treturn $this->formatted('z');\n\t}", "function getCurrentTimeZoneOffset()\n{\n if (Auth::user()->isOpenAPIUser()) {\n return \\Carbon\\Carbon::now('UTC')->format('P');\n } \n \n return \\Carbon\\Carbon::now(Settings::get('TIME_ZONE'))->format('P');\n}", "function time_offset() {\n\t\treturn time() - $this->time();\n\t}", "public function getTimeZoneOffset()\n {\n if (null === $this->offset) {\n $time = new \\DateTime('now', new \\DateTimeZone($this->localeSettings->getTimeZone()));\n $this->offset = $time->format('P');\n }\n\n return $this->offset;\n }", "function getOffset()\n {\n \n $utcOffsetInSeconds=date(\"Z\",$curTime);\n $utcOffsetHours=intval($utcOffsetInSeconds/3600);\n $utcOffsetMinutes=($utcOffsetInSeconds%3600)/60;if(strlen($utcOffsetMinutes)<2)$utcOffsetMinutes=\"0\".$utcOffsetMinutes;\n\n if($utcOffsetHours>0)\n {// offset is a + value\n $utcOffsetPrefix=\"+\";\n }\n else\n {// offset is a - value\n $utcOffsetHours=$utcOffsetHours*(-1);\n $utcOffsetPrefix=\"-\";\n }\n $utcOffsetHours=substr(\"0\".$utcOffsetHours,strlen(\"0\".$utcOffsetHours)-2); echo $utcOffsetPrefix.$utcOffsetHours.\":\".$utcOffsetMinutes.\"<---------------\";\n return $utcOffsetPrefix.$utcOffsetHours.\":\".$utcOffsetMinutes;\n }", "function cpro_get_offset_by_time_zone( $local_timezone ) {\r\n\t\t$time = new DateTime( gmdate( 'Y-m-d H:i:s' ), new DateTimeZone( $local_timezone ) );\r\n\t\treturn $time->format( 'P' );\r\n\t}", "protected function getGMT() {\r\n return gmdate ( 'D, d M Y H:i:s' ) . ' GMT';\r\n }", "protected function getGMT()\n {\n return gmdate('D, d M Y H:i:s') . ' GMT';\n }", "protected function getGMT()\n {\n return gmdate('D, d M Y H:i:s') . ' GMT';\n }", "function timeZoneOffset() : int {\n\tstatic $ot;\n\tif ( isset( $ot ) ) {\n\t\treturn $ot;\n\t}\n\t\n\t// Timezone from configuration\n\t$tz = config( 'timezone', \\TIMEZONE );\n\t$dt = new \\DateTime( 'now', new \\DateTimeZone( 'UTC' ) );\n\ttry {\n\t\t$dz = new \\DateTimeZone( $tz );\n\t\t$ot = $dz->getOffset( $dt );\n\t\t\n\t} catch( \\Exception $e ) { // Default fallback\n\t\t$dz = new \\DateTimeZone( 'America/New_York' );\n\t\t$ot = $dz->getOffset( $dt );\n\t}\n\t\n\t$ot = ( false === $ot ) ? 0 : $ot;\n\treturn $ot;\n}", "public function getDepartureTimeZoneGmtOffset() {\n return $this->departureTimeZoneGmtOffset;\n }", "function get_timezone_offset_from_gmt_based_on_iana_timezone_name($timezone_name){\n $now = new DateTime(null, new DateTimeZone($timezone_name));\n\t$timezone_offset_from_gmt = $now->getOffset();\n return $timezone_offset_from_gmt;\n}", "function getTimeZoneOffset($timeZone)\n{\n $dateTimeZoneUTC = new DateTimeZone(\"UTC\");\n $dateTimeZoneCurrent = new DateTimeZone($timeZone);\n\n $dateTimeUTC = new DateTime(\"now\", $dateTimeZoneUTC);\n $dateTimeCurrent = new DateTime(\"now\", $dateTimeZoneCurrent);\n\n $offset = (($dateTimeZoneCurrent->getOffset($dateTimeUTC))/60);\n return $offset;\n}", "function cpro_get_gmt_difference( $time_zone ) {\r\n\r\n\tif ( ! empty( $time_zone ) ) {\r\n\t\t$time_zone_kolkata = new DateTimeZone( 'Asia/Kolkata' );\r\n\t\t$tzone = new DateTimeZone( $time_zone );\r\n\r\n\t\t$time_kolkata = new DateTime( 'now', $time_zone_kolkata );\r\n\r\n\t\t$time_offset = $tzone->getOffset( $time_kolkata );\r\n\r\n\t\treturn $time_offset / 3600;\r\n\t} else {\r\n\t\treturn 'NULL';\r\n\t}\r\n}", "function getTimeZone($tz)\n{\n return \"+0900\"; // Perth in DST\n}", "function Clock_getTimeOffset($dest){\n \ttry{\n \t\t$destTimezone = new DateTimeZone($dest);\n \t}catch (Exception $e){\n \t\treturn \"Unkown or bad timezone!\";\n \t}\n\n \t\t$UTCTimezone = new DateTimeZone(\"UTC\");\n\t\t\t\n\t\t\t$destTime = new DateTime(\"now\",$destTimezone);\n\t\t\t$UTCTime = new DateTime(\"now\",$UTCTimezone);\n\n\t\t\t$UTCOffset = $UTCTimezone->getOffset($UTCTime);\n\t\t\t$destOffset = $destTimezone->getOffset($destTime);\n\n\t\t\t$diff = $destOffset - $UTCOffset; \n\n\t\t\treturn $diff/3600;\n \t\n\t}", "function timezone_offset($offset)\r\n\t{\r\n\t\t$hours = $offset / 3600;\r\n\t\t$remainder = $offset % 3600;\r\n\t\t$sign = $hours > 0 ? '+' : '-';\r\n\t\t$hour = (int)abs($hours);\r\n\t\t$minutes = (int) abs($remainder / 60);\r\n\t\tif ($hour == 0 AND $minutes == 0)\r\n\t\t{\r\n\t\t\t$sign = ' ';\r\n\t\t}\r\n\t\treturn 'GMT' . $sign . str_pad($hour, 2, '0', STR_PAD_LEFT) . ':' . str_pad($minutes, 2, '0');\r\n\t}", "function getServerTimeOffset() {\n\t$ini_array = parse_ini_file(\"config.ini.php\", true);\n\t$server_time_offset = floatval($ini_array['global_info']['server_time_offset']);\n\t//default to PST for no good reason ;)\n return ($server_time_offset == null) ? -8 : $server_time_offset;\n}", "function get_local_time_from_GMT($date) {\n if(!isset($_SESSION['timezone'])) return $date;\n\n $local_date = date_create($date, timezone_open('GMT'));\n date_timezone_set($local_date, timezone_open($_SESSION['timezone']));\n return date_format($local_date, \"Y-m-d H:i:s\");\n }", "public function getTimeZone();", "public function getTimeZone();", "public function getTimeZone();", "function getCurrentDateTime() {\n\t\t$timezone = 0; //(GMT -5:00) EST (U.S. & Canada) \n\t $currentDateTime = gmdate(\"Y-m-d\\TH:i:s\\Z\", time() + 3600*($timezone+date(\"I\"))); \n\t\treturn $currentDateTime;\n\t}", "function wp_timezone_override_offset()\n{\n}", "function ConvertGMTToLocalTimezone($gmttime, $timezoneRequired){\n $system_timezone = date_default_timezone_get();\n\n date_default_timezone_set(\"GMT\");\n $gmt = date(\"Y-m-d h:i:s A\");\n\n $local_timezone = $timezoneRequired;\n date_default_timezone_set($local_timezone);\n $local = date(\"Y-m-d h:i:s A\");\n\n date_default_timezone_set($system_timezone);\n $diff = (strtotime($local) - strtotime($gmt));\n\n $date = new DateTime($gmttime);\n $date->modify(\"+$diff seconds\");\n\n return $date;\n}", "public static function gmtNow()\n {\n $TimeZone = new DateTimeZone(\"GMT\");\n $Result = new Phpr_DateTime(null, $TimeZone);\n $Result->setInteger(time() * (Phpr_DateTime::intInSecond) + Phpr_DateTime::timestampOffset);\n return $Result;\n }", "public function timezone() {\n\t\treturn $this->format('e');\n\t}", "public function get_utcOffset(): int\n {\n // $res is a int;\n if ($this->_cacheExpiration <= YAPI::GetTickCount()) {\n if ($this->load(YAPI::$_yapiContext->GetCacheValidity()) != YAPI::SUCCESS) {\n return self::UTCOFFSET_INVALID;\n }\n }\n $res = $this->_utcOffset;\n return $res;\n }", "protected function getCurrentDateTime()\n {\n return ($this->timeZone->getOffset(new DateTime()) + time(\n )) * (Phpr_DateTime::intInSecond) + Phpr_DateTime::timestampOffset;\n }", "function getTodayOffset() {\n return $this->getAdditionalProperty('today_offset', time());\n }", "public function timestamp() {\n\t\t$offset = (int) parent::format('Z');\n\t\tif ($offset) {\n\t\t\tif (0 > $offset) $offset *= -1;\n\t\t\t$offset %= 3600;\n\t\t\tif (0 == $offset) $offset = 3600;\n\t\t}\n\t\treturn (int) parent::format('U') + (((int) $this->dst()) * $offset);\n\t}", "public function getTimezoneOffsetSeconds()\n {\n return $this->_date->getGmtOffset();\n }", "public function getOffset()\r\n\t{\r\n\t\treturn $this->date->getOffset();\r\n\t}", "public function getTimeZone()\n {\n $timezone = $this->cm->get(self::CONFIG_TIMEZONE_KEY);\n\n $result = '+00:00';\n if ($timezone) {\n $date = new \\DateTime('now', new \\DateTimeZone($timezone));\n\n $result = $date->format('P');\n }\n\n return $result;\n }", "function utc($date = '', $format = '', $org_id = '', $offset = 0)\n\t{\n\t\treturn self::format($date, $format, $offset - self::timezone($org_id));\n\t}", "function get_timezone_offset($remote_tz, $origin_tz = null) {\r\n if($origin_tz === null) {\r\n if(!is_string($origin_tz = date_default_timezone_get())) {\r\n return false; // A UTC timestamp was returned -- bail out!\r\n }\r\n }\r\n\r\n $origin_dtz = new DateTimeZone($origin_tz);\r\n $remote_dtz = new DateTimeZone($remote_tz);\r\n $origin_dt = new DateTime(\"now\", $origin_dtz);\r\n $remote_dt = new DateTime(\"now\", $remote_dtz);\r\n $offset = $origin_dtz->getOffset($origin_dt) - $remote_dtz->getOffset($remote_dt);\r\n return $offset;\r\n}", "public static function filterOffsetForCurrentGMTOffset($timezone = NULL, $dateTime = NULL)\n {\n //GMT due date is a day ahead of the due date in their timezone. When we're returning tasks\n //for a section in those timezones, we need to add an offset to the filter dates to capture tasks\n //with no due date that are due in the correct time frame. This does create a bug in those timezones\n //where tasks due at midnight (or 1 a.m. in GMT +13 zones) will show up a section too soon, but it's\n //better than what we have now where due dates don't work at all.\n \n if($timezone == NULL)\n $timezone = new DateTimeZone(date_default_timezone_get());\n \n if($dateTime == NULL)\n $dateTime = new DateTime();\n \n $offset = $timezone->getOffset($dateTime);\n \n if($offset/3600 >= 12)\n {\n return $offset - 43199; //43199 is one less than the number of seconds between gmt and gmt+12\n }\n return 0;\n }", "function getGMTSeconds($stamp, $tzc) {\n /* date couldn't be parsed */\n if ($stamp == -1) {\n return -1;\n }\n /* timezone correction, expressed as `shhmm' */\n switch($tzc)\n {\n case 'Pacific':\n case 'PST':\n $tzc = '-0800';\n break;\n case 'Mountain':\n case 'MST':\n case 'PDT':\n $tzc = '-0700';\n break;\n case 'Central':\n case 'CST':\n case 'MDT':\n $tzc = '-0600';\n break;\n case 'Eastern':\n case 'EST':\n case 'CDT':\n $tzc = '-0500';\n break;\n case 'EDT':\n $tzc = '-0400';\n break;\n case 'GMT':\n $tzc = '+0000';\n break;\n case 'BST':\n case 'MET':\n case 'CET':\n $tzc = '+0100';\n break;\n case 'EET':\n case 'IST':\n case 'MET DST':\n case 'METDST':\n\tcase 'MEST':\n\tcase 'CEST':\n $tzc = '+0200';\n break;\n case 'HKT':\n $tzc = '+0800';\n break;\n case 'JST':\n case 'KST':\n $tzc = '+0900';\n break;\n }\n $neg = false;\n if (substr($tzc, 0, 1) == '-') {\n $neg = true;\n } else if (substr($tzc, 0, 1) != '+') {\n $tzc = '+'.$tzc;\n }\n $hh = substr($tzc,1,2);\n $mm = substr($tzc,3,2);\n $iTzc = ($hh * 60 + $mm) * 60;\n if ($neg) $iTzc = -1 * (int) $iTzc;\n /* stamp in gmt */\n $stamp -= $iTzc;\n /* now find what the server is at */\n $current = date('Z', time());\n /* stamp in local timezone */\n $stamp += $current;\n\n return $stamp;\n}", "public function getTimeZoneOffset(): TimeZoneOffset\n {\n return $this->timeZoneOffset;\n }", "public function getOffset()\n {\n if (!isset($this->offset)) {\n $this->offset = date_offset_get($this);\n }\n\n return $this->offset;\n }", "protected function calculateTimeZoneOffset($timeZoneText = \"\")\n {\n $offset = 0;\n if ($timeZoneText != \"\") {\n $zone = new DateTimeZone($timeZoneText);\n $offset = ($zone->getOffset(new DateTime('UTC')) / self::MINUTES_BY_DAY);\n echo($zone->getOffset(new DateTime('UTC')));\n echo $offset;\n }\n return $offset;\n }", "public function getTimezone();", "public function getTimezone();", "public static function timezoneOffset($timezone) {\r\n\t\t// check user timezone for safety\r\n\t\t$zone = date_default_timezone_get();\r\n\t\tif(isset($timezone) && strlen($timezone) > 0)\r\n\t\t\t$zone = $timezone;\r\n\r\n\t\t// system timezone\r\n\t\t$server_zone = new DateTimeZone(date_default_timezone_get());\r\n\t\t$user_zone = new DateTimeZone($zone);\r\n\r\n\t\t// timestamp DateTime object\r\n\t\t$server_time = new DateTime(\"now\", $server_zone);\r\n\t\t$user_time = new DateTime(\"now\", $user_zone);\r\n\r\n\t\t// offset between the two\r\n\t\treturn $server_zone->getOffset($server_time) - $user_zone->getOffset($user_time);\r\n\t}", "function ig_es_get_current_gmt_timestamp() {\n\t\treturn strtotime( gmdate( 'Y-m-d H:i:s' ) );\n\t}", "function bbc_time_offset() {\n global $BBC_TIMESTAMP, $BBC_TIME_OFFSET, $access, $last;\n\n $cfg_offset = !empty($BBC_TIME_OFFSET) ? $BBC_TIME_OFFSET : 0;\n $sav_offset = isset($access['time']['offset']) ? $access['time']['offset'] : 0;\n $diff_offset = $cfg_offset - $sav_offset;\n\n if (empty($diff_offset)) return;\n\n $diff_hours = -round($diff_offset / 60);\n $new_time = $BBC_TIMESTAMP + ($cfg_offset * 60);\n $old_time = $BBC_TIMESTAMP + ($sav_offset * 60);\n $access['time']['last'] += $diff_offset * 60;\n $access['time']['offset'] = $cfg_offset;\n\n // Shift the last reset marker as well if available\n if (!empty($access['time']['reset'])) $access['time']['reset'] += $diff_offset * 60;\n\n // shifting the detailed stats\n for ($i = 0, $max = count($last['traffic']); $i < $max; $i++) $last['traffic'][$i]['time'] += $diff_offset * 60;\n\n $last_day_in_month = $access['time']['day'][(count($access['time']['day']) - 1)];\n $today = date(\"w\", $new_time);\n $yesterday = empty($today) ? ($today + 6) : ($today - 1);\n $days_diff = ($today != date(\"w\", $old_time)) ? 1 : 0;\n\n $this_day = date(\"j\", $new_time) - 1;\n $last_day = empty($this_day) ? $last_day_in_month : ($this_day - 1);\n\n $this_month = date(\"n\", $new_time) - 1;\n $last_month = empty($this_month) ? ($this_month + 11) : ($this_month - 1);\n\n // shifting hourly stats to get the amount \"this day - previous day\" we need to modify\n $shift = array_splice($access['time']['hour'], $diff_hours, 24);\n $diff = ($diff_hours < 0) ? array_sum($shift) : array_sum($access['time']['hour']);\n $access['time']['hour'] = array_merge($shift, $access['time']['hour']);\n\n for ($i = 0, $hits = 0, $max = date(\"G\", $new_time); $i <= $max; $i++) $hits += $access['time']['hour'][$i];\n for ($i = ($max + 1), $rest = 0; $i < 24; $i++) $rest += $access['time']['hour'][$i];\n\n if ($diff_hours < 0) {\n //set time forth\n $access['time']['wday'][$today] = $hits;\n $access['time']['day'][$this_day] = $hits;\n $access['time']['wday'][$yesterday] -= ($access['time']['wday'][$yesterday] < $diff) ? $hits : $diff;\n $access['time']['day'][$last_day] -= ($access['time']['day'][$last_day] < $diff) ? $hits : $diff;\n\n if ($access['time']['day'][$this_day] == $last_day_in_month) {\n $access['time']['month'][$this_month] = $hits;\n $access['time']['month'][$last_month] -= ($access['time']['month'][$last_month] < $diff) ? $hits : $diff;\n }\n }\n else {\n // set time back\n $access['time']['wday'][$yesterday] += $days_diff ? $rest : $diff;\n $access['time']['day'][$last_day] += $days_diff ? $rest : $diff;\n $access['time']['wday'][$today] = $hits;\n $access['time']['day'][$this_day] = $hits;\n\n if ($access['time']['day'][$this_day] == $access['time']['day'][0]) {\n $access['time']['month'][$last_month] += $days_diff ? $rest : $diff;\n $access['time']['month'][$this_month] = $hits;\n }\n }\n}", "public static function gmtAdjustedDate($gmttimestamp, $timezone)\n {\n if($gmttimestamp != 0)\n {\n $dateTime = new DateTime();\n $dateTime->setTimeStamp($gmttimestamp);\n return $gmttimestamp - TDOUtil::filterOffsetForCurrentGMTOffset($timezone, $dateTime);\n }\n \n return $gmttimestamp;\n }", "public function getTimezone(){ return $this->getField('timezone','UTC'); }", "function local($date = '', $format = '', $org_id = '', $offset = 0)\n\t{\n\t\treturn self::format($date, $format, $offset + self::timezone($org_id));\n\t}", "public static function get_current_time_gmt() {\n\t\t\t$self = self::get_instance();\n\n\t\t\treturn $self->current_time_gmt;\n\t\t}", "function get_timezone() {\r\n //returns the timezone\r\n return $this->timezone;\r\n }", "function getServerTimeZone(){\r\n\t//\"Etc/GMT-10\" actually refers to the timezone \"(GMT+10:00)\r\n\t$server_timezone = getConf('SERVER_TIMEZONE');\r\n\t//$server_timezone = str_ireplace(\"etc/\", \"\", $server_timezone)\r\n\t\t/*if (strpos($server_timezone, \"-\") !== false) {\r\n\t\t\t$server_timezone = str_replace(\"-\", \"+\", $server_timezone);\r\n\t\t} else if (strpos($server_timezone, \"+\") !== false) {\r\n\t\t\t$server_timezone = str_replace(\"+\", \"-\", $server_timezone);\r\n\t\t}*/\r\n\t$GMT_TIMEZONE = getConf('GMT_TIMEZONE');\r\n\treturn $GMT_TIMEZONE[$server_timezone];\r\n}", "public static function utc() {\n\t\treturn IdentifiedTimeZone::utc();\n\t}", "function getlocaltime($sec=false,$nxt=0)\n{\n\t$NextDays = $nxt*24*60*60;\n\t$GMT = _GMT_TIME_DIFFERENCE;\n\t$h = round((float)$GMT,2);\n\t$dst = \"true\";\n\t$hm = $h * 60;\n\t$ms = $hm * 60;\n\t//$timestamp = time()+($ms);\n\t$timestamp = $_SERVER[\"REQUEST_TIME\"]+($ms);\n\t\n\tif($sec)\n\t{\n\t\t$seconds = \" H:i:s\";\n\t}\n\t$gmdate = gmdate(\"Y-m-d\".$seconds, $timestamp+$NextDays);\n\treturn $gmdate;\n}", "function get_timezone_offset($remote_tz, $origin_tz = null)\n\t{\n\t\t$dst = $this->getDST($date='');\n\t\tif($origin_tz === null)\n\t {\n\t if(!is_string($origin_tz = date_default_timezone_get()))\n\t {\n\t return false; // A UTC timestamp was returned -- bail out!\n\t }\n\t }\n\t $origin_dtz = new DateTimeZone($origin_tz);\n\t $remote_dtz = new DateTimeZone($remote_tz);\n\t $origin_dt = new DateTime(\"now\", $origin_dtz);\n\t $remote_dt = new DateTime(\"now\", $remote_dtz);\n\t $offset = $origin_dtz->getOffset($origin_dt) - $remote_dtz->getOffset($remote_dt);\n\t $offset = $offset - ($dst*3600);\n\t\treturn $offset;\n\t}", "static function get_timezone(){\n\t\treturn get_option('gc_timezone');\t\t\t\t\n\t\t\n\t}", "static function get_timezone(){\n\t\treturn get_option('gc_timezone');\t\t\t\t\n\t\t\n\t}", "function genesis_extender_time()\r\n{\r\n\t$time = gmdate( 'Y-m-d H:i:s', ( time() + ( get_option( 'gmt_offset' ) * 3600 ) ) );\r\n\treturn strtotime( $time );\r\n}", "function _getGMTTimeByTZ($localtime, $tz) {\n if(!isset($tz) || !is_array($tz))\n return $localtime;\n\n if($this->_isDST($localtime, $tz))\n return $localtime + $tz[\"bias\"]*60 + $tz[\"dstbias\"]*60;\n else\n return $localtime + $tz[\"bias\"]*60;\n }", "public static function tz2offset( $tz ) {\n static $ZERO4 = '0000';\n static $NINE4 = '9999';\n static $ZERO2 = '00';\n static $NINE2 = '99';\n $tz = trim( (string) $tz );\n $offset = 0;\n if((( 5 != strlen( $tz )) &&\n ( 7 != strlen( $tz ))) ||\n (( self::$PLUS != $tz[0] &&\n ( self::$MINUS != $tz[0] ))) ||\n (( $ZERO4 >= substr( $tz, 1, 4 )) &&\n ( $NINE4 < substr( $tz, 1, 4 ))) ||\n (( 7 == strlen( $tz )) &&\n ( $ZERO2 > substr( $tz, 5, 2 )) &&\n ( $NINE2 < substr( $tz, 5, 2 ))))\n return $offset;\n $hours2sec = (int) substr( $tz, 1, 2 ) * 3600;\n $min2sec = (int) substr( $tz, 3, 2 ) * 60;\n $sec = ( 7 == strlen( $tz ))\n ? (int) substr( $tz, -2 ) : $ZERO2;\n $offset = $hours2sec + $min2sec + $sec;\n $offset = ( self::$MINUS == $tz[0] )\n ? $offset * -1 : $offset;\n return $offset;\n }", "function sed_build_timezone($tz)\r\n{\r\n\tglobal $L;\r\n\r\n\t$result = 'GMT';\r\n\r\n\t$result .= sed_declension($tz, $L['Hours']);\r\n\r\n\treturn $result;\r\n}", "public function getGPXTimeZone(){\n\t\treturn $this->journey->timezone;\n\t}", "function iso8601_gmt_to_local( $date_string, $format = 'c', $tzID = null ) {\n if ( null === $tzID ) {\n $tzID = get_option( 'timezone_string' );\n }\n if ( null === $tzID ) {\n $offset = ( get_option( 'gmt_offset' ) * -1 );\n $tzID = 'Etc/GMT' . ( ( 0 > $offset ) ? $offset : '+' . $offset ); // This line is here for compatibility reasons\n }\n $tz = new DateTimeZone( $tzID );\n $date = DateTime::createFromFormat( 'U', strtotime( $date_string ) );\n $date->setTimezone( $tz );\n return $date->format( $format );\n}", "function tve_ult_default_tzstring() {\n\t$tzstring = get_option( 'timezone_string' );\n\tif ( ! empty( $tzstring ) ) {\n\t\treturn $tzstring;\n\t}\n\t$offset = get_option( 'gmt_offset' );\n\tif ( $offset == 0 ) {\n\t\treturn 'UTC+0';\n\t}\n\n\treturn ( $offset < 0 ? 'UTC' : 'UTC+' ) . $offset;\n}", "function gmtDate($timezone = '8')\n{\n $gmt_date = gmdate(\"Y/m/j H:i:s\", time() + 3600*($timezone+date(\"I\")));\n return $gmt_date;\n}", "public function get_default_timezone()\n {\n return 'UTC';\n }", "function now() {\n return strtoupper(option('timezone')) == 'GMT' ? gmtime() : time();\n}", "public function getTimeZone()\n\t{\n\t\treturn date_default_timezone_get();\n\t}", "public function getTimeZone()\n\t{\n\t\treturn date_default_timezone_get();\n\t}", "public function testServerOffset() {\n\t\t$result = $this->TimeMachine->serverOffset();\n\t\t$serverTimezone = new DateTimeZone(date_default_timezone_get());\n\t\t$expected = $serverTimezone->getOffset(new DateTime('now'));\n\t\t$this->assertEqual($expected, $result);\n\t}", "public static function getCurrentDateAndTimeBasedOnTimeZone($date = ''){\n if(empty($date)){\n $current_date = new DateTime('now', new DateTimeZone('UTC'));\n $date = $current_date->format('Y-m-d H:i:s');\n }\n $offset = get_option('gmt_offset');\n if(empty($offset)){\n $offset = 0;\n }\n //$time_zone = get_option('timezone_string');\n return date(\"Y-m-d H:i:s\", strtotime($date) + (3600 * $offset) );\n }", "public function get_site_timezone_offset_hours() {\n\t\t$timezone = $this->get_site_timezone();\n\n\t\t// Get the current time.\n\t\t$current_time = new DateTime( 'now', $timezone );\n\n\t\t// Get the timezone offset.\n\t\t$current_time_offset = $current_time->getOffset();\n\n\t\t// Get the difference in hours.\n\t\t$timezone_offset_hours = ( abs( $current_time_offset ) / 60 ) / 60;\n\n\t\t// Pass the offset in hours.\n\t\treturn ( $current_time_offset < 0 ) ? ( 0 - $timezone_offset_hours ) : $timezone_offset_hours;\n\t}", "static function offset($tzid){\r\n \r\n // sanity...\r\n if(!class_exists('DateTime')){\r\n throw new Exception('the DateTime class does not exist, you need php>=5.2.0 to use this function');\r\n }//if\r\n if(empty($tzid)){ return 0; }//if\r\n\r\n $ret_int = 0;\r\n\r\n try{\r\n\r\n $dt = new DateTime();\r\n $dt->setTimezone(new DateTimeZone($tzid));\r\n $ret_int = $dt->getOffset();\r\n \r\n }catch(Exception $e){}//try/catch\r\n \r\n return $ret_int;\r\n \r\n }", "function getCurrentDatetime() {\n\n\t\t$timezonePeer = new TimezonePeer();\n\t\t$timestamp = $timezonePeer->getServerTimeOnGMT0();\n\t\t$datetime = date('Y-m-d H:i:s',$timestamp);\n\t\t$currentDatetime = Common::getDatetimeOnTimezone($datetime);\n\n\t\treturn $currentDatetime;\n\t}", "function wp_zoom_timezone_string() {\n $timezone_string = get_option( 'timezone_string' );\n \n if ( $timezone_string ) {\n return $timezone_string;\n }\n \n $offset = (float) get_option( 'gmt_offset' );\n $hours = (int) $offset;\n $minutes = ( $offset - $hours );\n \n $sign = ( $offset < 0 ) ? '-' : '+';\n $abs_hour = abs( $hours );\n $abs_mins = abs( $minutes * 60 );\n $tz_offset = sprintf( 'UTC%s%02d:%02d', $sign, $abs_hour, $abs_mins );\n \n return $tz_offset;\n}", "function sed_build_timezone($tz)\n\t{\n\tglobal $L;\n\n\t$result = 'GMT';\n\n\tif ($tz == -1 OR $tz == 1)\n\t\t{ $result .= $tz.' '.$L['Hour']; }\n\telseif ($tz!=0)\n\t\t{ $result .= $tz.' '.$L['Hours']; }\n\treturn($result);\n\t}", "function getDatetimeOnGMT($datetime) {\n\t\trequire_once('TimezonePeer.php');\n\n\t\tif (Common::isAdmin()) {\n\t\t\t$user = Common::getAdminLogged();\n\t\t\t$timezoneCode = $user->getTimezone();\n\t\t}\n\t\tif (Common::isAffiliatedUser()) {\n\t\t\t$user = Common::getAffiliatedLogged();\n\t\t\t$timezoneCode = $user->getTimezone();\n\t\t}\n\t\tif (empty($timezoneCode) || $timezoneCode == \"\") {\n\t\t\t//si no hubiera o no fuera un usuario administrador tomamos default de la aplicacion\n\t\t\tglobal $system;\n\t\t\t$timezoneCode = $system[\"config\"][\"system\"][\"parameters\"][\"applicationTimeZoneGMT\"][\"value\"];\n\t\t\tif ($timezoneCode == null)\n\t\t\t\t$timezoneCode = 0;\n\t\t}\n\t\t$timezonePeer = new TimezonePeer();\n\t\treturn $timezonePeer->getGMT0DatetimeFromTimezone($datetime,$timezoneCode);\n\t}", "function adjustmentForUserTimeZone($timezone_to_adjust = null){\n\t\tstatic $current_user_adjustment;\n\t\tstatic $tz_to_adjust;\n\t\tif(isset($current_user_adjustment) && $tz_to_adjust == $timezone_to_adjust){\n\t\t\treturn $current_user_adjustment;\n\t\t} \n\t\t\n\t\t$adjustment = 0;\n\t\t$tz_to_adjust = $timezone_to_adjust;\n\t\t\n\t\tif(empty($timezone_to_adjust)) {\n\t\t\t$timezone = $this->getUserTimeZone();\n\t\t}\n\t\telse { \n\t\t\t$timezone = $timezone_to_adjust;\n\t\t}\n\t\tif(empty($timezone)) {\n\t\t\treturn $adjustment;\n\t\t}\n\n\t\t$server_offset = date('Z')/60;\n\t\t$server_in_ds = date('I');\n\t\t$user_in_ds = $this->inDST(date('Y-m-d H:i:s'), $timezone);\n\t\t$user_offset = $timezone['gmtOffset'] ;\n\n\t\t//compensate for ds for user\n\t\tif($user_in_ds) {\n\t\t\t$user_offset += 60;\n\t\t}\n\t\t\n\t\t//either both + or -\n\t\t$adjustment += $server_offset - $user_offset;\n\t\tif(empty($timezone_to_adjust)) $current_user_adjustment = $adjustment; // save current_user adj\n\n\t\treturn $adjustment;\n\t}", "function get($tz_offset = 0){\r\n \r\n $ret_map_list = array();\r\n \r\n if(!empty($this->val_map['month_list'])){\r\n \r\n $ret_map_list = $this->getMonth($tz_offset);\r\n \r\n }else if(!empty($this->val_map['day_index_list'])){\r\n \r\n $ret_map_list = $this->getDay($tz_offset);\r\n \r\n }else if(!empty($this->val_map['date_implied_list'])){\r\n \r\n $ret_map_list = $this->getImplied($tz_offset);\r\n \r\n }else if(!empty($this->val_map['time_list']) || !empty($this->val_map['time_interval'])){\r\n \r\n $time_map = parse_date_get::dateMap(parse_date_get::timestamp($tz_offset));\r\n $year_start = $time_map['year'];\r\n $month_start = $time_map['mon'];\r\n $day_start = $time_map['mday'];\r\n \r\n // find out if ther is a meridian...\r\n $has_meridian = false;\r\n $token_time = $this->time();\r\n if(empty($token_time)){\r\n $token_time = $this->timeInterval();\r\n if(!empty($token_time)){\r\n $has_meridian = $token_time->start()->hasMeridian() || $token_time->stop()->hasMeridian();\r\n }//if\r\n }else{\r\n $has_meridian = $token_time->hasMeridian();\r\n }//if/else\r\n \r\n list($time_start,$time_stop) = $this->getTime();\r\n if($time_stop[0] < $time_map['hours']){\r\n \r\n // if there is a meridian then we just want the next day, if there isn't then we want\r\n // the next available time block (eg, if we had 7-9 and it was 1pm, then we would want 7-9pm)\r\n if($has_meridian){\r\n \r\n list($year_start,$month_start,$day_start) = parse_date_get::nextDay($year_start,$month_start,$day_start,$tz_offset);\r\n \r\n }else{\r\n \r\n $time_start[0] = $time_start[0] + 12;\r\n $time_stop[0] = $time_stop[0] + 12;\r\n if($time_start[0] > 23){\r\n $time_start[0] = $time_start[0] % 24;\r\n $time_stop[0] = $time_stop[0] % 24;\r\n list($year_start,$month_start,$day_start) = parse_date_get::nextDay($year_start,$month_start,$day_start,$tz_offset);\r\n }//if\r\n \r\n }//if/else\r\n \r\n }//method\r\n \r\n $ret_map_list = $this->getTimestamps(\r\n array($year_start,$year_start),\r\n array($month_start,$month_start),\r\n array($day_start,$day_start),\r\n array($time_start,$time_stop)\r\n );\r\n \r\n }//if/else if\r\n \r\n return $ret_map_list;\r\n \r\n }", "public function getTimeZone()\n {\n return $this->timezone;\n }", "function __setTimeZoneOffset() {\n\n //get the offset, based on what timezone php is using. (php timezone as set in config)\n $date = new DateTime();\n $offset = $date->format(\"P\"); //e.g +2:00\n $this->db->query(\"SET time_zone='$offset'\");\n\n //bugging\n $last_query = $this->db->last_query();\n $last_error = $this->db->_error_message();\n $debug = \"<pre>\" . __function__ . \"<br/>$last_query<br/><br/>$last_error</pre>\";\n }", "private function setTimezone() {\n\t\t$now = new DateTime();\n\t\t$mins = $now->getOffset() / 60;\n\t\t$sgn = ($mins < 0 ? -1 : 1);\n\t\t$mins = abs($mins);\n\t\t$hrs = floor($mins / 60);\n\t\t$mins -= $hrs * 60;\n\t\t$offset = sprintf('%+d:%02d', $hrs*$sgn, $mins);\n\t\tself::executeQuery(\"SET time_zone = '$offset';\");\n\t}", "function beaver_extender_time() {\r\n\t\r\n\t$time = gmdate( 'Y-m-d H:i:s', ( time() + ( get_option( 'gmt_offset' ) * 3600 ) ) );\r\n\treturn strtotime( $time );\r\n\t\r\n}", "public static function get_timezone_offset($zone_name)\n\t{\n\t\t$timezone = new DateTimeZone($zone_name);\n\n\t\t$timezone_utc = new DateTimeZone('UTC');\n\t\t$time = new DateTime('now', $timezone_utc);\n\t\treturn $timezone->getOffset($time);\n\t}", "function dateTimeToGMT(&$dateTime)\n{\n // If this date & time is in BST, take 1 hour off to put it back into GMT/UTC\n // so we have a common base for comparison with other data\n $tz = new dateTimeZone('Europe/London');\n $trans = $tz->getTransitions($dateTime->getTimestamp(), $dateTime->getTimestamp());\n if ($trans[0]['offset'] > 0) {\n if (DEBUG) {\n print('In BST - altering ' . $dateTime->format('Y-m-d H:i:s'));\n }\n $dateTime->sub(new DateInterval('PT1H'));\n if (DEBUG) {\n print(' to ' . $dateTime->format('Y-m-d H:i:s') . \"\\n\");\n }\n }\n}", "function getRemoteTime($originTime, $remote_tz, $origin_tz) {\n\t$unixTimeOrigin = strtotime($originTime);\n\t$offset = get_timezone_offset($remote_tz, $origin_tz);\n\t//echo \"<br>$offset<br>\";\n\t$unixRemoteTime = $unixTimeOrigin - $offset;\n\t//return time at remote office\n\t$remoteTime = date('M d H:i', $unixRemoteTime);\n\tRETURN $remoteTime;\n}", "public function getLocationOffset()\n {\n return $this->location_offset;\n }", "function getLocalTimestampFromServerTimestamp($tz, $timestamp)\n{\n return $timestamp - getServerTimeZoneOffset() + getLocalTimeZoneOffset( $tz );\n}", "public function get_php_timezone($zone = 'UTC')\n\t{\n\t\t$zones = array(\n\t\t\t'UM12'\t\t=> 'Kwajalein', \t\t\t\t\t// -12\n\t\t\t'UM11'\t\t=> 'Pacific/Midway', \t\t\t\t// -11\n\t\t\t'UM10'\t\t=> 'Pacific/Honolulu', \t\t\t\t// -10\n\t\t\t'UM95'\t\t=> 'Pacific/Marquesas',\t\t\t\t// -9.5\n\t\t\t'UM9'\t\t=> 'America/Anchorage', \t\t\t// -9\n\t\t\t'UM8'\t\t=> 'America/Los_Angeles', \t\t\t// -8\n\t\t\t'UM7'\t\t=> 'America/Denver', \t\t\t\t// -7\n\t\t\t'UM6'\t\t=> 'America/Chicago', \t\t\t\t// -6\n\t\t\t'UM5'\t\t=> 'America/New_York', \t\t\t\t// -5\n\t\t\t'UM45'\t\t=> 'America/Caracas',\t\t\t\t// -4.5\n\t\t\t'UM4'\t\t=> 'America/Halifax', \t\t\t\t// -4\n\t\t\t'UM35'\t\t=> 'America/St_Johns', \t\t\t\t// -3.5\n\t\t\t'UM3'\t\t=> 'America/Argentina/Buenos_Aires',// -3\n\t\t\t'UM2'\t\t=> 'Atlantic/South_Georgia', \t\t// -2\n\t\t\t'UM1'\t\t=> 'Atlantic/Azores', \t\t\t\t// -1\n\t\t\t'UTC'\t\t=> 'Europe/Dublin', \t\t\t\t// 0\n\t\t\t'UP1'\t\t=> 'Europe/Belgrade', \t\t\t\t// +1\n\t\t\t'UP2'\t\t=> 'Europe/Minsk', \t\t\t\t\t// +2\n\t\t\t'UP3'\t\t=> 'Asia/Kuwait', \t\t\t\t\t// +3\n\t\t\t'UP35'\t\t=> 'Asia/Tehran', \t\t\t\t\t// +3.5\n\t\t\t'UP4'\t\t=> 'Asia/Muscat', \t\t\t\t\t// +4\n\t\t\t'UP45'\t\t=> 'Asia/Kabul', \t\t\t\t\t// +4.5\n\t\t\t'UP5'\t\t=> 'Asia/Yekaterinburg', \t\t\t// +5\n\t\t\t'UP55'\t\t=> 'Asia/Kolkata',\t\t \t\t\t// +5.5\n\t\t\t'UP575'\t\t=> 'Asia/Katmandu', \t\t\t\t// +5.75\n\t\t\t'UP6'\t\t=> 'Asia/Dhaka', \t\t\t\t\t// +6\n\t\t\t'UP65'\t\t=> 'Asia/Rangoon', \t\t\t\t\t// +6.5\n\t\t\t'UP7'\t\t=> 'Asia/Krasnoyarsk', \t\t\t\t// +7\n\t\t\t'UP8'\t\t=> 'Asia/Brunei', \t\t\t\t\t// 8\n\t\t\t'UP875'\t\t=> 'Australia/Eucla',\t\t\t\t// +8.75\n\t\t\t'UP9'\t\t=> 'Asia/Seoul', \t\t\t\t\t// +9\n\t\t\t'UP95'\t\t=> 'Australia/Darwin', \t\t\t\t// +9.5\n\t\t\t'UP10'\t\t=> 'Australia/Canberra', \t\t\t// +10\n\t\t\t'UP105'\t\t=> 'Australia/Lord_Howe',\t\t\t// +10.5\n\t\t\t'UP11'\t\t=> 'Asia/Magadan', \t\t\t\t\t// +11\n\t\t\t'UP115'\t\t=> 'Pacific/Norfolk',\t\t\t\t// +11.5\n\t\t\t'UP12'\t\t=> 'Pacific/Fiji', \t\t\t\t\t// +12\n\t\t\t'UP1275'\t=> 'Pacific/Chatham',\t\t\t\t// +12.75\n\t\t\t'UP13'\t\t=> 'Pacific/Tongatapu', \t\t\t// +13\n\t\t\t'UP14'\t\t=> 'Pacific/Kiritimati'\t\t\t\t// +14\n\t\t);\n\n\t\t// Fall back to UTC if something went wrong\n\t\tif ( ! isset($zones[$zone]))\n\t\t{\n\t\t\treturn 'UTC';\n\t\t}\n\n\t\treturn $zones[$zone];\n\t}" ]
[ "0.7421059", "0.7318216", "0.73028165", "0.72977537", "0.7290846", "0.7218022", "0.7141333", "0.7141047", "0.71319675", "0.71223235", "0.70702535", "0.6898517", "0.6885096", "0.6810091", "0.67468184", "0.67399997", "0.6719957", "0.6694597", "0.6636762", "0.6636762", "0.6609469", "0.6580886", "0.6575199", "0.6560711", "0.6483479", "0.63962644", "0.6394639", "0.6389262", "0.6348327", "0.6347162", "0.63403636", "0.63403636", "0.63403636", "0.6313793", "0.62986195", "0.62961596", "0.6260097", "0.62076026", "0.6194679", "0.61945814", "0.61904955", "0.6167175", "0.6155976", "0.6138227", "0.6129639", "0.61194855", "0.60878843", "0.60824674", "0.60815954", "0.6072703", "0.6066645", "0.60515165", "0.60471773", "0.60471773", "0.6011064", "0.5999425", "0.59987116", "0.59973675", "0.5981028", "0.5977372", "0.5967048", "0.595229", "0.593642", "0.5918309", "0.58900213", "0.58784664", "0.58766544", "0.58766544", "0.5875283", "0.58599776", "0.58595854", "0.58417255", "0.58414173", "0.5841417", "0.5807825", "0.5801295", "0.5800064", "0.579355", "0.57924473", "0.57924473", "0.57862186", "0.57804626", "0.576388", "0.575083", "0.57479167", "0.57283217", "0.5719242", "0.5690952", "0.5680712", "0.5680538", "0.56609094", "0.56563044", "0.565224", "0.56338316", "0.56329745", "0.56311345", "0.5630707", "0.5624874", "0.56204665", "0.5602533" ]
0.7532978
0
Converts timestamp to numeric date (YYYYMMDD) E.g.: 20141214
Преобразует временной метку в числовую дату (YYYYMMDD) Например: 20141214
public static function getNumericDate($timestamp = null) { if ($timestamp === null) { $timestamp = time(); } return (int) date('Ymd', $timestamp); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function get_timestamp_as_date($timestamp)\n {\n }", "function convert_date($timestamp){\n\t$date = new DateTime($timestamp);\n\treturn $date->format('l, F j, Y'); //from php.net/manual/en/datetime.formats.date.php\n}", "function convert_date($timestamp){\n\t$date = new DateTime($timestamp);\n\treturn $date->format('l, F j, Y');\n//see: http://php.net/manual/en/datetime.formats.date.php for complete reference \n}", "function ts2date($ts)\r\n\t\t{\r\n\t\t\treturn date('d.m.Y', $ts);\r\n\t\t}", "public static function date ($timestamp) {\n\n\t\tif ($timestamp > 0) {\n\t\t\treturn date(\"d.m.Y\", $timestamp);\n\t\t}\n\t}", "function timestampToMysqlDate($timestamp)\r\n\t{\r\n\t\treturn date('Y-m-d', intval($timestamp));\r\n\t}", "function getDateFromTimestamp($theTimestap){\n $timestamp = strtotime($theTimestap);\n $date = getDate($timestamp)['mday'] . \"/\" .\n getDate($timestamp)['mon'] . \"/\" .\n getDate($timestamp)['year'];\n \n return $date;\n }", "function sed_stamp2date($stamp)\r\n{\r\n\treturn date('Y-m-d', $stamp);\r\n}", "function strdate2intDate($strdate)\r\n{\r\n $strdate=str_replace(\"-\",\"/\",$strdate);\r\n list($day,$month, $year) = explode('/', $strdate);\r\n $year=(int)$year-543;\r\n return number_format(((mktime(7, 0, 0, (int)$month,(int)$day, (int)$year)/86400)+719163),0,'','');\r\n}", "function from_v2_rex_date_to_timestamp($date)\n{\n return from_v2_rex_date($date)->getTimestamp();\n}", "function dateToCal($timestamp) \n {\n return date('Ymd\\THis', strtotime($timestamp));\n }", "function timeStamptoRedableDate($timestamp)\n{\n $datetimeFormat = 'Y-m-d H:i:s';\n $date = new \\DateTime();\n $date->setTimestamp($timestamp);\n\n return $date->format($datetimeFormat);\n}", "function timestamp_to_string($value){ return Dataface_converters_date::timestamp_to_string($value); }", "function dateToCal2($timestamp) {\n\treturn date('Ymd', $timestamp);\n\t}", "function df_convert_date_to_unix_timestamp($date_inputted){\n $date_input = new DateTime($date_inputted);\n $timestamp_outcome = $date_input->format(\"U\");\n return $timestamp_outcome;\n}", "function f_timestamp($datum) {\n\t$timestamp=strtotime($datum);\n return $timestamp;\n\t}", "public function packDate($timestamp) {\n\t}", "public static function date_to_timestamp($date) {\n\n\t\t$dtime = \\DateTime::createFromFormat(\"d.m.Y\", $date);\n\n\t\tif ($dtime) {\n\t\t\treturn $dtime->getTimestamp();\n\t\t}\n\t}", "function convert_timestamp( $ugly ){\n $date = new DateTime( $ugly );\n echo $date->format('l, jS, F, o');\n}", "function convert_timestamp( $ugly ){\n $date = new DateTime( $ugly );\n echo $date->format('l, jS, F, o');\n}", "function convert_ruby_timestamp($timestamp) {\n\t\t$chopped = str_replace(array('T','Z'),array(' ',' GMT'),$timestamp);\n\t\treturn (strtotime($chopped));\n\t}", "public function epochToTimestamp($val)\n {\n return date('Y-m-d H:i:s', $val);\n }", "public function epochToTimestamp($val)\n {\n return date('Y-m-d H:i:s', $val);\n }", "function convert_given_date_to_unix_timestamp($date){\r\n\t\t/**\r\n\t\t * ISSOLATE THE NUMBERS REPRESENTING \r\n\t\t * EACH PARY OF THE DATE FROM DAY, MONTH\r\n\t\t * AND YEAR mktime(hour, minute, second, month, day, year, isDST)\r\n\t\t */\r\n\t\tif($date_figures = explode(\"-\", $date)){\r\n\t\t\t$unix_time= mktime(0, 0, 0, $date_figures[1], $date_figures[2], $date_figures[0]);\r\n\t\t\treturn $unix_time;\t\r\n\t\t}\r\n\t}", "public function date(int $timestamp): string\n {\n return $this->formatDate($timestamp, 'dateFormat');\n }", "function convertTimestamp( $ugly ){\n\t$date = new DateTime( $ugly );\n\treturn $date->format( 'l, F jS, Y' );\n}", "public function toTimestamp(): int\n {\n return $this->decodeTime($this->time);\n }", "private function toUnixTimestamp($var) {\n//\n// if(sizeof($ary) > 0) {\n// date_default_timezone_set('UTC') ;\n// return mktime(0,0,0,$ary[1],$ary[2],$ary[0]) ;\n// }\n// return $var;\n $this->load->library('commen') ;\n return $this->commen->toUnixTimestamp($var) ;\n }", "function parseDate($number) {\n return date(\"Y-m-d\", $number);\n }", "private function convertTimestampToDatetime($timestamp) {\r\n return new DateTime('@' . $timestamp); \r\n }", "function daynum2unix($dn) {\n // Converts a daynum to a UNIX timestamp\n\n return (86400.0 * ($dn - 2444238.5 + 3651.0));\n}", "public function getConvertTimestamp(){\n return $this->getArrosedAt()->getTimestamp();\n }", "public static function unixToDb($timestamp)\n {\n return date(self::DB_DATE_FORMAT, $timestamp);\n }", "public static function int2Date( $int ) {\n\t\treturn \\date( \"Y-m-d H:i:s\", $int );\n\t}", "function converttoepoch($date,$time){\n\t\t$date_dd=substr($date,0,2);\n\t\t$date=substr($date,3); \n\t\t$date_mm=substr($date,0,2); \n\t\t$date_yyyy=substr($date,3); \n\t\t$time_hh=substr($time,0,2); \n\t\t$time=substr($time,3); \n\t\t$time_mm=substr($time,0,2); \n\t\t$time_ss=substr($time,3); \n\t\t$epochtime=mktime($time_hh,$time_mm,$time_ss,$date_mm,$date_dd,$date_yyyy); \n\t\treturn $epochtime; \n\t}", "function sed_translate_date($timestampDate)\n\t{\t\n\t\tglobal $sed_months_list;\t\t\n\t\t$tday = date(\"d\", $timestampDate);\n\t\t$tmonths = $sed_months_list[(date('n', $timestampDate))];\n\t\t$tyear = date(\"Y\", $timestampDate);\t\t\n\t\treturn $tday.\" \".$tmonths.\" \".$tyear;\n\t}", "public static function timestamp2date( $timestamp, $parno=6, $wtz=null ) {\n static $FMTTIMESTAMP = '@%s';\n static $SPSEC = ' seconds';\n if( is_array( $timestamp )) {\n $tz = ( isset( $timestamp[self::$LCtz] ))\n ? $timestamp[self::$LCtz] : $wtz;\n $timestamp = $timestamp[self::$LCTIMESTAMP];\n }\n $tz = ( isset( $tz )) ? $tz : $wtz;\n $offset = 0;\n if( empty( $tz ) ||\n ( self::$Z == $tz ) ||\n ( 0 == strcasecmp( self::$GMT, $tz )))\n $tz = self::$UTC;\n elseif( self::isOffset( $tz )) {\n $offset = self::tz2offset( $tz );\n }\n try {\n $timestamp = sprintf( $FMTTIMESTAMP, $timestamp );\n $d = new \\DateTime( $timestamp ); // set UTC date\n if( 0 != $offset ) // adjust for offset\n $d->modify( $offset . $SPSEC );\n elseif( self::$UTC != $tz )\n $d->setTimezone( new \\DateTimeZone( $tz )); // convert to local date\n $date = $d->format( self::$YMDHIS3 );\n }\n catch( \\Exception $e ) {\n $date = date( self::$YMDHIS3, $timestamp );\n }\n $date = explode( self::$MINUS, $date );\n $output = [self::$LCYEAR => $date[0],\n self::$LCMONTH => $date[1],\n self::$LCDAY => $date[2]];\n if( 3 != $parno ) {\n $output[self::$LCHOUR] = $date[3];\n $output[self::$LCMIN] = $date[4];\n $output[self::$LCSEC] = $date[5];\n if(( self::$UTC == $tz ) || ( 0 == $offset ))\n $output[self::$LCtz] = self::$Z;\n }\n return $output;\n }", "private static function dateToCal($timestamp) {\n return gmdate('Ymd\\THis\\Z', $timestamp);\n }", "function getDate(){\n return (int)date(\"d\");\n }", "function revertTimeStamp($timestamp)\n {\n $year=substr($timestamp,0,4);\n $month=substr($timestamp,4,2);\n $day=substr($timestamp,6,2);\n $hour=substr($timestamp,8,2);\n $minute=substr($timestamp,10,2);\n $second=substr($timestamp,12,2);\n $newdate=mktime($hour,$minute,$second,$month,$day,$year);\n RETURN ($newdate);\n }", "function value_to_timestamp( $value ){\n\t\tif( gettype( $value ) == 'string' ){\n\t\t\treturn( strtotime( $value ) );\n\t\t};\n\t\treturn( $value );\n\t}", "public static function timestamp2date($ts, $hour=False){\n\t\tif($ts)\n\t\t\tif($hour)\n\t\t\t\treturn date(\"d/m/Y - H:i\", $ts);\n\t\t\telse\n\t\t\t\treturn date(\"d/m/Y\", $ts);\n\t\treturn \"\";\n\t}", "function date_to_timestamp($dt){\n\t$stamp = strtotime($dt);\n\tif($stamp===false){\n\t\t//may be UK format\n\t\t$dt = str_replace(\"/\",\"-\",$dt);\n\t\t$stamp = strtotime($dt);\n\t\tif($stamp===false){\n\t\t\treturn \"\";\n\t\t}else{\n\t\t\treturn $stamp;\n\t\t}\n\t}else{\n\t\treturn $stamp;\n\t}\n}", "function SimpleDate($dttm2timestamp_in){\n\n\t\t$date_time = explode(\" \", $dttm2timestamp_in);\n\n\t\t$date = explode(\"-\",$date_time[0]); \n\n\t\tunset($date_time);\n\n\t\tlist($year, $month, $day) = $date;\n\n\t\treturn mktime(intval(0), intval(0), intval(0), intval($month), intval($day), intval($year));\n\n\t}", "function gameDateToTimestamp($day, $month, $year=null) {\n // Important! First set year\n if(!$year) {\n $dateYear = (int) (new \\DateTime())->format('Y'); \n } else {\n $dateYear = $year; \n } \n $date = (new \\DateTime())->setDate($dateYear, (int) $month, (int) $day);\n \n return $date->getTimestamp();\n }", "public static function toTimeStamp($date) {\n if (0 > ($date = strtotime($date))) {\n $date = 0;\n }\n\n return $date;\n }", "public function convert_php_date_obj_to_cass_date_obj($timestamp_obj)\n {\n return new Cassandra\\Date($timestamp_obj);\n }", "function timeToDT($timestamp)\n{\n $result = false;\n if (is_int($timestamp)) {\n $result = date(\"Y-m-d H:i:s\", $timestamp);\n }\n return $result;\n}", "public static function getTimestamp($date) {\n $date = self::ObjectFromDate($date);\n return intval($date->format('U'));\n }", "function todayAsEpoch()\t{\n\t\t$today = getdate();\n\t\t$today_date = mktime($today['hours'],0,0,$today['mon'],$today['mday'],$today['year']);\n\n\t\treturn $today_date;\n\t}", "protected function _timeStampToDate($timestamp): string\n {\n if ($timestamp > strtotime(date('Y-m-d H:i:s') . ' -6 month'))\n {\n $date = date('M j H:i', $timestamp);\n } else\n {\n $date = date('M j Y', $timestamp);\n }\n return $date;\n }", "function dateToCal($timestamp) {\n\treturn date('Ymd\\THis\\Z', $timestamp);\n\t}", "private function convertDate($date) {\n\t\t// CONVERTI FORMATO DATA\n\t\t//$data_ricevuta = strtotime($date); // convert string to timestamp\n $data_convertita = date(\"Y-m-d H:i:s\", (int)$date); // convert timestamp to Server Format\n //$data_ricevuta = new DateTime(strtotime($date));\n\t\t//$data_convertita = $data_ricevuta->format('Y-m-d H:i:s');\n\t\treturn $data_convertita;\n\t}", "function timestampToStringYMD ($timestamp)\n{\n\t\t $todayArr = getdate($timestamp);\n\t\t $string = $todayArr[\"year\"] . \"-\" . $todayArr[\"mon\"] . \"-\" . $todayArr[\"mday\"] ;\n\t\t return $string;\n}", "public function readTimestamp() {\n\t\treturn $this->readBigInt() / 1000;\n\t}", "function timeStampConvert($tstamp,$toformat){\r\n\t\r\n\t\tif($tstamp == \"\" || $toformat == \"\") return \"\";\r\n\t\r\n\t\t\t\r\n\t\tif(is_numeric($tstamp)){\r\n\t\t\r\n\t\t\r\n\t\t\t$year = substr($tstamp,0,4);\r\n\t\t\t$month = substr($tstamp,4,2);\r\n\t\t\t$day = substr($tstamp,6,2);\r\n\t\t\t$hour = substr($tstamp,8,2);\r\n\t\t\t$minute = substr($tstamp,10,2);\r\n\t\t\t$second = substr($tstamp,12,2);\r\n\t\t\t\r\n\t\t\tif($year == \"\") return \"\";\r\n\t\t\tif($month == \"\") $day = 1;\r\n\t\t\tif($day == \"\") $day = 1;\r\n\t\t\tif($hour == \"\") $hour = 0;\t\t\t\r\n\t\t\tif($minute == \"\") $minute = 0;\t\t\r\n\t\t\tif($second == \"\") $second = 0;\r\n\t\t\t\r\n\t\t\treturn date($toformat, mktime($hour, $minute, $second , $month, $day, $year));\r\n\t\t\t\r\n\t\t\r\n\t\t}else{\r\n\t\t\r\n\t\t\treturn date($toformat, strtotime($tstamp));\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\r\n\t}", "public static function getDate($timestamp = null)\n {\n if (is_null($timestamp)) {\n $timestamp = self::getTime();\n }\n return date('Y-m-d', $timestamp);\n }", "public function toInt()\n {\n return intval($this->timestamp);\n }", "function db2date($datum) {\n if ( strpos($datum,\"-\") ) {\n $D = explode(\"-\",$datum);\n $datum = sprintf (\"%02d.%02d.%04d\",$D[2],$D[1],$D[0]);\n }\n return $datum;\n}", "function dateConvert($text_date, $hours, $minutes, $seconds)\t{\n\t\t//$date = explode(\"/\", $text_date);\"day/mon/year\"\n\t\t\n\t\t$date = explode(\"-\", $text_date);\n\t\t$value_day = trim($date[2]);\n\t\t$value_month = trim($date[1]); \n\t\t$value_year = trim($date[0]);\n\n\t\t$epoch_date = mktime($hours, $minutes, $seconds, $value_month, $value_day, $value_year);\n\t\t\n\t\tif ($epoch_date == -1)\n\t\t\t$epoch_date = \"\";\t\n\n\t\treturn $epoch_date;\n\t}", "private function convertUnixEpochTimeToDate($time)\n {\n // Check if the time is zero. Return a zero if so.\n if ($time == 0) {\n return 0;\n }\n // Convert the time into a readable date and return it.\n $date = gmdate('r', $time);\n return $this->changeDateFormat($date);\n }", "public function timestamp()\n {\n\n return strtotime($this->date_time->format('Y-m-d H:i:s'));\n\n }", "public static function timestamp($value)\n {\n return is_numeric($value) ? $value : strtotime(str_replace('/', '-', $value));\n }", "public static function convertToDate($time)\n\t{\n\t\treturn substr(date('c', $time), 0, 19);\n\t}", "public function convertToTimestamp($date)\n {\n return !empty($date) && is_string($date) ? strtotime($date) : 0;\n }", "function fetch_datetime_from_timestamp($timestamp)\r\n {\r\n return date(\"Y-m-d H:i:s\", $timestamp);\r\n }", "function convertTimestamp($str) \n {\n $date = date('j M Y g:i A', strtotime($str)); \n return $date; \n }", "function print_convert_to_timestamp($str)\n{\n return strtotime($str);\n}", "function fmt_date($timestamp, $format=\"Y-m-d\"){\n\treturn date($format, $timestamp);\n}", "private function getTimestamp()\n {\n $originalTime = microtime(true);\n $micro = sprintf(\"%06d\", ($originalTime - floor($originalTime)) * 1000000);\n $date = new \\DateTime(date('Y-m-d H:i:s.' . $micro, $originalTime));\n\n return $date->format($this->dateFormat);\n }", "function convert_date($date)\n{\n $date_array=getdate(strtotime($date));\n $date=$date_array['year'].'-';\n $date_array['mon'] < 10 ? $date.='0'.$date_array['mon'].'-' : $date.=$date_array['mon'].'-';\n $date_array['mday'] < 10 ? $date.='0'.$date_array['mday'].' ' : $date.=$date_array['mday'].' ';\n $date_array['hours'] < 10 ? $date.='0'.$date_array['hours'].':' : $date.=$date_array['hours'].':';\n $date_array['minutes'] < 10 ? $date.='0'.$date_array['minutes'].':' : $date.=$date_array['minutes'].':';\n $date_array['seconds'] < 10 ? $date.='0'.$date_array['seconds'] : $date.=$date_array['seconds'];\n return $date;\n}", "function convertDate($date)\r\n{\t\r\n\treturn date(\"Ymd\", mktime(0, 0, 0,\r\n\t\t (int)substr($date,4,2)+1,\r\n\t\t (int)substr($date,6,2),\r\n\t\t (int)substr($date,0,4)));\r\n}", "function convertDateToYYYYMMDD($date)\r\n{\t\r\n\treturn date(\"Y/m/d\", mktime(0, 0, 0,\r\n\t\t (int)substr($date,4,2),\r\n\t\t (int)substr($date,6,2),\r\n\t\t (int)substr($date,0,4)));\r\n}", "public function getTimestamp()\r\n\t{\r\n\t\treturn $this->date->getTimestamp();\r\n\t}", "private function getTimestamp()\r\n {\r\n $originalTime = microtime(true);\r\n $micro = sprintf(\"%06d\", ($originalTime - floor($originalTime)) * 1000000);\r\n $date = new DateTime(date('Y-m-d H:i:s.'.$micro, (int)$originalTime));\r\n\r\n return $date->format($this->options['dateFormat']);\r\n }", "public function timestamp(): int\n {\n return (int) $this->data['timestamp'];\n }", "function fDate($timestamp) {\n return date('j F, Y', $timestamp);\n}", "function from_epoch($epoch) {\n return date('d/m/Y H:i', $epoch); // output as RFC 2822 date - returns local time \t\n}", "function dataToTimestamp($data)\n {\n $ano = substr($data, 6, 4);\n $mes = substr($data, 3, 2);\n $dia = substr($data, 0, 2);\n return mktime(0, 0, 0, $mes, $dia, $ano);\n }", "public function getDOSTimestamp(): int;", "function date_to_data_ms($data_string){\r\n global $database;\r\n\r\n// $date = data_transform_vm($data_string);\r\n\r\n// $query = \"SELECT UNIX_TIMESTAMP('$data_string')\"; \r\n// $database->setQuery($query);\r\n// $rent_ms = $database->loadResult(); \r\n// \r\n// return $rent_ms;\r\n $rent_mas = explode('-', $data_string);\r\n $month=$rent_mas[1];\r\n $day=$rent_mas[2];\r\n $year=$rent_mas[0];\r\n $rent_ms = mktime ( 0 ,0, 0, $month , $day , $year);\r\n return $rent_ms;\r\n }", "private function convertDate($value)\n {\n $seconds = $value / 1000;\n return date('d.m.Y H:i:s', $seconds);\n }", "function str2date($in){\n\n\t$t = split(\"/\",$in);\n\n\tif (count($t)!=3) return -1;\n\n\tif (!is_numeric($t[0])) return -1;\n\tif (!is_numeric($t[1])) return -2;\n\tif (!is_numeric($t[2])) return -3;\n\n\tif ($t[2]<1902 || $t[2]>2037) return -3;\n\n\treturn mktime (0,0,0, $t[1], $t[0], $t[2]);\n}", "public static function getDateFromUnix($ts) {\n return date('d M, Y',$ts);\n }", "function t2d($timeStr = null)\n\t{\n\t\t$timeStr = $timeStr ? $timeStr : time();\n\t\treturn date(\"Y-m-d\", $timeStr);\t\t\n\t}", "public function testDeconvertDate()\n {\n $serializer = new Gson3;\n $time = time();\n $deconverted = $serializer->deconvertTimestamp($time);\n $this->assertEquals($time, $deconverted, \"Incorrect deconversion for Date\");\n }", "public static function format_date($timestamp){\n // date_default_timezone_set('Singapore');\n $date = date($date); /*2014-03-16 20:00:00*/\n $date = explode(' ',$date);\n $dmy = explode('-',$date[0]);\n $m = $dmy[1];\n $d = $dmy[2];\n $y = $dmy[0];\n return $get_date = date('F, d Y',mktime(0,0,0,$m,$d,$y));\n }", "public static function toUnixTimeStamp($excelDateTime) {\n\t\tif(!is_numeric($excelDateTime)) {\n\t\t\treturn $excelDateTime;\n\t\t}\n\t\t$d = floor($excelDateTime); // seconds since 1900\n\t\t$t = $excelDateTime - $d;\n\t\treturn ($d > 0) ? ( $d - 25569 ) * 86400 + $t * 86400 : $t * 86400;\n\t}", "public function getDate(): int\n {\n if ($this->obj[0] === null) {\n return 0;\n }\n return $this->obj[0]->date;\n }", "public function getTimestamp(): int;", "public function changeFormat($timestamp){\r\r\n\t\tdate_default_timezone_set('America/New_York');\r\r\n\t\treturn date(\"Y-m-d\", strtotime($timestamp));;\r\r\n\t}", "public function getDate()\n {\n $date = new Date();\n $date->setValue($this->ts);\n return Convert::raw2xml($date->FormatFromSettings());\n }", "function datetimeToTimestamp($str) {\n if(substr($str, 0,1) == '0')\n return 0;\n\n list($date, $time) = explode(' ', $str);\n list($year, $month, $day) = explode('-', $date);\n list($hour, $minute, $second) = explode(':', $time);\n \n $timestamp = mktime($hour, $minute, $second, $month, $day, $year);\n \n return $timestamp;\n}", "public function getTimestamp() : int;", "private function timestampToDateTime(int $timestamp)\n {\n if ($timestamp < 0) {\n return null;\n }\n $datetime = new \\DateTime();\n $datetime->setTimestamp($timestamp);\n\n return $datetime;\n }", "function CTEPL__ts2date($timestamp, $format, $months=null, $lang_today=null, $lang_yesterday=null)\n{\n $is_current_year = (date('Y', $timestamp) == date('Y'));\n $prefix = '';\n $format = preg_replace('/\\((.*)Y(.*)\\)\\?/', ($is_current_year ? '' : '\\1Y\\2'), $format);\n \n if($is_current_year && date('n') == date('n', $timestamp))\n {\n if(!is_null($lang_today) && (int)date('j') == date('j', $timestamp))\n {\n $prefix = $lang_today;\n }\n elseif(!is_null($lang_yesterday) && (int)date('j')-1 == date('j', $timestamp))\n {\n $prefix = $lang_yesterday;\n }\n \n if(!empty($prefix))\n {\n $format = preg_replace('/d|j|D|l/', '', $format);\n $format = preg_replace('/F|m|M|n/', '', $format);\n }\n }\n \n $month_format = null;\n // Month full-string representation.\n if(strpos($format, 'F') !== false)\n {\n $month_str = $months[(int)date('n', $timestamp)];\n $month_format = 'F';\n }\n // Month short-string representation.\n elseif(strpos($format, 'M') !== false)\n {\n $month_str = substr($months[(int)date('m', $timestamp)], 0, 3);\n $month_format = 'F';\n }\n \n if(isset($month_str))\n $format = str_replace($month_format, addcslashes($month_str, 'A..z'), $format);\n \n return $prefix.date($format, $timestamp);\n}", "static public function _formatear($fecha){\n\n return strtotime(substr($fecha, 6, 4).\"-\".substr($fecha, 3, 2).\"-\".substr($fecha, 0, 2).\" \" .substr($fecha, 10, 6)) * 1000;\n\n }", "function reformat_date($timestamp){\n \n //initiate the date to be formatted\n $date_format = \"\";\n \n //get the year of the date\n $year = substr_replace($timestamp, \"\", 4, 15);\n \n \n //get the montrh of the date\n //remove the first part of the string\n $month = substr_replace($timestamp, \"\", 0, 5);\n \n //remove the end part of the string\n $month = substr_replace($month, \"\", 2, 12);\n \n \n //get the day of the date\n //remove the first part of the string\n $day = substr_replace($timestamp, \"\", 0, 8);\n \n //remove the last part of the string\n $day = substr_replace($day, \"\", 2, 9);\n \n \n \n //combine the values to get the date format\n $date_format = $year . \"-\" . $month . \"-\" . $day;\n \n \n \n return $date_format;\n}", "public function toViewFormat($timestamp)\n \t{\n\t\t\t\tif ($timestamp)\n\t\t\t\t\t\treturn $this->getDate($timestamp);\n \t}", "private function timestamp( $date )\n {\n $dateArr = explode('/', $date);\n return mktime(0,0,0, $dateArr[1], $dateArr[0], $dateArr[2]);\n }" ]
[ "0.70837337", "0.68050003", "0.6769371", "0.6744152", "0.6561437", "0.6379349", "0.63534564", "0.6262791", "0.6259346", "0.62453324", "0.61999476", "0.6176817", "0.61067206", "0.60982704", "0.60542965", "0.6053211", "0.6019409", "0.59910846", "0.5990686", "0.5990686", "0.5977997", "0.5977249", "0.5977249", "0.5975787", "0.59439594", "0.59084177", "0.58946955", "0.58861005", "0.58738315", "0.5853137", "0.5826755", "0.58207166", "0.57801163", "0.57594764", "0.57566875", "0.575095", "0.57508564", "0.57438564", "0.57388407", "0.5736828", "0.57313126", "0.5730632", "0.5728562", "0.5723589", "0.5721338", "0.57107323", "0.5698877", "0.5696337", "0.5686656", "0.5666783", "0.56600493", "0.5657018", "0.5656148", "0.565211", "0.56501216", "0.56487125", "0.5638482", "0.5635362", "0.5629296", "0.5605102", "0.5601047", "0.5569418", "0.5568208", "0.55646867", "0.5564398", "0.55622977", "0.5549126", "0.55455315", "0.55241674", "0.5506641", "0.5503475", "0.5501394", "0.5500492", "0.55000216", "0.54999965", "0.5495661", "0.5494249", "0.54927856", "0.5491965", "0.5489119", "0.548767", "0.5484406", "0.5481075", "0.5469493", "0.54607725", "0.5449583", "0.54438895", "0.5442847", "0.54354876", "0.5431072", "0.5430293", "0.5426813", "0.54265326", "0.5413431", "0.540962", "0.5400895", "0.5398968", "0.5393425", "0.53907835", "0.53876555" ]
0.7247792
0
Converts timestamp to numeric month (YYYYMM) E.g.: 201412
Преобразует временной штамп в числовое представление месяца (YYYYMM) Например: 201412
public static function getNumericMonth($timestamp = null) { if ($timestamp === null) { $timestamp = time(); } return (int) date('Ym', $timestamp); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMonthNumber(){\n return date(\"m\", $this->timestamp);\n }", "function num_to_month($monthNum){\n $dateObj = DateTime::createFromFormat('!m', $monthNum);\n return $dateObj->format('F'); // March\n\t}", "public function getMonth(): int\n {\n return (int) $this->format('n');\n }", "public function month()\n\t{\n\t\treturn static::$dateTime->format(\"n\");\n\t}", "public function month($int = true) {\n\t\t$month = (int) parent::format('n');\n\t\treturn $int ? $month : str_pad($month, 2, '0', STR_PAD_LEFT);\n\t}", "public function _getNumberMonth()\n {\n return ceil($this->_getDuration() / 31);\n }", "public function getMonth(): int\n {\n return (int) $this->getData()['month'];\n }", "public function getMonth()\n {\n return $this->format('n');\n }", "public function toMonth($month) {\n\t\treturn $this->toX($month, 'month');\n\t}", "public function getTwoDigitMonth()\n {\n return str_pad($this->month, 2, '0', STR_PAD_LEFT);\n }", "public function getMonth()\n {\n return str_pad($this->release_date->month, 2, '0', STR_PAD_LEFT);\n }", "public function getMonth()\n {\n return floor($this->convertToDateElement(Phpr_DateTime::elementMonth));\n }", "public function getMonthOfYear() {\n\t\treturn intval($this->toString('m'));\n\t}", "public static function monthFromInt($num)\n {\n return Arr::get(self::MONTHS, $num);\n }", "public function getMonth(): int;", "public function getMonth() : string\n {\n return date('m', $this->time);\n }", "public function getMonthAttribute()\n {\n $date = substr($this->created_at , 0 , 10);\n //Se explota la fecha\n $date = explode(\"-\",$date);\n //Se obtiene la fecha en formato timestamp\n $unix = mktime(0,0,0,$date[1],$date[2],$date[0]);\n //Se devuelve el valor\n return date('Y - m', $unix);\n }", "public static function getMonth() {\n $date = self::toJalali();\n return $date['month'];\n }", "public function get_month($month_number)\n {\n }", "public static function getYmDate($timestamp = null)\n {\n if (is_null($timestamp)) {\n $timestamp = self::getTime();\n }\n return date('Ym', $timestamp);\n }", "function fin_mois_precedent($timestamp, $format) {\n\tif (!$timestamp) return;\n\n\t$date = mktime(0, 0, 0, date('m', $timestamp), 0, date('Y', $timestamp));\n\treturn date($format, $date);\n}", "public function getTwoDigitMonth(): string\n {\n return str_pad($this->month, 2, '0', STR_PAD_LEFT);\n }", "function getMonth() {\n\t\treturn $this->format('m');\n\t}", "function valueToMonth($value){\n\t\t\t$month_arr = array(\"January\",\"February\",\"March\",\"Appril\",\"May\",\"June\",\"July\",\"Augost\",\"September\",\"October\",\"November\",\"December\");\n\t\t\t$int_value = intval($value);\n\t\t\t$month = $month_arr[$int_value - 1];\n\t\t\treturn $month;\n\t\t}", "public function getMonth(): int\n {\n return $this->month;\n }", "public function month_num($leading = true) {\n\t\t$leading = ($leading) ? 'm' : 'n';\n\n\t\treturn $this->formatted($leading);\n\t}", "public static function month($dateTime)\n {\n $date = new \\DateTime($dateTime);\n return $date->format(\"m\");\n }", "function numtomonth($nmonth)\n\t {\n\t if($nmonth==1){\n\t return \"January\";\n\t }elseif ($nmonth==2) {\n\t return \"February\";\n\t }elseif ($nmonth==3) {\n\t return \"March\";\n\t }elseif ($nmonth==4) {\n\t return \"April\";\n\t }elseif ($nmonth==5) {\n\t return \"May\";\n\t }elseif ($nmonth==6) {\n\t return \"Jun\";\n\t }elseif ($nmonth==7) {\n\t return \"July\";\n\t }elseif ($nmonth==8) {\n\t return \"August\";\n\t }elseif ($nmonth==9) {\n\t return \"September\";\n\t }elseif ($nmonth==10) {\n\t return \"October\";\n\t }elseif ($nmonth==11) {\n\t return \"November\";\n\t }elseif ($nmonth==12) {\n\t return \"December\";\n\t }else\n\t {\n\t $nmonth=$nmonth-12;\n\t return numtomonth($nmonth);\n\t }\n\t }", "public static function getCurrentMonth(): int\n {\n return (int)date('m');\n }", "protected static function month()\n {\n return str_pad(Carbon::today()->month, 2, \"0\", STR_PAD_LEFT);\n }", "public function monthConverter(){\n\t\t$month = array(\n\t\t\t'00'=>'asd', '01'=>'Januari','02'=>'Februari','03'=>'Maret','04'=>'April','05'=>'Mei',\n\t\t\t'06'=>'Juni','07'=>'Juli','08'=>'Agustus','09'=>'September','10'=>'Oktober',\n\t\t\t'11'=>'November','12'=>'Desember',\n\t\t);\n\t\treturn $month;\n\t}", "public function month($date);", "function monthConvert($month){\n switch ($month){\n case 1:\n return \"Jan\";\n break;\n case 2:\n return \"Feb\";\n break;\n case 3:\n return \"Mar\";\n break;\n case 4:\n return \"Apr\";\n break;\n case 5:\n return \"May\";\n break;\n case 6:\n return \"Jun\";\n break;\n case 7:\n return \"Jul\";\n break;\n case 8:\n return \"Aug\";\n break;\n case 9:\n return \"Sep\";\n break;\n case 10:\n return \"Oct\";\n break;\n case 11:\n return \"Nov\";\n break;\n case 12:\n return \"Dec\";\n break;\n default:\n }\n}", "function setMonth($value) {\n $this->month = (integer) $value;\n $this->setTimestampFromAttributes();\n }", "public function getMonth($time)\r\n {\r\n return __(date('F', $time));\r\n }", "function month($int) {\n\t\t$month = array(\n \t\" \", \n \t\"January\", \n \t\"February\", \n \t\"March\", \n \t\"April\", \n \t\"May\", \n \t\"June\", \n \t\"July\", \n \t\"August\", \n \t\"September\", \n \t\"October\", \n \t\"November\", \n \t\"December\"\n );\n\n $result = $month[$int];\n return $result;\n\t}", "public function day_month() {\n list($yr, $mt, $dt) = explode(\"-\", $this->date);\n return $dt + 0;\n }", "public function month(\\DateTimeInterface $dateTime)\n {\n return (integer)$dateTime->format('m');\n }", "public function get_month()\n {\n return $this->month;\n }", "public function getMonth($time)\n {\n return __(date('F', $time));\n }", "public function changemonth()\n\t{\n// \t\techo date(\"Y\")+543;\n\n\t\t$str_month = date(\"m\");\n\t\t$str_year = intval(date(\"Y\")+543);\n\t\t$thaimonth=array('01'=>\"มกราคม\",'02'=>\"กุมภาพันธ์\",'03'=>\"มีนาคม\",'04'=>\"เมษายน\",'05'=>\"พฤษภาคม\",'06'=>\"มิถุนายน\",'07'=>\"กรกฎาคม\",'08'=>\"สิงหาคม\",'09'=>\"กันยายน\",'10'=>\"ตุลาคม\",'11'=>\"พฤศจิกายน\",'12'=>\"ธันวาคม\");\n\t\t$date_time = 'ข้อมูล ณ '. date(\" j \"). $thaimonth[$str_month] . \" พ.ศ. \".$str_year;\n\t\treturn $date_time;\n\t}", "public function gMonth($fecha){\r\n\t\t$date = DateTime::createFromFormat(\"Y-m-d\", $fecha);\r\n\t\treturn $date->format(\"m\");\r\n\t}", "function get_month($Date){\n return date('m', parse_date($Date));\n }", "public function months_since_epoch()\n {\n\n $epoch = Configure::read('epoch');\n $sdate = new DateTime(\"@$epoch\");\n $edate = new DateTime();\n $startMonth = $sdate->format('m');\n $startYear = $sdate->format('Y');\n\n $endMonth = $edate->format('m');\n $endYear = $edate->format('Y');\n\n $endmonth = (($endYear - $startYear) * 12 + ($endMonth - $startMonth) + 1)-1;\n return $endmonth;\n }", "public static function getMonthNumber(DateTime $dateTime): int {\n return intval($dateTime->format(\"m\"));\n }", "public function getMonthCode()\n {\n return $this->month_code;\n }", "function month($year_or_datepoint, int $month = 1): Period\n{\n if (is_int($year_or_datepoint)) {\n return Period::fromMonth($year_or_datepoint, $month);\n }\n\n return Datepoint::create($year_or_datepoint)->getMonth();\n}", "public function getMonth()\r\n {\r\n return $this->month;\r\n }", "public function getValueForInputTypeMonth()\n {\n return HDateTime::createFromString($this->month)->toString('Y-m');\n }", "public function epoch_month_number($date)\n {\n $epoch = Configure::read('epoch');\n $sdate = new DateTime(\"@$epoch\");\n $edate = new DateTime($date);\n $startMonth = $sdate->format('m');\n $startYear = $sdate->format('Y');\n\n $endMonth = $edate->format('m');\n $endYear = $edate->format('Y');\n\n $endmonth = (($endYear - $startYear) * 12 + ($endMonth - $startMonth) + 1)-1;\n\n return $endmonth;\n }", "public function thisMonth()\n {\n return date(\"n\");\n }", "public function getMonthOfYear()\n {\n return $this->month_of_year;\n }", "public function getMonth()\n {\n return isset($this->month) ? $this->month : '';\n }", "public static function getMonthNum(\n DateTime $dateTimeObj,\n $locale = self::DEFAULT_LOCALE\n ) {\n return IntlDateFormatter::formatObject(\n IntlCalendar::fromDateTime($dateTimeObj),\n 'M',\n $locale\n );\n }", "public function getMonth($date){\n $dateTime = new DateTime($date);\n return $dateTime->format(\"m\");\n }", "public function month() \r\n {\r\n return $this->month;\r\n }", "public function getMonth()\n {\n return $this->month;\n }", "public function getMonth()\n {\n return $this->month;\n }", "public function months($format = null);", "public static function month_numbers()\n\t{\n\t\tfor($month = 1; $month <= 12; $month++)\n\t\t{\n\t\t\tif(strlen($month) == 1)\n\t\t\t{\n\t\t\t\t$month = sprintf('%02d', $month);\n\t\t\t}\n\n\t\t\t$array[$month] = $month;\n\t\t}\n\n\t\treturn $array;\n\t}", "function edd_paylane_sanitize_month( $month ) {\n if( strlen( $month ) == 1 ) {\n $month = '0' . $month;\n }\n\n return $month;\n}", "public function renderMonth($year, $month);", "public function month($value)\n {\n return $this->setProperty('month', $value);\n }", "public static function getMonth($date){\r\n\r\n\t\t$time = strtotime($date);\r\n\r\n\t\treturn date('m', $time);\r\n\t}", "public function getMonth() {\n return $this->_month;\n }", "public function monthsInYear() {\n\t\treturn 12;\n\t}", "public static function month()\n\t{\n\t\tfor($month = 1; $month <= 12; $month++)\n\t\t{\n\t\t\t$monthName = date(\"F\", mktime(0, 0, 0, $month, 10));\n\t\t\t$array[$month] = substr($monthName, 0, 3);\n\t\t}\n\n\t\treturn $array;\n\t}", "public static function getCurrentMonth(){\r\n\r\n\t\treturn date('n');\r\n\t}", "function numberToStringMonth($month){\n\t\t$result = \"\";\n\t\tswitch ($month) {\n\t\t\tcase '1':\n\t\t\t$result = 'January';\n\t\t\tbreak;\n\t\t\tcase '2':\n\t\t\t$result = 'February';\n\t\t\tbreak;\n\t\t\tcase '3':\n\t\t\t$result = 'March';\n\t\t\tbreak;\n\t\t\tcase '4':\n\t\t\t$result = 'April';\n\t\t\tbreak;\n\t\t\tcase '5':\n\t\t\t$result = 'May';\n\t\t\tbreak;\n\t\t\tcase '6':\n\t\t\t$result = 'June';\n\t\t\tbreak;\n\t\t\tcase '7':\n\t\t\t$result = 'July';\n\t\t\tbreak;\n\t\t\tcase '8':\n\t\t\t$result = 'August';\n\t\t\tbreak;\n\t\t\tcase '9':\n\t\t\t$result = 'September';\n\t\t\tbreak;\n\t\t\tcase '10':\n\t\t\t$result = 'October';\n\t\t\tbreak;\n\t\t\tcase '11':\n\t\t\t$result = 'November';\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t$result = 'December';\n\t\t\tbreak;\n\t\t}\n\t\treturn $result;\n\t}", "function getMonth() {\n return $this->month;\n }", "public static function getTimestampMonthStart(int $year, int $month): int\n {\n return strtotime($year . '-' . $month . '-01 00:00:00');\n }", "function TotalPerMonth($timestamp)\r\n{\r\n\t$total = 0;\r\n\t$monthOfYear = date('Y-m',strtotime($timestamp));\r\n\t$month = date('F \\of Y',strtotime($timestamp));\r\n\t\r\n\tglobal $COMMON;\r\n\t$query = \"SELECT COUNT(`id`) as 'count' FROM `ProjectDB` WHERE `timestamp` LIKE '{$monthOfYear}%'\";\r\n\t$return = $COMMON->executeQuery($query, $this);\r\n\t$countRows = $return->fetch(PDO::FETCH_ASSOC);\r\n\t$total = $countRows['count'];\r\n\t\r\n\t$result = sprintf('Total for %s is %u', $month, $total);\r\n\treturn $total;\r\n}", "public function payout_month_year() {\n\n $date = $this->get_datetime();\n $date->modify( \"+6 months\" );\n\n return $date->format( 'm-Y' );\n }", "public function getCcExpMonth()\n {\n $month = $this->getInfo()->getCcExpMonth();\n /* if ($month < 10) {\n $month = '0' . $month;\n } */\n return $month;\n }", "function getMonthAsString($inLong = false) {\n\t\treturn ($inLong) ? $this->format('F') : $this->format('M');\n\t}", "public static function month($dateValue)\n {\n if (is_array($dateValue)) {\n return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $dateValue);\n }\n\n try {\n $dateValue = Helpers::getDateValue($dateValue);\n } catch (Exception $e) {\n return $e->getMessage();\n }\n if ($dateValue < 1 && SharedDateHelper::getExcelCalendar() === SharedDateHelper::CALENDAR_WINDOWS_1900) {\n return 1;\n }\n\n // Execute function\n $PHPDateObject = SharedDateHelper::excelToDateTimeObject($dateValue);\n SharedDateHelper::roundMicroseconds($PHPDateObject);\n\n return (int) $PHPDateObject->format('n');\n }", "function month_to_digit($string) {\n\t\t$int = 0;\n\t\t\n\t\tswitch($string) {\n\t\t\tcase \"January\":\t\t$int = 01; break;\n\t\t\tcase \"February\":\t$int = 02; break;\n\t\t\tcase \"March\":\t\t\t$int = 03; break;\n\t\t\tcase \"April\":\t\t\t$int = 04; break;\n\t\t\tcase \"May\":\t\t\t\t$int = 05; break;\n\t\t\tcase \"June\":\t\t\t$int = 06; break;\n\t\t\tcase \"July\": \t\t\t$int = 07; break;\n\t\t\tcase \"August\":\t\t$int = 08; break;\n\t\t\tcase \"September\":\t$int = 09; break;\n\t\t\tcase \"October\":\t\t$int = 10; break;\n\t\t\tcase \"November\":\t$int = 11; break;\n\t\t\tcase \"December\":\t$int = 12; break;\n\t\t\tdefault:\t\t\t\t\t$int = 00; break;\n\t\t}\n\t\t\n\t\treturn $int;\n\t}", "protected function _getMonthFromDate($date)\n\t\t{\n\t\t\t$timestamp = strtotime($date);\n\t\t\t$date_format = strftime(\"%B, %Y\", $timestamp);\n\t\t\treturn $date_format;\n\t\t}", "private function monthsSince(): int\n {\n return \\absint($this->secondsSince() / (DAY_IN_SECONDS * (365 / 12)));\n }", "public function getPostMonth(): string\n {\n return $this->createdTime->format('F');\n }", "function sed_translate_date($timestampDate)\n\t{\t\n\t\tglobal $sed_months_list;\t\t\n\t\t$tday = date(\"d\", $timestampDate);\n\t\t$tmonths = $sed_months_list[(date('n', $timestampDate))];\n\t\t$tyear = date(\"Y\", $timestampDate);\t\t\n\t\treturn $tday.\" \".$tmonths.\" \".$tyear;\n\t}", "public static function getMonths() {\n $output = [];\n for ($i=1; $i<=12; $i++) {\n $output[$i] = strftime(\"%B\", strtotime(\"2017-{$i}-01\"));\n }\n return $output;\n }", "public function splitByMonth();", "function datetotimestamp($date_limite)\n{\n\t$day = substr($date_limite, 8, 2);\n $month = substr($date_limite, 5, 2);\n // $month = date('m', strtotime(\"$month 1 2011\"));\n $year = substr($date_limite, 0, 4);\n \n\n $timestamp = mktime($month, $day, $year);\n\n date_default_timezone_set('UTC');\n\n return $timestamp;\n}", "public static function daysInMonth($year, $month) \r\n {\r\n $date = new DateTime($year, $month, 1);\r\n return $date->toString(\"t\");\r\n }", "public function toMonths() : int\n {\n return intval($this->interval / (Time::DAY * 30));\n }", "static public function mes() {\r\n\t\treturn date ( \"m\" );\r\n\t}", "function month_name($month_number)\n{\n return date('F', mktime(0, 0, 0, $month_number, 10));\n}", "function dtlCurrentMonth() {\n return date('m');\n}", "public function getMonth($format)\n {\n $monthDays = date('t', $this->_timestamp);\n\n return array('from' => date($format, strtotime($this->_year . '-' . $this->_month . '-01')),\n 'to' => date($format, strtotime($this->_year . '-' . $this->_month . '-' . $monthDays)));\n }", "public static function getMonth(int $month)\n {\n return self::getMonthList()[$month];\n }", "public function get_month_permastruct()\n {\n }", "function get_month_shortname($m=\"\") {\n \tif ($m==\"\") {\n \t\t$m = $this->mdate(\"m\");\n \t\t}\n\t\t$dt = \\DateTime::createFromFormat('!m', $m);\n\t\treturn $dt->format('M');\n \t}", "public static function generating_year_month($date_string) {\n $year_month = Carbon::parse($date_string);\n // generating date\n $month = $year_month->month;\n $year = $year_month->year;\n $date = Carbon::createFromDate($year, $month, 1);\n return $date;\n }", "public function getMonthDay(): int;", "public function monthPadded() {\n\t\treturn $this->month(false);\n\t}", "public function getMonthName(): string;", "public function getOsMonth()\n {\n return $this->os_month;\n }", "protected function getMonthFromDate($date)\r\n {\r\n $date = explode(\"-\", $date);\r\n $date_month = $date[1];\r\n return $date_month;\r\n }", "public static function setYearMonth($date)\r\n\t{\r\n\t\tif (!self::isValidTimeStamp($date))\r\n\t\t{\r\n\t\t\t$date = strtotime($date);\r\n\t\t}\r\n\t\treturn date('Y/m', $date);\r\n\t}" ]
[ "0.7687935", "0.7173926", "0.68958163", "0.6829311", "0.6761846", "0.66626596", "0.66331303", "0.6628582", "0.66270995", "0.6602347", "0.6584978", "0.6548916", "0.65395176", "0.6531909", "0.6490069", "0.6469238", "0.6449113", "0.6392957", "0.63731843", "0.6372883", "0.6345222", "0.63400686", "0.6328025", "0.6327433", "0.6326892", "0.632317", "0.6270124", "0.6266163", "0.62349814", "0.6204659", "0.6180381", "0.61735195", "0.6128141", "0.61167246", "0.60933584", "0.6087455", "0.60780346", "0.6064097", "0.60548055", "0.601211", "0.59960985", "0.59702283", "0.5967675", "0.59444755", "0.5935235", "0.59108686", "0.5909137", "0.59090906", "0.5906629", "0.5898088", "0.5889575", "0.58807087", "0.58787096", "0.5868438", "0.58639526", "0.5856321", "0.5848244", "0.5848244", "0.58211887", "0.58009213", "0.5792979", "0.5785318", "0.57823014", "0.5757961", "0.57534814", "0.5728997", "0.5728168", "0.57219946", "0.57164145", "0.5711336", "0.5700429", "0.56994486", "0.5697003", "0.56774133", "0.56737214", "0.5660341", "0.5657381", "0.5655588", "0.56339467", "0.56317294", "0.56294173", "0.56263953", "0.56225973", "0.56110793", "0.56092054", "0.5608589", "0.55932456", "0.5573921", "0.5550609", "0.55361", "0.5524277", "0.55227745", "0.5514628", "0.55124027", "0.55109507", "0.550945", "0.55066746", "0.5504707", "0.54903173", "0.5487859" ]
0.75658894
1
Checks is given timestamp is today.
Проверяет, что заданный временной штамп сегодняшний.
public static function isToday($timestamp) { return date('Y-m-d', $timestamp) == date('Y-m-d'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_today( $timestamp ){\n if( is_string( $timestamp ) ){\n $timestamp = strtotime( $timestamp );\n }\n \n if( date('Ymd') == date('Ymd', $timestamp ) ){\n \n return true;\n \n } else {\n \n return false;\n \n }\n \n}", "public function isToday() : bool\n {\n return date('Ymd', $this->getTimestamp()) == date('Ymd');\n }", "protected function isToday()\n {\n $now = new \\DateTime();\n\n return $now->format('Y-m-d') === $this->date->format('Y-m-d');\n }", "public function isToday($timestamp_current_time = null)\n {\n $datum_current_time = new \\DateTime();\n // $datum_current_time->setTimestamp(strtotime($this->current_time));\n\n $timestamp_current_time = $this->timestampTime($datum_current_time);\n\n $day_number = $this->extractDaynumber($timestamp_current_time);\n //$day_number = $this->extractDaynumber($t);\n $minute = $this->extractMinute($timestamp_current_time);\n $hour = $this->extractHour($timestamp_current_time);\n\n // An hour is 24 hours of 60 minutes.\n $day_percent = ($minute + $hour * 60) / (24 * 60);\n\n $day_degrees = (float) $day_percent * 360;\n $day_radians = ((float) $day_degrees / 180) * pi();\n\n $timestamp_working_time = $this->timestampTime($this->working_datum);\n //$t = $timestamp_working_datum;\n\n $epoch_working = strtotime($timestamp_working_time);\n $epoch_current = strtotime($timestamp_current_time);\n $epoch_start_of_today = $epoch_current - $day_percent * 24 * 60 * 60;\n $epoch_end_of_today =\n $epoch_current + (1 - $day_percent) * 24 * 60 * 60;\n\n $sunFlag = false;\n\n if (\n $epoch_working > $epoch_start_of_today and\n $epoch_working < $epoch_end_of_today\n ) {\n $sunFlag = true;\n }\n return $sunFlag;\n }", "public function isToday()\n {\n return $this->formatDate() === static::now($this->getTimezone())->formatDate();\n }", "function sumo_verify_is_today()\n{\n\tGLOBAL $SUMO;\n\n\t$file = SUMO_PATH.'/tmp/today';\n\t$today = date(\"Ymd\", $SUMO['server']['time']);\n\t$date = '';\n\n\tif(@file_exists($file))\n\t{\n\t\t$fp = fopen ($file, 'r+') OR die (sumo_get_message('E00105X', $file));\n\t\t$date = fgets ($fp, 9);\n\t \t\tfclose($fp);\n\t}\n\n\treturn $date == $today ? true : false;\n}", "protected function checkDate($timestamp) {\r\n\t\t$now = time();\r\n\t\t\r\n\t\tif ($timestamp > 0 && $timestamp < $now) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "function isUpdatedToday ($updated) {\n\t\treturn floor(strtotime($updated) / 60 / 60 /24) >= floor(time() / 60 / 60 /24);\n\t}", "public function isCurrentDate(): bool;", "public function isCurrentDate(): bool {\n $today = date('Y-m-d');\n $thisDay = $this->getDateTime()->format('Y-m-d');\n return $today === $thisDay;\n }", "public static function isToday(DateTime $date): bool\n {\n return $date->format('Ymd') === self::formatNow('Ymd');\n }", "public static function isToday($datetime)\n {\n $diff = self::diffDateTimeDaysToNow($datetime);\n if ($diff == 0) {\n return true;\n } else {\n return false;\n }\n }", "function check_today($player) {\n\t$found = 1;\n\n\t$last = trim(file_get_contents(_PWD . '/' . $player->steamid));\n\tif ($last != date('m/d/Y')) {\n\t\t$found = 0;\n\t}\n\n\treturn $found;\n}", "function is_future( $date ){\n if( is_string( $date ) ){\n $date = strtotime( $timestamp );\n }\n \n if( $date > time() ){\n \n return true;\n \n } else {\n \n return false;\n \n }\n \n}", "function checkToday($Sid, $Lid){\n\t\trequire_once 'lib/DB.php';\n\t\t\n\t\t$today = date(\"Y-m-d\");\n\t\t\n\t\t$db = new DB();\n\t\t$sql = \"SELECT * \n\t\t\tFROM _files\n\t\t\tWHERE S_id = '$Sid'\n\t\t\t\tAND L_id = '$Lid'\n\t\t\t\tAND F_date = '$today'\";\n\t\t$db->query($sql);\n\t\t\n\t\tif($db->fetch_array()){\n\t\t\treturn true;\t\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\n\t}", "function is_yesterday( $timestamp ){\n if( is_string( $timestamp ) ){\n $timestamp = strtotime( $timestamp );\n }\n \n if( date('Ymd', time() - DAY_IN_SECONDS ) == date('Ymd', $timestamp ) ){\n \n return true;\n \n } else {\n \n return false;\n \n }\n \n}", "function is_tomorrow( $timestamp ){\n if( is_string( $timestamp ) ){\n $timestamp = strtotime( $timestamp );\n }\n \n if( date('Ymd', time() + DAY_IN_SECONDS ) == date('Ymd', $timestamp ) ){\n \n return true;\n \n } else {\n \n return false;\n \n }\n \n}", "function is_date_correct_and_later_than_current_day($value): bool {\n $now = date_create('today');\n $lot_date = date_create($value);\n\n return $lot_date > $now && date_interval_format(date_diff($lot_date, $now), \"%a\") >= 1;\n}", "function aa_dates_today($atts,$thing)\n\t{\n \t\tglobal $uPosted;\n\t\textract(lAtts(array(\n\t\t\t'date' => '',\n\t\t\t'offset' => '0'\n\t\t),$atts));\n return parse(Evalelse($thing, ( ceil((mktime() + tz_offset())/86400) == (ceil($uPosted/86400) ) )));\n\t}", "public function isDayOpenedToday()\n\t{\n\t\t$ts_start = !empty(CTimeManUser::$LAST_ENTRY[$this->USER_ID]['DATE_START']) ? (MakeTimeStamp(CTimeManUser::$LAST_ENTRY[$this->USER_ID]['DATE_START']) - CTimeZone::GetOffset()) : time();\n\t\t$ts_start_day = MakeTimeStamp(ConvertTimeStamp($ts_start, 'SHORT'));\n\n\t\t// server time that was at the day start\n\t\t$time_start = $ts_start - $ts_start_day;\n\n\t\t// server timezone diff with server that was at the day start\n\t\t$timezone_diff = CTimeManUser::$LAST_ENTRY[$this->USER_ID]['TIME_START'] - $time_start;\n\n\t\t// current date with such timezone_diff;\n\t\t$t = time();\n\t\t$date_current = date('Y-m-d', $t + $timezone_diff);\n\t\t$date_current_day = date('Y-m-d', $ts_start_day);\n\n\t\treturn $date_current == $date_current_day;\n\t}", "public function testItHasADefaultTimestampOfTodayMidnight()\n {\n $expectedTimestamp = strtotime(date('Y-m-d') . ' 00:00:00');\n\n $timestamp = $this->showFrom->getShowFrom();\n\n $this->assertEquals(\n $expectedTimestamp,\n $timestamp\n );\n }", "function isToday($offset = null) {\n $today = new DateTimeValue(time() + $offset);\n $today->beginningOfDay();\n \n return $this->getDay() == $today->getDay() &&\n $this->getMonth() == $today->getMonth() &&\n $this->getYear() == $today->getYear();\n }", "private function validateTimestampInTheFuture($timestamp)\n {\n return $timestamp >= time();\n }", "public function testDirectCallToToday(): void\n {\n // and second do not take place in same second.\n do {\n $dtStart = new DateTimeImmutable();\n $startSecond = $dtStart->format('s');\n $result = Current::today();\n $endSecond = (new DateTimeImmutable('now'))->format('s');\n } while ($startSecond !== $endSecond);\n\n $this->assertions($dtStart, $result);\n }", "public function isExpired() {\n $today = new \\DateTime('now', new \\DateTimeZone('Europe/London'));\n // Reset the clock to avoid issues with time comparisons.\n $today->setTime(0, 0, 0);\n\n return ($this->date < $today) ? TRUE : FALSE;\n }", "function timetoEat() {\n\tif(time() > strtotime(\"today 03:00pm\")&&\n\t\ttime() < strtotime(\"today 09:00pm\")) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "public function isUpdatedToday() {\n return Geo::wasPoiUpdatedToday($this->getLastUpdatedString());\n }", "function isNew($publishd_at)\n{\n return (Carbon::now()->diffInDays(Carbon::createFromFormat('Y-m-d H:i:s', $publishd_at))) <= 7;\n}", "public function can_submit_today()\n {\n // For testing, you can uncomment below to set what day today is globally\n //Carbon::setTestNow(Carbon::create(2018, 1, 15, 10, 18, 00));\n\n $today = Carbon::now();\n\n $submission_date = $this->submission_date();\n\n if ($today->isSameDay($submission_date)) {\n // Check if it's not past the deadline\n //return $today->lte($submission_date);\n }\n\n // Return quick if the actual submission date is not on a Monday\n// if (!$submission_date->isMonday()) return false;\n\n // If today is the Friday before a Monday submission date, allow (from 6pm)\n Carbon::setTestNow($submission_date);\n $friday_before_submission = new Carbon('last friday');\n $friday_before_submission->hour = 18;\n $friday_before_submission->minute = 0;\n $friday_before_submission->second = 0;\n Carbon::setTestNow();\n\n\n // Check if now is between Friday 6pm and Monday 2pm\n return $today->between($friday_before_submission, $submission_date);\n }", "public static function isToday($dateString, $timezone = null) {\r\n\t\t$timestamp = self::fromString($dateString, $timezone);\r\n\t\t$now = self::fromString('now', $timezone);\r\n\t\treturn date('Y-m-d', $timestamp) == date('Y-m-d', $now);\r\n\t}", "protected function isFuture($timestamp)\n {\n return ((int) $timestamp) >= (new Carbon())->getTimestamp();\n }", "public static function valid_timestamp($timestamp)\n\t{\n\t\t$timestamp_cutoff = \\Config::get('engine.timestamp_cutoff', 15);\n\t\t\n\t\t// Is the timestamp from 60 seconds ago up to the current time?\n\t\tif ((int)$timestamp >= (static::$gm_time - (int)$timestamp_cutoff) && (int)$timestamp <= static::$gm_time) {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// Timestamp out of scope\n\t\treturn false;\n\t}", "function is_now_after( int $date ){\n\treturn (time() >= date);\n}", "function is_past( $date ){\n if( is_string( $date ) ){\n $date = strtotime( $timestamp );\n }\n \n if( $date < time() ){\n \n return true;\n \n } else {\n \n return false;\n \n }\n \n}", "public function checkAutoInCurrentDate()\n {\n $hFunction = new \\Hfunction();\n $checkDate = $hFunction->currentDate();\n return QcCompany::where('checkAutoDate', 'like', \"%$checkDate%\")->exists();\n }", "private function checkEventDateFuture(){\n $startTime = Carbon::createFromFormat('m/d/Y h:i a', $this->start_time);\n $now = Carbon::now();\n\n return $now->diffInHours($startTime, false) >= 2;\n }", "public static function isYesterday($timestamp)\n {\n return date('Y-m-d', $timestamp) == date('Y-m-d', strtotime('yesterday'));\n }", "function isExpired($now) {\r\n if (! $this->_expiry) {\r\n return true;\r\n }\r\n if (is_string($now)) {\r\n $now = strtotime($now);\r\n }\r\n return ($this->_expiry < $now);\r\n }", "public function testIfTokenCanBeGeneratedByCurrentTimestamp(): void {\r\n\r\n $this -> assertTrue(true === is_string($this -> totp -> now()));\r\n $this -> assertTrue(6 === strlen($this -> totp -> now()));\r\n $this -> assertRegExp('#[0-9]{6,6}#', $this -> totp -> now());\r\n }", "public function date_today($sDate, $sFormat)\n {\n // If blank, then assume the date is not required\n if (empty($sDate)) {\n return true;\n }\n\n if (empty($sFormat)) {\n $sFormat = 'Y-m-d';\n }\n\n if (!array_key_exists('date_today', $this->_error_messages)) {\n $this->set_message('date_today', lang('fv_valid_date_today_field'));\n }\n\n try {\n\n /** @var \\DateTime $oNow */\n $oNow = Factory::factory('DateTime');\n $oDate = \\DateTime::createFromFormat($sFormat, $sDate);\n\n if (empty($oDate)) {\n return false;\n }\n\n $oNow->setTime(0, 0, 0);\n $oDate->setTime(0, 0, 0);\n\n return $oDate === $oNow;\n\n } catch (\\Exception $e) {\n\n return false;\n }\n }", "function today_in_range($timestamp_range) {\n\n $length = count($timestamp_range);\n reset($timestamp_range);\n for ($i = 0; $i < $length; $i++) {\n if ((time() >= strtotime($timestamp_range[$i][0])) && (time() <= strtotime($timestamp_range[$i][1]))) {\n return TRUE;\n }\n }\n}", "static function today()\n\t{\n\t\treturn mktime(0, 0, 0, date('m'), date('d'), date('Y'));\n\t}", "public function isTimestampValid()\n {\n return $this->hasTimestamp() && intval($this->timestamp) > time();\n }", "function today($format=\"Y-m-d H:i:s\")\r\n{\r\n return date($format);\r\n}", "function yourls_check_timestamp( $time ) {\n\t$now = time();\n\t// Allow timestamp to be a little in the future or the past -- see Issue 766\n\treturn yourls_apply_filter( 'check_timestamp', abs( $now - (int)$time ) < yourls_get_nonce_life(), $time );\n}", "public function minToday($check) {\n $value = array_values($check);\n $value = $value[0];\n\n return $value <= date('Y-m-d');\n }", "private function timestampHasExpired($timestamp)\n {\n $year = (int) substr($timestamp, 0, 4);\n $month = (int) substr($timestamp, 5, 2);\n $day = (int) substr($timestamp, 8, 2);\n $hour = (int) substr($timestamp, 11, 2);\n $minute = (int) substr($timestamp, 14, 2);\n $second = (int) substr($timestamp, 17, 2);\n\n $timestamp = gmmktime($hour, $minute, $second, $month, $day, $year);\n\n $diff = time() - $timestamp;\n\n if ($diff > $this->maxDiff || $diff < -$this->maxDiff) {\n return true;\n }\n\n return false;\n }", "public function checkWorkInAfternoonByCurrentTime()\n {\n $hours = (int)date('H');\n if (14 <= $hours && $hours < 18) { # tinh vao buoi chieu\n return true;\n } else {\n return false;\n }\n }", "public function isValidOTPTime() {\n $timenow = Carbon::now();\n return $timenow->diffInMinutes($this->created_at) < 10;\n }", "function is_future($date) {\n return strtotime($date) >= strtotime(date('Ymd'));\n}", "public function getExactTodayDate()\n {\n $offset = 7 * 60 * 60; //converting 7 hours to seconds. / (GMT+7)\n $dateFormat = \"Y-m-d H:i:s\";\n $now = gmdate($dateFormat, time() + $offset);\n\n return $now;\n }", "private function checkTime()\n {\n $morning_start = new \\DateTime($this->date->format('Y-m-d') . '07:00', $this->date->getTimezone());\n $morning_end = new \\DateTime($this->date->format('Y-m-d') . '09:30', $this->date->getTimezone());\n\n if ($this->date >= $morning_start && $this->date < $morning_end) {\n return false;\n }\n\n $afternoon_start = new \\DateTime($this->date->format('Y-m-d') . ' 16:00', $this->date->getTimezone());\n $afternoon_end = new \\DateTime($this->date->format('Y-m-d') . '19:30', $this->date->getTimezone());\n \n if ($this->date >= $afternoon_start && $this->date < $afternoon_end) {\n return false;\n }\n\n return true;\n }", "private function today(): string\n {\n return date(\"Y-m-d\", time());\n }", "public function isInFuture(): bool\n {\n $today = mktime(23, 59, 59, (int) date('m'), (int) date('d'), (int) date('Y'));\n if ($this->start->timestamp() > $today) {\n return true;\n }\n\n return false;\n }", "function today () {\n\treturn date('Y-m-d');\n}", "public function isBeforeNow() {\n\t\treturn $this->isBefore(static::now());\n\t}", "public function isExpired(){\n\t\t$dtToronto = Carbon::now();\n\t\t$dtVancouver = Carbon::createFromFormat('Y-m-d H:i:s', $this->created_at);\n\t\t$interval = $dtVancouver->diffInHours($dtToronto);\n\t\treturn ($interval < 24);\n\t}", "public static function today()\n\t{\n\t\treturn date('Y-m-d');\n\t}", "public function today()\n {\n return new \\DateTime('today');\n }", "public function hasTimestamp(){\n return $this->_has(2);\n }", "function __validToken($token_created_at) {\n \t$expired = strtotime($token_created_at) + 86400;\n \t$time = strtotime(\"now\");\n \tif ($time < $expired) {\n \t\treturn true;\n \t}\n \treturn false;\n }", "public static function today() \r\n {\r\n $now = self::now();\r\n return $now->date();\r\n }", "function alexa_validate_timestamp ($timestamp) {\n\n\t// Ensure that the timestamp from within the HTTP request JSON is within the past minute\n\tif (time() - strtotime($timestamp) > 60) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n}", "function validDate($biddate, $bidtime) {\r\n $today = date(\"Y-m-d H:i:s\");\r\n $total_date = $biddate.' '.$bidtime;\r\n if($today > $total_date) {\r\n echo \"Error: Date must be a future item and date<br><br>\";\r\n return FALSE;\r\n }\r\n return TRUE;\r\n }", "public function is_time() {\n\n\t\t\t$installed = (int) get_option( $this->key, false );\n\n\t\t\tif ( 0 === $installed ) {\n\t\t\t\t$this->setup_date();\n\t\t\t\t$installed = time();\n\t\t\t}\n\n\t\t\tif ( $installed + ( $this->days * 86400 ) > time() ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\n\t\t}", "public function getTodayDate(){\n\t\t\n\t\t$fecha = date('Y-m-j H:m:s');\n\t\t\n\t\t$fecha_actual = strtotime ( '-6 hour' , strtotime ( $fecha ) ) ;\n\t\t$fecha_actual = date ( 'Y-m-j H:m:s' , $fecha_actual );\n\t\t\n\n\t\treturn $fecha_actual;\n\t}", "private function _checkExpired($timestamp, $expiration) {\n $result = false;\n if ($expiration !== 0) {\n $timeDiff = time() - $timestamp;\n ($timeDiff > $expiration) ? $result = true : $result = false;\n }\n return $result;\n }", "public function hasExpirationDate();", "public function Check_StrIfDateTest()\n {\n $lib = new CommonClass;\n $flag = $lib ->chkDate('2021-10-16');\n $this->assertTrue($flag);\n }", "public function testIfTokenCanBeGeneratedGivenTimestamp(): void {\r\n\r\n $this -> assertTrue(true === is_string($this -> totp -> timestamp(time())));\r\n $this -> assertTrue(6 === strlen($this -> totp -> timestamp(time())));\r\n $this -> assertRegExp('#[0-9]{6,6}#', $this -> totp -> timestamp(time()));\r\n $this -> assertEquals(240156, $this -> totp -> timestamp(1569941537));\r\n }", "function nowDate(){\nreturn $today = date(\"F j, Y, g:i a\"); \n}", "protected function sessionTimestamp() {\n\n\t\t$validTimestamp = $this->sessionHandler->getSubmittedValidTimestampId();\n\n\t\tif ($validTimestamp !== FALSE) {\n\t\t\treturn FALSE; // no spam\n\t\t} else {\n\t\t\treturn TRUE; // spam\n\t\t}\n\t}", "public function isNewerThan(DateTime $provided): bool\n {\n return Date::validateObject($this->dateTime)->isNewerThan($provided);\n }", "function checkIfCorrectTime() {\r\n return (date(\"H:i\") == \"02:59\");\r\n }", "public function checkWorkInEveningByCurrentTime()\n {\n $hours = (int)date('H');\n if (1 <= $hours && $hours < 4) { # tang ca den ngay hom sau\n return true;\n } elseif (18 <= $hours) { # tinh vao buoi chieu\n return true;\n } else {\n return false;\n }\n }", "public function isFresh($timestamp)\n {\n if (!$this->maxTimestamp && $this->resources) {\n $this->maxTimestamp = max(array_map('filemtime', $this->resources));\n }\n return $this->maxTimestamp < $timestamp;\n }", "public function test_check_timestamp( $timestamp, $is_valid ) {\n $this->assertSame(yourls_check_timestamp( $timestamp ), $is_valid );\n }", "public function getTodayDate()\n\t{\n\t\t$this->load->helper('date');\n // get time stamp\n $time = time();\n \n $dateString = \"%Y-%m-%d\";\n return mdate($dateString, $time);\n\t\t\n\t}", "function todaytime() {\n return $this->mdate('l jS \\of F Y ' . $this->timeFormat);\n }", "public static function now(string $input, string $value): void\n {\n $time = date_timestamp_get(date_create($value));\n if ($time < time()) {\n self::$errors[$input] = \"The date cannot be older of the current time\";\n }\n }", "public function isTomorrow()\n {\n return $this->formatDate() === static::tomorrow($this->getTimezone())->formatDate();\n }", "function thaidate(string $format = 'j F Y', $timestamp = 'now', bool $buddhistEra = true)\n{\n if (is_string($timestamp)) {\n $timestamp = strtotime($timestamp);\n }\n\n if ($timestamp instanceof DateTime) {\n $timestamp = $timestamp->getTimestamp();\n }\n\n return (new Thaidate)->date($format, $timestamp, $buddhistEra);\n}", "public static function today_date(){\n\t date_default_timezone_set('Asia/Kolkata');\n\t $date = date('Y-m-d H:i:s');\n\t return $date;\n\t }", "function too_soon(){\n\tdate_default_timezone_set('America/Chicago'); // CDT\n\t$info = getdate();\n\t$date = $info['mday'];\n\t$month = $info['mon'];\n\t$year = $info['year'];\n\t$hour = $info['hours'];\n\t$min = $info['minutes'];\n\t$sec = $info['seconds'];\n\t$current_date = \"$date/$month/$year $hour:$min:$sec\";\n\techo $current_date . \"<br>\";\n\tif($month > 4){\n\t\techo \"Month is greater than 4.\";\n\t\treturn false;\n\t}\n\telse if ($month == 4 && $date > 27){\n\t\techo \"Month is 4 and date is greater than 27. Date: $date<br>\";\n\t\techo \"$month $year $hour $min $sec $date\";\n\t\treturn false;\n\t}\n\telse if($month == 4 && $date == 27 && $hour >= 10){\n\t\techo \"We are on 4/27 and the hour is at least 10\";\n\t\treturn false;\n\t}\n\telse{\n\t\techo \"Date is before 4/27 10:00.\";\n\t\treturn true;\n\t}\n}", "function now($totime = false, $now = false){\n if(!$now) {$now = time();}\n if(debugmode()){\n if (isset($_GET[\"now\"]) && $_GET[\"now\"]) {\n $now = strtotime($_GET[\"now\"]);\n }\n }\n if($totime === true){return $now;}\n if($totime !== false && $totime !== true){return date($totime, $now);}\n return date(\"Y-m-d H:i:s\", $now);\n }", "function isTimestamp($timestamp)\n{\n \n return Types::isTimestamp($timestamp);\n \n}", "public function hasExpired(): bool\n {\n // Check if current timestamp (which is a Carbon instance) \n // is greater than expires_at.\n return $this->freshTimestamp()->gt($this->expires_at);\n }", "public static function isThisWeek($timestamp)\n {\n return date('o-\\\\WW', $timestamp) == date('o-\\\\WW');\n }", "public function hasTimeStamp()\n {\n return $this->time_stamp !== null;\n }", "function timestamp_expired ($old_timestamp, $minutes){\n $pasttime= strtotime($old_timestamp);\n $curtime = time();//In seconds since the UNIX epoch\n if ($curtime - $pasttime > ($minutes * 60))\n return true;\n else\n return false;\n}", "public function hasTimestamp()\n {\n return $this->timestamp !== null;\n }", "public function hasTimestamp()\n {\n return $this->timestamp !== null;\n }", "public static function isTimestamp(int $timestamp): bool\n {\n $validator = new DateValidator();\n $validator->format = 'php:U';\n\n return $validator->validate($timestamp);\n }", "public function getTodayDateWithTime()\n\t{\n\t\t$this->load->helper('date');\n // get time stamp\n $time = time();\n \n $dateString = \"%Y-%m-%d-%h-%i\";\n return mdate($dateString, $time);\n\t\t\n\t}", "function betting_day($datetime){\n $today = \\Carbon\\Carbon::parse($datetime)->startOfDay();\n\n $start = \\Carbon\\Carbon::parse($today)->addHours(12);\n if(strtotime($datetime) > strtotime($start)){\n return $today;\n }else{\n return \\Carbon\\Carbon::parse($today)->subDay();\n }\n }", "public function hasExpired(){\n \treturn strtotime($this->expires_at) < time();\n }", "public function isYesterday()\n {\n return $this->formatDate() === static::yesterday($this->getTimezone())->formatDate();\n }", "public function checkLastDate() {\n\t\t\t$conn = $this->getConnection();\n\t\t\t$query = \"SELECT date FROM weeklyleaders WHERE date >= NOW() - INTERVAL 156 HOUR\";\n\t\t\t$q = $conn->prepare($query);\n\t\t\t$q->execute();\n\t\t\t$array = $q->fetch();\n\t\t\treturn isset($array['date']);\n\t\t}", "function zero_crontab_check_datetime($date_this, $date_cron)\n{\n // any valid value or exact match\n if ( '*' == $date_cron || $date_this == $date_cron )\n {\n return true;\n }\n // range\n if ( false !== strpos($date_cron, '-') )\n {\n $arr = explode('-', $date_cron);\n if ( $arr[0] <= $date_this && $date_this <= $arr[1] )\n {\n return true;\n }\n return false;\n }\n // fold\n else if ( false !== strpos($date_cron, '/') )\n {\n $arr = explode('/', $date_cron);\n if ( $date_this % $arr[1] )\n {\n return false;\n }\n return true;\n }\n // list\n else if ( false !== strpos($date_cron, ',') )\n {\n $arr = explode(',', $date_cron);\n if ( in_array($date_this, $arr) )\n {\n return true;\n }\n return false;\n }\n else\n {\n return false;\n }\n}", "function today($tz = null)\n {\n return Carbon::today($tz);\n }" ]
[ "0.8258842", "0.78857374", "0.74460566", "0.74345", "0.7368617", "0.7329381", "0.71365905", "0.6735148", "0.66653115", "0.6636087", "0.6599793", "0.6566274", "0.6559666", "0.6407061", "0.63870585", "0.63792735", "0.6377691", "0.6270031", "0.62454647", "0.62390476", "0.6226006", "0.6191991", "0.61680233", "0.6158189", "0.61171", "0.61047894", "0.60771704", "0.60146487", "0.6001133", "0.59728247", "0.5965591", "0.5963392", "0.59370416", "0.59360343", "0.59058726", "0.58660275", "0.58382535", "0.5828385", "0.58206606", "0.57989305", "0.5760947", "0.57595414", "0.5736848", "0.5731941", "0.572969", "0.57288194", "0.5713321", "0.5706321", "0.56654507", "0.566193", "0.564617", "0.5638259", "0.56299293", "0.5622824", "0.5612012", "0.5605035", "0.558217", "0.55713725", "0.556576", "0.55652136", "0.5563845", "0.55603063", "0.55563295", "0.55542165", "0.55474913", "0.55343014", "0.55338454", "0.5521498", "0.5521475", "0.5520614", "0.5510135", "0.55090463", "0.55009735", "0.54868776", "0.5484764", "0.547657", "0.54721814", "0.5470288", "0.54576683", "0.54468465", "0.54419285", "0.5429581", "0.5428538", "0.5428173", "0.5418749", "0.5417008", "0.5415799", "0.5412174", "0.5405327", "0.54048467", "0.5399902", "0.5399902", "0.53993833", "0.5397289", "0.5395809", "0.5387231", "0.5381522", "0.5371868", "0.53620034", "0.5353672" ]
0.7937512
1
Checks is given timestamp is yesterday.
Проверяет, что заданный временной штамп — вчерашний.
public static function isYesterday($timestamp) { return date('Y-m-d', $timestamp) == date('Y-m-d', strtotime('yesterday')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_yesterday( $timestamp ){\n if( is_string( $timestamp ) ){\n $timestamp = strtotime( $timestamp );\n }\n \n if( date('Ymd', time() - DAY_IN_SECONDS ) == date('Ymd', $timestamp ) ){\n \n return true;\n \n } else {\n \n return false;\n \n }\n \n}", "function testYesterday($val){\n if($val[\"added\"] == date(\"Y-m-d\",strtotime(\"-1 day\")) ){\n return true;\n }\n }", "public function isYesterday()\n {\n return $this->formatDate() === static::yesterday($this->getTimezone())->formatDate();\n }", "function isYesterday($offset = null) {\n return $this->isToday($offset - 86400);\n }", "static public function getYesterday(): string {\n return \\date('Y-m-d', \\strtotime(\"-1 days\"));\n }", "function subtractOneDay($_date){\r\n\t\t$timeStamp = StrToTime($_date);\r\n\t\t$a = StrToTime('-1 days', $timeStamp);\r\n\t\t$nextday=date('Y-m-d', $a);\t\t\r\n\t\treturn $yesterday;\t\r\n\t}", "static public function yesterday()\n\t{\n\t\t$date = new Piwik_Date(date(\"Y-m-d\", strtotime(\"yesterday\")));\n\t\treturn $date;\n\t}", "public static function wasYesterday($dateString, $timezone = null) {\r\n\t\t$timestamp = self::fromString($dateString, $timezone);\r\n\t\t$yesterday = self::fromString('yesterday', $timezone);\r\n\t\treturn date('Y-m-d', $timestamp) === date('Y-m-d', $yesterday);\r\n\t}", "public static function getYesterday($date) {\n return $day_now = date(\"Y-m-d\", strtotime($date) - 60 * 60 * 24);\n }", "protected function checkDate($timestamp) {\r\n\t\t$now = time();\r\n\t\t\r\n\t\tif ($timestamp > 0 && $timestamp < $now) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "function is_today( $timestamp ){\n if( is_string( $timestamp ) ){\n $timestamp = strtotime( $timestamp );\n }\n \n if( date('Ymd') == date('Ymd', $timestamp ) ){\n \n return true;\n \n } else {\n \n return false;\n \n }\n \n}", "function is_past( $date ){\n if( is_string( $date ) ){\n $date = strtotime( $timestamp );\n }\n \n if( $date < time() ){\n \n return true;\n \n } else {\n \n return false;\n \n }\n \n}", "public static function isToday($timestamp)\n {\n return date('Y-m-d', $timestamp) == date('Y-m-d');\n }", "function is_tomorrow( $timestamp ){\n if( is_string( $timestamp ) ){\n $timestamp = strtotime( $timestamp );\n }\n \n if( date('Ymd', time() + DAY_IN_SECONDS ) == date('Ymd', $timestamp ) ){\n \n return true;\n \n } else {\n \n return false;\n \n }\n \n}", "public static function yesterday($timezone = null, string $locale = null)\n\t{\n\t\treturn static::parse(date('Y-m-d 00:00:00', strtotime('-1 day')), $timezone, $locale);\n }", "public static function yesterday($timezone = null)\n {\n return static::today($timezone)->subDay();\n }", "private function validateTimestampInTheFuture($timestamp)\n {\n return $timestamp >= time();\n }", "public function isExpired(){\n\t\t$dtToronto = Carbon::now();\n\t\t$dtVancouver = Carbon::createFromFormat('Y-m-d H:i:s', $this->created_at);\n\t\t$interval = $dtVancouver->diffInHours($dtToronto);\n\t\treturn ($interval < 24);\n\t}", "private function timestampHasExpired($timestamp)\n {\n $year = (int) substr($timestamp, 0, 4);\n $month = (int) substr($timestamp, 5, 2);\n $day = (int) substr($timestamp, 8, 2);\n $hour = (int) substr($timestamp, 11, 2);\n $minute = (int) substr($timestamp, 14, 2);\n $second = (int) substr($timestamp, 17, 2);\n\n $timestamp = gmmktime($hour, $minute, $second, $month, $day, $year);\n\n $diff = time() - $timestamp;\n\n if ($diff > $this->maxDiff || $diff < -$this->maxDiff) {\n return true;\n }\n\n return false;\n }", "function is_date_correct_and_later_than_current_day($value): bool {\n $now = date_create('today');\n $lot_date = date_create($value);\n\n return $lot_date > $now && date_interval_format(date_diff($lot_date, $now), \"%a\") >= 1;\n}", "public function isOutdated()\n {\n if (!$this->updatedAt instanceof \\DateTime) {\n return true;\n }\n\n if ($this->updatedAt < new \\DateTime('-1 day')) {\n return true;\n }\n\n return false;\n }", "function is_future( $date ){\n if( is_string( $date ) ){\n $date = strtotime( $timestamp );\n }\n \n if( $date > time() ){\n \n return true;\n \n } else {\n \n return false;\n \n }\n \n}", "public function isDeliveryDateInPast(): bool\n {\n $date = $this->getDeliveryDate();\n// dd((new \\DateTime('now +'. GeneralUtils::DELIVERY_DATE_HOUR_OFFSET . ' hours')));\n// dd((new \\DateTime('now +4 hours'))->diff($date)->format('%r%h'));\n// dd((new \\DateTime('now +' . GeneralUtils::DELIVERY_DATE_HOUR_OFFSET . ' hours'))->diff($date->modify('+1 day')));\n \n if ($date) {\n /** A '+1 day' azert kell mert az adott datum 00:00 orajat veszi.\n * Ergo, ha feb 6. reggel rendelek delutani idopontra, akkor az mar a multban van!\n * Ugyanis a delutani datum feb 6, 00:00 ora lesz adatbazisban, ami reggelhez kepest a multban van!\n */\n $diff = (new DateTime('now +' . GeneralUtils::DELIVERY_DATE_HOUR_OFFSET . ' hours'))->diff($date->modify('+1 day'));\n if ($diff->days >= 0 && $diff->invert == 0) {\n return false;\n } elseif ($diff->invert == 1) {\n return true;\n }\n }\n return true;\n }", "abstract public function canBackDate();", "function tstamp_to_days_ago($timestamp)\n\t{\n\t\t$date1 = date('Y-m-d H:i:s', (int) round($timestamp/1000, 0));\n\t\t$date2 = date('Y-m-d H:i:s');\n\t\t$datetime1 = date_create($date1);\n\t\t$datetime2 = date_create($date2);\n\t\t$interval = date_diff($datetime1, $datetime2);\n\t\t\n\t\t//Days\n\t\tif($interval->format('%a') == 1)\n\t\t\t$days = '%a dzień';\n\t\telse\n\t\t\t$days = '%a dni';\n\t\t\n\t\t//Hours\n\t\tif($interval->format('%h') == 1)\n\t\t\t$hours = '%h godzinę';\n\t\telse if((($interval->format('%h') % 10) > 1 && ($interval->format('%h') % 10) < 5) && ($interval->format('%h') > 21 || $interval->format('%h') <5))\n\t\t\t$hours = '%h godziny';\n\t\telse\n\t\t\t\t$hours = '%h godzin';\n\t\t\t\n\t\t//Return wariants\n\t\tif($interval->format('%a') == 0 && $interval->format('%h') == 0)\n\t\t\treturn $interval->format('niecałą godzinę temu');\n\t\t\n\t\telse if($interval->format('%a') == 0)\n\t\t\treturn $interval->format($hours.' temu');\n\t\t\n\t\telse if($interval->format('%h') == 0)\n\t\t\treturn $interval->format($days.' temu');\n\t\t\n\t\telse\n\t\t\treturn $interval->format($days.' i '.$hours.' temu');\n\t}", "public static function timeSince($timestamp) {\n $diff = time() - $timestamp;\n $days = floor($diff / (60*60*24));\n $date = date(\"jS M Y\", $timestamp);\n \n if ($days == 0 || $diff <= 0) {\n if ($diff < 120) {\n $date = \"Just Now\";\n } elseif ($diff < 60*60) {\n $mins = floor($diff / 60);\n $date = \"$mins mins ago\";\n } elseif ($diff < 60*60*2) {\n $date = \"An hour ago\";\n } elseif ($diff < 60*60*24) {\n $hours = floor($diff / (60*60));\n $date = \"$hours hours ago\";\n }\n } elseif ($days == 1) {\n $date = \"Yesterday\";\n } elseif ($days < 7) {\n $date = \"$days days ago\";\n } elseif ($days == 7) {\n $date = \"A week ago\";\n } elseif ($days < 31) {\n $weeks = ceil($days / 7);\n $date = \"$weeks weeks ago\";\n }\n\n return $date;\n }", "function isUpdatedToday ($updated) {\n\t\treturn floor(strtotime($updated) / 60 / 60 /24) >= floor(time() / 60 / 60 /24);\n\t}", "public function IsRetroDay() {\n\t\tif (!$this->getDate()->isToday())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Only on the last day of the sprint.\n\t\treturn $this->getDayIndex() == ($this->getNumDays() - 1);\n\t}", "public function endOfDay($timestamp) {\n return strtotime('tomorrow', $timestamp) - 1;\n }", "public function isPast()\n {\n return $this->lt(static::now($this->getTimezone()));\n }", "public function isToday() : bool\n {\n return date('Ymd', $this->getTimestamp()) == date('Ymd');\n }", "protected function tokenExpired($createdAt)\n\t{\n\t\treturn Carbon::parse($createdAt)->addSeconds($this->expires)->isPast();\n\t}", "public static function yesterday($timezone = null)\n {\n return (new static('-1 day', $timezone))->startDay();\n }", "private function get_past_date() {\n if (is_null($this->pastdate)) {\n $this->pastdate = new \\DateTime('1 day ago', \\core_date::get_server_timezone_object());\n }\n $this->pastdate->sub(\\DateInterval::createFromDateString('1 day'));\n return $this->pastdate->getTimestamp();\n }", "protected function _validatePast($input, $value)\n {\n return strtotime($value) < time();\n }", "function time_passed($timestamp){\n $timestamp = (int) $timestamp;\n $current_time = time();\n $diff = $current_time - $timestamp;\n\n //intervals in seconds\n $intervals = array (\n 'year' => 31556926, 'month' => 2629744, 'week' => 604800, 'day' => 86400, 'hour' => 3600, 'minute'=> 60\n );\n\n //now we just find the difference\n if ($diff == 0)\n {\n return 'just now';\n }\n\n if ($diff < 60)\n {\n return $diff == 1 ? $diff . ' second ago' : $diff . ' seconds ago';\n }\n\n if ($diff >= 60 && $diff < $intervals['hour'])\n {\n $diff = floor($diff/$intervals['minute']);\n return $diff == 1 ? $diff . ' minute ago' : $diff . ' minutes ago';\n }\n\n if ($diff >= $intervals['hour'] && $diff < $intervals['day'])\n {\n $diff = floor($diff/$intervals['hour']);\n return $diff == 1 ? $diff . ' hour ago' : $diff . ' hours ago';\n }\n\n if ($diff >= $intervals['day'] && $diff < $intervals['week'])\n {\n $diff = floor($diff/$intervals['day']);\n return $diff == 1 ? 'yesterday' : $diff . ' days ago';\n }\n\n if ($diff >= $intervals['week'] && $diff < $intervals['month'])\n {\n return date('l, jS F Y',$timestamp);\n }\n\n if ($diff >= $intervals['month'] && $diff < $intervals['year'])\n {\n $diff = floor($diff/$intervals['week']);\n return date('l, jS F Y',$timestamp);\n }\n\n if ($diff >= $intervals['year'])\n {\n $diff = floor($diff/$intervals['year']);\n return date('l, jS F Y',$timestamp);\n }\n}", "public function isOlderThan(DateTime $provided): bool\n {\n return Date::validateObject($this->dateTime)->isOlderThan($provided);\n }", "public function strip_older( $timestamp ) {\n\t\treturn $this->strip_by_creation( $timestamp, '<' );\n\t}", "protected function tokenExpired($createdAt)\n {\n return Carbon::parse($createdAt)->addSeconds($this->expires)->isPast();\n }", "protected function tokenExpired($createdAt)\n {\n return Carbon::parse($createdAt)->addSeconds($this->expires)->isPast();\n }", "public function dateIsPast($doc) {\r\n\t\t\tif ($this->year <= 2037)\r\n\t\t\t\treturn (strtotime($this) < strtotime($doc)) ? true : false;\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}", "function earlier_than($dt)\n\t{\n\t\treturn ($this->compare($dt) == -1) ? true : false;\n\t}", "public function isExpired() {\n $today = new \\DateTime('now', new \\DateTimeZone('Europe/London'));\n // Reset the clock to avoid issues with time comparisons.\n $today->setTime(0, 0, 0);\n\n return ($this->date < $today) ? TRUE : FALSE;\n }", "protected function _getAbsDays($timestamp)\n {\n $old_timestamp = strtotime($timestamp);\n $new_timestamp = strtotime(now());\n return abs(floor(($new_timestamp - $old_timestamp) / 86400));\n }", "function timestamp_expired ($old_timestamp, $minutes){\n $pasttime= strtotime($old_timestamp);\n $curtime = time();//In seconds since the UNIX epoch\n if ($curtime - $pasttime > ($minutes * 60))\n return true;\n else\n return false;\n}", "public static function delete_logs_before_timestamp($timestamp = 0)\n {\n }", "public static function delete_logs_before_timestamp($timestamp = 0)\n {\n }", "public function isPastDate(DateTime $date)\n {\n $today = new DateTime();\n $today->setTime(0,0);\n\n $diff = $today->diff($date);\n return ($diff->invert) ? true : false ;\n }", "function dayCompare($now, $then) {\n $seconds_now = strtotime($now);\n $seconds_then = strtotime($then);\n $diff_seconds = $seconds_now - $seconds_then;\n $diff_minutes = $diff_seconds/60;\n $diff_hours = $diff_minutes/60;\n $diff_days = round($diff_hours/24);\n\n return $diff_days;\n}", "public function retain_older( $timestamp ) {\n\t\treturn $this->strip_by_creation( $timestamp, '>=' );\n\t}", "public function isToday($timestamp_current_time = null)\n {\n $datum_current_time = new \\DateTime();\n // $datum_current_time->setTimestamp(strtotime($this->current_time));\n\n $timestamp_current_time = $this->timestampTime($datum_current_time);\n\n $day_number = $this->extractDaynumber($timestamp_current_time);\n //$day_number = $this->extractDaynumber($t);\n $minute = $this->extractMinute($timestamp_current_time);\n $hour = $this->extractHour($timestamp_current_time);\n\n // An hour is 24 hours of 60 minutes.\n $day_percent = ($minute + $hour * 60) / (24 * 60);\n\n $day_degrees = (float) $day_percent * 360;\n $day_radians = ((float) $day_degrees / 180) * pi();\n\n $timestamp_working_time = $this->timestampTime($this->working_datum);\n //$t = $timestamp_working_datum;\n\n $epoch_working = strtotime($timestamp_working_time);\n $epoch_current = strtotime($timestamp_current_time);\n $epoch_start_of_today = $epoch_current - $day_percent * 24 * 60 * 60;\n $epoch_end_of_today =\n $epoch_current + (1 - $day_percent) * 24 * 60 * 60;\n\n $sunFlag = false;\n\n if (\n $epoch_working > $epoch_start_of_today and\n $epoch_working < $epoch_end_of_today\n ) {\n $sunFlag = true;\n }\n return $sunFlag;\n }", "protected function getYesterdayRange()\n {\n $startDate = new \\DateTime('now');\n $startDate->setTime(0, 0, 0);\n $startDate->sub(new \\DateInterval('P1D')); // P1D means a period of 1 days\n\n $endDate = new \\DateTime('now');\n $endDate->setTime(23, 59, 59);\n $endDate->sub(new \\DateInterval('P1D')); // P1D means a period of 1 days\n\n return array($startDate->getTimestamp(), $endDate->getTimestamp());\n }", "public function iCheckYesterdayLink () {\n\n\t// Gets the current day in numeric representation of the day of the week (i.e. 0 for Sunday through to 6 for Saturday)\n\t$currentday = date(\"w\");\n\t$secondLink_text = \"\";\n\n\t// This switch case switches the second quick link text as per the Fee to Pay HLD\n\n\tswitch ($secondLink_text) {\n\n\t\tcase 0:\n\t\t\t$secondLink_text = \"Friday\";\n\n\t\tcase 1:\n\t\t\t$secondLink_text = \"Saturday\";\n\n\t\tcase 2:\n\t\t\t$secondLink_text = \"Yesterday\";\n\n\t\tcase 3:\n\t\t\t$secondLink_text = \"Yesterday\";\n\n\t\tcase 4:\n\t\t\t$secondLink_text = \"Yesterday\";\n\n\t\tcase 5:\n\t\t\t$secondLink_text = \"Yesterday\";\n\n\t\tcase 6:\n\t\t\t$secondLink_text = \"Yesterday\";\n\n\t}\n\n\t// Gets the second link element\n\t$secondLink = $this->getSession()->getPage()->find('xpath', '//li[contains(@class,\"1 last active\")]//a[1]');\n\n\t// Verify if that element present on page\n\tif (NULL === $secondLink) {\n throw new ElementNotFoundException($this->getSession(), 'Quick link', 'id|name|label|value', null);\n\t }\n\n\t// If the first link text does not match the expected value, this throws an exception\n\tif ($secondLink->getText() != $secondLink_text) {\n\n\t$real_value = $secondLink->getText();\n print_r($real_value);\n\n\tthrow new Exception (\"The second quick link text is $real_value\");\n\n }\n\n }", "public static function valid_timestamp($timestamp)\n\t{\n\t\t$timestamp_cutoff = \\Config::get('engine.timestamp_cutoff', 15);\n\t\t\n\t\t// Is the timestamp from 60 seconds ago up to the current time?\n\t\tif ((int)$timestamp >= (static::$gm_time - (int)$timestamp_cutoff) && (int)$timestamp <= static::$gm_time) {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// Timestamp out of scope\n\t\treturn false;\n\t}", "function timestamp_is_later($date_read,$date_refer){\n\t// the $date_refer date.\n\t// timestamp format is: YYYYMMDDhhmmss\n\n\tif($date_read<$date_refer){\n\t\treturn 0;\n\t} elseif ($date_read>$date_refer){\n\t\treturn 1;\n\t} elseif (substr($date_read,8)==substr($date_refer,8)){\n\t\t// put return 0 here if you want to be same-day-excluded\n\t\treturn 1;\n\t}\n\treturn 0;\n}", "public static function isTimestamp($unixTimestamp) {\n\t\treturn ((string)(int) $unixTimestamp === (string)$unixTimestamp) && ($unixTimestamp <= PHP_INT_MAX) && ($unixTimestamp >= ~PHP_INT_MAX);\n\t}", "public function expired()\n {\n $expiredAt = (int) Yii::$app->formatter->asTimestamp($this->expired_at);\n $now = (int) Yii::$app->formatter->asTimestamp(time());\n return $now >= $expiredAt;\n }", "function later_than($dt)\n\t{\n\t\treturn ($this->compare($dt) == 1) ? true : false;\n\t}", "function yourls_check_timestamp( $time ) {\n\t$now = time();\n\t// Allow timestamp to be a little in the future or the past -- see Issue 766\n\treturn yourls_apply_filter( 'check_timestamp', abs( $now - (int)$time ) < yourls_get_nonce_life(), $time );\n}", "function checkTime($time, $current, $diffInDays) {\n $secondsDiff = $diffInDays * 24 * 60 * 60;\n if ($diffInDays > 0) {\n if (strtotime($current) - strtotime($time) > $secondsDiff) {\n return FALSE;\n } else if (strtotime($current) - strtotime($time) > 0) {\n return FALSE;\n } else {return TRUE;}\n } else {\n if (strtotime($time) - strtotime($current) < $secondsDiff) {\n return FALSE;\n } else if ((strtotime($time) - strtotime($current) > 0)) {\n return FALSE;\n } else {return TRUE;}\n }\n}", "function timestamp_is_before($date_read,$date_refer){\n\t// the $date_refer date.\n\t// timestamp format is: YYYYMMDDhhmmss\n\n\tif($date_read<$date_refer){\n\t\treturn 1;\n\t} elseif ($date_read>$date_refer){\n\t\treturn 0;\n\t} elseif (substr($date_read,8)==substr($date_refer,8)){\n\t\t// put return 0 here if you want to be same-day-excluded\n\t\treturn 1;\n\t}\n\treturn 0;\n}", "public function recentlyUpdated()\n {\n return $this->updated_at <= Carbon::now() && $this->updated_at >= Carbon::now()->addDays(-2);\n }", "private function checkTimestamp($timestamp)\n\t{\n\t\tif (!$timestamp)\n\t\t\tthrow new Exception\\BadRequestException(\n\t\t\t\t'Missing timestamp parameter. The parameter is required'\n\t\t\t);\n\n\t\t// verify that timestamp is recentish\n\t\t$now = time();\n\t\tif (abs($now - $timestamp) > $this->timestampThreshold) {\n\t\t\tthrow new Exception\\UnauthorisedException(\n\t\t\t\t\"Expired timestamp, yours $timestamp, ours $now\"\n\t\t\t);\n\t\t}\n\t}", "function aa_dates_today($atts,$thing)\n\t{\n \t\tglobal $uPosted;\n\t\textract(lAtts(array(\n\t\t\t'date' => '',\n\t\t\t'offset' => '0'\n\t\t),$atts));\n return parse(Evalelse($thing, ( ceil((mktime() + tz_offset())/86400) == (ceil($uPosted/86400) ) )));\n\t}", "function betting_day($datetime){\n $today = \\Carbon\\Carbon::parse($datetime)->startOfDay();\n\n $start = \\Carbon\\Carbon::parse($today)->addHours(12);\n if(strtotime($datetime) > strtotime($start)){\n return $today;\n }else{\n return \\Carbon\\Carbon::parse($today)->subDay();\n }\n }", "protected function isFuture($timestamp)\n {\n return ((int) $timestamp) >= (new Carbon())->getTimestamp();\n }", "function lastActiveTimestamp($timestamp)\n {\n $datetime1 = new DateTime(\"now\");\n $datetime2 = date_create($timestamp);\n $diff = date_diff($datetime1, $datetime2);\n\n $timemsg = '';\n if ($diff->y > 0) {\n $timemsg = $diff->y . ' year' . ($diff->y > 1 ? \"s\" : '') . \" \";\n }if ($diff->m > 0) {\n $timemsg = $timemsg . $diff->m . ' month' . ($diff->m > 1 ? \"s\" : '') . \" \";\n }if ($diff->d > 13) {\n $timemsg = floor($diff->d / 7) . ' weeks' . \" \";\n }if ($diff->d > 0) {\n $timemsg = $timemsg . $diff->d . ' day' . ($diff->d > 1 ? \"s\" : '') . \" \";\n }if ($diff->h > 0) {\n $timemsg = $timemsg . $diff->h . ' hour' . ($diff->h > 1 ? \"s\" : '') . \" \";\n }\n\n $timemsg = $timemsg . ' ago';\n return $timemsg;\n }", "function good_date($date){\n$now = date('d/m/y');\n$then = explode(',', $date);\nif ($then[0] == $now) {\n\treturn 'Today' . $then[1];\n}else {\n$then_ = explode('/', $then[0]);\n$now_ = explode('/', $now);\nif ($then_[2] == $now_[2] &&\n $then_[1] == $now_[1] &&\n $now_[0] - $then_[0] == 1) {\n\treturn 'Yesterday' . $then[1];\n}else{\n\treturn $date;\n}\n}\n}", "public static function isPast($dateString, $timezone = null) {\r\n\t\t$timestamp = self::fromString($dateString, $timezone);\r\n\t\treturn $timestamp < time();\r\n\t}", "function isExpired($now) {\r\n if (! $this->_expiry) {\r\n return true;\r\n }\r\n if (is_string($now)) {\r\n $now = strtotime($now);\r\n }\r\n return ($this->_expiry < $now);\r\n }", "public function strip_newer( $timestamp ) {\n\t\treturn $this->strip_by_creation( $timestamp, '>' );\n\t}", "function check_today($player) {\n\t$found = 1;\n\n\t$last = trim(file_get_contents(_PWD . '/' . $player->steamid));\n\tif ($last != date('m/d/Y')) {\n\t\t$found = 0;\n\t}\n\n\treturn $found;\n}", "public function has_passed_retention_time() {\n\t\t// Bail if we are trying to prune a Schedule Record\n\t\tif ( Tribe__Events__Aggregator__Records::$status->schedule === $this->post->post_status ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$current = time();\n\t\t$created = strtotime( $this->post->post_date_gmt );\n\n\t\t// Prevents Pending that is younger than 1 hour to be pruned\n\t\tif (\n\t\t\tTribe__Events__Aggregator__Records::$status->pending === $this->post->post_status\n\t\t\t&& $current < $created + HOUR_IN_SECONDS\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$prune = $created + Tribe__Events__Aggregator__Records::instance()->get_retention();\n\n\t\treturn $current > $prune;\n\t}", "public function dateDifference($past, $now = \"now\") {\n $seconds = 0;\n $minutes = 0;\n $hours = 0;\n $days = 0;\n $months = 0;\n $years = 0;\n \n // sets the default timezone\n date_default_timezone_set($this->timezone);\n \n // finds the past in datetime\n $past = strtotime($past);\n // finds the current datetime\n $now = strtotime($now);\n \n // calculates the difference\n $timeDifference = $now - $past;\n \n // starts determining the time difference\n if($timeDifference >= 0) {\n switch($timeDifference) {\n // finds the number of years\n case ($timeDifference >= $this->secondsPerYear):\n // uses floor to remove decimals\n $years = floor($timeDifference / $this->secondsPerYear);\n // saves the amount of seconds left\n $timeDifference = $timeDifference-($years * $this->secondsPerYear);\n \n // finds the number of months\n case ($timeDifference >= $this->secondsPerMonth && $timeDifference <= ($this->secondsPerYear-1)):\n // uses floor to remove decimals\n $months = floor($timeDifference / $this->secondsPerMonth);\n // saves the amount of seconds left\n $timeDifference = $timeDifference-($months * $this->secondsPerMonth);\n \n // finds the number of days\n case ($timeDifference >= $this->secondsPerDay && $timeDifference <= ($this->secondsPerYear-1)):\n // uses floor to remove decimals\n $days = floor($timeDifference / $this->secondsPerDay);\n // saves the amount of seconds left\n $timeDifference = $timeDifference-($days * $this->secondsPerDay);\n \n // finds the number of hours\n case ($timeDifference >= $this->secondsPerHour && $timeDifference <= ($this->secondsPerDay-1)):\n // uses floor to remove decimals\n $hours = floor($timeDifference / $this->secondsPerHour);\n // saves the amount of seconds left\n $timeDifference = $timeDifference-($hours * $this->secondsPerHour);\n \n // finds the number of minutes\n case ($timeDifference >= $this->secondsPerMinute && $timeDifference <= ($this->secondsPerHour-1)):\n // uses floor to remove decimals\n $minutes = floor($timeDifference / $this->secondsPerMinute);\n // saves the amount of seconds left\n $timeDifference = $timeDifference-($minutes * $this->secondsPerMinute);\n \n // finds the number of seconds\n case ($timeDifference <= ($this->secondsPerMinute-1)):\n // seconds is just what there is in the timeDifference variable\n $seconds = $timeDifference;\n }\n }\n \n $difference = array(\n \"years\" => $years,\n \"months\" => $months,\n \"days\" => $days,\n \"hours\" => $hours,\n \"minutes\" => $minutes,\n \"seconds\" => $seconds\n );\n \n return $difference;\n }", "public function cleanup(int $timestamp):bool\n {\n $st = $this->getPDO()->prepare('DELETE \n FROM `'.$this->getNamespace().'.audit.audit`\n WHERE UNIX_TIMESTAMP(`time`) < :timestamp');\n\n $st->bindValue(':timestamp', $timestamp, PDO::PARAM_INT);\n $response = $st->execute();\n\n return $response == true;\n }", "public function isTimestampValid()\n {\n return $this->hasTimestamp() && intval($this->timestamp) > time();\n }", "public function isDayExpired()\n\t{\n\t\t$recordData = $this->_GetLastData(true);\n\t\tif (!$recordData)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t$schedule = DependencyManager::getInstance()\n\t\t\t->getScheduleProvider()\n\t\t\t->getScheduleWithShifts($recordData['SCHEDULE_ID']);\n\t\t$shift = null;\n\n\t\tif ($schedule && $recordData['SHIFT_ID'] > 0)\n\t\t{\n\t\t\t$shift = $schedule->obtainShiftByPrimary($recordData['SHIFT_ID']);\n\t\t}\n\t\t$manager = DependencyManager::getInstance()\n\t\t\t->buildWorktimeRecordManager(\n\t\t\t\tWorktimeRecord::wakeUpRecord($recordData),\n\t\t\t\t$schedule,\n\t\t\t\t$shift\n\t\t\t);\n\t\treturn $manager->isRecordExpired();\n\t}", "function isValidTimeStamp($strTimestamp) {\n\t\t\treturn (($strTimestamp <= PHP_INT_MAX)\n\t\t\t\t&& ($strTimestamp >= ~PHP_INT_MAX));\n\t\t}", "private function isOneDayOld($visit_date = ''){\n $gd_a = getdate( strtotime($visit_date));\n $gd_b = getdate( strtotime(date('Y/m/d')) );\n\n // Now recreate these timestamps, based upon noon on each day\n // The specific time doesn't matter but it must be the same each day\n $a_new = mktime( 12, 0, 0, $gd_a['mon'], $gd_a['mday'], $gd_a['year'] );\n $b_new = mktime( 12, 0, 0, $gd_b['mon'], $gd_b['mday'], $gd_b['year'] );\n\n // Subtract these two numbers and divide by the number of seconds in a\n // day. Round the result since crossing over a daylight savings time\n // barrier will cause this time to be off by an hour or two.\n\n return round( abs( $a_new - $b_new ) / 86400 ) ;\n }", "private function checkEventDateFuture(){\n $startTime = Carbon::createFromFormat('m/d/Y h:i a', $this->start_time);\n $now = Carbon::now();\n\n return $now->diffInHours($startTime, false) >= 2;\n }", "function validateEatByDate($eatBy){\n $eatByDate = date(\"Y-m-d\", strtotime($eatBy)); //reformat and create date object\n $currentDate = date(\"Y-m-d\"); //create date object\n $currentTime = strtotime($currentDate); //convert date obj to sec since Epoch\n $eatByTime = strtotime($eatByDate); //convert date obj to sec since Epoch\n echo \"<P>\\$eatByDate=$eatByDate and \\$currentDate=$currentDate \";\n return ($eatByTime < $currentTime)? NULL:$eatByDate;\n }", "function sumo_verify_is_today()\n{\n\tGLOBAL $SUMO;\n\n\t$file = SUMO_PATH.'/tmp/today';\n\t$today = date(\"Ymd\", $SUMO['server']['time']);\n\t$date = '';\n\n\tif(@file_exists($file))\n\t{\n\t\t$fp = fopen ($file, 'r+') OR die (sumo_get_message('E00105X', $file));\n\t\t$date = fgets ($fp, 9);\n\t \t\tfclose($fp);\n\t}\n\n\treturn $date == $today ? true : false;\n}", "function differenceTime($timestamp){\n\t$now = time();\n\t$timestamp = strtotime($timestamp);\n\t$diff = $now - $timestamp;\n\t// unix to legit output \n\tif(floor($diff/108000)){ return round($diff/86400, 1) . \" Days ago\"; }\n\telseif(floor($diff/7200)) { return round($diff/3600, 1) . \" Hours ago\";}\n\telseif(floor($diff/120)) return floor($diff/60) . \" Minutes ago\";\n\telse return $diff . \" Seconds ago\";\n}", "public function is_expired()\n {\n return strtotime($this->valid_till_date) < time() ? true : false;\n }", "function echotime($time)\n{\n\t//date_default_timezone_set ('Asia/Singapore');\n\techo ' You last visited: ';\n\tif((date('d',time())-date('d',strtotime($time)))=='0')\n\t\techo 'Today ';\n\telse if((date('d',time())-date('d',strtotime($time)))=='1')\n\t\techo 'Yesterday';\n\telse\n\t\techo date('d-m-Y ', $time);\n\t\t\n\techo date('g:i a', strtotime($time));\n}", "public static function date_in_past($value) {\n\t\tif (!is_scalar($value)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$date = \\DateTime::createFromFormat(\"d/m/Y\", $value);\n\t\tif ($date !== false && !array_sum($date->getLastErrors())) {\n\t\t\t$now = new \\DateTime();\n\n\t\t\treturn $date < $now;\n\t\t}\n\n\t\treturn false;\n\t}", "public function testDaySubtractTest()\n {\n $givenDate = '2019-10-27';\n $expectedDate = new \\DateTime('2019-10-24');\n $daysToSubtract = 3;\n\n $this->assertEquals($expectedDate, $this->dateService->subtractDaysFromDate($givenDate, $daysToSubtract));\n }", "public function recentlyPublished()\n {\n return $this->created_at <= Carbon::now() && $this->created_at >= Carbon::now()->addDays(-2);\n }", "function depositsYesterday()\n {\n \n $yesterday = Carbon::yesterday();\n \n $accountout = AcountIn::Where('Txtype','=',\"Deposit\")->WhereDate('TransTime','=', $yesterday )->sum('Txsum');\n\n return $accountout;\n }", "public static function isTimestamp(int $timestamp): bool\n {\n $validator = new DateValidator();\n $validator->format = 'php:U';\n\n return $validator->validate($timestamp);\n }", "function calcPrevDay(){\n $dt = new DateTime();\n $timeStampOneDay = 86400;\n $dt->setTimestamp($dt->getTimestamp()-$timeStampOneDay);\n $day = $dt->format(\"l jS F Y\");\n return $day;\n }", "function fechaAyer()\r\n{\r\n $date = date(\"Y-m-d\");\r\n $ayer = date(\"Y-m-d\", strtotime(\"-1 day\", strtotime($date)));\r\n return $ayer;\r\n}", "public function hasExpired(){\n \treturn strtotime($this->expires_at) < time();\n }", "function Trade_Date_Cutoff() {\n global $YEARDATA;\n $Now = time();\n $PayTerm = Feature('PaymentTerms',30);\n if ($YEARDATA['TradeMainDate'] > $Now) return 0;\n if ($Now >= $YEARDATA['TradeLastDate']) return 2;\n $DaysLeft = intdiv(($YEARDATA['TradeLastDate'] - $Now),24*60*60);\n if ($DaysLeft > $PayTerm) $DaysLeft = $PayTerm;\n if ($DaysLeft < 2) $DaysLeft = 2;\n return $DaysLeft;\n}", "public function checkHistoryDate($historyDate)\n {\n $result = ($historyDate === (date('Y-m-d', strtotime(\"-1 days\")))) ? true : false;\n return $result;\n }", "public function isOlderThanOrEqualTo(DateTime $provided): bool\n {\n return Date::validateObject($this->dateTime)->isOlderThanOrEqualTo($provided);\n }", "public function checkLastDate() {\n\t\t\t$conn = $this->getConnection();\n\t\t\t$query = \"SELECT date FROM weeklyleaders WHERE date >= NOW() - INTERVAL 156 HOUR\";\n\t\t\t$q = $conn->prepare($query);\n\t\t\t$q->execute();\n\t\t\t$array = $q->fetch();\n\t\t\treturn isset($array['date']);\n\t\t}", "public function findCompletedYesterday(): array;", "function is_now_after( int $date ){\n\treturn (time() >= date);\n}", "private function _checkExpired($timestamp, $expiration) {\n $result = false;\n if ($expiration !== 0) {\n $timeDiff = time() - $timestamp;\n ($timeDiff > $expiration) ? $result = true : $result = false;\n }\n return $result;\n }" ]
[ "0.86079186", "0.7753706", "0.7647147", "0.6918225", "0.6568054", "0.6383678", "0.6370715", "0.6301879", "0.6295512", "0.62625396", "0.6174584", "0.6108618", "0.5974628", "0.58610827", "0.5803791", "0.56958824", "0.5648775", "0.56288135", "0.56258863", "0.5587627", "0.5550096", "0.5530137", "0.55242026", "0.5491629", "0.54723364", "0.5438818", "0.54337823", "0.53994995", "0.538594", "0.53853184", "0.5381755", "0.53448594", "0.53188926", "0.53047633", "0.53008026", "0.53007704", "0.5298677", "0.52984685", "0.52964747", "0.52964747", "0.52857333", "0.5283394", "0.52809036", "0.52732277", "0.52726376", "0.525599", "0.5255666", "0.5244689", "0.524121", "0.5237544", "0.52332693", "0.5231241", "0.52230275", "0.5219718", "0.5207113", "0.52051", "0.5196685", "0.51839507", "0.5182567", "0.51645607", "0.5161357", "0.5146681", "0.5141923", "0.51261973", "0.512588", "0.5112459", "0.5083258", "0.5076544", "0.50626725", "0.50549096", "0.50537443", "0.5052781", "0.50320405", "0.50268984", "0.50249237", "0.5013264", "0.5009551", "0.50069445", "0.5005472", "0.5004466", "0.49914473", "0.49892226", "0.4988142", "0.49856484", "0.49777487", "0.49743873", "0.49719346", "0.49659914", "0.4961028", "0.49607116", "0.4959152", "0.49576405", "0.49545166", "0.49543226", "0.49456367", "0.49431604", "0.49422282", "0.49365443", "0.49337372", "0.49252045" ]
0.81926054
1
Checks is given timestamp is in this week We use ISO8601 standard, weeks starting on Monday.
Проверяет, является ли предоставленный временной меткой текущей неделе. Мы используем стандарт ISO8601, где недели начинаются в понедельник.
public static function isThisWeek($timestamp) { return date('o-\\WW', $timestamp) == date('o-\\WW'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isWeekday($timestamp) {\r\n\treturn (date('N', $timestamp) < 6); // ISO DoW (7 = Sunday)\r\n}", "public function isCurrentWeek(): bool;", "public function isCurrentWeek(): bool {\n $today = date('Y-m-W');\n $thisDay = $this->getDateTime()->format('Y-m-W');\n return $today === $thisDay;\n }", "public function testIsWeekday()\n {\n $this->assertTrue(DateTime::createFromFormat('Y-m-d', '2021-01-01')->isWeekday());\n $this->assertFalse(DateTime::createFromFormat('Y-m-d', '2021-01-02')->isWeekday());\n $this->assertFalse(DateTime::createFromFormat('Y-m-d', '2021-01-03')->isWeekday());\n $this->assertTrue(DateTime::createFromFormat('Y-m-d', '2021-01-04')->isWeekday());\n $this->assertTrue(DateTime::createFromFormat('Y-m-d', '2021-01-05')->isWeekday());\n $this->assertTrue(DateTime::createFromFormat('Y-m-d', '2021-01-06')->isWeekday());\n $this->assertTrue(DateTime::createFromFormat('Y-m-d', '2021-01-07')->isWeekday());\n $this->assertTrue(DateTime::createFromFormat('Y-m-d', '2021-01-08')->isWeekday());\n }", "function weekCompare($now, $then) {\n $sun_now = dateOfWeek($now, \"Sunday\");\n $sun_then = dateOfWeek($then, \"Sunday\");\n $seconds_now = strtotime($sun_now);\n $seconds_then = strtotime($sun_then);\n $diff_weeks = round(($seconds_now - $seconds_then)/(60*60*24*7));\n return $diff_weeks;\n}", "function checkVW($date) {\n //get current date\n date_default_timezone_set('GMT');\n $ph_time = time() + 8 * 60 * 60; //sets the current time to philippine time\n $today = date('Y-m-d H:i',$ph_time);\n $day = date(\"D\",$ph_time);\n $thisweek = $today;\n \n $thisweek = strtotime(\"last Wednesday\");\n if($day == 'Wed') {\n $end = strtotime($today);\n } else {\n $end = strtotime(\"next Wednesday\");\n }\n// echo '<br>'.date('Y-m-d',$thisweek).'===='.strtotime(date('Y-m-d',$thisweek)).'<br>';\n $time = strtotime( $date );\n $myDate = date( 'y-m-d', $time );\n// echo $date.'===='.$time.'=='.$myDate.'<br>';\n// echo date('Y-m-d',$end).'===='.strtotime(date('Y-m-d',$end)).'<br>';\n if($time >= $thisweek && $time < $end) { \n// echo 'true';\n return true;\n } else {\n return false;\n }\n }", "public function isWeekday(): bool\n {\n return $this->value >= self::MONDAY && $this->value <= self::FRIDAY;\n }", "public static function checkValidWeek($week) {\r\n if (is_numeric($week)) {\r\n $week = $week+0; // convert it to numeric variable\r\n if (is_int($week)) { // make sure its not a float\r\n if ($week < 1 or $week > 53) {// make sure it is not out of range\r\n $week='';\r\n }\r\n } else {\r\n $week='';\r\n }\r\n } else {\r\n $week='';\r\n }\r\n // here it is either an empty string or a number between 1-53\r\n $week=$week.''; // make sure it ends up as a string\r\n return $week;\r\n }", "public function isWeekend()\n {\n return (int)$this->date->format('N') > 5;\n }", "function get_week_number_for($timestamp,$no_year=false)\n{\n\t$format=$no_year?'W':'o-W';\n\t$w=intval(date('w',$timestamp));\n\tif (get_option('ssw')=='0')\n\t{\n\t\treturn date($format,$timestamp);\n\t}\n\treturn date($format,$timestamp-60*60*24); // For SSW: week starts one day earlier, so first day of week actually pushes back onto end of previous one\n}", "public function existsPublishedLessThanWeekAgo(): bool;", "function tep_fetch_time_type($timestamp, $allow_special = false) {\n \t\t$day_number = date(\"w\", $timestamp);\n\t\t$weekend = array('0');\n\t\t\tif ($allow_special) {\n\t\t\t\t$weekend[] = '6';\n\t\t\t}\n\t\t\tif (in_array($day_number, $weekend)) {\n\t\t\t\treturn 'weekend';\n\t\t\t} else {\n\t\t\t\treturn 'weekday';\n\t\t\t}\n }", "function weekstamp($timestamp) // in achievotools.inc\n {\n /*\n * JN 02-06-26: FIX: Time locks based on week numbers not working on win32.\n * Reason is PHP: not all strftime functions are working on win32.\n * Solution: We have to calculate week of year manually.\n */\n\n $year = strftime(\"%Y\",$timestamp);\n $yearStart = mktime(0,0,0,1,1,$year);\n $yearEnd = mktime(0,0,0,12,31,$year);\n\n $daysLost = strftime(\"%w\",$yearStart);\n if ($daysLost > 4) {\n $daysLost -= 9;\n } else {\n $daysLost -= 2;\n }\n // $week = bcdiv(strftime(\"%j\",$timestamp)+$daysLost+7,7,0);\n $week = \"\".floor((strftime(\"%j\",$timestamp)+$daysLost+7)/7);\n\n /*\n atkdebug(\"(weekstamp): date: \".strftime(\"%a %d %m %Y\",$timestamp).\n \" week: \".$week.\n \" day: \".strftime(\"%j\",$timestamp).\n \" jan1: \".strftime(\"%a\",$yearStart).\n \" dec31: \".strftime(\"%a\",$yearEnd).\n \" w1dLastY: \".($daysLost+1));\n */\n\n if ($week == 0) {\n //atkdebug(\"(weekstamp): adjust to previous year\");\n return weekstamp(mktime(0,0,0,12,31,($year-1)));\n }\n\n if ($week == 53)\n {\n if ((strftime(\"%w\", $yearEnd) >= 1) && (strftime(\"%w\", $yearEnd)<= 3))\n {\n //atkdebug(\"(weekstamp): adjust to following year\");\n return ($year+1).\"01\";\n }\n }\n\n return $year.sprintf(\"%02d\", $week);\n }", "public function getCurrentWeekForUser($user_id);", "public function inWeek($day, $week){\n \t \t$start = $week;\n\t\t$end = $this->offsetDay($week, 7);\n\t\t$between = $this->datesBetween($start, $end);\n\t\tforeach ($between as $i){\n\t\t\tif ($i == $day) return true;\n\t\t}\n\t\treturn false;\n }", "public static function getWeek()\n {\n return date('o-\\\\WW');\n }", "protected function _isWeekend()\n {\n $day = date(\n 'N', mktime(0, 0, 0, $this->_month, $this->_date, $this->_year)\n );\n return in_array($day, array(6, 7));\n }", "public function getWeekAttribute()\n {\n $date = substr($this->created_at , 0 , 10);\n //Se explota la fecha\n $date = explode(\"-\",$date);\n //Se obtiene la fecha en formato timestamp\n $unix = mktime(0,0,0,$date[1],$date[2],$date[0]);\n //Se devuelve el valor\n return date('Y - W', $unix);\n }", "function isWeekend($date) {\n return (date('N', strtotime($date)) >= 6);\n }", "function get_day_of_week($time_stamp){\n $result = date(\"w\",$time_stamp);\n if($result == 0)\n return 6;//Sunday\n else\n return $result - 1; //Monday to Saturday\n}", "public static function isCurrentWeek(DateTime $date): bool\n {\n return $date->format('WY') === self::formatNow('WY');\n }", "public function isWeekday()\n {\n return !$this->isWeekend();\n }", "function isNew($publishd_at)\n{\n return (Carbon::now()->diffInDays(Carbon::createFromFormat('Y-m-d H:i:s', $publishd_at))) <= 7;\n}", "public function getWeek(): int;", "public function testIsWeekend()\n {\n $this->assertFalse(DateTime::createFromFormat('Y-m-d', '2021-01-01')->isWeekend());\n $this->assertTrue(DateTime::createFromFormat('Y-m-d', '2021-01-02')->isWeekend());\n $this->assertTrue(DateTime::createFromFormat('Y-m-d', '2021-01-03')->isWeekend());\n $this->assertFalse(DateTime::createFromFormat('Y-m-d', '2021-01-04')->isWeekend());\n $this->assertFalse(DateTime::createFromFormat('Y-m-d', '2021-01-05')->isWeekend());\n $this->assertFalse(DateTime::createFromFormat('Y-m-d', '2021-01-06')->isWeekend());\n $this->assertFalse(DateTime::createFromFormat('Y-m-d', '2021-01-07')->isWeekend());\n $this->assertFalse(DateTime::createFromFormat('Y-m-d', '2021-01-08')->isWeekend());\n }", "public function testIsWeekend()\n {\n $this->assertTrue($this->getCalculator()->isWeekend('2019-05-04'));\n $this->assertTrue($this->getCalculator()->isWeekend('2019-05-05'));\n }", "function get_this_week() {\n\t$s = date('Ymd');\n\t$s_dow = get_dow($s);\n\tif (!$s_dow) {\n\t\treturn $s;\n\t} else {\n\t\treturn date('Ymd', (strtotime($s) - ($s_dow * 86400) + 3601));\n\t}\n}", "public static function isThisWeek($dateString, $timezone = null) {\r\n\t\t$timestamp = self::fromString($dateString, $timezone);\r\n\t\t$now = self::fromString('now', $timezone);\r\n\t\treturn date('W o', $timestamp) === date('W o', $now);\r\n\t}", "public function testGetWDay()\n\t{\n\n\t\t// 火曜日\n\t\t$timestamp = strtotime(\"2017/4/4 23:59:00\");\n\t\t$datetime = new HDateTime($timestamp);\n\t\t$weekday = date('N', $timestamp);\n\t\t$this->assertEquals(2, $datetime->getWDay());\n\n\t\t// 水曜日\n\t\t$timestamp = strtotime(\"2017/4/5 23:59:00\");\n\t\t$datetime = new HDateTime($timestamp);\n\t\t$weekday = date('N', $timestamp);\n\t\t$this->assertEquals(3, $datetime->getWDay());\n\n\t\t// 木曜日\n\t\t$timestamp = strtotime(\"2017/4/6 23:59:00\");\n\t\t$datetime = new HDateTime($timestamp);\n\t\t$weekday = date('N', $timestamp);\n\t\t$this->assertEquals(4, $datetime->getWDay());\n\n\n\t\t// 金曜日\n\t\t$timestamp = strtotime(\"2017/4/7 23:59:00\");\n\t\t$datetime = new HDateTime($timestamp);\n\t\t$weekday = date('N', $timestamp);\n\t\t$this->assertEquals(5, $datetime->getWDay());\n\n\t\t// 土曜日\n\t\t$timestamp = strtotime(\"2017/4/8 23:59:00\");\n\t\t$datetime = new HDateTime($timestamp);\n\t\t$weekday = date('N', $timestamp);\n\t\t$this->assertEquals(6, $datetime->getWDay());\n\n\t\t// 日曜日\n\t\t$timestamp = strtotime(\"2017/4/9 23:59:00\");\n\t\t$datetime = new HDateTime($timestamp);\n\t\t$weekday = date('N', $timestamp);\n\t\t$this->assertEquals(0, $datetime->getWDay());\n\n\t\t//月曜日\n\t\t$timestamp = strtotime(\"2017/4/10 23:59:00\");\n\t\t$datetime = new HDateTime($timestamp);\n\t\t$weekday = date('N', $timestamp);\n\t\t$this->assertEquals(1, $datetime->getWDay());\n\n\t}", "public function getWeek()\n {\n return $this->getDateElement('week');\n }", "public function week($week = null)\n {\n if(null === $week)\n {\n return $this->property('week');\n }\n $week = in_array((int) $week, array(-1, 1, 2, 3, 4)) ? (int) $week : -1;\n return $this->property('week', $week);\n }", "public function getWeekNumber(): int\n {\n return (int)$this->date->format('W');\n }", "public function CheckWeekDate($date) {\n\n \t\t$date = explode(' of ', $date);\n\n \t\tif (str_contains($date[1], 'last')) {\n \t\t\tif ($date[2] == 'February') {\n \t\t\t\t$month = '4';\n \t\t\t} else {\n \t\t\t\t$month = '5';\n \t\t\t}\n \t\t} else if (str_contains($date[1], 'first')) {\n \t\t\t$month = '1';\n \t\t} else {\n \t\t\t$month = intval(str_replace('the ', '', str_replace(' week', '', $date[1])));\n \t\t}\n\n \t\treturn $date[0].' '.$month.' '.$date[2];\n \t}", "function iso_week($year_or_datepoint, int $week = 1): Period\n{\n if (is_int($year_or_datepoint)) {\n return Period::fromIsoWeek($year_or_datepoint, $week);\n }\n\n return Datepoint::create($year_or_datepoint)->getIsoWeek();\n}", "public function isWeekend(): bool\n {\n return in_array((int) $this->getData()['dayOfWeek'], [0, 6], true);\n }", "public static function simple_week_number($datetime, $first_day_of_week)\n {\n }", "public function isWeekend(): bool\n {\n return $this->value === self::SATURDAY || $this->value === self::SUNDAY;\n }", "public function getWeek()\n\t{\n\t\treturn self::$week;\n\t}", "public function getWeek() {\n return $this->week;\n }", "public function checkIfWeekStarted()\n\t{\n\t\tif ( !(self::$currentWeek) && !($week) )\n\t\t{\n\t\t\t$this->deduceCurrentWeek();\n\t\t}\n\n\t\t// Prepare the SQL query that will be used to fetch all the current week's games that have already begun\n\t\t$this->prepareStatement(parent::FETCH_CURRENT_GAMES_KICKED_OFF_KEY, parent::FETCH_CURRENT_GAMES_KICKED_OFF);\n\n\t\t// Execute the query\n\t\t$this->loadAndExecutePreparedQuery(parent::FETCH_CURRENT_GAMES_KICKED_OFF_KEY, array(parent::$currentWeek));\n\n\t\t// Extract all the game IDs for the current week\n\t\t$games = $this->fetchResults();\n\n\t\t// If at least one game has already begun within the current week, the week has started\n\t\treturn (count($games) > 0);\n\t}", "public function week()\n {\n\n $this->config = include 'CalendarSettings/' . ucfirst($this->calendar_type) . '.php';\n\n return $this->config[ 'day_of_week' ]( $this->date_time );\n\n }", "function getWeekday() {\n return array_var($this->date_data, 'wday');\n }", "private function weeksSince(): int\n {\n return \\absint($this->secondsSince() / WEEK_IN_SECONDS);\n }", "public function day_of_week($iso8601 = false) {\n\t\t$iso8601 = ($iso8601) ? 'N' : 'w';\n\n\t\treturn $this->formatted($iso8601);\n\t}", "function startDate($year, $week) \n{ \n if (strlen($week) == 1) {\n $week = \"0\" . $week;\n }\n return @date(\"Y-m-d\", strtotime($year.\"W\".$week.\"7\"));\n}", "function getWeekNumber() {\n\t\treturn $this->format('W');\n\t}", "public static function weekField($parameters){ }", "function getCalenderWeekStart($week) {\n\t\tif (isset($this->days[$week])) {\n\t\t\tfor($i = 0; $i < 7; $i++) {\n\t\t\t\tif ($this->days[$week][$i]) {\n\t\t\t\t\treturn $this->days[$week][$i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function getWeek()\n {\n return isset($this->week) ? $this->week : '';\n }", "public static function week_number($datetime, $first_day_of_week)\n {\n }", "public function wkst($wkst = null)\r\n {\r\n\r\n if (is_null($wkst))\r\n return $this->wkst;\r\n $abbrs = array_keys($this->weekdays);\r\n if (!in_array($wkst, $abbrs))\r\n throw new qCal_DateTime_Exception_InvalidRecur('\"' . $wkst . '\" is not a valid week day, must be one of the following: ' . implode(', ', $abbrs));\r\n $this->wkst = $wkst;\r\n // @todo I wonder if re-sorting the weekdays array would help me in any way...\r\n }", "public function setWeek($var)\n {\n GPBUtil::checkString($var, True);\n $this->week = $var;\n\n return $this;\n }", "function mf_validate_date_weekend($value){\r\n\t\tglobal $mf_lang;\r\n\r\n\t\t$error_message = $mf_lang['val_date_na'];\r\n\t\t\r\n\t\t$target_value = $value[0];\r\n\t\t\r\n\t\tif(date('N', strtotime($target_value)) >= 6){\r\n\t\t\treturn $error_message;\r\n\t\t}else{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "function dateOfWeek($Ymd, $day, $week_start_day = 'Sunday') {\n// global $week_start_day;\n if (!isset($week_start_day)) $week_start_day = 'Sunday';\n $timestamp = strtotime($Ymd);\n $num = date('w', strtotime($week_start_day));\n $start_day_time = strtotime((date('w',$timestamp)==$num ? \"$week_start_day\" : \"last $week_start_day\"), $timestamp);\n $ret_unixtime = strtotime($day,$start_day_time);\n // Fix for 992744\n // $ret_unixtime = strtotime('+12 hours', $ret_unixtime);\n $ret_unixtime += (12 * 60 * 60);\n $ret = date('Ymd',$ret_unixtime);\n return $ret;\n}", "public static function testIfSameWeekday($int, $str) {\n return (Weekdays::$Weekdays[$int] == $str);\n }", "function isWeekend()\r\n {\r\n return $this->weekendflag; \r\n }", "private function checkAppointmentsThisWeek($model, $date) \n\t{\n\t\tlist($year, $month, $day) = explode(\"-\", $date);\n\t\t\n\t\t// Get the weekday of the given date\n\t\t$weekday = date('l',mktime('0','0','0', $month, $day, $year));\n\n\t\tswitch($weekday) {\n\t\t\tcase 'Monday': $numDaysToMon = 0; break;\n\t\t\tcase 'Tuesday': $numDaysToMon = 1; break;\n\t\t\tcase 'Wednesday': $numDaysToMon = 2; break;\n\t\t\tcase 'Thursday': $numDaysToMon = 3; break;\n\t\t\tcase 'Friday': $numDaysToMon = 4; break;\n\t\t\tcase 'Saturday': $numDaysToMon = 5; break;\n\t\t\tcase 'Sunday': $numDaysToMon = 6; break; \n\t\t}\n\n\t\t// Timestamp of the monday for that week\n\t\t$monday = mktime('0','0','0', $month, $day-$numDaysToMon, $year);\n\n\t\t$seconds_in_a_day = 86400;\n\n\t\t// Get date for 7 days from Monday (inclusive)\n\t\tfor($i=0; $i<7; $i++)\n\t\t{\n\t\t\t$dates[$i] = date('Y-m-d', $monday+($seconds_in_a_day*$i) );\n\t\t}\n\t\t\n\t\tforeach( $dates as $date )\n\t\t{\n\t\t\t$existingAppointment = CalendarAppointment::model()->find(array(\n\t\t\t\t'condition' => 'calendar_id = :calendar_id AND start_date = :start_date',\n\t\t\t\t'params' => array(\n\t\t\t\t\t':calendar_id' => $model->id,\n\t\t\t\t\t':start_date' => $date,\n\t\t\t\t),\n\t\t\t));\n\t\t\t\n\t\t\techo 'date: ' . $date.' - '. count($existingAppointment);\n\t\t\techo '<br>';\n\t\t}\n\n\t\techo '<br><br>end..';\t\n\t\texit;\n\t\t\n\t\treturn true;\n\t}", "public function getWeekNumber(): int\n {\n return $this->weekNumber;\n }", "public function getWeekDay(): int;", "private static function getNextMonday (): DateTime { return new DateTime(\"Monday next week\"); }", "public function getStartWeek()\r\n {\r\n $start = new \\DateTime($this->start);\r\n\r\n if ($start->format('l') !== 'Monday') {\r\n $start->modify('Monday this week');\r\n }\r\n\r\n return $start->format(self::DATE_FORMAT);\r\n }", "public function getDayOfWeek(int $timestamp)\n {\n return date('w', $timestamp);\n }", "public function getPostWeekNumber(): int\n {\n return (int) $this->createdTime->format('W');\n }", "function showWeek53($cyear) {\r\n\t//$ShowWeek53 = false ;\r\n\t$weeknum = weekNumber(31,12,$cyear) ;\r\n\tif ($weeknum>52) $ShowWeek53 = $weeknum ;\r\n\tsettype($ShowWeek53,\"integer\");\r\n\treturn $ShowWeek53 ;\r\n}", "function _getTimestampOfWeek($year, $month, $week, $wday, $hour, $minute, $second) {\n if ($month == 0)\n return;\n\n $date = gmmktime($hour, $minute, $second, $month, 1, $year);\n\n // Find first day in month which matches day of the week\n while(1) {\n $wdaynow = gmdate(\"w\", $date);\n if($wdaynow == $wday)\n break;\n $date += 24 * 60 * 60;\n }\n\n // Forward $week weeks (may 'overflow' into the next month)\n $date = $date + $week * (24 * 60 * 60 * 7);\n\n // Reverse 'overflow'. Eg week '10' will always be the last week of the month in which the\n // specified weekday exists\n while(1) {\n $monthnow = gmdate(\"n\", $date); // gmdate returns 1-12\n if($monthnow > $month)\n $date = $date - (24 * 7 * 60 * 60);\n else\n break;\n }\n\n return $date;\n }", "public function isWeekEnd(?DateTime $dateTime = null): bool\n {\n $currentDay = $this->dateTimeToString($dateTime, self::WEEK_DAY_NUMBER);\n\n return (int) $currentDay > 5;\n }", "public function weekly($value) {\n return $this->setProperty('weekly', $value);\n }", "public function daysInWeek() {\n\t\treturn 7;\n\t}", "private function isWeekEnd($date)\n {\n if ($date->format('N') >= 6) {\n return true;\n } else {\n return false;\n }\n }", "public function isMonday()\n {\n return $this->dayOfWeek === static::MONDAY;\n }", "public function everyWeek()\n {\n $this->schedule = 'weekly';\n $this->schedule();\n }", "public function getMinWeek() {\n return $this->minWeek;\n }", "function JDDayOfWeek($julianday, $mode = false)\n{\n}", "function SlowestDayPerWeek($timestamp)\r\n{\r\n\t$weekStart = date('m/d/Y',strtotime($timestamp));\r\n\t$weekEnd = date(\"m/d/Y\", strtotime('+7 days', strtotime($timestamp)));\r\n\t$minDay = date('m/d/Y',strtotime($timestamp));\r\n\t\r\n\tfor($i=0; $i <7; $i++)\r\n\t{\r\n\t\t$min = 5000;\r\n\t\t$dayOfWeek = date(\"Y-m-d H:i:s\", strtotime(sprintf('+%u days', $i), strtotime($timestamp)));\r\n\t\t$totalPerDay = TotalPerDay($dayOfWeek);\r\n\t\tif ($totalPerDay < $min) \r\n\t\t{\r\n\t\t\t$min = $totalPerDay;\r\n\t\t\t$minDay = date('m/d/Y',strtotime($timestamp));\r\n\t\t}\r\n\t}\r\n\t$result = sprintf(\"Slowest day for the week of %s to %s was %s with %u people.\", $weekStart, $weekEnd, $minDay, $min);\r\n\treturn $result;\r\n}", "public function onSaturday(bool $set = null);", "function wwex_report_charts_date_of_weeks($week_year) {\r\n $week_year = explode('-', $week_year);\t\r\n // Adding leading zeros for weeks 1 - 9.\r\n $date_string = $week_year[0] . 'W' . sprintf('%02d', $week_year[1]);\r\n $return['start'] = date('Y-m-d', strtotime($date_string));\r\n $return['end'] = date('Y-m-d', strtotime($date_string . '7'));\r\n return $return;\r\n}", "public function onThursday(bool $set = null);", "public function compareWeek(Piwik_Date $date)\n {\n\t\t$currentWeek = date('W', $this->getTimestamp());\n\t\t$toCompareWeek = date('W', $date->getTimestamp());\n\t\tif( $currentWeek == $toCompareWeek)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\tif( $currentWeek < $toCompareWeek)\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\treturn 1;\n }", "function isWeekend() {\n $weekday = $this->getWeekday();\n return $weekday == 0 || $weekday == 6;\n }", "function get_day_of_the_week($date) {\n echo date('w', strtotime($date));\n }", "public function testGetCalendarWeekStatistics()\n {\n }", "private function getWishlistsWeek()\n {\n $this->runTest(\n 'Test 53. Get wishlist products count by week',\n 'SELECT period, SUM(analytic_shop.wishlist_products_count) as wishlist_products_count\n FROM analytic_data analytic,\n analytic_shop analytic_shop\n WHERE period >= \"2012-10-21 00:00\"\n AND period < \"2012-10-28 00:00\"\n AND analytic_shop.analytic_id = analytic.id\n GROUP BY period\n ORDER BY period\n LIMIT 100'\n );\n }", "public function testZeroWeek()\n {\n $data = $this->_data;\n $data['startTime'] = gmdate('c', strtotime('-6 day'));\n\n $s = new App_Service_Amazon_Ec2_EbsSnapshot($data);\n $this->assertEquals(0, $s->weeksElapsed());\n }", "function isWeekend( $date )\r\n\t\t{\r\n\t\t$weekendDays = array ( 0, 6 );\r\n\t\t$dateArray = getdate( $date );\r\n\t\tif ( in_array( $dateArray[ 'wday' ], $weekendDays ) ) return true;\r\n\t\telse\r\n\t\treturn false;\r\n\t\t}", "function startOfWeek($date)\n {\n $viewtime = adodb_mktime(0,0,0,substr($date,5,2),substr($date,8,2),substr($date,0,4));\n $weekday = strftime(\"%w\",$viewtime);\n if ($weekday==0) $weekday=7;\n return date(\"Y-m-d\" ,$viewtime-(86400*($weekday-1)));\n }", "function checkRepeatWeek($this_currentdate, $week_start, $week_end)\n\t{\n\t\t// builds and returns array\n\t\tif (!isset($this->eventDaysWeek))\n\t\t{\n\t\t\t$this->eventDaysWeek = array();\n\n\t\t\tif (is_null($week_start) || is_null($week_end))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tlist($y, $m, $d) = explode(\":\", JevDate::strftime(\"%Y:%m:%d\", $week_end));\n\t\t\t$weekEndSecond = JevDate::mktime(23, 59, 59, $m, $d, $y);\n\n\t\t\t$this->eventDaysWeek = $this->getRepeatArray($week_start, $week_end, $weekEndSecond);\n\t\t}\n\n\t\treturn (array_key_exists($this_currentdate, $this->eventDaysWeek));\n\t}", "function getWeekDates($year, $week)\r\n {\r\n $arr_time = array();\r\n $arr_time['from_day'] = date(\"Y/m/d\", strtotime(\"{$year}-W{$week}-1\")); //Returns the date of monday in week\r\n $arr_time['to_day'] = date(\"Y/m/d\", strtotime(\"{$year}-W{$week}-7\")); //Returns the date of sunday in week\r\n return $arr_time;\r\n }", "public static function getCurrentCalendarWeek() {\n $calendarWeek = date('W', time());\n return $calendarWeek;\n }", "public function onMonday(bool $set = null);", "public function isThursday()\n {\n return $this->dayOfWeek === static::THURSDAY;\n }", "function _wp_mysql_week($column)\n{\n}", "function BusiestHourPerWeek($timestamp)\r\n{\r\n\t$weekStart = date('m/d/Y',strtotime($timestamp));\r\n\t$weekEnd = date(\"m/d/Y\", strtotime('+7 days', strtotime($timestamp)));\r\n\t$maxDay = date('m/d/Y',strtotime($timestamp));\r\n\t\r\n\tfor($i=0; $i < 7; $i++)\r\n\t{\r\n\t\t$max = 0;\r\n\t\t$day = date(\"Y-m-d H:i:s\", strtotime(sprintf('+%u days', $i), strtotime($timestamp)));\r\n\t\t$totalPerDay = TotalPerDay($totalPerDay);\t\t\r\n\t\tif ($sumPerDay > $max){\r\n\t\t\t$max = $sumPerDay;\r\n\t\t\t$maxDay = date('l',strtotime($timestamp));\r\n\t\t}\r\n\t}\r\n\t\r\n\t$result = sprintf(\"Busiest day for the week of %s to %s was %s with %u people.\", $weekStart, $weekEnd, $maxDay, $max);\r\n\treturn $result;\t\r\n}", "function dtlIsWeekend($dts) {\n // * returns false if invalid input\n if (!dtlIsValidDate($dts) && !dtlIsValidDateTime($dts)) {\n return false;\n }\n $dowName = dtlGetDayName($dts, 'EN');\n return $dowName == 'Sunday' || $dowName == 'Saturday';\n}", "static public function weeks($weeks = 1)\n {\n return static::days(7) * static::validNumber($weeks);\n }", "function generate_week($year = '', $week = '', $data = array())\n\t{\n\t\tif ($year == '')\n\t\t\t$year = date(\"Y\", $this->local_time);\n\n\t\tif ($week == '')\n\t\t\t$week = date(\"W\", $this->local_time);\n\n\t\tif (strlen($year) == 1)\n\t\t\t$year = '200'.$year;\n\n\t\tif (strlen($year) == 2)\n\t\t\t$year = '20'.$year;\n\n\t\tif (strlen($week) == 1)\n\t\t\t$week = '0'.$week;\n\n\t\t$adjusted_date = $this->adjust_date($week, $year);\n\n\t\t$week = $adjusted_date['week'];\n\t\t$year = $adjusted_date['year'];\n\n\n\t\t// Set the starting day of the week\n\t\t$start_days = array('sunday' => 0, 'monday' => 1, 'tuesday' => 2, 'wednesday' => 3, 'thursday' => 4, 'friday' => 5, 'saturday' => 6);\n\t\t$start_day = ( ! isset($start_days[$this->start_day])) ? 0 : $start_days[$this->start_day];\n\n\t\t// Determine the total days in the month\n\t\t//////$total_days = $this->get_total_days($month, $year);\n\t\t// Set the starting day number\n\t\t//////$local_date = mktime(12, 0, 0, $month, date('j'), $year);\n\t\t//////$date = getdate($local_date);\n\t\t//////$day = $date[\"mday\"];\n\n\t\t// Set the starting day number 決定指定週數的星期一的日期\n\t\t//$local_date = week_start_date($week, $year);\n\t\t$local_date = date(\"Y-m-d\",strtotime($year.\"W\".$week));\n\n\t\t$localdate = explode(\"-\", $local_date);\n\t\t$day = $localdate[2];\n\n\t\t// Determine the month 指定週數落在哪個月份\n\t\t$month = $localdate[1];\n\n\t\t// Determine the total days in the month 當月份的天數\n\t\t$total_days = $this->get_total_days($localdate[1], $localdate[0]);\n\n\n\n\t\t// Set the current month/year/day\n\t\t// We use this to determine the \"today\" date\n\t\t$cur_year = date(\"Y\", $this->local_time);\n\t\t$cur_month = date(\"m\", $this->local_time);\n\t\t$cur_day = date(\"j\", $this->local_time);\n\n\t\t$cur_week = date(\"W\", $this->local_time);\n\n\n\t\t$is_current_month = ($cur_year == $year AND $cur_month == $month) ? TRUE : FALSE;\n\n\t\t// Generate the template data array\n\t\t$this->parse_template();\n\n\t\t// Begin building the calendar output\n\t\t$out = $this->temp['table_open'];\n\t\t$out .= \"\\n\";\n\n\t\t$out .= \"\\n\";\n\t\t$out .= $this->temp['heading_row_start'];\n\t\t$out .= \"\\n\";\n\n\t\t// \"previous\" month link\n\t\tif ($this->show_next_prev == TRUE)\n\t\t{\n\t\t\t// Add a trailing slash to the URL if needed\n\t\t\t$this->next_prev_url = preg_replace(\"/(.+?)\\/*$/\", \"\\\\1/\", $this->next_prev_url);\n\n\t\t\t$adjusted_date = $this->adjust_date($week - 1, $year);\n\t\t\t$out .= str_replace('{previous_url}', $this->next_prev_url.$adjusted_date['year'].'/'.$adjusted_date['week'], $this->temp['heading_previous_cell']);\n\t\t\t$out .= \"\\n\";\n\t\t}\n\n\t\t// Heading containing the month/year\n\t\t$colspan = ($this->show_next_prev == TRUE) ? 6 : 7;\n\n\t\t$this->temp['heading_title_cell'] = str_replace('{colspan}', $colspan, $this->temp['heading_title_cell']);\n\t\t$this->temp['heading_title_cell'] = str_replace('{heading}', $this->get_month_name($month).\"&nbsp;\".$year, $this->temp['heading_title_cell']);\n\n\t\t$out .= $this->temp['heading_title_cell'];\n\t\t$out .= \"\\n\";\n\n\t\t// \"next\" month link\n\t\tif ($this->show_next_prev == TRUE)\n\t\t{\n\t\t\t$adjusted_date = $this->adjust_date($week + 1, $year);\n\t\t\t$out .= str_replace('{next_url}', $this->next_prev_url.$adjusted_date['year'].'/'.$adjusted_date['week'], $this->temp['heading_next_cell']);\n\t\t}\n\n\t\t$out .= \"\\n\";\n\t\t$out .= $this->temp['heading_row_end'];\n\t\t$out .= \"\\n\";\n\t\t$day_names = $this->get_day_names();\n\n\t\t// Build the main body of the calendar\n\t\t$limit = $day + 6;\n\n\t\tif ($limit > $total_days)\n\t\t{\n\t\t\t$total_days_left = $limit - $total_days;\n\t\t}\n\n\n\n\t$isoWeekStartDate = $localdate[2];\n\n\t$isoWeekStartMonth = $localdate[1];\n\n\n\t\n\n\n\n\n\n\t\twhile ($day <= $limit)\n\t\t{\n\t\t\t$out .= \"\\n\";\n\t\t\t$out .= $this->temp['cal_row_start'];\n\t\t\t$out .= \"\\n\";\n\n\t\t\t\t\t$out .= \"\\n\";\n\t\t\t\t\t$out .= $this->temp['cell_blank'];\n\t\t\t\t\t$out .= \"\\n\";\n\n\n\t\t\tfor ($i = 0\t; $i < 7; $i++)\n\t\t\t{\n\t\t\t\tif ($day > $total_days)\n\t\t\t\t{\n\t\t\t\t\t$day = 1;\n\t\t\t\t\t$limit = $total_days_left;\n\t\t\t\t}\n\t\t\t\t$out .= ($is_current_month == TRUE AND $day == $cur_day) ? $this->temp['cal_cell_start_today'] : $this->temp['cal_cell_start'];\n\n\t\t\t\t$the_date = mktime(0,0,0, $isoWeekStartMonth, $isoWeekStartDate+$i, $year) ; //$month.'/'.$day;\n\t\t\t\t$the_date = date(\"m/d\", $the_date);\n\n\n\t\t\t\tif ($day > 0 AND $day <= $limit)\n\t\t\t\t{\n\t\t\t\t\tif (FALSE) //(isset($data[$day]))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Cells with content 當日有事件,將事件放入日\n\t\t\t\t\t\t$temp = ($is_current_month == TRUE AND $day == $cur_day) ? $this->temp['cal_cell_content_today'] : $this->temp['cal_cell_content'];\n\n\t\t\t\t\t\tif (is_array($data[$day]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$datas_of_day = '';\n\t\t\t\t\t\t\tforeach ($data[$day] as $day_data) {\n\t\t\t\t\t\t\t $datas_of_day .= $day_data.\"\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$out .= str_replace('{week_day}', $day_names[($start_day + $i) %7], str_replace('{day}', $the_date, str_replace('{content}', nl2br($datas_of_day), $temp)));\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t$out .= str_replace('{week_day}', $day_names[($start_day + $i) %7], str_replace('{day}', $the_date, str_replace('{content}', $data[$day], $temp)));\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// Cells with no content 當日沒有事件\n\t\t\t\t\t\t$temp = ($is_current_month == TRUE AND $day == $cur_day) ? $this->temp['cal_cell_no_content_today'] : $this->temp['cal_cell_no_content'];\n\t\t\t\t\t\t$out .= str_replace('{week_day}', $day_names[($start_day + $i) %7], str_replace('{day}', $the_date, $temp));\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// Blank cells\n\t\t\t\t\t$out .= $this->temp['cal_cell_blank'];\n\t\t\t\t}\n\n\t\t\t\t$out .= ($is_current_month == TRUE AND $day == $cur_day) ? $this->temp['cal_cell_end_today'] : $this->temp['cal_cell_end']; \n\t\t\t\t$day++;\n\t\t\t}\n\t\t\t$out .= \"\\n\";\n\t\t\t$out .= $this->temp['cal_row_end'];\n\t\t\t$out .= \"\\n\";\n\t\t}\n\n\t// 每個時段的事件\n\t$time = 10;\n\t$tlimit = 22;\n\n\n\t\twhile ($time <= $tlimit)\n\t\t{\n\t\t\t\n\t\t\t$out .= \"\\n\";\n\t\t\t$out .= $this->temp['time_row_start'];\n\t\t\t$out .= \"\\n\";\n\t\t\t$out .= str_replace('{time}', $time.':00 ~ '.$time.':50', $this->temp['time_cell']);\n\n\t\t\tfor ($i = 0; $i < 7; $i++)\n\t\t\t{\n\t\t\t\t$the_date = mktime(0,0,0, $isoWeekStartMonth, $isoWeekStartDate+$i, $year) ; //$month.'/'.$day;\n\t\t\t\t$thedate = date(\"Ymd\", $the_date);\n\t\t\t\t$cur_time = date(\"H\");\n\n\t\t\t\t$out .= (FALSE) ? $this->temp['timecnt_cell_start_today'] : $this->temp['timecnt_cell_start'];\n\t\t\t\t\tif (isset($data[$thedate][$time]))\n\t\t\t\t\t{\n\n\t\t\t\t\t\t// Cells with content 當日有事件,將事件放入日\n\t\t\t\t\t\t$temp = ($is_current_month == TRUE AND $day == $cur_time) ? $this->temp['cal_cell_content_today'] : $this->temp['timecnt_cell_content'];\n\n\t\t\t\t\t\tif (is_array($data[$thedate][$time]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$datas_of_day = '';\n\t\t\t\t\t\t\tforeach ($data[$thedate][$time] as $day_data) {\n\t\t\t\t\t\t\t $datas_of_day .= $day_data.\"\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$out .= str_replace('{tcnt}', nl2br($datas_of_day), $temp);\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t$out .= str_replace('{tcnt}', $data[$thedate][$time], $temp);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// Cells with no content 當日沒有事件\n\t\t\t\t\t\t$out .= $this->temp['timecnt_cell_blank'];\n\t\t\t\t\t}\n\n\t\t\t\t$out .= (FALSE) ? $this->temp['timecnt_cell_end'] : $this->temp['timecnt_cell_end'];\n\n/*********************************************/\n\n\t\t\t}\n\t\t\t\t$time++;\n\n\t\t\t$out .= \"\\n\";\n\t\t\t$out .= $this->temp['time_row_end'];\n\t\t\t$out .= \"\\n\";\n\t\t}\n\n\n\t\t$out .= \"\\n\";\n\t\t$out .= $this->temp['table_close'];\n\n\t\treturn $out;\n\t}", "function getIsoWeeksInYear($year) {\r\n\t$date = new DateTime();\r\n $date->setISODate($year, 53);\r\n return ($date->format(\"W\") === \"53\" ? 53 : 52);\r\n\t}", "function _getDayStartOfTimestamp($timestamp) {\n return $timestamp - ($timestamp % (60 * 60 * 24));\n }", "private function weekStartsOn($date)\n {\n if (!$date) return;\n return date('Y-m-d', strtotime('Last Sunday + 1 day', $date->getTimestamp()));\n }", "private function weekday() {\n\t\t$DayInfo = gmmktime(\"0\",\"0\",\"0\",$this->DateArray['m'], $this->DateArray['d'], $this->DateArray['Y']);\n\t\t$wday = localtime($DayInfo, 1);\n\t\t$wday = $wday[\"tm_wday\"];\n\t\tif ($wday == 0)\n\t\t\t$wday = 7;\n\t\t$this->DateArray['w'] = $wday;\n\t}", "public function isNextWeek()\n {\n return $this->weekOfYear === static::now($this->getTimezone())->addWeek()->weekOfYear;\n }" ]
[ "0.77315366", "0.7196538", "0.69856054", "0.68022597", "0.6574872", "0.65365046", "0.65349185", "0.64893246", "0.6470412", "0.630654", "0.6233066", "0.62323016", "0.6220655", "0.6200745", "0.619992", "0.6178051", "0.61303043", "0.61221504", "0.61043817", "0.6102391", "0.60977495", "0.6049915", "0.60481197", "0.60446817", "0.6042695", "0.60397875", "0.6007956", "0.6005879", "0.59862185", "0.5983302", "0.5972968", "0.59593785", "0.59242064", "0.59164757", "0.5904836", "0.58990145", "0.5865779", "0.58577216", "0.5843206", "0.58378357", "0.5829587", "0.5827477", "0.58252364", "0.5807291", "0.5798461", "0.5798392", "0.577794", "0.57667744", "0.5748234", "0.57472855", "0.5746098", "0.57218176", "0.5713842", "0.5710871", "0.5700625", "0.56880784", "0.5683156", "0.5676337", "0.56704706", "0.56663495", "0.56655455", "0.56577206", "0.56550163", "0.5641243", "0.56333256", "0.563314", "0.5626467", "0.5623959", "0.5588821", "0.5569517", "0.55487853", "0.55449367", "0.5544777", "0.5533684", "0.5532939", "0.55319333", "0.5527459", "0.5512904", "0.551116", "0.5504496", "0.550347", "0.54943407", "0.5488446", "0.5486168", "0.5477675", "0.54584485", "0.54493064", "0.54383856", "0.5433437", "0.5430675", "0.54261494", "0.5419895", "0.54172665", "0.5412032", "0.5402168", "0.53946733", "0.5394665", "0.53859055", "0.5376119", "0.5374248" ]
0.78351456
0
Checks is given timestamp is in this year
Проверяет, что заданный временной штамп находится в этом году
public static function isThisYear($timestamp) { return date('Y', $timestamp) == date('Y', time()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isCurrentYear() : bool\n {\n return date('Y', $this->getTimestamp()) == date('Y');\n }", "public function is_year()\n {\n }", "public function isCurrentYear(): bool\n {\n return ((int) date('Y')) === $this->year;\n }", "function isCurrentYear(){\r\n $start_map = $this->start();\r\n $current_map = $this->current();\r\n return ($start_map['year'] == $current_map['year']);\r\n }", "public function hasYear():bool\n {\n if (is_int($this->year)) {\n return true;\n }\n return false;\n }", "public static function getIsCurrentYear(int $year): bool\n {\n return $year == date('Y');\n }", "private function isValidYear($year) \r\n {\r\n return $year >= 1902 and $year <= 2037;\r\n }", "public function isCurrentYear()\n {\n return $this->isSameYear();\n }", "function isSameYear(){\r\n $start_map = $this->start();\r\n $stop_map = $this->stop();\r\n $ret_bool = false;\r\n \r\n if($start_map['year'] == $stop_map['year']){\r\n \r\n $ret_bool = true;\r\n \r\n }else{\r\n \r\n if(($stop_map['mon'] == 1) && ($stop_map['mday'] == 1) && $this->isMidnight($stop_map)){\r\n \r\n $ret_bool = ($start_map['year'] + 1) == $stop_map['year'];\r\n \r\n }//if\r\n \r\n }//if/else\r\n \r\n \r\n return $ret_bool;\r\n }", "final public static function isYear($value):bool\n {\n return self::regex('year',$value);\n }", "protected function isValidYear($year)\n {\n return $year <= date('Y');\n }", "function tep_is_leap_year($year) {\n if ($year % 100 == 0) {\n if ($year % 400 == 0) return true;\n } else {\n if (($year % 4) == 0) return true;\n }\n\n return false;\n }", "protected function yearIsValid()\n {\n return $this->year && is_numeric($this->year) && $this->year > 0;\n }", "public function isLastYear()\n {\n return $this->year === static::now($this->getTimezone())->subYear()->year;\n }", "public function isLeapYear(): bool;", "public function intersectsYear($year): bool\n {\n if($this->interval === 1) return true;\n\n $mod = $year - ($this->offset % $this->interval);\n\n if($year < 0 && !$this->yearZeroExists){\n $mod++;\n }\n\n return ($mod % $this->interval) == 0;\n }", "function dtlIsValidYear($year, $count1582 = false) {\n // return true if $year is a valid year\n // max is 9999; min is 1583 by default\n // if $count1582 is true then min is 1582\n return dtlIsInt($year) && $year >= ($count1582 ? 1582 : 1583) && $year <= 9999;\n}", "function twe_is_leap_year($year) {\n if ($year % 100 == 0) {\n if ($year % 400 == 0) return true;\n } else {\n if (($year % 4) == 0) return true;\n }\n\n return false;\n }", "function zen_is_leap_year($year) {\n if ($year % 100 == 0) {\n if ($year % 400 == 0) return true;\n } else {\n if (($year % 4) == 0) return true;\n }\n\n return false;\n }", "public static function isCurrentYear(DateTime $date): bool\n {\n return $date->format('Y') === self::formatNow('Y');\n }", "public static function year($value) {\n\t\tif (!is_numeric($value)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn (self::is_number($value) && $value >= 1900 && $value <= 2200);\n\t}", "public function isNextYear()\n {\n return $this->year === static::now($this->getTimezone())->addYear()->year;\n }", "function osc_is_leap_year($year) {\n if ($year % 100 == 0) {\n if ($year % 400 == 0) return true;\n } else {\n if (($year % 4) == 0) return true;\n }\n\n return false;\n }", "function year_validation($str) {\n // $str will be field value which post. will get auto and pass to function.\n $current_year = strtotime($str);\n $timestamp = strtotime('-18 years');\n\n if ($current_year > $timestamp) {\n $this->form_validation->set_message(\"year_validation\", $this->lang->line('invalid_dob'));\n return FALSE;\n } else {\n return TRUE;\n }\n }", "public function isYearly()\n {\n return $this->interval === 'yearly';\n }", "private function IsYear($year = \"\")\r\n\t{\r\n\t\tif(!strlen($year) == 4 || !is_numeric($year)) return false;\r\n\t\tfor($i = 0; $i < 4; $i++){\r\n\t\t\tif(!(isset($year[$i]) && $year[$i] >= 0 && $year[$i] <= 9)){\r\n\t\t\t\treturn false;\t\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "static function year($year = 0,$tz_offset = 0,$timestamp = 0){\r\n \r\n // sanity...\r\n if(empty($year)){ return date('Y'); }//if\r\n \r\n $ret_int = $year;\r\n if(mb_strlen(strval($year)) === 2){\r\n $timestamp = empty($timestamp) ? self::timestamp($tz_offset) : $timestamp;\r\n $full_year = (string)date('Y',$timestamp);\r\n $ret_int = intval($full_year[0].$full_year[1].$year);\r\n }//if\r\n return $ret_int;\r\n \r\n }", "public function test_year_method()\n {\n $this->assertTrue(Validation::year(2017));\n $this->assertTrue(Validation::year(1917));\n $this->assertFalse(Validation::year(0));\n $this->assertFalse(Validation::year(20018));\n $this->assertFalse(Validation::year('nothing'));\n }", "function getrenewtime($renew_year, $currentyear) {\n\t//\tmktime(0, 0, 0, date('n'), date('j'), date('Y')) <= mktime(23, 59, 59, 3, 31, $renew_year));\n\treturn true;\n}", "public abstract function get_min_year();", "public function isLeapYear(): bool\n {\n return (int) $this->format('L') === 1;\n }", "function checkLeapYear($year){\n if(date('L', strtotime(\"$year-01-01\"))){\n \n\t \n\t return true;\n }\n else{\n \n\t return false;\n }\n}", "public function year($date);", "function is_leap_year($year)\r\n{\r\nif ((($year % 4) == 0 and ($year % 100)!=0) or ($year % 400) == 0)\r\nreturn 1;\r\nelse\r\nreturn 0;\r\n}", "function is_leap_year($year)\n {\n return ((($year % 4) == 0) && ((($year % 100) != 0) || (($year % 400) == 0)));\n }", "public static function CheckYear($year)\n {\n $leap=false;\n\tif($year%4 ==0)\n\t\t{ \n\t\t\tif($year%100==0)\n\t\t\t{\n\t\t\t\tif($year%400==0)\n\t\t\t\t\t$leap=true;\n\t\t\t\telse \n\t\t\t\t\t$leap=false;\n\t\t\t\t\n\t\t\t}\n\t\t\telse $leap=true;\n\t\t\t\n\t\t}else $leap=false;\n\t\t\t\n\t\tif($leap)\n\t\t\techo\"Is a leap year\";\n\t\telse\n\t\t echo \"Is not a leap year\";\n\t\treturn $leap;\n\n }", "public function isLeapYear(): bool\n {\n return $this->formatStart('L') == 1;\n }", "private function is_leap_year($year)\n\t{\n\t\treturn array_search((($year + 2346) % 2820) % 128, array(\n\t\t\t\t5, 9, 13, 17, 21, 25, 29,\n\t\t\t\t34, 38, 42, 46, 50, 54, 58, 62,\n\t\t\t\t67, 71, 75, 79, 83, 87, 91, 95,\n\t\t\t\t100, 104, 108, 112, 116, 120, 124, 0\n\t\t));\n\t}", "private function _isTimestamp($timestamp) {\n return preg_match(\"/^([1-9]\\d{0,})$/\", $timestamp);\n }", "function isleapyear($year)\r\n\t{\r\n \t\treturn (intval($year % 4)==0 && (intval($year % 100)!=0 || intval($year % 400)==0));\r\n\t}", "public function leapyear() {\n\t\treturn (bool) $this->formatted('L');\n\t}", "public function isLeadYear($year) {\n return !($year % 4);\n }", "public function testGetYear()\n {\n $this->assertSame(2000, DateTime::createFromFormat('Y-m-d', '2000-01-01')->getYear());\n $this->assertSame(3000, DateTime::createFromFormat('Y-m-d', '3000-01-01')->getYear());\n }", "public static function isTimestamp(int $timestamp): bool\n {\n $validator = new DateValidator();\n $validator->format = 'php:U';\n\n return $validator->validate($timestamp);\n }", "function under_thirteen($dob) {\n $dob = strtotime($dob);\n //The age to be over, over +13\n $min = strtotime('+13 years', $dob);\n\n if(time() < $min) {\n return true;\n }\n return false;\n}", "public function is_leap_year($year)\n {\n $a = $year;\n if ($a % 100 == 0) {\n if ($a % 400 == 0) {\n return true;\n } else {\n return false;\n }\n } else {\n if ($a % 4 == 0) {\n return true;\n } else {\n return false;\n }\n }\n }", "public function intersectsYear(int $year): bool\n {\n return $this->intervals->intersectsYear($year, $this->yearZeroExists);\n }", "function alexa_validate_timestamp ($timestamp) {\n\n\t// Ensure that the timestamp from within the HTTP request JSON is within the past minute\n\tif (time() - strtotime($timestamp) > 60) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n}", "function sLeapYear($year)\n{\n $ary = array(1, 5, 9, 13, 17, 22, 26, 30);\n $b = $year % 33;\n return false;\n// is not use!!!\n if (in_array($b, $ary))\n return true;\n return false;\n}", "public function testGetYear()\n {\n $this->assertSame($this->object->getYear(), 2010);\n \n // Ensure the year is properly stored for next-calendar-year terms.\n $summerTest = new UoY_Date(\n 2010,\n UoY_DateConstants::TERM_SUMMER,\n false,\n 1,\n UoY_DateConstants::DAY_MONDAY\n );\n \n $this->assertSame($summerTest->getYear(), 2010);\n }", "protected function checkDate($timestamp) {\r\n\t\t$now = time();\r\n\t\t\r\n\t\tif ($timestamp > 0 && $timestamp < $now) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "function is_timestamp ($timestamp) {\n\n\treturn (bool) preg_match('/^(?:(?P<year>[-+]\\\\d{4,}|\\\\d{4})(?:(?:-(?P<month>1[012]|0[1-9])(?:-(?P<day>3[01]|[12]\\\\d|0[1-9]))?)|(?:-[Ww](?P<yearweek>5[0-3]|[1-4]\\\\d|0[1-9])(?:-(?P<weekday>[1-7]))?)|(?:-(?P<yeardays>36[0-6]|3[0-5]\\\\d|[12]\\\\d{2}|0[1-9]\\\\d|00[1-9])))?)(?:(?:[Tt]| +)(?P<hour>2[0-4]|[01]\\\\d)(?:\\\\:(?P<minutes>[0-5]\\\\d)(?:\\\\:(?P<seconds>60|[0-5]\\\\d))?)?(?P<fraction>[,.][\\\\d.]+)?\\\\s*(?P<timezone>Z|[+-](?:1[0-4]|0[0-9])(?:\\\\:?[0-5]\\\\d)?)?)?$/', $timestamp);\n\n}", "public static function valid_timestamp($timestamp)\n\t{\n\t\t$timestamp_cutoff = \\Config::get('engine.timestamp_cutoff', 15);\n\t\t\n\t\t// Is the timestamp from 60 seconds ago up to the current time?\n\t\tif ((int)$timestamp >= (static::$gm_time - (int)$timestamp_cutoff) && (int)$timestamp <= static::$gm_time) {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// Timestamp out of scope\n\t\treturn false;\n\t}", "function setStartingYear( $year )\n\t{\n\t\tif ( $year < $this->today_info[\"year\"] && $year >= 1600 )\n\t\t{\n\t\t\t$this->starting_year = $year;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "function is_year() {\n\tglobal $wp_query;\n\n\tif ( ! isset( $wp_query ) ) {\n\t\t_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );\n\t\treturn false;\n\t}\n\n\treturn $wp_query->is_year();\n}", "protected function computeYear(&$expression)\n\t{\n\t\t$expression = trim($expression);\n\t\t// numeric expression\n\t\tif ($this->checkNumericExpr($expression)) {\n\t\t\treturn true;\n\t\t}\n\t\t// expression with wildcards\n\t\tif ($this->checkDateWildcardExpr($expression, Date_Time::YEAR)) {\n\t\t\treturn true;\n\t\t}\n\t\t// expression with formula\n\t\tif ($this->computeFormula($expression, Date_Time::YEAR)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function test_validDate_PresentAndBadFormat_YearInt()\n {\n $validator = new Model_Validator();\n $this->assertFalse($validator->validDate(2017),\n \"Validator :: validDate :: False when only integer year provided\");\n }", "public static function isThisYear($dateString, $timezone = null) {\r\n\t\t$timestamp = self::fromString($dateString, $timezone);\r\n\t\t$now = self::fromString('now', $timezone);\r\n\t\treturn date('Y', $timestamp) === date('Y', $now);\r\n\t}", "function isYearLeap($x) {\n $bool = false;\n\n if ($x % 100 == 0) {\n //simtmetis\n if ($x % 400 == 0) {\n $bool = true;\n }\n } else if ($x % 4 == 0) {\n $bool = true;\n }\n return $bool;\n}", "public function testSubYear()\n {\n $this->assertEquals('2011-05-01', $this->date->subYears(2)->toDateString());\n }", "public static function isValidTimestamp($timestamp):bool\n\t{\n\t\treturn (ctype_digit($timestamp) && strtotime(date('Y-m-d H:i:s', $timestamp)) === (int)$timestamp);\n\t}", "function isJLeapYear($JYear) {\n if ( ((7 * $JYear + 1) % 19) < 7 )\n return true;\n else\n return false;\n}", "function dtlSetYear(&$dts, $year) {\n // * given a DateStr or a DateTimeStr, set the year to a new value\n // * returns false if $dts is not a DateStr or DateTimeStr\n // * does not require that input or output be a valid Gregorian date\n // check for valid input:\n if (!dtlIsInt($year) || (!dtlIsDateStr($dts) && !dtlIsDateTimeStr($dts))) {\n return false;\n }\n // do we need to do anything?\n $da = dtlDateStrToArray(dtlGetDate($dts));\n if ($year == $da['year']) {\n return true;\n }\n // change the year and make date valid if possible:\n $month = $da['month'];\n $day = $da['day'];\n dtlMakeDateValid($year, $month, $day, true);\n // apply new date:\n dtlSetDate($dts, dtlDateStr($year, $month, $day));\n return true;\n}", "public function getYear()\n {\n return $this->startTimeStamp ['year'];\n }", "private function yearsSince(): int\n {\n return \\absint($this->secondsSince() / YEAR_IN_SECONDS);\n }", "private function validate_year($year){\n\t\tif($year<1800 || $year>2100){\n\t\t\tthrow new \\Exception(\"The year can not be less than 1800 or grater than 2100. \");\n\t\t}\n\n\t\tif(!preg_match('/^[0-9]+$/', $year)){\n\t\t\tthrow new \\Exception(\"Please only uses numbers. \");\n\t\t}\n\t}", "public static function Date($string){\n $date = date('Y', strtotime($string));\n return ($date == \"1970\" || $date == '') ? false : true;\n }", "function isLeapYear($year){\r\n\t$year = substr($year,1);\r\n\tif( $year%400 == 0) return true;\r\n\tif( $year%4 == 0 && $year%100 != 0) return true;\r\n\treturn false;\r\n}", "function herdcMessage($year)\r\n {\r\n /*\r\n SC says: \"The HERDC coding for a given year will not be finalised until about June/July\r\n the following year (so 2010 publications should have a finalised HERDC code by July 2011).\"\r\n */\r\n $pubYear = date(\"Y\", strtotime($year + '1 year'));\r\n $pubYear = (int)$pubYear;\r\n\r\n $currentMonth = date(\"m\");\r\n $currentYear = date(\"Y\");\r\n\r\n if ($pubYear >= $currentYear\r\n || ($pubYear == ($currentYear - 1) && $currentMonth < 7)\r\n ) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }", "private function timestampIsValid($timestamp)\n {\n if (!preg_match('/^[\\d]{4}-[\\d]{2}-[\\d]{2}T[\\d]{2}:[\\d]{2}:[\\d]{2}(?:\\.\\d+)?Z$/', $timestamp)) {\n return false;\n }\n\n return true;\n }", "function isLeapYear($year) {\n\n \t$isLeapYear = false;\n \tif( (($year % 4)==0 &&($year % 100)!=0) || ($year % 400)==0 )\n \t\t$isLeapYear = true;\n \t\treturn $isLeapYear ;\n }", "function copyrightYear(){\nreturn date('Y');\n}", "function isLeapYear($year) {\n if(($year%4)==0) {\n if(($year/100)) {\n if(($year/400)) {\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return false;\n }\n }\n else {\n return false;\n }\n }", "private function isValidTimeStamp($timestamp)\n {\n return ((string) (int) $timestamp === $timestamp)\n && ($timestamp <= PHP_INT_MAX)\n && ($timestamp >= ~PHP_INT_MAX);\n }", "public static function leapYear($year)\n {\n if(($year %4 ==0) && (($year % 100 == 0) || ($year % 400==0)))\n {\n return true;\n }\n else\n {\n return false;\n }\n \n\n }", "private function validateTimestampInTheFuture($timestamp)\n {\n return $timestamp >= time();\n }", "function dtlCurrentYear() {\n return date('Y');\n}", "public static function is_leap_year($year)\n\t{\n\t\treturn (0 ==$year%4&&0!=$year%100 || 0 ==$year%400);\n\t}", "public function isLeapYear($year='')\n\t\t\t{\n\t\t\t $year = (strlen($year))? $year : date('Y');\n\t\t\t return ((($year % 4 == 0) &&($year % 100 != 0)) || ($year % 400 == 0))? true : false;\t\t\n\t\t\t}", "function isValid($timestamp)\n{\n return ($timestamp === (int) $timestamp)\n && ctype_digit((string) $timestamp)\n && strlen((string) $timestamp) === 16;\n}", "private function leap_gregorian($year) {\n return (($year % 4) == 0) && (!((($year % 100) == 0) && (($year % 400) != 0)));\n }", "function is_est($time)\n{\n // get year\n $Y = gmdate(\"Y\", $time);\n\n // calc start / end dates and time for that year\n $begin_date = (31 - (5*$Y/4 + 4) % 7);\n $end_date = (31 - (5*$Y/4 + 1) % 7);\n $begin_time = gmmktime(0,0,0, 3,$begin_date,$Y);\n $end_time = gmmktime(0,0,0, 10,$end_date,$Y);\n\n // if it's in that period\n $is_dst = $time >= $begin_time && $time < $end_time;\n return $is_dst;\n}", "function is_valid_date($month, $day, $year, $is_later_date)\r\n{\r\n // depending on the year, calculate the number of days in the month\r\n if ($year % 4 == 0) // LEAP YEAR \r\n $days_in_month = array(31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);\r\n else\r\n $days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);\r\n\r\n\r\n // first, check the incoming month and year are valid. \r\n if (!$month || !$day || !$year) return false;\r\n if (1 > $month || $month > 12) return false;\r\n if ($year < 0) return false;\r\n if (1 > $day || $day > $days_in_month[$month-1]) return false;\r\n\r\n\r\n // if required, verify the incoming date is LATER than the current date.\r\n if ($is_later_date)\r\n { \r\n // get current date\r\n $today = date(\"U\");\r\n $date = mktime(0, 0, 0, $month, $day, $year);\r\n if ($date < $today)\r\n return false;\r\n }\r\n\r\n return true;\r\n}", "public function getYear(): int\n {\n return (int) $this->format('Y');\n }", "public static function getYearStart($stamp = null) {\n $stamp = static::parseStamp($stamp);\n $Y = date(\"Y\", $stamp);\n return strtotime($Y . \"-01-01\");\n }", "public function isUnder18() {\n // Get DOB as a DateTime object\n \t$dob = $this->getDobDateTime();\n \n // Add 18 years\n $dob->add(new DateInterval('P18Y'));\n\n // Format as Unix timestamp\n $timestamp = $dob->format('U');\n\n // If dob timestamp is in the future (greater than now), student is under 18\n if($timestamp > time()){\n \treturn true;\n }\n \n return false;\n }", "function Leap_year(int $year) {\n if ($year <= 0) return;\n if ($year % 4 == 0) {\n if ($year % 100 > 0) return true;\n if ($year % 400 > 0) return;\n return true;\n }\n return;\n}", "function thisYear( $atts ){\n return date(\"Y\");\n}", "public function isLeapYear() {\r\n\t\t\t$temp = $this->tempWorkingYear($this->year);\r\n\r\n\t\t\treturn (date('L', strtotime($temp . '-' . $this->month . '-' . $this->day)) == 1) ? true : false;\r\n\t\t}", "function isleapyear()\n {\n return ($this->c_Year%400==0) || ($this->c_Year%4==0 && $this->c_Year%100!=0);\n }", "public function getYear()\n {\n return date('Y');\n }", "function cp_isValid_age($birthDay,$birthMonth,$birthYear){\r\n return date('Ymd') - ($birthYear*10000+$birthMonth*100+$birthDay) >= 180000;\r\n}", "public function testRespectForTheAgedDayBetween1996And2003(): void\n {\n $year = 1998;\n $this->assertHoliday(\n self::REGION,\n self::HOLIDAY,\n $year,\n new \\DateTime(\"{$year}-9-15\", new \\DateTimeZone(self::TIMEZONE))\n );\n }", "public static function isBirthYearValid($birthYear) {\r\n\t\t\r\n\t\t$currentYear = date(\"Y\");\r\n\t\t\r\n\t\treturn $birthYear == 0 || \r\n\t\t (($birthYear >= $currentYear - 120) && ($birthYear <= $currentYear - 5));\r\n\t}", "function dateYear($data){\r\n\tif(strtotime($data) == ''){\r\n\t\treturn '';\r\n\t}else{\r\n\t\treturn date(\"Y\",strtotime($data));\r\n\t}\r\n}", "public static function getCurrentYear(){\r\n\r\n\t\treturn date('Y');\r\n\t}", "public function is_timestamp($Mix_Timestamp)\n\t{\n\t\treturn is_int($Mix_Timestamp);\n\t}", "function dtlGetYear($dts = '') {\n // * if no params, returns current year\n // * returns false if $dts not a DateStr or DateTimeStr (no validity checking)\n if ($dts == '') {\n $dts = dtlToday();\n }\n elseif (!dtlIsDateStr($dts) && !dtlIsDateTimeStr($dts)) {\n return false;\n }\n return (int) substr($dts, 0, 4);\n}", "function leap_islamic($year)\n{\n return ((($year * 11) + 14) % 30) < 11;\n}", "function isValidTimeStamp($strTimestamp) {\n\t\t\treturn (($strTimestamp <= PHP_INT_MAX)\n\t\t\t\t&& ($strTimestamp >= ~PHP_INT_MAX));\n\t\t}" ]
[ "0.7414373", "0.728142", "0.71384686", "0.7038375", "0.69635797", "0.6927871", "0.6891098", "0.6843501", "0.68253624", "0.67865664", "0.6722407", "0.66387075", "0.6614019", "0.66094416", "0.6608157", "0.65826434", "0.6568144", "0.65677243", "0.65568304", "0.6538904", "0.652493", "0.65183425", "0.6505201", "0.64070433", "0.6389247", "0.63756406", "0.6348721", "0.6317237", "0.6280333", "0.6272681", "0.6270759", "0.62628716", "0.62618047", "0.6251847", "0.61925197", "0.61733216", "0.61713356", "0.61611867", "0.6141947", "0.61418366", "0.61119276", "0.61067015", "0.60665303", "0.60498947", "0.6043391", "0.60363054", "0.60189176", "0.60141414", "0.6008318", "0.6006512", "0.59997666", "0.59911364", "0.59809655", "0.5975041", "0.5972004", "0.59652466", "0.59650654", "0.5960724", "0.5948712", "0.5940618", "0.5909087", "0.5906168", "0.58941466", "0.58930194", "0.58870286", "0.5862238", "0.5840703", "0.58372986", "0.5826873", "0.5826745", "0.5814998", "0.5807878", "0.58013535", "0.57975423", "0.5793652", "0.5785865", "0.57704556", "0.57629186", "0.5759769", "0.5750304", "0.57480335", "0.57170916", "0.5715831", "0.57026094", "0.56970954", "0.5695428", "0.56948423", "0.5693253", "0.56872267", "0.56765074", "0.56710327", "0.5664156", "0.5662392", "0.5658567", "0.5654199", "0.565104", "0.56493974", "0.56469095", "0.5645552", "0.5640689" ]
0.81247133
0
Register custom twig extensions.
Регистрация пользовательских расширений twig.
private function registerTwigExtensions() { foreach ($this->app->getSetting('twig_extensions', []) as $extension) { $this->twig->addExtension(new $extension($this)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function onTwigExtensions()\n {\n require_once __DIR__ . '/classes/Twig/VimeoTwigExtension.php';\n $this->grav['twig']->twig->addExtension(new VimeoTwigExtension());\n }", "public function addTwigExtension()\n\t{\n\t\tCraft::import(\n\t\t\t'plugins.autolink.twigextensions.AutoLinkTwigExtension'\n\t\t);\n\n\t\treturn new AutoLinkTwigExtension();\n\t}", "public function addTwigExtension()\n {\n Craft::import('plugins.labelenvironment.twigextensions.LabelEnvironmentTwigExtension');\n return new LabelEnvironmentTwigExtension();\n }", "public function addTwigExtension()\n {\n Craft::import('plugins.commercing.twigextensions.CommercingTwigExtension');\n\n return new CommercingTwigExtension();\n }", "function add_to_twig($twig) {\r\n $twig->addExtension(new Twig_Extension_StringLoader());\r\n $twig->addExtension(new Twig_Extension_Debug());\r\n $twig->addFunction( new Twig_SimpleFunction('wp_head', wp_head() ) );\r\n $twig->addFunction( new Twig_SimpleFunction('wp_footer', wp_footer() ) );\r\n return $twig;\r\n}", "public function addTwigExtension()\n\t{\n\t\tCraft::import('plugins.haxx.twigextensions.HaxxTwigExtension');\n\t\treturn new HaxxTwigExtension();\n\t}", "public function addTwigExtension()\n {\n Craft::import('plugins.dashcamel.twigextensions.DashCamelTwigExtension');\n\n return new DashCamelTwigExtension();\n }", "protected function registerBladeExtensions()\n {\n $this->app->afterResolving('blade.compiler', function (BladeCompiler $bladeCompiler) {\n $bladeCompiler->directive('ShopDataScript', function () {\n return \"<?php echo '<script>window.ecommerceConfig = '. Shop::dumpData() .'</script>'; ?>\";\n });\n $bladeCompiler->directive('ShopData', function ($value) {\n return \"<?php echo Shop::dumpData()[$value]; ?>\";\n });\n });\n }", "public function extTwig($twig){\n // Core, Escaper, and Optimizer extensions are registered by default, no own extension defined\n // add build-in Extensions for Twig in Dev-Environment\n if($_ENV['ENV'] === 'Dev') {\n // defines the dump function\n $twig->addExtension(new DebugExtension());\n }\n return $twig;\n }", "public function onTwigRegistration()\n {\n $twig = $this->getPico()->getTwig();\n $twig->addFunction(new Twig_SimpleFunction('get_all_tags', array($this, 'getAllTags')));\n $twig->addFilter(new \\Twig\\TwigFilter('apply_tag_filter', array($this, 'applyTagFilter')));\n }", "final protected function extendTwigService()\n {\n $app = $this->getContainer();\n\n $app['twig'] = $app->share(\n $app->extend(\n 'twig',\n function ($twig) {\n $this->loadTwig($twig);\n\n return $twig;\n }\n )\n );\n }", "public function setupTwig()\n {\n // ------------\u000b\n $this->register(new \\Silex\\Provider\\TwigServiceProvider(),\n [\n 'twig.path' => $this->myTemplatesPath\n ]\n );\n }", "public function setupTwig()\n {\n // ------------\u000b\n $this->register(new \\Silex\\Provider\\TwigServiceProvider(),\n [\n 'twig.path' => $this->myTemplatesPath\n ]\n );\n }", "public function addTwigExtension()\n {\n Craft::import('plugins.customerreferralprogram.twigextensions.CustomerReferralProgramTwigExtension');\n\n return new CustomerReferralProgramTwigExtension();\n }", "function add_to_twig($twig){\n\t\t\t$twig->addExtension(new Twig_Extension_StringLoader());\n\t\t\t// $twig->addFilter('myfoo', new Twig_Filter_Function('myfoo'));\n\t\t\treturn $twig;\n\t\t}", "function add_to_twig( $twig ) {\n\t\t//$twig->addExtension( new Twig_Extension_StringLoader() );\n\t\t//$twig->addFilter( 'myfoo', new Twig_Filter_Function( 'myfoo' ) );\n\t\t//return $twig;\n\t}", "public function provideViewPathAndBundleAndExtension()\n {\n yield [\n 'User:Active',\n 'MyExtraBundle',\n '',\n null,\n ];\n\n yield [\n 'User:Active',\n 'MyExtraBundle',\n 'js.twig',\n '@MyExtra/User/Active.js.twig',\n ];\n }", "protected function registerBladeExtensions()\n {\n $this->app->afterResolving('blade.compiler', function (BladeCompiler $bladeCompiler) {\n $bladeCompiler->directive('role', function ($role) {\n return \"<?php if(auth()->check() && auth()->user()->hasRole({$role})): ?>\";\n });\n $bladeCompiler->directive('endrole', function () {\n return '<?php endif; ?>';\n });\n\n $bladeCompiler->directive('hasrole', function ($role) {\n return \"<?php if(auth()->check() && auth()->user()->hasRole({$role})): ?>\";\n });\n $bladeCompiler->directive('endhasrole', function () {\n return '<?php endif; ?>';\n });\n\n $bladeCompiler->directive('hasanyrole', function ($roles) {\n return \"<?php if(auth()->check() && auth()->user()->hasAnyRole({$roles})): ?>\";\n });\n $bladeCompiler->directive('endhasanyrole', function () {\n return '<?php endif; ?>';\n });\n\n $bladeCompiler->directive('hasallroles', function ($roles) {\n return \"<?php if(auth()->check() && auth()->user()->hasAllRoles({$roles})): ?>\";\n });\n $bladeCompiler->directive('endhasallroles', function () {\n return '<?php endif; ?>';\n });\n });\n }", "function add_to_twig($twig){\n $twig->addExtension(new Twig_Extension_StringLoader());\n $twig->addFilter('myfoo', new Twig_Filter_Function('myfoo'));\n return $twig;\n }", "function add_to_twig($twig) {\n $twig->addExtension(new Twig_Extension_StringLoader());\n\n return $twig;\n}", "function add_to_twig( $twig ) {\n\t\t$twig->addExtension( new Twig_Extension_StringLoader() );\n\t\t// $twig->addFilter('myfoo', new Twig_SimpleFilter('myfoo', array($this, 'myfoo')));\n\t\treturn $twig;\n\t}", "function add_to_twig($twig){\r\n $twig->addExtension(new Twig_Extension_StringLoader());\r\n\t\t\r\n\t\t$function = new Twig_SimpleFunction('get_post_format', function($id) {\r\n\t\t\treturn get_post_format($id);\r\n\t\t});\r\n\t\t$twig->addFunction($function);\r\n\t\t\r\n\t\t$get_theme_mod = new Twig_SimpleFunction('get_theme_mod', function($id) {\r\n\t\t\treturn get_theme_mod($id);\r\n\t\t});\r\n\t\t$twig->addFunction($get_theme_mod);\r\n\t\t\r\n return $twig;\r\n }", "function registerTwigView($app) {\n $container = $app->getContainer();\n $container['view'] = function ($c) {\n $view = new \\Slim\\Views\\Twig('templates');\n // Instantiate and add Slim specific extension\n $basePath = rtrim(str_ireplace('index.php', '', $c['request']->getUri()->getBasePath()), '/');\n $view->addExtension(new Slim\\Views\\TwigExtension($c['router'], $basePath));\n return $view;\n };\n}", "protected function registerFileExtensions()\n {\n $this->app->extend('view', function ($env, $app) {\n $fileexts = $app['config']['handlebars.fileext'];\n\n foreach ($fileexts as $fileext) {\n $env->addExtension(trim($fileext, '.'), 'handlebars');\n }\n\n return $env;\n });\n }", "public function getName()\n {\n return 'MyTwigExtension';\n }", "function add_to_twig($twig){\n\t\t\t$twig->addExtension(new Twig_Extension_StringLoader());\n\t\t\t$twig->addFilter('myfoo', new Twig_Filter_Function('myfoo'));\n\t\t\treturn $twig;\n\t\t}", "function add_to_twig( $twig ) {\n\t\t$twig->addExtension( new Twig_Extension_StringLoader() );\n\t\t$twig->addFilter( 'myfoo', new Twig_Filter_Function( 'myfoo' ) );\n\t\treturn $twig;\n\t}", "public function generateTwigExtensions($parameters)\n {\n $relPath = '/Twig/';\n if ($this->demosite) {\n $this->renderSingleFile($this->skeletonDir . $relPath, $this->bundle->getPath() . $relPath, 'BikesTwigExtension.php', $parameters, true);\n }\n }", "function add_to_twig( $twig ) {\n $twig->addExtension( new Twig_Extension_StringLoader() );\n $twig->addFilter('myfoo', new Twig_SimpleFilter('myfoo', array($this, 'myfoo')));\n return $twig;\n }", "protected function registerTwigFunctions()\n {\n return [];\n }", "protected function TwigLoadExtensions($Twig) {\n\t\tforeach($this->extensions as $extension => $arguments) {\n\t\t\t$Twig->addExtension($this->TwigInitExtension($extension, $arguments));\n\t\t}\n\t}", "function __construct(){\n\t\tparent::__construct();\n $this->register(new TwigServiceProvider());\n $this['twig'] = $this->extend('twig', function ($twig, $app) {\n \t// add custom globals, filters, tags, ...\n return $twig;\n \t});\n \t}", "function add_to_twig( $twig ) {\n\t\t$twig->addExtension( new Twig_Extension_StringLoader() );\n\t\t$twig->addFilter('myfoo', new Twig_SimpleFilter('myfoo', array($this, 'myfoo')));\n\t\treturn $twig;\n\t}", "function add_to_twig( $twig ) {\n\t\t$twig->addExtension( new Twig_Extension_StringLoader() );\n\t\t$twig->addFilter('myfoo', new Twig_SimpleFilter('myfoo', array($this, 'myfoo')));\n\t\treturn $twig;\n\t}", "function add_to_twig( $twig ) {\n\t\t$twig->addExtension( new Twig_Extension_StringLoader() );\n\t\t$twig->addFilter('myfoo', new Twig_SimpleFilter('myfoo', array($this, 'myfoo')));\n\t\treturn $twig;\n\t}", "function add_to_twig( $twig ) {\n\t\t$twig->addExtension( new Twig_Extension_StringLoader() );\n\t\t$twig->addFilter('myfoo', new Twig_SimpleFilter('myfoo', array($this, 'myfoo')));\n\t\treturn $twig;\n\t}", "function add_to_twig( $twig ) {\n\t\t$twig->addExtension( new Twig_Extension_StringLoader() );\n\t\t$twig->addFilter('myfoo', new Twig_SimpleFilter('myfoo', array($this, 'myfoo')));\n\t\treturn $twig;\n\t}", "private function twigFunctions()\n {\n /**\n * Updates an assets url if using hot module reloading\n * @var Twig_Function\n */\n $assetHelper = new Twig_Function('assets', function ($path) {\n if (file_exists(__DIR__ . '/hot')) {\n return 'http://localhost:8080/public' . $path;\n }\n\n return $path;\n });\n\n /**\n * Fancier way to dump things\n * @var Twig_Function\n */\n $dump = new Twig_Function('dump', function ($arg) {\n return dump($arg);\n });\n\n $this->twig->addFunction($assetHelper);\n $this->twig->addFunction($dump);\n }", "function add_to_twig( $twig )\n {\n $twig->addExtension(new Twig_Extension_StringLoader());\n $twig->addFilter('myfoo', new Twig_SimpleFilter('myfoo', array($this, 'myfoo')));\n return $twig;\n }", "private function addTwigFunction()\n {\n foreach ($this->getTwigFunction() as $function) {\n $this->twig->addFunction($function);\n }\n }", "private function addTranslationExtension(\\Twig_environment $environment)\n {\n $environment->addExtension(new TranslationExtension($this->translator));\n }", "protected function registerTwigPaths()\n {\n return [];\n }", "private function addTranslationExtension(\\Twig_environment $environment)\n {\n $environment->addExtension(new TranslationExtension($this->translator));\n }", "private function add_to_twig_functions(): void\n {\n add_filter(\n 'timber/twig',\n static function ($twig) {\n $twig->addFunction(new Twig_Function('theme_option', 'carbon_get_theme_option'));\n \n return $twig;\n }\n );\n }", "protected function registerExtensions()\n {\n $extensions = $this->extensionManager->getExtensions();\n foreach ($extensions as $extension) {\n $this->addExtension($extension);\n }\n }", "public function injectTwigFunction()\n {\n\n $asset = new \\Twig_Function('asset', function(string $param): string {\n if ($this->basePath != '')\n $publicDir = \"/$this->basePath\";\n else\n $publicDir = \"\";\n $publicDir .= \"public/\";\n return $publicDir.$param;\n });\n\n /**\n * Create a TWIG function\n * Return the path of a route\n * @param string routeName\n * @return string path\n */\n $path = new \\Twig_Function('path', function(string $routeName, ...$params){\n if (isset($params) && count($params) > 0) {\n if (is_array($params[0])) {\n $tmp = $params;\n $params = $tmp[0];\n }\n $url = $this->router->generate($routeName, $params);\n } else {\n $url = $this->router->generate($routeName);\n }\n\n if ($this->basePath == 'agnes/') {\n $toSearch = $this->basePath.'/';\n $isSlasher = strpos($url, $toSearch);\n if ($isSlasher == 0)\n $url = str_replace($toSearch, '/'.$this->basePath, $url);\n }\n\n return $url;\n });\n\n /**\n * Create a TWIG function\n * Return bool if user can access to a route\n * @param string role [role to match with the user role]\n * @return boolean\n */\n $is_granted = new \\Twig_Function('is_granted', function(string $role){\n return $this->is_granted($role);\n });\n\n /**\n * Create a twig function\n * Dump a var passed from twig\n * @param array|string var\n * @return void\n */\n $dump = new \\Twig_Function('dump', function($var) {\n return var_dump($var);\n });\n\n /**\n * Create a twig function\n * Slug a var passed from twig\n * @param array|string var\n * @return void\n */\n $slugify = new \\Twig_Function('slugify', function(string $data) {\n return Slugify::slug($data);\n });\n\n $displayVar = new \\Twig_Function('displayVar', function(string $data) {\n return htmlspecialchars($data);\n });\n\n $getExtension = new \\Twig_Function('getExtension', function(string $filename) {\n return '.'.File::getExtension($filename);\n });\n\n\n /** Function php into twig **/\n $str_replace = new \\Twig_Function('str_replace', function($search, $replace, $subject) {\n $data = str_replace($search, $replace, $subject);\n return $data;\n });\n\n $current = new \\Twig_Function('current', function(&$arr) {\n return current($arr);\n });\n\n $substr = new \\Twig_Function('substr', function($string, $start, $length = null) {\n if ($length != null && is_int($length))\n return substr($string, $start, $length);\n\n return substr($string, $start);\n });\n\n $end = new \\Twig_Function('end', function(&$arr) {\n return end($arr);\n });\n\n $strtotime = new \\Twig_Function('strtotime', function($time) {\n return strtotime($time);\n });\n\n $clone = new \\Twig_Function('clone', function($var) {\n return clone($var);\n });\n\n $explode = new \\Twig_Function('explode', function($delimiter, $string) {\n return explode($delimiter, $string);\n });\n\n $implode = new \\Twig_Function('implode', function($glue, $arr) {\n return implode($glue, $arr);\n });\n\n $this->twig->addFunction($asset);\n $this->twig->addFunction($path);\n $this->twig->addFunction($is_granted);\n $this->twig->addFunction($dump);\n $this->twig->addFunction($slugify);\n $this->twig->addFunction($displayVar);\n $this->twig->addFunction($getExtension);\n $this->twig->addFunction($str_replace);\n $this->twig->addFunction($current);\n $this->twig->addFunction($substr);\n $this->twig->addFunction($end);\n $this->twig->addFunction($strtotime);\n $this->twig->addFunction($clone);\n $this->twig->addFunction($explode);\n $this->twig->addFunction($implode);\n }", "function add_to_twig( $twig ) {\n $twig->addExtension( new Twig_Extension_StringLoader() );\n $twig->addFilter( 'ac_dd', new Twig_Filter_Function( 'ac_dd' ) );\n return $twig;\n }", "public function extensionAction()\n {\n $this->loginRedirect();\n \n $form = new AddExtensionForm();\n $form->setAttribute('action', $this->url('manager', array('action' => 'extension')));\n\n $request = $this->getRequest();\n if( $request->isPost()) {\n $em = $this->getEntityManager();\n $extension = new Extension();\n\n $form->setInputFilter($extension->getInputFilter());\n $form->setData($request->getPost());\n\n if( $form->isValid() ) {\n $extension = $em->getRepository('extCMS\\Entity\\Extension')->findOneBy(array('name' => $request->getPost()['name']));\n if( $extension ) {} else {\n $extension = new Extension();\n }\n $extension->exchangeArray($request->getPost());\n \n\n $arguments = explode(';', $request->getPost()['arguments']);\n foreach ($arguments as $key => $value) {\n $arguments[$key] = '$' . $value;\n }\n $arguments = implode(', ', $arguments);\n $code = <<<EOT\n<?php\nnamespace extCMS\\\\twigExtensions;\n \nuse Twig_Extension;\n\nclass {$extension->getName()} extends Twig_Extension \n{\n \n public function getName() \n {\n return '{$extension->getName()}';\n }\n \n public function __invoke({$arguments})\n {\n {$extension->getCode()};\n }\n}\nEOT;\n $filename = 'data/twigExtensions/' . DIRECTORY_SEPARATOR . $extension->getName() . '.php';\n echo $filename;\n if( !is_writable($filename) ) \n throw new ManagerException('File not writable!!');\n $fh = fopen($filename, 'wb');\n clearstatcache(true);\n chmod($filename, '0764');\n \n if($fh) {\n if( fwrite($fh, $code, strlen($code)) !== false ) {\n $em->persist($extension);\n $em->flush();\n } else \n throw new ManagerException(\"Could not save your extension. Could not write to file.\");\n fclose($fh);\n } else {\n throw new ManagerException(\"Could not save your extension. Could not open file.\");\n }\n }\n } \n return array('form' => $form);\n }", "private function registerTwigExtension()\n {\n $extension = new Extension();\n Craft::$app->view->registerTwigExtension($extension);\n\n //Don't add JS to CP requests or CLI commands\n if (!Craft::$app->request->getIsSiteRequest()) {\n return;\n }\n\n Event::on(WebView::class, WebView::EVENT_END_BODY, function () {\n $view = Craft::$app->getView();\n\n if (!static::$dynamicBlocksAdded) {\n return;\n }\n\n $view = Craft::$app->getView();\n $ajaxUrl = UrlHelper::actionUrl('servd-asset-storage/dynamic-content/get-content');\n\n $view->registerJs('\n function insertBlocks(blocks)\n {\n var allChildrenOnPage = [];\n for(var i = 0; i < blocks.length; i++){\n var rBlock = blocks[i];\n var dBlock = document.getElementById(rBlock.id);\n var placeholder = document.createElement(\"div\");\n placeholder.insertAdjacentHTML(\"afterbegin\", rBlock.html);\n var allChildren = [];\n for (var j = 0; j < placeholder.childNodes.length; j++) {\n allChildren.push(placeholder.childNodes[j]);\n allChildrenOnPage.push(placeholder.childNodes[j]);\n }\n for(var node of allChildren){\n dBlock.parentNode.insertBefore(node, dBlock);\n }\n dBlock.parentNode.removeChild(dBlock); \n }\n \n return allChildrenOnPage;\n }\n function pullDynamic() {\n var injectedContent = document.getElementById(\"SERVD_DYNAMIC_BLOCKS\");\n if(injectedContent){\n var parsedContent = JSON.parse(injectedContent.innerHTML);\n let insertedBlocks = insertBlocks(parsedContent.blocks);\n window.dispatchEvent( new CustomEvent(\"servd.dynamicloaded\", {detail: {blocks: insertedBlocks}}) );\n return;\n }\n\n var dynamicBlocks = document.getElementsByClassName(\"dynamic-block\");\n var len = dynamicBlocks.length;\n var allBlocks = [];\n for (var i=0; i<len; i++) {\n var block = dynamicBlocks[i];\n var blockId = block.id;\n var template = block.getAttribute(\"data-template\");\n var args = block.getAttribute(\"data-args\");\n var siteId = block.getAttribute(\"data-site\");\n allBlocks.push({\n id: blockId,\n template: template,\n args: args,\n siteId: siteId\n });\n }\n\n if(allBlocks.length > 0){\n var xhr = new XMLHttpRequest();\n xhr.onload = function () {\n if (xhr.status >= 200 && xhr.status <= 299) {\n var responseContent = JSON.parse(xhr.response);\n let insertedBlocks = insertBlocks(responseContent.blocks);\n window.dispatchEvent( new CustomEvent(\"servd.dynamicloaded\", {detail: {blocks: insertedBlocks}}) );\n }\n }\n xhr.open(\"POST\", \"' . $ajaxUrl . '\", );\n xhr.setRequestHeader(\"Content-Type\", \"application/json;charset=UTF-8\");\n xhr.send(JSON.stringify(allBlocks));\n } else {\n window.dispatchEvent( new CustomEvent(\"servd.dynamicloaded\", {detail: {blocks: []}}) );\n }\n }\n setTimeout(function(){\n if (!window.SERVD_MANUAL_DYNAMIC_LOAD) {\n pullDynamic();\n }\n }, 200);\n ', View::POS_END);\n\n if (sizeof(static::$esiBlocks) == 0) {\n return;\n }\n\n $allBlocks = serialize(static::$esiBlocks);\n $compressedData = urlencode(base64_encode(gzcompress($allBlocks)));\n\n $esiUrl = UrlHelper::actionUrl('servd-asset-storage/dynamic-content/get-content');\n $esiUrl .= '?blocks=' . $compressedData;\n\n $headers = \\Craft::$app->getResponse()->getHeaders();\n if (!$headers->has('Surrogate-Control')) {\n $headers->add('Surrogate-Control', 'content=\"ESI/1.0\"');\n }\n if (version_compare(Craft::$app->getVersion(), '3.5', '>=')) { //registerHtml only available in 3.5+\n $view->registerHtml('<script id=\"SERVD_DYNAMIC_BLOCKS\" type=\"application/json\"><esi:include src=\"' . $esiUrl . '\" /></script>');\n } else {\n // ???\n }\n });\n }", "function add_to_twig( $twig ) {\n\t$twig->addExtension(new Twig_Extension_StringLoader());\n\t$twig->addFilter(new Twig_SimpleFilter('lighten', 'lighten'));\n\t$twig->addFilter(new Twig_SimpleFilter('darken', 'darken'));\n\treturn $twig;\n}", "public function register( $twig ) {\n\t\t$twig->addExtension( new \\Twig_Extension_StringLoader());\n //$twig->addFilter(new \\Twig_SimpleFilter( 'category', array( $this, 'category' ) );\n\t\treturn $twig;\n\t}", "function add_to_twig( $twig ) {\n\t\t$twig->addExtension( new Twig_Extension_StringLoader() );\n\t\t$twig->addFilter( 'str_repeat', new Twig_Filter_Function( 'str_repeat' ) );\n\t\treturn $twig;\n\t}", "function addToTwig(Twig_Environment $twig){\n\t\t$twig->addExtension(new Twig_Extension_StringLoader());\n\n\t\treturn $twig;\n\t}", "public function add_to_twig($twig)\n {\n $twig->addExtension(new Twig_Extension_StringLoader());\n $twig->addExtension( new Pellicer_Twig_Extension() );\n return $twig;\n }", "public function register()\n {\n $this->registerBladeExtensions();\n }", "public function registerBladeTemplate()\n {\n \\Blade::extend(function ($view, $compiler) {\n return preg_replace('/\\{\\?(.+)\\?\\}/', '<?php ${1} ?>', $view);\n });\n }", "protected function registerTwigFilters($app)\n {\n $app['twig'] = $app->extend('twig', function (\\Twig_Environment $twig) use ($app) {\n /**\n * Adds the `formatDate` filter.\n *\n * Use:\n * <div>\n * {{ entity.date|formatDate }}\n * </div>\n *\n * or:\n * <div>\n * {{ entity.date|formatDate('short_date') }}\n * </div>\n *\n * or:\n * <div>\n * {{ entity.date|formatDate('short_date', 'Europe/London') }}\n * </div>\n */\n $twig->addFilter(\n new \\Twig_SimpleFilter(\n 'formatDate',\n $app['formatter.date']\n )\n );\n\n $twig->addFilter(\n new \\Twig_SimpleFilter(\n 'formatNumber',\n $app['formatter.number']\n )\n );\n\n $twig->addFilter(\n new \\Twig_SimpleFilter(\n 'formatPrice',\n $app['formatter.price']\n )\n );\n\n return $twig;\n });\n }", "public static function register () {\r\n return spl_autoload_register( \"GettextTwig::autoload\" );\r\n }", "public function add_to_twig($twig)\n {\n $twig->addExtension(new Twig\\Extension\\StringLoaderExtension());\n $twig->addFilter(new Twig\\TwigFilter('myfoo', array($this, 'myfoo')));\n return $twig;\n }", "public function register()\n {\n // 模板扩展\n Blade::component(MediaBreadcrumb::class, 'media-breadcrumb');\n Blade::component(MediaList::class, 'media-list');\n }", "function micro_get_twig_functions()\n{\n global $app;\n return $app->getTwigFunctions();\n}", "function register(SmartPress $sp) {\n $sp[\"twig.options\"] = $sp->share(function($sp) {\n return array(\n \"cache\" => $sp[\"config.cache_path\"],\n \"debug\"=>$sp[\"debug\"],\n );\n }\n );\n # FR : le twig loader , on utilise des fichiers par défaut\n $sp[\"twig.loader\"] = $sp->share(function($sp) {\n return new \\Twig_Loader_filesystem(\n array(\n $sp[\"config.root_path\"],\n __DIR__.\"/../Resources/templates\",\n )\n );\n }\n );\n # FR : l'envirronment Twig\n $sp[\"twig\"] = $sp->share(function($sp) {\n $twig = new \\Twig_Environment($sp[\"twig.loader\"]\n , $sp[\"twig.options\"]);\n $twig->addGlobal(\"sp\", $sp[\"twig.default_vars\"]);\n return $twig;\n }\n );\n # FR : variables globales à injecter chaque fois qu'un template est rendu\n $sp[\"twig.default_vars\"] = $sp->share(function($sp) {\n $vars = array();\n $vars[\"pages\"] = $sp[\"twig.pages.parser\"]($sp[\"pages.templates\"]);\n $vars[\"posts\"]=$sp[\"twig.posts.parser\"]($sp[\"finder.posts_templates\"]);\n return $vars;\n }\n );\n $sp[\"twig.pages.parser\"] = $sp->protect(function($pageList) {\n return self::generatePageArray($pageList);\n });\n $sp[\"twig.posts.parser\"] = $sp->protect(function($postList) {\n return self::generatePostArray($postList);\n });\n //$sp[\"twig.extensions\"]=\n }", "public function add_to_twig( $twig ) {\n $twig->addExtension( new Twig_Extension_StringLoader() );\n $twig->addFilter( new Twig_SimpleFilter( 'myfoo', array( $this, 'myfoo' ) ) );\n return $twig;\n }", "public function add_to_twig( $twig ) {\n\t\t$twig->addExtension( new Twig\\Extension\\StringLoaderExtension() );\n\t\t$twig->addFilter( new Twig\\TwigFilter( 'myfoo', array( $this, 'myfoo' ) ) );\n\t\treturn $twig;\n\t}", "protected function registerDefaultExtensions()\n {\n $this->appendExtension(new RouterExtension());\n\n if ($this->isCacheEnabled()) {\n $this->addCompilerPass(new CacheRoutingDataPass());\n }\n }", "function initialize_twig_support()\n{\n if ( ! class_exists('Timber')) {\n\n add_action('admin_notices', __NAMESPACE__ . '\\\\display_no_timber_admin_notice');\n\n } else {\n\n add_filter('timber_context', __NAMESPACE__ . '\\\\add_to_timber_context');\n\n //add templates location\n \\Timber::$locations = __DIR__ . '/../../templates';\n }\n}", "public function register()\n {\n add_new_template([\n 'footer_custom_fields' => 'Footer custom fields',\n ], 'page');\n add_new_template([\n 'video' => 'Video',\n ], 'blog-post');\n }", "public function registerTags()\n {\n $this->registerBlade();\n }", "public function add_to_twig( $twig ) {\n\t\t$twig->addExtension( new Twig_Extension_StringLoader() );\n\t\t$twig->addFilter( 'myfoo', new Twig_SimpleFilter( 'myfoo', array( $this, 'myfoo' ) ) );\n\t\treturn $twig;\n\t}", "function micro_add_twig_global( string $name, $value )\n{\n global $app;\n return $app->addTwigGlobal($name, $value);\n}", "public function addToTwig($twig)\n {\n // $twig->addExtension(new Twig_Extension_StringLoader());\n // $twig->addFilter('myfoo', new Twig_Filter_Function('myfoo'));\n\n return $twig;\n }", "public function register(Container $pimple)\n {\n $configuration = $this->configuration;\n\n $pimple['twig'] = function ($c) use($configuration) {\n return new Twig($configuration);\n };\n\n //Jogosultság kezelése twighez\n $pimple->extend('twig', function ($twig, $c) {\n /** @var Security $security */\n $security = Application::Security();\n if($security != null) {\n $mytwig = $security->setTwigFunctions($twig);\n } else {\n $mytwig = $twig;\n }\n\n return $mytwig;\n });\n }", "protected function addExtensions(Twig_Environment $environment, array $extensions) {\n\t\tforeach ($extensions as $extension) {\n\t\t\t$environment->addExtension($extension);\n\t\t}\n\t}", "public function register(Application $app)\n {\n $app->register(new TwigServiceProvider(), [\n 'twig.path' => __DIR__ . '/../View',\n 'twig.options' => [\n 'debug' => $app['debug'],\n 'cache' => __DIR__ . '/../../../cache/twig',\n ]\n ]);\n }", "public function register(Container $container)\n {\n $container['twig.loader'] = function () use ($container) {\n return new Loader($container['twig']['loader_paths']);\n };\n $container['twig.environment'] = function () use ($container) {\n return new Environment(\n $container['twig.loader'],\n $container['twig']['options']\n );\n };\n }", "public function add_filters() {\n\t\t\tadd_filter( 'get_twig', array( $this, 'add_to_twig' ) );\n\t\t}", "public function twigProvider(): array\n {\n return [\n\n //ESCAPE : http://twig.sensiolabs.org/doc/2.x/filters/escape.html\n //RAW : http://twig.sensiolabs.org/doc/2.x/filters/raw.html\n ['TWIG.ESCAPE', ['foo' => '<strong>bar</strong>'], 'Placeholder should be escaped : &lt;strong&gt;bar&lt;/strong&gt;'],\n ['TWIG.ESCAPE_DEFAULT', ['foo' => '<strong>bar</strong>'], 'Placeholder should be escaped : &lt;strong&gt;bar&lt;/strong&gt;'],\n ['TWIG.ESCAPE_NOT', ['foo' => '<strong>bar</strong>'], 'Placeholder should NOT be escaped : <strong>bar</strong>'],\n\n //DEFAULT: http://twig.sensiolabs.org/doc/2.x/filters/default.html\n ['TWIG.DEFAULT', [], 'Using default: bar'],\n ['TWIG.DEFAULT', ['foo' => 'cat'], 'Using default: cat'],\n ['TWIG.DEFAULT_NOT', [], 'Not using default: '],\n\n //ABS : http://twig.sensiolabs.org/doc/2.x/filters/abs.html\n ['TWIG.ABS', ['number' => '-5'], '5'],\n ['TWIG.ABS_NOT', ['number' => '-5'], '-5'],\n\n //DATE : http://twig.sensiolabs.org/doc/2.x/filters/date.html\n ['TWIG.DATE', ['when' => '10 September 2000'], '09/10/2000'],\n\n //FIRST : http://twig.sensiolabs.org/doc/2.x/filters/first.html\n //LAST: http://twig.sensiolabs.org/doc/2.x/filters/last.html\n ['TWIG.FIRST', ['numbers' => [1, 3, 5]], '1'],\n ['TWIG.LAST', ['numbers' => [1, 3, 5]], '5'],\n\n //NUMBER_FORMAT: http://twig.sensiolabs.org/doc/2.x/filters/number_format.html\n ['TWIG.NUMBER_FORMAT', ['number' => 9800.333], '9 800.33'],\n\n //LOWER: http://twig.sensiolabs.org/doc/2.x/filters/lower.html\n //UPPER: http://twig.sensiolabs.org/doc/2.x/filters/upper.html\n //CAPITALIZE: http://twig.sensiolabs.org/doc/2.x/filters/capitalize.html\n ['TWIG.LOWER', ['string' => 'WeLcOmE'], 'welcome'],\n ['TWIG.UPPER', ['string' => 'WeLcOmE'], 'WELCOME'],\n ['TWIG.CAPITALIZE', ['string' => 'WeLcOmE'], 'Welcome'],\n ];\n }", "public function getName()\n {\n return 'tutu.twig.json.extension';\n }", "public function getName()\n {\n return 'application_main_twig_extension';\n }", "public static function registerHooks()\n {\n // Add stuff for the main context\n add_filter(\"syltaen_render_main_context\", \"\\Syltaen\\View::prepareMainContext\");\n\n // Add helpers\n add_filter(\"syltaen_render_context\", \"\\Syltaen\\View::addHelpers\");\n }", "protected function registerTwigFilters()\n {\n return [];\n }", "public function register(): void\n {\n $this->container->addShared(Engine::class, function(){\n return new Engine(APP_ROOT . '/resources/views', 'phtml');\n });\n }", "protected function registerTwigString()\n {\n $this->app['kotakin.view.str'] = $this->app->share(function($app) {\n $bridge = new TwigString($app);\n return $bridge->getTwig();\n });\n }", "public function getName()\n {\n return 'dt_geshi.twig_extension';\n }", "public function twig()\n {\n }", "public function register()\n {\n $this->registerTemplatesManager();\n }", "function micro_get_twig()\n{\n global $app;\n return $app->getTwig();\n}", "public function register()\n {\n $this->app->bind('flarum.extensions', 'Flarum\\Support\\ExtensionManager');\n\n $config = $this->app->make('Flarum\\Core\\Settings\\SettingsRepository')->get('extensions_enabled');\n $extensions = json_decode($config, true);\n\n $events = $this->app->make('events');\n\n foreach ($extensions as $extension) {\n if (file_exists($file = public_path().'/extensions/'.$extension.'/bootstrap.php')) {\n $provider = require $file;\n\n if (is_string($provider)) {\n $this->app->register($provider)->listen($events);\n } elseif (is_callable($provider)) {\n $provider($events);\n }\n }\n }\n }", "public function boot(): void\n {\n $this->addToTwigContext();\n }", "public function register(\\Pimple\\Container $app)\n {\n $app['view.finder'] = function($app){\n $default_backend = \\Application::$ENGINE_PATH.DIRECTORY_SEPARATOR.'themes'.\n DIRECTORY_SEPARATOR.'backend';\n $finder = new \\Unika\\Ext\\ViewFinder($app['Illuminate.files'], array());\n $finder->addNamespace('backend',$default_backend);\n return $finder;\n }; \n \n $app['Illuminate.blade'] = function($app){\n $blade_config = $app['config']['view.blade'];\n\n $blade = new \\Illuminate\\View\\Compilers\\BladeCompiler($app['Illuminate.files'],$blade_config['cache']);\n $blade->setContentTags($blade_config['content_tags'][0],$blade_config['content_tags'][1],True);\n $blade->setContentTags($blade_config['escaped_content_tags'][0],$blade_config['escaped_content_tags'][1]);\n return $blade;\n };\n\n $this->registerEngineResolver($app);\n $this->registerFactory($app);\n\n $app['view'] = function($app){\n return new \\Unika\\Common\\ViewWrapper($app);\n };\n }", "public function register()\n {\n $this->app->afterResolving('blade.compiler', function (BladeCompiler $bladeCompiler) {\n $bladeCompiler->directive('module', function ($slug) {\n return \"<?php if (Module::exists({$slug}) && Module::isEnabled({$slug})): ?>\";\n });\n\n $bladeCompiler->directive('endmodule', function () {\n return '<?php endif; ?>';\n });\n });\n }", "private function add_custom_templates() {\n\t\t$views = new View();\n\t\t$views->custom_templates();\n\t}", "protected function initTwig(): void\n {\n $loader = new FilesystemLoader($this->site->getTemplatesDir());\n $this->twig = new Environment($loader, [\n 'debug' => true,\n 'cache' => $this->site->getCacheDir(),\n 'autoescape' => false,\n ]);\n $this->twig->addExtension(new IntlExtension());\n $this->twig->addRuntimeLoader(new MarkdownLoader());\n $this->twig->addExtension(new MarkdownExtension());\n }", "public function register()\n {\n $this->registerTemplateEngine();\n }", "public function register()\n {\n app('view')->addNamespace('theme', ThemeBladeDirectory::get());\n }", "public function add_to_twig($twig)\n {\n $twig->addExtension(new Twig_Extension_StringLoader());\n $twig->addFilter(new Twig_SimpleFilter('getLang', array($this, 'getLang')));\n $twig->addFunction(new Twig_Function('getDay', array($this, 'getDay')));\n $twig->addFunction(new Twig_Function('getDate', array($this, 'getDate')));\n $twig->addFunction(new Twig_Function('getDays', array($this, 'getDays')));\n $twig->addFunction(new Twig_Function('getDates', array($this, 'getDates')));\n return $twig;\n }", "private function getTwigFunction()\n {\n $functions[] = new \\Twig_SimpleFunction('component', function ($componentPath) {\n return \"/../components/$componentPath\";\n });\n\n return $functions;\n }", "public function onTwigInitialized() {\n $this->grav['twig']->twig()->addFunction(\n new \\Twig_SimpleFunction('printfriendly', [$this, 'generateLink'])\n );\n }", "public function register(Container $container)\n {\n if ($container[\"config.service\"][\"view.loader\"] !== \"Twig\") {\n return;\n }\n\n $container[\"tplLoader.service\"] = function (Container $container) {\n $loader = new \\SlaxWeb\\ViewTwig\\Loader\\Twig(\n $container[\"response.service\"],\n $container[\"logger.service\"](),\n $container[\"twig.service\"]\n );\n return $loader->setTemplateExt($container[\"config.service\"][\"view.templateExtension\"]);\n };\n\n $container[\"twig.service\"] = function (Container $cont) {\n return new \\Twig_Environment(\n $cont[\"twigFilesystemLoader.service\"],\n [\"cache\" => $cont[\"config.service\"][\"twig.cacheDir\"]]\n );\n };\n\n $container[\"twigFilesystemLoader.service\"] = function (Container $cont) {\n return new \\Twig_Loader_Filesystem(\n $cont[\"config.service\"][\"twig.templateDir\"]\n );\n };\n }", "public function register()\n {\n $this->app->bind('grimmtools.assets', function($app) {\n return $app->make('GrimmTools\\Assets\\AssetsManager');\n });\n\n Blade::extend(function($view, $compiler) {\n $pattern = $compiler->createMatcher('asset');\n\n return preg_replace($pattern, '$1<?php echo \\GrimmTools\\Assets\\Assets::group($2); ?>', $view);\n });\n }" ]
[ "0.80325556", "0.73945343", "0.7388871", "0.7372683", "0.7310733", "0.72616905", "0.7103372", "0.70679814", "0.705623", "0.7021246", "0.70096976", "0.7005594", "0.7005594", "0.6997154", "0.69748205", "0.6925349", "0.6925198", "0.6917105", "0.6900939", "0.6894906", "0.6892313", "0.68796676", "0.68599397", "0.6844698", "0.68215334", "0.68194723", "0.6788589", "0.6782885", "0.67814875", "0.6749763", "0.67481124", "0.66992044", "0.66938585", "0.66938585", "0.66938585", "0.66938585", "0.66938585", "0.66898644", "0.66527265", "0.6618603", "0.65663433", "0.65606284", "0.65501475", "0.6538931", "0.65195644", "0.649986", "0.6444324", "0.64089805", "0.6385752", "0.6379621", "0.63460577", "0.63418055", "0.6338236", "0.6321131", "0.630705", "0.62874436", "0.62750965", "0.6262354", "0.6225276", "0.6222336", "0.6204126", "0.6202456", "0.6193964", "0.61871266", "0.6148738", "0.61447746", "0.61441815", "0.61355364", "0.6124338", "0.60983896", "0.6093263", "0.6087755", "0.60823166", "0.6072903", "0.6071073", "0.60679287", "0.60678715", "0.60517836", "0.59852153", "0.59782183", "0.5975203", "0.5947155", "0.5939475", "0.59347767", "0.59318584", "0.59015834", "0.58979064", "0.58915895", "0.58853024", "0.5884639", "0.58798563", "0.58571565", "0.5855912", "0.5836467", "0.58348155", "0.58327067", "0.58326495", "0.58254546", "0.5813579", "0.5800977" ]
0.8720515
0
Save page to target file.
Сохранить страницу в целевой файл.
public function savePage($target, $html) { $fs = new Filesystem(); $fs->dumpFile($this->target . DIRECTORY_SEPARATOR . $target, $html); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function saveFile() {\n // contents to the archive\n require_once dirname( __FILE__ ) .\n '/../StaticHtmlOutput/FileWriter.php';\n\n $file_writer = new FileWriter(\n $this->url,\n $this->processed_file,\n $this->file_type,\n $this->content_type\n );\n\n $file_writer->saveFile( $this->archive_dir );\n }", "public function savePage($fileName)\n {\n\n SFiles::write($fileName, $this->compiled);\n \n }", "public function save(): void {\n file_put_contents($this->getFilename(), $this->getContent());\n }", "abstract protected function saveFile();", "public function savePage()\n {\n // Save settings and elements\n $pageEntity = $this->savePageHeader();\n $this->savePageSettings($pageEntity->id);\n $this->savePageElements($pageEntity->id);\n\n return $this->redirect('adminPageEdit', ['id' => $pageEntity->id]);\n }", "protected function writeToFile($filename, $content, $page) {\n\t\t$content =\n\t\t\t'# Extracted on ' . date('Y-m-d', $GLOBALS['EXEC_TIME']) . LF .\n\t\t\t'# was on page: [' . $page['uid'] . '] ' . $page['title'] . LF . LF . $content;\n\n\t\ttry {\n\t\t\tfile_put_contents($this->path . $filename, $content);\n\n\t\t\tt3lib_div::fixPermissions($this->path . $filename);\n\t\t} catch (Exception $e) {\n\t\t}\n\t}", "public function saveHtmlPage($fileName = null)\n {\n if ($fileName == null) {\n $fileName = $this->testId;\n }\n $file = fopen(SELENIUM_TESTS_SCREENSHOTDIR . DIRECTORY_SEPARATOR . $fileName . '.html', 'a+');\n fputs($file, $this->_testConfig->driver->getHtmlSource());\n fflush($file);\n fclose($file);\n }", "protected function saveFile()\n {\n $domxml = new \\DOMDocument('1.0');\n $domxml->preserveWhiteSpace = false;\n $domxml->formatOutput = true;\n $domxml->loadXML($this->xml->asXML());\n $domxml->save($this->xmlFilePath);\n }", "function savefile() {\n\n\t\t# Check it's not a directory\n\t\tif ($this->is_dir()) { return \"ERROR_FS_NOSAVEDIR\"; }\n\n\t\t$filepointer0 = fopen($this->absfilepath, \"wb\");\n\t\tfwrite($filepointer0, $this->filecontents, strlen($this->filecontents));\n\t\tfclose($filepointer0);\n\n\t\t$this->rescan();\n\n\t}", "function savefile(){\r\n\t\t//$this->data['template']['content'] = the file data! < this is how this will come through\r\n\t\t//not really sure how to error check at this point, i suppose i could make sure its not empty..\r\n\t\t$output = \"\";\r\n\t\t$filepath = $this->data['template']['filepath'];\r\n\t\tif (is_writable($filepath)) {\r\n\t\t if (!$handle = fopen($filepath, 'w')) {\r\n\t\t $output .= \"Cannot open file ($filepath)\";\r\n\t\t exit();\r\n\t\t }\r\n\t\t\r\n\t\t // Write $somecontent to our opened file.\r\n\t\t if (fwrite($handle, $this->data['template']['content']) === FALSE) {\r\n\t\t $output .= \"Cannot write to file ($filepath)\";\r\n\t\t exit();\r\n\t\t }\r\n\t\t\r\n\t\t $output .= \"Success, wrote to file ($filepath)\";\r\n\t\t\r\n\t\t fclose($handle);\r\n\t\t\r\n\t\t} else {\r\n\t\t $output .= \"The file $filepath is not writable\";\r\n\t\t}\r\n\t\t\r\n\t\t$this->set('saveout', $output);\r\n\t\t$this->set('debug', $this->data);\r\n\t}", "public function saving(Page $Page)\n {\n //code...\n }", "public function savePostToFile()\n {\n $post = \"\";\n $post .= json_encode($this->metadata);\n $post .= \"---\";\n $post .= $this->content();\n file_put_contents($this->dir . '/' . $this->file_name . '.md', $post);\n }", "private function save()\r\n\t{\r\n\t\t//write the file and throw an exception if we have an issue\r\n\t\tif( !file_put_contents(self::$serverPath.$this->file,$this->contents) )\r\n\t\t{\r\n\t\t\tthrow new Exception(\"Cannot save file ('\".$this->file.\"')\");\r\n\t\t}\r\n\t}", "public function save($file_name);", "function save($file) \n\t{\n\t\t$this->driver->save($file);\n\t}", "function savePdf($file) {\n\t\t$this -> buildPdf();\n\t\t$this -> pdf -> Output($file, 'F');\n\t}", "function save_pages()\n{\n\n}", "private function doSave()\n {\n $this->checkIfLoggedIn();\n $pageId = isset($_POST['pageId']) ? $_POST['pageId'] : null;\n $content = isset($_POST['content']) ? $_POST['content'] : null;\n\n $pagePath = $this->getPagePath($pageId, true);\n\n if (empty($content)) {\n return $this->responseJson(['error' => 'Empty content given.'], 400);\n }\n\n if (!file_put_contents($pagePath, $content)) {\n return $this->responseJson(['error' => 'Unable to write changes to file.'], 400);\n }\n\n return $this->responseJson([]);\n }", "public function save($pFilename);", "public function save () {\n\t\treturn file_put_contents(self::filepath($this->name), $this->content);\n\t}", "function SavePage()\n\t{\n\t\t$u = $this->GetUser();\n\t\t$this->replyType = \"json\";\n\t\t$args = $this->args;\n\t\tif ($this->method != \"POST\") {\n\t\t\tthrow new AppError( \"NotAllowed\", \"Invalid method\" );\n\t\t}\n\t\tif ($args->page == \"new\") {\n\t\t\tif ($args->name === null || $args->body === null) {\n\t\t\t\tthrow new AppError( \"BadParameter\" );\n\t\t\t} else {\n\t\t\t\t$page = PageData::Create( $u->id, $args->name );\n\t\t\t\t$page->SetBody( $args->body );\n\t\t\t\t$page->Save();\n\t\t\t\t$this->ReplyJson( [\n\t\t\t\t\t \"alert\" => \"Created new page.\"\n\t\t\t\t\t,\"run\" => \n\t\t\t\t\t\t\"assign_page_id(\\\"\" . $page->id . \"\\\");\" .\n\t\t\t\t\t\t\"unmask_page_tools();\"\n\t\t\t\t] );\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t$p = PageData::Load( $args->page );\n\t\tif (!$p || $p->GetOwner() != $u->id) {\n\t\t\tthrow new AppError( \"NotFound\", \"Invalid page ID\" );\n\t\t}\n\t\tCache::remove( \"full_page_\" . $p->id );\n\n\t\t$err = null;\n\t\t$p->SetName( $args->name );\n\t\t$p->SetBody( $args->body );\n\t\t$p->Save();\n\n\t\t$this->ReplyJson( [\n\t\t\t \"alert\" => \"Saved.\"\n\t\t\t,\"run\" => \"unmask_page_tools();\"\n\t\t] );\n\t}", "public function save(): void\n {\n file_put_contents($this->filepath, $this->getSerializedStructure());\n }", "public function save($filename) {\n return file_put_contents($filename, $this->render());\n }", "protected function saveFile()\n {\n \\Excel::store(new BookingExportExcel($this->collection), '/temp/' . $this->filename, 'local');\n\n // Call action to create a generated report model and attach this file as a media object.\n // This will then move the file to the appropriate folder on the 'exports' disk so that\n // we are able to filter exports based by a user or an agent.\n return (new PersistExportedFileAction())->execute($this);\n }", "public function save($filename = null)\n {\n $fileHandle = parent::prepareForSave($filename);\n\n // PDF settings\n $paperSize = strtoupper('A4');\n $orientation = strtoupper('portrait');\n\n // Create PDF\n $mPdfClass = $this->getMPdfClassName();\n $pdf = new $mPdfClass();\n $pdf->_setPageSize($paperSize, $orientation);\n $pdf->addPage($orientation);\n\n // Write document properties\n $phpWord = $this->getPhpWord();\n $docProps = $phpWord->getDocInfo();\n $pdf->setTitle($docProps->getTitle());\n $pdf->setAuthor($docProps->getCreator());\n $pdf->setSubject($docProps->getSubject());\n $pdf->setKeywords($docProps->getKeywords());\n $pdf->setCreator($docProps->getCreator());\n\n $pdf->writeHTML($this->getContent());\n\n // Write to file\n fwrite($fileHandle, $pdf->output($filename, 'S'));\n\n parent::restoreStateAfterSave($fileHandle);\n }", "public function save()\n {\n array_to_file($this->data, $this->file_name);\n }", "public function saved(Page $Page)\n {\n //code...\n }", "protected function saveUrls()\n {\n file_put_contents('raw/' . $this->type . '-page-urls.bin', serialize($this->page_urls));\n }", "public static function savePage() {\n if( isset($_POST[ static::$optionName ]) && isset($_POST[ static::$nonce ]) )\n self::saveAdmin( $_POST[ static::$optionName ] );\n }", "public function save() {\n\t\t$fileName = $this->pageState['fileName'];\n\t\t$htmlBlock = stripslashes($this->pageState['pageEditor']);\n\t\t\n\t\t// Determine if the page is already published\n\t\t$isPublished = false;\n\t\t$fileExt = '.html';\n\t\tif ($this->pageState['publish'] == '1') {\n\t\t\t$isPublished = true;\n\t\t\t$fileExt = '.published';\n\t\t}\n\t\t\n\t\t// Save to the Sandbox file\n\t\tfile_put_contents(File::getUserSandboxPath() . $fileName . $fileExt, $htmlBlock);\n\t\t\n\t\t// Load up existing page metadata information (if it exists)\n\t\t$handle = @fopen(File::getUserSandboxPath() . $currentPageName . '.config', \"r\");\n\t\tif ($handle) {\n\t\t\t// Read the title\n\t\t\tif (!feof($handle)) {\t$a = explode(\"|\", fgets($handle)); $pageTitle = $a[1];\t}\n\t\t\t// Read the description\n\t\t\tif (!feof($handle)) {\t$a = explode(\"|\", fgets($handle)); $pageDescription = $a[1];\t\t}\n\t\t\t// Read the keywords\n\t\t\tif (!feof($handle)) {\t$a = explode(\"|\", fgets($handle)); $pageKeywords = $a[1];\t}\n\t\t\tfclose($handle);\n\t\t}\n\t\t\n\t\t// Grab the page metadata that the user entered\n\t\t// Page title\n\t\t$pageTitle = stripslashes($this->pageState['pageTitle']);\n\t\t\n\t\tif ($_SESSION['editorMode'] != 'BASIC') {\n\t\t\t// Grab the metatag information\n\t\t\t$pageDescription = stripslashes($this->pageState['pageDescription']);\n\t\t\t$pageKeywords = stripslashes($this->pageState['pageKeywords']);\n\t\t}\n\t\t\n\t\t// Assemble the metadata into a string\n\t\t$pageMetadata = \"PAGE_TITLE|\" . $pageTitle . \"\\n\";\n\t\t$pageMetadata .= \"PAGE_DESCRIPTION|\" . $pageDescription . \"\\n\";\n\t\t$pageMetadata .= \"PAGE_KEYWORDS|\" . $pageKeywords . \"\\n\";\n\t\t\n\t\t// Store the page metadata in the config file (creating one if it doesn't exist)\n\t\tfile_put_contents(File::getUserSandboxPath() . $fileName . '.config', $pageMetadata);\n\t\t\n\t\t\n\t\t// If the page has already been published, then run it through the publishing steps\n\t\tif ($isPublished) {\n\t\t\t// Load up the page template data\n\t\t\t$templatePageData = file_get_contents(Constants::$ROOT_DIR . 'templates/site/pageTemplate.html');\n\t\t\n\t\t\t// Place the data in the template and write the new file to the live site\n\t\t\t$publishedPageContent = str_replace('[[PAGE_CONTENT]]', $htmlBlock, $templatePageData);\n\t\t\t$publishedPageContent = str_replace('[[PAGE_TITLE]]', $pageTitle, $publishedPageContent);\n\t\t\t$publishedPageContent = str_replace('[[PAGE_DESCRIPTION]]', $pageDescription, $publishedPageContent);\n\t\t\t$publishedPageContent = str_replace('[[PAGE_KEYWORDS]]', $pageKeywords, $publishedPageContent);\n\t\t\t\n\t\t\tfile_put_contents(File::getUserPublishingPath() . $fileName . '.html', $publishedPageContent);\n\t\t}\n\t\t\n\t\t// Then return to the Welcome page\n\t\theader(\"Location:/manage/welcome\");\n\n\t}", "public static function saveFile($path, $content)\n {\n $content = stripslashes($content);\n try {\n file_put_contents($path, $content);\n return 'Your page was saved successfully';\n } catch(Zend_Exception $e) {\n return 'Sorry, there was an error saving your page';\n }\n }", "public function save($to, array $omitHeaders = [])\n {\n file_put_contents($to, $this->render($omitHeaders));\n }", "protected function _save_to_file()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n try {\n $file = new File(CLEAROS_CACHE_DIR . \"/mp-cart.\" . $this->CI->session->userdata['sdn_rest_id']);\n\n if (!$file->exists())\n $file->create('webconfig', 'webconfig', 600);\n\n $lines = array();\n foreach ($this->contents as $lineitem)\n $lines[] = serialize($lineitem);\n $file->dump_contents_from_array($lines);\n\n // Force reload\n $this->is_loaded = FALSE;\n } catch (Exception $e) {\n throw new Engine_Exception(clearos_exception_message($e), CLEAROS_WARNING);\n }\n }", "function saveFile(){\n global $loginUrl, $param, $fetchPagePath, $savePagePath;\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $loginUrl);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $param);\n curl_setopt($ch, CURLOPT_COOKIEJAR, $cookieFile);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\n $store = curl_exec($ch);\n curl_setopt($ch, CURLOPT_URL, $fetchPagePath);\n\n $content = curl_exec($ch);\n file_put_contents($savePagePath, $content);\n\n}", "public function saveTo($path)\n\t{\n\t\t$this->finalize();\n\t\treturn $this->mpdf->Output($path, 'F');\n\t}", "public function writeFile(string $path): void\n {\n $string = $this->dom->saveXML();\n // TODO error handle\n $fp = fopen($path, 'w');\n fwrite($fp, $string);\n fclose($fp);\n }", "public function save()\n {\n $k = $this->getPages()->search(function ($item) {\n return $item->name == Request::get('page');\n });\n if ($k === false) {\n throw new \\Exception(\"Request invalid\", 1);\n }\n\n $page = $this->getPage(Request::get('page'));\n\n foreach ($page->fields as $field) {\n switch ($field->type) {\n case Input::GALLERY:\n if (Request::get($field->name) != '') {\n $items = json_decode(stripslashes(Request::get($field->name)), true);\n $field->setItems(new Collection($items));\n $field->save();\n }\n break;\n\n default:\n $field->value = Request::get($field->name);\n $field->save();\n break;\n }\n }\n update_option(Manager::NTO_SAVED_SUCCESSED, 'should_flash', false);\n $redirect_url = $this->getTabUrl(Request::get('page'));\n wp_redirect($redirect_url);\n }", "public function savePage(Request $request)\n {\n // Authorize\n if (Gate::denies('save-page')) {\n abort(403);\n }\n\n // Find HTML file\n $filename = $request->input('__page__');\n if (empty($filename)) {\n $filename = 'index.html';\n }\n $filename = str_replace('..', '', $filename);\n $filename = dirname(__FILE__).'/../../../public/templates/'.$filename;\n\n // Check if file exists\n if (!file_exists($filename)) {\n abort(404);\n }\n\n // Read the contents of the HTML file and update it\n $html = file_get_contents($filename);\n\n // For each parameter in the request attempt to match and replace the\n // value in the HTML.\n foreach ($request->all() as $name => $value) {\n\n if ($name == '__page__') {\n continue;\n }\n\n // Escape backslashes in the value for regular expression use\n $value = str_replace('\\\\', '\\\\\\\\', $value);\n\n // Match and replace editable regions\n $start = '<!--\\s*editable\\s+'.preg_quote($name).'\\s*-->';\n $end = '<!--\\s*endeditable\\s+'.preg_quote($name).'\\s*-->';\n $html = preg_replace(\"/($start\\s*)(.*?)(\\s*$end)/ms\", '$1'.$value.'$3', $html);\n }\n\n // Save changes to the HTML file\n file_put_contents($filename, $html);\n\n return \"saved\";\n }", "public function write ()\n {\n $filename = $this->filePath . 'hotels-'. time().'.html';\n $fp = fopen($filename, 'w');\n\n $html = $this->buildHtml();\n\n\n try {\n fwrite($fp, $html);\n } catch (\\Exception $e) {\n throw new FileException('Can not save file!.');\n }\n fclose($fp);\n\n return $filename;\n }", "private function saveToFile() {\n\t\tif(!isset($this->minified_data)) {\n\t\t\tthrow new MinifyException('There is no data to write to \"'.$this->target.'\"', 300);\n\t\t}\n\t\tif(($handler = @fopen($this->target, 'w')) === false) {\n\t\t\tthrow new MinifyException('Can\\'t open \"' . $this->target . '\" for writing.', 301);\n\t\t}\n\t\tif(!fwrite($handler, $this->minified_data)) {\n\t\t\tthrow new MinifyException('The file \"' . $path . '\" could not be written to. Check if PHP has enough permissions.', 303);\n\t\t}\n\t\tif($this->source_method == 'file') {\n\t\t\t$minify_mtime = filemtime($this->target);\n\t\t\tif($minify_mtime) {\n\t\t\t\t@touch($this->source, $minify_mtime - 1); // Make sure to touch the source file to avoid filemtime issues\n\t\t\t}\n\t\t}\n\t\tfclose($handler);\n\t}", "function save($path, array $options = array());", "function save( $file ) {\r\n\t\t$this->mergeBlockData();\r\n\r\n\t\t// Too large for impload, concat ourselves\r\n\t\t$data = '';\r\n\t\tforeach( $this->data as $line ) {\r\n\t\t\t$data .= $line . \"\\n\";\r\n\t\t}\r\n\r\n\t\tfile_put_contents( $file, $data );\r\n\t}", "public function generate_file() {\n\t\tif ( 1 === $this->get_page() ) {\n\t\t\t@unlink( $this->get_file_path() ); // phpcs:ignore WordPress.VIP.FileSystemWritesDisallow.file_ops_unlink, Generic.PHP.NoSilencedErrors.Discouraged,\n\t\t}\n\t\t$this->prepare_data_to_export();\n\t\t$xml_product_str = implode('', $this->get_xml_data());\n\t\t$xml_product_str = str_replace('<?xml version=\"1.0\" encoding=\"UTF-8\"?>', '', $xml_product_str);\n\t\t$this->write_xml_data( $xml_product_str );\n\t}", "public function save($reorder = true)\n {\n // Perform move, copy or reordering if needed.\n $this->doRelocation($reorder);\n\n $file = $this->file();\n if ($file) {\n $file->filename($this->filePath());\n $file->header((array) $this->header());\n $file->markdown($this->raw_content);\n $file->save();\n }\n }", "public function toFile($path) {\n\t\t\t$this->path = $path;\n\t\t\t$fp = fopen($this->path, \"w\");\n\t\t\tfputs($fp, $this->pdf_content);\n\t\t\tfclose($fp);\n\t\t\treturn $this->path;\n\t\t}", "public function save($path = null)\n {\n if($path && is_dir($path)){\n $path .= DIRECTORY_SEPARATOR . $this->filename;\n }\n $this->getPdf()->Output($path, 'F');\n }", "function storePage(\\models\\WikiPage $page);", "public function saveToFile($filename)\n {\n }", "public function writeFile(){\n fwrite($this->fp, $this->saida);\n }", "public function save_HTML($file_name = 'HTML.html')\n {\n // if there is no immediate dir, make one from the fingerprint\n $dir = $this->_make_dir($this->peek_parent->attachment_dir . $this->get_fingerprint());\n $fn = $dir . $file_name;\n $this->_save_file($fn, $this->HTML);\n }", "public function save ($dir)\n {\n foreach ($this->_pages as $page) {\n $this->_ods->addTable($page->content());\n }\n\n $dir = (substr($dir, -1, 1) == '/') ? $dir : $dir . '/';\n\n $file = $dir . $this->property()->getName() . '.ods';\n\n $this->_ods->genOdsFile($file);\n\n if (!file_exists($file)) {\n throw new DocumentException(self::ERROR_SAVE);\n }\n }", "public function export() {\n\t\t$this->send_headers();\n\t\t$this->send_content( $this->get_file() );\n\t\t@unlink( $this->get_file_path() ); // phpcs:ignore WordPress.VIP.FileSystemWritesDisallow.file_ops_unlink, Generic.PHP.NoSilencedErrors.Discouraged\n\t\tdie();\n\t}", "public function save($filename='archive.zip')\n {\n file_put_contents($filename, $this->file());\n }", "public function save($filename = null);", "public function saveToFile($dir)\n\t{\n\t\tfile_put_contents($dir.DIRECTORY_SEPARATOR.$this->exportable->getFileName(), $this->exportable->getContent());\n\t}", "public function save(File $file)\n {\n $this->filesystem->write($file);\n }", "public function save()\n {\n $file = $this->file();\n if ($file) {\n $file->save($this->items);\n }\n }", "public function save()\n {\n $data = array();\n $data[] = \"; <?php die; ?>\";\n $data[] = \"; \";\n $data[] = \"; Liquid PHP Application Framework Configuration File\";\n $data[] = \"\";\n\n foreach($this->data as $a => $section)\n {\n $data[] = \"[\" . $a . \"]\";\n foreach($section as $b => $subsection)\n {\n foreach($subsection as $c => $value)\n {\n $data[] = $b . '.' . $c . '=\"' . $value . '\"';\n }\n }\n\n file_put_contents($this->filename, implode(\"\\r\\n\", $data));\n $this->requiresSave = false;\n }\n }", "public function saveFileContent($fileName, $content);", "public function saveFileContent($fileName, $content);", "public function save($data, $file)\r\n\t{\r\n\t\tif (file_put_contents($file, $this->getAdapter($file)->dump($data)) === FALSE) {\r\n\t\t\tthrow new Nette\\IOException(\"Cannot write file '$file'.\");\r\n\t\t}\r\n\t}", "public function writeTo($path);", "private function writeToFile($contents)\r\n\t\t{\r\n\t\t\t$contents = implode(\"\\n\", $contents);\r\n\t\t\t$contents = preg_replace(\"/(^[\\r\\n]*|[\\r\\n]+)[\\s\\t]*[\\r\\n]+/\", \"\\n\", $contents);\r\n\t\t\tfile_put_contents($this->fileName, $contents);\r\n\t\t\theader(\"Location: \".$this->editUrl.\"?id=\".$this->id);\r\n\t\t}", "public function writeCardFile(){\n\t\tif (!isset($this->output)){\n\t\t\t$this->generateCardOutput();\n\t\t}\n\t\t\n\t\t$handle = fopen($this->download_dir . '/' . $this->card_filename, 'w');\n\t\tfputs($handle, $this->output);\n\t\tfclose($handle);\n\t\t\n\t\t$this->deleteOldFiles(30);\n\t\t\n\t\tif (isset($handle)) {\n\t\t\tunset($handle);\n\t\t}\n\t}", "public function save(): void\n {\n file_put_contents($this->file, json_encode($this->translations));\n }", "function writeFile($orderID,$item){\r\n\t$file = \"..\\Ordering module\\order_det\\\\\".$orderID.\".txt\";\r\n\t\r\n\t// open file\r\n\t\r\n\t$fh = fopen($file, 'w') or die('Could not open file!');\r\n\t\r\n\t\r\n\tif(fwrite($fh,$item)){\r\n\t\t$_SESSION['fileUrl'] = $file;\r\n\t}else{\r\n\t\tdie('could not write file!!');\r\n\t}\r\n\r\n\tfclose($fh);\r\n}", "public function saveToFile($filePath)\n {\n $this->adsUtilityRegistry->addUtility(\n AdsUtility::REPORT_DOWNLOADER_FILE\n );\n $this->reportDownloadResultDelegate->saveToFile($filePath);\n }", "public function save(OrderItemInterface $page);", "function save() {}", "public function download($url, $pathToSave);", "public function savePage($page = \"\", $url = \"\")\n {\n $milliseconds = round(microtime(true) * 1000);\n $file = $milliseconds . \".txt\";\n $filename = $this->pending_path . $file;\n if (file_put_contents($filename, $page)) {\n $pending = new Pending();\n $pending->setFilename($file);\n $pending->setUrl($url);\n $pending->setDateAdd(new \\DateTime());\n $this->em->persist($pending);\n $this->em->flush();\n return true;\n }\n return false;\n }", "function createHTMLFile($fileName, $content) {\n\t\t$fileName = str_replace(' ', '', $fileName);\n\t\t$handle = fopen('createdCV/'.$fileName.'.html', 'w');\n\n\t\tfwrite($handle, $content);\n\t\tfclose($handle);\n\n\t\theader('Location: createdCV/'.$fileName.'.html');\n\t}", "function save()\r\n {\r\n // read the template\r\n\t $str = dirname(__FILE__);\r\n $content = file_get_contents(dirname(__FILE__).'/company.php'); \r\n if (!$content){\r\n \t$this->error = \"fail to read template\"; \r\n return false;\r\n } \t\r\n \r\n\t $tags = array(\r\n\t \"#TITLE#\", \r\n\t \t\"#COMPANY#\", \r\n\t \t\"#CONTACT#\", \r\n\t \t\"#TELEPHONE#\", \r\n \"#MOBILE#\", \r\n \"#FAX#\", \r\n \"#ADDRESS#\", \r\n \"#QQ#\", \r\n\t \"#WEB#\",\r\n\t\t\"#DATE#\",\t \r\n \"#BUSINESS#\");\r\n\t \r\n $fields[0] = $this->company;\r\n $fields[1] = $this->company;\r\n $fields[2] = $this->name;\r\n $fields[3] = $this->phone;\r\n $fields[4] = $this->mobile;\r\n $fields[5] = $this->fax;\r\n $fields[6] = $this->address;\r\n $fields[7] = $this->qq;\r\n $fields[8] = $this->web;\r\n $fields[9] = $this->date;\r\n $fields[10] = $this->business;\r\n \t \r\n $content = str_replace($tags,$fields,$content); \r\n $filename = sprintf(\"../company/%d-%s.php\", $this->id, $this->account);\r\n \t $this->link = $filename;\r\n\t\t \r\n $fp = fopen($filename, \"w\");\r\n if (!$fp) {\r\n \t $this->error = \"fail to create file\"; \r\n return false;\r\n }\r\n \r\n if (fwrite($fp, $content) == FALSE) { \r\n \t $this->error = \"fail to wirte content\";\r\n fclose($fp);\r\n return false;\r\n }\r\n \r\n fclose($fp);\r\n return true;\r\n }", "function save($out=NULL)\r\n\t{\r\n\t\tif ( ! is_null($this->source) )\r\n\t\t\t$this->write($this->source, $out);\r\n\t}", "public function saveToDisk()\n {\n return file_put_contents($this->filename, $this->__toString(), LOCK_EX);\n }", "public function save(FileInterface $file);", "function save($filename) \r\n\t{\r\n\t\t$this->movie->save($filename);\r\n\t}", "function save($filename, $contents)\n\t{\n if (!$fp = fopen($filename, 'wb')) {\n raiseError(\"Cannot open file ($filename)\");\n }\n if(empty($contents))\n raiseError(\"Nothing to write into file ($filename)\");\n if (!fwrite($fp, $contents)) {\n raiseError(\"Cannot write to file ($filename)\");\n }\n\t\tfclose($fp);\n\t}", "public function write()\n {\n $lines = array();\n\n foreach ($this->data as $fetch) {\n $data = array($fetch['url'], $fetch['length'], $fetch['filename']);\n array_push($lines, join(' ', $data) . \"\\n\");\n }\n\n if (count($lines) == 0) {\n if (file_exists($this->fileName)) {\n unlink($this->fileName);\n }\n } else {\n writeFileText($this->fileName, $this->fileEncoding, join('', $lines));\n }\n }", "private function writeFile() {\n $content = serialize($this->data);\n if (!file_put_contents($this->cache, $content)) {\n echo \"Could not write content: $content\";\n }\n }", "private function saveFile() {\n\t\tif($this->get_request_method() != \"POST\"){\n\t\t\t$this->response('',406);\n\t\t}\n\t\t\n\t\t$roughHTTPPOST = file_get_contents(\"php://input\");\n\t\t$rep = array( 'roughHTTPPOST' => strlen( $roughHTTPPOST ) );\n\t\t//parse it into vars\n\t\t$post = $this->parse_query_string($roughHTTPPOST, 2, false); // on attend 2 paramètres\n\t\t$str = $post['str'];\n\t\n\t\t$rep['taille-entree'] = strlen( $str );\n\t\t$rep['taille-sortie'] = file_put_contents( $this->path_root . ltrim( $post['path'], '/' ), $str );\n\t\t\n\t\t$rep['success'] = ( $rep['taille-sortie'] !== false );\n\n \t\t$this->response( json_encode($rep), 200 );\n\t}", "static function save(){\n\n if (self::$cache_directory && !is_dir(self::$cache_directory))\n mkdir(self::$cache_directory, 0755, $recursive = true);\n\n file_put_contents(self::$cache_filepath, self::$context['html'], $create_folder = true);\n\n }", "public function saveAction() {\n\t\t$pages\t\t= new Pages();\n\t\t\t\t\t\n\t\t// Is the form correctly posted ?\n\t\tif (!$this->getRequest()->isPost()) {\n\t\t\tthrow new Stuffpress_Exception(\"Invalid request - must be post\");\n\t\t}\n\t\t\n\t\t// Get the source from the request\n\t\t$id \t\t= (int) $this->_getParam('id');\n\t\t$type \t\t= (string) $this->_getParam('type');\n\t\t\n\t\t// Validate the parameters\n\n\t\tif (! (($id>=0) && in_array($type, Pages::getAvailablePages()))) {\n\t\t\tthrow new Stuffpress_Exception(\"Parameters failed validation\");\n\t\t}\n\t\t\n\t\t// If it is an edit; are we the owner ?\n\t\tif ($id > 0) {\n\t\t\t// Does the page exist ?\n\t\t\tif (!$page = $pages->getPage($id)) {\n\t\t\t\tthrow new Stuffpress_Exception(\"Unknown page with id $id\");\n\t\t\t}\n\t\t\t// Are we the owner ?\n\t\t\tif ($page['user_id'] != $this->_application->user->id) {\n\t\t\t\tthrow new Stuffpress_AccessDeniedException(\"Not the owner of page $id\");\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Get the page descriptor\n\t\t$model\t\t= Pages::getModel($type);\n\t\t\n\t\t// Validate the form\n\t\t$form\t\t= $model->getForm();\n\t\tif (!$form->isValid($_POST)) {\n\t\t\treturn $this->_helper->json->sendJson($form->getErrorArray());\n\t\t}\n\t\t\n\t\t// Get the form values\n\t\t$values \t= $form->getValues();\n\t\t\n\t\t// Proceed and save the values\n\t\t$title\t\t= @$values['title']; // There shoudl always be a title\n\t\t\n\t\t// Create the page if it does not exist\n\t\tif ($id ==0) {\n\t\t\t$id = $pages->addPage($type, $title);\n\t\t} \n\t\t// else update the title of the page\n\t\telse {\n\t\t\t$pages->setTitle($id, $title);\n\t\t}\n\t\t\n\t\t// Save the page configuration\n\t\t$model->processForm($id, $values);\n\t\t\n\t\t// Ok\n\t\treturn $this->_helper->json->sendJson(false);\n\t}", "protected function saveHtmlOutput() {\n $out = $this->getSession()->getPage()->getContent();\n\n // Ensure that any changes to variables in the other thread are picked up.\n $this->refreshVariables();\n\n if ($this->htmlOutputEnabled) {\n $html_output = '<hr />Ending URL: ' . $this->getSession()->getCurrentUrl();\n $html_output .= '<hr />' . $out;\n $html_output .= $this->getHtmlOutputHeaders();\n $this->htmlOutput($html_output);\n }\n }", "public function save($file){\n\t\treturn false;\n\t}", "public function save()\n {\n $this->resetErrorBag();\n\n if ($this->file) {\n $file = File::createAndSave($this->file);\n\n session()->flash('upload-url', $file->resource_url);\n }\n\n $this->reset('file');\n }", "function write_html_file($filename, $page)\n{\n\t\t// In our example we're opening $filename in append mode.\n\t\t// The file pointer is at the bottom of the file hence\n\t\t// that's where $somecontent will go when we fwrite() it.\n\t\tif (!$handle = fopen($filename, 'w')) \n\t\t{\n\t\t\techo \"Cannot open file ($filename)\";\n\t\t\treturn FALSE;\n\t\t}\n//\t\techo count($page);\n\t\tfor($i=0; $i<count($page); $i++)\n\t\t{\t\n\t\t $data = $page[$i];\n\t\t\t// Write $somecontent to our opened file.\n\t\t\tif (fwrite($handle, $data) === FALSE) \n\t\t\t{\n\t\t\techo \"Cannot write to file ($filename)\";\n\t\t\texit;\n\t\t\t}\n\t\t}\n\t\tfclose($handle);\n\t\treturn TRUE;\n\t\n}", "public function save($name = 'invoice.pdf')\n {\n $invoice = $this->generate();\n\n Storage::put($name, $invoice->pdf->output());\n }", "protected function saveToFile($data, $file) {\n }", "public function exportPage($pageId)\r\n {\r\n $this->setPageId($pageId);\r\n $this->step1_setCrawlerInstruction();\r\n $this->step2_doCrawling();\r\n $this->step3_addResourcesOfCrawledPageToFileRepository();\r\n return $this->getFileRepository();\r\n }", "public function output($url)\n {\n $file = tempnam(sys_get_temp_dir(), 'knplabs_snappy') . '.' . $this->defaultExtension;\n\n $ok = $this->save($url, $file);\n $content = null;\n readfile($file);\n unlink($file);\n }", "public function save() {\n\t\tfile_put_contents($this->filepath, json_encode($this->data, JSON_PRETTY_PRINT));\n\t}", "public function save()\n {\n if ($this->enabled) {\n session_write_close();\n }\n }", "public function save()\r\n {\r\n $filePath = $this->checkPath();\r\n if (file_exists($filePath)) {\r\n throw new \\Exception('Transformer already exists');\r\n }\r\n $model = new \\SplFileObject($filePath, 'w+');\r\n $model->fwrite($this->template());\r\n }", "function save()\r\n {\r\n $this->mStoreHouseDOM->save($this->mStoraPath.$this->mStoresrc); \r\n //$this->mStoreHouseDOM->save('./Storage/'.'./tempStora.xml'); //temp\r\n }", "private function save(string $path, string $content): void\n {\n $this->filesystem->dumpFile($this->basePath . '/' . $path, $content);\n }", "public function write($filename, $content);", "function save( $file ) {\n\t\t$this->merge_block();\n\t\t$data = implode( \"\\n\", $this->block );\n\t\tfile_put_contents( $file, $data );\n\t}", "function save($fileName)\n\t{\n\t\t$this->stream = new FileWriter($fileName);\n\t\t$this->compile();\n\t\t$this->stream->dispose();\n\t}", "protected function save() {\n //inspect($_SESSION);\n try {\n if (!$this->document->getUser()->isAuthenticated() && !$this->getParam('noCaptcha')) {\n $this->checkCaptcha();\n }\n $this->saveData();\n\n $this->response->redirectToCurrentSection('success/');\n } catch (SystemException $e) {\n $this->failure($e->getMessage(), $_POST[$this->getTableName()]);\n }\n }" ]
[ "0.75575733", "0.7113068", "0.65576", "0.6404856", "0.6355959", "0.63335043", "0.63247246", "0.6257715", "0.6217822", "0.62050146", "0.61702365", "0.6133512", "0.61148256", "0.61071855", "0.6081375", "0.6062279", "0.60273224", "0.60147816", "0.5946501", "0.5942622", "0.5941838", "0.5936956", "0.59215266", "0.5917873", "0.5914177", "0.5905953", "0.58556336", "0.58309", "0.5785886", "0.57605267", "0.5730091", "0.5730018", "0.5711268", "0.5701144", "0.5700752", "0.5698844", "0.5692523", "0.56671935", "0.5660598", "0.56533813", "0.56480974", "0.56400865", "0.5639765", "0.56337434", "0.56315255", "0.5625273", "0.56138515", "0.56131136", "0.5612582", "0.56102926", "0.55974483", "0.55806756", "0.5567715", "0.5557279", "0.5556701", "0.55548906", "0.5549119", "0.5547847", "0.5527899", "0.5527899", "0.55161154", "0.5514863", "0.55129564", "0.5499476", "0.54932696", "0.5492776", "0.54903144", "0.54817945", "0.54786634", "0.54683596", "0.5460462", "0.54425406", "0.54405296", "0.5431276", "0.54261065", "0.5416294", "0.5411018", "0.54041255", "0.539603", "0.53953326", "0.5394763", "0.53918314", "0.5389903", "0.5386537", "0.5378483", "0.537738", "0.5375574", "0.53742117", "0.5371872", "0.53631276", "0.53586406", "0.535633", "0.53520775", "0.53512377", "0.53504413", "0.5346589", "0.53406525", "0.53365463", "0.5326687", "0.5322729" ]
0.7443731
1
Create a server config file
Создайте файл конфигурации сервера
public function createServerConfig() { // Load config $config = new Config($this->app->getEnvironment(), '.env'); // Save to protected file $config->export($this->target . DIRECTORY_SEPARATOR . '.env.php'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createConfigFile() {\n $path = base_path('config/' . $this->getConfigFileName()) . '.php';\n\n $content = $this->files->get(__DIR__ . '/stubs/config.php.stub');\n\n $content = str_replace('{{CONFIG_NAME}}', Str::upper(Str::snake($this->getNameArg())), $content);\n\n $this->makeDirectory($path);\n $this->files->put($path, $content);\n $this->info('create config file ok');\n }", "public function createConfigFile(): void\n {\n $filesystem = new Filesystem();\n $filesystem->dumpFile($this->getPath(), '');\n }", "private function createNginxConfFile(): void\n {\n $content = $this->twig->render('server/nginx/httpBlock.yaml.twig', ['config' => Config::get('http')]);\n\n $this->fileManager->createFileContent('nginx/nginx.conf', $content);\n }", "public function createConfig()\n\t{\n\t\t// @todo: WHAT IF etc directory doesn't exist???\n\t\t// put config.xml\n\t\t$config_xml = \"{$this->rootDirectory}/{$this->directories['etc']}/config.xml\";\n\t\ttouch($config_xml);\n\n\t\t// create <Namespace>_<Module>.xml inside the Namespace/Module folder\n\t\t$module_xml = \"{$this->rootDirectory}/{$this->namespace}/{$this->module}/\"\n\t\t\t. \"{$this->fullModule}.xml\";\n\t\ttouch($module_xml);\n\n\t\t// edit config.xml\n\t\t$fp = fopen($config_xml, 'w');\n\t\tfwrite($fp, $this->addConfigXmlContent());\n\t\tfclose($fp);\n\n\t\t$fp = fopen($module_xml, 'w');\n\t\tfwrite($fp, $this->addModuleXmlContent());\n\t\tfclose($fp);\n\n\t}", "private function createProxyConfFile(): void\n {\n $config = Config::get('http');\n $config['events']['use'] = 'epoll';\n\n $config['http'] = array_merge($config['http'], [\n 'proxy_buffer_size' => '128k',\n 'proxy_buffers' => [4, '256k'],\n 'proxy_busy_buffers_size' => '256k',\n 'proxy_read_timeout' => '300s'\n ]);\n\n $content = $this->twig->render('server/nginx/httpBlock.yaml.twig', ['config' => $config]);\n \n $this->fileManager->createFileContent('nginx/proxy/nginx.conf', $content);\n }", "function wg_create_config_files($clean = true) {\n\tglobal $wgg;\n\n\twg_globals();\n\n\t// Create configuration path if it is missing\n\tif (!file_exists($wgg['conf_path'])) {\n\t\tmkdir($wgg['conf_path'], 0700, true);\n\t} else {\n\t\tchmod($wgg['conf_path'], 0700);\n\t}\n\n\t// We almost always want to just overwrite the old configurations\n\tif ($clean) {\n\t\twg_delete_config_files();\n\t}\n\n\t// Check if there are any configurations to write to disk\n\tif (isset($wgg['tunnels']) && is_array($wgg['tunnels'])) {\n\t\tforeach ($wgg['tunnels'] as $tunnel) {\n\t\t\twg_make_tunnel_conf_file($tunnel, false);\n\t\t}\n\t}\n}", "protected function generateConfigFile()\n {\n $content = [];\n if ($this->whitelist) {\n $content[] = sprintf('tessedit_char_whitelist %s', $this->whitelist);\n }\n\n if ( !empty($content)) {\n $this->configFile = $this->generateTmpFile('conf');\n file_put_contents($this->configFile, implode(\"\\n\", $content));\n }\n }", "static public function write_config() {\n\t\tfile_put_contents(PIPES_DIR . 'config.json', json_encode(self::$config));\n\t}", "public function create( ) {\n if ( !is_dir( dirname( __FILE__ ) . \"/conf\" ) ) {\n mkdir( dirname( __FILE__ ) . \"/conf\" );\n }\n \n $this->mOverrides['*'] = false;\n $this->save( );\n }", "public function createConfigFiles() {\n $this->logHeader('Creating config files');\n\n $workingdir = Client::getAbsPath();\n $this->createEnvTestingFile();\n $this->copyFileToCwd(\"{$this::$vendordir}/conf/codeception.yml\", \"{$workingdir}/codeception.yml\");\n $this->copyFileToCwd(\"{$this::$vendordir}/conf/acceptance.suite.yml\", \"{$workingdir}/tests/acceptance.suite.yml\");\n $this->copyFileToCwd(\"{$this::$vendordir}/conf/functional.suite.yml\", \"{$workingdir}/tests/functional.suite.yml\");\n $this->copyFileToCwd(\"{$this::$vendordir}/conf/wpunit.suite.yml\", \"{$workingdir}/tests/wpunit.suite.yml\");\n $this->copyFileToCwd(\"{$this::$vendordir}/conf/unit.suite.yml\", \"{$workingdir}/tests/unit.suite.yml\");\n }", "function create()\r\n\t\t{\r\n\t\t\t//windows style\r\n\t\t\t$n=\"\\r\\n\";\r\n\t\t\t$this->handle=fopen($this->filename,'w');\r\n\t\t\t$this->config=$this->defaultConfig();\r\n\t\t\t//write head of the config file\r\n\t\t\tfwrite($this->handle,\"#MYSQL config file\".$n);\r\n\t\t\t//write each pair of key and value per line\r\n\t\t\tforeach($this->config as $key=>$value)\r\n\t\t\t{\r\n\t\t\t\tfwrite($this->handle,$key.\"\\t\".$value.$n);\r\n\t\t\t}\r\n\t\t\tfclose($this->handle);\r\n\t\t\treturn 1;\r\n\t\t}", "public function create_config_like_file(){\n\t\t\n\t\t//create a file if its not present there\n\t\t\n\t\t\n\t\t$dump_dir = WPTC_Factory::get('config')->get_backup_dir();\n\t\t$dump_dir_parent = substr($dump_dir, 0, -8);\n\t\t$this_config_like_file = $dump_dir_parent . '/' . 'config-like-file.php';\n\t\t\n\t\t$fh = fopen($this_config_like_file, 'a');\n\t\tif(ftell($fh) < 2){\n\t\t\tfclose($fh);\n\t\t\t$fh = fopen($this_config_like_file, 'w');\n\t\t}\n fwrite($fh, '');\n\t\tfclose($fh);\n\t\t\n\t\t$contents_to_be_written = \"\n\t\t<?php \n\t\t/** The name of the database for WordPress */\n\t\tif(!defined('DB_NAME'))\n\t\tdefine('DB_NAME', '\".DB_NAME.\"');\n\n\t\t/** MySQL database username */\n\t\tif(!defined('DB_USER'))\n\t\tdefine('DB_USER', '\".DB_USER.\"');\n\n\t\t/** MySQL database password */\n\t\tif(!defined('DB_PASSWORD'))\n\t\tdefine('DB_PASSWORD', '\".DB_PASSWORD.\"');\n\n\t\t/** MySQL hostname */\n\t\tif(!defined('DB_HOST'))\n\t\tdefine('DB_HOST', '\".DB_HOST.\"');\n\n\t\t/** Database Charset to use in creating database tables. */\n\t\tif(!defined('DB_CHARSET'))\n\t\tdefine('DB_CHARSET', '\".DB_CHARSET.\"');\n\n\t\t/** The Database Collate type. Don't change this if in doubt. */\n\t\tif(!defined('DB_COLLATE'))\n\t\tdefine('DB_COLLATE', '\".DB_COLLATE.\"');\n\t\t\n\t\tif(!defined('WP_CONTENT_DIR'))\n\t\tdefine('WP_CONTENT_DIR', '\".WP_CONTENT_DIR.\"');\n\t\t\n\t\tif(!defined('WP_DEBUG'))\n\t\tdefine('WP_DEBUG', false);\n\t\t/** Absolute path to the WordPress directory. */\n\t\tif ( !defined('ABSPATH') )\n define('ABSPATH', dirname(dirname(__FILE__))); \n if ( !defined('TC_PLUGIN_NAME') )\n define('TC_PLUGIN_NAME', 'wp-time-capsule');\n ?>\n \";\n\t\t\n\t\tfile_put_contents($this_config_like_file, $contents_to_be_written, FILE_APPEND);\n\t\t\n\t\treturn $this_config_like_file;\n\t\t\n\t}", "private function createDefaultConfig()\n {\n $create = touch($this->iniFile);\n if ( $create )\n $this->saveConfig(true);\n }", "public function createGlobalConfig()\n {\n $basicConfig = [\n 'actor' => $this->actorSuffix,\n 'paths' => [\n 'tests' => 'tests',\n 'log' => $this->logDir,\n 'data' => $this->dataDir,\n 'helpers' => $this->helperDir\n ],\n 'settings' => [\n 'bootstrap' => 'bootstrap.php',\n 'colors' => (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN'),\n 'memory_limit' => '1024M'\n ]\n ];\n\n $str = Yaml::dump($basicConfig, 3);\n if ($this->namespace) {\n $str = \"namespace: {$this->namespace} \\n\" . $str;\n }\n file_put_contents('codeception.yml', $str);\n }", "function createTemplateFile($_configFile)\n{\n echo \"Creating template config file...\";\n $templateConfig['database'] = array(\n 'username' => \"DATABASE_USERNAME\",\n 'password' => \"DATABASE_PASSWORD\",\n 'host' => \"DATABASE_HOST\",\n 'dbname' => \"DATABASE_NAME\",\n 'adapter' => \"pdo_mysql\",\n 'tableprefix' => \"tine20_\"\n );\n\n $config = new Zend_Config($templateConfig, TRUE);\n echo \"OK!\\n\";\n\n writeConfigToFile($config, $_configFile);\n}", "function createServer()\n {\n\n $this->fetchImageTokenProvider();\n\n ##\n\n $this->globalData['serverName'] = substr(str_shuffle(WPCPHTTP::$permitted_chars), 0, 10);\n $this->globalData['CyberPanelPassword'] = substr(str_shuffle(WPCPHTTP::$permitted_chars), 0, 15);\n $this->globalData['RootPassword'] = substr(str_shuffle(WPCPHTTP::$permitted_chars), 0, 15);\n\n $this->body = array(\n 'name' => $this->globalData['serverName'],\n 'size' => $this->globalData['finalPlan'],\n 'image' => $this->image,\n 'region' => $this->globalData['finalLocation'],\n 'user_data' => sprintf(\"#cloud-config\n# run commands\n# default: none\n# runcmd contains a list of either lists or a string\n# each item will be executed in order at rc.local like level with\n# output to the console\n# - runcmd only runs during the first boot\n# - if the item is a list, the items will be properly executed as if\n# passed to execve(3) (with the first arg as the command).\n# - if the item is a string, it will be simply written to the file and\n# will be interpreted by 'sh'\n#\n# Note, that the list has to be proper yaml, so you have to quote\n# any characters yaml would eat (':' can be problematic)\n# /var/lib/cloud/instance/scripts/runcmd\nruncmd:\n - /usr/local/CyberCP/bin/python /usr/local/CyberCP/plogical/adminPass.py --password %s\n - /usr/local/CyberCP/bin/python /usr/local/CyberCP/plogical/apiAccess.py\n - echo \\\"root:%s\\\"|chpasswd\n\", $this->globalData['CyberPanelPassword'], $this->globalData['RootPassword']),\n 'automount' => false\n );\n\n $this->url = 'https://api.digitalocean.com/v2/droplets';\n $response = $this->HTTPPostCall($this->token);\n $respData = json_decode(wp_remote_retrieve_body($response));\n\n CommonUtils::writeLogs(wp_remote_retrieve_body($response), CPWP_ERROR_LOGS);\n\n try{\n\n if( isset($respData->message) ){\n throw new Exception($respData->message);\n }\n\n // Internal request to fetch ipv4\n\n sleep(5);\n\n $this->url = 'https://api.digitalocean.com/v2/droplets/' . $respData->droplet->id;\n $internalResp = $this->HTTPPostCall($this->token, 'GET');\n $internalRespData = json_decode(wp_remote_retrieve_body($internalResp));\n\n CommonUtils::writeLogs(wp_remote_retrieve_body($internalResp), CPWP_ERROR_LOGS);\n\n $this->globalData['serverID'] = $respData->droplet->id;\n $this->globalData['ipv4'] = $internalRespData->droplet->networks->v4[0]->ip_address;\n $this->globalData['ipv6'] = $internalRespData->droplet->networks->v6[0]->ip_address;\n $this->globalData['cores'] = $respData->droplet->vcpus;\n $this->globalData['memory'] = $respData->droplet->memory;\n $this->globalData['disk'] = $respData->droplet->disk . 'GB SSD';\n $this->globalData['datacenter'] = $respData->droplet->region->slug;\n $this->globalData['city'] = $respData->droplet->region->name;\n }\n catch (Exception $e) {\n CommonUtils::writeLogs(sprintf('Failed to create server for product id: %s, order id was %s and product name %s. Error message: %s.', $this->globalData['productID'], $this->orderid, $this->globalData['productName'], $respData->error->message), CPWP_ERROR_LOGS);\n return 0;\n }\n\n $this->serverPostProcessing();\n\n return 1;\n }", "public function writeConfiguration()\n {\n $configFile= APP_PATH.'config/database.php';\n $config = $this->getPostConfiguration();\n\n $configStr = <<<CONFIG\n<?php\n\n\\$config['database'] = array(\n 'default' => '{$config['driver']}',\n\n 'connections' => array(\n '{$config['driver']}' => array(\n 'driver' => '{$config['driver']}',\n 'host' => isset(\\$_SERVER['DB1_HOST']) ? \\$_SERVER['DB1_HOST'] : '{$config['host']}',\n 'database' => isset(\\$_SERVER['DB1_NAME']) ? \\$_SERVER['DB1_NAME'] : '{$config['database']}',\n 'username' => isset(\\$_SERVER['DB1_USER']) ? \\$_SERVER['DB1_USER'] : '{$config['username']}',\n 'password' => isset(\\$_SERVER['DB1_PASS']) ? \\$_SERVER['DB1_PASS'] : '{$config['password']}',\n 'charset' => '{$config['charset']}',\n 'collation' => '{$config['collation']}',\n 'prefix' => '{$config['prefix']}'\n )\n )\n);\nCONFIG;\n\n file_put_contents($configFile, $configStr);\n\n $this->makeConnection($config);\n $this->migrate();\n $this->seed();\n\n Response::redirect($this->data['baseUrl'].'install.php/finish');\n }", "function create($hostname,$Username,$Password,$database)\n{\n $newfile = \"configuration.php\";\n \n //creating the file if it doesnt exist\n if (!file_exists($newfile)) {\n \n$myfile = fopen($newfile, \"w\") ;\n\n}\n//storing the values in a variable\n$data='<?php\n if (!defined(\"true-access\"))\n\t\t{\n\t\tdie(\"cannot access\");\n\t\t}\n\t\tdefine(\"DB_USER\",\"'.$Username.'\");\n\t\tdefine(\"DB_PASSWORD\",\"'.$Password.'\");\n\t\tdefine(\"DB_HOST\",\"'.$hostname.'\");\n\t\tdefine(\"DB_NAME\",\"'.$database.'\");\n\t\tdefine(\"SALT\",\"salt\");\n\t\t?>';\n\n//putting the contents in configuration.php file\t\t\necho file_put_contents(\"configuration.php\",$data);\n\n}", "function get_server_conf();", "public function generateConfig() {}", "function createConfig($configFile) {\n\tif(!file_exists($configFile)) {\n\t\techo \"Generating $configFile. You must update it with your account details.\" . PHP_EOL;\n\t\t$script = <<< SCRIPT\n\n; Integration mode - Must be one of sandbox/live\nmode = sandbox\n\n;Account credentials\n[Account]\n; Update your account credentials from developer portal here\nacct1.UserName = \nacct1.Password = \nacct1.Signature = \n\n;Connection Information\n[Http]\nhttp.ConnectionTimeOut = 30\nhttp.Retry = 1\n\n;Logging Information\n[Log]\nlog.FileName=PayPal.log\nlog.LogLevel=INFO\nlog.LogEnabled=true\n\nSCRIPT;\n\t\tfile_put_contents($configFile, $script);\n\t}\t\n}", "public function getConfig()\n {\n return $this->request('/server/create');\n }", "public function writeBaseConfiguration(): void\n {\n if (! $this->files->exists($this->path())) {\n $this->write(['tld' => 'test', 'loopback' => VALET_LOOPBACK, 'paths' => []]);\n }\n }", "function wg_make_tunnel_conf_file($tunnel, $include_endpoint = false) {\n\tglobal $wgg;\n\n\t// Init a new wgconfig object\n\t$wc = new wgconfig($tunnel['name'], true);\n\n\t$wc->set_path(\"{$wgg['conf_path']}/{$tunnel['name']}.conf\");\n\n\t$wc->initialize_file(\"Description: {$tunnel['descr']}\");\n\n\t// Process interface PrivateKey\n\t$key = wg_gen_publickey($tunnel['privatekey']);\n\n\t$wc->set_interface_attr('PrivateKey', $key['privkey_clamped']);\n\n\t// Process interface ListenPort\n\t$wc->set_interface_attr('ListenPort', $tunnel['listenport']);\n\n\t// Process peer sections\n\tforeach (wg_tunnel_get_peers_config($tunnel['name']) as [$peer_idx, $peer, $is_new]) {\n\t\tif (isset($peer['enabled']) && $peer['enabled'] == 'yes') {\n\t\t\t// Process peer entry and PublicKey\n\t\t\t$wc->add_peer($peer['publickey'], \"Peer: {$peer['descr']}\");\n\n\t\t\t// Process PresharedKey\n\t\t\t$wc->set_peer_attr($peer['publickey'], 'PresharedKey', $peer['presharedkey']);\n\n\t\t\t// Process AllowedIPs\n\t\t\tforeach ((array) $peer['allowedips']['row'] as $ip) {\n\t\t\t\t$wc->add_peer_attr($peer['publickey'], 'AllowedIPs', \"{$ip['address']}/{$ip['mask']}\");\n\t\t\t}\n\n\t\t\t// Process PersistentKeepalive\n\t\t\t$keepalive = $peer['persistentkeepalive'];\n\n\t\t\t$keepalive = (!empty($keepalive) && is_numericint($keepalive)) ? $keepalive : '0';\n\n\t\t\t$wc->set_peer_attr($peer['publickey'], 'PersistentKeepalive', $keepalive);\n\t\t}\n\t}\n\n\t$wc->write_file();\n}", "function tidy_save_config($filename)\n{\n}", "public function createConfigurationDirectory(): void\n {\n $this->files->ensureDirExists(preg_replace('~/valet$~', '', VALET_HOME_PATH), user());\n $this->files->ensureDirExists(VALET_HOME_PATH, user());\n }", "public function createConfigYml()\n\t{\n\t\tif(version_compare(VERSION, '4.4','<'))\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\t\t\n\t\t$strEnvironment = '';\n\t\t\n\t\t// current symphony environment\n\t\t#$strEnvironment = \\System::getContainer('kernel')->getParameter('kernel.environment');\n\t\t\n\t\t$strFile = 'config'.($strEnvironment ? '_'.$strEnvironment : '').'.yml';\n\t\t\n\t\t// fetch the file\n\t\t$objFile = new \\File('app/config/'.$strFile,true);\n\t\t\n\t\t$strContent = '';\n\t\tif($objFile->exists())\n\t\t{\n\t\t\t$strContent = $objFile->getContent();\n\t\t}\n\t\t\n\t\t// content parts\n\t\t$arrParts = array();\n\t\t$arrParts['contao.picker.builder::customcatalog_frontedit'] = \"\n# contao.picker.builder::customcatalog_frontedit\nservices:\n contao.picker.builder:\n class: PCT\\Contao\\Picker\\PickerBuilder\n arguments:\n - '@knp_menu.factory'\n - '@router'\n - '@request_stack'\n\";\n\n$arrParts['contao.picker.page_provider::customcatalog_frontedit'] = \"\n# contao.picker.page_provider::customcatalog_frontedit\nservices:\n contao.picker.page_provider:\n class: PCT\\Contao\\Picker\\PagePickerProvider\n\";\n\n$arrParts['contao.picker.file_provider::customcatalog_frontedit'] = \"\n# contao.picker.file_provider::customcatalog_frontedit\nservices:\n contao.picker.file_provider:\n class: PCT\\Contao\\Picker\\FilePickerProvider\n\";\n\n\t\t$blnWrite = false;\n\t\tforeach($arrParts as $ident => $strPart)\n\t\t{\n\t\t\t// part already exists\n\t\t\tif(strlen(strpos($strContent,$ident)) > 0)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$strContent .= $strPart;\n\t\t\t$blnWrite = true;\n\t\t}\n\t\t\n\t\t// write the config_...yml file\n\t\tif($blnWrite)\n\t\t{\n\t\t\t$objFile->write($strContent);\n\t\t\t$objFile->close();\n\t\t\t\n\t\t\t// log\n\t\t\t\\System::log('CC Frontedit: /app/config/'.$strFile.' created or updated successfully',__METHOD__,TL_CRON);\n\t\t\t\n\t\t\t// reload the page to make changes take effect\n\t\t\t\\Controller::reload();\n\t\t}\n\t}", "public function create() {\n\t\ttry {\n\t\t\t$configPrefix = $this->ldapHelper->getNextServerConfigurationPrefix();\n\t\t\t$configHolder = new Configuration($configPrefix);\n\t\t\t$configHolder->saveConfiguration();\n\t\t} catch (\\Exception $e) {\n\t\t\t$this->logger->logException($e);\n\t\t\tthrow new OCSException('An issue occurred when creating the new config.');\n\t\t}\n\t\treturn new DataResponse(['configID' => $configPrefix]);\n\t}", "function write_config_file()\r\n\t{\r\n\t\tglobal $no_friend_system;\r\n\t\t\r\n\t\t$include_data = \"\";\r\n\t\t\t\r\n\t\tif ($_SESSION['version'] == \"vbulletin\")\r\n\t\t\t$include_data = \"\r\n\trequire_once dirname(dirname(dirname(__FILE__))).\\\"/includes/config.php\\\";\";\r\n\r\n\t\tif ($_SESSION['version'] == \"xoops\")\r\n\t\t\t$include_data = \"\r\n\trequire_once dirname(dirname(dirname(__FILE__))).\\\"/mainfile.php\\\";\";\r\n\t\t\t\r\n\t\tif ($_SESSION['version'] == \"smf\")\r\n\t\t\t$include_data = \"\r\n\trequire_once dirname(dirname(dirname(__FILE__))).\\\"/Settings.php\\\";\";\r\n\t\r\n\t\tif ($_SESSION['version'] == \"smf2\")\r\n\t\t\t$include_data = \"\r\n\trequire_once dirname(dirname(dirname(__FILE__))).\\\"/Settings.php\\\";\";\r\n\t\t\t\r\n\t\tif ($_SESSION['version'] == \"socialengine\")\r\n\t\t\t$include_data = \"\r\n\trequire_once dirname(dirname(dirname(__FILE__))).\\\"/include/database_config.php\\\";\";\r\n\t\t\t\r\n\t\tif ($_SESSION['version'] == \"dzoic\")\r\n\t\t\t$include_data = \"\r\n\trequire_once dirname(dirname(dirname(__FILE__))).\\\"/includes/config/config.inc.php\\\";\";\r\n\t\t\t\r\n\t\tif ($_SESSION['version'] == \"ipboard\")\r\n\t\t\t$include_data = \"\r\n\trequire_once dirname(dirname(dirname(__FILE__))).\\\"/conf_global.php\\\";\";\r\n\t\t\t\r\n\t\tif ($_SESSION['version'] == \"jcow\")\r\n\t\t\t$include_data = \"\r\n\t\\$_REQUEST['p'] = \\\"feed\\\";\r\n\tchdir(dirname(dirname(dirname(__FILE__))));\r\n\trequire_once dirname(dirname(dirname(__FILE__))).\\\"/includes/boot.inc.php\\\";\r\n\tchdir(dirname(__FILE__));\";\r\n\r\n\t\tif ($_SESSION['version'] == \"osdate\")\r\n\t\t\t$include_data = \"\r\n\tsession_start();\";\r\n\t\t\t\r\n\t\tif ($_SESSION['version'] == \"jomsocial\")\r\n\t\t\t$include_data = \"\r\n\tdefine('_JEXEC',1);\r\n\tdefine('DS',DIRECTORY_SEPARATOR);\r\n\tdefine('JPATH_BASE',dirname(dirname(dirname(__FILE__))));\r\n\trequire_once dirname(dirname(dirname(__FILE__))).'/includes/defines.php';\r\n\trequire_once dirname(dirname(dirname(__FILE__))).'/includes/framework.php';\r\n\t\\$mainframe =& JFactory::getApplication('site');\r\n\t\\$mainframe->initialise();\";\r\n\r\n\t\tif ($_SESSION['version'] == \"joomla\")\r\n\t\t\t$include_data = \"\r\n\tdefine('_JEXEC',1);\r\n\tdefine('DS',DIRECTORY_SEPARATOR);\r\n\tdefine('JPATH_BASE',dirname(dirname(dirname(__FILE__))));\r\n\trequire_once dirname(dirname(dirname(__FILE__))).'/includes/defines.php';\r\n\trequire_once dirname(dirname(dirname(__FILE__))).'/includes/framework.php';\r\n\t\\$mainframe =& JFactory::getApplication('site');\r\n\t\\$mainframe->initialise();\";\r\n\r\n\t\tif ($_SESSION['version'] == \"oxwall\")\r\n\t\t\t$include_data = \"\r\n\tdefine('_OW_', true);\r\n\tdefine('DS', DIRECTORY_SEPARATOR);\r\n\tdefine('OW_DIR_ROOT', dirname(dirname(dirname(__FILE__))) . DS);\r\n\trequire_once(OW_DIR_ROOT . 'ow_includes' . DS . 'init.php');\r\n\tOW::getSession()->start();\";\r\n\r\n\t\tif ($_SESSION['version'] == \"cbuilder\")\r\n\t\t\t$include_data = \"\r\n\tdefine('_JEXEC',1);\r\n\tdefine('DS',DIRECTORY_SEPARATOR);\r\n\tdefine('JPATH_BASE',dirname(dirname(dirname(__FILE__))));\r\n\trequire_once dirname(dirname(dirname(__FILE__))).'/includes/defines.php';\r\n\trequire_once dirname(dirname(dirname(__FILE__))).'/includes/framework.php';\r\n\t\\$mainframe =& JFactory::getApplication('site');\r\n\t\\$mainframe->initialise();\";\r\n\r\n\t\tif ($_SESSION['version'] == \"standalone\")\r\n\t\t\t$include_data = \"\";\r\n\t\t\t\r\n\t\t$stringData = \"<?php \r\n\r\n\t/*\r\n\t|| #################################################################### ||\r\n\t|| # ArrowChat # ||\r\n\t|| # ---------------------------------------------------------------- # ||\r\n\t|| # Copyright ©2010-2012 ArrowSuites LLC. All Rights Reserved. # ||\r\n\t|| # This file may not be redistributed in whole or significant part. # ||\r\n\t|| # ---------------- ARROWCHAT IS NOT FREE SOFTWARE ---------------- # ||\r\n\t|| # http://www.arrowchat.com | http://www.arrowchat.com/license/ # ||\r\n\t|| #################################################################### ||\r\n\t*/\r\n\r\n\t// Require any necessary external files for retrieving the user's session\r\n\";\r\n\t\t\r\n\t\t$stringData .= $include_data;\r\n\t\t\r\n\t\t$stringData .= \"\r\n\t\t\r\n\t/**\r\n\t * The database information\r\n\t *\r\n\t * Your existing users and information should already be in this database. Do NOT create\r\n\t * a new database for ArrowChat.\r\n\t*/\";\r\n\t\t$stringData .= \"\r\n\tdefine('DB_SERVER','\" . $_SESSION['db_host'] . \"'); \r\n\tdefine('DB_USERNAME','\" . $_SESSION['db_username'] . \"'); \r\n\tdefine('DB_PASSWORD','\" . $_SESSION['db_password'] . \"'); \r\n\tdefine('DB_NAME','\" . $_SESSION['db_name'] . \"');\";\r\n\t\r\n\t\t$stringData .= \"\t\r\n\t\t\r\n\t/**\r\n\t * The table prefix can be left blank. A quick example of what you should input here:\r\n\t *\r\n\t * Example - Pretend the following list are tables:\r\n\t * phpbb_friends\r\n\t * phpbb_threads\r\n\t * phpbb_users\r\n\t *\r\n\t * In the example above, the prefix would be phpbb_ because everything starts with it.\r\n\t *\r\n\t * Example - Pretend the following list are tables:\r\n\t * friends\r\n\t * threads\r\n\t * users\r\n\t *\r\n\t * In the example above, the prefix would be blank.\r\n\t*/\";\r\n\t\r\n\t\t$stringData .= \"\r\n\tdefine('TABLE_PREFIX','\" . $_SESSION['db_prefix'] . \"');\";\r\n\t\r\n\t\t$stringData .= \"\r\n\t\r\n\t/**\r\n\t * These variables will help automatically connect your existing website with ArrowChat. Please\r\n\t * review the descriptions below to better understand them. DO NOT INCLUDE THE PREFIX WITH THESE\r\n\t * VALUES!\r\n\t *\r\n\t * DB_USERTABLE\t\t \t\t= The name of the user's table\r\n\t * DB_USERTABLE_USERID \t\t= The field for the user ID in the user's table\r\n\t * DB_USERTABLE_NAME \t\t= The field for the username in the user's table\r\n\t * DB_USERTABLE_AVATAR \t\t= The field for the avatar (input the user ID field if none exists)\r\n\t *\r\n\t * DB_FRIENDSTABLE\t \t\t= (Optional) The name of the friend's table\r\n\t * DB_FRIENDSTABLE_USERID\t= (Optional) The field for the user ID in the friend's table\r\n\t * DB_FRIENDSTABLE_FRIENDID\t= (Optional) The field for the relationship/friend ID in the firned's table\r\n\t * DB_FRIENDSTABLE_FRIENDS\t= (Optional) The field to check if the users are friends\r\n\t *\r\n\t * All the friends stuff is optional. If your site does not have a friend's system, leave the\r\n\t * values blank and change the no friend system value.\r\n\t */\";\r\n\t \r\n\t\t$stringData .= \"\r\n\tdefine('DB_USERTABLE','\" . $_SESSION['config_table_user'] . \"'); \r\n\tdefine('DB_USERTABLE_NAME','\" . $_SESSION['config_field_username'] . \"'); \r\n\tdefine('DB_USERTABLE_USERID','\" . $_SESSION['config_field_userid'] . \"'); \r\n\tdefine('DB_USERTABLE_AVATAR','\" . $_SESSION['config_field_avatar'] . \"'); \r\n\t\r\n\tdefine('DB_FRIENDSTABLE','\" . $_SESSION['config_table_friends'] . \"'); \r\n\tdefine('DB_FRIENDSTABLE_USERID', '\" . $_SESSION['config_field_friend_userid'] . \"'); \r\n\tdefine('DB_FRIENDSTABLE_FRIENDID', '\" . $_SESSION['config_field_friendid'] . \"'); \r\n\tdefine('DB_FRIENDSTABLE_FRIENDS', '\" . $_SESSION['config_field_friend_check'] . \"');\";\r\n\t\r\n\t\t$stringData .= \"\r\n\t\r\n\t/**\r\n\t * Friend System\r\n\t *\r\n\t * If your website does not have a friend system (ex: you want to display all online users) then\r\n\t * change the value below from 0 to 1.\r\n\t*/\";\r\n\t\r\n\t\t$stringData .= \"\r\n\tdefine('NO_FREIND_SYSTEM', '\" . $no_friend_system . \"');\";\r\n\t\r\n\t\t$stringData .= \"\r\n\t\r\n\t/**\r\n\t * MSSQL Database\r\n\t *\r\n\t * If your database is MSSQL then change the value below from 0 to 1.\r\n\t*/\";\r\n\t\r\n\t\t$stringData .= \"\r\n\tdefine('MSSQL_DATABASE', '\" . $_SESSION['db_type'] . \"');\";\r\n\t\r\n\t\t$stringData .= \"\r\n\t\t\r\n\t// DO NOT EDIT BELOW THIS POINT\r\n\t// Initiate a connection to the database\r\n\tif (MSSQL_DATABASE == 1)\r\n\t\t\\$db = new QuickMSDB(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME, false, false);\r\n\telse\r\n\t\t\\$db = new QuickDB(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME, false, false);\r\n\r\n?>\";\r\n\t\t// Rename old Config File\r\n\t\tif (file_exists(dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . \"includes\" . DIRECTORY_SEPARATOR . \"config.php\"))\r\n\t\t{\r\n\t\t\trename(dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . \"includes\" . DIRECTORY_SEPARATOR . \"config.php\", dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . \"includes\" . DIRECTORY_SEPARATOR . \"config.old.\" . time() . \".php\");\r\n\t\t}\r\n\t\t\r\n\t\t// Write new Config File\r\n\t\t$myFile = dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . \"includes\" . DIRECTORY_SEPARATOR . \"config.new.php\";\r\n\t\t$fh = fopen($myFile, 'w') or die(\"Can't open includes/config.new.php file. Please make this file writable.\");\r\n\t\tfwrite($fh, $stringData);\r\n\t\tfclose($fh);\r\n\t\t\r\n\t\t// Rename new Config File to config.php\r\n\t\trename(dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . \"includes\" . DIRECTORY_SEPARATOR . \"config.new.php\", dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . \"includes\" . DIRECTORY_SEPARATOR . \"config.php\");\r\n\t}", "public function createWPConfigFile() {\n $config = $this->config;\n\n // 1) Take sample config and replace defines (mysql connection)\n $wp_config = file_get_contents(\"$this->infected_wp/wp-config-sample.php\");\n foreach ($config['defines'] as $c => $val) {\n $escaped_val = str_replace(['$'], ['\\$'], $val);\n $wp_config = preg_replace(str_replace(\"::var::\", $c, $this->regex_define), '${1}' . $escaped_val . \"'\", $wp_config);\n }\n\n // 2) Update prefix\n $wp_config = preg_replace($this->regex_prefix, '${1}' . $config['table_prefix'], $wp_config);\n\n // 3) Create new wp-config file in clean version\n file_put_contents(\"$this->cleanup_wp/wp-config.php\", $wp_config);\n\n }", "function create_barnyard2_conf($id, $if_real, $snort_uuid) {\n\tglobal $config, $g;\n\n\tif (!file_exists(\"/usr/local/etc/snort/snort_{$snort_uuid}_{$if_real}/barnyard2.conf\"))\n\t\texec(\"/usr/bin/touch /usr/local/etc/snort/snort_{$snort_uuid}_{$if_real}/barnyard2.conf\");\n\n\tif (!file_exists(\"/var/log/snort/snort_{$if_real}{$snort_uuid}/barnyard2/{$snort_uuid}_{$if_real}.waldo\")) {\n\t\t@touch(\"/var/log/snort/snort_{$if_real}{$snort_uuid}/barnyard2/{$snort_uuid}_{$if_real}.waldo\");\n\t\tmwexec(\"/bin/chmod 770 /var/log/snort/barnyard2/{$snort_uuid}_{$if_real}.waldo\", true);\n\t}\n\n\t$barnyard2_conf_text = generate_barnyard2_conf($id, $if_real, $snort_uuid);\n\n\t/* write out barnyard2_conf */\n\t@file_put_contents(\"/usr/local/etc/snort/snort_{$snort_uuid}_{$if_real}/barnyard2.conf\", $barnyard2_conf_text);\n}", "public function _create_db_config()\n {\n $dbdata = read_file('./application/config/database.php');\n $dbdata = str_replace('db_name', $this->input->post('set_database'), $dbdata);\n $dbdata = str_replace('db_user', $this->input->post('set_db_user'), $dbdata);\n $dbdata = str_replace('db_pass', $this->input->post('set_db_pass'), $dbdata);\n $dbdata = str_replace('db_host', $this->input->post('set_hostname'), $dbdata);\n write_file('./application/config/database.php', $dbdata);\n }", "public function saveConfiguration()\n {\n // write the formatted config file to the path\n file_put_contents(self::$config_path, $this->app['utils']->JSONFormat(self::$config));\n $this->app['monolog']->addDebug('Save configuration to '.basename(self::$config_path));\n }", "protected function configure()\n {\n $this->setDescription('Add a server to the config file');\n }", "private function createConfigDir() : self\n {\n\n // Short way.\n if (file_exists('config/') === true) {\n return $this;\n }\n\n // Create dir.\n mkdir('config/');\n\n // Create empty personal configuration file.\n $pointer = fopen('config/.config.php', 'w');\n fputs($pointer, $this->getPhpHeader());\n fclose($pointer);\n\n return $this;\n }", "private function configServer(){\n if($this->source===\"local\"){\n \n }elseif($this->source===\"external\"){\n \n }elseif($this->source===\"s3\"){\n $this->server=new S3($this->accessKey,$this->secretKey,$this->isSSL,$this->domain);\n }\n \n }", "public function writeBaseConfiguration()\n {\n if (! $this->files->exists($this->path())) {\n $this->write([\n 'sites' => []\n ]);\n }\n }", "private static function saveConf()\n {\n /** @var array $constants */\n $constants = \\get_defined_constants(true);\n\n /** @var array $conf_data */\n $conf_data['constants'] = $constants['user'];\n $conf_data['conf'] = self::$conf;\n\n \\file_put_contents(self::$saveFile, \\serialize($conf_data), LOCK_EX);\n }", "public function writeInstanceConfig($file)\n\t{\n\t\t/* Use $this->writePlaceholderDBIri() in order to write a placeholder\n\t\t * database connection constant to the file. The minimum required is:\n\t\t */\n\t\t$this->writePlaceholderDBIri($file);\n\t\t/* Which will write a commented-out constant named MODULENAME_DB with a\n\t\t * a sample mysql connection string. You can override the default constant,\n\t\t * database name, scheme and query string:\n\t\t */\n\t\t$this->writePlaceholderDBIri($file, 'TEST_DATABASE', 'testdb', 'pgsql', 'autoconnect=1&reconnectquietly=0');\n\t\t/* You can also write directly to appconfig.php too: */\n\t\tfwrite($file, \"/* Define this to enable frobbing of the widgets: */\\n\");\n\t\tfwrite($file, \"/* define('FROB_WIDGETS', true); */\\n\");\n\t}", "private function addConfigFileName()\n {\n $config = $this->app['config']->get('neptrox', []);\n $this->app['config']->set('neptrox', array_merge($config, [\n 'product-basket-config' => $this->config_file_name\n ]));\n\n }", "abstract public function generateConfiguration();", "private function saveConfig () {\n\n\t// create output\n\t$content = '<?php'.chr(10);\n\t$content.= '/* This file has been created automatically by TS_Admin */'.chr(10);\n\t$content.= '$configs = array('.chr(10);\n\tforeach ($this->content as $index => $value) {\n\n\t // handle arrays\n\t if (is_array($value)) {\n\n\t\t$cache = '';\n\t\tforeach ($value as $in => $val) {\n\t\t if ($val === true OR $val === 'true') {\n\t\t\t$cache.= ',\"'.$in.'\" => true';\n\t\t } elseif ($val === false OR $val === 'false') {\n\t\t\t$cache.= ',\"'.$in.'\" => false';\n\t\t } elseif (is_numeric($val)) {\n\t\t\t$cache.= ',\"'.$in.'\" => '.$val;\n\t\t } else {\n\t\t\t$cache.= ',\"'.$in.'\" => \"'.$val.'\"';\n\t\t }\n\t\t}\n\n\t\t$content.= ' \"'.$index.'\" => array('.substr($cache, 1).'),'.chr(10);\n\t\tcontinue;\n\t }\n\n\t // add to output\n\t $content.= ' \"'.$index.'\" => ';\n\t if ($value === true OR $value === 'true') {\n\t\t$content.= 'true';\n\t } elseif ($value === false OR $value === 'false') {\n\t\t$content.= 'false';\n\t } elseif (is_numeric($value)) {\n\t\t$content.= $value;\n\t } else {\n\t\t$content.= '\"'.$value.'\"';\n\t }\n\t $content.= ','.chr(10);\n\t}\n\t$content = substr($content, 0, (strlen($content) - 2)).chr(10);\n\t$content.= '); ?>'; ?><?php\n\n\t// write output in file\n\t$file = @fopen($this->getPath(), 'w');\n\tif (!$file) {\n\t echo 'Config-file \"config.php\" couldn\\'t be written to!';\n\t exit;\n\t}\n\tfwrite($file, $content);\n\t@fclose($file);\n\n\t// update config\n\t$this->readConfig(true);\n\n\treturn true;\n }", "function saveConfFile($outPath) {\n if (!preg_match('/\\.conf$/', $outPath)) $outPath .= '.conf';\n\n // set up config shell\n $c = new Config();\n $root =& $c->getRoot();\n\n // add all values as sections\n $logSec =& $root->createSection('LogFile');\n $logSec->createDirective('LogFilePath', $this->LogFilePath);\n $logSec->createDirective('LogSessIDColumn', $this->LogSessIDColumn);\n $logSec->createDirective('LogURLColumn', $this->LogURLColumn);\n $logSec->createDirective('LogRefColumn', $this->LogRefColumn);\n\t\t$logSec->createDirective('LogDTSColumn', $this->LogDTSColumn); \n\t\t$logSec->createDirective('LogUAColumn', $this->LogUAColumn); \n\t\t$logSec->createDirective('LogVHostColumn', $this->LogVHostColumn); \n\t\t$logSec->createDirective('LogStatusColumn', $this->LogStatusColumn); \n\n foreach ($this->AcceptHTTPCodes as $code) {\n $cleanSec->createDirective('AcceptHTTPCodes', $code);\n }\n\t\tforeach ($this->SkipBotUATokens as $code) {\n\t\t\t$cleanSec->createDirective('SkipBotUATokens', $code);\n\t\t}\n\t\tforeach ($this->SkipExts as $code) {\n\t\t\t$cleanSec->createDirective('SkipExts', $code);\n\t\t}\n\t\tforeach ($this->SkipURLs as $code) {\n\t\t\t$cleanSec->createDirective('SkipURLs', $code);\n\t\t}\n\t\t$cleanSec->createDirective('SkipNonDeclaredHosts', $this->SkipNonDeclaredHosts);\n\t\tforeach ($this->IndexPages as $code) {\n\t\t\t$cleanSec->createDirective('IndexPages', $code);\n\t\t}\n\t\t$cleanSec->createDirective('Domain', $this->Domain);\n\t\tforeach ($this->HostAliases as $code) {\n\t\t\t$cleanSec->createDirective('HostAliases', $code);\n\t\t}\n\t\t$cleanSec->createDirective('URLAliasFile', $this->URLAliasFile);\n\t\t$cleanSec->createDirective('ReferrerFilterMode', $this->ReferrerFilterMode);\n\n $reportsSec =& $root->createSection('Reports');\n\t\t$reportsSec->createDirective('GraphNReferrerPairs', $this->GraphNReferrerPairs);\n\t\t$reportsSec->createDirective('GraphNSessions', $this->GraphNSessions);\n\t\t$reportsSec->createDirective('OutputDir', $this->OutputDir);\n\t\t$reportsSec->createDirective('ContinuousMode', $this->ContinuousMode);\n\t\tforeach ($this->SessionRequireURLs as $url) {\n\t\t\t$cleanSec->createDirective('SessionRequireURLs', $url);\n\t\t}\n\n // write out\n $result = $c->writeConfig($outPath, STATVIZ_CONF_TYPE);\n if (PEAR::isError($result)) {\n die(\"Error writing configuration: \" . $result->getMessage() . \"\\n\" . $result->getUserInfo() . \"\\n\");\n }\n\n print \"Wrote conf file to $outPath.\\n\";\n }", "public function createPathconfig()\n\t{\n\t\t// Check if we have the file\n\t\tif (file_exists(TL_ROOT . '/system/config/pathconfig.php'))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// Check localconfig\n\t\tif(!file_exists(TL_ROOT . '/system/config/localconfig.php'))\n\t\t{\n\t\t\tthrow new Exception('Missing localconfig.php');\n\t\t}\n\t\t\n\t\t// Check tmp\n\t\tif(!is_writable(TL_ROOT . '/system/tmp'))\n\t\t{\n\t\t\tthrow new Exception('\"/system/tmp\" is not writable.');\n\t\t}\n\n\t\t// Write file\n\t\ttry\n\t\t{\n\t\t\t$objFile = new File('system/config/pathconfig.php');\n\t\t\t\n\t\t\t// Check if we have the path\n\t\t\tif(TL_PATH === null || TL_PATH == \"\")\n\t\t\t{\t\n\t\t\t\t$objFile->write(\"<?php\\n\\n// Relative path to the installation\\nreturn '\" . preg_replace('/\\/ctoCommunication.php\\?.*$/i', '', Environment::getInstance()->requestUri) . \"';\\n\");\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$objFile->write(\"<?php\\n\\n// Relative path to the installation\\nreturn '\" . TL_PATH . \"';\\n\");\n\t\t\t}\n\t\t\t\n\t\t\t$objFile->close();\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tlog_message($e->getMessage());\n\t\t\tthrow $e;\n\t\t}\n\t\t\n\t\t// All done\n\t\treturn true;\n\t}", "public function generateConfigFile($path)\n {\n $config = ConfigCachingService::getConfigJson();\n if ($config === '{}') {\n $this->line('No config specified. Config not written to file.');\n return;\n }\n\n $contents = 'Config.addConfig(' . $config . ');';\n\n File::put($path, $contents);\n\n $this->line(\"Generated $path\");\n }", "function saveConfiguration () {\n\n $config = (array)Configure::getInstance();\n\n $code = \"<?php \\n \";\n $code .= '$config = '.var_export($config, true).';';\n\n file_put_contents(CONFIGS.'settings.php', $code);\n }", "protected function createCypressConfig(): void\n {\n $config = [];\n $configExists = $this->files->exists($this->cypressConfigPath());\n\n if ($configExists) {\n $config = json_decode($this->files->get($this->cypressConfigPath()), true);\n }\n\n $this->files->put(\n $this->cypressConfigPath(),\n json_encode($this->mergeCypressConfig($config), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)\n );\n\n $this->status($configExists ? 'Updated' : 'Created', $this->cypressConfigPath(false));\n }", "protected function buildExtConfTemplate()\r\n {\r\n // Generates ext_conf_template.txt\r\n $fileContents = $this->generateFile('extConfTemplate.txtt');\r\n GeneralUtility::writeFile($this->extensionDirectory . 'ext_conf_template.txt', $fileContents);\r\n }", "protected function UpdateConfigaration()\n { \n $file = fopen(base_path().'/'.'config/setup.php','w');\n $text = \" <?php \\n\\n/* \\n* Application Setup Done \\n* @Developer: Sm Shahjalal Shaju \\n * Email: shajushahjalal@gmail.com \\n*/\\n\";\n $text .= \"return[ \\n \\t'version' => '1.0.0',\\n];\"; \n fwrite($file,$text);\n fclose($file);\n\n\n }", "private function write_config($config_array, $path){\n onapp_debug(__CLASS__.' :: '.__FUNCTION__);\n onapp_debug('params : $config_array => '. print_r($config_array, true). '$path => '.$path );\n\n $content = '';\n foreach ( $config_array as $key=>$value )\n $content .= \"$key=$value\".\"\\n\";\n\n onapp_debug('New config file content => ' .$content );\n\n if ( !$handle = fopen($path, 'w') )\n $error = 'CONFIG_FILE_NOT_WRITABLE';\n else if ( ! fwrite($handle, $content) )\n $error = 'CONFIG_FILE_NOT_WRITABLE';\n else\n fclose($handle);\n\n if ( isset( $error ) )\n return $error;\n }", "function generateConf($file) {\n global $version,$amp_conf,$astman;\n foreach ($this->get_filename() as $f){\n\t\t\tif(!file_exists($amp_conf['ASTETCDIR'] . \"/$f\")) {\n\t\t\t\ttouch($amp_conf['ASTETCDIR'] . \"/$f\");\n\t\t\t}//if\n\t\t}//foreach\n\t\tswitch($file) {\n\t\t\tcase extensions_additional.conf:\n\t\t\t\treturn $this->generate_extensions_conf($version);\n break;\n\t\t}//switch\n\t}", "public function createStandaloneConfiguration() : bool\n {\n $retval = false;\n\n if ($this->apache_config_path) {\n $file = new CApacheStandaloneFile($this, $this->nb_server, $this->nb_site);\n $file->create();\n $file->exportToFile($this->apache_config_path . DIRECTORY_SEPARATOR . self::APACHE_CONFIG_FILENAME);\n $retval = true;\n }\n\n return $retval;\n }", "public function writeConfig ()\r\n\t{\r\n\t\t$config = new Zend_Config_Ini(CONFIG_DIR . '/database.default.ini', NULL,\r\n\t\tarray(\r\n\t\t\t'allowModifications' => true));\r\n\t\t// load all the values from the variables in this class\n\t\t$config->production->database->params->host = $this->_host;\r\n\t\t$config->production->database->params->username = $this->_username;\r\n\t\t$config->production->database->params->password = $this->_password;\r\n\t\t$config->production->database->params->dbname = $this->_dbname;\r\n\t\t$config->production->database->adapter = $this->_driver;\r\n\t\t$writer = new Zend_Config_Writer_Ini(\r\n\t\tarray(\r\n\t\t\t'config' => $config,\r\n\t\t\t'filename' => CONFIG_DIR . '/database.ini'));\r\n\t\tif ($writer->write())\r\n\t\t\treturn TRUE;\r\n\t\telse\r\n\t\t\treturn FALSE;\r\n\t}", "function copy_gen_config($gen_config) {\n\t$install_path = getcwd();\n\t$data = file_get_contents(\"config.gen.copy.inc.php\");\n\t$data = str_replace(\"/path/to/install/\", $install_path.\"/\", $data);\n\t$fp = fopen($gen_config, \"w\");\n\tfwrite($fp, $data);\n\tfclose($fp);\n\tsystem(\"chmod 664 \".$gen_config);\n\techo(\"Default configuration in \".$gen_config.\" copied...\");\n}", "static public function make_site_config() {\n\t\t$config = SiteConfig::create();\n\t\t$config->write();\n\t\treturn $config;\n\t}", "function write_config(array $system = []) {\n // Force underscore between prefix and cookie name\n if (!empty($system['cookie_prefix'])) {\n $cookie_prefix_last = $system['cookie_prefix'][strlen($system['cookie_prefix']) - 1];\n if ($cookie_prefix_last != \"_\") {\n $system['cookie_prefix'] = $system['cookie_prefix'].\"_\";\n }\n }\n if (!empty($system['db_prefix'])) {\n $cookie_prefix_last = $system['db_prefix'][strlen($system['db_prefix']) - 1];\n if ($cookie_prefix_last != \"_\") {\n $system['db_prefix'] = $system['db_prefix'].\"_\";\n }\n }\n $config = \"<?php\\n\";\n $config .= \"// database settings\\n\";\n $config .= \"\\$db_host = '\".$system['db_host'].\"';\\n\";\n if (!empty($system['db_port']) && $system['db_port'] !== 3306) {\n $config .= \"\\$db_port = '\".$system['db_port'].\"';\\n\";\n }\n $config .= \"\\$db_user = '\".$system['db_user'].\"';\\n\";\n $config .= \"\\$db_pass = '\".$system['db_pass'].\"';\\n\";\n $config .= \"\\$db_name = '\".$system['db_name'].\"';\\n\";\n $config .= \"\\$db_prefix = '\".$system['db_prefix'].\"';\\n\";\n $config .= \"\\$db_driver = '\".$system['db_driver'].\"';\\n\";\n $config .= \"define(\\\"DB_PREFIX\\\", \\\"\".$system['db_prefix'].\"\\\");\\n\";\n $config .= \"define(\\\"COOKIE_PREFIX\\\", \\\"\".$system['cookie_prefix'].\"\\\");\\n\";\n $config .= \"define(\\\"SECRET_KEY\\\", \\\"\".$system['secret_key'].\"\\\");\\n\";\n $config .= \"define(\\\"SECRET_KEY_SALT\\\", \\\"\".$system['secret_key_salt'].\"\\\");\\n\";\n if (write_file(BASEDIR.'config_temp.php', $config)) {\n return TRUE;\n }\n\n return FALSE;\n}", "private static function createINIConfig($path, $name){\n\t\tif(file_exists($path.'app/config/config.ini')==false){\n\t\t\t$str =\t'[database]'.PHP_EOL.\n\t\t\t'adapter = Mysql'.PHP_EOL.\n\t\t\t'host = \"127.0.0.1\"'.PHP_EOL.\n\t\t\t'username = \"root\"'.PHP_EOL.\n\t\t\t'password = \"\"'.PHP_EOL.\n\t\t\t'name = \"test_db\"'.PHP_EOL.\n\t\t\t''.PHP_EOL.\n\t\t\t'[phalcon]'.PHP_EOL.\n\t\t\t'controllersDir = \"../app/controllers/\"'.PHP_EOL.\n\t\t\t'modelsDir = \"../app/models/\"'.PHP_EOL.\n\t\t\t'viewsDir = \"../app/views/\"'.PHP_EOL.\n\t\t\t'baseUri = \"/'.$name.'/\"'.PHP_EOL;\n\t\t\tfile_put_contents($path.'app/config/config.ini', $str);\n\t\t}\n\t}", "function DHCP_writePXEcfg($clientName, $clientID, $arch)\n{\n\tinclude('/m23/inc/kernelRamDisk.inc');\n\t$iphex=DHCP_calcPXEIP(CLIENT_getIPbyName($clientName));\n\t$fileName = \"/m23/tftp/pxelinux.cfg/$iphex\";\n\t$m23server = getServerIP();\n\t\n\t$fp=fopen($fileName, \"w\");\n\n\tif (!($fp > 0))\n\t\t die(\"Cannot open /m23/tftp/pxelinux.cfg/$iphex!\");\n\n\tfputs($fp,\"LABEL linux\\n\");\n\t\n\t// Old PXELINUX (2004)\n/*\tfputs($fp,\"KERNEL m23pxeinstall-$arch\\n\");\n\tfputs($fp,\"APPEND devfs=nomount vga=normal load_ramdisk=1 m23server=$m23server m23clientID=$clientID prompt_ramdisk=0 ramdisk_size=$kernelRamDisk initrd=initrd-$arch.gz root=/dev/ram0 rw\\n\");*/\n\n\t// New PXELINUX (2014)\n\tfputs($fp,\"DEFAULT m23pxeinstall-$arch devfs=nomount vga=normal load_ramdisk=1 m23server=$m23server m23clientID=$clientID prompt_ramdisk=0 ramdisk_size=$kernelRamDisk initrd=initrd-$arch.gz root=/dev/ram0 rw\\n\");\n\n\n\tfclose($fp);\n\tchmod($fileName, 0755);\n}", "public function createEnvTestingFile() {\n $config = $this->client->getConfig();\n $workingdir = Client::getAbsPath();\n $wproot = Config::WPROOT;\n\n $env = [];\n $env[] = \"WP_ROOT_FOLDER=\\\"{$wproot}\\\"\";\n $env[] = 'TEST_SITE_WP_ADMIN_PATH=\"/wp-admin\"';\n $env[] = \"TEST_SITE_DB_NAME=\\\"{$config->acceptance_dbname}\\\"\";\n $env[] = \"TEST_SITE_DB_HOST=\\\"{$config::$mysqlc}\\\"\";\n $env[] = 'TEST_SITE_DB_USER=\"root\"';\n $env[] = 'TEST_SITE_DB_PASSWORD=\"root\"';\n $env[] = 'TEST_SITE_TABLE_PREFIX=\"wp_\"';\n $env[] = \"TEST_DB_NAME=\\\"{$config->integration_dbname}\\\"\";\n $env[] = \"TEST_DB_HOST=\\\"{$config::$mysqlc}\\\"\";\n $env[] = 'TEST_DB_USER=\"root\"';\n $env[] = 'TEST_DB_PASSWORD=\"root\"';\n $env[] = 'TEST_TABLE_PREFIX=\"wp_\"';\n $env[] = \"TEST_SITE_WP_URL=\\\"http://{$config->container}\\\"\";\n $env[] = \"TEST_SITE_WP_DOMAIN=\\\"http://{$config->container}\\\"\";\n $env[] = \"TEST_SITE_WP_URL_NO_SCHEME=\\\"{$config->container}\\\"\";\n $env[] = 'TEST_SITE_ADMIN_EMAIL=\"admin@example.com\"';\n $env[] = 'TEST_SITE_ADMIN_USERNAME=\"root\"';\n $env[] = 'TEST_SITE_ADMIN_PASSWORD=\"root\"';\n $env[] = \"SELENOID_HOST=\\\"{$config::$selenoidc}\\\"\";\n $env[] = \"SELENOID_PORT={$config::$selenoidPort}\";\n\n $this->filePutContents(\"{$workingdir}/.env.testing\", join(\"\\n\", $env));\n }", "public function generateConfig()\n {\n trigger_deprecation('kunstmaan/generator-bundle', '6.2', 'Method \"%s\" is deprecated and will be removed.', __METHOD__);\n\n if ($this->isSymfony4()) {\n return;\n }\n\n $configFile = $this->rootDir . '/app/config/config.yml';\n $config = file_get_contents($configFile);\n\n $data = Yaml::parse($config);\n if (!array_key_exists('white_october_pagerfanta', $data)) {\n $ymlData = \"\\n\\nwhite_october_pagerfanta:\";\n $ymlData .= \"\\n default_view: twitter_bootstrap\\n\";\n file_put_contents($configFile, $ymlData, FILE_APPEND);\n }\n }", "public function save()\n {\n $filepath = $this->getFilepath();\n $this->validateConfig($this->rules, $this->configData);\n $fileSystem = $this->createNew(FileSystem::class);\n $fileSystem->filePutContents($filepath, json_encode($this->configData, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));\n }", "public function getConfigFileName();", "protected function configurationFile()\n {\n return is_local_envorioment() ? base_path('resources/stubs/webserver') : '/etc/nginx/sites-availables/default';\n }", "public function creaFileConfig() {\n\n $file = fopen('./include/installazione.php', 'r+');\n fread($file, filesize('./include/installazione.php') - 2);\n $metodo_set = \"\\n private function setDBConfig() {\\n\" .\n \"$\" . \"this->dbConfig['username'] ='\" . $this->_datiSetup['userDb'] . \"';\\n\" .\n \"$\" . \"this->dbConfig['password'] ='\" . $this->_datiSetup['passwordDb'] . \"';\\n\" .\n \"$\" . \"this->dbConfig['host'] ='\" . $this->_datiSetup['host'] . \"';\\n\" .\n \"$\" . \"this->dbConfig['dbname'] ='sanitapp';\\n\" .\n \"}\\n\" .\n \"\\n private function setEmailConfig(){\\n\" .\n \"$\" . \"this->emailConfig['header']= 'From:SanitApp <sanitapp@site.com>';\\n\" .\n \"$\" . \"this->emailConfig['host']='\" . $this->_datiSetup['smtp'] . \"';\\n\" .\n \"$\" . \"this->emailConfig['SMTPSecure']='tls';\\n\" .\n \"$\" . \"this->emailConfig['port']=587;\\n\" .\n \"$\" . \"this->emailConfig['SMTPAuth']=TRUE;\\n\" .\n \"$\" . \"this->emailConfig['username']='\" . $this->_datiSetup['email'] . \"';\\n\" .\n \"$\" . \"this->emailConfig['password']='\" . $this->_datiSetup['passwordEmail'] . \"';\\n\" .\n \"$\" . \"this->emailConfig['from']='\" . $this->_datiSetup['email'] . \"';\\n\" .\n \"$\" . \"this->emailConfig['fromname']='SanitApp';\\n\" .\n \"}\\n\" .\n \"}\";\n\n $scrittura = fputs($file, $metodo_set); //fputs ritorna un intero \n fclose($file);\n\n return $scrittura;\n }", "public function writeConfig()\n {\n if (!$this->shouldWrite()) {\n return;\n }\n\n $this->travisFileContents = $this->twig->render('.travis.yml.dist', $this->settings['travis']);\n $this->travisPhpIniContents = $this->twig->render('.travis.php.ini.dist');\n\n $this->output->writeln(\"\\n<info>Files for Travis integration have been written</info>\");\n }", "function ecrireConf($identifiant)\n {\n if(!ctype_alnum($identifiant)) \n {\n throw new PHPmanagerException(\"L'identifiant doit être alpha numérique !\");\n }\n\n if(!is_dir(PHP_PATH) || !is_writable(PHP_PATH))\n {\n throw new PHPmanagerException(\"Le chemin vers les pools PHP n'existe pas ou n'est pas accessible en écriture\");\n }\n\n file_put_contents(\n PHP_PATH . $identifiant. \".conf\",\n $this->genererConf($identifiant)\n );\n }", "private function createHostedFile(CNabuSite $nb_site)\n {\n $file = new CApacheHostedFile($this, $this->nb_server, $nb_site);\n $file->create();\n $path = $this->nb_server->getVirtualHostsPath()\n . DIRECTORY_SEPARATOR\n . $nb_site->getBasePath()\n . NABU_VHOST_CONFIG_FOLDER\n . DIRECTORY_SEPARATOR\n . $this->nb_server->getKey()\n ;\n if (!is_dir($path)) {\n mkdir($path, 0755, true);\n }\n if (!is_dir($path)) {\n throw new ENabuCoreException(ENabuCoreException::ERROR_FOLDER_NOT_FOUND, array($path));\n }\n $filename = $path . DIRECTORY_SEPARATOR . NABU_VHOST_CONFIG_FILENAME;\n $file->exportToFile($filename);\n }", "public function convertsettingsfileAction()\n {\n $writer = new \\Zend\\Config\\Writer\\Xml();\n\n $settings = json_decode(file_get_contents(getcwd() . '/config/settings.json'), true);\n $xml_content = $writer->processConfig($settings);\n file_put_contents(getcwd() . '/config/settings.xml', $xml_content);\n echo \"File written\\n\";\n }", "public function createVirtualHost()\n {\n\n $this->checkEnvironment();\n\n $virtualHostFile = $this->getVirtualHostFilename();\n\n // Vhost must be unique\n if($this->_filesystem->exists($virtualHostFile)) {\n throw new IOException(sprintf(\"Host '%s' already exists\", $this->getProjectUniqueAlias()));\n }\n\n // Create virtual host config file using Templating\n $virtualHostContent = $this->_templating->render($this->getVirtualHostTemplate(), array(\n 'host_root' => $this->getProjectPath(),\n 'host_name' => $this->getProjectUniqueAlias() . '.' . $this->getDomain(),\n ));\n\n // Put it on\n file_put_contents($virtualHostFile, $virtualHostContent);\n\n }", "public function writeConfig($mode, $base, $domain)\n {\n\n $setup = file_get_contents(APPPATH.'config/example.setup.php');\n\n $setup = preg_replace(\"/(\\s*'mode' => )(.*?)(,)/\", \"$1\".$mode.'$3', $setup);\n\n $setup = preg_replace(\"/(\\s*'base_url' => ')(.*?)(',)/\", \"$1\".$base.'$3', $setup);\n\n $setup = preg_replace(\"/(\\s*'static_base_url' => ')(.*?)(',)/\", \"$1\".$domain.$base.'$3', $setup);\n\n $this->cli->write($this->cli->color(\"Writng - app/config/setup.php\", 'cyan'));\n\n file_put_contents(APPPATH.'config/setup.php', $setup);\n\n }", "function writeConfig($post) {\n\n $dbTemplatePath = \"config_templates/database.php\";\n $dbConfigPath = \"../application/config/database.php\";\n\n $configTemplatePath = \"config_templates/config.php\";\n $configPath = \"../application/config/config.php\";\n\n $db_file_contents = file_get_contents($dbTemplatePath);\n $config_file_contents = file_get_contents($configTemplatePath);\n\n $db_new_content = str_replace(\"%HOSTNAME%\", $post['db_host'], $db_file_contents);\n $db_new_content = str_replace(\"%USERNAME%\", $post['db_user'], $db_new_content);\n $db_new_content = str_replace(\"%PASSWORD%\", $post['db_password'], $db_new_content);\n $db_new_content = str_replace(\"%DATABASE%\", $post['db_name'], $db_new_content);\n \n\n $config_new_content = str_replace(\"%BASEURL%\", $post['base_url'], $config_file_contents);\n\n $dbFileHandle = fopen($dbConfigPath, \"w+\");\n $configFileHandle = fopen($configPath, \"w+\");\n\n // In case its not done manually\n @chmod($dbConfigPath, 0777);\n @chmod($configPath, 0777);\n\n if (is_writable($dbConfigPath) && is_writable($configPath)) {\n\n if (fwrite($dbFileHandle, $db_new_content)) {\n\n if (fwrite($configFileHandle, $config_new_content)) {\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n } else {\n return false;\n }\n }", "function generar_configuracion_servidor($cert_cliente, $headers = array(), $id_servicio='')\n\t{\n\t\t$this->crear_directorio_destino($this->proyecto->get_dir_instalacion_proyecto());\n\t\t$config = self::get_ini_server($this->proyecto, $this->get_id());\n\t\tif (! $config->existe_entrada('certificado')) {\n\t\t\t$cert = array();\n\t\t\t$cert['clave_servidor'] = $this->path_clave_privada();\t//Se utiliza la clave de todo el proyecto\n\t\t\t$cert['cert_servidor'] = $this->path_clave_publica();\t\t//Se utiliza el cert de todo el proyecto\n\t\t\t$config->agregar_entrada('certificado', $cert);\n\t\t}\n\t\t\n\t\t//Armo ID de cliente\n\t\t$nombre = self::generar_id_entrada_cliente($headers);\n\n\t\t//Guarda el certificado del cliente\n\t\t$directorio = $this->get_dir_proveedor($this->proyecto->get_dir_instalacion_proyecto(), $id_servicio);\n\t\t$nombre_archivo = toba_manejador_archivos::nombre_valido(str_replace('=', '_', $nombre));\n\t\tcopy($cert_cliente, $directorio.\"/$nombre_archivo.crt\");\n\t\t\n\t\t$datos = array();\n\t\t$datos['archivo'] = \"./$nombre_archivo.crt\";\n\t\t$contenido_certificado = file_get_contents($datos['archivo']);\n\t\t$datos['fingerprint'] = toba_firma_digital::certificado_get_fingerprint($contenido_certificado);\n\t\tif (! $config->existe_entrada($nombre)) {\n\t\t\t$config->agregar_entrada($nombre, $datos);\n\t\t} else {\n\t\t\t$config->set_datos_entrada($nombre, $datos);\n\t\t}\n\t\t\n\t\tif (! $config->existe_entrada('general', 'activo')) {\n\t\t\t$config->agregar_entrada('general', array('activo' => '0'));\t\t//Desactivo el WS por defecto\n\t\t}\n\t\t$config->guardar();\n\t}", "function copy_config_file( $dbname , $username , $password , $dbhost , $tableprefix ) {\n\t\t$password = addslashes( $password );\n\t\t$abs_url = get_absolute_url();\n\t\t$rel_url = get_relative_url();\n\t\t$config_sample = file( ABS_PATH . 'config-sample.php' );\n\n\t\tforeach ( $config_sample as $line_num => $line ) {\n\t\t\tswitch ( substr( $line , 0 , 16 ) ) {\n\t\t\t\tcase \"define('DB_NAME'\":\n\t\t\t\t\t$config_sample[ $line_num ] = str_replace( \"database_name\" , $dbname , $line );\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"define('DB_USER'\":\n\t\t\t\t\t$config_sample[ $line_num ] = str_replace( \"'username'\" , \"'$username'\" , $line );\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"define('DB_PASSW\":\n\t\t\t\t\t$config_sample[ $line_num ] = str_replace( \"'password'\" , \"'$password'\" , $line );\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"define('DB_HOST'\":\n\t\t\t\t\t$config_sample[ $line_num ] = str_replace( \"localhost\" , $dbhost , $line );\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"define('DB_TABLE\":\n\t\t\t\t\t$config_sample[ $line_num ] = str_replace( 'oc_' , $tableprefix , $line );\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"define('REL_WEB_\":\n\t\t\t\t\t$config_sample[ $line_num ] = str_replace( 'rel_here' , $rel_url , $line );\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"define('WEB_PATH\":\n\t\t\t\t\t$config_sample[ $line_num ] = str_replace( 'http://localhost' , $abs_url , $line );\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t$handle = fopen( ABS_PATH . 'config.php' , 'w' );\n\t\tforeach ( $config_sample as $line ) {\n\t\t\tfwrite( $handle , $line );\n\t\t}\n\t\tfclose( $handle );\n\t\tchmod( ABS_PATH . 'config.php' , 0666 );\n\t}", "private function saveConfigINI()\n\t{\n\t\t// Let's try writing our own\n\n\t\t/*$config_file = fopen($this->config_file, 'w');\n\n\t\t$timestamp = date('H:m, l d F Y');\n\t\tfwrite($config_file, \";<?php die(\\\"No access;\\\"); ?>\\n;File written by Cerenkov at $timestamp\\n\");\n\n\t\tforeach( $this->config_map as $section => $keys )\n\t\t{\n\t\t\tfwrite($config_file, \"[$section]\\n\");\n\t\t\tforeach( $keys as $key => $value )\n\t\t\t{\n\t\t\t\tfwrite($config_file, \"$key = \\\"$value\\\"\\n\");\n\t\t\t}\n\t\t\tfwrite($config_file, \"\\n\");\n\t\t}\n\n\t\tfclose($config_file);\n\t\t */\n\t}", "function genConfig(){\n\tglobal $config;\n\tif(file_exists($config['configfile'])){\n\t\t\tdie(\"Config file alread exists!\\n\");\n\t}\n\t$fi=fopen($_SERVER['PHP_SELF'],'r');\n\tif($fi===false) die(\"Error opening \".$_SERVER['PHP_SELF']);\n\t\n\t$fo=fopen($config['configfile'],'w');\n\tif($fo===false) die(\"Error opening \".$config['configfile']);\n\tfwrite($fo, \"<?php\\n\");\n\tfwrite($fo, \"/*\\n\");\n\tfwrite($fo, \" * This file contains the commented defaults. Feel free to delete\\n\");\n\tfwrite($fo, \" * the unused options. \\n\");\n\tfwrite($fo, \" */\\n\");\n\t\n\twhile(($l=fgets($fi,400))!== false){\n\t\tif (trim($l)=='$config=array();'){\n\t\t\tbreak;\n\t\t}\n\t}\n\twhile(($l=fgets($fi))!== false){\n\t\tif(trim($l)=='}' || trim($l)=='return $config;'){\n\t\t\tbreak;\n\t\t}\n\t\tfwrite($fo,preg_replace('/\\$config\\[[\\'\"]([^\\'\"]+)[\\'\"]\\]/','\\$$1',\"//\".trim($l)).\"\\n\");\n\t}\n\tfclose($fi);\n\tfclose($fo);\n}", "private function getServerConfigFile()\n\t{\n\t\tif (file_exists($this->getServerConfigFilePath(self::SERVER_CONFIG_FILE_HTACCESS))\n\t\t\t&& substr(strtolower($_SERVER['SERVER_SOFTWARE']), 0, 6) === 'apache')\n\t\t{\n\t\t\treturn self::SERVER_CONFIG_FILE_HTACCESS;\n\t\t}\n\n\t\t// We are not on an apache so lets just check whether the web.config file exits\n\t\tif (file_exists($this->getServerConfigFilePath(self::SERVER_CONFIG_FILE_WEBCONFIG)))\n\t\t{\n\t\t\treturn self::SERVER_CONFIG_FILE_WEBCONFIG;\n\t\t}\n\n\t\treturn self::SERVER_CONFIG_FILE_NONE;\n\t}", "public function makeFile() : void\n {\n $newEnv = file_get_contents(__DIR__ . '/../../../.env.example.php');\n $newEnv = str_replace([\n \"'APP_NAME' => 'Framework'\",\n \"'BASEPATH' => '/'\",\n \"'AUTOCOMPILE' => true\",\n \"'DB_NAME' => 'example'\",\n \"'DB_USERNAME' => 'root'\",\n \"'DB_PASSWORD' => ''\"\n ],\n [\n \"'APP_NAME' => '\".$this->appName.\"'\",\n \"'BASEPATH' => '\".$this->basePath.\"'\",\n \"'AUTOCOMPILE' => \". ($this->autoCompile === true ? 'true' : 'false'),\n \"'DB_NAME' => '\". $this->databaseName .\"'\",\n \"'DB_USERNAME' => '\". $this->databaseUsername .\"'\",\n \"'DB_PASSWORD' => '\". $this->databasePassword .\"'\",\n ], $newEnv);\n\n $env = fopen(__DIR__ . '/../../../.env.php', \"w\");\n fwrite($env, $newEnv);\n fclose($env);\n if ($this->autoCompile === false) {\n $firstCompile = new TemplateEngine();\n }\n }", "public function save()\n {\n $data = array();\n $data[] = \"; <?php die; ?>\";\n $data[] = \"; \";\n $data[] = \"; Liquid PHP Application Framework Configuration File\";\n $data[] = \"\";\n\n foreach($this->data as $a => $section)\n {\n $data[] = \"[\" . $a . \"]\";\n foreach($section as $b => $subsection)\n {\n foreach($subsection as $c => $value)\n {\n $data[] = $b . '.' . $c . '=\"' . $value . '\"';\n }\n }\n\n file_put_contents($this->filename, implode(\"\\r\\n\", $data));\n $this->requiresSave = false;\n }\n }", "private function writeConfig()\n {\n $dumpedData = $this->dumper->dump($this->optionsYAML, 2);\n foreach ($this->finder as $configFile) {\n /** @var SplFileInfo $configFile */\n $this->filesystem->dumpFile($configFile->getRealPath(), $dumpedData);\n }\n }", "function bistroEnvFile($post)\n{\n global $config;\n $newConfigFile = fopen($config['platformConfig'], \"w\") or die(\"Unable to write configuration file!\");\n $configList = '<?php\n define(\\'DB_PREFIX\\', \\''.$post['dbPrefix'].'\\');\n $'.'configDB[\\'dbHost\\'] = \\''.$post['dbHost'].'\\';\n $'.'configDB[\\'dbUser\\'] = \\''.$post['dbUser'].'\\';\n $'.'configDB[\\'dbPassword\\'] = \\''.$post['dbPassword'].'\\';\n $'.'configDB[\\'dbDatabase\\'] = \\''.$post['dbDatabase'].'\\';\n $'.'config[\\'themeColor\\'] = \\''.$post['themeColor'].'\\';\n $'.'config[\\'themeCustom\\'] = \\''.$post['themeCustom'].'\\';\n $'.'config[\\'themeBg\\'] = \\''.$post['themeBg'].'\\';\n $'.'config[\\'themeNavbar\\'] = \\''.$post['themeNavbar'].'\\';\n ';\n fwrite($newConfigFile, $configList);\n fclose($newConfigFile);\n}", "public function run()\n {\n Config::truncate();\n $data = [\n 'type' => ConfigType::SITE,\n 'value' => ['icon' => '', 'logo' => '', 'name' => '', 'title' => '', 'keywords' => '', 'description' => '', 'icp' => '']\n ];\n Config::create($data);\n }", "public function createEnv() : void\n {\n echo (copy(__DIR__ . '/../../../.env.example.php',__DIR__ . '/../../../.env.php')) ? \"ENV file generated\\n\" : \"Something went wrong..\";\n }", "function external_comments_saveconf() {\n global $external_comments_conf;\n $configfile=GSDATAOTHERPATH . 'external_comments.xml';\n\n $xml_root = new SimpleXMLElement('<settings></settings>');\n $xml_root->addchild('provider', $external_comments_conf['provider']);\n $xml_root->addchild('developer', $external_comments_conf['developer']);\n $xml_root->addchild('shortname', $external_comments_conf['shortname']);\n \n if ($xml_root->asXML($configfile) === FALSE) {\n\texit(i18n_r('external_comments/MSG_SAVEERROR') . ' ' . $configfile . ', ' . i18n_r('external_comments/MSG_CHECKPRIV'));\n }\n}", "private function createAndSaveKey()\n {\n $key = str_random(32);\n\n $file = settings_path('system.yaml');\n\n $contents = File::get($file);\n\n $contents = \"# The following key has been automatically generated by Statamic.\\napp_key: {$key}\\n\\n{$contents}\";\n\n File::put($file, $contents);\n }", "public function saveConfigToFile($fileName)\n {\n $fileString = '<?php';\n $fileString .= \"\\n\";\n\n foreach ($this->_configData as $key => $value) {\n $fileString .= '$config[\"'.$key.'\"] = \"'.$value.'\";';\n $fileString .= \"\\n\";\n }\n\n $fileString .= '?>';\n file_put_contents($fileName, $fileString);\n }", "public static function saveConfigFile(): bool\n {\n $configFile = self::getConfigurationFile();\n if (!isset($configFile)) {\n return false;\n }\n return file_put_contents($configFile, YAML::dump(self::$global)) !== FALSE;\n }", "function build_cfg_file()\r\n{\r\n global $DFLT, $HTTP_POST_VARS;\r\n\r\n $silly_safe_mode = test_silly_safe_mode() ? \"// Silly safe mode\\ndefine('SILLY_SAFE_MODE', 1);\\n\\n\" : '';\r\n\r\n return <<<EOT\r\n<?php\r\n// Coppermine configuration file\r\n$silly_safe_mode\r\n// MySQL configuration\r\n\\$CONFIG['dbserver'] = '{$HTTP_POST_VARS['dbserver']}'; // Your database server\r\n\\$CONFIG['dbuser'] = '{$HTTP_POST_VARS['dbuser']}'; // Your mysql username\r\n\\$CONFIG['dbpass'] = '{$HTTP_POST_VARS['dbpass']}'; // Your mysql password\r\n\\$CONFIG['dbname'] = '{$HTTP_POST_VARS['dbname']}'; // Your mysql database name\r\n\r\n\r\n// MySQL TABLE NAMES PREFIX\r\n\\$CONFIG['TABLE_PREFIX'] = '{$HTTP_POST_VARS['table_prefix']}';\r\n?>\r\nEOT;\r\n}", "public function main() {\n\n $seedProperties = Yaml::parse(file_get_contents($this->getSeedFile()));\n\n if (!isset($seedProperties['servers'])) {\n return;\n }\n\n foreach ($seedProperties['servers'] as $serverKey => $properties) {\n if (isset($properties['credentials'])) {\n\n $site = isset($properties['server_site']) ? $properties['server_site'] : 'default';\n\n // Start by ensuring the shared dir exists.\n // @TODO Make this a bit more solid (maybe use deployer itself?)\n passthru(sprintf(\"ssh %s@%s 'mkdir -p %s/shared'\", $properties['server_user'], $properties['server_host'], $properties['server_root']));\n\n // Set up the .env file.\n $envJson = [];\n $envJson[$site] = $properties['credentials'];\n if (!isset($envJson[$site]['hash_salt'])) {\n $php = new \\surangapg\\HeavydComponents\\Crypt\\Php();\n $envJson[$site]['hash_salt'] = $php->generate();\n }\n $envJson = json_encode($envJson, JSON_PRETTY_PRINT);\n $envJson = base64_encode($envJson);\n passthru(sprintf(\"ssh %s@%s 'echo %s > %s/shared/.env'\", $properties['server_user'], $properties['server_host'], $envJson, $properties['server_root']));\n }\n }\n }", "protected function createEnvFile()\n {\n if (! file_exists('.env')) {\n copy('.env.example', '.env');\n $this->line('.env file successfully created');\n }\n }", "protected function setConfFiles() {\n $current_dir = basename(getcwd());\n $project_name = $this->io->ask('Please enter the project name (default to ' . $current_dir . '): ', $current_dir);\n $theme_name = str_replace('-', '_', $project_name);\n\n\n $this->io->write('Setting up .env file');\n $env = file_get_contents(self::ENV_FILE . '.example');\n $env = str_replace('example', $project_name, $env);\n file_put_contents(self::ENV_FILE, $env);\n\n $makefile = file_get_contents(self::MAKE_FILE);\n $makefile = str_replace('frontend_target ?= \"example\"', 'frontend_target ?= \"' . $theme_name . '\"', $makefile);\n file_put_contents(self::MAKE_FILE, $makefile);\n\n $this->io->write('Setting up Drush aliases file');\n $source_filename = self::DRUSH_ALIASES_FOLDER . \"/sitename\" . self::DRUSH_ALIASES_FILE_SUFFIX . \".example\";\n $aliases = file_get_contents($source_filename);\n $aliases = str_replace('sitename', $project_name, $aliases);\n file_put_contents(self::DRUSH_ALIASES_FOLDER . \"/$project_name\" . self::DRUSH_ALIASES_FILE_SUFFIX, $aliases);\n\n $this->io->write('Setting up behat.yml file');\n $behat_yml = file_get_contents('./behat.yml');\n $behat_yml = str_replace('example', $project_name, $behat_yml);\n file_put_contents('./behat.yml', $behat_yml);\n\n $this->io->write('Setting up BackstopJS\\' cookies.json file');\n $backstop = file_get_contents('./tests/functional/backstopjs/backstop_data/engine_scripts/cookies.json');\n $backstop = str_replace('example', $project_name, $backstop);\n file_put_contents('./tests/functional/backstopjs/backstop_data/engine_scripts/cookies.json', $backstop);\n\n $this->io->write('Setting up docker-compose.override.yml');\n copy('./docker-compose.override.yml.dist', './docker-compose.override.yml');\n\n $this->io->write('Setting up phpunit.xml');\n copy('./phpunit.xml.dist', './phpunit.xml');\n\n $this->io->write('Setting up phpcs.xml');\n copy('./phpcs.xml.dist', './phpcs.xml.dist');\n\n $this->io->write('Setting up phpmd.xml');\n copy('./phpmd.xml.dist', './phpmd.xml');\n\n\n return $project_name;\n }", "function __construct() {\r\n\t\tself::$path_user = \"user_logs/\";\t\t\t//\r\n\t\tself::$path_server = \"server_logs/\";\t\t\t//\r\n\t\tif (!is_dir(self::$path_user))\t\t\t\t//\r\n\t\t\tmkdir(self::$path_user);\t\t\t//\r\n\t\tif (!is_dir(self::$path_server))\t\t\t//\r\n\t\t\tmkdir(self::$path_server);\t\t\t//\r\n\t\tif (!file_exists(self::$path_server . \"/spoof_list\"))\t\t\t\t//\r\n\t\t\ttouch(self::$path_server . \"/spoof_list\");\t\t\t\t//\r\n\t\tif (!file_exists(self::$path_server . \"/users.conf\"))\t\t\t\t//\r\n\t\t\ttouch(self::$path_server . \"/users.conf\");\t\t\t\t//\r\n\t}", "protected function configure()\n {\n $this->setName('config:publish')\n ->setDescription('Creates a config file.')\n ->setHelp('This generates a config file in YML format.');\n }", "function ipm_create_config() {\r\n\tglobal $ipm_version;\r\n\t\r\n\t$site = array();\r\n\t//version 0.1/0.2/0.3\r\n\t$site['installed'] = current_time('mysql');\r\n\t$site['version'] = $ipm_version;\r\n\t$site['active'] = 0;\r\n\t$site['remote_site_soap_url'] = '';\r\n\r\n\tadd_option('ipm_config', $site, 'IPManager Connector Config');\r\n}", "function generate_configs() {\n\tglobal $amp_conf;\n\tglobal $dryrun;\n\tglobal $debug;\n\tglobal $runas_uid;\n\n\tout(\"Generating Configurations.conf, (if Asterisk is not running, you will get an error\");\n\tout(\"In case of error, start Asterisk and hit the red bar in the GUI to generate the Configurations.conf files\");\n\tif (!$dryrun)\n\t\t// added --run-install to make it work like it has been working since retrieve_conf changed to not run module install scripts by default\n\n\t\t//\n\t\t// TODO: Should check if Asterisk is running and/or try to start it.\n\t\t//\n\t\tpassthru(\"sudo -u $runas_uid \".trim($amp_conf[\"AMPBIN\"]).\"/retrieve_conf --run-install --skip-registry-checks \".($debug ? ' --debug' : ''));\n}", "function seo_server_conf($html = true)\n\t{\n\t\t// get mods server_conf tpls\n\t\t$mods_ht = $this->get_mods_server_conf();\n\t\t$default_slash = '/';\n\t\t$wierd_slash = '';\n\t\t$phpbb_path = trim($this->core->seo_path['phpbb_script'], '/');\n\t\t$show_rewritebase_opt = false;\n\t\t$rewritebase = '';\n\t\t$wierd_slash = $this->new_config['wslash'] ? '/' : '';\n\t\t$default_slash = $this->new_config['slash'] ? '' : '/';\n\n\t\t$red_slash = '<b style=\"color:red\">/</b>';\n\n\t\tif (!empty($phpbb_path))\n\t\t{\n\t\t\t$phpbb_path = $phpbb_path . '/';\n\n\t\t\tif ($this->new_config['rbase'])\n\t\t\t{\n\t\t\t\t$rewritebase = $phpbb_path;\n\t\t\t\t$default_slash = $this->new_config['slash'] ? '/' : '';\n\t\t\t}\n\n\t\t\t$show_rewritebase_opt = $this->core->seo_opt['virtual_root'] ? false : true;\n\t\t}\n\n\t\t$colors = array(\n\t\t\t'color'\t\t=> '<b style=\"color:%1$s\">%2$s</b>',\n\t\t\t'static'\t=> '#A020F0',\n\t\t\t'ext'\t\t=> '#6A5ACD',\n\t\t\t'delim'\t\t=> '#FF00FF',\n\t\t);\n\n\t\t$spritf_tpl = array(\n\t\t\t'paginpage'\t=> '/?(<b style=\"color:' . $colors['static'] . '\">%1$s</b>([0-9]+)<b style=\"color:' . $colors['ext'] . '\">%2$s</b>)?',\n\t\t\t'pagin'\t\t=> '(<b style=\"color:' . $colors['delim'] . '\">%1$s</b>([0-9]+))?<b style=\"color:' . $colors['ext'] . '\">%2$s</b>',\n\t\t\t'static'\t=> sprintf($colors['color'] , $colors['static'], '%1$s'),\n\t\t\t'ext'\t\t=> sprintf($colors['color'] , $colors['ext'], '%1$s'),\n\t\t\t'delim'\t\t=> sprintf($colors['color'] , $colors['delim'], '%1$s'),\n\t\t);\n\n\t\t$modrtype = array(\n\t\t\t1\t\t=> 'SIMPLE',\n\t\t\t2\t\t=> 'MIXED',\n\t\t\t3\t\t=> 'ADVANCED',\n\t\t\t'type'\t=> intval($this->core->modrtype),\n\t\t);\n\n\t\tif (!empty($default_slash) && $this->new_config['more_options'])\n\t\t{\n\t\t\t$default_slash = $red_slash;\n\t\t}\n\n\t\tif (!empty($wierd_slash) && $this->new_config['more_options'])\n\t\t{\n\t\t\t$wierd_slash = $red_slash;\n\t\t}\n\n\t\t// The tpl array\n\t\t$rewrite_tpl_vars = array();\n\n\t\t// handle the suffixes properly in RegEx\n\t\t// set up pagination RegEx\n\t\t// set up ext bits\n\t\t$seo_ext = array(\n\t\t\t// force '/' for both / and empty ext to add /? in RegEx (which allows both cases)\n\t\t\t'pagination'\t=> trim($this->core->seo_ext['pagination'], '/') ? str_replace('.', '\\\\.', $this->core->seo_ext['pagination']) : '/',\n\t\t);\n\n\t\t$reg_ex_page = sprintf($spritf_tpl['paginpage'], $this->core->seo_static['pagination'], $seo_ext['pagination'] . ($seo_ext['pagination'] === '/' ? '?' : ''));\n\n\t\tforeach ($this->core->seo_ext as $type => $value)\n\t\t{\n\t\t\t$_value = trim($value, '/');\n\t\t\t// force '/' for both / and empty ext to add /? in RegEx (which allows both cases)\n\t\t\t$seo_ext[$type] = $_value ? str_replace('.', '\\\\.', $value) : '/';\n\t\t\t$rewrite_tpl_vars['{' . strtoupper($type) . '_PAGINATION}'] = $_value ? sprintf($spritf_tpl['pagin'], $this->core->seo_delim['start'], $seo_ext[$type]) : $reg_ex_page;\n\t\t\t// use url/? to allow both url and url/ to work as expected\n\t\t\t$rewrite_tpl_vars['{EXT_' . strtoupper($type) . '}'] = sprintf($spritf_tpl['ext'] , $seo_ext[$type]) . ($_value ? '' : '?');\n\t\t}\n\n\t\t$rewrite_tpl_vars['{PAGE_PAGINATION}'] = $reg_ex_page;\n\n\t\t// static bits\n\t\tforeach ($this->core->seo_static as $type => $value)\n\t\t{\n\t\t\tif (!is_array($this->core->seo_static[$type]))\n\t\t\t{\n\t\t\t\t$rewrite_tpl_vars['{STATIC_' . strtoupper($type) . '}'] = sprintf($spritf_tpl['static'], $this->core->seo_static[$type]);\n\t\t\t}\n\t\t}\n\n\t\t// delim bits\n\t\tforeach ($this->core->seo_delim as $type => $value)\n\t\t{\n\t\t\t$rewrite_tpl_vars['{DELIM_' . strtoupper($type) . '}'] = sprintf($spritf_tpl['delim'], $this->core->seo_delim[$type]);\n\t\t}\n\n\t\t$hostname = str_replace(array('https://', 'http://'), array('', ''), trim($this->core->seo_path['root_url'], '/ '));\n\t\t$hostname_no_www = '';\n\n\t\tif (preg_match('`^www\\.`', $hostname))\n\t\t{\n\t\t\t$hostname_no_www = preg_replace('`^www\\.`', '', $hostname);\n\t\t}\n\n\t\t$hostname_escaped = str_replace('.', '\\\\.', $hostname);\n\t\t// common server_conf vars\n\t\t$rewrite_tpl_vars += array(\n\t\t\t'{HOSTNAME}'\t\t=> $hostname,\n\t\t\t'{HOSTNAME_ESCAPED}'\t=> $hostname_escaped,\n\t\t\t'{REWRITEBASE}'\t\t=> $rewritebase,\n\t\t\t'{PHP_EX}'\t\t=> $this->php_ext,\n\t\t\t'{PHPBB_LPATH}'\t\t=> ($this->new_config['rbase'] || $this->core->seo_opt['virtual_root']) ? '' : $phpbb_path,\n\t\t\t'{PHPBB_RPATH}'\t\t=> $this->new_config['rbase'] ? '' : $phpbb_path,\n\t\t\t'{DEFAULT_SLASH}'\t=> $default_slash,\n\t\t\t'{WIERD_SLASH}'\t\t=> $wierd_slash,\n\t\t\t'{RED_SLASH}'\t\t=> $this->new_config['more_options'] ? $red_slash : '/',\n\t\t\t'{MOD_RTYPE}'\t\t=> $modrtype[$modrtype['type']],\n\t\t);\n\n\t\t// prettify rules\n\t\t$prettify_common = array(\n\t\t\t'comments' => array(\n\t\t\t\t'find' => array(\n\t\t\t\t\t'`^(\\s*)(#.*)$`m',\n\t\t\t\t\t'`^(\\s*)(//.*)$`m',\n\t\t\t\t\t'`^(\\s*)(/\\*.*\\*/)$`Um',\n\t\t\t\t),\n\t\t\t\t'replace' => '\\1<b style=\"color:blue\">\\2</b>',\n\t\t\t),\n\t\t\t'rewrite' => array(\n\t\t\t\t'find' => '`^(\\s*)(rewrite|RewriteRule|RewriteCond|RewriteBase|RewriteEngine)`m',\n\t\t\t\t'replace' => '\\1<b style=\"color:green\">\\2</b>',\n\t\t\t),\n\t\t);\n\n\t\t$rewrite_conf = array(\n\t\t\t'apache' => array(\n\t\t\t\t'header' => \"<IfModule mod_rewrite.c>\n\t# You may need to un-comment the following lines\n\t# Options +FollowSymlinks\n\t# To make sure that rewritten dir or file (/|.html) will not load dir.php in case it exist\n\t# Options -MultiViews\n\t# REMEBER YOU ONLY NEED TO STARD MOD REWRITE ONCE\n\tRewriteEngine On\n\n\t# Uncomment the statement below if you want to make use of\n\t# HTTP authentication and it does not already work.\n\t# This could be required if you are for example using PHP via Apache CGI.\n\t# RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]\n\n\t# REWRITE BASE\n\tRewriteBase /{REWRITEBASE}\n\n\t# HERE IS A GOOD PLACE TO FORCE CANONICAL DOMAIN\n\t# Define fully qualified ssl aware protocol\n\t# RewriteCond %{SERVER_PORT}s ^(443(s)|[0-9]+s)$\n\t# RewriteRule ^.*$ - [env=HttpFullProto:http%2://]\n\t# RewriteCond %{HTTP_HOST} !^{HOSTNAME_ESCAPED}$ [NC]\n\t# RewriteRule ^(.*)$ %{ENV:HttpFullProto}{HOSTNAME}/{REWRITEBASE}$1 [QSA,L,R=301]\n\n\t# DO NOT GO FURTHER IF THE REQUESTED FILE / DIR DOES EXISTS\n\tRewriteCond %{REQUEST_FILENAME} -f [OR]\n\tRewriteCond %{REQUEST_FILENAME} -d\n\tRewriteRule . - [L]\",\n\n\t\t\t\t'footer' => '\t#\n\t# The following 3 lines will rewrite URLs passed through the front controller\n\t# to not require app.php in the actual URL. In other words, a controller is\n\t# by default accessed at /app.php/my/controller, but can also be accessed at\n\t# /my/controller\n\t#\n\tRewriteCond %{REQUEST_FILENAME} !-f\n\tRewriteCond %{REQUEST_FILENAME} !-d\n\tRewriteRule ^{WIERD_SLASH}{PHPBB_LPATH}(.*)$ {DEFAULT_SLASH}{PHPBB_RPATH}app.{PHP_EX} [QSA,L]\n\n</IfModule>\n\n# With Apache 2.4 the \"Order, Deny\" syntax has been deprecated and moved from\n# module mod_authz_host to a new module called mod_access_compat (which may be\n# disabled) and a new \"Require\" syntax has been introduced to mod_authz_host.\n# We could just conditionally provide both versions, but unfortunately Apache\n# does not explicitly tell us its version if the module mod_version is not\n# available. In this case, we check for the availability of module\n# mod_authz_core (which should be on 2.4 or higher only) as a best guess.\n<IfModule mod_version.c>\n\t<IfVersion < 2.4>\n\t\t<Files \"config.php\">\n\t\t\tOrder Allow,Deny\n\t\t\tDeny from All\n\t\t</Files>\n\t\t<Files \"common.php\">\n\t\t\tOrder Allow,Deny\n\t\t\tDeny from All\n\t\t</Files>\n\t</IfVersion>\n\t<IfVersion >= 2.4>\n\t\t<Files \"config.php\">\n\t\t\tRequire all denied\n\t\t</Files>\n\t\t<Files \"common.php\">\n\t\t\tRequire all denied\n\t\t</Files>\n\t</IfVersion>\n</IfModule>\n<IfModule !mod_version.c>\n\t<IfModule !mod_authz_core.c>\n\t\t<Files \"config.php\">\n\t\t\tOrder Allow,Deny\n\t\t\tDeny from All\n\t\t</Files>\n\t\t<Files \"common.php\">\n\t\t\tOrder Allow,Deny\n\t\t\tDeny from All\n\t\t</Files>\n\t</IfModule>\n\t<IfModule mod_authz_core.c>\n\t\t<Files \"config.php\">\n\t\t\tRequire all denied\n\t\t</Files>\n\t\t<Files \"common.php\">\n\t\t\tRequire all denied\n\t\t</Files>\n\t</IfModule>\n</IfModule>',\n\t\t\t\t'prettify' => array(\n\t\t\t\t\t'struct' => array(\n\t\t\t\t\t\t'find' => array(\n\t\t\t\t\t\t\t'`^(\\s*)(\\&lt;(IfModule|IfVersion|Files)([^>]+)\\&gt;)$`Um',\n\t\t\t\t\t\t\t'`^(\\s*)(\\&lt;/(IfModule|IfVersion|Files)\\&gt;)$`Um',\n\t\t\t\t\t\t\t'`(\\s+)(\\[[A-Z0-9,=]+\\])$`Um'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'replace' => array(\n\t\t\t\t\t\t\t'\\1<b style=\"color:brown\">&lt;\\3</b><b style=\"color:#FF00FF\">\\4</b><b style=\"color:brown\">&gt;</b>',\n\t\t\t\t\t\t\t'\\1<b style=\"color:brown\">\\2</b>',\n\t\t\t\t\t\t\t'\\1<b style=\"color:brown\">\\2</b>',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'header_title' => $this->user->lang['SEO_APACHE_CONF'],\n\t\t\t\t'header_message' => $show_rewritebase_opt && $this->new_config['rbase'] ?\n\t\t\t\t\tsprintf($this->user->lang['SEO_HTACCESS_FOLDER_MSG'], '<em style=\"color:#000\">' . $this->core->seo_path['phpbb_url'] . '</em>') :\n\t\t\t\t\tsprintf($this->user->lang['SEO_HTACCESS_ROOT_MSG'], '<em style=\"color:#000\">' . $this->core->seo_path['root_url'] . '</em>'),\n\t\t\t\t'filename' => '.htaccess',\n\t\t\t\t'rewrite_padding' => '\t',\n\t\t\t),\n\n\t\t\t// ngix\n\t\t\t'ngix' => array(\n\t\t\t\t'header' => '# Sample nginx configuration file for phpBB.\n# Global settings have been removed, copy them\n# from your system\\'s nginx.conf.\n# Tested with nginx 0.8.35.\n\n# If you want to use the X-Accel-Redirect feature,\n# add the following to your config.php.\n#\n# define(\\'PHPBB_ENABLE_X_ACCEL_REDIRECT\\', true);\n#\n# See http://wiki.nginx.org/XSendfile for the details\n# on X-Accel-Redirect.\nhttp {\n\t# Compression - requires gzip and gzip static modules.\n\tgzip on;\n\tgzip_static on;\n\tgzip_vary on;\n\tgzip_http_version 1.1;\n\tgzip_min_length 700;\n\n\t# Compression levels over 6 do not give an appreciable improvement\n\t# in compression ratio, but take more resources.\n\tgzip_comp_level 6;\n\n\t# IE 6 and lower do not support gzip with Vary correctly.\n\tgzip_disable \"msie6\";\n\t# Before nginx 0.7.63:\n\t#gzip_disable \"MSIE [1-6]\\.\";\n\n\t# Catch-all server for requests to invalid hosts.\n\t# Also catches vulnerability scanners probing IP addresses.\n\tserver {\n\t\t# default specifies that this block is to be used when\n\t\t# no other block matches.\n\t\tlisten 80 default;\n\n\t\tserver_name bogus;\n\t\treturn 444;\n\t\troot /var/empty;\n\t}\n\n\t# The actual board domain.\n\tserver {\n\t\t#listen 80;\n\t\tserver_name {HOSTNAME};\n\n\t\troot /{REWRITEBASE};\n\n\t\tlocation / {\n\t\t\t# phpbb uses index.htm\n\t\t\tindex index.php index.html index.htm;\n\n\t\t\t# multi domain ssl aware canonical hostname\n\t\t\t# if ($host != {HOSTNAME}) {\n\t\t\t# \trewrite ^ $scheme://{HOSTNAME}$request_uri permanent;\n\t\t\t# }\n\n\t\t\t# DO NOT GO FURTHER IF THE REQUESTED FILE / DIR DOES EXISTS\n\t\t\tif (-e $request_filename) {\n\t\t\t\tbreak;\n\t\t\t}',\n\t\t\t\t// footer\n\t\t\t\t'footer' => '\t\t\t#\n\t\t\t# The following 3 lines will rewrite URLs passed through the front controller\n\t\t\t# to not require app.php in the actual URL. In other words, a controller is\n\t\t\t# by default accessed at /app.php/my/controller, but can also be accessed at\n\t\t\t# /my/controller\n\t\t\t#\n\t\t\tif (!-e $request_filename) {\n\t\t\t\trewrite ^{WIERD_SLASH}{PHPBB_RPATH}(.*)$ {DEFAULT_SLASH}{PHPBB_RPATH}app.{PHP_EX} last;\n\t\t\t}\n\n\t\t}\n\t\t# Deny access to internal phpbb files.\n\t\tlocation ~ /(config\\.php|common\\.php|includes|cache|files|store|images/avatars/upload) {\n\t\t\tdeny all;\n\t\t\t# deny was ignored before 0.8.40 for connections over IPv6.\n\t\t\t# Use internal directive to prohibit access on older versions.\n\t\t\tinternal;\n\t\t}\n\n\t\t# Deny access to version control system directories.\n\t\tlocation ~ /\\.svn|/\\.git {\n\t\t\tdeny all;\n\t\t\tinternal;\n\t\t}\n\t}\n\n\t# If running php as fastcgi, specify php upstream.\n\tupstream php {\n\t\tserver unix:/tmp/php.sock;\n\t}\n}',\n\t\t\t\t'prettify' => array(\n\t\t\t\t\t'struct' => array(\n\t\t\t\t\t\t'find' => array(\n\t\t\t\t\t\t\t'`(break|last|permanent);$`m',\n\t\t\t\t\t\t\t'`^(\\s*)(location|http|server(_name)?|return|root|listen|index |upstream|gzip(_[a-z_]+)?)`m',\n\t\t\t\t\t\t\t'`^(\\s*)if \\(([^)]+)\\) {$`Um',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'replace' => array(\n\t\t\t\t\t\t\t'<b style=\"color:brown\">\\1</b>;',\n\t\t\t\t\t\t\t'\\1<b style=\"color:brown\">\\2</b>',\n\t\t\t\t\t\t\t'\\1<b style=\"color:brown\">if </b>(<b style=\"color:#FF00FF\">\\2</b>) {',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'translate' => array(\n\t\t\t\t\t'find' => array(\n\t\t\t\t\t\t'RewriteRule',\n\t\t\t\t\t\t'[QSA,L,NC]',\n\t\t\t\t\t\t'[QSA,L,NC,R=301]',\n\t\t\t\t\t\t'{WIERD_SLASH}',\n\t\t\t\t\t\t'{DEFAULT_SLASH}',\n\t\t\t\t\t),\n\t\t\t\t\t'replace' => array(\n\t\t\t\t\t\t'rewrite',\n\t\t\t\t\t\t'last;',\n\t\t\t\t\t\t'permanent;',\n\t\t\t\t\t\t$wierd_slash ? '' : '{RED_SLASH}',\n\t\t\t\t\t\t$rewritebase ? ($this->new_config['slash'] ? '' : '{RED_SLASH}') : '{RED_SLASH}',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'header_title' => $this->user->lang['SEO_NGIX_CONF'],\n\t\t\t\t'header_message' => $this->user->lang['SEO_NGIX_CONF_EXPLAIN'],\n\t\t\t\t'filename' => 'ngix.conf',\n\t\t\t\t'rewrite_padding' => '\t\t\t',\n\t\t\t),\n\t\t);\n\n\t\t$rewrite_rules = array();\n\t\tif (!empty($this->core->seo_static['index']))\n\t\t{\n\t\t\t$rewrite_rules += array(\n\t\t\t\t'forum_index' => '# FORUM INDEX\nRewriteRule ^{WIERD_SLASH}{PHPBB_LPATH}{STATIC_INDEX}{EXT_INDEX}$ {DEFAULT_SLASH}{PHPBB_RPATH}index.{PHP_EX} [QSA,L,NC]',\n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$rewrite_rules += array(\n\t\t\t\t'forum_index' => '# FORUM INDEX REWRITERULE WOULD STAND HERE IF USED. \"forum\" REQUIRES TO BE SET AS FORUM INDEX\n# RewriteRule ^{WIERD_SLASH}{PHPBB_LPATH}forum\\.html$ {DEFAULT_SLASH}{PHPBB_RPATH}index.{PHP_EX} [QSA,L,NC]',\n\t\t\t);\n\t\t}\n\t\t$rewrite_rules += array(\n\t\t\t'forum' => '# FORUM ALL MODES\nRewriteRule ^{WIERD_SLASH}{PHPBB_LPATH}({STATIC_FORUM}|[a-z0-9_-]*{DELIM_FORUM})([0-9]+){FORUM_PAGINATION}$ {DEFAULT_SLASH}{PHPBB_RPATH}viewforum.{PHP_EX}?f=$2&start=$4 [QSA,L,NC]',\n\t\t\t\t'topic_vfolder' => '# TOPIC WITH VIRTUAL FOLDER ALL MODES\nRewriteRule ^{WIERD_SLASH}{PHPBB_LPATH}({STATIC_FORUM}|[a-z0-9_-]*{DELIM_FORUM})([0-9]+)/({STATIC_TOPIC}|[a-z0-9_-]*{DELIM_TOPIC})([0-9]+){TOPIC_PAGINATION}$ {DEFAULT_SLASH}{PHPBB_RPATH}viewtopic.{PHP_EX}?f=$2&t=$4&start=$6 [QSA,L,NC]',\n\n\t\t\t'topic_nofid' => '# TOPIC WITHOUT FORUM ID & DELIM ALL MODES\nRewriteRule ^{WIERD_SLASH}{PHPBB_LPATH}([a-z0-9_-]*)/?({STATIC_TOPIC}|[a-z0-9_-]*{DELIM_TOPIC})([0-9]+){TOPIC_PAGINATION}$ {DEFAULT_SLASH}{PHPBB_RPATH}viewtopic.{PHP_EX}?forum_uri=$1&t=$3&start=$5 [QSA,L,NC]',\n\t\t);\n\t\tif ($this->core->seo_opt['profile_noids'])\n\t\t{\n\t\t\t$rewrite_rules += array(\n\t\t\t\t'profile' => '# PROFILES THROUGH USERNAME\nRewriteRule ^{WIERD_SLASH}{PHPBB_LPATH}{STATIC_USER}/([^/]+)/?$ {DEFAULT_SLASH}{PHPBB_RPATH}memberlist.{PHP_EX}?mode=viewprofile&un=$1 [QSA,L,NC]',\n\n\t\t\t\t'user_messages' => '# USER MESSAGES THROUGH USERNAME\nRewriteRule ^{WIERD_SLASH}{PHPBB_LPATH}{STATIC_USER}/([^/]+)/(topics|posts){USER_PAGINATION}$ {DEFAULT_SLASH}{PHPBB_RPATH}search.{PHP_EX}?author=$1&sr=$2&start=$4 [QSA,L,NC]',\n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$rewrite_rules += array(\n\t\t\t\t'profile' => '# PROFILES ALL MODES WITH ID\nRewriteRule ^{WIERD_SLASH}{PHPBB_LPATH}({STATIC_USER}|[a-z0-9_-]*{DELIM_USER})([0-9]+){EXT_USER}$ {DEFAULT_SLASH}{PHPBB_RPATH}memberlist.{PHP_EX}?mode=viewprofile&u=$2 [QSA,L,NC]',\n\n\t\t\t\t'user_messages' => '# USER MESSAGES ALL MODES WITH ID\nRewriteRule ^{WIERD_SLASH}{PHPBB_LPATH}({STATIC_USER}|[a-z0-9_-]*{DELIM_USER})([0-9]+){DELIM_SR}(topics|posts){USER_PAGINATION}$ {DEFAULT_SLASH}{PHPBB_RPATH}search.{PHP_EX}?author_id=$2&sr=$3&start=$5 [QSA,L,NC]',\n\t\t\t);\n\t\t}\n\n\t\t$rewrite_rules += array(\n\t\t\t'group' => '# GROUPS ALL MODES\nRewriteRule ^{WIERD_SLASH}{PHPBB_LPATH}({STATIC_GROUP}|[a-z0-9_-]*{DELIM_GROUP})([0-9]+){GROUP_PAGINATION}$ {DEFAULT_SLASH}{PHPBB_RPATH}memberlist.{PHP_EX}?mode=group&g=$2&start=$4 [QSA,L,NC]',\n\t\t\t'posts' => '# POSTS\nRewriteRule ^{WIERD_SLASH}{PHPBB_LPATH}{STATIC_POST}([0-9]+){EXT_POST}$ {DEFAULT_SLASH}{PHPBB_RPATH}viewtopic.{PHP_EX}?p=$1 [QSA,L,NC]',\n\n\t\t\t'active_topics' => '# ACTIVE TOPICS\nRewriteRule ^{WIERD_SLASH}{PHPBB_LPATH}{STATIC_ATOPIC}{ATOPIC_PAGINATION}$ {DEFAULT_SLASH}{PHPBB_RPATH}search.{PHP_EX}?search_id=active_topics&start=$2&sr=topics [QSA,L,NC]',\n\n\t\t\t'unanswered_topics' => '# UNANSWERED TOPICS\nRewriteRule ^{WIERD_SLASH}{PHPBB_LPATH}{STATIC_UTOPIC}{UTOPIC_PAGINATION}$ {DEFAULT_SLASH}{PHPBB_RPATH}search.{PHP_EX}?search_id=unanswered&start=$2&sr=topics [QSA,L,NC]',\n\n\t\t\t'new_posts' => '# NEW POSTS\nRewriteRule ^{WIERD_SLASH}{PHPBB_LPATH}{STATIC_NPOST}{NPOST_PAGINATION}$ {DEFAULT_SLASH}{PHPBB_RPATH}search.{PHP_EX}?search_id=newposts&start=$2&sr=topics [QSA,L,NC]',\n\n\t\t\t'unread_posts' => '# UNREAD POSTS\nRewriteRule ^{WIERD_SLASH}{PHPBB_LPATH}{STATIC_URPOST}{URPOST_PAGINATION}$ {DEFAULT_SLASH}{PHPBB_RPATH}search.{PHP_EX}?search_id=unreadposts&start=$2 [QSA,L,NC]',\n\n\t\t\t'the_team' => '# THE TEAM\nRewriteRule ^{WIERD_SLASH}{PHPBB_LPATH}{STATIC_LEADERS}{EXT_LEADERS}$ {DEFAULT_SLASH}{PHPBB_RPATH}memberlist.{PHP_EX}?mode=team [QSA,L,NC]',\n\n\t\t\t'comment_more_rules' => '# HERE IS A GOOD PLACE TO ADD OTHER PHPBB RELATED REWRITERULES\n',\n\t\t);\n\n\t\t// mods server_conf pos1\n\t\tif (!empty($mods_ht['pos1']))\n\t\t{\n\t\t\t$rewrite_rules += $mods_ht['pos1'];\n\t\t}\n\n\t\t$rewrite_rules += array(\n\t\t\t'comment_forum_noid' => '# FORUM WITHOUT ID & DELIM ALL MODES\n# THESE LINES MUST BE LOCATED AT THE END OF YOUR HTACCESS TO WORK PROPERLY',\n\t\t);\n\n\t\tif (trim($this->core->seo_ext['forum'],'/'))\n\t\t{\n\t\t\t$rewrite_rules += array(\n\t\t\t\t'forum_noid' => array(\n\t\t\t\t\t'apache' => 'RewriteCond %{REQUEST_FILENAME} !-f\nRewriteRule ^{WIERD_SLASH}{PHPBB_LPATH}([a-z0-9_-]+?)(-([0-9]+))?{EXT_FORUM}$ {DEFAULT_SLASH}{PHPBB_RPATH}viewforum.{PHP_EX}?forum_uri=$1&start=$3 [QSA,L,NC]',\n\t\t\t\t\t'ngix' => 'if (!-e $request_filename) {\n\trewrite ^{WIERD_SLASH}{PHPBB_LPATH}([a-z0-9_-]+?)(-([0-9]+))?{EXT_FORUM}$ {DEFAULT_SLASH}{PHPBB_RPATH}viewforum.{PHP_EX}?forum_uri=$1&start=$3 last;\n}',\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$rewrite_rules += array(\n\t\t\t\t'forum_noid' => array(\n\t\t\t\t\t'apache' => 'RewriteCond %{REQUEST_FILENAME} !-f\nRewriteCond %{REQUEST_FILENAME} !-d\nRewriteRule ^{WIERD_SLASH}{PHPBB_LPATH}([a-z0-9_-]+){FORUM_PAGINATION}$ {DEFAULT_SLASH}{PHPBB_RPATH}viewforum.{PHP_EX}?forum_uri=$1&start=$3 [QSA,L,NC]',\n\t\t\t\t\t'ngix' => 'if (!-e $request_filename) {\n\trewrite ^{WIERD_SLASH}{PHPBB_LPATH}([a-z0-9_-]+){FORUM_PAGINATION}$ {DEFAULT_SLASH}{PHPBB_RPATH}viewforum.{PHP_EX}?forum_uri=$1&start=$3 last;\n}',\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\n\t\t$fix_left_match = '';\n\t\t$fix_301_redirect = ',R=301';\n\t\tif ($this->core->seo_opt['virtual_root'])\n\t\t{\n\t\t\t$fix_left_match = '.+/';\n\t\t\t// do not 301 css and other broken links as this would means many\n\t\t\t// just serve them as usual instead, it's no such big deal if assets\n\t\t\t// are served from two urls as long as it's not on the same page.\n\t\t\t// of course, better would be to fix links from start but it's not\n\t\t\t// that obvious as long as phpBB does not fully enforces PHPBB_USE_BOARD_URL_PATH (for exts etc ...)\n\t\t\t$fix_301_redirect = '';\n\t\t}\n\n\t\t$rewrite_rules += array(\n\t\t\t'relative_files' => '# FIX RELATIVE PATHS : FILES\nRewriteRule ^{WIERD_SLASH}{PHPBB_LPATH}' . $fix_left_match . '(style\\.{PHP_EX}|ucp\\.{PHP_EX}|mcp\\.{PHP_EX}|faq\\.{PHP_EX}|posting\\.{PHP_EX}|download/file\\.{PHP_EX}|report\\.{PHP_EX}|adm/index\\.{PHP_EX}|cron\\.{PHP_EX})$ {DEFAULT_SLASH}{PHPBB_RPATH}$1 [QSA,L,NC' . $fix_301_redirect . ']',\n\n\t\t\t'relative_images' => '# FIX RELATIVE PATHS : IMAGES\nRewriteRule ^{WIERD_SLASH}{PHPBB_LPATH}' . $fix_left_match . '(styles/.*|images/.*|assets/.*|ext/.*)$ {DEFAULT_SLASH}{PHPBB_RPATH}$1 [QSA,L,NC' . $fix_301_redirect . ']',\n\t\t);\n\n\t\t// mods server_conf pos2\n\t\tif (!empty($mods_ht['pos2']))\n\t\t{\n\t\t\t$rewrite_rules += $mods_ht['pos2'];\n\t\t}\n\n\t\t// build rewrite conf\n\t\t$rewrite_conf_result = array();\n\t\t$html_output = '';\n\t\tforeach ($rewrite_conf as $engine => $setup)\n\t\t{\n\t\t\t$translate = !empty($setup['translate']) ? $setup['translate'] : false;\n\n\t\t\tif (!empty($translate))\n\t\t\t{\n\t\t\t\t$setup['header'] = str_replace($translate['find'], $translate['replace'], $setup['header']);\n\t\t\t\t$setup['footer'] = str_replace($translate['find'], $translate['replace'], $setup['footer']);\n\t\t\t}\n\n\t\t\t$rewrite_conf_result[$engine] = $setup['header'] . \"\\n\";\n\n\t\t\t// add rewrite rules\n\t\t\tforeach ($rewrite_rules as $key => $rule)\n\t\t\t{\n\t\t\t\tif (is_array($rule))\n\t\t\t\t{\n\t\t\t\t\t$rule = $rule[$engine];\n\t\t\t\t}\n\t\t\t\tif (!empty($translate))\n\t\t\t\t{\n\t\t\t\t\t$rule = str_replace($translate['find'], $translate['replace'], $rule);\n\t\t\t\t}\n\n\t\t\t\t$rewrtie_padding = $setup['rewrite_padding'];\n\t\t\t\t$rewrite_conf_result[$engine] .= $rewrtie_padding . str_replace(\"\\n\", \"\\n$rewrtie_padding\", $rule) . \"\\n\";\n\t\t\t}\n\n\t\t\t$rewrite_conf_result[$engine] .= $setup['footer'] . \"\\n\";\n\n\t\t\t// parse template variables\n\t\t\t$rewrite_conf_result[$engine] = array(\n\t\t\t\t'html' => str_replace(array_keys($rewrite_tpl_vars), array_values($rewrite_tpl_vars), utf8_htmlspecialchars($rewrite_conf_result[$engine])),\n\t\t\t);\n\t\t\t$rewrite_conf_result[$engine]['raw'] = str_replace(array('&lt;', '&gt;', '&amp;'), array('<', '>', '&'), strip_tags($rewrite_conf_result[$engine]['html']));\n\t\t\tif ($html)\n\t\t\t{\n\t\t\t\t// prettify\n\t\t\t\tforeach ($prettify_common as $type => $prettify)\n\t\t\t\t{\n\t\t\t\t\t$rewrite_conf_result[$engine]['html'] = preg_replace($prettify['find'], $prettify['replace'], $rewrite_conf_result[$engine]['html']);\n\t\t\t\t}\n\n\t\t\t\tif (!empty($setup['prettify']))\n\t\t\t\t{\n\t\t\t\t\tforeach ($setup['prettify'] as $_type => $_prettify)\n\t\t\t\t\t{\n\t\t\t\t\t\t$rewrite_conf_result[$engine]['html'] = preg_replace($_prettify['find'], $_prettify['replace'], $rewrite_conf_result[$engine]['html']);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$rewrite_conf_result[$engine]['html_output'] = '<div class=\"content\">\n\t<div id=\"' . $engine . '_toggle\" title=\"' . $this->user->lang['SEO_SHOW'] . '&nbsp;/&nbsp;' . $this->user->lang['SEO_HIDE'] . '\">\n\t\t<h3>' . $setup['header_title'] . '</h3>\n\t\t<b style=\"color:red\">' . $setup['header_message'] . '</b><br><br>\n\t</div>\n\t<div id=\"' . $engine . '_code\">\n\t\t<dl style=\"padding:5px;background-color:#FFFFFF;border:1px solid #d8d8d8;font-size:12px;\">\n\t\t\t<dt style=\"border-bottom:1px solid #CCCCCC;margin-bottom:3px;font-weight:bold;display:block;\">&nbsp;<a id=\"' . $engine . '_select\">' . $this->user->lang['SEO_SELECT_ALL'] . '</a></dt>\n\t\t\t<dd >\n\t\t\t\t<code style=\"padding-top:5px;line-height:1.3em;color:#8b8b8b;font-weight:bold;font-family: monospace;white-space: pre;\" id=\"' . $engine . '_code_select\">\n' . str_replace(array(\"\\n\", \"\\t\"), array('<br>', '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'), $rewrite_conf_result[$engine]['html']) . '\n\t\t\t\t</code>\n\t\t\t</dd>\n\t\t</dl>\n\t</div>\n</div>';\n\t\t\t\t$html_output .= $rewrite_conf_result[$engine]['html_output'];\n\t\t\t}\n\t\t}\n\n\t\t$this->template->assign_vars(array(\n\t\t\t'SEO_REWRITE_ENGINES'\t=> '[\"' . (implode('\",\"', array_keys($rewrite_conf))) . '\"]',\n\t\t));\n\n\t\tif ($html)\n\t\t{\n\t\t\t// HTML output\n\t\t\t$html_output = '</p>' . $html_output;\n\t\t\t$html_output .= '<div style=\"padding:5px;margin-top:10px;background-color:#FFFFFF;border:1px solid #d8d8d8;font-size:12px;\"><b>' . $this->user->lang['SEO_SERVER_CONF_CAPTION'] . ':</b><ul style=\"margin-left:30px;margin-top:10px;font-weight:bold;font-size:12px;\">\n\t<li style=\"color:blue\">&nbsp;' . $this->user->lang['SEO_SERVER_CONF_CAPTION_COMMENT'] . '</li>\n\t<li style=\"color:#A020F0\">&nbsp;' . $this->user->lang['SEO_SERVER_CONF_CAPTION_STATIC'] . '</li>\n\t<li style=\"color:#6A5ACD\">&nbsp;' . $this->user->lang['SEO_SERVER_CONF_CAPTION_SUFFIX'] . '</li>\n\t<li style=\"color:#FF00FF\">&nbsp;' . $this->user->lang['SEO_SERVER_CONF_CAPTION_DELIM'] . '</li>' . \"\\n\";\n\n\t\t\tif ($this->new_config['more_options'])\n\t\t\t{\n\t\t\t\t$html_output .= '<li style=\"color:red\">&nbsp;' . $this->user->lang['SEO_SERVER_CONF_CAPTION_SLASH'] . '</li>' . \"\\n\";\n\t\t\t}\n\n\t\t\t$html_output .= '</ul></div><p>' . \"\\n\";\n\t\t\treturn $html_output;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// File output\n\t\t\tforeach ($rewrite_conf as $engine => $setup)\n\t\t\t{\n\t\t\t\t$file = $this->core->seo_opt['cache_folder'] . $setup['filename'];\n\t\t\t\t$update = $rewrite_conf_result[$engine]['raw'];\n\t\t\t\t$this->write_cache($file, $update);\n\t\t\t}\n\t\t}\n\t}", "public function writeDatabaseConfig()\n {\n // ---------------------------------------\n // Site Prefs, Defaults\n // ---------------------------------------\n\n $config = [\n 'installed_version' => CMS_VERSION, // What version is installed in DB/config, opposed to version of files\n 'site_debug' => 1,\n 'cp_url' => $this->data['cp_url'],\n 'site_index' => $this->data['site_index'],\n 'site_name' => $this->data['site_name'],\n 'theme_folder_url' => '{SITE_URL}themes/',\n 'notification_sender_email' => $this->data['email'],\n 'show_queries' => 'n',\n 'template_debugging' => 'n',\n 'include_seconds' => 'n',\n 'cookie_domain' => '',\n 'cookie_path' => '',\n 'allow_email_change' => 'y',\n 'allow_multi_emails' => 'n',\n 'default_language' => $this->data['default_language'],\n 'date_format' => 'Y-m-d',\n 'time_format' => 'H:i',\n 'site_timezone' => $this->data['site_timezone'],\n 'cp_theme' => 'default',\n 'un_min_len' => '5',\n 'password_min_length' => '10',\n 'default_member_group' => '5',\n 'enable_photos' => 'y',\n 'photo_url' => '{SITE_URL}images/member_photos/',\n 'photo_path' => '{PUBLIC_PATH}images/member_photos/',\n 'photo_max_width' => '100',\n 'photo_max_height' => '100',\n 'photo_max_kb' => '50',\n 'save_tmpl_revisions' => 'n',\n 'max_tmpl_revisions' => '5',\n 'enable_censoring' => 'n',\n 'censored_words' => '',\n 'censor_replacement' => '',\n 'banned_ips' => '',\n 'banned_emails' => '',\n 'banned_screen_names' => '',\n 'ban_action' => 'restrict',\n 'ban_message' => 'This site is currently unavailable',\n 'ban_destination' => 'https://google.com/',\n 'recount_batch_total' => '1000',\n 'enable_image_resizing' => 'y',\n 'image_resize_protocol' => 'gd2',\n 'image_library_path' => '',\n 'thumbnail_prefix' => 'thumb',\n 'word_separator' => 'underscore',\n 'new_posts_clear_caches' => 'y',\n 'enable_throttling' => 'n',\n 'banish_masked_ips' => 'y',\n 'max_page_loads' => '10',\n 'time_interval' => '8',\n 'lockout_time' => '30',\n 'banishment_type' => 'message',\n 'banishment_url' => '',\n 'banishment_message' => 'You have exceeded the allowed page load frequency.',\n 'disable_events' => 'n',\n 'is_site_on' => 'y',\n 'theme_folder_path' => '{PUBLIC_PATH}themes/',\n ];\n\n // ---------------------------------------\n // Add the Prefs\n // ---------------------------------------\n\n $update_prefs = [];\n\n foreach(Site::preferenceKeys() as $value) {\n $update_prefs[$value] = $config[$value];\n }\n\n if (!empty($update_prefs)) {\n foreach($update_prefs as $handle => $value) {\n DB::table('site_preferences')\n ->insert(\n [\n 'site_id' => 1,\n 'handle' => $handle,\n 'value' => $value\n ]);\n }\n }\n }", "protected function generateConfigFileContent()\n\t{\n\t\treturn <<<EOT\nimports:\n - { resource: parameters.yml }\n - { resource: security.yml }\n - { resource: services.yml }\n\n# Put parameters here that don't need to change on each machine where the app is deployed\n# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration\nparameters:\n locale: en\n\nframework:\n #esi: ~\n #translator: { fallbacks: ['%locale%'] }\n secret: '%secret%'\n router:\n resource: '%kernel.project_dir%/app/config/routing.yml'\n strict_requirements: ~\n form: ~\n csrf_protection: ~\n validation: { enable_annotations: true }\n #serializer: { enable_annotations: true }\n templating:\n engines: ['twig']\n default_locale: '%locale%'\n trusted_hosts: ~\n session:\n # https://symfony.com/doc/current/reference/configuration/framework.html#handler-id\n handler_id: session.handler.native_file\n save_path: '%kernel.project_dir%/var/sessions/%kernel.environment%'\n fragments: ~\n http_method_override: true\n assets: ~\n php_errors:\n log: true\n\n# Twig Configuration\ntwig:\n debug: '%kernel.debug%'\n strict_variables: '%kernel.debug%'\n\n\n\nEOT;\n\t}", "private function createClusteredFile(CNabuSite $nb_site)\n {\n $file = new CApacheClusteredFile($this, $this->nb_server, $nb_site);\n $file->create();\n $path = self::NABU_APACHE_ETC_PATH . DIRECTORY_SEPARATOR . $nb_site->getBasePath();\n\n if (!is_dir($path)) {\n mkdir($path, 0755, true);\n }\n if (!is_dir($path)) {\n throw new ENabuCoreException(ENabuCoreException::ERROR_FOLDER_NOT_FOUND, array($path));\n }\n $filename = $path . DIRECTORY_SEPARATOR . NABU_VHOST_CONFIG_FILENAME;\n $file->exportToFile($filename);\n }", "public function getConfigFilePath();", "public function getConfigFilePath();" ]
[ "0.7070579", "0.7046196", "0.68696964", "0.68282056", "0.6778356", "0.67020553", "0.66514915", "0.6538233", "0.64979213", "0.64242417", "0.63251495", "0.62821525", "0.61070395", "0.6104421", "0.60549", "0.603139", "0.5995653", "0.5957166", "0.59556663", "0.58899295", "0.58857", "0.5875398", "0.5856986", "0.58363324", "0.5824676", "0.5806722", "0.57990247", "0.57689345", "0.57313406", "0.57312685", "0.5722499", "0.571853", "0.5717965", "0.5715735", "0.568635", "0.56559366", "0.5647003", "0.5630273", "0.5626803", "0.5625814", "0.56173265", "0.56075007", "0.5606884", "0.5606175", "0.55850124", "0.5584245", "0.5583771", "0.55712044", "0.5525695", "0.5512891", "0.55090153", "0.5507203", "0.5500718", "0.5496396", "0.5483409", "0.54768133", "0.5467745", "0.54625505", "0.54459983", "0.544449", "0.54412675", "0.54404277", "0.54169315", "0.5416394", "0.53971183", "0.5393206", "0.5388375", "0.53827655", "0.5380016", "0.5368273", "0.5362181", "0.5361918", "0.5356421", "0.5337335", "0.5323085", "0.5317252", "0.5308774", "0.5308466", "0.5293668", "0.52853006", "0.5273991", "0.5256144", "0.52440244", "0.5241379", "0.5219634", "0.5206427", "0.52063817", "0.52008647", "0.51993454", "0.5197576", "0.51934314", "0.51848125", "0.5183342", "0.518043", "0.5168504", "0.5168338", "0.5165692", "0.5159502", "0.51531255", "0.51531255" ]
0.7905469
0
Copy static files to target Ignoring JS, CSS & LESS Gulp handles that
Копирование статических файлов в целевую директорию, игнорируя JS, CSS & LESS. Gulp обрабатывает это.
public function copyStaticFiles() { $exclude = ['js', 'javascripts', 'stylesheets', 'less', 'sass']; // Include the excludes from the config $exclude = array_merge($exclude, (array) $this->app->getSetting('exclude', [])); // Create pattern $pattern = '/\\.(' . implode("|", $exclude) . ')$/'; // Get list of files & directories to copy $to_copy = (array) $this->app->getSetting('copy', []); // Assets folder is hardcoded into copy $to_copy = array_merge(['assets'], $to_copy); $to_copy = array_unique($to_copy); // Initialize file system $filesystem = new Filesystem(); // Fire event if ($response = Event::fire('copy.before', [$this, $to_copy])) { $to_copy = $response[0]; } // Copy foreach ($to_copy as $location) { $fileInfo = new \SplFileInfo($this->source . DIRECTORY_SEPARATOR . $location); // Copy a complete directory if ($fileInfo->isDir()) { $finder = new Finder(); $finder->files() ->exclude($exclude) ->notName($pattern) ->in($this->source . DIRECTORY_SEPARATOR . $location); foreach ($finder as $file) { $path = $location . DIRECTORY_SEPARATOR . $file->getRelativePathname(); echo "$path\n"; $source = $file->getRealPath(); $target = $this->target . DIRECTORY_SEPARATOR . $path; $filesystem->copy($source, $target); $this->app->writeln("Copied: <info>$path</info>"); } } // Copy Single File else { $filesystem->copy($fileInfo->getRealPath(), $this->target . DIRECTORY_SEPARATOR . $location); $this->app->writeln("Copied: <info>$location</info>"); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function copyAssets() {\n $this->core->component('file')->copyFolder('themes/' . $this->core->setting('theme') . '/assets/', 'public/assets/');\n }", "public function copyAssets()\n {\n $this->filesystem->copyDirectory(__DIR__ . '/../../resources/css', resource_path('css/vendor/crisvegadev/jet-dark'));\n }", "protected function copyPublicAssets()\n {\n $target = $this->__DIR__ . '/../../../../public';\n $source = $this->public_path . '/packages/devisephp/cms';\n $this->File->copyDirectory($target, $source);\n }", "private function copyJsFile()\n {\n $source = \"{$this->basePath}resources{$this->ds}js{$this->ds}a2h.js\";\n $destination = \"resources{$this->ds}js{$this->ds}\";\n $this->copyFilesFromSource($source, $destination);\n }", "protected static function copyRequiredFiles(): void {\n self::updateSass();\n self::updateBootstrapping();\n self::installVueComponent();\n }", "private function copyPublicRootFiles()\n {\n $source = [\n \"{$this->basePath}resources{$this->ds}manifest.json\",\n \"{$this->basePath}resources{$this->ds}serviceworker.js\",\n ];\n $destination = \"public{$this->ds}\";\n $this->copyFilesFromSource($source, $destination);\n }", "private function copyStaticFilesToPublic ($files)\n { \n foreach ($files as $file) \n {\n $this->deleteStaticFileIfExists($file);\n\n $this->streamCopy($this->templateDisk, $file['name'], 'public', $file['basename']);\n\n }\n }", "private function deployStaticContent()\n {\n if ($this->cleanStaticViewFiles) {\n $this->env->removeStaticContent();\n }\n $this->env->log(\"Generating fresh static content\");\n $this->generateFreshStaticContent();\n }", "private function copyFavicons()\n {\n $source = \"{$this->basePath}resources{$this->ds}images{$this->ds}favicons\";\n $destination = \"public{$this->ds}images{$this->ds}favicons\";\n $this->copyFilesFromSource($source, $destination);\n }", "protected function moveStatic() {\n\t\t\n\t\t// set-up the dispatcher\n\t\t$dispatcherInstance = Dispatcher::getInstance();\n\t\t\n\t\t// note the start of the operation\n\t\t$dispatcherInstance->dispatch(\"generator.moveStaticStart\");\n\t\t\n\t\t// common values\n\t\t$publicDir = Config::getOption(\"publicDir\");\n\t\t$sourceDir = Config::getOption(\"sourceDir\");\n\t\t$ignoreExt = Config::getOption(\"ie\");\n\t\t$ignoreDir = Config::getOption(\"id\");\n\t\t\n\t\t// iterate over all of the other files in the source directory\n\t\t$objects = new \\RecursiveIteratorIterator(new \\RecursiveDirectoryIterator($sourceDir), \\RecursiveIteratorIterator::SELF_FIRST);\n\t\t\n\t\t// make sure dots are skipped\n\t\t$objects->setFlags(\\FilesystemIterator::SKIP_DOTS);\n\t\t\n\t\tforeach($objects as $name => $object) {\n\t\t\t\n\t\t\t// clean-up the file name and make sure it's not one of the pattern lab files or to be ignored\n\t\t\t$fileName = str_replace($sourceDir.DIRECTORY_SEPARATOR,\"\",$name);\n\t\t\t\n\t\t\tif (($fileName[0] != \"_\") && (!in_array($object->getExtension(),$ignoreExt)) && (!in_array($object->getFilename(),$ignoreDir))) {\n\t\t\t\t\n\t\t\t\t// catch directories that have the ignored dir in their path\n\t\t\t\t$ignored = FileUtil::ignoreDir($fileName);\n\t\t\t\t\n\t\t\t\t// check to see if it's a new directory\n\t\t\t\tif (!$ignored && $object->isDir() && !is_dir($publicDir.\"/\".$fileName)) {\n\t\t\t\t\tmkdir($publicDir.\"/\".$fileName);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// check to see if it's a new file or a file that has changed\n\t\t\t\tif (!$ignored && $object->isFile() && (!file_exists($publicDir.\"/\".$fileName))) {\n\t\t\t\t\tFileUtil::moveStaticFile($fileName);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t// note the end of the operation\n\t\t$dispatcherInstance->dispatch(\"generator.moveStaticEnd\");\n\t\t\n\t}", "protected function moveStatic() {\n\t\t\n\t\t// set-up the dispatcher\n\t\t$dispatcherInstance = Dispatcher::getInstance();\n\t\t\n\t\t// note the start of the operation\n\t\t$dispatcherInstance->dispatch(\"generator.moveStaticStart\");\n\t\t\n\t\t// common values\n\t\t$publicDir = Config::getOption(\"publicDir\");\n\t\t$sourceDir = Config::getOption(\"sourceDir\");\n\t\t$ignoreExt = Config::getOption(\"ie\");\n\t\t$ignoreDir = Config::getOption(\"id\");\n\t\t\n\t\t// iterate over all of the other files in the source directory\n\t\t$objects = new \\RecursiveIteratorIterator(new \\RecursiveDirectoryIterator($sourceDir), \\RecursiveIteratorIterator::SELF_FIRST);\n\t\t\n\t\t// make sure dots are skipped\n\t\t$objects->setFlags(\\FilesystemIterator::SKIP_DOTS);\n\t\t\n\t\tforeach($objects as $name => $object) {\n\t\t\t\n\t\t\t// clean-up the file name and make sure it's not one of the pattern lab files or to be ignored\n\t\t\t$fileName = str_replace($sourceDir.DIRECTORY_SEPARATOR,\"\",$name);\n\t\t\t\n\t\t\tif (($fileName[0] != \"_\") && (!in_array($object->getExtension(),$ignoreExt)) && (!in_array($object->getFilename(),$ignoreDir))) {\n\t\t\t\t\n\t\t\t\t// catch directories that have the ignored dir in their path\n\t\t\t\t$ignored = FileUtil::ignoreDir($fileName);\n\t\t\t\t\n\t\t\t\t// check to see if it's a new directory\n\t\t\t\tif (!$ignored && $object->isDir() && !is_dir($publicDir.\"/\".$fileName)) {\n\t\t\t\t\tmkdir($publicDir.\"/\".$fileName);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// check to see if it's a new file or a file that has changed\n\t\t\t\tif (!$ignored && $object->isFile() && (!file_exists($publicDir.\"/\".$fileName))) {\n\t\t\t\t\tFileUtil::moveStaticFile($fileName);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t// note the end of the operation\n\t\t$dispatcherInstance->dispatch(\"generator.moveStaticEnd\");\n\t\t\n\t}", "public function defineAssetPublishing()\n {\n //\\File::deleteDirectory(public_path('vendor/missing'));\n $this->publishes([\n dirname(__DIR__, 1) . '/public' => public_path('vendor/missing'),\n ], 'public');\n }", "protected static function updateScripts()\n {\n copy(__DIR__ . '/stubs/resources/js/app.js', resource_path('js/app.js'));\n }", "protected function makeFiles()\n {\n $list = $this->getBuffer()->getScriptFiles();\n\n $html = \"\";\n\n foreach ($list as $path) {\n if($path[LibsFinder::L_MAIN] === true ){\n $html .= sprintf($this->templateScriptFile, $path[BufferCache::PATH_ABS]);\n }\n }\n\n $this->replace('js_links', $html);\n }", "protected function copyRsyncExcludes()\r\n\t{\r\n\t\t$manifest_current_name = FileLocator::MANIFEST_CURRENT_NAME;\r\n\t\t$dir_common = $this->mirror_dir.\"/../manifests/common/sync\";\r\n\t\t$dir_individual_manifest = $dir_common.\"/projects/\".$this->manifest;\r\n\t\t$this->isb\r\n\t\t\t\t->define(\r\n<<<INSTR\r\n\t\t\t\t\t\t\t\tmkdir -p $dir_individual_manifest;\r\n\t\t\t\t\t\t\t\tcp $this->mirror_dir/../manifests/$manifest_current_name/sync/sources.exclude $dir_individual_manifest/sources.exclude 2>/dev/null || true;\r\n\t\t\t\t\t\t\t\tcd $dir_common;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tcat general/sources.exclude projects/*/sources.exclude | awk '{if ($1 != \"#\") {print $0;}}' | grep -v '^$' > sources.exclude;\r\nINSTR\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t->onBefore()\r\n\t\t\t\t\t\t->doInformUser(\"> Copying sources.exclude in folder of all sources.exclude...\")\r\n\t\t\t\t->onFailure()\r\n\t\t\t\t\t->doWarnUser(\"Problem encountered while copying sources.exclude in folder of all sources.exclude. Manual intervention will probably be required. \")\r\n\t\t\t\t->execute();\r\n\t}", "private function copySampleAssets()\n {\n $sourceDir = dirname(dirname(__FILE__)) . '/' . $this->sampleAssetsBasePathInModule;\n\n try {\n $mediaDirectory = $this->filesystem->getDirectoryWrite(\n \\Magento\\Framework\\App\\Filesystem\\DirectoryList::MEDIA\n );\n $destinationDir = $mediaDirectory->getAbsolutePath() . 'wysiwyg/synchrony/sample_assets';\n // create destination dir if doesn't exist\n $this->fileManager->checkAndCreateFolder($destinationDir);\n $this->fileManager->cd($sourceDir);\n $files = $this->fileManager->ls(File::GREP_FILES);\n foreach ($files as $file) {\n if (!$file['is_image']) {\n continue;\n }\n $this->fileManager->cp($sourceDir . '/' . $file['text'], $destinationDir . '/' . $file['text']);\n }\n } catch (\\Exception $e) {\n // intentionally doing nothing, any issues here do not worth interrupting installation\n }\n }", "private function oneClick_Copy()\n {\n if (!Rules::isBrowserTriggerEnabled()) {\n @chmod($this->pathRootExtractedPiwik . '/misc/cron/archive.sh', 0755);\n }\n\n $model = new Model();\n\n /*\n * Copy all files to PIWIK_INCLUDE_PATH.\n * These files are accessed through the dispatcher.\n */\n Filesystem::copyRecursive($this->pathRootExtractedPiwik, PIWIK_INCLUDE_PATH);\n $model->removeGoneFiles($this->pathRootExtractedPiwik, PIWIK_INCLUDE_PATH);\n\n /*\n * These files are visible in the web root and are generally\n * served directly by the web server. May be shared.\n */\n if (PIWIK_INCLUDE_PATH !== PIWIK_DOCUMENT_ROOT) {\n /*\n * Copy PHP files that expect to be in the document root\n */\n $specialCases = array(\n '/index.php',\n '/piwik.php',\n '/js/index.php',\n );\n\n foreach ($specialCases as $file) {\n Filesystem::copy($this->pathRootExtractedPiwik . $file, PIWIK_DOCUMENT_ROOT . $file);\n }\n\n /*\n * Copy the non-PHP files (e.g., images, css, javascript)\n */\n Filesystem::copyRecursive($this->pathRootExtractedPiwik, PIWIK_DOCUMENT_ROOT, true);\n $model->removeGoneFiles($this->pathRootExtractedPiwik, PIWIK_DOCUMENT_ROOT);\n }\n\n /*\n * Config files may be user (account) specific\n */\n if (PIWIK_INCLUDE_PATH !== PIWIK_USER_PATH) {\n Filesystem::copyRecursive($this->pathRootExtractedPiwik . '/config', PIWIK_USER_PATH . '/config');\n }\n\n Filesystem::unlinkRecursive($this->pathRootExtractedPiwik, true);\n\n Filesystem::clearPhpCaches();\n }", "public static function updateScripts()\n {\n copy(__DIR__ . '/stubs/js/bootstrap.js', resource_path('js/bootstrap.js'));\n copy(__DIR__ . '/stubs/js/app.js', resource_path('js/app.js'));\n\n if (!File::isDirectory(resource_path('js/components/shared'))) {\n File::makeDirectory(resource_path('js/components/shared'));\n } else {\n File::cleanDirectory(resource_path('js/components/shared'));\n }\n copy(__DIR__ . '/stubs/js/components/shared/LoginForm.vue', resource_path('js/components/shared/LoginForm.vue'));\n copy(__DIR__ . '/stubs/js/components/shared/RegisterForm.vue', resource_path('js/components/shared/RegisterForm.vue'));\n\n static::$command->info('JS Directory: resources/js');\n }", "public static function updateGitignore()\n {\n File::append(base_path('.gitignore'), \"/public/js\\n/public/css\\n/public/mix-manifest.json\\n\");\n }", "public function moveScriptToExternalFile()\n {\n $fp = fopen($this->directory.'/log.txt', 'a+');\n fwrite($fp, '----Déplacement du code css/js '.date('Y-m-d H:i:s').\"\\n\");\n fclose($fp);\n\n $dom = $this->dom;\n\n //NOT WORK 100%, it depends of the content of JS\n $sAllScripts = '';\n\n /*\n $elems = $dom->find('script');\n foreach ($elems as $elem){\n if ($elem->getAttribute(\"async\") == \"\" and $elem->getAttribute(\"defer\") == \"\" and ($elem->getAttribute(\"type\") == \"text/javascript\" or $elem->getAttribute(\"type\") == \"\")){\n if ($elem->getAttribute(\"src\") == \"\"){\n if (stripos($elem->plaintext,\"CDATA\") === false){\n $sAllScripts .= $elem->plaintext;\n $elem->outertext = \"\";\n }\n }\n }\n }\n */\n file_put_contents($this->directory.'/js/__alljs__code.js', $sAllScripts);\n\n //NOT WORK 100%, it depends of the order of css files\n $sAllCss = '';\n /*\n $elems = $dom->find('style');\n foreach ($elems as $elem){\n $sAllCss .= $elem->plaintext;\n $elem->outertext = \"\";\n }\n\n */\n\t\t\n\t\t//Copy all import at the beginning of the new file\n\t\t$sAllImportCss = \"\";\n\t\t$files = scandir($this->directory.\"/css\");\n\t\tforeach ($files as $file){\n\t\t\tif ($file != \".\" and $file != \"..\" and $file != \"__allcss__import.css\" and $file != \"__allcss__code.css\" and $file != \"import\"){\n\t\t\t\t$fpcss = fopen($this->directory.\"/css/\".$file,\"r\");\n\t\t\t\twhile (!feof($fpcss)){\n\t\t\t\t\t$buffer = str_replace(\"\\r\",\"\",str_replace(\"\\n\",\"\",fgets($fpcss)));\n\n\t\t\t\t\tif (stripos($buffer,\"@import\") !== false){\n\t\t\t\t\t\t$sAllImportCss.= $buffer.\"\\r\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfclose($fpcss);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfile_put_contents($this->directory.'/css/__allcss__import.css', $sAllImportCss);\t\t\n file_put_contents($this->directory.'/css/__allcss__code.css', $sAllCss);\n file_put_contents($this->directory.'/index.html', $dom->outertext);\n\n $fp = fopen($this->directory.'/log.txt', 'a+');\n fwrite($fp, '----Déplacement du code css/js: OK '.date('Y-m-d H:i:s').\"\\n\");\n fclose($fp);\n }", "private function publishAssets()\n {\n // Auto-publish the assets when developing locally\n if ($this->app->environment() == 'local' && !$this->app->runningInConsole()) {\n $workbench = realpath(base_path().'/workbench');\n if (strpos(__FILE__, $workbench) === false) {\n $this->app->make('asset.publisher')->publishPackage('markokeeffe/image-upload');\n } else {\n $this->app->make('asset.publisher')->publishPackage('markokeeffe/image-upload', $workbench);\n }\n }\n }", "public function copyProjectExtraFiles(Event $event): void\n {\n $extras = $event->getComposer()->getPackage()->getExtra();\n if (array_key_exists('copy-files', $extras)) {\n $this->installer->getIo()->write(\n sprintf(' - Copied additional file(s)'),\n true\n );\n $this->copyExtras($extras['copy-files']);\n }\n }", "protected function defineAssetPublishing()\n {\n $this->publishes([\n WEBCLIP_PATH.'/public' => public_path('vendor/webclip'),\n ], 'webclip-assets');\n }", "function copy_asset( $path, $config = null ) {\n\t$dir = get_destination_directory( $config );\n\n\tif ( strpos( WP_CONTENT_DIR, ABSPATH ) === false ) {\n\t\t$destination = str_replace( dirname( ABSPATH ), $dir, $path );\n\t} else {\n\t\t$destination = str_replace( ABSPATH, $dir . '/', $path );\n\t}\n\n\t$destination = apply_filters( 'static_page_copy_asset_destination', $destination, $path, $config );\n\tif ( ! is_dir( dirname( $destination ) ) ) {\n\t\tmkdir( dirname( $destination ), 0755, true );\n\t}\n\tcopy( $path, $destination );\n}", "function copyAllJsFiles($jsFiles)\n\t{\n\t\tforeach($jsFiles as $file=>$reqFiles)\n\t\t{\n\t\t\t$this->includes_js[] = $file;\t\n\t\t\t\n\t\t\tif(array_key_exists($file,$this->includes_jsreq)){\t\n\t\t\t\tforeach($reqFiles as $rFile){\n\t\t\t\t\tif(array_key_exists($rFile,$this->includes_jsreq[$file]))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t$this->includes_jsreq[$file][] = $rFile;\n\t\t\t\t}\n\t\t\t}else\n\t\t\t\t$this->includes_jsreq[$file] = $reqFiles;\n\t\t}\t\n\t}", "function copyAllJsFiles($jsFiles)\n\t{\n\t\tforeach($jsFiles as $file=>$reqFiles)\n\t\t{\n\t\t\t$this->includes_js[] = $file;\n\t\t\t\n\t\t\tif(array_key_exists($file,$this->includes_jsreq)){\n\t\t\t\tforeach($reqFiles as $rFile){\n\t\t\t\t\tif(array_key_exists($rFile,$this->includes_jsreq[$file]))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t$this->includes_jsreq[$file][] = $rFile;\n\t\t\t\t}\n\t\t\t}else\n\t\t\t\t$this->includes_jsreq[$file] = $reqFiles;\n\t\t}\n\t}", "public function go()\n {\n // TODO: Implement go() method.\n $sourcePath = env('VIEW_PATH').'frontend'.DIRECTORY_SEPARATOR.env('THEME_NAME').DIRECTORY_SEPARATOR.'assets'.DIRECTORY_SEPARATOR;\n\n $destinationPath = env('ROOT_PATH').DIRECTORY_SEPARATOR.'public_html'.DIRECTORY_SEPARATOR.'assets'.DIRECTORY_SEPARATOR.env('THEME_NAME').DIRECTORY_SEPARATOR;\n\n echo 'From: '.$sourcePath.PHP_EOL;\n echo 'To: '.$destinationPath.PHP_EOL;\n $result = copy_dir($sourcePath,$destinationPath);\n echo $result ? 'Done!'.PHP_EOL : 'Failed!'.PHP_EOL;\n }", "function UPL_move_files_to_theme(){\r\n\r\n $theme_dir = UPL_site_active_theme() . '/ultimate-member/templates';\r\n\r\n if (! is_dir($theme_dir)) {\r\n mkdir( $theme_dir, 0777, true );\r\n }\r\n\r\n $src = UPL_PLUGIN_PATH.'/includes/core/profile-mycustomprofile.php';\r\n $dest = $theme_dir.'/profile-mycustomprofile.php';\r\n\r\n $src1 = UPL_PLUGIN_PATH.'/includes/core/profile.php';\r\n $dest1 = $theme_dir.'/profile.php';\r\n\r\n copy( $src, $dest);\r\n copy( $src1, $dest1);\r\n}", "function exportStatic() {\n\tglobal $artifacts;\n\n\t//make directory for export\n\tif (!file_exists('static')) mkdir('static');\n\n\t//create file for each artifact\n\tfor ($i = 0; $i < sizeof($artifacts); $i++) {\n\t\t$artifact = $artifacts[$i];\n\t\t$file = 'static/' . $artifact->attributes['name'] . '.html';\n\n\t\tif (!file_exists($file)) {\n\t\t\t$handle = fopen($file, 'w') or die('Cannot open file: ' . $file);\n\t\t\tob_start();\n\t\t\tinclude 'assets/template.php';\n\t\t\t$data = ob_get_contents();\n\t\t\tob_end_clean();\n\t\t\tfwrite($handle, $data);\n\t\t}\n\t}\n}", "private function copy_language_files() {\n\t\t$_tests_dir = getenv( 'WP_TESTS_DIR' );\n\t\t$_from_dir = dirname( dirname( __FILE__ ) ) . '/languages';\n\t\t$_to_dir = $_tests_dir . '/data/languages';\n\n\t\t// Put ja_JP.mo file.\n\t\ttouch( $_to_dir . '/ja_JP.mo' );\n\n\t\t// Copy *-ja.mo then rename to *-ja_JP.mo .\n\t\tcopy( $_from_dir . '/combined-calendar-ja.mo', $_to_dir . '/plugins/combined-calendar-ja_JP.mo' );\n\t}", "function assets($path, $uri=true) {\n if ($uri) {\n return trailingslashit(get_stylesheet_directory_uri()).'dist/'.$path;\n }\n return trailingslashit(get_stylesheet_directory()).'dist/'.$path;\n}", "private function backupDeployerFiles()\n {\n if (!file_exists($this->backupPath)) {\n mkdir($this->backupPath, 0777);\n }\n\n $excludes = $this->exclude;\n\n array_push(\n $excludes,\n __ROOT_DIRECTORY__ . '/vendor'\n );\n\n r_copy(__ROOT_DIRECTORY__, $this->backupPath, $excludes);\n r_rmdir(__ROOT_DIRECTORY__, $this->exclude);\n }", "public function copyFiles(): void\n {\n file_put_contents(\n config_path('auth.php'),\n $this->compileFileStub('config/auth.stub')\n );\n\n foreach ($this->filesToCopy as $stub => $file) {\n file_put_contents(\n app_path($file),\n $this->compileFileStub($stub)\n );\n }\n }", "public function addJssFiles()\n {\n $this->addJssFilesJqueryUiLibrary();\n $this->addJssFilesJqueryPluginsT3Browser();\n $this->addJssFilesJssAjaxModuleI();\n $this->addJssFilesJqueryPluginsT3BrowserCalendar();\n $this->addJssFilesJqueryPluginsJsTree();\n $this->addJssFilesJqueryCleanUp();\n }", "public function copyToDeployDirectory() {\n $source = Variables::BinaryCompilationFilepath()->get();\n $targetDirectory = Variables::DeployDirectory()->get();\n $target = $targetDirectory . \"/\" . Variables::BinaryFilename()->get();\n copy( $source, $target);\n printf(\"Copying [%s] to [%s]\\n\", $source, $target);\n }", "public function copyFiles()\n {\n file_put_contents(\n config_path('auth.php'),\n $this->compileFileStub('config/auth.stub')\n );\n\n foreach ($this->filesToCopy as $stub => $file) {\n file_put_contents(\n app_path($file),\n $this->compileFileStub($stub)\n );\n }\n }", "private static function addfiles(){\n self::include_file('wp-ci-assets');\n self::include_file('wp-ci-db-connect');\n self::include_file('wp-ci-builtin');\n self::include_file('wp-ci-template');\n self::include_file('wp-ci-page-template');\n }", "public function compile($compile= Resources::NONE) {\n require_once __DIR__.'/cssmin-v3.0.1.php';\n require_once __DIR__.'/jsmin.php';\n $asset = new AssetCollection();\n $this->resources->each(function($key, $value) use (&$asset) {\n if ($value->flag)\n $asset->add(new FileAsset($value->asset));\n else\n $asset->add(new GlobAsset($value->asset));\n });\n if($compile==Resources::JS){\n $asset->ensureFilter(new \\Assetic\\Filter\\JSMinFilter());\n }\n if($compile==Resources::CSS)\n $asset->ensureFilter(new \\Assetic\\Filter\\CssMinFilter()); \n// the code is merged when the asset is dumped\n $bundles = \\Raptor\\Core\\Location::get('web_bundles');\n\n if (!file_exists($bundles . $this->bundleName))\n mkdir($bundles . $this->bundleName, 0777, true);\n \n if ($this->name[0] == '/' or $this->name[0] == DIRECTORY_SEPARATOR)\n unset($this->name[0]);\n $dir = dirname($bundles . $this->bundleName . '/' . $this->name);\n if (!file_exists($dir))\n mkdir($dir, 0777, true);\n\n if ($this->force == true)\n file_put_contents($bundles . $this->bundleName . '/' . $this->name, $asset->dump());\n else {\n if (!file_exists($bundles . $this->bundleName . '/' . $this->name))\n file_put_contents($bundles . $this->bundleName . '/' . $this->name, $asset->dump());\n }\n\n }", "public function copyAction() {\r\n\t\t$extDir = ExtensionManagementUtility::extPath($this->extKey);\r\n\t\t$filename = $extDir.'Resources/Public/Contrib/Bootstrap/less/variables.less';\r\n\t\tif (file_exists($filename)) {\r\n\t\t\t$copyPath = GeneralUtility::getFileAbsFileName('fileadmin/BootstrapLessConfig/');\r\n\t\t\tif (!is_dir($copyPath)) GeneralUtility::mkdir($copyPath);\r\n\t\t\tif ( copy($filename,$copyPath.'variables_copy.less') && copy($filename,$copyPath.'variables_'.time().'.less') ) {\r\n\t\t\t\t$this->addFlashMessage('Success! Your configuration has been saved to fileadmin/BootstrapLessConfig/variables_copy.less & variables_'.time().'.less', '', AbstractMessage::OK);\r\n\t\t\t} else {\r\n\t\t\t\t$this->addFlashMessage('Copy failed', '', AbstractMessage::ERROR);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t $this->addFlashMessage('This file is not writable', '', AbstractMessage::ERROR);\r\n\t\t}\r\n\r\n\t\t$this->redirect('index');\r\n\t}", "public static function copyBlog(){\n\t\t$source = self::$source;\n\t\t$dest = self::$destination;\n\t\t$permissions = self::$permissions;\n\n\t\t$sourceFiles = $source.\"/*\";\n\t\t$destFiles = $dest.\"/\";\n\n\t\t// $command = \"cp -r $sourceFiles $destFiles\";\n\t\t$command = \"rsync -a $sourceFiles $destFiles --exclude='*.zip' --exclude='*.sql*' --exclude='wp-content/uploads/*' --exclude='*.tar*' --exclude='*.php-*' --exclude='*.css-*' --exclude='*.js-*' --exclude='*.log*' --exclude='wp-content/plugins/aw-newsfeed/includes/data/*'\";\n\t\tshell_exec($command);\n\n\n\t\t$commandPer \t=\t\"chown -R artworld:testing $destFiles\";\n\t\tshell_exec($commandPer);\n\n\t\t$commandFiles \t=\t\"find $destFiles -type f exec chmod 664 {} \\;\";\n\t\tshell_exec($commandFiles);\n\n\t\t$commandFolders\t=\t\"find $destFiles -type d exec chmod 775 {} \\;\";\n\t\tshell_exec($commandFolders);\n\n\t\t$message = \"Success: Blog Copied successfully.\";\n\t\tAwbLog::writeLog($message);\n\t\treturn true;\n\t}", "public function copyResource(string $source, string $destination, array $excludeData = []): void\n {\n $directory = __APP_DIR__ . '/resources/' . $source;\n // Collection of dot files that should be converted to correct name\n $dotFiles = [\n 'gitkeep' => '.gitkeep',\n 'site/env' => 'site/.env',\n 'dockerignore' => '.dockerignore',\n ];\n\n $iterator = new \\RecursiveIteratorIterator(\n new \\RecursiveDirectoryIterator($directory, \\RecursiveDirectoryIterator::SKIP_DOTS),\n \\RecursiveIteratorIterator::SELF_FIRST\n );\n\n foreach ($iterator as $file) {\n /** @var SplFileInfo $file */\n $relativePath = str_replace($directory, '', $file->getPath());\n $fileName = strtr($iterator->getSubPathName(), $dotFiles);\n $filePath = $destination . DIRECTORY_SEPARATOR . $fileName;\n\n // Ignore MAC .DS_Store\n if ($file->getFilename() === '.DS_Store') {\n continue;\n }\n\n if ($file->isDir()) {\n if (!is_dir($filePath)) {\n mkdir($filePath, 0755, true);\n }\n $this->getCommand()->debug('Make dir: ' . $filePath);\n } elseif (!in_array($relativePath, $excludeData, true)) {\n $this->getCommand()->debug('Copy: ' . $file->getPathname() . ' to ' . $filePath);\n\n // Copy file\n if (file_exists($filePath)) {\n unlink($filePath);\n }\n if (!copy($file, $filePath)) {\n $this->getCommand()->getOutputStyle()->error(sprintf('Failed to copy: %s', $file->getPathname()));\n }\n\n // Temporary hack for now\n if ('start' === $file->getFilename() && !chmod($filePath, 0750)) {\n $this->getCommand()->getOutputStyle()->error(sprintf('Failed to set permission: %s', $file->getPathname()));\n }\n }\n }\n }", "public function publicizeDirs()\n {\n $compiler = new PublicizeFilesCompiler($this->tempDir, $this->wwwDir);\n $compiler->setData($this->publicize);\n $compiler->compile();\n }", "public function collectTestFiles()\n {\n $staticDir = __DIR__ . '/../../../static/testing/' . $this->type;\n\n $finder = new Finder();\n $finder->files()\n ->name('*.' . $this->type)\n ->notName('*min*')\n ->ignoreDotFiles(true)\n ->sortByName()\n ->in($staticDir);\n\n foreach ($finder as $file) {\n $this->appendFile(new File($file->getRealpath()));\n }\n }", "private function CopyFiles()\n {\n $root = $_SERVER['DOCUMENT_ROOT'];\n \n foreach ($this->Package_Files AS $source => $destination) \n {\n $t_source = \"{$root}/{$source}\";\n $t_destination = \"{$root}/{$this->Package_Directory}/{$this->Package_Folder}/{$destination}\";\n $copy_result = $this->smartCopy($t_source, $t_destination);\n \n if (!$copy_result) {\n $this->OutputMessage (\"<b style='color:red;'>FILE DID NOT COPY:</b <br /><b>Source</b> ==> {$t_source} <br /><b>Destination</b> ==> {$t_destination} <br />\");\n } else {\n $this->OutputMessage (\"<b style='color:blue;'>FILE COPIED:</b <br /><b>Source</b> ==> {$t_source} <br /><b>Destination</b> ==> {$t_destination} <br />\");\n }\n \n \n # write the contents for the file (install.php)\n $temp = explode('/', $source);\n $count = count($temp);\n \n $source_filename = $temp[$count-1];\n $source_filename_length = strlen($source_filename);\n \n $temp_length = -($source_filename_length);\n $destination_new = substr($source, 0, $temp_length);\n $source_new = \"{$destination}{$source_filename}\";\n \n $this->Install_File_Content_FILES .= \"'{$source_new}' => '{$destination_new}',\n \";\n \n \n # write the contents for the file (remove.php)\n $delete_file = \"{$destination_new}{$source_filename}\";\n $this->Remove_File_Content_FILES .= \"'{$delete_file}',\n \";\n \n }\n \n ### TO DO ###\n # determine if folder exists - create if not there\n # determine if file exists - copy if not - ask to overwrite if YES\n }", "public function minify() \n {\n $this->log('Starting minify...');\n \n \t$minifier = new Minifier();\n\n\t\ttry {\n\t\t\t$minifier->minify();\n\n if ($this->_is_production) {\n\t\t\t\t$command = 'rsync -av --exclude-from=/DISK/prologistics.info/excl /DISK/prologistics.info/public_html/css prologisticssh@148.251.40.98:public_html/';\n $this->_execute($command);\n\t\t\t\t$command = 'rsync -av --exclude-from=/DISK/prologistics.info/excl /DISK/prologistics.info/public_html/js prologisticssh@148.251.40.98:public_html/';\n\t\t\t\t$this->_execute($command);\n\t\t\t}\n\t\t} catch (Exception $e) {\n $this->log($e->getMessage());\n\t\t}\n }", "private function _addDefaultFiles()\n {\n $default_scripts = array(\n 'jquery/jquery.maskedinput.min.js',\n '/minified/common.js'\n );\n foreach ($default_scripts as $key => $filename) {\n $this->addFile($filename, 'js');\n }\n\n $default_stylesheets = array(\n 'minified/reset.css',\n 'minified/absolution.css',\n 'minified/common.css'\n );\n foreach ($default_stylesheets as $key => $filename) {\n $this->addFile($filename, 'css');\n }\n }", "function genesis_extender_copy_dir( $source, $destination )\r\n{\r\n\tif( is_dir( $source ) )\r\n\t{\r\n\t\tif( !is_dir( $destination ) )\r\n\t\t{\r\n\t\t\t@mkdir( $destination, 0755, true );\r\n\t\t}\r\n\t\t$handle = opendir( $source );\r\n\t\twhile( false !== ( $readdirectory = readdir( $handle ) ) )\r\n\t\t{\r\n\t\t\tif( $readdirectory == '.' || $readdirectory == '..' )\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t$pathdir = $source . '/' . $readdirectory; \r\n\t\t\tif( is_dir( $pathdir ) )\r\n\t\t\t{\r\n\t\t\t\tgenesis_extender_copy_dir( $pathdir, $destination . '/' . $readdirectory );\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tcopy( $pathdir, $destination . '/' . $readdirectory );\r\n\t\t}\r\n\t\tclosedir( $handle );\r\n\t}\r\n\telse\r\n\t{\r\n\t\tcopy( $source, $destination );\r\n\t}\r\n}", "function shiftnav_backup_custom_assets(){\n\n\t$custom_dir = trailingslashit( SHIFTNAV_DIR ).'custom/';\n\n\t$custom_css = $custom_dir.'custom.css';\n\tif( file_exists( $custom_css ) ){\n\t\tshiftnav_backup_file( $custom_css , 'custom.css' , 'css' );\n\t}\n\n\t$custom_less = $custom_dir.'custom.less';\n\tif( file_exists( $custom_less ) ){\n\t\tshiftnav_backup_file( $custom_less , 'custom.less' , 'less' );\n\t}\n\n\t$custom_js = $custom_dir.'custom.js';\n\tif( file_exists( $custom_js ) ){\n\t\tshiftnav_backup_file( $custom_js , 'custom.js' , 'js' );\n\t}\n\n}", "public function compile()\n {\n $minify = $this->config->minify;\n\n // If we are concatenating files, then open a file pointer\n if ($concatenate = $this->config->concatenate) {\n $output = fopen($this->dest.'/'.$this->config->output, 'w');\n }\n\n // Loop through each of the input files\n foreach ($this->files as $file) {\n // Get the contents of the file\n $css = file_get_contents($file);\n\n // Minify if necessary\n if ($minify) {\n $css = $this->minify($css);\n }\n\n // If concatenating, write to the file pointer\n if ($concatenate) {\n fwrite($output, $css);\n continue;\n }\n\n // Write a new file to the output directory\n file_put_contents($this->dest.'/'.$file, $css);\n }\n\n // Close the file pointer\n if ($concatenate) {\n fclose($output);\n }\n }", "function filterFiles()\n{\n global $HTML_SRC, $HTML_TARGET, $INDEX_FILE, $LANGUAGE;\n \n // How many files were processed\n $counter = 0;\n \n // Try to figure out what index file to use\n if (file_exists(\"$HTML_SRC/index.html\")) {\n $INDEX_FILE = \"index.html\";\n } else { $INDEX_FILE = \"manual.html\"; }\n\n // Open the directory, and do the work on all HTML files\n $handle = opendir($HTML_SRC);\n while (false !== ($filename = readdir($handle))) {\n // Only process html files\n if (strpos($filename, \".html\")) {\n $counter++;\n refineFile($filename);\n echo \"> $counter\\r\";\n }\n }\n closedir($handle);\n\n // Copy all supplemental files to the target directory\n exec(\"copy suppfiles\\\\html $HTML_TARGET /Y\");\n \n // Copy all HTML Help files to the target directory too\n exec(\"copy $HTML_SRC\\\\php_manual_$LANGUAGE.hh? $HTML_TARGET /Y\");\n \n // Rewrite script file to include current language and date\n $script_js = join(\"\", file(\"$HTML_TARGET/_script.js\"));\n $script_js = str_replace(\"LANGUAGE_HERE\", $LANGUAGE, $script_js);\n $script_js = str_replace(\"DATE_HERE\", date(\"Y-m-d\"), $script_js);\n $fp = fopen(\"$HTML_TARGET/_script.js\", \"w\");\n fwrite($fp, $script_js);\n fclose($fp);\n \n return $counter;\n}", "function copy_loop($start_path, $final_path){\n\n global $xerte_toolkits_site;\n\n if (!file_exists($final_path)) {\n mkdir($final_path, 0777, true);\n }\n\n $d = opendir($start_path);\n\n while($f = readdir($d)){\n\n if(is_dir($start_path . $f)){\n\n if(($f!=\".\")&&($f!=\"..\")){\n\n copy_loop($start_path . $f . \"/\", $final_path . $f . \"/\");\n\n }\t\t\t\n\n }else{\n $ok = copy($start_path . $f, $final_path . $f);\n /*\n $data = file_get_contents($start_path . $f);\n\n $fh = fopen($final_path . $f, \"w\");\n\n fwrite($fh,$data);\n\n fclose($fh);\n */\n }\n\n }\t\n\n closedir($d);\n\n}", "private function process_files() {\n\t\t\n\t\tforeach ( $this->files as $i=>$entry ) {\n\t\t\t\n\t\t\tif ( is_array($entry) ) {\n\t\t\t\t$dest \t= array_keys($entry);\n\t\t\t\t$dest\t= $dest[0];\n\t\t\t\t\n\t\t\t\t$source = $entry[$dest];\n\t\t\t\t$dest\t= $this->dest . $dest;\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t$source = $this->source . $entry;\n\t\t\t\t$dest\t= $this->dest . $entry;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Exclude a file by part of it's detination path\n\t\t\tif ( $this->is_skip_file_path($dest) ) continue;\n\t\t\t\n\t\t\t// SYNCRONIZATION MODE:\n\t\t\t// does not override files who didn't changed since last syncronization\n\t\t\tif ( $this->sync === 'sync' && $this->exists($dest) ) {\n\t\t\t\t\n\t\t\t\tif ( !( filemtime($source) > filemtime($dest) ) ) {\t\t\t\t\n\t\t\t\t\tdebug(\"SKIP SYNC: \" . $dest );\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Process file throught proper object\n\t\t\techo '. '; flush();\n\t\t\t$action = new $this->FileProcessor( $source, $dest, $this->file_uglify_level( $dest ) );\n\t\t\t\n\t\t}\n\t\t\n\t}", "public function tempToLive() {\n\n $styles = ['json', 'base', 'theme', 'grid', 'icons'];\n\n foreach ($styles as $style) {\n $from = $this->getStyleSheetFilename($style);\n $to = $this->getStyleSheetFilename($style, TRUE);\n if (file_exists($from)) {\n // Copy the file.\n file_unmanaged_move($from, $to, FILE_EXISTS_REPLACE);\n }\n }\n\n // Clean up.\n $this->refreshCaches();\n }", "function _kashmir_get_files_to_copy() {\n $files = [\n '.editorconfig',\n '.eslintignore',\n '.eslintrc',\n '.gitignore',\n '.stylelintrc',\n 'components',\n 'fonts',\n 'gulp',\n 'gulpfile.js',\n 'images',\n 'js',\n 'package-lock.json',\n 'package.json',\n 'sass',\n 'kashmir.info.yml',\n 'kashmir.theme',\n 'kashmir.breakpoints.yml',\n 'kashmir.libraries.yml',\n 'screenshot.png',\n 'README.md',\n 'templates',\n ];\n\n return $files;\n}", "function beaver_extender_copy_dir( $source, $destination ) {\r\n\t\r\n\tif ( is_dir( $source ) ) {\r\n\t\t\r\n\t\tif ( !is_dir( $destination ) )\r\n\t\t\t@mkdir( $destination, 0755, true );\r\n\r\n\t\t$handle = opendir( $source );\r\n\t\twhile( false !== ( $readdirectory = readdir( $handle ) ) ) {\r\n\t\t\t\r\n\t\t\tif ( $readdirectory == '.' || $readdirectory == '..' )\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\t$pathdir = $source . '/' . $readdirectory; \r\n\t\t\tif ( is_dir( $pathdir ) ) {\r\n\t\t\t\t\r\n\t\t\t\tbeaver_extender_copy_dir( $pathdir, $destination . '/' . $readdirectory );\r\n\t\t\t\tcontinue;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tcopy( $pathdir, $destination . '/' . $readdirectory );\r\n\t\t\t\r\n\t\t}\r\n\t\tclosedir( $handle );\r\n\t\t\r\n\t} else {\r\n\t\t\r\n\t\tcopy( $source, $destination );\r\n\t\t\r\n\t}\r\n\t\r\n}", "public function process(&$s) {\n $this->css_file = $this->js_file = $this->sprite_file = $this->exists_file = array();\n $changed = 0;\n\n // static\n if (strpos($s, '<!--{static') !== false) {\n $s = preg_replace_callback(\"#<!--{static\\s+(\\S*?)\\s+?([^}]*?)}-->\\s*#is\", array($this, 'get_compress'), $s);\n $changed = 1;\n }\n\n if ($changed) {\n !is_dir($this->static_dir) && mkdir($this->static_dir, 0777, 1);\n\n // make css file\n if ($this->css_file) {\n foreach ($this->css_file as $filename => $body) {\n if ($body) {\n file_put_contents($this->static_dir . $filename, $body);\n }\n $this->cache_generate_files[$filename] = 1;\n }\n }\n // make js file\n if ($this->js_file) {\n foreach ($this->js_file as $filename => $body) {\n if ($body) {\n file_put_contents($this->static_dir . $filename, $body);\n }\n $this->cache_generate_files[$filename] = 1;\n }\n }\n // copy sprite file\n if ($this->sprite_file) {\n foreach ($this->sprite_file as $filename) {\n copy($filename, $this->static_dir . basename($filename));\n }\n }\n\n unset($this->css_file, $this->js_file);\n }\n }", "public function copyFiles($files)\n {\n collect($files)->each(function ($destination, $source) {\n collect($destination)->each(function ($destination) use ($source) {\n $source = $this->makeFileName($source);\n\n $destination = $this->makeFileName($destination, $source);\n\n if (! $this->files->exists($directory = dirname($destination))) {\n $this->files->makeDirectory($directory, 0755, true);\n }\n\n $this->files->copy($source, $destination);\n });\n });\n }", "private function copyDynamicFilesToViews ($files)\n { \n \n foreach ($files as $file) \n {\n $this->deleteDynamicFileIfExists ($file);\n\n $this->streamCopy($this->templateDisk, $file['name'], 'resources', 'views/' . $file['basename']);\n }\n\n }", "function export() {\n\t\tif(isset($_REQUEST['baseurl'])) {\n\t\t\t$base = $_REQUEST['baseurl'];\n\t\t\tif(substr($base,-1) != '/') $base .= '/';\n\t\t\tDirector::setBaseURL($base);\n\t\t}\n\t\t\n\t\t// setup temporary folders\n\t\t$tmpBaseFolder = TEMP_FOLDER . '/static-export';\n\t\t$tmpFolder = (project()) ? \"$tmpBaseFolder/\" . project() : \"$tmpBaseFolder/site\";\n\t\tif(!file_exists($tmpFolder)) Filesystem::makeFolder($tmpFolder);\n\t\t$baseFolderName = basename($tmpFolder);\n\n\t\t// symlink /assets\n\t\t$f1 = ASSETS_PATH;\n\t\t$f2 = Director::baseFolder() . '/' . project();\n\t\t`cd $tmpFolder; ln -s $f1; ln -s $f2`;\n\n\t\t// iterate through all instances of SiteTree\n\t\t$pages = DataObject::get(\"SiteTree\");\n\t\tforeach($pages as $page) {\n\t\t\t$subfolder = \"$tmpFolder/$page->URLSegment\";\n\t\t\t$contentfile = \"$tmpFolder/$page->URLSegment/index.html\";\n\t\t\t\n\t\t\t// Make the folder\t\t\t\t\n\t\t\tif(!file_exists($subfolder)) {\n\t\t\t\tFilesystem::makeFolder($subfolder);\n\t\t\t}\n\t\t\t\n\t\t\t// Run the page\n\t\t\tRequirements::clear();\n\t\t\t$link = Director::makeRelative($page->Link());\n\t\t\t$response = Director::test($link);\n\n\t\t\t// Write to file\n\t\t\tif($fh = fopen($contentfile, 'w')) {\n\t\t\t\tfwrite($fh, $response->getBody());\n\t\t\t\tfclose($fh);\n\t\t\t}\n\t\t}\n\n\t\t// copy homepage (URLSegment: \"home\") to webroot\n\t\tcopy(\"$tmpFolder/home/index.html\", \"$tmpFolder/index.html\");\t\t\t\n\t\t\n\t\t// archive all generated files\n\t\t`cd $tmpBaseFolder; tar -czhf $baseFolderName.tar.gz $baseFolderName`;\n\t\t$archiveContent = file_get_contents(\"$tmpBaseFolder/$baseFolderName.tar.gz\");\n\t\t\n\t\t// remove temporary files and folder\n\t\tFilesystem::removeFolder($tmpBaseFolder);\n\t\t\n\t\t// return as download to the client\n\t\t$response = HTTPRequest::send_file($archiveContent, \"$baseFolderName.tar.gz\", 'application/x-tar-gz');\n\t\techo $response->output();\n\t}", "function jstools_minify($path, $base_url = false)\n{\n $target = filesystem_minified_path($path, 'js');\n $source = filesystem_realpath($path);\n if (file_exists($target) && filemtime($target) >= filemtime($source)) {\n return $target;\n }\n exec(sprintf(\n 'uglifyjs %s --comments > %s',\n escapeshellarg($source),\n escapeshellarg($target)\n ));\n return $target;\n\n}", "public function testImportNoWrite()\n {\n $basePath = TESTS_ROOT . 'app' . DS . 'js' . DS;\n $this->task->setDestinationsMap([\n $basePath . 'simple.js' => $basePath . 'output.js'\n ]);\n $this->task->disableWriteFile();\n $result = $this->task->run();\n\n $this->assertInstanceOf(Result::class, $result);\n $this->assertEquals(Result::EXITCODE_OK, $result->getExitCode());\n $this->assertFalse(file_exists($basePath . 'output.js'));\n\n $source = $basePath . 'simple.js';\n $expectedLog = 'Minified JS from <info>' . $source . '</info>';\n $this->assertEquals(\n $expectedLog,\n $this->task->logger()->getLogs()[0]\n );\n }", "public static function installRequirementsFile(Event $event) {\n $options = $event->getComposer()->getPackage()->getExtra()[\"mlab_specific\"];\n $files = $options[\"js_libraries\"];\n \n//Current working directory = root of Symfony project\n//loop through files defined in the local array and download them\n foreach ($files as $destination => $source) {\n $filename = basename($source);\n\n//zip files must be unzipped, first download the zip file to a local file, then \n if (substr($source, -3) == \"zip\") {\n if (!copy($source, \"./\" . $filename)) {\n break;\n } else {\n\n//there may be multiple files that we want from a single archive, these are delimited in the destination variable with a pipe ( | ) symbol.\n $extract_files = explode(\"|\", $destination);\n $zip = new \\ZipArchive;\n if ($zip->open($filename) === true) {\n\n//files we want may be inside a folder, therefore we must loop through all files to get the right one\n for($i = 0; $i < $zip->numFiles; $i++) {\n $zipped_file = $zip->getNameIndex($i);\n $zipped_file_name = pathinfo($zipped_file)['basename'];\n\n foreach ($extract_files as $extract_file) {\n if ($zipped_file_name == basename($extract_file)) {\n copy(\"zip://\".$filename.\"#\".$zipped_file, $extract_file);\n }\n }\n } \n\n $zip->close();\n unlink(\"./\" . $filename);\n } else {\n\n }\n }\n\n } else {\n if (!copy($source, $destination)) {\n break;\n }\n }\n }\n }", "public function __invoke(Project $project): void\n {\n $files = $project->sourceFiles();\n $files\n ->name('*.gif')\n ->name('*.png')\n ->name('*.jpg')\n ->name('*.jpeg')\n ->name('*.svg');\n\n $project->watchlist->watchFiles($files);\n\n /** @var SplFileInfo $file */\n foreach ($files as $file) {\n $project->addFile(new LazyFile($file->getPathname(), $file->getRelativePathname()));\n }\n }", "public function publishAssets()\n {\n $dir = dirname(__FILE__).DIRECTORY_SEPARATOR.'assets';\n \n $this->baseUrl = Yii::app()->getAssetManager()->publish($dir);\n }", "function prepare_static($skip_caching=false) {\r\n // Why?:\r\n // Basic way of hiding what extensions you are using\r\n // The list can get kinda long, has to be served on each request\r\n if ($skip_caching || !$this->isCached()) {\r\n $js_hash = hash('md4', implode('/',$this->javascript));\r\n $css_hash = hash('md4', implode('/',$this->css));\r\n if(!is_file('min/groups/'.$js_hash.'.php'))\r\n file_put_contents('min/groups/'.$js_hash, serialize(array($js_hash => $this->javascript)));\r\n if(!is_file('min/groups/'.$css_hash.'.php'))\r\n file_put_contents('min/groups/'.$css_hash, serialize(array($css_hash => $this->css)));\r\n $this->assign('js_url', '/min/?g='.$js_hash);\r\n $this->assign('css_url', '/min/?g='.$css_hash);\r\n }\r\n }", "public function createNetlifySpecialFiles() : void {\n if ( $this->settings['currentDeploymentMethod'] !== 'netlify' ) {\n return;\n }\n\n if ( isset( $this->settings['netlifyRedirects'] ) ) {\n $redirect_content = $this->settings['netlifyRedirects'];\n $redirect_path = $this->archive_path . '_redirects';\n file_put_contents( $redirect_path, $redirect_content );\n chmod( $redirect_path, 0664 );\n }\n\n if ( isset( $this->settings['netlifyHeaders'] ) ) {\n $header_content = $this->settings['netlifyHeaders'];\n $header_path = $this->archive_path . '_headers';\n file_put_contents( $header_path, $header_content );\n chmod( $header_path, 0664 );\n }\n }", "public function convertFiles($source,$destination);", "public function defineAssetPublishing()\n {\n $this->publishes([\n HORIZON_PATH.'/public' => public_path('vendor/horizon'),\n ], ['horizon-assets', 'laravel-assets']);\n }", "protected function copyFiles()\n {\n $this->logger->log(\"Copying files\\n\");\n \n $count = 0;\n foreach ($this->filesToCopy as $srcFile=>$dstFile) {\n \n $srcFile = str_replace('//', '/', $srcFile);\n $dstFile = str_replace('//', '/', $dstFile);\n \n if(!is_dir(dirname($dstFile)))\n mkdir(dirname($dstFile), 0775, true);\n if(!is_readable($srcFile)) {\n $this->warnings[] = 'Failed to copy file: ' . $srcFile;\n $this->logger->log('Failed to copy file: ' . $srcFile . \"\\n\");\n } else if(copy($srcFile, $dstFile)) {\n $this->logger->log(\"Copied file \" . $srcFile . \" to \" . $dstFile . \"\\n\");\n $count ++;\n }\n }\n \n $this->logger->log(\"$count files copied.\\n\");\n }", "function deploy() {\n\n // Execute build pipeline\n if( !build( LOCALREPOSITORY, BUILDPIPELINE )) {\n cleanup( LOCALREPOSITORY );\n return;\n }\n\n // Copy files to production environment\n if(defined('SOURCEDIR') && defined('TARGETDIR')) {\n $sourcetarget = array([SOURCEDIR, TARGETDIR]);\n } else {\n $sourcetarget = SOURCETARGET;\n }\n if( !copyToProduction( LOCALREPOSITORY, $sourcetarget, DELETE_FILES, EXCLUDE )) {\n cleanup( LOCALREPOSITORY );\n return;\n }\n\n // Execute post deploy pipeline\n if( !post( LOCALREPOSITORY, POSTPIPELINE )) {\n cleanup( LOCALREPOSITORY );\n return;\n }\n\n // Remove the `LOCALREPOSITORY` (depends on CLEAN_UP)\n cleanup( LOCALREPOSITORY );\n}", "function copyAllCssFiles($cssFiles)\n\t{\n\t\tforeach($cssFiles as $file)\n\t\t\t$this->AddCSSFile($file);\n\t}", "function copyAllCssFiles($cssFiles)\n\t{\n\t\tforeach($cssFiles as $file)\n\t\t\t$this->AddCSSFile($file);\n\t}", "private function _getFilesForCopy() {\n \t\n \t$files = array();\n \t\n \t// Index\n \t$files[] = 'version.txt';\n \t$files[] = 'index.php';\n \t$files[] = '.htaccess';\n \t$files[] = 'favicon.ico';\n \t$files[] = 'composer.json';\n \t$files[] = 'artisan';\n \t\n \t// Config folder\n \t$files[] = 'config/.htaccess';\n \t$files[] = 'config/database.php';\n \t$files[] = 'config/app.php';\n \t$files[] = 'config/auth.php';\n \t$files[] = 'config/cache.php';\n \t$files[] = 'config/compile.php';\n \t$files[] = 'config/filesystems.php';\n \t$files[] = 'config/queue.php';\n \t$files[] = 'config/services.php';\n \t$files[] = 'config/view.php';\n \t$files[] = 'config/workbench.php';\n \t$files[] = 'config/hashing.php';\n \t$files[] = 'config/mail.php';\n \t$files[] = 'config/session.php';\n \t\n \t// Bootstrap folder\n \t$files[] = 'bootstrap/.htaccess';\n \t$files[] = 'bootstrap/app.php';\n \t$files[] = 'bootstrap/autoload.php';\n \t\n \treturn $files;\n }", "public function disableConcatenateFiles() {}", "private function publishFiles()\n {\n $publishTag = 'LaravelHttps';\n\n $this->publishes([\n __DIR__.'/config/laravel-https.php' => base_path('config/laravel-https.php'),\n ], $publishTag);\n\n $this->publishes([\n __DIR__.'/resources/views' => base_path('resources/views/vendor/laravel-https'),\n ], $publishTag);\n\n $this->publishes([\n __DIR__.'/resources/lang' => base_path('resources/lang/vendor/laravel-https'),\n ], $publishTag);\n }", "public function copyFilesAction()\n {\n if (!is_readable($this->sourceDir)) {\n throw new Exception($this->sourceDir.\" must be readable\");\n }\n\n if (!is_writeable($this->targetDir)) {\n throw new Exception($this->targetDir.\" must be writable\");\n }\n\n $this->say($this->getActionsCount().\". Copying files...\");\n\n if (empty($this->items)) {\n throw new Exception(\"Please specify files for deployment in your \"\n .$this->configPath);\n }\n\n foreach($this->items as $file) {\n\n $srcItemName = $this->sourceDir.DIRECTORY_SEPARATOR.$file;\n $dstItemName = $this->targetDir.DIRECTORY_SEPARATOR.$file;\n $this->verbose ? $this->say($srcItemName.\" to \".$dstItemName):false;\n if (!file_exists($srcItemName)) {\n $this->say(\"File not found:\". $srcItemName);\n }\n if (is_dir($srcItemName)) {\n $this->recDirCopy($srcItemName, $dstItemName);\n }\n\n if (is_file($srcItemName)) {\n $this->recFileCopy($srcItemName, $dstItemName);\n\n }\n }\n\n $this->verbose ? $this->say(\"Files successfully copied from \"\n .$this->sourceDir.\" to \".$this->targetDir) : \n $this->sayYes(\"Done\");\n\n\n }", "function my_admin_shop_assets() {\n $dist = get_template_directory_uri() . '/_dist';\n wp_enqueue_style('my-shop-admin', $dist . '/shop-admin.css', [], THEME_VERSION);\n}", "public function addCssFiles() {}", "public function publish($to = null, $filter = null)\n {\n $finder = new Finder();\n $iterator = $finder->files()->name('*.css')->in($this->getOutputFolder());\n if (null !== $filter) {\n foreach ($iterator as $file) {\n $asset = new FileAsset($file->getPathName());\n $outputFile = $to.'/'.$file->getRelativePathName();\n file_put_contents($outputFile, $asset->dump($filter));\n }\n } else {\n $this->filesystem->mirror($this->getOutputFolder(), $to, $iterator);\n }\n }", "public function copy_template(){\n\t\t$dir = get_stylesheet_directory() . '/WooCommerce/single-product';\n\t\tif( ! is_dir( $dir ) ){\n\t\t\t@wp_mkdir_p( $dir );\n\t\t}\n\n\t\t/**\n\t\t * a 'week check'. if the files are not same, then copy\n\t\t */\n\t\tif( @md5_file( dirname( __FILE__ ) . '/templates/review.php' ) != @md5_file( $dir . '/review.php' ) ){\n\t\t\tcopy( dirname( __FILE__ ) . '/templates/review.php' , $dir . '/review.php' );\n\t\t}\n\t}", "protected static function updateBootstrapping() {\n copy(__DIR__ . '/stubs/js/multiSelect.js', resource_path('js/multiSelect.js'));\n }", "private function copyTiles()\n {\n $files = Storage::allFiles($this->jobPath . \"/tiles\");\n\n foreach ($files as $file) {\n $stream = Storage::getDriver()->readStream($file);\n $fileName = str_replace($this->jobPath . \"/tiles/\", \"\", $file);\n\n Storage::disk('projects')->put($this->project->path . '/tiles/' . $fileName, $stream);\n }\n }", "public function minify($serve_url = null)\n {\n $content = '';\n\n // loop files\n foreach ($this->data as $source => $css) {\n \n $content .= '/* ' . substr($source, strlen($this->baseURL)) . \" */\\n\";\n /*\n * Let's first take out strings & comments, since we can't just remove\n * whitespace anywhere. If whitespace occurs inside a string, we should\n * leave it alone. E.g.:\n * p { content: \"a test\" }\n */\n $this->extractStrings();\n $this->stripComments();\n $css = $this->replace($css);\n\n $css = $this->stripWhitespace($css);\n $css = $this->shortenHex($css);\n $css = $this->shortenZeroes($css);\n\n // restore the string we've extracted earlier\n $css = $this->restoreExtractedData($css);\n\n /*\n * If we'll save to a new path, we'll have to fix the relative paths\n * to be relative no longer to the source file, but to the new path.\n * If we don't write to a file, fall back to same path so no\n * conversion happens (because we still want it to go through most\n * of the move code...)\n */\n \n $source = empty($source) ? '' : $source;\n \n $css = $this->move(empty($serve_url) ? $source : $serve_url, $css);\n\n // if no target path is given, relative paths were not converted, so\n // they'll still be relative to the source file then\n \n \n //$css = $this->importFiles($path ?: $source, $css);\n \n \n // combined imports are not done\n //$css = $this->combineImports($path ?: $source, $css);\n\n // combine css\n $content .= $css . \"\\n\"; // line breaks would be nice occasionally.\n }\n\n return $content;\n }", "public function templateFiles()\r\n\t{\r\n\t\t$files = $this->_context->getCSSFiles();\r\n\t\t\r\n\t\tforeach ($files as $v) {\r\n\t\t\t$this->_styleSheets[$v] = $v;\r\n\t\t}\t\r\n\t\t\r\n\t\t$files = $this->_context->getJSFiles();\r\n\t\t\r\n\t\tforeach ($files as $v) {\r\n\t\t\t$this->_scripts[$v] = $v;\r\n\t\t}\t\r\n\t}", "public function publishAssets() {\r\n\t\t$assets = dirname(__FILE__) . '/uploadify';\r\n\t\t$this->baseUrl = Yii::app()->assetManager->publish($assets);\r\n\t\tif (is_dir($assets)) {\r\n\t\t \r\n //дублировать!!!\r\n /*Yii::app()->clientScript->registerScriptFile(\r\n Yii::app()->assetManager->publish(\r\n Yii::app()->basePath.'/../js/jquery_min.js',//\r\n true\r\n )\r\n );*/\r\n //Yii::app()->clientScript->registerScriptFile($this->baseUrl . '/js/jquery_min.js');\r\n \r\n \r\n \r\n Yii::app()->clientScript->registerScriptFile($this->baseUrl . '/swfobject.js', CClientScript::POS_END/*, CClientScript::POS_HEAD*/);\r\n Yii::app()->clientScript->registerScriptFile($this->baseUrl . '/jquery.uploadify.v2.1.4.min.js', CClientScript::POS_END/*, CClientScript::POS_HEAD*/);\r\n ///Yii::app()->clientScript->registerCssFile($this->baseUrl . '/uploadify.css');\r\n\t\t} else {\r\n\t\t\tthrow new CHttpException(500, 'UploadifyWidget - Error: Couldn\\'t find assets to publish.');\r\n\t\t}\r\n\t}", "function k_js_minify($src, $dest) {\n k_log_indent(\"Minifying JS from $src to $dest\");\n \n $src = k_absolute_path($src);\n $abs_dest = k_absolute_path($dest);\n \n // create the target path\n k_setup_dir($dest);\n foreach (glob(\"{$src}/*.js\") as $file) {\n $file_name = basename($file);\n $compressed_path = \"{$abs_dest}/{$file_name}\";\n if (!file_exists($compressed_path) || filemtime($file) > filemtime($compressed_path)) {\n k_log(\"Compressing {$file_name}\");\n k_shell_cmd('yuicompressor --nomunge ' . escapeshellarg($file) . ' > ' . escapeshellarg($compressed_path));\n }\n \n // store metadata\n k_metadata_add('js', $file_name, array (\n 'minified_path' => \"{$dest}/{$file_name}\",\n 'minified_timestamp' => filemtime($compressed_path),\n ));\n }\n k_log_unindent();\n}", "function wc_theme_assets() {\n\twp_enqueue_style( 'buildCss', get_template_directory_uri() . '/build/build.min.css' );\n\twp_enqueue_script( 'buildJs', get_template_directory_uri() . '/build/build.min.js' );\n}", "function get_dfd_less_files(){\n\t\n\tglobal $dfd_ronneby;\n\t\n\t$dfd_multisite_file_option = dfd_get_multisite_option();\n\t\n\t$less_files = array(\n\t\t'admin-panel' => array(\n\t\t\t'src' => get_template_directory() . '/assets/less/admin-panel.less',\n\t\t\t'out' => get_template_directory() . '/assets/css/admin-panel.css',\n\t\t),\n\t\t\n\t\t'animate-custom' => array(///\n\t\t\t'src' => get_template_directory() . '/assets/less/animate-custom.less',\n\t\t\t'out' => get_template_directory() . '/assets/css/animate-custom.css',\n\t\t),\n\t\t/*\n\t\t\t/////app.css/////\n\t\t'framework' => array(\n\t\t\t'src' => get_template_directory() . '/assets/less/framework.less',\n\t\t\t'out' => get_template_directory() . '/assets/css/app'.$dfd_multisite_file_option.'.css',\n\t\t\t'autocompile' => true,\n\t\t\t'redux_recompile'=>true,\n\t\t),\n\t\t'main_layouts_part1' => array(\n\t\t\t'src' => get_template_directory() . '/assets/less/main_layouts_part1.less',\n\t\t\t'out' => get_template_directory() . '/assets/css/app'.$dfd_multisite_file_option.'.css',\n\t\t\t'autocompile' => true,\n\t\t\t'redux_recompile'=>true,\n\t\t),\n\t\t'main_layouts_part2' => array(\n\t\t\t'src' => get_template_directory() . '/assets/less/main_layouts_part2.less',\n\t\t\t'out' => get_template_directory() . '/assets/css/app'.$dfd_multisite_file_option.'.css',\n\t\t\t'autocompile' => true,\n\t\t\t'redux_recompile'=>true,\n\t\t),\n\t\t'theme_components_part1' => array(\n\t\t\t'src' => get_template_directory() . '/assets/less/theme_components_part1.less',\n\t\t\t'out' => get_template_directory() . '/assets/css/app'.$dfd_multisite_file_option.'.css',\n\t\t\t'autocompile' => true,\n\t\t\t'redux_recompile'=>true,\n\t\t),\n\t\t'theme_components_part2' => array(\n\t\t\t'src' => get_template_directory() . '/assets/less/theme_components_part2.less',\n\t\t\t'out' => get_template_directory() . '/assets/css/app'.$dfd_multisite_file_option.'.css',\n\t\t\t'autocompile' => true,\n\t\t\t'redux_recompile'=>true,\n\t\t),\n\t\t'theme_components_part3' => array(\n\t\t\t'src' => get_template_directory() . '/assets/less/theme_components_part3.less',\n\t\t\t'out' => get_template_directory() . '/assets/css/app'.$dfd_multisite_file_option.'.css',\n\t\t\t'autocompile' => true,\n\t\t\t'redux_recompile'=>true,\n\t\t),\n\t\t'pages' => array(\n\t\t\t'src' => get_template_directory() . '/assets/less/pages.less',\n\t\t\t'out' => get_template_directory() . '/assets/css/app'.$dfd_multisite_file_option.'.css',\n\t\t\t'autocompile' => true,\n\t\t\t'redux_recompile'=>true,\n\t\t),\n\t\t'widgets' => array(\n\t\t\t'src' => get_template_directory() . '/assets/less/widgets.less',\n\t\t\t'out' => get_template_directory() . '/assets/css/app'.$dfd_multisite_file_option.'.css',\n\t\t\t'autocompile' => true,\n\t\t\t'redux_recompile'=>true,\n\t\t),\n\t\t'woocommerce_widgets' => array(\n\t\t\t'src' => get_template_directory() . '/assets/less/woocommerce_widgets.less',\n\t\t\t'out' => get_template_directory() . '/assets/css/app'.$dfd_multisite_file_option.'.css',\n\t\t\t'autocompile' => true,\n\t\t\t'redux_recompile'=>true,\n\t\t),\n\t\t*/\n\t\t'app' => array(\n\t\t\t'src' => get_template_directory() . '/assets/less/app.less',\n\t\t\t'out' => get_template_directory() . '/assets/css/app'.$dfd_multisite_file_option.'.css',\n\t\t\t'autocompile' => true,\n\t\t\t'redux_recompile'=>true,\n\t\t),\n\t\t/*\n\t\t///////visual-composer.css/////\n\t\t'visual-composer-part1' => array(\n\t\t\t'src' => get_template_directory() . '/assets/less/visual-composer-part1.less',\n\t\t\t'out' => get_template_directory() . '/assets/css/visual-composer'.$dfd_multisite_file_option.'.css',\n\t\t\t'autocompile' => true,\n\t\t\t'redux_recompile'=>true,\n\t\t),\n\t\t'visual-composer-part2' => array(\n\t\t\t'src' => get_template_directory() . '/assets/less/visual-composer-part2.less',\n\t\t\t'out' => get_template_directory() . '/assets/css/visual-composer'.$dfd_multisite_file_option.'.css',\n\t\t\t'autocompile' => true,\n\t\t\t'redux_recompile'=>true,\n\t\t),\n\t\t'visual-composer-part3' => array(\n\t\t\t'src' => get_template_directory() . '/assets/less/visual-composer-part3.less',\n\t\t\t'out' => get_template_directory() . '/assets/css/visual-composer'.$dfd_multisite_file_option.'.css',\n\t\t\t'autocompile' => true,\n\t\t\t'redux_recompile'=>true,\n\t\t),\n\t\t'visual-composer-part4' => array(\n\t\t\t'src' => get_template_directory() . '/assets/less/visual-composer-part4.less',\n\t\t\t'out' => get_template_directory() . '/assets/css/visual-composer'.$dfd_multisite_file_option.'.css',\n\t\t\t'autocompile' => true,\n\t\t\t'redux_recompile'=>true,\n\t\t),\n\t\t*/\n\t\t'visual-composer' => array(\n\t\t\t'src' => get_template_directory() . '/assets/less/visual-composer.less',\n\t\t\t'out' => get_template_directory() . '/assets/css/visual-composer'.$dfd_multisite_file_option.'.css',\n\t\t\t'autocompile' => true,\n\t\t\t'redux_recompile'=>true,\n\t\t),\n\t\t////////////////\n\t\t'bbpress' => array(\n\t\t\t'src' => get_template_directory() . '/assets/less/bbpress.less',\n\t\t\t'out' => get_template_directory() . '/assets/css/bbpress'.$dfd_multisite_file_option.'.css',\n\t\t),\n\t\t\n\t\t'buddypress' => array(\n\t\t\t'src' => get_template_directory() . '/assets/less/buddypress.less',\n\t\t\t'out' => get_template_directory() . '/assets/css/buddypress'.$dfd_multisite_file_option.'.css',\n\t\t),\n\t\t/*\n\t\t'flexslider' => array(\n\t\t\t'src' => get_template_directory() . '/assets/less/flexslider.less',\n\t\t\t'out' => get_template_directory() . '/assets/css/flexslider.css',\n\t\t),\n\t\t*/\n\t\t'jquery.isotope' => array(\n\t\t\t'src' => get_template_directory() . '/assets/less/jquery.isotope.less',\n\t\t\t'out' => get_template_directory() . '/assets/css/jquery.isotope.css',\n\t\t),\n\t\t\n\t\t'mobile-responsive' => array(\n\t\t\t'src' => get_template_directory() . '/assets/less/mobile-responsive.less',\n\t\t\t'out' => get_template_directory() . '/assets/css/mobile-responsive.css',\n\t\t\t'autocompile' => true,\n\t\t\t'redux_recompile'=>true,\n\t\t),\n\t\t\n\t\t'multislider' => array(\n\t\t\t'src' => get_template_directory() . '/assets/less/multislider.less',\n\t\t\t'out' => get_template_directory() . '/assets/css/multislider.css',\n\t\t),\n\t\t/*\n\t\t'preloader' => array(\n\t\t\t'src' => get_template_directory() .'/assets/less/preloader.less',\n\t\t\t'out' => get_template_directory() . '/assets/css/preloader'.$dfd_multisite_file_option.'.css',\n\t\t),\n\t\t*/\n\t\t'prettyPhoto' => array(\n\t\t\t'src' => get_template_directory() . '/assets/less/prettyPhoto.less',\n\t\t\t'out' => get_template_directory() . '/assets/css/prettyPhoto.css',\n\t\t),\n\t\t\n\t\t'rtl' => array(\n\t\t\t'src' => get_template_directory() . '/assets/less/rtl.less',\n\t\t\t'out' => get_template_directory() . '/assets/css/rtl.css',\n\t\t),\n\t\t\n\t\t'site-preloader' => array(\n\t\t\t'src' => get_template_directory() .'/assets/less/site-preloader.less',\n\t\t\t'out' => get_template_directory() . '/assets/css/site-preloader'.$dfd_multisite_file_option.'.css',\n\t\t),\n\n\t\t'styled-button' => array(\n\t\t\t'src' => get_template_directory() .'/assets/less/styled-button.less', \n\t\t\t'out' => get_template_directory() . '/assets/css/styled-button'.$dfd_multisite_file_option.'.css',\n\t\t),\n\t\t\n\t\t'woocommerce' => array(\n\t\t\t'src' => get_template_directory() . '/assets/less/woocommerce.less',\n\t\t\t'out' => get_template_directory() . '/assets/css/woocommerce'.$dfd_multisite_file_option.'.css',\n\t\t\t'autocompile' => true,\n\t\t\t'redux_recompile'=>true,\n\n\t\t),\n\t\t\n\t\t'woocommerce_old' => array(\n\t\t\t'src' => get_template_directory() . '/assets/less/woocommerce_old.less',\n\t\t\t'out' => get_template_directory() . '/assets/css/woocommerce_old'.$dfd_multisite_file_option.'.css',\n\t\t\t'autocompile' => true,\n\t\t\t//'redux_recompile'=>true,\n\t\t),\n\t\t/*\n\t\t'go_pricing_skin_blue' => array(\n\t\t\t'src' => get_template_directory() . '/assets/less/go_pricing_skin.less',\n\t\t\t'out' => get_template_directory() . '/assets/css/go_pricing_skin'.$dfd_multisite_file_option.'.css',\n\t\t\t'autocompile' => true,\n\t\t),\n\t\t\n\t\t'masterslider_default' => array(\n\t\t\t'src' => get_template_directory() . '/assets/less/masterslider.less',\n\t\t\t'out' => get_template_directory() . '/assets/css/masterslider'.$dfd_multisite_file_option.'.css',\n\t\t\t'autocompile' => true,\n\t\t),\n\t\t'custom_styles' => array(\n\t\t\t'src' => get_template_directory() . '/assets/less/custom-styles.less',\n\t\t\t'out' => get_template_directory() . '/assets/css/custom-styles'.$dfd_multisite_file_option.'.css',\n\t\t\t'autocompile' => true,\n\t\t\t'redux_recompile'=>true,\n\t\t),\n\t\t*/\n\n\t);\n\t\n\t/*\n\t$woo_custom_style = '';\n\t\n\tif(isset($dfd_ronneby['dfd_woocommerce_templates_path']) && $dfd_ronneby['dfd_woocommerce_templates_path'] == '_old') {\n\t\t$woo_custom_style = $dfd_ronneby['dfd_woocommerce_templates_path'];\n\t}\n\t$less_files['custom_styles_woocommerce'] = array(\n\t\t'src' => get_template_directory() . '/assets/less/woocommerce_custom'.$woo_custom_style.'.less',\n\t\t'out' => get_template_directory() . '/assets/css/custom-styles'.$dfd_multisite_file_option.'.css',\n\t\t'autocompile' => true,\n\t\t'redux_recompile'=>true,\n\t);\n\t*/\n\t$less_files = apply_filters('dfd_less_filter', $less_files);\n\treturn $less_files;\n}", "public function publishAssets()\n {\n $assets = dirname(__FILE__) . '/assets';\n $min = (YII_DEBUG) ? '' : '.min';\n $baseUrl = Yii::app()->assetManager->publish($assets, false, -1, YII_DEBUG);\n if (is_dir($assets)) {\n Yii::app()->clientScript->registerCoreScript('jquery');\n Yii::app()->clientScript->registerScriptFile($baseUrl . \"/jquery.fancybox{$min}.js\", CClientScript::POS_END);\n Yii::app()->clientScript->registerCssFile($baseUrl . \"/jquery.fancybox{$min}.css\");\n } else {\n throw new Exception(__CLASS__ . ' - Error: Couldn\\'t find assets to publish.');\n }\n }", "public function copyFiles($dirs)\n {\n // copy module settings and template\n $src = __DIR__ . '/../files/modules/*';\n shell_exec(\"cp -rn $src {$dirs['modules']}\");\n }", "function copy_assets($controller_dir, $target_dir = ''){\n\t\t\t\n\t\t$CI = &get_instance();\n\t\t\t\t\n\t\t$CI->load->helper('directory_copy');\n\t\t$CI->load->helper('directory');\n\t\t\n\t\tif($target_dir == \"\") $target_dir = $controller_dir;\n\t\t\t\t\t\n\t\t$srcdir = APPPATH . $controller_dir . \"/install/assets\";\n\t\t\n\t\t$dstdir = ASSET_ROOT . PROJECTNAME . \"/default/\" . $target_dir;\n\n\t\tif(file_exists($srcdir)){\n\t\t\tcreate_dirpath($dstdir);\n\t\t\tdirectory_copy($srcdir, $dstdir);\n\t\t\treturn TRUE;\n\t\t}\n\t\t\n\t\treturn FALSE;\n\t\t\t\t\n\t\t\t\n\t}", "private static function installBootstrap() {\n\t\t$bs_real_path = realpath( dirname( __FILE__ ) . '/../../vendor/twbs/bootstrap-sass' );\n\t\t$our_scss_real_path = realpath( dirname( __FILE__ ) . self::$_our_scss_dir );\n\t\t$our_js_real_path = realpath( dirname( __FILE__ ) . self::$_our_js_dir );\n\n\t\tif ( file_exists( $bs_real_path ) && !file_exists( $our_scss_real_path . '/_bootstrap.scss' ) ) {\n\t\t\tself::recurseCopy( $bs_real_path . '/assets/stylesheets', $our_scss_real_path );\n\t\t}\n\n\t\tif ( file_exists( $bs_real_path ) && !file_exists( $our_js_real_path . '/bootstrap.js' ) ) {\n\t\t\tself::recurseCopy( $bs_real_path . '/assets/javascripts', $our_js_real_path );\n\t\t}\n\n\t\tif ( file_exists( $bs_real_path ) && !file_exists( dirname( __FILE__ ) . '/../../web/fonts' ) ) {\n\t\t\tself::recurseCopy( $bs_real_path . '/assets/fonts', dirname( __FILE__ ) . '/../../web/fonts' );\n\t\t}\n\t}", "public function loadImages()\n {\n foreach ($this->images as $oldPath => $newPath){\n $p = base_path($newPath);\n\n if(!file_exists($p)) {\n \\File::copy(__DIR__ . '/../views/' . $oldPath, $p);\n }\n }\n }", "private function moveProjectFilesToRoot()\n {\n r_copy($this->backupPath . '/src', __ROOT_DIRECTORY__);\n }", "function bps_arcm_recursive_copy_wpincludes($source, $dest) {\n\t\n\tif ( isset( $_POST['Submit-ARCM-Wpincludes'] ) && current_user_can('manage_options') ) {\n\t\tcheck_admin_referer( 'bulletproof_security_ARCM_wpincludes' );\n\t\tset_time_limit(300); // 250 + 30 = 280 leaving a 20 second buffer\t\t\n\t\n\t$time_start = microtime( true );\n\n\tif ( !is_dir( WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes' ) ) {\n\t\t@mkdir( WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes', 0755, true );\n\t\t@chmod( WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/', 0755 );\n\t}\n\n\t$GDMW_options = get_option('bulletproof_security_options_GDMW');\n\n\tif ( $GDMW_options['bps_gdmw_hosting'] == 'yes' ) {\n\t\techo '<div id=\"message\" class=\"updated\" style=\"border:1px solid #999999;margin-left:220px;background-color:#ffffe0;\"><p>';\n\t\t$text = '<font color=\"blue\"><strong>'.__('No wp-includes files or folders were backed up. Go Daddy Managed WordPress hosting does not allow you to edit files in the wp-includes folder. The wp-includes folders and files are already protected on Go Daddy Managed WordPress Hosting so ARQ does not need to check the wp-includes folder.', 'bulletproof-security').'</strong></font>';\n\t\techo $text;\n\t\techo '</p></div>';\n\t\treturn;\n\t}\t\n\n\t$source = ABSPATH.'wp-includes';\n\t$dest = WP_CONTENT_DIR . '/bps-backup/autorestore/wp-includes/';\n\t$bps_wpcontent_dir = str_replace( ABSPATH, '', WP_CONTENT_DIR );\t\n\t\n\tif ( is_dir($source) ) {\n\t\t$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($source), RecursiveIteratorIterator::SELF_FIRST);\n\t\t\n\t\techo '<div id=\"message\" class=\"updated\" style=\"border:1px solid #999999;margin-left:220px;background-color:#ffffe0;\"><p>';\n\n\t\tforeach ( $iterator as $file ) {\n\t\t\tif ( $file->isDir() ) {\n\t\t\t\t@mkdir($dest.DIRECTORY_SEPARATOR.$iterator->getSubPathName());\n\t\t\t} else {\n\t\t\t\tcopy($file, $dest.DIRECTORY_SEPARATOR.$iterator->getSubPathName());\n\t\t\t}\n\t\t}\n\t\t\n\t$ARQoptions = get_option('bulletproof_security_options_ARCM');\n\t\n\tif ( $ARQoptions['bps_autorestore_cron_filecheck'] == 'Off' ) {\n\t\t\n\t$text = '<strong><font color=\"green\">'.__('Your wp-includes files have been backed up to /', 'bulletproof-security').$bps_wpcontent_dir.__('/bps-backup/autorestore/wp-includes successfully.', 'bulletproof-security').'</font></strong>';\n\techo $text;\n\n\t} else {\t\t\n\t\t\n\t\t$text = '<strong><font color=\"green\">'.__('Your wp-includes files have been backed up to /', 'bulletproof-security').$bps_wpcontent_dir.__('/bps-backup/autorestore/wp-includes successfully.', 'bulletproof-security').'</font><br>'.__('The Backup Date and Total Backup Files checks are turned off during file backups to speed up file backups.', 'bulletproof-security').'<br>'.__('Click the Refresh Status button to show your current updated Backup Date and Total Backup Files count.', 'bulletproof-security').'</strong><div class=\"bps-message-button\" style=\"width:90px;\"><a href=\"admin.php?page=bulletproof-security/admin/autorestore/autorestore.php\">'.__('Refresh Status', 'bulletproof-security').'</a></div>';\n\t\techo $text;\n\t}\t\t\n\t\t\n\t\techo '</p></div>';\n\t\n\t} else {\n\t\tcopy($source, $dest);\n\t}\n\t\n\t$time_end = microtime( true );\n\t$run_time = $time_end - $time_start;\n\t$time_display = '<strong>Completion Time: </strong>'. round( $run_time, 2 ) . ' Seconds';\n\t\n\techo '<div id=\"message\" class=\"updated\" style=\"border:1px solid #999999;margin-left:220px;background-color:#ffffe0;\"><p>';\n\techo bpsPro_memory_resource_usage();\n\techo $time_display;\n\techo '</p></div>';\t\n\t\n\t}\n}", "public function rebuildJSCacheFiles()\n {\n $jsFiles = array(\"dotbcrm1.min.js\", \"dotbcrm3.min.js\", \"dotbcrm2.min.js\");\n ensureJSCacheFilesExist($jsFiles);\n }", "public function test_generatorAssetsWithExternalFiles(){\n\t\t$this->_args = array(\n\t\t\t0 => 'generator:assets',\n\t\t\t1 => 'jquery.js',\n\t\t\t2 => 'backbone.js',\n\t\t\t3 => 'underscore.js',\n\t\t\t4 => 'handlebars.js',\n\t\t\t5 => 'jasmine-jquery.js',\n\t\t\t6 => 'live.js',\n\t\t\t7 => 'normalize.css',\n\t\t\t8 => 'reset.css',\n\t\t);\n\n\t\t$this->_generator->run($this->_args);\n\n\t\t$assets_path[1] = $this->_generator->getFileAssetsDirectory($this->_args[1]);\n\t\t$assets_path[2] = $this->_generator->getFileAssetsDirectory($this->_args[2]);\n\t\t$assets_path[3] = $this->_generator->getFileAssetsDirectory($this->_args[3]);\n\t\t$assets_path[4] = $this->_generator->getFileAssetsDirectory($this->_args[4]);\n\t\t$assets_path[5] = $this->_generator->getFileAssetsDirectory($this->_args[5]);\n\t\t$assets_path[6] = $this->_generator->getFileAssetsDirectory($this->_args[6]);\n\t\t$assets_path[7] = $this->_generator->getFileAssetsDirectory($this->_args[7]);\n\t\t$assets_path[8] = $this->_generator->getFileAssetsDirectory($this->_args[8]);\n\n\t\t$this->assertTrue(is_dir($this->assetsDirectory));\n\n\t\t$this->assertTrue( file_exists($this->assetsDirectory . $assets_path[1] ));\n\t\t$this->assertTrue( file_exists($this->assetsDirectory . $assets_path[2] ));\n\t\t$this->assertTrue( file_exists($this->assetsDirectory . $assets_path[3] ));\n\t\t$this->assertTrue( file_exists($this->assetsDirectory . $assets_path[4] ));\n\t\t$this->assertTrue( file_exists($this->assetsDirectory . $assets_path[5] ));\n\t\t$this->assertTrue( file_exists($this->assetsDirectory . $assets_path[6] ));\n\t\t$this->assertTrue( file_exists($this->assetsDirectory . $assets_path[7] ));\n\t\t$this->assertTrue( file_exists($this->assetsDirectory . $assets_path[8] ));\n\n\t\t$this->assertEquals( $this->_generator->getExtension($this->assetsDirectory . $assets_path[1]), 'js');\n\t\t$this->assertEquals( $this->_generator->getExtension($this->assetsDirectory . $assets_path[2]), 'js');\n\t\t$this->assertEquals( $this->_generator->getExtension($this->assetsDirectory . $assets_path[3]), 'js');\n\t\t$this->assertEquals( $this->_generator->getExtension($this->assetsDirectory . $assets_path[4]), 'js');\n\t\t$this->assertEquals( $this->_generator->getExtension($this->assetsDirectory . $assets_path[5]), 'js');\n\t\t$this->assertEquals( $this->_generator->getExtension($this->assetsDirectory . $assets_path[6]), 'js');\n\t\t$this->assertEquals( $this->_generator->getExtension($this->assetsDirectory . $assets_path[7]), 'css');\n\t\t$this->assertEquals( $this->_generator->getExtension($this->assetsDirectory . $assets_path[8]), 'css');\n\n\t\t//\tRemoving files generateds\n\t\tunlink($this->assetsDirectory . $assets_path[1] );\n\t\tunlink($this->assetsDirectory . $assets_path[2] );\n\t\tunlink($this->assetsDirectory . $assets_path[3] );\n\t\tunlink($this->assetsDirectory . $assets_path[4] );\n\t\tunlink($this->assetsDirectory . $assets_path[5] );\n\t\tunlink($this->assetsDirectory . $assets_path[6] );\n\t\tunlink($this->assetsDirectory . $assets_path[7] );\n\t\tunlink($this->assetsDirectory . $assets_path[8] );\n\n\t\t//\tVerifying if file was deleted\n\t\t$this->assertTrue( !file_exists($this->assetsDirectory . $assets_path[1] ));\n\t\t$this->assertTrue( !file_exists($this->assetsDirectory . $assets_path[2] ));\n\t\t$this->assertTrue( !file_exists($this->assetsDirectory . $assets_path[3] ));\n\t\t$this->assertTrue( !file_exists($this->assetsDirectory . $assets_path[4] ));\n\t\t$this->assertTrue( !file_exists($this->assetsDirectory . $assets_path[5] ));\n\t\t$this->assertTrue( !file_exists($this->assetsDirectory . $assets_path[6] ));\n\t\t$this->assertTrue( !file_exists($this->assetsDirectory . $assets_path[7] ));\n\t\t$this->assertTrue( !file_exists($this->assetsDirectory . $assets_path[8] ));\n\t}", "public function publishAssets() {\n $assets = dirname(__FILE__) . '/assets/js';\n $baseUrl = Yii::app()->assetManager->publish($assets);\n\n if (is_dir($assets)) {\n Yii::app()->clientScript->registerCoreScript('jquery');\n Yii::app()->clientScript->registerCssFile($baseUrl . '/jquery.pnotify.default.css');\n Yii::app()->clientScript->registerScriptFile($baseUrl . '/jquery.pnotify.min.js', CClientScript::POS_HEAD);\n }\n else {\n throw new Exception('PNotify - Error: Couldn\\'t find assets to publish.');\n }\n }", "function pk_assets($path)\n{\n return rtrim(get_template_directory_uri(), '/') . '/public/' . ltrim($path, '/');\n}", "public static function GenStaticContent(){\n\t\tgpPlugin_incl('Admin/StaticGenerator.php');\n\t\tStaticGenerator::Generate();\n\t}" ]
[ "0.6447376", "0.643046", "0.6336122", "0.6269724", "0.62032694", "0.61864007", "0.6093075", "0.5980161", "0.58188516", "0.57224125", "0.57224125", "0.56698066", "0.5630342", "0.56170595", "0.56086296", "0.5561131", "0.5533352", "0.55047035", "0.5468753", "0.54551107", "0.54351455", "0.53902835", "0.53841335", "0.53584623", "0.5334651", "0.5293671", "0.52835554", "0.5242344", "0.5225299", "0.5204483", "0.51940286", "0.51904154", "0.5187855", "0.5173333", "0.5168756", "0.5148851", "0.5144046", "0.5140003", "0.5112979", "0.51005006", "0.50907624", "0.5082597", "0.50635034", "0.50629133", "0.50593853", "0.5052985", "0.5052334", "0.50392103", "0.502477", "0.50200576", "0.5019128", "0.5016457", "0.50135165", "0.50090647", "0.5005362", "0.5000254", "0.4987393", "0.49782312", "0.49763578", "0.49558103", "0.49495658", "0.49428365", "0.49323475", "0.4920296", "0.49194667", "0.49170724", "0.4914719", "0.4912693", "0.4910842", "0.48845145", "0.4883455", "0.4883455", "0.48809525", "0.4865257", "0.486312", "0.48604396", "0.48538956", "0.48537913", "0.48331383", "0.48270494", "0.48215294", "0.48174673", "0.48163217", "0.48158988", "0.4809905", "0.4808475", "0.48081803", "0.48068663", "0.48060232", "0.4796569", "0.47946593", "0.47910085", "0.47769013", "0.47699362", "0.47698012", "0.47625026", "0.47561836", "0.47478953", "0.4745545", "0.47440875" ]
0.7707405
0
Sorts posts by date (descending) or by chapter (ascending). Assigns post.next and post.prev
Сортирует посты по дате (в порядке убывания) или по главе (в порядке возрастания). Присваивает post.next и post.prev
private function sortPosts() { $this->app->writeln("\n<comment>Sorting</comment>"); $cmpFn = function (Content $one, Content $other) { // Sort by chapters if ($one instanceof Doc && $other instanceof Doc) { if ($one->chapter == $other->chapter) { return 0; } return ($one->chapter < $other->chapter) ? -1 : 1; } // Sort by date if ($one->date == $other->date) { return 0; } return ($one->date > $other->date) ? -1 : 1; }; foreach ($this->site->categories as $cat => &$posts) { // Sort posts usort($posts, $cmpFn); // Assign next and previous post within the category foreach ($posts as $key => $post) { if (isset($posts[$key - 1])) { $post->next = $posts[$key - 1]; } if (isset($posts[$key + 1])) { $post->prev = $posts[$key + 1]; } } } $this->app->writeln("Done!"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sort_relationship_field_lists_chronologically( $args, $field, $post ) {\n $args['orderby'] = 'post_date';\n $args['order'] = 'DESC';\n return $args;\n}", "function blog_posts () {\n $posts = glob(dirname(__DIR__) . '/content/blog/*.php');\n \n $posts = array_map('content_data', $posts);\n \n usort($posts, function ($a, $b) {\n return strtotime($b['date']) - strtotime($a['date']);\n });\n \n return $posts;\n}", "function sortByDate(&$dirs, $sort) {\n\t\tif($sort == 'dateasc') {\n\t\t\tusort( $dirs, array(&$this, 'dateASC') );\n\t\t} elseif($sort == 'datedesc') {\n\t\t\tusort( $dirs, array(&$this, 'dateDESC') );\n\t\t}\n\t}", "function inet_pre_get_posts( $query ) {\n\t// do not execute following actions if in the backend, or if not the main query\n\tif ( is_admin() || !$query->is_main_query() ) return;\n\n\tif (is_post_type_archive('case')) {\n\t\t$query->set('orderby', 'title');\n\t\t$query->set('order', 'ASC');\n\t}\n\n\tif (is_post_type_archive('note')) {\n\t\t$query->set('orderby', 'title');\n\t\t$query->set('order', 'ASC');\n\t}\n\n\tif (is_post_type_archive('question')) {\n\t\t$query->set('orderby', 'date');\n\t\t$query->set('order', 'DESC');\n\t}\n\n\tif (is_post_type_archive('therapy_guideline')) {\n\t\t$query->set('orderby', 'title');\n\t\t$query->set('order', 'ASC');\n\t}\n}", "function get_prev() {\n self::$args['order'] = 'DESC';\n\n $adj_post = get_adjacent_post(true, '', true);\n $prev_post = $adj_post ? $adj_post : Timber::get_post( self::$args );\n\n return self::build_post_obj($prev_post);\n }", "function mod_get_adjacent_post($direction = 'prev', $post_types = 'post') {\n global $post, $wpdb;\n\n if(empty($post)) return NULL;\n if(!$post_types) return NULL;\n\n if(is_array($post_types)){\n $txt = '';\n for($i = 0; $i <= count($post_types) - 1; $i++){\n $txt .= \"'\".$post_types[$i].\"'\";\n if($i != count($post_types) - 1) $txt .= ', ';\n }\n $post_types = $txt;\n }\n\n $current_post_date = $post->post_date;\n\n $join = '';\n $in_same_cat = FALSE;\n $excluded_categories = '';\n $adjacent = $direction == 'prev' ? 'previous' : 'next';\n $op = $direction == 'prev' ? '<' : '>';\n $order = $direction == 'prev' ? 'DESC' : 'ASC';\n\n $join = apply_filters( \"get_{$adjacent}_post_join\", $join, $in_same_cat, $excluded_categories );\n $where = apply_filters( \"get_{$adjacent}_post_where\", $wpdb->prepare(\"WHERE p.post_date $op %s AND p.post_type IN({$post_types}) AND p.post_status = 'publish'\", $current_post_date), $in_same_cat, $excluded_categories );\n $sort = apply_filters( \"get_{$adjacent}_post_sort\", \"ORDER BY p.post_date $order LIMIT 1\" );\n\n $query = \"SELECT p.* FROM $wpdb->posts AS p $join $where $sort\";\n $query_key = 'adjacent_post_' . md5($query);\n $result = wp_cache_get($query_key, 'counts');\n if ( false !== $result )\n return $result;\n\n $result = $wpdb->get_row(\"SELECT p.* FROM $wpdb->posts AS p $join $where $sort\");\n if ( null === $result )\n $result = '';\n\n wp_cache_set($query_key, $result, 'counts');\n return $result;\n}", "public function sort() {\r\n\t\t\r\n\t\tView::select(null,null);\r\n\t\r\n\t\tif (Input::hasPost('pages')) {\r\n\t\t\t\r\n\t\t\t$pages = Input::post('pages');\r\n\t\t\tforeach ($pages as $key => $value) {\r\n\t\t\t\t$page = Load::model('page')->getbyId($key);\r\n\t\t\t\tif ($page) {\r\n\t\t\t\t\t$page->page_parent_id = ($value == 'root') ? '0' : (int)$value;\r\n\t\t\t\t\t$page->page_sort_order = ($key+1)*10;\r\n\t\t\t\t\t$page->save();\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\r\n\t\t}\r\n\t\r\n\t}", "public function init()\n {\n // and title. This assumes that the items are actually Post instances.\n uasort($this->items, function ($a, $b) {\n return strnatcmp($b->date().' '.$b->title(), $a->date().' '.$a->title());\n });\n\n parent::init();\n }", "public static function getNextAndPrevPost($postid)\n {\n $sql = \"(\";\n $sql .= \" SELECT p.postid, p.subject, p.postdate, 'previous' AS pos\";\n $sql .= \" FROM \".db::getPrefix().\"posts p\";\n $sql .= \" WHERE p.postid < :postprev\";\n $sql .= \" ORDER BY postid DESC LIMIT 1\";\n $sql .= \")\";\n $sql .= \" UNION ALL \";\n $sql .= \"(\";\n $sql .= \" SELECT p.postid, p.subject, p.postdate, 'next' AS pos\";\n $sql .= \" FROM \".db::getPrefix().\"posts p\";\n $sql .= \" WHERE p.postid > :postnext\";\n $sql .= \" ORDER BY postid ASC LIMIT 1\";\n $sql .= \")\";\n $query = db::select($sql, array($postid, $postid));\n $results = db::fetchAll($query);\n\n return $results;\n }", "public function postFront(){\n // select the most recent 8 from both tables then limit to 6 ordered by date most recent first\n $query = '(SELECT `letter`,`title`,`status` AS `post_status`, `PRID` AS `post_name`,`date` FROM `PM_dev_main`.`cms` WHERE `status` = 1 ORDER BY `date` DESC LIMIT 8) UNION (SELECT `post_category` AS `letter`,`post_title` AS `title`,`post_status` AS `status`,`post_name`,UNIX_TIMESTAMP(`post_date`) AS `date` FROM `PM_dev_blog`.`wp_posts` WHERE `post_status` = \\'publish\\' ORDER BY `post_date` DESC LIMIT 8) ORDER BY `date` DESC LIMIT 6';\n $result = $this->dbObj->query($query);\n \n $i = 0;\n // result == title, status, post_name, date\n while($data = mysqli_fetch_assoc($result)) {\n if($data['post_status']=='publish'){\n /* Blog Posts **************************************************/\n $date = array(); // Date pulled from DB reformatted\n $date['year'] = substr($data['date'], 0, 4);\n $date['month'] = substr($data['date'], 5, 2);\n $date['day'] = substr($data['date'], 8, 2);\n \n $date_print[$i] = date(\"M d, Y\", mktime(0,0,0,$date['month'],$date['day'],$date['year'])); // Makes proper date\n $link[$i] = '/blog/'.$date['year'].'/'.$date['month'].'/'.$date['day'].'/'.$data['post_name'];\n $title[$i] = substr($data['title'], 0, 50);\n $i++;\n /***************************************************************/\n }\n else{\n /* Press Release ***********************************************/\n $date_link[$i] = date(\"Y_m_d\", $data['date']);\n $date_print[$i] = date(\"M d, Y\", $data['date']);\n $title[$i] = substr($data['title'], 0, 100);\n $letter[$i] = $data['letter'];\n \n $link[$i] = \"/corporate.press_release?post=\".$date_link[$i].\"_\".$letter[$i]; // link is date followed by letter\n $i++;\n /***************************************************************/\n }\n }\n \n // Open file news_array.php for writing\n \n $file = '/home/propmaps/public_html/includes/news_array.php';\n \n // Adds content to the page\n $stringData = '<script type=\"text/javascript\">'.\"\\n\";\n $stringData .= 'var headlinesArray = ['.\"\\n\";\n for($i = 0;$i < 6;$i++){\n $stringData .= '[\\''.$link[$i].'\\',\\''.str_replace(\"'\" , \"\\'\" , $title[$i]).'\\',\\''.$date_print[$i].'\\'],'.\"\\n\";\n // ex. ['/corporate.press_2007_09_22_a','PropertyMaps.com Adds Naples, Fla., MLS Listings to Its Free Real Estate Search Site','Sep 22, 2007'],\n }\n $stringData .= '];'.\"\\n\";\n $stringData .= '</script>'.\"\\n\";\n \n if($this->writefile($stringData,$file)){\n return 'Front page has been updated';\n }\n else{return 'Front page COULD NOT updated!';}\n }", "function cd_sort_podcasts( $wp_query ) {\n\n if ( is_admin() ) {\n\n \t// Get the post type from the query\n \t$post_type = $wp_query->query[ 'post_type' ];\n\n \t// If it's the podcast post type, order by date desc\n if ( 'podcast' == $post_type ) {\n $wp_query->set( 'orderby', 'date' );\n $wp_query->set( 'order', 'DESC' );\n }\n }\n}", "function order_by_menu_order_news( $query ){\n\tif ( is_post_type_archive('news') && $query->is_main_query() && !is_admin() ){\n\t\t$query->set( 'orderby', 'date' );\n\t\t$query->set( 'order', 'DESC' );\n\t\t// get current year and previous year\n\t\t$query->set( 'posts_per_page', 10 );\n\t}\n\treturn;\n}", "public function findPrevious(\\TYPO3\\Blog\\Domain\\Model\\Post $post) {\n\t\t$query = $this->createQuery();\n\t\treturn $query->matching($query->lessThan('date', $post->getDate()))\n\t\t\t->setOrderings(array('date' => \\TYPO3\\FLOW3\\Persistence\\QueryInterface::ORDER_DESCENDING))\n\t\t\t->execute()\n\t\t\t->getFirst();\n\t}", "protected function setupDayPager()\n {\n $first_date = $this->first_date;\n $current_date = $this->current_date;\n // previous\n if ($first_date->getTimestamp() < $current_date->getTimestamp()) {\n $previous_date = $current_date->copy();\n $previous_date->subDay(1);\n $this->previous_text = $previous_date->formatLocalized('%d') . ' ' . $previous_date->formatLocalized('%B') . ', ' . $previous_date->year;\n $this->previous_url = $this->makePagerUrl(array(\n 'year' => $previous_date->year,\n 'month' => $previous_date->month,\n 'day' => $previous_date->day,\n ));\n } else {\n $this->previous_text = $current_date->formatLocalized('%d') . ' ' . $current_date->formatLocalized('%B') . ', ' . $current_date->year;\n $this->previous_url = '';\n }\n // next\n $today = new Carbon();\n $today->setTime(0, 0);\n if ($this->current_date->getTimestamp() < $today->getTimestamp()) {\n $next_date = $current_date->copy();\n $next_date->addDay(1);\n $this->next_text = $next_date->formatLocalized('%d') . ' ' . $next_date->formatLocalized('%B') . ', ' . $next_date->year;\n $this->next_url = $this->makePagerUrl(array(\n 'year' => $next_date->year,\n 'month' => $next_date->month,\n 'day' => $next_date->day,\n ));\n } else {\n $this->next_text = $current_date->formatLocalized('%d') . ' ' . $current_date->formatLocalized('%B') . ', ' . $current_date->year;\n $this->next_url = '';\n }\n }", "function unity3_slide_order_change($posts) {\n\t\treset($posts);\n\t\t$post_id = key($posts);\n\n\t\tif ($slider_id = $this->maybeGetSliderID($post_id)) {\n\t\t\tN2Loader::import(array( 'models.Sliders', 'models.Slides' ), 'smartslider');\n\t\t\tglobal $wpdb;\n\t\t\t$slider_refs = $wpdb->get_results(\n\t\t\t\t$wpdb->prepare(\n\t\t\t\t\t\"SELECT DISTINCT pm.post_id, pm.meta_value \n\t\t\t\t FROM {$wpdb->postmeta} pm\n\t\t\t\t LEFT JOIN {$wpdb->posts} p \n\t\t\t\t ON p.ID = pm.post_id\n\t\t\t\t WHERE pm.meta_key = '%s'\n\t\t\t\t AND p.post_type = '%s'\",\n\t\t\t\t$this->ID(),\n\t\t\t\t\tUnity3_Slides::ID\n\t\t\t\t), ARRAY_A\n\t\t\t);\n\n\t\t\tasort($posts);\n\t\t\tforeach ($slider_refs as $index => $row) {\n\t\t\t\t$posts[(int)$row['post_id']] = $row['meta_value'];\n\t\t\t}\n\n\t\t\t$slidesModel = new N2SmartsliderSlidesModel();\n\t\t\t$slidesModel->order((int)$slider_id, array_values($posts) );\n\t\t}\n\t}", "protected function sortAdvisories()\n {\n $getAdvisoryId = function ($title) {\n if (! preg_match('/^(?P<id>[A-Z]+\\d{4}-\\d{2}):/', $title, $matches)) {\n return $title;\n }\n return $matches['id'];\n };\n\n $compareKey = function ($a, $b) use ($getAdvisoryId) {\n $a = $getAdvisoryId($a['title']);\n $b = $getAdvisoryId($b['title']);\n\n if ($a === $b) {\n return 0;\n }\n if ($a > $b) {\n return -1;\n }\n return 1;\n };\n\n uasort($this->advisories, function ($a, $b) use ($compareKey) {\n $aDate = strtotime($a['date']);\n $bDate = strtotime($b['date']);\n\n if ($aDate === $bDate) {\n return $compareKey($a, $b);\n }\n if ($aDate > $bDate) {\n return -1;\n }\n return 1;\n });\n }", "protected function _sort()\n {\n if ($this->_orderUpdated) {\n $newOrder = array();\n $index = 0;\n \n foreach ($this->_pages as $hash => $page) {\n $pos = $page->getPosition();\n if ($pos === null) {\n $newOrder[$hash] = $index;\n $index++;\n } else {\n $newOrder[$hash] = $pos;\n }\n }\n\n asort($newOrder);\n $this->_order = $newOrder;\n $this->_orderUpdated = false;\n }\n }", "public function getPosts_reverse() \n {\n $articles = [];\n $req = $this->db->query('SELECT *, DATE_FORMAT(date_article, \"%d/%m/%Y\") as date_article FROM Articles ORDER BY number_article DESC');\n while ($data = $req->fetch(\\PDO::FETCH_ASSOC)) \n {\n $articles[] = $data;\n }\n return $articles;\n }", "public function sort_posts_by_post_field( $vars ) {\n\n\t\tif ( !isset( $vars['orderby'] ) )\n\t\t\treturn $vars;\n\t\tif ( !isset( $this->args['cols'][$vars['orderby']] ) )\n\t\t\treturn $vars;\n\t\tif ( !is_array( $this->args['cols'][$vars['orderby']] ) )\n\t\t\treturn $vars;\n\t\tif ( !isset( $this->args['cols'][$vars['orderby']]['post_field'] ) )\n\t\t\treturn $vars;\n\n\t\t$field = str_replace( 'post_', '', $this->args['cols'][$vars['orderby']]['post_field'] );\n\t\t$vars['orderby'] = $field;\n\n\t\treturn $vars;\n\n\t}", "function orderChildren(&$node)\n {\n $node->sortChildren(array($this, 'comparePosts'));\n }", "function entrySort($a, $b) {\n $a = $a->date->format('Y-m-d H:i:s');\n $b = $b->date->format('Y-m-d H:i:s');\n return $a == $b ? 0 : ($a > $b) ? 1 : -1;\n}", "public function sort(Post $post, $newOrder)\n {\n $previousOrder = $post->getOrder();\n\n $post->setOrder($newOrder);\n if ($previousOrder > $newOrder) {\n $postsToOrder = $this->findByOrderRange($newOrder, $previousOrder -1);\n foreach ($postsToOrder as $postToOrder) {\n $postToOrder->setOrder($postToOrder->getOrder() + 1);\n }\n } elseif ($previousOrder < $newOrder) {\n $postsToOrder = $this->findByOrderRange($previousOrder + 1, $newOrder);\n foreach ($postsToOrder as $postToOrder) {\n $postToOrder->setOrder($postToOrder->getOrder() - 1);\n }\n }\n\n $this->update();\n }", "private function sortByDate(array $allPosts)\n {\n usort($allPosts, function($a, $b)\n {\n $a = $a['date'];\n $b = $b['date'];\n\n if ($a == $b) return 0;\n return ($a < $b) ? -1 : 1;\n });\n\n return $allPosts;\n }", "function sortByDate($a, $b)\n{\n return strtotime($a['posttime']) < strtotime($b ['posttime']);\n}", "public function pre_get_posts($query) {\n if ( ! $query->is_main_query() || $query->get('post_type') !== $this->post_type) {\n return;\n }\n if ( ! $query->get('orderby')) {\n $query->set('orderby', 'post_modified');\n $query->set('order', 'desc');\n $_GET['orderby'] = 'vf_modified';\n $_GET['order'] = 'desc';\n }\n }", "function get_next() {\n self::$args['order'] = 'ASC';\n\n $adj_post = get_adjacent_post(true, '', false);\n $next_post = $adj_post ? $adj_post : Timber::get_post( self::$args );\n\n return self::build_post_obj($next_post);\n }", "function aerospace_custom_sort_posts( $query ) {\n\tif ( ! is_admin() && ( ( is_home() && get_option( 'page_for_posts' ) ) || is_category() || is_archive() ) && $query->is_main_query() && ! is_post_type_archive( 'events' ) && ! is_post_type_archive( 'data' ) && ! is_author() && ! is_tag() ) {\n\t\t$query->set( 'meta_key', '_post_is_featured' );\n\n if ( 'ASC' === get_query_var( 'order' ) ) {\n $sort_dir = 'ASC';\n } else {\n $sort_dir = 'DESC';\n }\n\n $tag_id = get_query_var( 'tid' );\n if ( $tag_id ) {\n $query->set( 'tag__in', array($tag_id) );\n add_filter( 'body_class', function( $classes ) {\n return array_merge( $classes, array( 'archive-filtered-results' ) );\n } );\n }\n\n\t\t$query->set( 'orderby', array(\n\t\t\t'meta_value_num' => 'DESC',\n\t\t\t'post_date' => $sort_dir,\n\t\t) );\n\t}\n}", "function sortIntoChapter()\n {\n // $this->idCatalog : catalog id to sort\n // Return true if ok, false if not\n settype($this->idCatalog, 'integer');\n $cat = $this->babase->DbSelect(\"SELECT * FROM catalog WHERE idGroup='\" . $_SESSION[\"idGroup\"] . \"' AND idCatalog='\" . $this->idCatalog . \"';\", $nul);\n $data = $this->babase->DbSelect(\"SELECT idCatalogData, orderInCatalog, name, type FROM catalogdata WHERE idCatalog='\" . $this->idCatalog . \"' ORDER BY `orderInCatalog`\", $nbData);\n $i = 0;\n $cpt = 0;\n $toSort = false;\n while ($i != $nbData) {\n if ($data[$i][\"type\"] == \"book\") {\n $toSort = true;\n $book = $this->babase->DbSelect(\"SELECT author, title FROM book WHERE idGroup='\" . $_SESSION[\"idGroup\"] . \"' AND idBook='\" . $data[$i][\"name\"] . \"'\", $nul);\n $tab[$cpt][\"author\"] = $book[0][\"author\"];\n $tab[$cpt][\"idCatalogData\"] = $data[$i][\"idCatalogData\"];\n $tab[$cpt][\"orderInCatalog\"] = $data[$i][\"orderInCatalog\"];\n $cpt++;\n } else {\n if ($toSort == true) {\n // End of chapter\n $endOrder = $data[$i][\"orderInCatalog\"];\n $endI = $i;\n sort($tab);\n $j = 0;\n while ($startOrder < $endOrder) {\n $this->babase->DbQuery(\"UPDATE catalogdata SET `orderInCatalog`='$startOrder' WHERE idCatalogData='\" . $tab[$j][\"idCatalogData\"] . \"'\");\n $startOrder++;\n $j++;\n }\n // We reset variables to start a new chapter\n $cpt = 0;\n $toSort = false;\n reset($tab);\n unset($tab);\n // We start a new chapter\n $startOrder = $data[$i][\"orderInCatalog\"] + 1;\n $startI = $i;\n } else {\n if ($data[$i][\"type\"] == \"chapter\") {\n // We start a new chapter\n $startOrder = $data[$i][\"orderInCatalog\"] + 1;\n $startI = $i;\n }\n }\n // unset($tab);\n }\n $i++;\n }\n // End of Catalog... We need to sort the last chapter...\n $endOrder = $data[$i - 1][\"orderInCatalog\"] + 1;\n $endI = $i - 1;\n sort($tab);\n $j = 0;\n while ($startOrder < $endOrder) {\n $this->babase->DbQuery(\"UPDATE catalogdata SET `orderInCatalog`='$startOrder' WHERE idCatalogData='\" . $tab[$j][\"idCatalogData\"] . \"'\");\n $startOrder++;\n $j++;\n }\n }", "function latest_sort($a, $b) {\r\n \t\t\t\t\t\tglobal $data_rows;\r\n\t\t\t\t\t\t$a = (int)(new DateTime($a->blogDate))->format('U');\r\n\t\t\t\t\t\t$b = (int)(new DateTime($b->blogDate))->format('U');\r\n \t\t\t\t\t\tif ($a==$b)\r\n \t\t\t\t\t\treturn 0;\r\n \t\t\t\t\t\telse\r\n \t\t\t\t\t\treturn ($a > $b ? -1 : 1);\r\n\t\t\t\t\t}", "function dateASC($a, $b) {\n\t\treturn ($a['date'] < $b['date']) ? -1 : 1;\n\t}", "private function sort_pages() {\n\n $keys = array_keys($this->pages);\n $num_pages = count($keys);\n\n for ($i = 0; $i < ($num_pages - 1); ++$i) {\n\n $swap_rank = array_key_exists('menu_order', $this->pages[$keys[$i]]) ?\n $this->pages[$keys[$i]]['menu_order'] :\n 999;\n\n $swap_to = $i;\n\n for ($j = ($i + 1); $j < $num_pages; $j++) {\n\n $test_rank = array_key_exists('menu_order', $this->pages[$keys[$j]]) ?\n $this->pages[$keys[$j]]['menu_order'] :\n 999;\n\n if ($test_rank < $swap_rank) { // ranked higher then swap\n\n $swap_to = $j;\n $swap_rank = $test_rank;\n\n }\n\n }\n\n if ($swap_to !== $i) { // move this page if found a higher ranked page\n\n $tmp = $keys[$i];\n $keys[$i] = $keys[$swap_to];\n $keys[$swap_to] = $tmp;\n\n }\n\n }\n\n $this->ordered_page_keys = $keys;\n\n }", "function prefix_reverse_post_order( $query ) {\n\tif ( $query->is_main_query() && is_archive() && ! is_post_type_archive() ) {\n\t\t$query->set( 'orderby', 'date' );\n\t\t$query->set( 'order', 'ASC' );\n\t}\n}", "function _kalium_blog_single_post_prev_next_navigation() {\n\tif ( kalium_blog_get_option( 'single/prev_next' ) ) {\n\n\t\t// Args\n\t\t$args = [];\n\n\t\t$adjacent_post_args = apply_filters( 'kalium_blog_single_post_prev_next_navigation', [\n\t\t\t'return' => 'id',\n\t\t\t'loop' => true\n\t\t] );\n\n\t\t$prev_id = previous_post_link_plus( $adjacent_post_args );\n\t\t$next_id = next_post_link_plus( $adjacent_post_args );\n\n\t\t// Previous link\n\t\tif ( $prev_id ) {\n\t\t\t$prev = get_post( $prev_id );\n\t\t\t$args['prev'] = $prev;\n\t\t\t$args['prev_title'] = esc_html__( 'Older Post', 'kalium' );\n\t\t}\n\n\t\t// Next link\n\t\tif ( $next_id ) {\n\t\t\t$next = get_post( $next_id );\n\t\t\t$args['next'] = $next;\n\t\t\t$args['next_title'] = esc_html__( 'Newer Post', 'kalium' );\n\t\t}\n\n\t\t// Post navigation template\n\t\tkalium_get_template( 'global/post-navigation.php', $args );\n\t}\n}", "private function sort_posts( $post_set, $settings ) {\r\n\t\tif ( empty( $post_set ) ) {\r\n\t\t\treturn $post_set;\r\n\t\t}\r\n\r\n\t\t// sorting done with \"merge_posts\" to be more efficient\r\n\t\tif ( $settings['sortby'] === 'alternate' || $settings['sortby'] === 'api' ) {\r\n\t\t\t$return_post_set = $post_set;\r\n\t\t} elseif ( $settings['sortby'] === 'random' ) {\r\n\t\t\t/*\r\n * randomly selects posts in a random order. Cache saves posts\r\n * in this random order so paginating does not cause some posts to show up\r\n * twice or not at all\r\n */\r\n\t\t\tusort($post_set, 'sbi_rand_sort' );\r\n\t\t\t$return_post_set = $post_set;\r\n\r\n\t\t} else {\r\n\t\t\t// compares posted on dates of posts\r\n\t\t\tusort($post_set, 'sbi_date_sort' );\r\n\t\t\t$return_post_set = $post_set;\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Apply a custom sorting of posts\r\n\t\t *\r\n\t\t * @param array $return_post_set Ordered set of filtered posts\r\n\t\t * @param array $settings Settings for this feed\r\n\t\t *\r\n\t\t * @since 2.1/5.2\r\n\t\t */\r\n\r\n\t\treturn apply_filters( 'sbi_sorted_posts', $return_post_set, $settings );\r\n\t}", "public static function get_posts( &$query ) {\n\t\tif( $query->query_vars['post_type'] === static::$post_type ) {\n\t\t\t$query->set('orderby', 'title');\n\t\t\t$query->set('order', 'desc');\n\t\t}//end if\n\t}", "public function sort_posts_by_post_meta( $vars ) {\n\n\t\tif ( !isset( $vars['orderby'] ) )\n\t\t\treturn $vars;\n\t\tif ( !isset( $this->args['cols'][$vars['orderby']] ) )\n\t\t\treturn $vars;\n\t\tif ( !is_array( $this->args['cols'][$vars['orderby']] ) )\n\t\t\treturn $vars;\n\t\tif ( !isset( $this->args['cols'][$vars['orderby']]['meta_key'] ) )\n\t\t\treturn $vars;\n\n\t\t$vars['meta_key'] = $this->args['cols'][$vars['orderby']]['meta_key'];\n\t\t$vars['orderby'] = 'meta_value';\n\n\t\treturn $vars;\n\n\t}", "protected function setupMonthPager()\n {\n $first_date = $this->first_date;\n $current_date = $this->current_date;\n // previous\n if ($first_date->getTimestamp() < $current_date->getTimestamp()) {\n $previous_date = $current_date->copy();\n $previous_date->subMonth(1);\n $this->previous_text = $previous_date->formatLocalized('%B') . ', ' . $previous_date->year;\n $this->previous_url = $this->makePagerUrl(array(\n 'year' => $previous_date->year,\n 'month' => $previous_date->month,\n ));\n } else {\n $this->previous_text = $current_date->formatLocalized('%B') . ', ' . $current_date->year;\n $this->previous_url = '';\n }\n // next\n if (($this->current_year < date('Y')) || ($this->current_month < date('m'))) {\n $next_date = $current_date->copy();\n $next_date->addMonth(1);\n $this->next_text = $next_date->formatLocalized('%B') . ', ' . $next_date->year;\n $this->next_url = $this->makePagerUrl(array(\n 'year' => $next_date->year,\n 'month' => $next_date->month,\n ));\n } else {\n $this->next_text = $current_date->formatLocalized('%B') . ', ' . $current_date->year;\n $this->next_url = '';\n }\n }", "private function sortPostsByDate(array $postIndex) : array\n {\n uasort($postIndex, function ($a, $b) {\n $aa = (int)str_replace('-', '', $a['date']);\n $bb = (int)str_replace('-', '', $b['date']);\n if ($aa > $bb) {\n return -1;\n } elseif ($bb > $aa) {\n return 1;\n }\n return 0;\n });\n\n return $postIndex;\n }", "public function changeContentSortingAndCopyDraftPage() {}", "function sort() {\n #in the future\n }", "function oldest_sort($a, $b) {\r\n \t\t\t\t\t\tglobal $data_rows;\r\n\t\t\t\t\t\t$a = (int)(new DateTime($a->blogDate))->format('U');\r\n\t\t\t\t\t\t$b = (int)(new DateTime($b->blogDate))->format('U');\r\n \t\t\t\t\t\tif ($a==$b)\r\n \t\t\t\t\t\treturn 0;\r\n \t\t\t\t\t\telse\r\n \t\t\t\t\t\treturn ($a < $b ? -1 : 1);\r\n\t\t\t\t\t}", "function carr_post_nav() {\n\t// Don't print empty markup if there's nowhere to navigate.\n\t$previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );\n\t$next = get_adjacent_post( false, '', false );\n\n\tif ( ! $next && ! $previous ) {\n\t\treturn;\n\t}\n\n\t$previous_date = '';\n\t$next_date = '';\n\n\tif ( $previous ) {\n\t\t$previous_date = get_the_date( 'M. j, Y', $previous->ID );\n\t}\n\n\tif ( $next ) {\n\t\t$next_date = get_the_date('M. j, Y', $next->ID);\n\t}\n\n\t?>\n\n\t<nav class=\"navigation post-navigation\" role=\"navigation\">\n\t\t<h1 class=\"screen-reader-text\"><?php _e( 'Post navigation', 'cmc' ); ?></h1>\n\t\t<div class=\"nav-links\">\n\t\t\t<?php if ($previous) : ?>\n\t\t\t<div class=\"nav-previous border-block top\">\n\t\t\t\t<p class=\"block-label\"><span class=\"icon-arrow-left small\"></span>&nbsp;&nbsp;Previous</p>\n\t\t\t\t<p class=\"date ot-caps\"><?php echo $previous_date; ?></p>\n\t\t\t\t<h3 class=\"last-item title font-text\"><?php previous_post_link( '%link', _x( '%title', 'Previous post link', 'cmc' ) ); ?></h3>\n\t\t\t</div>\n\t\t\t<?php endif; if ($next) : ?>\n\t\t\t<div class=\"nav-next border-block top\">\n\t\t\t\t<p class=\"block-label\">Next&nbsp;&nbsp;<span class=\"icon-arrow-right small\"></span></p>\n\t\t\t\t<p class=\"date ot-caps\"><?php echo $next_date; ?></p>\n\t\t\t\t<h3 class=\"last-item title font-text\"><?php next_post_link('%link', _x( '%title', 'Next post link', 'cmc' ) ); ?></h3>\n\t\t\t</div>\n\t\t\t<?php endif; ?>\n\t\t</div><!-- .nav-links -->\n\t</nav><!-- .navigation -->\n\t\n\t<?php\n}", "public function doSort();", "function post_navigation(){\n\t\t$next= get_next_post();\n\t\t$pre= get_previous_post();\n\t\t?>\n\t\t\n\t\t<div class=\"blog-related-post flw\">\n\t\t\t<?php if (!is_string($pre)) {?>\n\t\t\t\t<div class=\"prev-post\">\n\t\t\t\t\t<div class=\"control-post-img\">\n\t\t\t\t\t\t<?php echo get_the_post_thumbnail($pre->ID); ?>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"control-post-desc\">\n\t\t\t\t\t\t<h3 class=\"control-post-name\"><a href=\"<?php echo $pre->guid; ?>\" rel=\"prev\"><?php echo $pre->post_title ?></a></h3>\n\t\t\t\t\t\t<a href=\"<?php echo $pre->guid; ?>\" class=\"control-post-btn\">Previous</a>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t<?php } ?>\n\t\t\t\n\t\t\t<?php \n\t\t\t\tif (!is_string($next)) {?>\n\t\t\t\t\t<div class=\"next-post\">\n\n\t\t\t\t\t\t<div class=\"control-post-img\">\n\t\t\t\t\t\t\t<?php echo get_the_post_thumbnail($next->ID); ?>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"control-post-desc\">\n\t\t\t\t\t\t\t<h3 class=\"control-post-name\"><a href=\"<?php echo $next->guid; ?>\" rel=\"next\"><?php echo $next->post_title ?></a></h3>\n\t\t\t\t\t\t\t<a href=\"<?php echo $next->guid; ?>\" class=\"control-post-btn\">Next</a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\n\t\t\t<?php }\n\t\t\t\t \n\t\techo \"</div>\"; \n\t}", "protected function _sort() {}", "function wpeddit_theme_sort_post( $vars ) {\n\n /* Check if we're viewing the 'picsmash' post type. */\n if ( isset( $vars['post_type'] ) && 'post' == $vars['post_type'] ) {\n\n /* Check if 'orderby' is set to 'rating'. */\n if ( isset( $vars['orderby'] ) && 'rating' == $vars['orderby'] ) {\n\n /* Merge the query vars with our custom variables. */\n $vars = array_merge(\n $vars,\n array(\n 'meta_key' => 'epicredvote',\n 'orderby' => 'meta_value_num'\n )\n );\n }\n \n\n }\n\n return $vars;\n}", "function my_change_sort_order($query){\n\n if(is_post_type_archive('ait-item') || is_post_type_archive('ait-review')):\n\n //If you wanted it for the archive of a custom post type use: is_post_type_archive( $post_type )\n\n //Set the order ASC or DESC\n\n $query->set( 'order', 'DSC' );\n\n //Set the orderby\n\n $query->set( 'orderby', 'post_date' );\n\n $meta_query = array(array());\n $query->set( 'meta_query', $meta_query );\n\n\n endif; \n\n}", "function previous_post($format = '%', $previous = 'previous post: ', $title = 'yes', $in_same_cat = 'no', $limitprev = 1, $excluded_categories = '')\n{\n}", "function event_order( $wp_query ) {\n\tglobal $pagenow;\n \tif ( is_admin() && 'edit.php' == $pagenow && !isset( $_GET['orderby'] )) {\n \t\t$screen = get_current_screen();\n \t\t$post_type = $screen->post_type;\n \t\tif( $post_type == 'event' ):\n\t \t$wp_query->set( 'order', 'DESC' );\n\t \t$wp_query->set( 'meta_key', 'start_date' );\n\t \t$wp_query->set( 'orderby', 'meta_value_num' );\n\t endif;\n \t}\n}", "function trt_the_posts_navigation() {\n\t\t$args = array(\n\t\t\t'prev_text' => esc_html__( '&larr; Older Posts', '10rt' ),\n\t\t\t'next_text' => esc_html__( 'Newer Posts &rarr;', '10rt' ),\n\t\t\t'screen_reader_text' => esc_html__( 'Posts Navigation', '10rt' ),\n\t\t);\n\t\tthe_posts_navigation( $args );\n\t}", "function fashe_news_posts(){\n\n $args=array(\n 'posts_per_page' => 3,\n 'orderby' => 'post_date',\n 'order' => 'DESC',\n 'post_type' => 'post',\n 'post_status' => 'publish'\n );\n\n $the_query= new WP_Query($args);\n $posts=$the_query->posts;\n\n return $posts;\n\n}", "function fashe_news_posts(){\n\n $args=array(\n 'posts_per_page' => 3,\n 'orderby' => 'post_date',\n 'order' => 'DESC',\n 'post_type' => 'post',\n 'post_status' => 'publish'\n );\n\n $the_query= new WP_Query($args);\n $posts=$the_query->posts;\n\n return $posts;\n\n}", "protected function _order_by_recent ()\n {\n if ($this->includes (Unpublished) && ! $this->includes (Visible))\n {\n $this->set_order ('entry.state ASC, entry.time_modified DESC');\n }\n else\n {\n $this->set_order ('entry.state ASC, entry.time_published DESC, entry.time_created DESC');\n }\n }", "public function sort($data);", "function sortDirections() {\n\treturn array(\n\t\t'asc'\t=> 'Ascending',\n\t\t'desc'\t=> 'Descending'\n\t);\t\n}", "static function addSortFields(&$meds) {\n foreach ($meds as &$med) { \n $med->_dateOnly = dateToString($med->date);\n }\n return $meds;\n }", "function usort_reorder( $a, $b ) {\n $orderby = ( ! empty( $_GET['orderby'] ) ) ? $_GET['orderby'] : 'post_date';\n // If no order, default to asc\n $order = ( ! empty($_GET['order'] ) ) ? $_GET['order'] : 'dsc';\n // Determine sort order\n $result = strcmp( $a[$orderby], $b[$orderby] );\n // Send final sort direction to usort\n return ( $order === 'asc' ) ? $result : -$result;\n }", "public function childrenPosts($OrderBycolumn)\n {\n }", "function emarking_sort_submission_pages($submission, $neworder) {\n global $DB;\n // Verify that the new order is an array.\n if (!is_array($neworder)) {\n return false;\n }\n // Verify that it contains the numbers from 0 to length -1.\n $sortedbypage = array_merge($neworder);\n asort($sortedbypage);\n $newindices = array();\n $i = 0;\n foreach($sortedbypage as $k => $v) {\n if (intval($v) != $i) {\n return false;\n }\n $i++;\n $newindices[intval($v) + 1] = $k + 1;\n }\n // Get all the pages involved.\n if (!$pages = $DB->get_records('emarking_page', array(\n 'submission' => $submission->id\n ), 'page ASC')) {\n return false;\n }\n // Get the total pages in the sumission.\n $numpages = count($pages);\n // Verify the new order has the same number of pages as the submission.\n if ($numpages != count($neworder)) {\n return false;\n }\n // Update each page according to the new sort order.\n $i = 0;\n foreach($pages as $page) {\n $newindex = $newindices[$page->page];\n $page->page = $newindex;\n $DB->update_record('emarking_page', $page);\n $i++;\n }\n return true;\n}", "public function posts()\n { //DESC order, so that the post latest remain on top\n return $this->hasMany(Post::class)->orderBy('created_at','DESC'); \n //the 'created_at' is field that provided by larabel automatically for timestamp\n }", "public function sort();", "public function sort();", "function sort() { }", "function _post_type_sort_function($vars){\n\t\t\n\t\tif ( isset( $vars['orderby'] ) && 'completed' == $vars['orderby'] ) {\n\t\t\t\n\t\t\t$vars = array_merge( $vars, array(\n\t\t\t\t\t\t\t\t\t\t\t'meta_key' => '_wppm_custom_sort',\n\t\t\t\t\t\t\t\t\t\t\t'orderby' => 'meta_value_num'\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\t\t}//if\n\t\t\n\t\tif ( isset( $vars['orderby'] ) && 'end_date' == $vars['orderby'] ) {\n\t\t\t\n\t\t\t$vars = array_merge( $vars, array(\n\t\t\t\t\t\t\t\t\t\t\t'meta_key' => '_wppm_custom_sort_end_date',\n\t\t\t\t\t\t\t\t\t\t\t'orderby' => 'meta_value_number'\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\t\t}//if\n\t\t\n\t\tif ( isset( $vars['orderby'] ) && 'paid' == $vars['orderby'] ) {\n\t\t\t\n\t\t\t$vars = array_merge( $vars, array(\n\t\t\t\t\t\t\t\t\t\t\t'meta_key' => '_wppm_custom_sort_paid',\n\t\t\t\t\t\t\t\t\t\t\t'orderby' => 'meta_value_number'\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\t\t}//if\n\t\t \n\t\treturn $vars;\n\t}", "public static function compareDatesForSortAsc($a, $b) {\n\n\t\tif($a['date'] == '' && $b['date'] == ''){ // If neither are set, sort by the slug\n\t\t\treturn strcasecmp($a['slug'], $b['slug']);\n\t\t}elseif($b['date'] == ''){ // always less than, undated content comes last\n\t\t\treturn -1;\n\t\t}elseif($a['date'] == ''){ // greater than\n\t\t\treturn 1;\n\t\t}\n\n\t \t$dateA = date_create($a['date']);\n\t \t$dateB = date_create($b['date']);\n\n\t \tif($dateA > $dateB){\n\t \t\treturn 1;\n\t \t}elseif($dateA < $dateB){\n\t \t\treturn -1;\n\t \t}else{\n\t \t\treturn 0;\n\t \t}\n\n\t}", "public function findNext(\\TYPO3\\Blog\\Domain\\Model\\Post $post) {\n\t\t$query = $this->createQuery();\n\t\treturn $query->matching($query->greaterThan('date', $post->getDate()))\n\t\t\t->setOrderings(array('date' => \\TYPO3\\FLOW3\\Persistence\\QueryInterface::ORDER_ASCENDING))\n\t\t\t->execute()\n\t\t\t->getFirst();\n\t}", "private function sortingPosts($medias)\n {\n $sorting = [];\n foreach ($medias as $media) {\n foreach ($media as $posts) {\n $sorting[] = $posts;\n }\n }\n usort($sorting, function($a,$b){\n $value1 = $a['createdTime'];\n $value2 = $b['createdTime'];\n return $value2 - $value1;\n });\n\n return $sorting;\n }", "function dateSortAsc($a, $b){\n $time1 = strtotime($a['release_date']);\n $time2 = strtotime($b['release_date']);\n return $time1 - $time2;\n}", "public function getHashtagPostPreviewsAfterDate( $after, $hashtag ){\n\t\t\t$start_d = new MongoDate( $after );\n\t\t\t$count = AMOUNT_ON_MAIN_PAGE+1; //get one extra so we can tell if there is a next page\n\t\t\t$collection = $this->db->posts;\t\t\n\t\t\t$fields = $this->preview_fields;\t\t\t\t\n\t\t\t$cursor = $collection->find( array( \"hashtags\"=>$hashtag, \"lastModified\"=>array( '$lt'=>$start_d ) ), $fields )\n\t\t\t->limit($count)\n\t\t\t->sort( array( 'lastModified' => -1 ) );\n\t\t\treturn $cursor;\r\n\t\t}", "function sortbydate($a, $b) {\n if($a['date'] < $b['date'])\n return 1;\n if($a['date'] > $b['date'])\n return -1;\n return 0;\n}", "public function getNextPost($post,$dir,$restrict_to_category=false, $restrict_to_lang=false)\n\t{\n\t\t$dt = $post->post_dt;\n\t\t$post_id = (integer) $post->post_id;\n\t\t\n\t\tif($dir > 0) {\n\t\t\t$sign = '>';\n\t\t\t$order = 'ASC';\n\t\t}\n\t\telse {\n\t\t\t$sign = '<';\n\t\t\t$order = 'DESC';\n\t\t}\n\t\t\n\t\t$params['post_type'] = $post->post_type;\n\t\t$params['limit'] = 1;\n\t\t$params['order'] = 'post_dt '.$order.', P.post_id '.$order;\n\t\t$params['sql'] =\n\t\t'AND ( '.\n\t\t\"\t(post_dt = '\".$this->con->escape($dt).\"' AND P.post_id \".$sign.\" \".$post_id.\") \".\n\t\t\"\tOR post_dt \".$sign.\" '\".$this->con->escape($dt).\"' \".\n\t\t') ';\n\t\t\n\t\tif ($restrict_to_category) {\n\t\t\t$params['sql'] .= $post->cat_id ? 'AND P.cat_id = '.(integer) $post->cat_id.' ' : 'AND P.cat_id IS NULL ';\n\t\t}\n\t\t\n\t\tif ($restrict_to_lang) {\n\t\t\t$params['sql'] .= $post->post_lang ? 'AND P.post_lang = \\''. $this->con->escape($post->post_lang) .'\\' ': 'AND P.post_lang IS NULL ';\n\t\t}\n\t\t\n\t\t$rs = $this->getPosts($params);\n\t\t\n\t\tif ($rs->isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn $rs;\n\t}", "function lnk_multisite_manager_compare_by_date($post1, $post2){\n if($post1->post_date == $post2->post_date) {\n return 0;\n } else if ($post1->post_date > $post2->post_date) {\n return -1;\n } else {\n return 1;\n }\n }", "function next_post($format = '%', $next = 'next post: ', $title = 'yes', $in_same_cat = 'no', $limitnext = 1, $excluded_categories = '')\n{\n}", "function wpeddit_order_posts($query) {\n global $wp_query;\n if ( ! $query->is_main_query() )\n return $query;\n \n if(!is_page() || !is_admin()){\n $query->set('meta_key', 'epicredrank');\n $query->set('orderby', 'meta_value_num');\n $query->set('order', 'DESC');\n $query->set('ignore_sticky_posts','0');\n }\n return $query;\n}", "function sortArticlesByDate(array $todaysDate, array $datePublished): int\n{\n return strtotime($datePublished['date']) - strtotime($todaysDate['date']);\n}", "function datesort($a, $b)\n{\n return intval($b->timestamp) - intval($a->timestamp);\n}", "function ProudctByDateASC($data, $method)\n{\n\treturn ($data[\"date\"] <= $method[\"date\"]) ? -1: 1;\n}", "function wprss_feed_item_orderby( $query ) {\n if( ! is_admin() )\n return;\n\n $post_type = $query->get('post_type');\n\n // If we're on the feed listing admin page\n if ( $post_type == 'wprss_feed_item') {\n // Set general orderby to date the feed item was published\n $query->set('orderby','publishdate');\n // If user clicks on the reorder link, implement reordering\n $orderby = $query->get( 'orderby');\n if( 'publishdate' == $orderby ) {\n $query->set( 'order', 'DESC' );\n $query->set( 'orderby', 'date' );\n }\n }\n }", "function prepareSort() {\r\n\t\t$sorter_reference = \"s_\" . $this->listName;\r\n\t\tif (isset($_GET[$sorter_reference])) {\r\n\t\t\t$sorterString = $_GET[$sorter_reference];\r\n\t\t\t$this->defaultSort = $sorterString;\r\n\t\t\t$columnName = preg_replace(\"/\\s+(DESC|ASC)/i\", \"\", $sorterString);\r\n\t\t} else {\r\n\t\t\t$columnName = preg_replace(\"/\\s+(DESC|ASC)/i\", \"\", $this->defaultSort);\r\n\t\t}\r\n\r\n\t\tif ($columnName != '') {\r\n\t\t\tpreg_match(\"/\\S*\\s+(DESC|ASC)/i\", $this->defaultSort, $matches);\r\n\t\t\tforeach ($this->columns as $key => $arr) {\r\n\t\t\t\t$order = '';\r\n\t\t\t\tif($key == $columnName) {\r\n\t\t\t\t\tif (strtoupper($matches[1]) == 'ASC') {\r\n\t\t\t\t\t\t$paramVal = \"DESC\";\r\n\t\t\t\t\t\t$order = 'ASC';\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$paramVal = \"ASC\";\r\n\t\t\t\t\t\t$order = 'DESC';\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$paramVal = \"ASC\";\r\n\t\t\t\t}\r\n\t\t\t\t$this->columnsSort[$key] = KT_addReplaceParam($this->url, $sorter_reference, $key . ' ' .$paramVal);\r\n\t\t\t\t$this->columnsSortIcon[$key] = $order;\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t}", "public static function compareDatesForSortDesc($a, $b) {\n\n\t\tif($a['date'] == '' && $b['date'] == ''){ // If neither are set, sort by the slug\n\t\t\treturn strcasecmp($a['slug'], $b['slug']);\n\t\t}elseif($b['date'] == ''){ // always less than, undated content comes last\n\t\t\treturn -1;\n\t\t}elseif($a['date'] == ''){ // greater than\n\t\t\treturn 1;\n\t\t}\n\n\t \t$dateA = date_create($a['date']);\n\t \t$dateB = date_create($b['date']);\n\n\t \tif($dateA < $dateB){\n\t \t\treturn 1;\n\t \t}elseif($dateA > $dateB){\n\t \t\treturn -1;\n\t \t}else{\n\t \t\treturn 0;\n\t \t}\n\n\t}", "public static function get_posts( &$query ) {\n\t\tif( $query->query_vars['post_type'] === static::$post_type ) {\n\t\t\t$query->set('orderby', $_GET['orderby'] ?: 'menu_order');\n\t\t\t$query->set('order', $_GET['order'] ?: 'asc');\n\t\t}//end if\n\t}", "public function pre_get_posts_action( $query ) {\n\t\tglobal $pado;\n\n\t\tif ( ( ! $pado->get( 'reorder' ) ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ( is_admin() && $query->query_vars['post_type'] === 'document' ) &&\n\t\t\t( $query->is_post_type_archive( 'document' )\n\t\t\t || $query->is_tax( 'document_category' )\n\t\t\t || ( $query->is_search() && ( isset( $_REQUEST['post_type'] ) ? ( $_REQUEST['post_type'] == 'document' ) : false ) )\n\t\t\t) && $query->is_main_query()\n\t\t) {\n\t\t\t$query->set( 'orderby', 'menu_order' );\n\t\t\t$query->set( 'order', 'ASC' );\n\t\t}\n\n\t}", "public function changeContentSortingAndCopyLivePage() {}", "protected function pageSort($a, $b)\n\t{\n\t\tif ($a['sort'] == $b['sort']) {\n\t\t return 0;\n\t\t}\n\t\treturn ($a['sort'] < $b['sort']) ? -1 : 1;\n\t}", "public function getNextGalleryItem($post,$dir,$gal_url=null,$nb=1) {\n\t\tif ($gal_url != null) {\n\t\t\t$gal = $this->getGalleries(array('post_url' => $gal_url));\n\t\t\t$params = $this->getGalOrder($gal);\n\t\t\tif ($dir < 0) {\n\t\t\t\t$sign= ($params['sortby']=='ASC') ? '<':'>';\n\t\t\t\t$params['sortby'] = ($params['sortby']=='ASC') ? 'DESC' : 'ASC';\n\t\t\t} else {\n\t\t\t\t$sign= ($params['sortby']=='ASC') ? '>':'<';;\n\t\t\t}\n\t\t} else {\n\t\t\tif($dir > 0) {\n\t\t\t\t$sign = '>';\n\t\t\t\t$params['orderby'] = 'P.post_dt';\n\t\t\t\t$params['sortby'] = 'ASC';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$sign = '<';\n\t\t\t\t$params['orderby'] = 'P.post_dt';\n\t\t\t\t$params['sortby'] = 'DESC';\n\t\t\t}\n\t\t}\n\t\t$params['order'] = $this->con->escape($params['orderby']).' '.\n\t\t\t$this->con->escape($params['sortby']).', P.post_id '.\n\t\t\t$this->con->escape($params['sortby']);\n\t\tswitch($params['orderby']) {\n\t\t\tcase \"P.post_dt\" : \n\t\t\t\t$field_value = $post->post_dt;\n\t\t\t\tbreak;\n\t\t\tcase \"P.post_title\" : \n\t\t\t\t$field_value = $post->post_title;\n\t\t\t\tbreak;\n\t\t\tcase \"M.media_file\" : \n\t\t\t\t$field_value = $post->media_file;\n\t\t\t\tbreak;\n\t\t\tcase \"P.post_url\" : \n\t\t\t\t$field_value = $post->post_url;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$field_value = $post->post_dt;\n\t\t\t\tbreak;\n\t\t}\n\t\t$post_id=$post->post_id;\n\t\t$params['sql'] =\n\t\t\t'AND ( '.\n\t\t\t\"\t(\".$params['orderby'].\" = '\".$this->con->escape($field_value).\n\t\t\t\"' AND P.post_id \".$sign.\" \".$post_id.\") \".\n\t\t\t\"\tOR \".$params['orderby'].\" \".$sign.\" '\".$this->con->escape($field_value).\"' \".\n\t\t\t') ';\n\t\t$params['post_type'] = 'galitem';\n\t\t$params['limit'] = array(0,$nb);\n\t\t$params['gal_url'] = $gal_url;\n\t\t$rs = $this->getGalImageMedia($params,false);\n\t\tif ($rs->isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn $rs;\n\t}", "public function sort() {\n usort($this->records, function($a, $b) {\n return $a->sortorder - $b->sortorder; \n });\n }", "function setSortByDate()\n {\n $this->setSortOrder('week_endDate');\n return;\n }", "function get_feed() {\n\t\t$postlist = remove_doubles($this->feedposts);\n\t\treturn array_object_sort( $postlist, 'post_date_gmt', $this->direction );\n\t}", "private function preparePaginationInfo() {\n $postIsPaginate = $this->getSetting('_post_paginate');\n $postNextPageUrlSelectors = $this->getSetting('_post_next_page_url_selectors');\n $postAllPageUrlsSelectors = $this->getSetting('_post_next_page_all_pages_url_selectors');\n\n // Add whether or not to paginate the post when saving to the db\n $this->postData->setPaginate($postIsPaginate ? true : false);\n\n // Before clearing the content, check if the post should be paginated and take related actions.\n // Do this before clearing the content, because pagination might be inside the content and the user might mark\n // it as unnecessary element.\n if($postIsPaginate) {\n // Get next page URL of the post\n foreach($postNextPageUrlSelectors as $nextPageSelector) {\n $attr = isset($nextPageSelector[\"attr\"]) && $nextPageSelector[\"attr\"] ? $nextPageSelector[\"attr\"] : \"href\";\n if ($nextPageUrl = $this->extractData($this->crawler, $nextPageSelector[\"selector\"], $attr, false, true, true)) {\n\n $this->postData->setNextPageUrl(Utils::prepareUrl($this->getSiteUrl(), $nextPageUrl, $this->postUrl));\n break;\n }\n }\n\n // Get all page URLs of the post\n foreach($postAllPageUrlsSelectors as $selector) {\n $attr = isset($selector[\"attr\"]) && $selector[\"attr\"] ? $selector[\"attr\"] : \"href\";\n if ($allPageUrls = $this->extractData($this->crawler, $selector, $attr, \"part_url\", false, true)) {\n $allPageUrls = Utils::array_msort($allPageUrls, [\"start\" => SORT_ASC]);\n\n $this->postData->setAllPageUrls($allPageUrls);\n break;\n }\n }\n }\n }", "public function defaultSortInfo() {\n\n return array('date' => 'ASC');\n }", "function split_post_pre_filter($raw_posts){\n\t\n\t\tif($this->option('autosplit') == 'yes') {\n\t\t\t$splitter = $this->option('split_at',$this->plugin_slug.'_option');\n\t\t\t\n\t\t\tforeach($raw_posts as $num => $raw_post){\n\t\t\t\tforeach($raw_post as $key => &$post){\n\t\t\t\t\tif('post_content' == $key) {\n\t\t\t\t\t\t$post = str_ireplace(\"<$splitter\",\"<!--nextpage--><$splitter\",$post);\n\t\t\t\t\t\tif(strpos($post,'<!--nextpage-->') == 0){\n\t\t\t\t\t\t\t$post = preg_replace('/<!--nextpage-->/i','',$post,1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$raw_post->$key = $post;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$raw_posts[$num] = $raw_post;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $raw_posts;\n\t}", "public function order_by_price_asc_post_clauses($args)\n {\n }", "public function order_by_price_asc_post_clauses($args)\n {\n }", "function _blog_gen_post($perpage, $pagelink, $sql, $args = null){\n\tglobal $ssc_database;\n\t\n\t$args = func_get_args();\n\t$perpage = array_shift($args);\n\t$pagelink = array_shift($args);\n\t\n\tif (array_shift($_GET['param']) == 'page'){\n\t\t$page = array_shift($_GET['param']);\n\t\tif ((int)$page <= 0){\n\t\t\t$page = 1;\n\t\t}\n\t}\n\telse{\n\t\t$page = 1; \n\t}\n\t\n\tarray_unshift($args, $page, $perpage);\n\t\n\t$paged_result = call_user_func_array(array($ssc_database, 'query_paged') , $args);\n\t$result =& $paged_result['result'];\n\t$out = '';\n\t// For each blog post listed\n\twhile (($data = $ssc_database->fetch_object($result)) && ($perpage-- > 0)){\n\t\t$posturl = $_GET['path'] . date(\"/Y/m/d/\", $data->created) . $data->urltext;\n\t\t$out .= \"\\n<h3>\" . l($data->title, $posturl) . \"</h3>\\n\";\n\t\t$out .= t(\"Posted !date at !time by !author\\n\", \n\t\t\tarray(\t'!date' => date(ssc_var_get('date_med', SSC_DATE_MED), $data->created),\n\t\t\t\t\t'!time' => date(ssc_var_get('time_short', SSC_TIME_SHORT), $data->created),\n\t\t\t\t\t'!author' => $data->author));\n\n\t\t// Get post tags\n\t\t$r = $ssc_database->query(\"SELECT tag FROM #__blog_relation r, #__blog_tag t WHERE r.tag_id = t.id AND r.post_id = %d ORDER BY tag ASC\", $data->id);\n\t\tif ($ssc_database->number_rows()){\n\t\t\t$out .= \"<br />Tagged: \";\n\t\t\t$txt = '';\n\t\t\twhile($dat = $ssc_database->fetch_object($r))\n\t\t\t\t$txt .= ', ' . l($dat->tag, $_GET['path'] . '/tag/' . $dat->tag);\n\t\t\t\n\t\t\t$txt = substr($txt, 2);\n\t\t\t$out .= $txt;\n\t\t}\n\t\t\n\t\t// Comments if listed\n\t\tif ($_GET['blog_comments'] == true){\n\t\t\t// Either show number or \"Add One!\" links direct to comments\n\t\t\tif ($data->count == 0){\n\t\t\t\tif ($data->commentsdisabled == 0)\n\t\t\t\t\t$out .= '<br />' . t(\"No comments - !action\\n\", array('!action' => l(t('Add one!'), $posturl . \"#comments\")));\n\t\t\t\telse\n\t\t\t\t\t$out .= '<br />' . t(\"No comments\\n\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$out .= '<br />' . l($data->count . ' comments', $posturl . \"#comments\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (isset($data->body))\n\t\t\t$out .= '<br />' . sscText::convert($data->body) . '<hr class=\"clear\"/>';\n\t\telse\n\t\t\t$out .= '<hr />';\n\t\t\n\t}\n\t\n\t// Page navigation\n\t$out .= '<div class=\"paging\"><span>';\n\t// Is there a previous page?\n\tif ($page > 1)\n\t\t$out .= l(t('Previous page'), $pagelink . ($page - 1));\n\n\t$out .= '</span> <span><img src=\"/images/rss.png\" alt=\"Subscribe using\" /> ' . l(t('ATOM 1.0'), $_GET['path'] . '/feed') . '</span> <span>';\n\n\t// Next page?\n\tif ($paged_result['next'])\n\t\t$out .= l(t('Next page'), $pagelink . ($page + 1));\n\t\t\n\t$out .= '</span></div>';\n\n\treturn $out;\n}", "protected static function sortByRecentlySaved(Post $a, Post $b)\n {\n // if pivot ID are null, then apply default sort function\n if (is_null($a->pivot) || is_null($a->pivot->id) ||\n is_null($b->pivot) || is_null($b->pivot->id)) {\n return call_user_func('self::'.self::getSortFunctionNames()[0], $a,\n $b);\n }\n\n return $b->pivot->id - $a->pivot->id;\n }", "public function asort() {}", "function blogPosts($lang, $page) {\n\n\tglobal $blogFolderPath;\n\n\t$indexFirstBlog = ((int)$page -1) * NB_POSTS_IN_PAGE;\n\t$indexNextPage = $indexFirstBlog + NB_POSTS_IN_PAGE;\n\t$listFolders = ls($blogFolderPath);\n\n\t$i = 0;\n\t$posts = array();\n\trsort($listFolders);\n\n\t//ChromePhp::info(\"Listing from to\", $indexFirstBlog, $indexNextPage);\n\n\tforeach ($listFolders as $post) {\n\t\tif (checkPostFolder($post)) {\n\t\t\t$blogPostPath = joinPaths($blogFolderPath, $post);\n\t\t\t$blogFile = joinPaths($blogPostPath , $lang.\".md\");\n\n\t\t\tif (!file_exists($blogFile)) {\n\t\t\t\t$blogFile = joinPaths($blogPostPath , \"vi.md\"); //fallback to vi.md\n\t\t\t}\n\n\t\t\t$jsonBlogPost = readBlogPost($blogFile); //check status\n\t\t\tif ($jsonBlogPost != null) { //status ok\n\t\t\t\tif ($i >= $indexNextPage) {\n\t\t\t\t\t//optim: we won't check all to the last folder,\n\t\t\t\t\t// we only check until we met the first index of the next page\n\t\t\t\t\t// here we are sure that there is a next page\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ($indexFirstBlog <= $i && $i < $indexNextPage) {\n\t\t\t\t\tarray_push($posts, $jsonBlogPost);\n\t\t\t\t\t//ChromePhp::info(\"OK\", $post);\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t}\n\t//after the above foreach $i will point to the next page (in general)\n\t//let guess the total post is the number of folder\n\t$totalPosts = count($listFolders);\n\n\t//here $i can no longer go to the next page so we met the last page\n\tif ($i < $indexNextPage) {\n\t\t$totalPosts = $i; //we know exactly how many post are there\n\t}\n\n\t$result = array(\"page\" => (int)$page);\n\t$result[\"totalpages\"] = (int)((int)($totalPosts-1)/NB_POSTS_IN_PAGE) + 1;\n\t$result[\"totalposts\"] = $totalPosts;\n\t$result[\"lang\"] = $lang;\n\t$result[\"posts\"] = $posts;\n\n\treturn reponseJson($result);\n}", "function brg_load_next_posts( $data ) {\n $category_id = isset( $data['category_id'] ) ? $data['category_id'] : false;\n $loader = new BG_Post_Archive_Delegator(\n 'post', $data['on'], false, $category_id\n );\n \n ob_start();\n $loader->get_next_posts();\n return ob_get_clean();\n}", "function sortByComments($a, $b)\r\n\t{\r\n\t\t$a = $a['comments'];\r\n\t\t$b = $b['comments'];\r\n\r\n\t\tif ($a == $b) return 0;\r\n\t\treturn ($a < $b) ? -1 : 1;\r\n\t}", "public function orderByDate($descending = true)\n\t{\n\t\t$this->sortBy(function($article) { return $article->getDate()->format('Y/m/d'); });\n\n\t\tif ($descending)\n\t\t{\n\t\t\t$this->reverse();\n\t\t}\n\n\t\treturn $this;\n\t}" ]
[ "0.6113334", "0.5655804", "0.5647764", "0.56349", "0.56266695", "0.56260973", "0.55809766", "0.5565071", "0.5560404", "0.5522739", "0.55218685", "0.5482185", "0.5475432", "0.54568696", "0.54416305", "0.54366475", "0.54311514", "0.54091936", "0.53857416", "0.5372996", "0.5365564", "0.53318", "0.5289658", "0.52864254", "0.5284805", "0.52482474", "0.5234497", "0.522657", "0.52256924", "0.51918185", "0.5187179", "0.5184427", "0.5173288", "0.51627433", "0.5141496", "0.5141357", "0.513737", "0.5133984", "0.513093", "0.51271325", "0.5116592", "0.510166", "0.50947547", "0.5087822", "0.5084907", "0.5069512", "0.50588673", "0.50564826", "0.5047083", "0.50427806", "0.50418985", "0.50418985", "0.504101", "0.50349027", "0.5022591", "0.5003812", "0.49910817", "0.4981216", "0.4975257", "0.49722487", "0.49654427", "0.49654427", "0.4959561", "0.49569565", "0.495435", "0.49501985", "0.4934451", "0.49332988", "0.49213314", "0.49189702", "0.49167874", "0.49075335", "0.4905222", "0.48941532", "0.4887624", "0.48865476", "0.48863128", "0.48834768", "0.48811078", "0.4878557", "0.48726204", "0.48694715", "0.48663417", "0.48621577", "0.48567253", "0.4853463", "0.48478878", "0.48458174", "0.48424396", "0.48351884", "0.48321268", "0.48286578", "0.48270756", "0.48185208", "0.48157346", "0.48123538", "0.48072317", "0.48046863", "0.48033535", "0.48029745" ]
0.7499107
0
Is the reminder already used?
Использован ли напоминание?
private function used(string $reminder): bool { return (bool) (new Storage\ParameterizedQuery( $this->database, 'SELECT 1 FROM forgotten_passwords WHERE reminder IS NOT DISTINCT FROM ? AND used = TRUE', [$reminder] ))->field(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasResettime(){\n return $this->_has(2);\n }", "public function hasReminderSettings()\n {\n return $this->reminder != null;\n }", "public function hasReminders()\n {\n return $this->calendar->subscription_reminders ? true : false;\n }", "public function alreadyExists()\n {\n return !!($this->fresh());\n }", "function reminder_necessary($last_reminder)\n\t{\n\t\tif ((isset($this->settings['mail_reminder_interval'])) and (0 != $this->settings['mail_reminder_interval'])) {\n\t\t\tif ($last_reminder == '0000-00-00') {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t$today = new DateTime(\"today\");\n\t\t\t$interval = $today->diff(new DateTime($last_reminder));\n\t\t\treturn ($interval->days > $this->settings['mail_reminder_interval']);\n\n\t\t}\n\t}", "public function isRecurring()\n {\n return !!$this->frequency;\n }", "private function haveHadMeeting()\n {\n $meeting = file_get_contents('meeting.db');\n\n return $meeting === 'completed';\n }", "public function isRegenerated() : bool;", "public function used():bool;", "public function getRepeat(): bool;", "public function isRecurring()\n {\n //only recurring so long as it is not a trial.\n return !$this->get('trial');\n }", "public function hasRelivetime(){\n return $this->_has(4);\n }", "function check() \n\t{\n\t return $this->expires > time();\n\t}", "protected function isRefillNeeded() {\n $config = $this->configFactory->get('draco_coffee.settings');\n $next_pot = $this->state->get('draco_coffee.start') + ($this->state->get('draco_coffee.pot_counter') * 3600);\n return (($this->state->get('draco_coffee.pot_counter') < $config->get('pots')) &&\n ($next_pot < $this->time->getCurrentTime()));\n }", "public static function isCreated()\n {\n return (self::$instance !== null);\n }", "public function isInUse() {\n\t\treturn (null === $this->Data[self::DATE_END]);\n\t}", "public function hasUseTicket(){\n return $this->_has(8);\n }", "static function isFrequentlyRunning() {\n if(self::$is_frequently_running === null) {\n self::$is_frequently_running = (ConfigOptions::getValue('last_frequently_activity', false) + 600) >= time(); // Frequently task executed in last 10 minutes\n } // if\n\n return self::$is_frequently_running;\n }", "public function getIsUsed();", "public function isInstant(){ return $this->periodic == self::USER_REQUESTED; }", "public function check(){\n\t\t\t$this->data = json_decode($this->storage->get('recall'));\n\n\t\t\t// And check if it's a new message by comparing its time\n\t\t\tif($this->data->time !== $this->cache){\n\t\t\t\t$this->cache = $this->data->time;\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "public function recurring()\n {\n return ! $this->onTrial() && ! $this->cancelled() && ! $this->paused();\n }", "public function isRecurring()\n {\n return $this->getIsRecurring() == '1';\n }", "public function isUsed()\n {\n return ((is_null($this->dateUse) && is_null($this->userId))? false : true);\n }", "public function hasExpiration(){\n return $this->_has(5);\n }", "public function isRecurring()\n {\n return false;\n }", "function CanAttend()\n\t{\treturn strtotime($this->details['starttime'] . ' 00:00:00') < time();\n\t}", "public function used(): bool\n {\n $use = rand(1,100);\n if ($this->chanceToUse >= $use) {\n return true;\n }\n return false;\n }", "public function hasRememberedNewData()\n {\n return null !== $this->rememberFile && null !== $this->rememberObject;\n }", "private function expired(string $reminder): bool {\n\t\treturn (bool) (new Storage\\ParameterizedQuery(\n\t\t\t$this->database,\n\t\t\t'SELECT 1\n FROM forgotten_passwords\n WHERE reminder IS NOT DISTINCT FROM ?\n AND expire_at < NOW()',\n\t\t\t[$reminder]\n\t\t))->field();\n\t}", "public function check(){\n\t\t\t$this->data = json_decode($this->storage->get('refresh'));\n\n\t\t\t// And check if it's a new message by comparing its time\n\t\t\tif($this->data->time !== $this->cache){\n\t\t\t\t$this->cache = $this->data->time;\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "public function needsReAuth() { \n\t\t$lastTouch = $this->lastTouchTime;\n\t\tif ($lastTouch === -1) {\n\t\t\t$lastTouch = $this->touchTime;\n\t\t}\n\t\tif ( time() - $lastTouch >= $this->inactivityReAuth ) {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\treturn FALSe;\n\t\t}\n\t}", "public function hasExpiretime(){\n return $this->_has(6);\n }", "public function isFresh(){ }", "public function isSeen() : bool{\n\t\treturn $this->seen;\n\t}", "function isFresh($name, $time) {\n\t\treturn false;\n\t}", "function isFresh($name, $time)\n {\n return true;\n }", "private function post_just_created()\n\t{\n\t\treturn ($this->_next_time - $this->_time) <= 1;\n\t}", "public function recurring()\n {\n return ! $this->onTrial() && ! $this->paused() && ! $this->onPausedGracePeriod() && ! $this->cancelled();\n }", "public function isHit() {\n if ($this->refresh > 0){\n $file = $this->getFilepath();\n // check the expired file cache.\n $mtime = 0;\n if (file_exists($file)){\n $mtime = filemtime($file);\n }\n $filetimemod = $mtime + $this->refresh;\n // if the renewal date is smaller than now, return true (no need for update)\n if ($filetimemod < time()){\n return false;\n }\n } else {\n return false;\n }\n return true;\n }", "private function canHandleRenewalNotification()\n {\n // Ensure that this service is only set to run once a day.\n $runMinute = $this->settings->get('plugin_domainupdater_Run schedule - Minute');\n $runHour = $this->settings->get('plugin_domainupdater_Run schedule - Hour');\n $runDay = $this->settings->get('plugin_domainupdater_Run schedule - Day');\n $runMonth = $this->settings->get('plugin_domainupdater_Run schedule - Month');\n $runWeekDay = $this->settings->get('plugin_domainupdater_Run schedule - Day of the week');\n\n if ( is_numeric($runMinute) && is_numeric($runHour) && $runDay == '*' && $runMonth == '*' && $runWeekDay == '*' ) {\n return true;\n }\n return false;\n }", "public static function note_exists()\n {\n }", "public function hasPendingtime(){\n return $this->_has(9);\n }", "public function check(){\n\t\t\t$this->data = json_decode($this->storage->get('call'));\n\n\t\t\t// And check if it's a new message by comparing its time\n\t\t\tif($this->data->time !== $this->cache){\n\t\t\t\t$this->cache = $this->data->time;\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "public function isRunOnlyOnce() {\n return $this->only_once;\n }", "public function getIsNewSingleExecution() {}", "function isReadyToGo()\n {\n return (strtotime($this->Created) + $this->DeferTimeInSeconds) < time();\n }", "private function isRecycle()\n {\n if (!$this->love_set['trading']) {\n return false;\n }\n if (!$this->love_set['recycl'] || $this->love_set['recycl'] <= 0) {\n return false;\n }\n return true;\n }", "public function checkemailrepeat()\n {\n $this -> load -> model('user_model');\n if($this -> user_model -> check_email_repeat()){\n echo 'true';\n }else{\n echo 'false';\n }\n }", "public static function has_note_been_actioned()\n {\n }", "public function is_time() {\n\n\t\t\t$installed = (int) get_option( $this->key, false );\n\n\t\t\tif ( 0 === $installed ) {\n\t\t\t\t$this->setup_date();\n\t\t\t\t$installed = time();\n\t\t\t}\n\n\t\t\tif ( $installed + ( $this->days * 86400 ) > time() ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\n\t\t}", "private function is_schedulable_notification() {\n return $this->check_extra_params_value('notification_type', 'reminder');\n }", "public function check(){\n $this->data = json_decode($this->storage->get('user'));\n \n // And check if it's a new message by comparing its time\n if($this->data->time !== $this->cache){\n $this->cache = $this->data->time;\n return true;\n }\n \n return false;\n }", "public function hasTime(){\n return $this->_has(1);\n }", "public function wasFreshInstance() : bool;", "public function hasTime(){\n return $this->_has(5);\n }", "final function isRegistered()\n {\n return $this->mIsRegistered;\n }", "public function isDue()\n {\n return strtotime($this->dueAt) > time();\n }", "static function isReminderTranslationActive() {\n global $CFG_GLPI;\n\n return $CFG_GLPI['translate_reminders'];\n }", "function repeats_indefinately()\r\n {\r\n $repeat_to = $this->get_repeat_to();\r\n return ($repeat_to == '0');\r\n }", "public function isRedeemed(): bool\n {\n return $this->redeemed_at !== null;\n }", "public function expiring()\n {\n return $this->refresh < time() && $this->expires > time();\n }", "public function noteExists()\n {\n return ! is_null( $this->content );\n }", "function autoRespONNewTicket() {\n return $this->config['ticket_autoresponder']?true:false;\n }", "public function shouldExpire()\n {\n return null !== $this->expires;\n }", "public function should_run()\n\t{\n\t\treturn $this->config['inactive_users_last_gc'] < time() - $this->config['inactive_users_gc'];\n\t}", "function repeats()\r\n {\r\n $repeat = $this->get_repeat_type();\r\n return ($repeat != '0');\r\n }", "public function isUnread()\n {\n }", "public function isTooLate(){\r\n return ($this->timeRunning() > $this->latestEntryTime);\r\n }", "public function hasUsage()\n {\n return $this->usage !== null;\n }", "public function testReminders() {\n $this->tasks->get('reminders')\n ->setData(['user' => 'Major. Tom'])\n ->addReminder('foo bar is my best stuff!');\n\n $results = $this->query\n ->table('reminders')\n ->condition('user', 'Major. Tom')\n ->condition('reminder', 'foo bar is my best stuff!')\n ->execute();\n\n $this->assertEquals(count($results), 1);\n }", "abstract function isSingleUse();", "public function hasTime(){\n return $this->_has(7);\n }", "private function timerStarted()\r\n\t{\r\n\t\treturn ! is_null($this->timer);\r\n\t}", "public function isRecruiter();", "public function runOnce(): bool;", "public function isOnCooldown(): bool\n {\n return Cache::has($this->getCooldownCacheKey());\n }", "static private function exists()\n\t{\n\t\treturn isset( $_SESSION['mensagem'] );\n\t}", "public static function show_reminder()\n {\n }", "function isReusedPSock () {\n return ($this->stfp > 0);\n }", "public function is_dismissed()\n {\n }", "static function isExisting( $name )\r\n\t{\r\n\t\treturn in_array($name, static::$_events);\r\n\t}", "public function hasCreatetime()\n {\n return $this->get(self::CREATETIME) !== null;\n }", "function isExpired() {\r\n return (SCacher::UNLIMITED != $this->till) && (time() > ($this->created + $this->till));\r\n }", "protected function checkOneInstance()\n\t{\n\t\tif (file_exists(self::LOCK_FILE) && (filemtime(self::LOCK_FILE) > time() - 3600))\n\t\t{\n\t\t\t$this->cli_echo('Already running. If you know it is not, please check the lock file.' . chr(10));\n\t\t\t$this->cli_echo(PATH_site . self::LOCK_FILE . chr(10));\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function isActual()\n {\n $this->loadLockData();\n if ($this->hasData('started_at') && $this->_getData('started_at') + $this->getLockLifeTime() > time()) {\n return true;\n }\n return false;\n }", "public function isRedeemable(): bool\n {\n return !$this->isRedeemed() && $this->isStarted() && !$this->isExpired();\n }", "public function hasStartTime(){\n return $this->_has(10);\n }", "public static function check()\n {\n // get refresh clock\n $clock = \\Config::get('scribe::refresh', 5);\n\n // if cache is off...\n if (!$clock)\n {\n // reset\n static::reset();\n\n // escape\n return null;\n }\n\n // if times up...\n \\Cache::remember(static::$names['timer'], $clock, function()\n {\n // new hash\n $new_hash = Compile::get_hash();\n\n // old hash\n $old_hash = \\Cache::get(static::$names['hash']);\n\n // if different...\n if ($new_hash != $old_hash)\n {\n // reset\n static::reset();\n\n // save most recent hash\n \\Cache::forever(static::$names['hash'], $new_hash);\n }\n\n // return\n return true;\n });\n }", "function is_proposals_email_expiry_reminder_enabled()\n{\n return total_rows('tblemailtemplates', ['slug' => 'proposal-expiry-reminder', 'active' => 1]) > 0;\n}", "public function hasInviteExpired()\n {\n //$sent_at = $this->getDateTimeObject('sent_at')->format('U');\n return false;\n }", "protected function get_is_fresh(): bool\n\t{\n\t\treturn $this->ttl > 0;\n\t}", "protected function exists()\n\t{\n\t\treturn !is_null($this->intended);\n\t}", "private function supportTicketCreated(): bool\n {\n return $this->supportTicketQueryByUuid()->exists();\n }", "public function isAcquired(): bool;", "public function isInUse() {\n\t\t$usingEntries = \\OOBookingQuery::create()\n\t\t\t\t\t\t\t->filterByOOBookingType($this)\n\t\t\t\t\t\t\t->find();\n\t\n\t\treturn $usingEntries->count() != 0 ? true : false;\n\t}", "public function needUpdate()\n\t{\n\t\tif ($this->lifetime == 0)\n\t\t\treturn false;\n\t\tif (! $this->exists())\n\t\t\treturn true;\n\t\tif (filemtime($this->file) < (time() + $this->lifetime))\n\t\t{\n\t\t\t$this->clear();\n\t\t\treturn true;\n\t\t}\n\t}", "public function viaRemember(): bool;", "private function checkExisting()\n\t{\n\t\tif ($this->gameModel->getGameId())\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public static function is_needed() {\n\t\treturn amp_should_use_new_onboarding();\n\t}" ]
[ "0.6831317", "0.6760793", "0.6758784", "0.6468627", "0.6467646", "0.6437192", "0.63185227", "0.62978894", "0.62843883", "0.6280456", "0.6275172", "0.6268478", "0.6267512", "0.6262899", "0.6261068", "0.6231174", "0.6214171", "0.6186456", "0.6152443", "0.61506075", "0.6139487", "0.6135729", "0.6126424", "0.6121842", "0.60660434", "0.6065064", "0.6051776", "0.6034494", "0.6020449", "0.597889", "0.5974584", "0.5962612", "0.59403634", "0.59371257", "0.5931454", "0.59291714", "0.59277153", "0.5920321", "0.5914603", "0.5912298", "0.58887184", "0.58746254", "0.58737737", "0.5862204", "0.5861081", "0.58513665", "0.5850465", "0.5847907", "0.5844831", "0.5844243", "0.5837351", "0.58362365", "0.5833822", "0.58277434", "0.5825615", "0.5820807", "0.58194417", "0.5805297", "0.58020926", "0.57817185", "0.57694757", "0.5769327", "0.5762675", "0.5762554", "0.57625353", "0.57582635", "0.5757668", "0.5755565", "0.575225", "0.57501435", "0.5749012", "0.5748429", "0.57416993", "0.57386017", "0.5738048", "0.57364464", "0.57326746", "0.5730766", "0.5725292", "0.5724844", "0.5723816", "0.5720002", "0.57118696", "0.57092553", "0.57013613", "0.5701022", "0.5699163", "0.5697727", "0.5694862", "0.56886077", "0.5686065", "0.5684047", "0.5683094", "0.56779075", "0.56756103", "0.56639767", "0.56594336", "0.56584847", "0.565394", "0.56516296" ]
0.70909804
0
Makes an instance from dto.
Создает экземпляр из dto.
public static function fromDTO($object);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function build(DTO $dto) : AbstractEntity\n \t{\n\t\t//Get Mapper and convert data\n\t\t$raw = $dto->getDataArray();\n\t\t$mapper = $this->factory->getMapper($raw);\n\t\t$domain_array = $mapper->return_dto_to_domain_array();\n\n\t\t//get Objectfactory and return object\n\t\t$dofact = $this->factory->getDomainObjectFactory();\n\t\t$obj = $dofact->createObject($domain_array); \n\n\t\treturn $obj;\n\t}", "public function toEntity($dto);", "public static function LeerObjeto($dto) {\n \n }", "public function toModel($dto);", "public static function make($data = null, $from_type = null)\n\t{\n\t\treturn new static($data, $from_type);\n\t}", "public function make(): object\n {\n return $this->reflected->newInstanceWithoutConstructor();\n }", "private function toModel($dto) {\n $content = new Childrobot();\n $content->setName($dto['name']['S']);\n $content->setAge($dto['age']['S']);\n $content->setDessinA($dto['dessinA']['S']);\n return $content;\n }", "public function toDto($entity);", "public function test__construct_called_createProperDTO()\n {\n $data = [\n 'order_id' => 1234,\n 'status' => OrderStatusEnum::PENDING_CONFIRMATION,\n 'amount' => 9.9,\n 'lines' => [\n [\n 'sku' => 'xx-43-xx',\n 'price' => 2.3,\n 'quantity' => 1,\n ],\n [\n 'sku' => 'xx-40-xx',\n 'price' => 2.3,\n 'quantity' => 1,\n ]\n ],\n 'shipping_address' => 'shipping address',\n 'billing_address' => 'billing address',\n ];\n\n $sut = new OrderDTO($data);\n\n $this->assertEquals(1234, $sut->getOrderId());\n $this->assertEquals(9.9, $sut->getAmount());\n $this->assertEquals(OrderStatusEnum::PENDING_CONFIRMATION, $sut->getStatus());\n $this->assertNotEmpty($sut->getLines());\n $this->assertEquals('billing address', $sut->getBillingAddress());\n $this->assertEquals('shipping address', $sut->getShippingAddress());\n\n }", "public function construct(): object\n {\n return $this->reflected->newInstanceArgs(func_get_args());\n }", "public function create() {\n $class_name = get_class($this);\n $object_name = substr($class_name, 0, -5);\n $obj = new $object_name();\n $this->initialize_object($obj, $obj::$_json_fields);\n $this->initialize_object($obj, $obj::$_db_fields);\n return $obj;\n }", "public static function factory($stdClass)\n {\n $destination = get_called_class();\n $sourceObject = &$stdClass;\n\n if (is_string($destination)) {\n $destination = new $destination();\n }\n\n $sourceReflection = new ReflectionObject($sourceObject);\n $destinationReflection = new ReflectionObject($destination);\n $sourceProperties = $sourceReflection->getProperties();\n\n foreach ($sourceProperties as $sourceProperty) {\n $sourceProperty->setAccessible(true);\n $name = $sourceProperty->getName();\n $value = $sourceProperty->getValue($sourceObject);\n if ($destinationReflection->hasProperty($name)) {\n $propDest = $destinationReflection->getProperty($name);\n $propDest->setAccessible(true);\n $propDest->setValue($destination, $value);\n } else {\n $destination->$name = $value;\n }\n }\n return $destination;\n }", "protected function getDtoFactory(): DtoFactoryContract\n {\n return $this instanceof Model ? new ModelDtoFactory() : new DtoFactory();\n }", "public function makeFromResponse($response)\n {\n $entity = new static($this->connection, $response);\n return $entity;\n }", "public function createFrom($data);", "public function test___construct_called_createAProperDTOWithProperData()\n {\n $playConfig = PlayConfigMother::aPlayConfig()->build();\n $actual = new TicketPurchaseDetailDTO($playConfig);\n $this->assertEquals('7,15,16,17,22',$actual->regularNumbers);\n $this->assertEquals('1,7',$actual->luckyNumbers);\n $this->assertEquals('2015-09-10',$actual->drawDate);\n }", "public function setDto(DomainDto $dto)\n {\n $this->dto = $dto;\n\n return $this;\n }", "public function create() {\n\t\t$serial = $this->getSerialized($this);\n\n\t\t$client = $this\n\t\t->getClient();\n\n\t\t$endpoint = static::getResourcePath()\n\t\t->getPath();\n\n\t\t$response = $client->doPost($endpoint, $serial);\n\t\t$constructedEntity = $this->makeEntityFromResponse($response);\n\n\t\treturn $constructedEntity;\n\t}", "public function reverseTransform($dto)\n {\n return new IndividualOrderModel(\n $dto->getOrderUuid() ? OrderUuid::existing($dto->getOrderUuid()) : OrderUuid::generated(),\n (string) $dto->getPersonName(),\n (string) $dto->getPersonEmail(),\n (string) $dto->getMessage(),\n (string) $dto->getSize(),\n (string) $dto->getShape(),\n (string) $dto->getMaterial()\n );\n }", "public function __construct(Weather_WeatherDTO $dto = null) {\n\t\t$this->dbconn = Database_DBConn::getConnection();\n\t\t$this->dto = $dto;\n\t\t$this->loadColumnMetadata();\n\t}", "public function create()\n {\n $obj = new $this->class();\n return $obj;\n }", "public function getDtoForEntity(string $id, string $dtoClass, ?RestDtoInterface $dto = null): RestDtoInterface\n {\n // Fetch entity\n $entity = $this->getEntity($id);\n\n // Create new instance of DTO and load entity to that.\n /** @var RestDtoInterface $restDto */\n $restDto = new $dtoClass();\n $restDto->load($entity);\n\n if ($dto !== null) {\n $restDto->patch($dto);\n }\n\n return $restDto;\n }", "public function newInstance()\n {\n $class = get_called_class();\n $instance = new $class();\n $instance->setSerializer($this->getSerializer());\n $instance->setItemConverter($this->getItemConverter()->newInstance());\n return $instance;\n }", "public function make() {}", "protected function createObj() {\n $objectReflection = new \\ReflectionClass($this->schema['classToBeTested']);\n $this->obj = $objectReflection->newInstanceArgs(array_values(get_object_vars($this->args)));\n\n return $this;\n }", "public function dtoToEntity($dto)\n {\n return null;\n }", "public function make($entity)\n {\n return $this->container->make($entity);\n }", "private function fillSolariumDocumentFromDto($dto): Document\n {\n $doc = new Document();\n $dto_fields = array_values($dto->getSchemeArray());\n $db_fields = array_keys($dto->getSchemeArray());\n for ($i = 0, $iMax = count($dto_fields); $i < $iMax; $i++) {\n $functionName = 'get' . ucfirst($dto_fields[$i]);\n $val = $dto->$functionName();\n if (!isset($val)) {\n continue;\n }\n if (!is_array($val)) {\n $doc->setField($db_fields[$i], $val);\n continue;\n }\n\n foreach ($val as $item) {\n $doc->setField($db_fields[$i], $item);\n }\n\n }\n return $doc;\n }", "public static function createFromGlobals(): RegisterUserDto {\n $newUser = new self();\n $newUser->schoolIdentifier = $_POST['schoolIdentifier'];\n $newUser->email = $_POST['email'];\n $newUser->firstName = $_POST['firstName'];\n $newUser->lastName = $_POST['lastName'];\n $newUser->confirmPassword = $_POST['confirmedPassword'];\n $newUser->password = $_POST['password'];\n $newUser->entryDate = $_POST['entryDate'];\n $newUser->startDate = $_POST['startDate'];\n\n return $newUser;\n }", "public function toDto($dto = null, int $flags = NONE): Dto\n {\n $flags = is_int($dto) ? $dto : $flags;\n $flags |= $this instanceof Model ? CAST_PRIMITIVES : NONE;\n $dto = $this->getDtoToTurnInto($dto);\n\n return $this->getDtoFactory()->make($dto, $this, $flags);\n }", "protected function createNewObject()\n {\n $className = $this->getTargetClassName();\n\n return new $className();\n }", "public function createFromDto(ProductInput $productInput): Product\n {\n $product = Product::createFromDto($productInput);\n\n $this->persistEntity($product);\n\n return $product;\n }", "public function toDto(Request $request): DtoInterface\n {\n $searchString = $request->get('searchString');\n\n if ($searchString) {\n $this->setSearchString($searchString);\n }\n\n return $this;\n }", "public function create()\n {\n return new $this->class;\n }", "function mapToPostObject($value)\n{\n return new Post($value);\n}", "public function createObjectInstance();", "public function create()\n {\n return new $this->class();\n }", "public function create()\n {\n return new $this->class();\n }", "public function create()\n {\n $class = $this->class;\n\n return new $class;\n }", "public function create()\n {\n $class = $this->class;\n\n return new $class;\n }", "public function createEntry(GuestbookDto $dto);", "public static function createByDto(OneGoSDK_DTO_OAuthTokenDto $token)\n {\n $type = strtolower($token->token_type);\n if ($type == 'bearer') {\n return new OneGoSDK_Impl_OAuthTokenBearer($token);\n } else {\n throw new OneGoSDK_Exception('Unknown OAuth token type');\n }\n\n }", "public function create()\n {\n $class = $this->getClass();\n return new $class;\n }", "public function entityToDto($entity)\n {\n $dto = new UserDTO();\n $dto->setId($entity->getId());\n $dto->setUsername($entity->getUsername());\n $dto->setLastName($entity->getLastName());\n $dto->setFirstName($entity->getFirstName());\n $dto->setEmail($entity->getEmail());\n $dto->setBiography($entity->getBiography());\n\n return $dto;\n }", "protected function createObjectFrom(mixed $data): object\n {\n $className = $this->className;\n\n try {\n return new $className($data);\n } catch (\\InvalidArgumentException $e) {\n throw new ConverterException(\n sprintf(\"Unable to create a '%s' instance.\", $className),\n 0,\n $e\n );\n }\n }", "public function make()\n {\n return $this->reflactionClass->newInstanceArgs($this->setInstanceParameters());\n }", "public static function create()\n {\n $class = new \\ReflectionClass(get_called_class());\n\n return $class->newInstanceArgs(func_get_args());\n }", "protected function getDtoToTurnInto($dto): string\n {\n $dto = is_string($dto) ? $dto : $this->getDtoClass();\n\n if (!$dto) {\n throw new InvalidArgumentException('Unable to turn [' . static::class . '] into DTO, no class specified');\n } elseif (!is_subclass_of($dto, Dto::class)) {\n throw new DtoNotFoundException($dto);\n }\n\n return $dto;\n }", "function mapToUserObject($value)\n{\n return new User($value);\n}", "static public function create()\n {\n $obj = new Request();\n $obj->load();\n return $obj;\n }", "public function create(){}", "public function create(){}", "public function create(){}", "public function create(){}", "public function create(){}", "public function create(){}", "public static function make($data)\n\t{\n\t\t$instance = new static($data);\n\t\t$instance->_original_data = $data;\n\t\treturn $instance;\n\t}", "public static function create() {}", "public function make();", "public function daoToDto($dao){\n\t\t//Escoger idioma\n\t\t$name = '';\n\t\tif($_SESSION['lang'] == 'ES')\n\t\t\t$name = $dao->getNameES();\n\t\telse if($_SESSION['lang'] == 'EN')\n\t\t\t$name = $dao->getNameEN();\n\t\t\n\t\t$dto = new GenreDTO($dao->getId(),\n\t\t\t\t\t\t\t$name);\n\t\treturn $dto;\n\t}", "#[Test]\n\t#[TestDox(\"fromJson()\")]\n\tfunction fromJson(): void {\n\t\t$blog = Blog::fromJson(new \\stdClass);\n\t\tassertThat($blog->charset, isEmpty());\n\t\tassertThat($blog->languages, isEmpty());\n\t\tassertThat($blog->url, isNull());\n\n\t\t// It should return an initialized instance with a non-empty map.\n\t\t$blog = Blog::fromJson((object) [\n\t\t\t\"blog\" => \"https://github.com/cedx/akismet.php\",\n\t\t\t\"blog_charset\" => \"UTF-8\",\n\t\t\t\"blog_lang\" => \"en, fr\"\n\t\t]);\n\n\t\tassertThat($blog->charset, equalTo(\"UTF-8\"));\n\t\tassertThat($blog->languages, equalTo([\"en\", \"fr\"]));\n\t\tassertThat((string) $blog->url, equalTo(\"https://github.com/cedx/akismet.php\"));\n\t}", "public function newViaResource()\n {\n $resource = $this->viaResource();\n\n return new $resource($resource::newModel());\n }", "public function newInstance()\n {\n return $this->instantiator->instantiate($this->name);\n }", "public function newInstance()\n {\n return $this->instantiator->instantiate($this->name);\n }", "public function newInstance() {\n return $this->instantiator->instantiate($this->name);\n }", "private function makeDefinition(stdClass $definition, App\\Lemma $lemma){\n\n $new = new Definition;\n\n $new->title = $definition->title;\n $new->body = $definition->body;\n $new->content = $definition->content;\n\n return $new;\n\n }", "public static function instantiate($record) {\n\t\t\t// Simple, long-form approach\n\t\t\t$this_class=get_called_class();\n\t\t\t$this_object= new $this_class;\n\n\n\t\t\t// $this_object->id = $record['id'];\n\t\t\t// $this_object->email = $record['email'];\n\t\t\t// $this_object->password = $record['password'];\n\t\t\t// $this_object->first_name = $record['first_name'];\n\t\t\t// $this_object->last_name = $record['last_name'];\n\n\t\t\t//more dynamic, short-form approach\n\t\t\tforeach ($record as $attribute => $value) {\n\t\t\t\tif($this_object->has_attribute($attribute)) {\n\t\t\t\t\t$this_object->$attribute=$value;\n\t\t\t\t}\n\t\t\t}\n\t\t\n\n\t\t\treturn $this_object;\n\t\t}", "public function build($options)\n {\n $objType = isset($options['type']) ? $options['type'] : self::DEFAULT_TYPE;\n\n $obj = $this->factory->create($objType);\n $obj->setData($options);\n\n return $obj;\n }", "public function __construct($data = null)\n {\n //tablica\n if (is_array($data)) {\n return $this->setFromArray($data);\n }\n //rekord ORM\n if ($data instanceof \\Mmi\\Orm\\Record) {\n return $this->setFromOrmRecord($data);\n }\n //dto\n if ($data instanceof \\Mmi\\Model\\Dto) {\n return $this->setFromArray($data->toArray());\n }\n //stdClass\n if ($data instanceof \\stdClass) {\n return $this->setFromArray((array) $data);\n }\n //brak danych\n if ($data === null) {\n return;\n }\n //pozostałe typy danych są niewspierane\n throw new DtoException('Invalid input data: ' . (gettype($data) === 'object' ? get_class($data) : gettype($data)) . ' is not supported');\n }", "public static function createFromNoteActivity(NoteActivity $noteActivity): NoteActivityDTO\n {\n $noteActivityDTO = new self($noteActivity->isRemovable(), $noteActivity->getId() > 0);\n\n $noteActivityDTO->from = $noteActivity->getFrom();\n $noteActivityDTO->to = $noteActivity->getTo();\n $noteActivityDTO->text = $noteActivity->getText();\n $noteActivityDTO->property = $noteActivity->getProperty();\n\n return $noteActivityDTO;\n }", "private static function instantiate($record) {\r\n\t\t$object = new self ();\r\n\t\t// Simple, long-form approach:\r\n\t\t// $object->id = $record['id'];\r\n\t\t// $object->username = $record['username'];\r\n\t\t// $object->password = $record['password'];\r\n\t\t// $object->first_name = $record['first_name'];\r\n\t\t// $object->last_name = $record['last_name'];\r\n\t\t\r\n\t\t// More dynamic, short-form approach:\r\n\t\tforeach ( $record as $attribute => $value ) {\r\n\t\t\tif ($object->has_attribute ( $attribute )) {\r\n\t\t\t\t$object->$attribute = $value;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $object;\r\n\t}", "public function createInstance()\n {\n $mock = $this->mock(static::TEST_SUBJECT_CLASSNAME)\n ->getEntityName()\n ->getFieldName()\n ->evaluate()\n ->new();\n\n return $mock;\n }", "private function buildActorVOFromCommand(CreateOneCommandInterface $command): ActorVO\n {\n return $this->buildActorVO(static::buildFromObject($command));\n }", "private function createFromData($data)\n {\n $model = $this->dispense()->hydrate($data);\n $model->isNew = false;\n return $model;\n }", "static function create( $sObjectType, $midex_id='')\n {\n return new $sObjectType($midex_id);\n }", "protected function create($attributes = [])\n {\n return $this->model->newInstance($attributes);\n }", "protected function createDemandFromSettings($settings): \\CPSIT\\T3eventsCourse\\Domain\\Model\\Dto\\CourseDemand|\\DWenzel\\T3events\\Domain\\Model\\Dto\\DemandInterface\n {\n return $this->demandFactory->createFromSettings($settings);\n }", "public function createTrick(TrickDTO $dto, Security $security): Trick\n {\n $trick = new Trick();\n $trick\n ->setName($dto->getName())\n ->setDescription($dto->getDescription())\n ->setStyle($dto->getStyle())\n ->setUser($security->getUser());\n\n return $trick;\n }", "protected function make()\n {\n return new $this->model;\n }", "function instantiate($record) {\n $object = new self;\n\t\t// Simple, long-form approach:\n\t\t// $object->id \t\t\t\t= $record['id'];\n\t\t// $object->username \t= $record['username'];\n\t\t// $object->password \t= $record['password'];\n\t\t// $object->first_name = $record['first_name'];\n\t\t// $object->last_name \t= $record['last_name'];\n\t\t\n\t\t// More dynamic, short-form approach:\n\t\tforeach($record as $attribute=>$value){\n\t\t if($object->has_attribute($attribute)) {\n\t\t $object->$attribute = $value;\n\t\t }\n\t\t}\n\t\treturn $object;\n\t}", "public static function make() {\n\t\treturn call_user_func_array( array( get_class(), 'factory' ), func_get_args() );\n\t}", "private static function instantiate($record) {\r\n $object = new self;\r\n\t\t// Simple, long-form approach:\r\n\t\t// $object->id \t\t\t= $record['id'];\r\n\t\t// $object->username \t= $record['username'];\r\n\t\t// $object->password \t= $record['password'];\r\n\t\t// $object->first_name = $record['first_name'];\r\n\t\t// $object->last_name \t= $record['last_name'];\r\n\t\t\r\n\t\t// More dynamic, short-form approach:\r\n\t\tforeach($record as $attribute=>$value){\r\n\t\t if($object->has_attribute($attribute)) {\r\n\t\t $object->$attribute = $value;\r\n\t\t }\r\n\t\t}\r\n\t\treturn $object;\r\n\t}", "public static function instantation($the_record){\n $calling_class = get_called_class();\n\n $the_object = new $calling_class;\n\n\n // doing a loop to get all of the values in the object ]\n foreach($the_record as $key => $value) {\n\n if($the_object->has_the_key($key)){\n $the_object->$key = $value;\n \n }\n }\n\n return $the_object;\n }", "private function createInstance($id)\n {\n $schema = $this->getAndValidateServiceSchema($id);\n\n $reflection = new ReflectionClass($schema['class']);\n $arguments = $schema['arguments'];\n\n if ($factoryMethod = $this->getAndValidateFactoryMethod($reflection, $schema)) {\n return $factoryMethod->invokeArgs(null, $arguments);\n }\n\n return $reflection->newInstanceArgs($arguments);\n }", "private static function instantiate($record) {\n\t\t$object_name = get_called_class();\n \t$object = new $object_name;\n\t\t// Simple, long-form approach:\n\t\t// $object->id \t\t\t\t= $record['id'];\n\t\t// $object->username \t= $record['username'];\n\t\t// $object->password \t= $record['password'];\n\t\t// $object->first_name = $record['first_name'];\n\t\t// $object->last_name \t= $record['last_name'];\n\t\t\n\t\t// More dynamic, short-form approach:\n\t\tforeach($record as $attribute=>$value){\n\t\t if($object->has_attribute($attribute)) {\n\t\t $object->$attribute = $value;\n\t\t }\n\t\t}\n\t\treturn $object;\n\t}", "public function newInstance();", "public function newInstance();", "public function reverseTransform($dto)\n {\n return new CurrencyModel((string) $dto->isoCode);\n }", "private static function instantiate($record) {\n $object = new self;\n\t\t// Simple, long-form approach:\n\t\t// $object->id \t\t\t\t= $record['id'];\n\t\t// $object->username \t= $record['username'];\n\t\t// $object->password \t= $record['password'];\n\t\t// $object->first_name = $record['first_name'];\n\t\t// $object->last_name \t= $record['last_name'];\n\t\t\n\t\t// More dynamic, short-form approach:\n\t\tforeach($record as $attribute=>$value){\n\t\t if($object->has_attribute($attribute)) {\n\t\t $object->$attribute = $value;\n\t\t }\n\t\t}\n\t\treturn $object;\n\t}", "private static function instantiate($record) {\n $object = new self;\n\t\t// Simple, long-form approach:\n\t\t// $object->id \t\t\t\t= $record['id'];\n\t\t// $object->username \t= $record['username'];\n\t\t// $object->password \t= $record['password'];\n\t\t// $object->first_name = $record['first_name'];\n\t\t// $object->last_name \t= $record['last_name'];\n\t\t\n\t\t// More dynamic, short-form approach:\n\t\tforeach($record as $attribute=>$value){\n\t\t if($object->has_attribute($attribute)) {\n\t\t $object->$attribute = $value;\n\t\t }\n\t\t}\n\t\treturn $object;\n\t}", "abstract static public function createFromDict($obj);", "protected function construct($data=null) {\n $MODEL = '\\FOO\\\\' . static::$MODEL;\n return new $MODEL();\n }", "protected function constructModel()\n {\n $modelName = static::getModelName();\n return new $modelName($this->container);\n }", "public static function create_from_record($record) {\n\t\t$object = new self;\n\t\t\n\t\t$object->id = $record['id'];\n\t\t$object->username = $record['username'];\n\t\t$object->password = $record['password'];\n\t\t$object->email = $record['email'];\n\t\t$object->settings = $record['settings'];\n\t\t$object->permissions = $record['permissions'];\n\t\t$object->active = $record['active'];\n\t\t\n\t\treturn $object;\n\t}", "abstract protected function createInstance();", "static public function instantiateRecord($record) {\n $object = new static;\n foreach ($record as $property => $value) {\n if(property_exists($object, $property)) {\n $object->$property = $value;\n }\n }\n return $object;\n }", "public static function create(){\n /*$instance = new self();\n return $instance;\n */\n }", "public function newEntity( )\n {\n\n $name = $this->entityName;\n $entity = new $name( );\n\n return $entity;\n\n }", "public function getDTO(AbstractEntity $obj) : DTO\n\t{\n\t\t$raw = $this->object_to_array($obj); // convert Object to array for Mapper\n\t\t$mapper = $this->factory->getMapper($raw);\n\t\t$data_array = $mapper->return_object_to_dto_array(); \n\t\t$sub_object_map = $mapper->getSubObjectMap(); //sub_object_map['outletdn'] = 'outlets'\n\t\t//we need to remove the subobject from the root entity\n\t\tforeach ($sub_object_map as $sub_name) {\n\t\t\tif (isset($data_array[$sub_name])) { //check config files\n\t\t\t\t//create a new variable with the name of the value from sub_object_map (ex. 'outlets')\t\n\t\t\t\t${$sub_name} = $data_array[$sub_name];\n\t\t\t\tunset($data_array[$sub_name]);\n\t\t\t\t\n\t\t\t\t$sub_mapper_name=\"cmu\\\\ddd\\\\directory\\\\infrastructure\\\\domain\\\\model\\\\factory\\\\mapper\\\\\" .$sub_name. \"Mapper\";\n\t\t\t\tforeach(${$sub_name} as $sub_array_value) {\n\n\t\t\t\t\t//add it back to the Root Object $data_array\n\t\t\t\t\t$data_array[$sub_name][] = $this->returnSubArray($sub_mapper_name, $sub_array_value); \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn DTOAssembler::returnDTO($data_array, $this->returnEntity());\n\t}", "public static function create(...$params)\n {\n return new static(...$params);\n }" ]
[ "0.6704016", "0.6429224", "0.618762", "0.6059554", "0.601656", "0.5986958", "0.59778243", "0.5935755", "0.5931011", "0.5901918", "0.5820767", "0.5815427", "0.5780858", "0.57473755", "0.5721998", "0.5654987", "0.5597702", "0.55800766", "0.55776954", "0.5567688", "0.5564004", "0.5547187", "0.5530351", "0.5522095", "0.5517903", "0.54979974", "0.54974025", "0.5469513", "0.5465552", "0.5455152", "0.5434875", "0.5401073", "0.5395004", "0.539487", "0.5388554", "0.53819454", "0.53769344", "0.53769344", "0.53721374", "0.53721374", "0.53578144", "0.53482765", "0.5339564", "0.5325413", "0.53224325", "0.53165764", "0.53036904", "0.5294406", "0.5290098", "0.52885324", "0.52767146", "0.52767146", "0.52767146", "0.52767146", "0.52767146", "0.52767146", "0.5259888", "0.52510387", "0.52403015", "0.523397", "0.5233044", "0.5232744", "0.5222403", "0.5222403", "0.5212513", "0.5208983", "0.5207907", "0.52064437", "0.5206237", "0.5201332", "0.5201222", "0.51936", "0.5193419", "0.5191773", "0.5187667", "0.5184164", "0.51766473", "0.5175211", "0.5167332", "0.51659274", "0.5156292", "0.5152785", "0.5152422", "0.51427567", "0.51409405", "0.51300675", "0.51300675", "0.51283634", "0.51239574", "0.51239574", "0.5123545", "0.51168036", "0.5115246", "0.5114084", "0.51129574", "0.5109397", "0.5104031", "0.5094077", "0.50908685", "0.5089414" ]
0.7356645
0
This function reset's the internal cursor used for value iteration.
Эта функция сбрасывает внутренний курсор, используемый для итерации по значениям.
public function reset() { $this->cursor = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function reset()\n\t{\n\t\t$this->cursor->reset();\n\t}", "#[ReturnTypeWillChange]\n public function rewind()\n {\n // We can recreate the cursor to allow it to be rewound\n $this->reset();\n $this->startedIterating = true;\n $this->position = 0;\n $this->ensureIterator()->rewind();\n $this->storeIteratorState();\n }", "#[\\ReturnTypeWillChange]\n public function rewind()\n {\n $this->cursor = 0;\n }", "public function rewind()\n {\n reset($this->cursor);\n }", "public function reset()\r\n\t{\r\n\t $this->_cursor = 0;\r\n return $this;\r\n\t}", "public function rewind() {\n\t\t$this->cursor = 0;\n\t}", "protected function reset()\n {\n $this->startedIterating = false;\n $this->cursorNeedsAdvancing = true;\n $this->cursor = null;\n $this->iterator = null;\n $this->storeIteratorState();\n }", "public function rewind()\r\n {\r\n $this->cursor = 0;\r\n }", "public function reset(){\n\t\t//verifica se iterador foi instanciado\n\t\tif($this->iterator!=null){\n\t\t\t// e move o cursor para o inicio do iterador\n\t\t\treturn $this->iterator->rewind();\n\t\t}\n\t}", "public function rewind()\n {\n $this->cursor->rewind();\n }", "public function rewind()\n {\n $this->cursor->rewind();\n }", "public function rewind()\n {\n $this->_cursor->rewind();\n }", "function reset($mark = 0)\r\n\t{\r\n\t\t$this->cursor = $mark;\r\n\t}", "public function fresh(): void\n {\n $this->cursor = null;\n }", "public function rewind(): void\n {\n parent::rewind();\n\n $this->cursor = 0;\n }", "public function resetIterator () {}", "public function rewind() {\n\t\tif ($this->cursor >= 0) $this->dba->traverseReset();\n\t\t$this->next();\n\t}", "public function reset() {\n $this->_current = 0;\n }", "public function reset()\n\t{\n\t\t$this->iterator = null;\n\t}", "public function reset()\n\t{\n\t\t$this->current = 0;\n\t}", "public function rewind(): void\n {\n try {\n $this->getCursor()->rewind();\n } catch (LogicException $e) {\n $this->fresh();\n $this->getCursor()->rewind();\n }\n\n $this->position = 0;\n }", "public function reset()\n\t{\n\t\t$this->get(0);\n\t}", "public function reset() {\n @mysqli_data_seek($this->_rs, 0);\n }", "public function rewind(): void\n {\n $this->currentIteratorKey = 0;\n }", "protected function resetIterator()\n {\n $this->results = null;\n $this->resultsCounter = 0;\n }", "public function reset() {\r\n\t\t$this->pointer = 0;\r\n\t}", "function rewind() {\n\t\t$this->pos = 0;\n\t\t$this->currentRow = null;\n\t}", "public function reset() {\n\t\tif ($this->sql_result) {\n\t\t\tmysqli_data_seek($this->sql_result, 0);\n\t\t}\n\t}", "public function reset()\n\t{\n\t\t$this->pointer = 0;\n\t}", "public function rewind() {\n $this->currentPosition = 0;\n $this->updateIterator();\n }", "public function rewind(): void\n {\n if (is_array($this->val)) {\n $this->assocArray = $this->isAssocArray($this->val);\n }\n $this->position = 0;\n }", "public function rewind(): void\n {\n $this->iterator = 0;\n }", "public function rewind() {\n\t\tif($this->getCount() > 0) {\n\t\t\t$this->getResultResource()->rewind();\n\t\t}\n\t\t$this->setCurrentRow(null);\n\t\t$this->setRowIteration(null);\n\t}", "public function reset() {\n $this->hasNext=-1;\n }", "public function reset()\n\t{\n\t\t// allow iteration again\n\t\t$this->previousKey = $this->currentKey;\n\t}", "public function rewind(): void\n {\n reset($this->results);\n }", "public function reset ()\n {\n unset($this->cols);\n unset($this->order);\n unset($this->limit);\n unset($this->offset);\n unset($this->single);\n unset($this->columnData);\n unset($this->rawRow);\n unset($this->rawResults);\n unset($this->fetch);\n parent::reset();\n }", "public function rewind() {\n $this->caret = count($this->elements) ? array_key_first($this->elements) : null;\n }", "public function rewind()\n {\n reset($this->fieldValues);\n }", "public function reset()\n {\n $this->hasLimit = false;\n $this->limit = 0;\n $this->offset = 0;\n parent::reset();\n }", "public function rewind (){\n\t\t$this->curr = 0;\n\t}", "public function rewind()\n {\n $this->iterator = 0;\n }", "public function rewind()\n {\n $this->iterator = 0;\n }", "public function rewind()\r\n {\r\n $this->currentIdx = 0;\r\n }", "public function rewind()\n {\n $this->currentKey = 0;\n }", "public function rewind() {\n reset($this->rows);\n }", "public function rewind()\n {\n $this->iterator = $this->db->query('SELECT * FROM ' . $this->name);\n $this->current = $this->iterator->fetch(\\PDO::FETCH_NUM, \\PDO::FETCH_ORI_NEXT);\n }", "public function rewind()\n\t{\n\t\t$this -> i = 0;\n\t}", "public function rewind()\n\t{\n\t\tif ($this->iterator === null) {\n\t\t\t$this->all();\n\t\t}\n\t\t$this->current = $this->iterator->fetch(\\PDO::FETCH_ASSOC);\n\t\t$this->position = 0;\n\t}", "public final function rewind() {\n\t\t\t$this->i = IInt32\\Type::zero();\n\t\t}", "public function rewind()\n {\n $this->pointer = 0;\n }", "public function rewind()\n {\n $this->pointer = 0;\n }", "public function rewind(): void\n {\n $this->index = 0;\n $this->charCounter = 0;\n }", "public function rewind() {\n\t\t$this->_iPos = 0;\n\t}", "public function rewind() {\n\t\t$this->_pointer = 0;\n\t}", "public function rewind()\n {\n $this->_pointer = 0;\n }", "public function rewind() {\n $this->iteratorPosition = 0;\n }", "public function rewind()\n {\n $this->EnumeratorIndex = 0;\n }", "public function reset(): void\n {\n $this->columnWidths = [];\n $this->rows = [];\n $this->currentRow = null;\n }", "public function rewind(): void\n {\n $this->currentColumnIndex = $this->startColumnIndex;\n }", "public function reset() {\n\t\t$this->_position = 0;\n\t\t$this->_rollback = [];\n\t}", "public function rewind()\n {\n reset($this->rows);\n }", "public function rewind() {\n\t\t$this->i = 0;\n\t}", "public function rewind(): void\n {\n $this->_iterator->rewind();\n $this->_current = 0;\n }", "public function rewind()\n\t{\n\t\t$this->IteratorCount = 0;\n\t}", "public function rewind(): void {\n reset($this->query);\n }", "function rewind() {\n $this->_stmt->execute($this->_params);\n $this->_data = $this->_stmt->fetchAll(PDO::FETCH_ASSOC);\n $this->_iter = new ArrayIterator($this->_data);\n $this->_iter->rewind();\n $this->_model->clear();\n }", "public function rewind()\n {\n $this->_currentColumnIndex = 0;\n }", "public function rewind()\n\t{\n $this->reset();\n }", "public function rewind()\n\t\t{\n\t\t\t$this->v = 0;\n\t\t}", "public function rewind()\n {\n reset($this->StayByNightValue);\n }", "public function rewind() : void\n\t\t{\n\t\tif (! $this->statement)\n\t\t\t{\n\t\t\treturn;\n\t\t\t}\n\n\t\t$this->index = -1;\n\t\t$this->statement->closeCursor();\n\n\t\t$result = \\PHPFUI\\ORM::executeStatement($this->statement, $this->input);\n\n\t\tif ($result)\n\t\t\t{\n\t\t\t$this->next();\n\t\t\t}\n\t\t}", "public function rewind() \n {\n $this->currentIndex = 0;\n $this->skipOffset = 0;\n }", "public function rewind()\n\t{\n\t\t$this->i = 0;\n\t}", "public function rewind()\n {\n $this->iteratorPosition = 0;\n }", "public function reset() {\n if (is_object($this->statement)) {\n $this->statement->closeCursor();\n $this->statement = null;\n $this->lastError = null;\n }\n }", "public function rewind()\n {\n $this->_pos = 0;\n }", "public function rewind()\n {\n $this->_pos = 0;\n }", "public function rewind(): void\n {\n $this->iIndex = 0;\n }", "public function rewind()\n {\n $this->currentIndex = 0;\n }", "public function rewind()\n {\n $this->currentIndex = 0;\n }", "public function rewind()\n {\n $this->currentIndex = 0;\n }", "public function rewind()\n {\n $this->currentIndex = 0;\n }", "public function reset()\n {\n $this->values[self::BASE] = null;\n $this->values[self::CURRENTSYNCKEY] = null;\n $this->values[self::MAXSYNCKEY] = null;\n $this->values[self::CONTINUEFLAG] = null;\n $this->values[self::SELECTBITMAP] = null;\n $this->values[self::CMDCOUNT] = null;\n $this->values[self::CMDLISTLIST] = array();\n $this->values[self::RATIO] = null;\n }", "public function do_reset()\n {\n $this->select = '*';\n unset($this->table_name);\n unset($this->field_name);\n unset($this->data);\n unset($this->join);\n unset($this->where);\n $this->order_column = 'id';\n $this->order_type = 'desc';\n $this->offset = 0;\n unset($this->limit);\n }", "public function rewind() {\n $this->position = 0;\n $this->current = $this->data[$this->position];\n }", "public function rewind()\n {\n if ($this->_result) {\n unset($this->_result);\n }\n $this->_current = null;\n $this->_index = null;\n $this->_eof = true;\n $this->_result = $this->_adapter->execute(\n $this->_sql, $this->_arg1, $this->_arg2\n );\n\n $this->next();\n }", "public function rewind() {\r\n $this->position = 0;\r\n }", "protected function resetLoop()\n {\n $this->resetTransducers();\n $this->currentWorkingValue = $this->readNextItem();\n }", "#[ReturnTypeWillChange]\n\tpublic function rewind() {\n\t\treset( $this->blocks );\n\t}", "private function resetRowCaret() {\n\t\t$this->rowCaret = 1;\n\t}", "function rewind() {\n\t\t$this->position = 0;\n\t}", "public function reset()\n {\n $this->values[self::items] = array();\n $this->values[self::pagination] = null;\n }", "public function rewind() {\r\n\t\t$this->position = 0;\r\n\t}", "public function rewind() {\n\n\t\t$this->iterator->rewind();\n\t\t$this->index = 0;\n\t}", "public function rewind() {\n\t\t$this->_position = 0;\n\t}", "public function reset() {\n\t\t$this->_current = 0;\n\t\t$this->_first = true;\n\t\t$this->_start = null;\n\t\t$this->_timer = null;\n\t}", "public function rewind()\n {\n $this->reset(true);\n }", "public function setCursor(?int $cursor): void\n {\n $this->cursor = $cursor;\n }", "public function rewind() {\n\t\t$this->position = 0;\n\t}" ]
[ "0.82716423", "0.75430715", "0.75371313", "0.7500722", "0.7499292", "0.7489874", "0.74894917", "0.74562114", "0.74199104", "0.72388077", "0.72388077", "0.71978694", "0.7195567", "0.7172191", "0.71495956", "0.70728165", "0.70686525", "0.70178497", "0.6991563", "0.697435", "0.69726765", "0.69468987", "0.6900132", "0.689835", "0.6885347", "0.68479294", "0.6835629", "0.6806451", "0.68041927", "0.6741254", "0.67409605", "0.67198575", "0.67044353", "0.66868365", "0.66842633", "0.66732794", "0.6652719", "0.6650009", "0.6649355", "0.664466", "0.66079485", "0.658808", "0.658808", "0.65800107", "0.65796477", "0.6568063", "0.65635514", "0.65581477", "0.6557337", "0.65567386", "0.6549106", "0.6549106", "0.6532801", "0.6526235", "0.6508416", "0.6494926", "0.64930457", "0.64920187", "0.6490107", "0.6480236", "0.647796", "0.6465494", "0.6464224", "0.6463734", "0.6451436", "0.6444897", "0.64363694", "0.6433585", "0.6431566", "0.64306617", "0.6424264", "0.6421392", "0.641261", "0.64114875", "0.64067215", "0.6397016", "0.63879853", "0.63879853", "0.6385385", "0.638349", "0.638349", "0.638349", "0.638349", "0.638062", "0.63798803", "0.63733846", "0.6372678", "0.6363771", "0.6341354", "0.6341274", "0.6339435", "0.63327223", "0.6329546", "0.63289976", "0.632896", "0.6328027", "0.6325455", "0.632189", "0.631351", "0.6309194" ]
0.84125096
0
/ Set the devices to send to
/ Установите устройства, которые будут получать сообщения
function setDevices($deviceIds){ if(is_array($deviceIds)){ $this->devices = $deviceIds; } else { $this->devices = array($deviceIds); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDevices($devices) {\n if (empty($devices) || is_null($devices)) {\n throw new ConfigurationException('You must give an array of devices UUIDs to the pusher');\n }\n\n $this->config['devices'] = $devices;\n }", "protected function indexDevices() {\n $this->devices = [];\n $devices = $this->config->get('devices');\n foreach ($devices as $device) {\n $type = val('type', $device, 'unknown');\n $id = val('id', $device, 'unknown');\n $deviceKey = sprintf(self::DEVICE_KEY_FORMAT, $type, $id);\n\n $this->devices[$deviceKey] = $device;\n }\n }", "public function setDevices(array $device): void\n {\n $this->fs = $device;\n }", "public function setDevices(array $devices)\n {\n $this->devices = $devices;\n\n return $this;\n }", "public function setDeviceType(array $deviceTypes);", "public function setSupportedDevices(?array $value): void {\n $this->getBackingStore()->set('supportedDevices', $value);\n }", "public function sendNotificationToMultiple()\n {\n\n $notification = new Notification();\n $token = '*********************';\n $user = [\n 'device_token' => [\n 'coSYTXVthR0:APA91bGfJN1_FViYa2SlUIUbnAdN5nATsiKMdUyfKDtc0cL-abg0NhPSqdUOZg3Ih2v2vx-pbaDFe2Xl0xC9pCv40nHq47eNn7jIen6PMTktMFY3XhkQrCzXeJdyQgL8GzvRRSeUEBP8',\n 'd5ESUZWqd40:APA91bF33wy7c3AuxFB8qf_T5VN6Lo62du6L9z-eqj-MW_gtRaHdLvxJHyLFnRawAjED11E8IC5oqv5VOLLDBs60eqAbTgPBkByWWf6WMHf7I3jHERSoJs18yf1FDFBkZdWsRAxQAwvd',\n 'coSYTXVthR0:APA91bGfJN1_FViYa2SlUIUbnAdN5nATsiKMdUyfKDtc0cL-abg0NhPSqdUOZg3Ih2v2vx-pbaDFe2Xl0xC9pCv40nHq47eNn7jIen6PMTktMFY3XhkQrCzXeJdyQgL8GzvRRSeUEBP8',\n 'coSYTXVthR0:APA91bGfJN1_FViYa2SlUIUbnAdN5nATsiKMdUyfKDtc0cL-abg0NhPSqdUOZg3Ih2v2vx-pbaDFe2Xl0xC9pCv40nHq47eNn7jIen6PMTktMFY3XhkQrCzXeJdyQgL8GzvRRSeUEBP8',\n ]\n ];\n $notification->toMultiDevice($user, 'title', 'body', null, null);\n }", "abstract public function setDeviceProperties(array $data, $deviceId);", "function setDevice($index, $value) {\n\t\t$_SESSION[\"SESSION_VALUES\"][\"DEVICE\"][$index] = $value;\n\t}", "private function storeToQueues()\n {\n if (!empty($this->androidUsers)) {\n $this->addToDeviceQueue($this->androidUsers, QueueController::ANDROID);\n }\n if (!empty($this->iosUsers)) {\n $this->addToDeviceQueue($this->iosUsers, QueueController::IOS);\n }\n }", "public function getDevices()\n {\n return $this->devices;\n }", "public function getDevices()\n {\n return $this->devices;\n }", "public function getDevices()\n {\n return $this->devices;\n }", "public function send($content, array $data = [], array $devices = []);", "abstract public function setDeviceInfo($data);", "private static function set_setting_for_all_devices( &$sections, $setting_config ) {\n $setting_key = $setting_config['meta']['setting_key'];\n $devices = $setting_config['meta']['devices'];\n\n unset( $setting_config['meta'] );\n\n foreach ( $devices as $device ) {\n if ( isset( $sections[$device]['settings'] ) ) {\n $setting_config['device'] = $device;\n $sections[$device]['settings'][$setting_key] = $setting_config;\n }\n }\n }", "public function setDevices($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Google\\Home\\Graph\\V1\\AgentDeviceId::class);\n $this->devices = $arr;\n\n return $this;\n }", "public static function set($device) {\n\t\tself::$device = $device;\n\t}", "public function push(DeviceCollection $devices, MessageInterface $message):void;", "public function setDevices($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Google\\Ads\\GoogleAds\\V7\\Common\\DeviceInfo::class);\n $this->devices = $arr;\n\n return $this;\n }", "public function setDevice(array $device = []): object\n\t{\n\t\tif ([] !== $this->device) {\n\t\t\t$this->_trackValuesRemoved(count($this->device));\n\t\t\t$this->device = [];\n\t\t}\n\t\tif ([] === $device) {\n\t\t\treturn $this;\n\t\t}\n\t\tforeach ($device as $v) {\n\t\t\tif ($v instanceof FHIRReference) {\n\t\t\t\t$this->addDevice($v);\n\t\t\t} else {\n\t\t\t\t$this->addDevice(new FHIRReference($v));\n\t\t\t}\n\t\t}\n\t\treturn $this;\n\t}", "function setDevicePath($path) {\n\t\tif ( is_array($path) && count($path) > 0 ) {\n\t\t\t$this->_DevicePath = $path;\n\t\t}\n\t}", "public function __construct()\n {\n $this->devices = [];\n $this->platforms = [];\n $this->users = [];\n }", "public function setDeviceId(string $deviceId): void\n {\n $this->deviceId = $deviceId;\n }", "abstract public function listDevices();", "protected function _attributeServicesToPushers()\n {\n foreach ($this->pushers as $pusher) {\n $pusher->setPush(\n new BasePushManager($pusher->getUserKey(), $pusher->getApiKey(), $pusher->getDevice())\n );\n }\n }", "public function setDeviceID ($id)\n\t{\n\t\t$this->deviceID = $id;\n\t}", "public function sendAll()\n {\n }", "public function getDevices(){\n\t\t\n\t\t$reqBearer = $this->bearer;\t\t\n\t\t$this->model->getDevices($reqBearer);\n\t}", "public function sendToMultiple()\n {\n $token = array('Registratin_id1', 'Registratin_id2'); // array of push tokens\n $message = \"Test notification message\";\n\n $this->load->library('fcm');\n $this->fcm->setTitle('Test FCM Notification');\n $this->fcm->setMessage($message);\n $this->fcm->setIsBackground(false);\n // set payload as null\n $payload = array('notification' => '');\n $this->fcm->setPayload($payload);\n $this->fcm->setImage('https://firebase.google.com/_static/9f55fd91be/images/firebase/lockup.png');\n $json = $this->fcm->getPush();\n\n /** \n * Send to multiple\n * \n * @param array $token array of firebase registration ids (push tokens)\n * @param array $json return data from getPush() method\n */\n $result = $this->fcm->sendMultiple($token, $json);\n }", "public function sendHandItemsToAllClients(){\n\t\t$pk = $this->createHandItemsEquipPacket();\n\t\t$this->sendPacketToPlayers($pk);\n\t}", "public function __construct($userDevices)\n {\n $this->userDevices = $userDevices;\n }", "public function setDataSend($data = array())\r\n {\r\n # funcion encargada de contar la cantidad de datos enviados atraves de un array\r\n if(count($data) > 0)\r\n $this->dataToSend = $data;\r\n else\r\n return 0;\r\n }", "public static function actionPushMultiDevice($tokens= array(), $title='', $content='', $info_type_id=1, $id=1) {\n\t\t$message = 'testing';\n\t\t$gcm = Yii::app()->gcm;\n\t\t$tokens = array_unique($tokens);\n\t\t$tokens = array_values($tokens);\n\t\t$gcm->sendMulti($tokens, $message, array('extra' => 'multi devices ', 'title'=>$title, 'value' => $content, 'info_type_id'=>$info_type_id, 'id'=>$id), array( 'delayWhileIdle' => true ));\n\t}", "function afterProbeAction($devices) { }", "public function sendSportsgearRelatedOffers(){}", "public function set_potential_users(array $users) {\n $this->potentialusers = $users;\n }", "public function setDeviceId(?string $value): void {\n $this->getBackingStore()->set('deviceId', $value);\n }", "public function setDeviceId(?string $value): void {\n $this->getBackingStore()->set('deviceId', $value);\n }", "public function setDeviceInfo($data)\n {\n /* Make sure we have the device entry */\n try {\n if (!$this->deviceExists($data->id)) {\n $this->_logger->debug('[' . $data->id . '] Device entry does not exist, creating it.');\n $query = 'INSERT INTO ' . $this->_syncDeviceTable\n . ' (device_type, device_agent, device_rwstatus, device_id, device_supported)'\n . ' VALUES(?, ?, ?, ?, ?)';\n $values = array(\n $data->deviceType,\n (!empty($data->userAgent) ? $data->userAgent : ''),\n $data->rwstatus,\n $data->id,\n (!empty($data->supported) ? serialize($data->supported) : '')\n );\n $this->_db->execute($query, $values);\n }\n } catch(Horde_Db_Exception $e) {\n throw new Horde_ActiveSync_Exception($e);\n }\n\n $this->_deviceInfo = $data;\n\n /* See if we have the user already also */\n try {\n $query = 'SELECT COUNT(*) FROM ' . $this->_syncUsersTable . ' WHERE device_id = ? AND device_user = ?';\n $cnt = $this->_db->selectValue($query, array($data->id, $data->user));\n if (!$cnt) {\n $this->_logger->debug('[' . $data->id . '] Device entry does not exist for user ' . $data->user . ', creating it.');\n $query = 'INSERT INTO ' . $this->_syncUsersTable\n . ' (device_id, device_user, device_policykey)'\n . ' VALUES(?, ?, ?)';\n\n $values = array(\n $data->id,\n $data->user,\n $data->policykey\n );\n return $this->_db->insert($query, $values);\n } else {\n return true;\n }\n } catch (Horde_Db_Exception $e) {\n throw new Horde_ActiveSync_Exception($e);\n }\n }", "public function extend($devices) {\n\t\t$cmdArgs = [];\n\t\t$cmdArgs[] = escapeshellarg($this->getName());\n\t\t$cmdArgs[] = implode(\" \", $devices);\n\t\t$cmd = new \\OMV\\System\\Process(\"vgextend\", $cmdArgs);\n\t\t$cmd->setRedirect2to1();\n\t\t$cmd->execute();\n\t}", "public function sendConfig()\n {\n $config = $this->config;\n $message = new MSMessage($this->id);\n\n $message->set($this->node_address, $this->sensor_address, 'V_VAR1',0);\n $message->setMessage($config->dimmer_delay);\n MqttSender::sendMessage($message);\n\n usleep(1000*10);\n $message->set($this->node_address, $this->sensor_address, 'V_VAR2',0);\n $message->setMessage($config->level_min);\n MqttSender::sendMessage($message);\n usleep(1000*10);\n $message->set($this->node_address, $this->sensor_address, 'V_VAR3',0);\n $message->setMessage($config->level_max);\n MqttSender::sendMessage($message);\n usleep(1000*10);\n $message->set($this->node_address, $this->sensor_address, 'V_VAR4',0);\n $message->setMessage($config->enable_delay);\n MqttSender::sendMessage($message);\n }", "public function setDeviceManagement(?RbacApplicationMultiple $value): void {\n $this->getBackingStore()->set('deviceManagement', $value);\n }", "public function broadcastOn()\n {\n return array_map(function ($id) {\n return new PrivateChannel(\"send.message.{$id}\");\n }, $this->sendUsers);\n }", "public function setDeviceId($val)\n {\n $this->_propDict[\"deviceId\"] = $val;\n return $this;\n }", "public function setDeviceId($val)\n {\n $this->_propDict[\"deviceId\"] = $val;\n return $this;\n }", "public function setDeviceId($val)\n {\n $this->_propDict[\"deviceId\"] = $val;\n return $this;\n }", "public function setDeviceId($val)\n {\n $this->_propDict[\"deviceId\"] = $val;\n return $this;\n }", "public function sendBatch()\n {\n foreach ($this->queuedNotifications as $queuedNotification) {\n if ($queuedNotification['toClients']) {\n $this->sendToClients(\n $queuedNotification['entity'],\n $queuedNotification['force'],\n $queuedNotification['changeSet'],\n $queuedNotification['HTTPMethod'],\n $queuedNotification['options']\n );\n } else {\n $this->sendToServer(\n $queuedNotification['entity'],\n $queuedNotification['force'],\n $queuedNotification['changeSet'],\n $queuedNotification['HTTPMethod'],\n $queuedNotification['options']\n );\n }\n }\n\n $this->batchManager->sendAll();\n $this->clear();\n }", "function testSendPushNotificationToAListOfDevice()\n {\n $this->_oCliXM_WS->GetDeviceInformationByID( self::DEVICE_ID );\n $deviceToken = $this->_oCliXM_WS->getLastRequestResult()->device->deviceToken;\n $this->_oCliXM_WS->SendPushNotificationToAListOfDevice(self::DEVICE_ID, $deviceToken, 'a notification.');\n }", "public function test_list_devices_method()\n {\n $devices = User_Agent::list_devices();\n\n $this->assertNotEmpty($devices);\n $this->assertIsArray($devices);\n\n foreach ($devices as $device)\n {\n $this->assertArrayHasKey('name', $device);\n $this->assertArrayHasKey('signature', $device);\n }\n }", "public function setDeviceBrand(array $deviceBrands);", "public function setDevice(Request $request)\n {\n return response([\n 'entity' => auth()->user()->devices()->updateOrCreate([\n 'devicable_type' => 'App\\Models\\Client',\n 'devicable_id' => auth()->id()\n ], ['token' => $request->input('token')])\n ]);\n }", "function envoiTrame() {\n\n $socket = socket_create(AF_INET, SOCK_DGRAM, 0);\n $longueur = strlen($this->trame_ok);\n socket_sendto($socket, $this->trame_ok, $longueur, 0, ADRESSE_INTERFACE, 1470);\n socket_close($socket);\n\n }", "public function allDevices()\n {\n // Just to make sure, lets refresh the client\n $this->http->refresh();\n\n return $this->devices;\n }", "private function setRequests($vars)\n\t{\n\t\t$this->requests = $vars;\n\t}", "public function setDeviceName($val)\n {\n $this->_propDict[\"deviceName\"] = $val;\n return $this;\n }", "public function setDeviceName($val)\n {\n $this->_propDict[\"deviceName\"] = $val;\n return $this;\n }", "public function setDeviceName($val)\n {\n $this->_propDict[\"deviceName\"] = $val;\n return $this;\n }", "public function setDeviceProperties(array $data, $deviceId)\n {\n $query = 'UPDATE ' . $this->_syncDeviceTable . ' SET device_properties = ?,'\n . ' device_agent = ? WHERE device_id = ?';\n $properties = array(\n serialize($data),\n $data[Horde_ActiveSync_Request_Settings::SETTINGS_USERAGENT],\n $deviceId);\n try {\n $this->_db->update($query, $properties);\n } catch (Horde_Db_Exception $e) {\n throw new Horde_ActiveSync_Exception($e);\n }\n }", "function set_target_users($target_users)\r\n {\r\n $this->target_users = $target_users;\r\n }", "function getDevices(){\n\t \t$path = \"/devices\";\n\t \treturn $this->queryPath($path);\n\t }", "public function SetDevice($asDevice) {\n $this->device = $asDevice;\n $this->loadDeviceData();\n $this->stateManager->SetDevice($this->device);\n }", "public function device($value)\n {\n $this->setProperty('device', $value);\n return $this;\n }", "public function setAllowExternalSenders($value)\n {\n $this->setProperty(\"AllowExternalSenders\", $value, true);\n }", "public function devices()\n {\n return $this->hasMany(Device::class);\n }", "public function devices()\n {\n return $this->hasMany(Device::class);\n }", "protected function sendToAll($arrSend) {\n // @todo: send only to logged people\n parent::sendToAll($this->prepareArraytoSend($arrSend));\n }", "public function setDevice($value)\n {\n return $this->setParameter('device', $value);\n }", "public function getDeviceList()\n {\n return $this->device_list;\n }", "public function setDeviceName(?string $value): void {\n $this->getBackingStore()->set('deviceName', $value);\n }", "public function setDeviceName(?string $value): void {\n $this->getBackingStore()->set('deviceName', $value);\n }", "public function setDeviceName(?string $value): void {\n $this->getBackingStore()->set('deviceName', $value);\n }", "public function setDevice(?Identity $value): void {\n $this->getBackingStore()->set('device', $value);\n }", "public function devices (){\n //Any devices may be applied to many room\n\n return $this->belongsToMany(Devices::class)->withTimestamps();\n }", "function set_hint($device, $queues) {\n\tglobal $queue_toggle_code;\n\n\tif (trim($device) == '') {\n\t\treturn;\n\t}\n\t$hlist = 'Custom:QUEUE' . $device . '*' . implode('&Custom:QUEUE' . $device . '*', $queues);\n\tout(\"exten => $queue_toggle_code*$device,hint,$hlist\");\n}", "public function Device_array(array $params)\n {\n if( $params[\"hostname\"]!=null && !(empty($params[\"hostname\"])) && (is_string($params[\"hostname\"]))) \t\t{\n\t$this->hostName = $params[\"hostname\"];\t\t\n \t}\n\telse{\n\tdie (\"host name should be string and should not be empty or null\\n\");\n\t}\n\n\tif (empty($params[\"username\"]) || is_null( $params[\"username\"] ) ){\n\tdie (\"user name should not be empty or null\\n\");\n\t}\n\telse{\n\t$this->userName = $params[\"username\"];\n\t}\n\n\tif (empty($params[\"password\"]) || is_null( $params[\"password\"] ) ){\n\tdie(\"user name should not be empty or null\\n\");\n\t}\n\telse{\n\t$this->password = $params[\"password\"];\n\t}\n\n\tif($params[\"port\"]!=null && !(empty($params[\"port\"])) && is_numeric($params[\"port\"]) )\n\t{\n\t$this->port = $params[\"port\"];\n\t}\n\telse{\n\t$this->port = 830;\n\t}\n\n\tif ( $params[\"capability\"]!=null && ! (empty($params[\"capability\"]) ) ){\n\t$this->hello_rpc= $this->create_hello_rpc($params[\"capability\"]);\n\t}\n\telse {\n\t$this->hello_rpc = $this->default_hello_rpc();\n\t}\n $this->connectTimeout=10;\n\t$this->replyTimeout= 600;\n\t$this->is_connected =false;\n }", "function broadcast($data) {\n\n foreach($this->clients as $socket) {\n $socket->send($data);\n }\n\n }", "public function setUsers(array $users)\n {\n $this->users = $users;\n }", "public function updateDeliveryDevice($device = '')\n {\n }", "function setMailSendType($a_types)\n\t{\n\t\t$this->mail_send_type = $a_types;\n\t}", "public function broadcastOn()\n {\n return [ 'parkiller_demo_channel' ];\n }", "public function setActiveDevices($val)\n {\n $this->_propDict[\"activeDevices\"] = intval($val);\n return $this;\n }", "public function setTo($to)\n {\n if (!is_array($to)) {\n $to = array($to);\n }\n $this->to = $to;\n }", "public function sendArmorUpdateToAllClients(){\n\t\t$pk = $this->createArmorEquipPacket();\n\t\t$this->sendPacketToPlayers($pk);\n\t}", "public function devices()\n {\n return $this->hasMany(Devices::class);\n }", "public function setVendor(): void\n {\n $this->vendor = 'Meringue';\n }", "public function saveDevicesToStorage(array $devices) {\n $data = array();\n foreach ($devices as $_device) {\n $data[] = $_device->deviceToData();\n }\n $this->_saveDeviceDataArrayToStorage($data);\n\n return $this;\n }", "protected function setPids()\n\t{\n\t\t$pidTypeArray = ['login', 'register', 'edit', 'infomail', 'confirm', 'confirmInvitation'];\n\t\tforeach ($pidTypeArray as $type) {\n\t\t\t$this->setPid($type, $this->conf[$type . 'PID']);\n\t\t}\n\t}", "private function send_data_multiple($users, $action, $params) {\n\t\t$data = array('action' => $action, 'params' => $params);\n\t\t$json = json_encode($data);\n\t\t\n\t\t//Iterate all users\n\t\tforeach($users as $user) {\n\t\t\t\n\t\t\t//For each user iterate over their connections\n\t\t\tif(isset($this->clients[$user->id])) {\n\t\t\t\tforeach($this->clients[$user->id] as $conn) {\n\t\t\t\t\t$conn->send($json);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function testUpdateDevice()\n {\n\n }", "function sendNotifications()\n\t\t {\n\t\t $message = \"A new tip has been added to iTipZ\";\n\t\t\t\n\t\t \t//get all the device token from iphone users\n\t\t\t/*$sql = $this->db->prepare(\"select * from apple_devices\");\n\t\t\t$sql->execute();\n\t\t\t$count = $sql->rowCount();\n\t\t\tif($count > 0)\n\t\t\t{\n\t\t\t\twhile($getTokens = $sql->fetch())\n\t\t\t\t{\n\t\t\t\t\t$token = $getTokens[\"devicetoken\"];\n\t\t\t\t\t//$this->sendNotification($message,$token);\n\t\t\t\t}\n\t\t\t}*/\n\t\t\t\n\t\t\t\n\t\t\t//get all the device token from android users\n\t\t\t$sql = $this->db->prepare(\"select * from tipapp_android_key\");\n\t\t\t$sql->execute();\n\t\t\t$count = $sql->rowCount();\n\t\t\tif($count > 0)\n\t\t\t{\n\t\t\t\twhile($getTokens = $sql->fetch())\n\t\t\t\t{\n\t\t\t\t\t$key = $getTokens[\"android_key\"];\n\t\t\t\t\t$this->sentandroid($key,$message,1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t }", "public function EmulateDevice($device)\n\t\t\t{\n\t\t\t\t$this->device = $device;\n\t\t\t}", "public function setClients($clients)\n {\n $this->clientPhysiques = $clients;\n }", "private function setReceivers(array $receivers)\n {\n $this->message->setTo($receivers);\n }", "public function devicesList(){\n\n return $this->devices->pluck('id')->all();\n\n }", "public function setTo(array $to)\n {\n \t// if receipients was passed, set them\n \tif (sizeof($to) > 0) {\n \t\t$this->_to = $to;\n \t}\n \treturn $this;\n }", "public function devices()\n {\n return $this->hasMany('App\\Models\\Device');\n }", "public function setRequests(array $requests) {\n $this->requests = json_encode($requests);\n }", "public function setDeviceId($deviceId) {\n $this->makeVisible('device_id')->device_id = $deviceId;\n $this->makeHidden('device_id');\n $this->save();\n }" ]
[ "0.6574608", "0.6190899", "0.60380375", "0.6028934", "0.58079624", "0.5686887", "0.5621109", "0.5609585", "0.55918914", "0.5589358", "0.5524365", "0.5524365", "0.5524365", "0.55237544", "0.5511899", "0.54751056", "0.5462535", "0.5431664", "0.54302615", "0.53525144", "0.5351461", "0.53421426", "0.53385067", "0.53235", "0.5301298", "0.52975357", "0.52854943", "0.5272564", "0.5206929", "0.5172586", "0.51602656", "0.51315993", "0.50854796", "0.50695115", "0.506809", "0.5062353", "0.5061125", "0.5057064", "0.5057064", "0.5046175", "0.5046084", "0.50250536", "0.50184774", "0.5017068", "0.5012706", "0.5012706", "0.5012706", "0.5012706", "0.5004527", "0.49964726", "0.4991206", "0.49911082", "0.49898344", "0.4989099", "0.49880275", "0.49710044", "0.4964039", "0.4964039", "0.4964039", "0.49558645", "0.49543163", "0.4947332", "0.49472675", "0.4941347", "0.49385142", "0.49310973", "0.49310973", "0.493066", "0.49293154", "0.49245924", "0.4922461", "0.4922461", "0.4922461", "0.49109435", "0.48972908", "0.48928627", "0.4882286", "0.48820946", "0.48819232", "0.48801744", "0.48801538", "0.48756638", "0.486178", "0.48552993", "0.4854964", "0.4854961", "0.48540032", "0.4848232", "0.48441774", "0.48421165", "0.48354298", "0.48302037", "0.4829503", "0.48247254", "0.48183203", "0.479144", "0.47865704", "0.47844523", "0.47807494", "0.47780016" ]
0.7064323
0
Extracts the content of the response with the given key
Извлекает содержимое ответа с заданным ключом
private function extract($key, $response) { $result = null; if(array_key_exists($key, $response)) { $result = $response[$key]; } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFromResponse($key)\n {\n return isset($this->results[$key]) ? $this->results[$key] : '';\n }", "public function offsetGet($key)\n {\n return $this->_response[$key];\n }", "public function get($key)\n {\n return $this->getValueByKey($this->response, $key);\n }", "function get($key){\n $element = new stdClass();\n $element->key = $key;\n $batch = array(\n $element\n );\n\n $data_string = json_encode($batch);\n $data = \"GET {$data_string}\";\n $response = json_decode($this->send($data), true);\n return $response['data'][0][$element->data];\n }", "public function getContentFromKey($key)\r\n\t{\r\n\t\treturn $this->getContent($this->hash($key));\r\n\t}", "public function getData($response, $key = null);", "public function __get($key)\n {\n return $this->response->{$key};\n }", "public function getResponseInfoByKey(string $key): string\n {\n $info = $this->getResponseInfo();\n if (isset($info[$key])) {\n return $info[$key];\n } else {\n return \"\";\n }\n }", "public function getAddressFromResponse($key){\n if(is_array($this->response)\n && array_key_exists(\"result\", $this->response)\n && array_key_exists(\"payload\", $this->response[\"result\"]) \n && array_key_exists(\"address\", $this->response[\"result\"][\"payload\"])){\n return $this->response[\"result\"][\"payload\"][$key];\n }\n return null;\n }", "public function getFromPost($key);", "protected function getResponseValue( $key ) {\n\t\tif ( !$this->response ) return null;\n\t\tif ( array_key_exists($key, $this->response) ) {\n\t\t\treturn $this->response[$key];\n\t\t}\n\t\treturn null;\n\t}", "public function get($key) {\n\t\t$key1 = $key2 = $response = null;\n\t\tlist($key1, $key2) = @explode('.', $key);\n\t\t\n\t\tif (isset(self::$data[$key1][$key2])) {\n\t\t\t$response = self::$data[$key1][$key2];\n\t\t}\n\t\t\n\t\treturn $response;\n\t}", "public function get($key) {\n if (array_key_exists($key, $this->response)) {\n return $this->response[$key];\n }\n\n if (array_key_exists($key, $this->custom)) {\n return $this->custom[$key];\n }\n\n return null;\n }", "public function gets($key)\n {\n return $this->_client->gets($this->_keyPrefix . $key);\n }", "public function getFileContent($key)\n {\n return $this->adapter->read($key);\n }", "function get($key){\n\t\n\t\t//check that array is not empty\n\t\tif ($this->is_empty()){\n\t\t\treturn null;\n\t\t}\n\t\t//check to make sure key is valid\n\t\tif (!array_key_exists($key,$this->response[0])){\n\t\t\t$this->handle_error(\"Attempt to access invalid index \" . $key);\n\t\t}\n\t\t\n\t\treturn $this->response[0][$key];\n\t\t\n\t}", "private function getContent(string $key)\n {\n if(isset($this->server[$key])) {\n return $this->server[$key];\n }\n return null;\n }", "public function get($key)\n {\n return $this->request->get($key);\n }", "function getContent($key = '') {\n\t\treturn ($key && array_key_exists($key, $this->content) ? $this->content[$key] : $this->content);\n\t}", "public function get($key)\n {\n return $this->client->get($key);\n }", "public function get($key)\n {\n if (!empty($this->body[$key])) {\n return $this->body[$key];\n }\n\n return null;\n }", "public function get($key)\n {\n return $this->_client->get($this->_keyPrefix . $key);\n }", "public function get($key)\n {\n $res = $this->execute('GET', [$key]);\n return $res === null ? null : unserialize($res);\n }", "public function getData( string $key = 'array' )\n\t{\n\t\tif ( 'raw' === $key ) {\n\t\t\treturn $this->response;\n\t\t}\n\n\t\t$i = strrpos( $this->output, ']' );\n\t\tif ( false === $i || '[' !== $this->output[0] ) {\n\t\t\ttrigger_error( 'Missing JSON object in response', E_USER_ERROR );\n\t\t\treturn false;\n\t\t}\n\n\t\t$i += 1;\n\t\t$data1 = substr( $this->output, 0, $i );\n\t\t$data2 = substr( $this->output, $i );\n\n\t\t$this->app['logger']->debug( 'json: ' . $data1 );\n\t\t$this->app['logger']->debug( 'extra: ' . $data2 );\n\n\t\t$json = json_decode( $data1 );\n\t\tif ( null === $json ) {\n\t\t\ttrigger_error( 'Failed decoding JSON object', E_USER_ERROR );\n\t\t\treturn false;\n\t\t}\n\n\t\t$all = array(\n\t\t/* @formatter:off */\n\t\t\t'array' => $json,\n\t\t\t'extra' => $data2,\n\t\t\t'json' => $this->output,\n\t\t\t'raw' => $this->response,\n\t\t);\n\t\t/* @formatter:on */\n\n\t\tif ( array_key_exists( $key, $all ) ) {\n\t\t\treturn $all[$key];\n\t\t}\n\n\t\treturn $all;\n\t}", "public function getAttribute($key)\n {\n return $this->getValueByKey($this->response, (string) $key);\n }", "public function getTransactionResponseSingle($order_id, $key)\n {\n $response = $this->getTransactionSingle($order_id ,'response');\n if ($response) {\n $result = json_decode($response, true);\n if (isset($result[$key])) {\n return $result[$key];\n }\n }\n return false;\n }", "public function getContentByKey($key)\n {\n return $this->getScaler('content', '`key`=:t1', array(':t1' => $key));\n }", "public function get($key)\n {\n $cmd_str = \"get \" . $key . self::BR;\n $response = $this->sendCommand($cmd_str);\n\n return $response['VALUE'][$key]['value'];\n }", "public function get(string $key)\n {\n if (!empty($result = $this->handler->get($key))) {\n return unserialize($result);\n }\n }", "public function get( $key ) {\r\n\t\tif ( ! isset( $this->body->$key ) ) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\treturn $this->body->$key;\r\n\t}", "public function __get($key) {\n\t\treturn $this->contentArr[$key];\n\t}", "public static function fetch(string $key)\n {\n return self::$Conn->get($key);\n }", "public static function getResponseHeader($key = 'Content-Type')\n {\n $value = null;\n $headers = \\headers_list();\n foreach ($headers as $header) {\n if (\\preg_match('/^'.$key.':\\s*([^;]*)/i', $header, $matches)) {\n $value = $matches[1];\n break;\n }\n }\n return $value;\n }", "function getContent($key) {\n\t$content = Cache::rememberForever('content', function() {\n\t return Content::all()->pluck('value', 'key');\n\t});\n\n\treturn $content[$key];\n}", "public function file_get_contents($key) {\n\t\treturn \\file_get_contents ( $this->_getPath ( $key ) );\n\t}", "public function fetch(\\Scrivo\\Str $key);", "private function parse(ResponseInterface $response, string $key): LazyCollection\n {\n $contents = json_decode($response->getBody()->getContents(), true, 512, JSON_THROW_ON_ERROR);\n\n return new LazyCollection(array_map(static function ($record) {\n return new Fluent($record);\n }, $contents[$key]));\n }", "public function getHeader( $key ) {\r\n\t\t\t$headers = $this->getHeaders();\r\n\t\t\t$response = array();\r\n\t\t\t$key .= ':';\r\n\t\t\t\r\n\t\t\tforeach( $headers as $header ) {\r\n\t\t\t\tif( strpos( $header, $key ) === 0 ) {\r\n\t\t\t\t\t$response[] = $header;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn $response;\r\n\t\t}", "public function get($key) {\n\t\tif(!$this->hasKey($key))\n\t\t\treturn null;\n\t\treturn $this->requests[$key];\n\t}", "public function getFromGet($key);", "public function get($key){\n if($key === null){\n self::error(\"get key cannot be null\",__CLASS__);\n throw new Doggy_Util_MogileFs_Exception(\"get key cannot be null\");\n }\n $paths = $this->getPaths($key);\n \n if(empty($paths)) return null;\n \n foreach($paths as $path) {\n $contents = '';\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_VERBOSE, ($this->debug > 0 ? 1 : 0));\n curl_setopt($ch, CURLOPT_TIMEOUT, $this->requestTimeout);\n curl_setopt($ch, CURLOPT_URL, $path);\n curl_setopt($ch, CURLOPT_FAILONERROR, true);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($ch);\n if($response === false)\n continue; // Try next source\n curl_close($ch);\n return $response;\n }\n throw new Doggy_Util_MogileFs_xception(\"get unable to retrieve {$key}\");\n }", "private function getSingleData( $key )\n {\n $questions = $this->getResults();\n return $questions[ $key ];\n }", "public function getServerContentsFromKey($server, $key);", "public function getItem($key)\n {\n\n if (isset($this->object->content[$key]))\n return $this->object->content[$key];\n \n else\n return null;\n \n }", "public function getData($key) {\n \n $response = null;\n \n if (isset($_SESSION[$this->_()])) {\n $response = $_SESSION[$this->_()];\n if (isset($response[$key])) {\n $response = $response[$key];\n } else {\n $response = null;\n }\n }\n \n return $response;\n \n }", "public function getByKey($key);", "public function fetch($key)\n {\n $data = $this->cache->get($key);\n if ($data) {\n return json_decode($data, true);\n }\n return false;\n }", "public function getKeyContent($data, $key);", "public function get($key) {\n\t\t$this->connect();\n\t\treturn $this->_connection->get($key);\n\t}", "function get($key)\n\t{\n\t\treturn $this->peer->get($this->mangleKey($key));\n\t}", "public static function fetch($key)\n {\n $data = self::_getCache()->fetch($key);\n return ($data) ? $data->getContents() : null;\n }", "public function get($key) {\r\n\t\tif(isset($this->headers[$key])) {\r\n\t\t\treturn $this->headers[$key];\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "protected abstract function retrieve($key);", "public function getText($key)\n {\n $text = $this->request('hentLostekst', [\n 'arg0' => $key,\n ]);\n return $text;\n }", "public function getItem($key);", "public function getItem($key);", "public function getItem($key);", "public function getItem($key);", "public function get(string $key)\n {\n return $this->getValueFromVariable($_GET,$key); \n }", "private function getDataByKey($key)\n {\n return $this->_getData($key);\n }", "protected function get($key) {\n\t\t$record = $this->mongoCollection->findOne(array('key' => $key));\n\t\tif($record && is_array($record) && array_key_exists('data', $record)) {\n\t\t\treturn $record['data'];\n\t\t}\n\t}", "function get($key = '') {\n\t\treturn $this->__get_v('get', $key);\n\t}", "public function get($key) {\n $value = $this->_data[$key];\n\n if (class_exists('\\Sleepy\\Hook')) {\n Hook::addFilter('template_get_' . $key, $value);\n }\n\n return $value;\n }", "public function getDataByKey($key);", "public function getData($key = '')\n {\n $data = $this->meta->getData();\n foreach ($data as $k => $v) {\n $data->put($k, strip_tags(trim(strtr($v, $this->code->toArray()), '-_ ')));\n }\n if ($key) {\n return $data->get($key);\n } else {\n return $data;\n }\n }", "protected abstract function getData( $key );", "function __get($key){ \n if(substr($key,0,1)=='_') return $this->text(substr($key,1),NULL);\n if($key=='data') return $this->data;\n trigger_error('opc_textprovider read denied to: ' . $key);\n }", "public function api_get($in_key) {\n\t\t$set_url = $this->api_base . $this->api_version . 'key';\n\t\t$set_args = array('key' => $in_key);\n\t\t$set_call = new rest_call('GET', $set_url, $set_args, $this->token);\n\t\t$response = $set_call->send();\n\t\tif ($response->status === 'ok') {\n\t\t\techo $response->$in_key . \"\\n\";\n\t\t}\n\t}", "public static function getByKey($key);", "public function pull($key);", "public function pull($key);", "public function readOnce($key)\n {\n $key = $this->cleanKey($key);\n return urldecode($this->readFromComet($key));\n }", "public function get($key){\n return $this->getItem($this->cache_name, $key);\n }", "public function getData($key = '');", "public function getParsedResponse();", "public function fetch($key);", "public function pull(string $key);", "public function get( $key )\n {\n// Charcoal_ParamTrait::validateString( 1, $key );\n\n return $this->_memcached->get( us($key) );\n }", "public function getData($key)\r\n {\r\n if (is_string($key))\r\n {\r\n $key= trim($key);\r\n $fileJson=file_get_contents(PATH_JSON);\r\n $tempArray = json_decode($fileJson, true); \r\n if ($tempArray[$key])\r\n {\r\n return $tempArray;\r\n } \r\n }\r\n return false;\r\n }", "public function get( $key );", "public function get(string $key);", "public function get(string $key);", "public function get(string $key);", "public function get(string $key);", "public function get(string $key);", "public function get(string $key);", "function info(string $key)\n {\n $info = $this->index->getFirst(\n [\n 'where' => 'key=:key',\n 'bind' => [\n 'key' => $key\n ]\n ]\n );\n\n if ($info)\n $info['meta'] = json_decode($info['meta'], true);\n\n return $info ?? null;\n }", "abstract protected function doGet(string $key): array;", "function get_view_data($key = null, $default = null) {\n\n $resp = Octopus_Response::current();\n\n if (!$resp) {\n throw new Octopus_Exception(\"There is no Octopus_Response available.\");\n }\n\n if (func_num_args() === 0) {\n return $resp->getValues();\n } else {\n return $resp->get($key, $default);\n }\n\n }", "public function read($key);", "private function readFromComet($key)\n {\n $cmd = \"{$this->cometSrv} read {$key} 2>&1\";\n ob_start();\n passthru($cmd);\n $result = trim(ob_get_contents());\n ob_end_clean();\n return $result;\n }", "function Get($key)\n {\n return $this->_data[$key];\n }", "public function get($key, $server) {\n //we are making a request to server\n $this->requestHeader['magic'] = $this->magic['request'];\n\n //and we are trying to get some data\n $this->requestHeader['opcode'] = $this->opcodes['get'];\n\n //for get body and key length are the same\n $this->requestHeader['key_length'] = mb_strlen($key);\n $this->requestHeader['total_body_length'] = mb_strlen($key);\n\n //header fields must be in order\n $stringPack = '';\n $bytesPack = array();\n foreach($this->headerRequestFieldsList as $field) {\n $stringPack .= $this->packRequestHeader[$field];\n $bytesPack[] = $this->requestHeader[$field];\n }\n\n //every letter must be in order and we need to add it's numeric value\n //and for every letter there must be a format character\n $keyArray = str_split($key);\n foreach($keyArray as $letter) {\n $stringPack = $stringPack.\"C\";\n $bytesPack[] = ord($letter);\n }\n\n //add format string to bytesPack array\n array_unshift($bytesPack, $stringPack);\n\n //I hate this function but this is the easiest way to do this quickly\n $data = call_user_func_array(\"pack\", $bytesPack);\n //create socket connection to memcached server\n $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\n socket_connect($socket, $server[\"host\"], $server[\"port\"]);\n\n //send prepared data\n socket_send($socket, $data, mb_strlen($data), MSG_EOF);\n\n //initialize variable for buffer\n $serverResponse = '';\n\n //read server response\n socket_recv($socket, $serverResponse, 4096, MSG_PEEK);\n return $this->getResponse($serverResponse);\n }", "public function get($key) {\n\n\t\treturn $this->memcache->get($key, $this->compressed);\n\t}", "function get_value($content,$key,$end) {\n $start_pos = strpos($content,$key);\n if (!$start_pos) return \"NA\"; //return Not Available if not found\n\t$start_pos = $start_pos + strlen($key) + 3;\n $temp_result = substr($content,$start_pos);\n\t$end_pos = strpos($temp_result,$end);\n return substr($temp_result,0,$end_pos);\n}", "public function read($key) {}", "protected function retrieveFromCache(string $key) : ?ResponseInterface\n {\n return Cache::get($key);\n }", "public function get($key)\n\t{\n\t\treturn $this->__get($key);\n\t}", "public function __get($key) {\n\n return isset($this->_content[$key]) ? $this->_content[$key] : false;\n }", "protected function getContent ($templateKey){\n\n $this->parseAll();\n \n if(isset($this->templates[$templateKey]))\n return $this->templates[$templateKey];\n else\n throw new \\Exception(\"Simplate Exception in \".__METHOD__.\" - Can't get content for template key: '{$templateKey}' because it doesn't exist\");\n }" ]
[ "0.7639915", "0.6880538", "0.6873645", "0.6783441", "0.677279", "0.6748012", "0.65914786", "0.65466243", "0.6534502", "0.6470623", "0.64122015", "0.63774663", "0.6375805", "0.63732386", "0.6324626", "0.6301254", "0.62883383", "0.62158513", "0.618081", "0.6157896", "0.6138236", "0.6096605", "0.6085258", "0.60831046", "0.60518", "0.6032102", "0.60273963", "0.6019917", "0.6008607", "0.59841746", "0.59555644", "0.59528065", "0.5950357", "0.59400123", "0.59226114", "0.58969355", "0.5885205", "0.5878805", "0.5871933", "0.5871632", "0.58668685", "0.5854001", "0.5852234", "0.58466184", "0.5816443", "0.5812562", "0.58104676", "0.58067703", "0.5804392", "0.5793574", "0.57885385", "0.578555", "0.57838565", "0.57833433", "0.5759272", "0.5759272", "0.5759272", "0.5759272", "0.57564795", "0.57391846", "0.57253945", "0.572483", "0.57216436", "0.57121384", "0.5694707", "0.5694661", "0.5690113", "0.56741345", "0.5670207", "0.56628114", "0.56628114", "0.5661093", "0.56568533", "0.56471837", "0.5635784", "0.5632645", "0.56298596", "0.5617355", "0.5607268", "0.56054384", "0.55943465", "0.55943465", "0.55943465", "0.55943465", "0.55943465", "0.55943465", "0.5585959", "0.5581279", "0.55782354", "0.55780655", "0.55729866", "0.55634034", "0.5547801", "0.5532997", "0.5526802", "0.55200535", "0.5519382", "0.55091774", "0.5507301", "0.5507052" ]
0.72863543
1
Write the request header.
Запишите заголовок запроса.
protected function writeHeader() { $this->writeByte($this->opCode); $this->writeInt($this->sessionId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function writeHeader() {\n\t\t$header = $this->util->createHeader($this->newHeader, $this->encryptionModule);\n\t\treturn parent::stream_write($header);\n\t}", "final protected function _sendHeader() {}", "public function write()\n\t{\n\t\tif ($this->type == MFCGI::BEGIN_REQUEST) {\n\t\t\t\n\t\t\t// Encode the Begin Request record body\n\t\t\t$this->content = chr(0).chr($this->role);\n\t\t\t$this->content .= chr($this->flags);\n\t\t\t$this->content .= str_repeat(chr(0), 5); // reserved\n\t\t\t$this->length = 8;\n\t\t\t\n\t\t} elseif ($this->type == MFCGI::PARAMS || $this->type == MFCGI::STDIN) {\n\t\t\t$this->length = strlen($this->content);\n\n\t\t} else {\n\t\t\t$this->length = 0;\n\t\t\t$this->content = '';\n\t\t}\n\t\t\n\t\t// Calculate any padding\n\t\t$this->padding = (8 - ($this->length % 8)) % 8;\n\t\t\n\t\t// Build the header\n\t\t$record = chr($this->version)\n\t\t\t.chr($this->type)\n\t\t\t.chr(($this->requestID >> 8) & 0xFF)\n\t\t\t.chr($this->requestID & 0xFF)\n\t\t\t.chr(($this->length >> 8) & 0xFF)\n\t\t\t.chr($this->length & 0xFF)\n\t\t\t.chr($this->padding)\n\t\t\t.chr(0) // reserved\n\t\t;\n\t\t\n\t\t// Add the body content with any padding\n\t\tif ($this->content != '') {\n\t\t\t$record .= $this->content;\n\t\t\tif ($this->padding) {\n\t\t\t\t$record .= str_repeat(chr(0), $this->padding);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Send the record and clear any current content\n\t\tif (($sent = @fwrite($this->socket, $record)) === false) {return false;}\n\t\tif ($this->debug) {cecho(\"--> Sent record ({$this->requestID}:{$this->type}:{$sent}/{$this->length})\\n\");}\n\t\t$this->content = '';\n\t\t\n\t\treturn true;\n\t}", "public function requestHeaderOn()\n {\n $this->setOpt(CURLINFO_HEADER_OUT, true);\n }", "private function _start_header() {\n $this->_write('{\"header\":{');\n $this->_write('\"version\":\"2013-04\"');\n $this->_write(',\"scope\":[\"all\"]');\n $this->_write('}}');\n }", "public function send_header($key, $value)\n {\n }", "protected function _writeHeader($string) {\n\t\theader($string, true);\n\t}", "protected function _setOutputHeaders()\n {\n oxRegistry::get('oxHeader')->setHeader('Content-Type: application/json');\n oxRegistry::get('oxHeader')->setHeader('Access-Control-Allow-Origin: *');\n oxRegistry::get('oxHeader')->sendHeader();\n }", "private function writeHeader() {\n $this->write(AvroDataIO::magic());\n AvroDataIO::metadataSchema()->write($this->metadata, $this->encoder);\n $this->write($this->syncMarker);\n }", "private function writeHeader()\n {\n $this->write(AvroDataIO::magic());\n $this->datumWriter->writeData(AvroDataIO::metadatSchema(), $this->metadata, $this->encoder);\n $this->write($this->syncMarker);\n }", "function printHeader() {\n $this->setHeader(\"Content-Type\",$this->contentType);\n \n // flag for an already sent response header\n $responseCodeSent = FALSE;\n \n foreach ($this->header as $name => $value) {\n if (substr($name,0,1) != \"_\") { \n \n // only send response code with first header\n if($responseCodeSent) {\n header(\"$name: $value\");\n } else {\n header(\"$name: $value\", TRUE, $this->responseCode);\n $responseCodeSent = TRUE;\n }\n }\n } \n \n }", "public function write_header() {\r\n\r\n\t\t// Write New Header to Output File\r\n\t\tfputcsv( $this->handle_output, $this->new_columns, $this->delimiter );\r\n\t\r\n\t}", "function _print_write_html_header()\n{\n\t$this->_print_write_data( $this->_print_write_html_header() );\n}", "public function header(string $key, string $value);", "public function setHeader( $name, $value );", "public function writeHeader() : void\n {\n $this->writer->writeRow(array_keys($this->fields));\n }", "abstract public function sendHeaders();", "private function writeHeader() {\n $headers = $this->parseFields();\n fputcsv($this->diskBuffer, $headers);\n }", "protected function sendHttpHeader()\n\t{\n\t\t$protocol=$this->getRequest()->getHttpProtocolVersion();\n\t\tif($this->getRequest()->getHttpProtocolVersion() === null)\n\t\t\t$protocol='HTTP/1.1';\n\n\t\theader($protocol.' '.$this->_status.' '.$this->_reason, true, TPropertyValue::ensureInteger($this->_status));\n\n\t\t$this->_httpHeaderSent = true;\n\t}", "public function header() {}", "protected function sendHeader($header)\n\t{\n\t}", "public function send_headers()\n {\n }", "public function send_headers()\n {\n }", "protected function setHeader()\n {\n $headers = array();\n foreach ($this->headers as $key => $value) {\n $headers[] = $key . ': ' . $value;\n }\n curl_setopt($this->request, CURLOPT_HTTPHEADER, $headers);\n\n }", "public function sendHeader()\n {\n $this->workarea->sendHeader();\n }", "public function addHeader($name, $value);", "public function addHeader($name, $value);", "public function add_header($key, $value)\n {\n }", "protected function writeHeader()\n {\n if (!$this->firstLineWritten && $this->header && $this->firstLineIsHeader) {\n $this->writeCsv($this->header);\n }\n }", "public function httpHeader(Event $event)\n {\n $event['request']->setHeader('Authorization', sprintf('token %s', $this->auth['http_header']));\n }", "function set_header($header, $value)\n {\n }", "public function header ( $header, $value )\n {\n if( $this->write_started )\n {\n throw new SocketInvalidOperationException( \"Can not write header, body writing has started.\" );\n }\n fwrite( $this->socket, \"$header: $value\\r\\n\" );\n fflush( $this->socket );\n }", "public function outputHeaders()\n {\n // set the http_response_code\n \\http_response_code($this->http_response_code);\n }", "public function setHeader($key, $value);", "public function sendHeaders() {}", "public function set_header($key, $value)\n {\n }", "public function send_headers() {\n\t\t$this->foundation->prepare(Request::foundation());\n\n\t\t$this->foundation->sendHeaders();\n\t}", "public function header();", "public function appendToHeader($header) {\n $this->header .= $header ; \n }", "function set_header($name, $value) {\n $this->headers[$name] = $value;\n }", "public function setRequestHeader($name, $value)\n {\n $this->getClient()->setHeader($name, $value);\n }", "private function set_headers() {\n header(\"HTTP/1.1 \" . $this->_code . \" \" . $this->get_status_message());\n header(\"Content-Type:\" . $this->_content_type);\n }", "function addHeader($field, $value);", "function setHeader($field, $value);", "function send() {\n\t\tif ($this->status)\n\t\t\theader($this->status);\n\t\tif ($this->headers)\n\t\t\tforeach ($this->headers as $header => $value)\n\t\t\t\theader($header.': '.$value);\n\t}", "public function setHeader(string $key, $value);", "function header() { }", "public function header()\n {\n }", "protected function renderHeader()\n {\n $fileName = Piwik::translate('General_Export');\n\n $period = Common::getRequestVar('period', false);\n $date = Common::getRequestVar('date', false);\n if ($period || $date) {\n // in test cases, there are no request params set\n\n if ($period == 'range') {\n $period = new Range($period, $date);\n } elseif (strpos($date, ',') !== false) {\n $period = new Range('range', $date);\n } else {\n $period = Period\\Factory::build($period, $date);\n }\n\n $prettyDate = $period->getLocalizedLongString();\n\n $meta = $this->getApiMetaData();\n\n $fileName .= ' _ ' . $meta['name']\n . ' _ ' . $prettyDate . '.csv';\n }\n\n // silent fail otherwise unit tests fail\n Common::sendHeader('Content-Disposition: attachment; filename=\"' . $fileName . '\"', true);\n ProxyHttp::overrideCacheControlHeaders();\n }", "public function withHeader(string $name, $value);", "public function setTraceResponseHeader() : void\n {\n @header(\"traceresponse: \" . $this->getDistributeTrace()->getTraceResponseHeader());\n }", "public function header($key, $value = null) {\n }", "public function sendHeaders()\n {\n switch ($this->_sOutputFormat) {\n case self::OUTPUT_FORMAT_JSON:\n oxRegistry::getUtils()->setHeader(\"Content-Type: application/json; charset=\" . $this->_sCharset);\n break;\n case self::OUTPUT_FORMAT_HTML:\n default:\n oxRegistry::getUtils()->setHeader(\"Content-Type: text/html; charset=\" . $this->_sCharset);\n break;\n }\n }", "protected function setRequestHeader()\n {\n $eWayHeaderData \t\t\t\t= new \\stdClass;\n $eWayHeaderData->eWAYCustomerID = new \\SoapVar($this->eWAYCustomerID,XSD_STRING,null, null, 'eWAYCustomerID',$this->ns);\n $eWayHeaderData->Username \t\t= new \\SoapVar($this->Username,XSD_STRING,null, null, 'Username',$this->ns);\n $eWayHeaderData->Password \t\t= new \\SoapVar($this->Password,XSD_STRING,null, null, 'Password',$this->ns);\n $headerData \t\t\t\t\t= new \\SoapVar($eWayHeaderData,SOAP_ENC_OBJECT);\n $SoapHeader \t\t\t\t = new \\SoapHeader($this->ns,'eWAYHeader',$headerData, false);\n $this->addSoapInputHeader($SoapHeader);\n }", "protected function outputHeader(){\n\t\t// only set headers if they have not already been set\n\t\tif(!headers_sent()){\n\t\t\theader('Content-Type:application/xml; charset=' . $this->encoding);\n\t\t}\n\t}", "private static function sendHeader($header){\n if(is_numeric($header)){\n // Send a HTTP status code\n switch($header){\n case 200: $text = 'OK'; break;\n case 201: $text = 'Created'; break;\n case 204: $text = 'No Content'; break;\n case 400: $text = 'Bad Request'; break;\n case 401: $text = 'Unauthorized'; break;\n case 403: $text = 'Forbidden'; break;\n case 404: $text = 'Not Found'; break;\n case 405: $text = 'Method Not Allowed'; break;\n case 409: $text = 'Conflict'; break;\n case 429: $text = 'Too Many Requests'; break;\n case 500: $text = 'Internal Server Error'; break;\n default: break;\n }\n\n $protocol = isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.1';\n\n header($protocol.' '.$header.' '.$text);\n } else {\n header($header);\n }\n }", "public function setHeader()\n {\n ;\n }", "public function header($key, $value) {\n $this->response->header($key, $value);\n }", "public static function outputHeaders() {\n # HTTP response code first\n self::outputResponseCode();\n\n header('Content-Type: ' . RenderContext::get()->getContentType());\n\n foreach (self::getHeaders() as $k => $v) {\n if (is_array($v)) {\n header(\"{$k}: {$v[0]}\");\n if (count($v) > 1) {\n $r = array_slice($v, 1);\n foreach ($r as $i) {\n header(\"{$k}: {$i}\", false);\n }\n }\n } else {\n header(\"{$k}: {$v}\");\n }\n }\n }", "abstract protected function generateHeader();", "public function sendHeaders(){\n\n\t\theader(\"HTTP/\".$this->version.\" \".$this->statusCode.\" \".$this->statusText[(string)$this->statusCode]);\n\n\t\tforeach($this->headers as $header){\n\t\t\theader($header);\n\t\t}\n\n\t\tif($this->redirect){\n\t\t\theader(\"Location: \".$this->redirect);\n\t\t\texit;\n\t\t}\n\t}", "public function setHeader(string $key, string $value): void;", "function setHeader($header);", "function send_headers() {\n\t\t$ct = 'Content-Type: ' . $this->get_content_type();\n\t\theader( $ct );\n\t}", "protected function setHeaderForServer()\n {\n header($this->protocol().' '.$this->getStatusCode().' '.static::$httpStatus[$this->getStatusCode()]);\n }", "public function header($var = null);", "function privWriteFileHeader(&$p_header)\n {\n }", "protected function sendHeaders()\n {\n if (headers_sent()) {\n return;\n }\n\n // Status\n $strVersion = ('HTTP/1.0' === $_SERVER['SERVER_PROTOCOL']) ? '1.0' : '1.1';\n header(sprintf('HTTP/%s %s %s', $strVersion, $this->intStatus, static::$arrStatuses[$this->intStatus]));\n\n // Headers\n foreach ($this->arrHeaders as $strName => $strContent) {\n header($strName . ': ' . $strContent);\n }\n }", "protected function setHeaderForServer()\n {\n header($this->protocol().' '.$this->getStatusCode().' '.ResponseHeader::$httpStatus[$this->getStatusCode()]);\n }", "function printHeader() {\n\t$this->makeHeader();\n\tprint $this->header;\n}", "protected function dumpHeader() {}", "function set_header( $header, $value ) {\n\t\t$this->headers[ $header ] = $value;\n\t}", "private function setHeaders()\r\n\t\t{\r\n\t\t\theader(\"HTTP/1.1 \".$this->_iCode.\" \".$this->getStatusMessage());\r\n\t\t\theader(\"Content-Type:\".$this->_sContentType);\r\n\t\t}", "protected function authHeaderResponse()\n {\n // send the refreshed token back to the client\n //$response->headers->set('Authorization', 'Bearer '.$this->auth->refresh());\n }", "function setHeaderAndPrint($name, $value) {\n $this->setHeader($name,$value);\n header(\"$name: $value\");\n }", "public function sendHttpHeaders() {}", "private function sendHeaders() {\n\t\tif (!headers_sent()) {\n\t\t\tif (isset($this->status)) {\n\t\t\t\theader(\"HTTP/1.1 {$this->status}\");\n\t\t\t}\n\t\t\tforeach($this->headers as $type => $value) {\n\t\t\t\theader($type . ': ' . $value);\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new Exception(\"Unexpected output sent\");\n\t\t}\n\t}", "public function header(string $name, string $value): IHttpHandler;", "function writeHeader($uri)\n {\n //print \"writeHeader Start. \\n\";\n //print \"++++++++++++++++++++++++++++++++++++URI is \".$uri.\"\\n\";\n\n if(isset($uri) && $uri !== \"\")\n $this->_dtd = $this->_dtdManager->getInstanceURI($uri);\n else\n $this->_dtd = $this->_dtdManager->getInstance($this->_doctype);\n \n if (!$this->_dtd) {\n // TODO: proper error handling\n die('Unable to find dtd for ' . $uri);\n }\n $dpiString = $this->_dtd->getDPI();\n //print \"dpiString is \".$dpiString.\"\\n\";\n\n // Set Version Number from Section 5.4\n // version = u_int8\n // currently 1, 2 or 3\n $this->writeVersionNumber($this->_wbxmlVersion);\n\n // Set Document Public Idetifier from Section 5.5\n // publicid = mb_u_int32 | ( zero index )\n // zero = u_int8\n // containing the value zero (0)\n // The actual DPI is determined after the String Table is read.\n $this->writeDocumentPublicIdentifier($dpiString, $this->_strings);\n\n // Set Charset from 5.6\n // charset = mb_u_int32\n $this->writeCharset($this->_charset);\n\n // Set String Table from 5.7\n // strb1 = length *byte\n $this->writeStringTable($this->_strings, $this->_charset, $this->_stringTable);\n\n $this->_currentURI = $uri;\n\n $this->_hasWrittenHeader = true;\n }", "function set_header( $header_name, $value ) {\n\t\tif ($value != '') {\n\t\t\t$header_name = $this->_format_header_name( $header_name );\n\t\t\t$this->_headers[$header_name] = $value;\n\t\t}\n\t}", "function printHeader() {\n\n\t$this->makeHeader();\n\n\tprint $this->header;\n\n}", "function build_header()\r\n\t{\r\n\t\tif ($this->method == 'POST')\r\n\t\t{\r\n\t\t\t$header = \"POST \".$this->path.\" HTTP/1.0\\r\\n\";\r\n\t\t\t$header .= \"Host: \".$this->host.\"\\r\\n\";\r\n\t\t\t$header .= \"Content-type: application/x-www-form-urlencoded\\r\\n\";\r\n\t\t\t$header .= \"Content-length: \".strlen($this->data).\"\\r\\n\\r\\n\";\r\n\t\t\t$header .= $this->data;\r\n\t\t}\r\n\t\telseif ($this->method == 'GET')\r\n\t\t{\r\n\t\t\tif (strlen($this->path.$this->data) > 2048)\r\n\t\t\t\tCertissimLogger::insertLog(__METHOD__.\" : \".__LINE__, \"Maximum length in get method reached(\".strlen($this->path.$this->data).\")\");\r\n\t\t\t$header = \"GET \".$this->path.'?'.$this->data.\" HTTP/1.1\\r\\n\";\r\n\t\t\t$header .= \"Host: \".$this->host.\"\\r\\n\";\r\n\t\t\t$header .= \"Connection: close\\r\\n\\r\\n\";\r\n\t\t}\r\n\r\n\t\treturn ($header);\r\n\t}", "function addHeader($headerName, $headerValue) {\n $this->requestHeaders[$headerName] = $headerValue;\n }", "public function setHeader($header, $value);", "protected abstract function GenerateSoapHeader();", "public function setHeader($name, $value)\n { \n $this->_headers[$name] = $value;\n }", "function setHeader($name, $value) {\n\n\t\t\t$this->headers[$name] = $value;\n\t\t}", "public function header($header, $value){\n $this->headers[$header] = $value;\n }", "function enc_write_header($path,$header,$data){\n\t\tif($fp=@fopen($path,'wb')){\n\t\t\tfwrite($fp,CRYPTO_HEADER);\n\t\t\tenc_write_prefixed_bytes($fp,$header['mode'],2);\n\t\t\tenc_write_prefixed_bytes($fp,$header['iv'],2);\n\t\t\tenc_write_prefixed_bytes($fp,$header['salt'],2);\n\t\t\tenc_write_prefixed_bytes($fp,$header['hmac'],2);\n\t\t\tenc_write_int($fp,$header['rounds'],4);\n\t\t\tenc_write_prefixed_bytes($fp,$data,8);\n\t\t\tenc_write_prefixed_bytes($fp,$header['tag'],2);\n\t\t\tfclose($fp);\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn 'Unable to open ' . $path;\n\t}", "function setHeader($name, $value) {\n $this->header[$name] = $value;\n }", "static function setHeader($header, $value) {\n header($header . ': ' . $value);\n }", "public function write()\n\t{\n\t\tif (/*!$this->_modified || */headers_sent()) return;\n\t\t\n\t\t$cookie = '';\n\t\t\n\t\t/* Serialize cookie content */\n\t\tif (isset($this->_content['checksum'])) unset($this->_content['checksum']);\n\t\tforeach($this->_content as $key => $value)\n\t\t\t$cookie .= $key . '|' . $value . '¤';\n\t\t\t\n\t\t\t/* Add checksum to cookie */\n\t\t$cookie .= 'checksum|' . crc32($this->_iv . $cookie);\n\t\t$this->_modified = false;\n\t\t/* Cookies are encrypted for evident security reasons */\n\t\treturn $this->_setcookie($cookie);\n\t}", "public function fsockopen_header(&$out)\n {\n }", "public function fsockopen_header(&$out)\n {\n }", "public function sendHeaders(){\n if(headers_sent())\n die(\"Response::send() - Headers already sent!\");\n if(!empty($this->headers)){\n foreach($this->headers as $h => $v)\n header($h.\": \".$v);\n }\n }", "protected function httpHead() {\n\n $node = $this->tree->getNodeForPath($this->getRequestUri());\n\n /* This information is only collection for File objects.\n * Ideally we want to throw 405 Method Not Allowed for every \n * non-file, but MS Office does not like this\n */\n if ($node instanceof Sabre_DAV_IFile) { \n if ($size = $node->getSize())\n $this->httpResponse->setHeader('Content-Length',$size);\n\n if ($etag = $node->getETag()) {\n\n $this->httpResponse->setHeader('ETag',$etag);\n\n }\n\n if (!$contentType = $node->getContentType())\n $contentType = 'application/octet-stream';\n\n $this->httpResponse->setHeader('Content-Type', $contentType);\n if ($lastMod = $node->getLastModified()) {\n $this->httpResponse->setHeader('Last-Modified', date(DateTime::RFC1123, $node->getLastModified()));\n }\n }\n $this->httpResponse->sendStatus(200);\n\n }", "public function outputHeaders()\n {\n http_response_code($this->router->getResponse()->getHttpCode());\n if ($this->router->getResponse()->hasHeaders()) {\n foreach ($this->router->getResponse()->getHeaders() as $header) {\n header($header);\n }\n }\n }", "public function addRequestHeader(string $name, string $value): void\n {\n $this->headers[$name] = $value;\n }", "public function send_headers()\n\t{\n\t\t// Get the status message\n\t\t$message = Request::$messages[$this->status];\n\n\t\t// Send the HTTP status message\n\t\theader(\"HTTP/{$this->version} {$this->status} {$message}\", TRUE, $this->status);\n\n\t\tforeach ($this->headers as $name => $value)\n\t\t{\n\t\t\tif (is_string($name))\n\t\t\t{\n\t\t\t\t// Convert the header name to Title-Case, to match RFC spec\n\t\t\t\t$name = str_replace('-', ' ', $name);\n\t\t\t\t$name = str_replace(' ', '-', ucwords($name));\n\n\t\t\t\t// Combine the name and value to make a raw header\n\t\t\t\t$value = \"{$name}: {$value}\";\n\t\t\t}\n\n\t\t\t// Send the raw header\n\t\t\theader($value, TRUE);\n\t\t}\n\n\t\treturn $this;\n\t}", "protected function _setHeader()\n {\n if(!$this->header) return null;\n\n $closable = '';\n if($this->_options['closable'] == true) {\n $closable = $this->_template['closable'];\n }\n\n $this->_contents[] = $this->_stringTemplate->format('header', [\n 'header' => $this->header, \n 'closable' => $closable\n ]);\n }" ]
[ "0.7249485", "0.6780699", "0.66657364", "0.6588757", "0.656488", "0.6455813", "0.6394778", "0.6345911", "0.63082516", "0.62714016", "0.6242281", "0.6216791", "0.62111366", "0.6166824", "0.61602956", "0.61325747", "0.6123313", "0.61144394", "0.6088397", "0.60840446", "0.6082481", "0.60742193", "0.6067721", "0.6054119", "0.604472", "0.6030019", "0.6030019", "0.6003791", "0.5973082", "0.5959654", "0.5951643", "0.59098077", "0.59058034", "0.58985835", "0.5898059", "0.5896145", "0.5888225", "0.58690923", "0.5866085", "0.5864524", "0.5857573", "0.5851652", "0.5843135", "0.5833837", "0.58235645", "0.5820589", "0.5803805", "0.5797929", "0.57754666", "0.5750748", "0.5745412", "0.5739244", "0.5733664", "0.5727829", "0.57257944", "0.57088065", "0.56959355", "0.5695255", "0.569126", "0.5684485", "0.56778586", "0.5674337", "0.56726223", "0.5665725", "0.5663127", "0.566031", "0.56577283", "0.56539863", "0.56505513", "0.5642822", "0.563311", "0.5619341", "0.561389", "0.56089896", "0.56056494", "0.56047285", "0.5604709", "0.5602911", "0.56027573", "0.5602743", "0.55935967", "0.55923223", "0.55879575", "0.55863434", "0.55858415", "0.5585763", "0.5571652", "0.55671513", "0.55652004", "0.5554866", "0.5546617", "0.5543867", "0.55438226", "0.55438226", "0.55339384", "0.5530509", "0.55272514", "0.5524455", "0.55183333", "0.55055934" ]
0.73476934
0
Read the response header.
Прочитайте заголовок ответа.
protected function readHeader() { $status = $this->readByte(); $sessionId = $this->readInt(); if ($status === 1) { $this->readByte(); // discard the first byte of the error $error = $this->readError(); throw $error; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function readHeader()\n {\n $this->header = $this->read( $this->size );\n return $this->header;\n }", "public function getResponseHeader()\n {\n return $this->responseHeader;\n }", "public function responseHeader() {\n\treturn $this->responseHeader;\n }", "function GetHeader() {\n return ($this->ses['response']['header']);\n }", "protected function readHeader()\n {\n $this->readBytes(6); // GIF89a or GIF87a\n }", "public function getResponseHeader() {\r\n return $this->_output->getResponseHeader();\r\n }", "public function getHeader(){\n print_r($this->webresource->getHeader());\n }", "public function getRawHeader();", "public function getresponseheader($header = false)\n {\n $headers = $this->getLastResponseHeaders();\n foreach ($headers as $head) {\n if (is_integer(strpos($head, $header))) {\n $hstart = strpos($head, ': ');\n $head = trim(substr($head, $hstart + 2, 100));\n\n return $head;\n }\n }\n }", "public function readHeader() {\n $this->dbaseVersionId = $this->readWord();\n\n $year = $this->readWord() + 1900;\n $month = $this->readWord();\n $day = $this->readWord();\n $this->lastModified = mktime(0, 0, 0, $year, $month, $day);\n\n $this->numRecords = $this->readWord(4, true);\n $this->headerLength = $this->readWord(2, true);\n $this->recordLength = $this->readWord(2, true);\n\n $this->skipTo(32);\n\n while ($this->readChar() != \"\\x0d\") {\n $this->undoRead();\n $this->readFieldHeader();\n }\n }", "protected abstract function getHeader();", "private function getHeader() {\n\t\treturn $this->header;\n\t}", "public function getHeader();", "public function getHeader();", "public function getHeader();", "public function getHeader() {\n return $this->$_header;\n }", "public function getHeader ()\n {\n if (!isset($this->_header)) {\n // read headers from PHP http://php.net/manual/en/function.getallheaders.php\n $this->_header = getallheaders();\n }\n\n return $this->_header;\n }", "public function getHeader ()\n {\n return $this->header;\n }", "public function getHeader()\r\n {\r\n return $this->header;\r\n }", "public function getHeader()\r\n {\r\n return $this->header;\r\n }", "public function getHeader()\r\n {\r\n return $this->header;\r\n }", "public function getHeader()\n {\n return $this->header;\n }", "public function getHeader()\n {\n return $this->header;\n }", "public function getHeader()\n {\n return $this->header;\n }", "public function getHeader()\n {\n return $this->header;\n }", "public function getHeader()\n {\n return $this->header;\n }", "public function getHeader()\n {\n return $this->header;\n }", "public function getHeader()\n {\n return $this->_header;\n }", "public function getHeader()\n {\n return $this->_header;\n }", "abstract public function getResponseHeader($header);", "public function getResponseHeader($header);", "public function get_header()\n {\n return $this->header;\n }", "function getHeader($headername) {\n return $this->responseHeaders[$headername];\n }", "public function raw_header ()\n {\n return $this->raw_header;\n }", "function getHeader() {\n\treturn $this->header;\n}", "public function get_header() {\n\t\treturn $this->header;\n\t}", "public function getRawHeader() {\n return $this->header;\n }", "function getHeader() { \n return $this->header;\n }", "public function getHeader() {\n return json_decode($this->header, true);\n }", "public function getResponseHeader($name)\n {\n return !$this->response ? false : $this->getHeaderAsLines($this->response['header']['headers'], $name);\n }", "public static function getHeader($name){\n\t\tif(isset(self::$_responseHeaders[$name])){\n\t\t\treturn self::$_responseHeaders[$name];\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public function getHeader($key)\n {\n return $this->getResponse()->getHeader($key);\n }", "abstract public function getHeader($name);", "function getHeader() {\n\n\treturn $this->header;\n\n}", "public function getHeader($name);", "public function getHeader($name);", "public function getHeader(): string\n {\n return $this->header;\n\n }", "public function getHeader(): string\n {\n return $this->header;\n }", "public function header() {\n\t\t\treturn $this->header;\n\t\t}", "protected function getResponseHeader($header)\n {\n /** @var Response $response */\n $response = $this->controller->getResponse();\n $headers = $response->getHeaders();\n $responseHeader = $headers->get($header, false);\n return $responseHeader;\n }", "public function getHeader(string $name);", "public function getResponseHeader($name) {\n if (!empty($this->headers[$name])) {\n return $this->headers[$name];\n }\n return FALSE;\n }", "public function get_header($key)\n {\n }", "public static function getHeader(Response $response, $name)\n {\n $headers = $response->getHeader($name);\n\n return array_shift($headers);\n }", "public function getResponseHeaders()\n {\n return !$this->response ? false : $this->getHeadersAsLines($this->response['header']['headers']);\n }", "public function getHeader($name)\n {\n if (isset($this->headers[$name]) === false) {\n throw new HttpException(\"Response header '$name' not found\");\n }\n return $this->headers[$name];\n }", "function header($key) {\n\t\tif ($this->hasHeader($key)) {\n\t\t\treturn $this->headers[$key];\n\t\t}\n\t}", "public function getFullHeader()\n {\n }", "public function getResponseHeaders() {\n\t\tif ($this->error) {\n\t\t\tthrow new CurlException('Failed getting the response headers for a failed cURL request.');\n\t\t}\n\t\treturn (string)substr($this->response, 0, $this->info['header_size']);\n\t}", "public function testGetHeader() {\n $parser = new Parser();\n $response = new Response();\n\n $parser->response($response);\n\n $parts = [\n join([self::$_message['request_line'], self::$_message['header']], ''),\n self::$_message['body'],\n ];\n\n foreach ($parts as $part) {\n $parser->addData($part);\n }\n\n $this->assertEquals(25, $parser->getHeader('Content-Length'));\n $this->assertEquals(25, $parser->getHeader('content-length'));\n $this->assertEquals(null, $parser->getHeader('undefined'));\n }", "public function get_headers();", "public function parseHeader()\n {\n //$header = explode(\"\\r\\n\", rtrim($this->response['headerRaw'], \"\\r\\n\"));\n \n $rawHeaders = rtrim($this->response['headerRaw'], \"\\r\\n\");\n # Handle multiple responses e.g. with redirections (proxies too)\n $headerGroups = explode(\"\\r\\n\\r\\n\", $rawHeaders);\n # We're only interested in the last one\n $header = explode(\"\\r\\n\", end($headerGroups));\n\n $output = array();\n\n if ('HTTP' === substr($header[0], 0, 4)) {\n list($output['version'], $output['status']) = explode(' ', $header[0]);\n unset($header[0]);\n }\n\n foreach ($header as $entry) {\n $pos = strpos($entry, ':');\n $output[trim(substr($entry, 0, $pos))] = trim(substr($entry, $pos + 1));\n }\n\n $this->response['header'] = $output;\n return $this;\n }", "public function readHeader()\n {\n $name = $this->_inputStream->readUTF();\n $mustRead = (bool)$this->_inputStream->readByte();\n $length = $this->_inputStream->readLong();\n\n try {\n $data = $this->_deserializer->readTypeMarker();\n } catch (Exception $e) {\n require_once SHLIB_PATH_TO_ZEND . 'Zendshl/Amf/Exception.php';\n throw new Zendshl_Amf_Exception('Unable to parse ' . $name . ' header data: ' . $e->getMessage() . ' '. $e->getLine(), 0, $e);\n }\n\n $header = new Zendshl_Amf_Value_MessageHeader($name, $mustRead, $data, $length);\n return $header;\n }", "public function getHeader()\n {\n $this->run();\n\n return $this->getDefinition()->getHeader();\n }", "public function getHeader($header) {\r\n if($this->rawResponse->hasHeader($header)) {\r\n return $this->rawResponse->getHeader($header);\r\n }\r\n\r\n return false;\r\n }", "function get_header() {\n $retval = \"\";\n foreach($this->headers as $key => $value)\n $retval .= \"$key: $value\\n\";\n return $retval;\n }", "public function getHeader()\n {\n return isset($this->header) ? $this->header : '';\n }", "public function getHeaders() {}", "function getHeaders() {\n return $this->responseHeaders;\n }", "function getHeader($name) {\n\n\t\t\treturn isset( $this->headers[$name] ) ? $this->headers[$name] : null;\n\t\t}", "public function getHeader($name)\n {\n if (isset($this->headers[$name = $this->normalizeHeaderNames($name)]) === false) {\n throw new HttpException(\"Response header '$name' not found\");\n }\n return $this->headers[$name];\n }", "public function getHTTPHeaders();", "public function getHeader(): string\n {\n return Helpers::decode($this->header);\n }", "public static function getResponseHeader($key = 'Content-Type')\n {\n $value = null;\n $headers = \\headers_list();\n foreach ($headers as $header) {\n if (\\preg_match('/^'.$key.':\\s*([^;]*)/i', $header, $matches)) {\n $value = $matches[1];\n break;\n }\n }\n return $value;\n }", "public function getHeader($key)\n {\n return $this->headers[$key];\n }", "public function getActualHeaders();", "public function read()\n {\n return $this->response;\n }", "public function get_header(string $key) {\n\t\treturn $this->header_data[$key];\n\t}", "protected function getHeader($key)\n {\n return $this->request->getHeader($key);\n }", "private function extractHeadersFromResponse() {\n $response = \"\";\n $code = $this->response->getStatusCode();\n $text = HttpUtil::getResponseTextForCode($code);\n $response .= sprintf(self::STATUS_LINE_FORMAT, $code, $text);\n\n foreach($this->response->getHeaderList() as $header) {\n $response .= sprintf(\"%s: %s%s\",\n $header->getKey(),\n $header->getValue(),\n self::CRLF);\n }\n $response .= self::CRLF;\n return $response;\n }", "function getHeader();", "public function getHeader($name)\n {\n }", "public function getHeader($name)\n {\n }", "public function read() {\n\t\tif (!is_resource($this->_resource)) {\n\t\t\treturn false;\n\t\t}\n\t\t$meta = stream_get_meta_data($this->_resource);\n\t\tif (isset($meta['wrapper_data'])) {\n\t\t\t$headers = join(\"\\r\\n\", $meta['wrapper_data']) . \"\\r\\n\\r\\n\";\n\t\t} else {\n\t\t\t$headers = null;\n\t\t}\n\t\treturn $headers . stream_get_contents($this->_resource);\n\t}", "public function getResponseHeaders() {\n return $this->headers;\n }", "public function get_headers()\n {\n }", "public function api_get_header($response, $header) {\n\n\t\t\tif(\n\t\t\t\t!isset($response['headers']) ||\n\t\t\t\t!isset($response['headers'][$header])\n\n\t\t\t) { return false; }\n\n\t\t\treturn $response['headers'][$header];\n\t\t}", "public function get_headers()\n {\n }", "public function get_headers()\n {\n }", "public function getResponseHeader($header)\n\t{\n\t\tforeach ($this->response_headers as $response_header) {\n\t\t\t$length = strlen($header) + 2;\n\t\t\tif (substr($response_header, 0, $length) === ($header . ': ')) {\n\t\t\t\treturn substr($response_header, $length);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public function getHeaderValue()\n {\n }", "public function getHeaders()\n\t{\n\t}", "public function getHeader($key)\n {\n if (array_key_exists($key, $this->headers)) {\n return $this->headers[$key];\n }\n }", "public function GetHeader()\n {\n return $this->HeaderName;\n }", "private function extract_header($response_body){\r\n\t\t\treturn RaspHttpHeader::create(array('source' => $response_body))->to_a();\r\n\t\t}", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();" ]
[ "0.77833456", "0.74584883", "0.7372721", "0.7298585", "0.7278145", "0.7203295", "0.71728957", "0.7106328", "0.7073409", "0.70173526", "0.7015196", "0.6996511", "0.6963787", "0.6963787", "0.6963787", "0.6955809", "0.6950344", "0.6931854", "0.6902961", "0.6902961", "0.6902961", "0.6858942", "0.6858942", "0.6858942", "0.6858942", "0.6858942", "0.6858942", "0.6837698", "0.6837698", "0.6826288", "0.6824044", "0.6821366", "0.6808667", "0.6792335", "0.67492473", "0.67459065", "0.6682195", "0.66809565", "0.6659156", "0.662372", "0.6614742", "0.6613706", "0.6608194", "0.65991104", "0.6590493", "0.6590493", "0.65903574", "0.65879256", "0.6582283", "0.65714276", "0.6569514", "0.65602946", "0.6539725", "0.65396047", "0.65303385", "0.65139353", "0.649867", "0.64799064", "0.647726", "0.647481", "0.64685595", "0.6462982", "0.6452667", "0.6449008", "0.64316225", "0.64272434", "0.6414794", "0.6402735", "0.64002734", "0.6397134", "0.6381227", "0.63589674", "0.63272953", "0.6305917", "0.62927175", "0.62804735", "0.6279578", "0.627876", "0.627366", "0.6273188", "0.62707967", "0.62581336", "0.62581336", "0.6254236", "0.625234", "0.62480175", "0.6246106", "0.6245993", "0.6245993", "0.62424845", "0.623298", "0.62260026", "0.62240565", "0.62211376", "0.6217475", "0.6217117", "0.6217117", "0.6217117", "0.6217117", "0.6217117" ]
0.7470275
1
Write a byte to the socket.
Запишите байт в сокет.
protected function writeByte($value) { $this->socket->write(Binary::packByte($value)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function writeByte($byte);", "public function writeByte($byte)\n {\n return fwrite($this->handle, $byte, 1);\n }", "abstract public function writeByte($b);", "public abstract function writeByte($b);", "public function writeByte($byte)\n {\n // We do not need to check if file position points to the end of \"file\".\n // Only append operation is supported now\n\n $this->_data .= chr($byte);\n $this->_position = strlen($this->_data);\n\n return 1;\n }", "protected function writeChar($value)\n {\n $this->socket->write(Binary::packByte(ord($value)));\n }", "public function byte($byte)\n {\n $this->buffer .= bin2hex(pack('C', $byte));\n }", "function writeByte(){\r\n\t\tdie('Not implemented');\r\n\t}", "protected function writeBytes($value)\n {\n $this->socket->write(Binary::packBytes($value));\n }", "public function write($data)\n {\n return fwrite($this->socket, $data);\n }", "public function write($socket, $data)\n {\n }", "function socket_write(Socket $socket, string $data, ?int $length = null): int|false {}", "public function write($bytes)\n {\n return fwrite($this->handle, $bytes, strlen($bytes));\n }", "public function send($data) {\n $len = strlen($data);\n if ($this->v) l('Sending '.$len.' byte(s): '.$data);\n $sent = socket_write($this->sock, $data, $len);\n return ($sent === $len);\n }", "abstract protected function writeBytes($bytes);", "function socket_send(Socket $socket, string $data, int $length, int $flags): int|false {}", "public function writeRawByte($value) {\n if ($this->position == $this->limit) {\n $this->refreshBuffer();\n }\n $value &= 0xff;\n $this->buffer[$this->position++] = ($value > 127 ? $value - 256 : $value);\n }", "protected function writeInt($value)\n {\n $this->socket->write(Binary::packInt($value));\n }", "protected function _write($socket, $request)\n {\n fwrite($socket, $request);\n }", "public function write($buf) {\n $written = 0;\n $length = TStringFuncFactory::create()->strlen($buf);\n\n while($written < $length) {\n $fwrite = @socket_write($this->_handle, TStringFuncFactory::create()->substr($buf, $written));\n\n if($fwrite === false) {\n $this->error(self::class . ': Failed to write buffer to ' . $this->getDomain());\n }\n\n $written += $fwrite;\n }\n }", "public function writeByte($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "private function write( $str ) {\n fwrite( $this->socket, $str . \"\\n\" );\n }", "public function write($buf);", "public function writeBytes($bytes) {\n\t\t$len = strlen($bytes);\n\t\tfor($i = 0; $i < $len; $i++)\n\t\t\t$this->writeByte(ord($bytes[$i]));\n\t}", "public function writeByte(Stream $stream, $value)\n {\n $stream->write(chr($value), 1);\n }", "public function write( $data )\n\t{\n\t\t$this->_buffer .= $data;\n\t}", "function writeBytes(){\r\n\t\tdie('Not implemented');\r\n\t}", "protected function writeString($value)\n {\n $this->socket->write(Binary::packString($value));\n }", "public function write($str, $off = 0, $len = -1);", "function dio_write($fd, string $data, int $len = 0) {}", "public function write($data)\n {\n if (!fwrite($this->fp, $data)) {\n throw new SocketException(\"socket write:{$data} error\");\n }\n return true;\n }", "function socket_sendto(Socket $socket, string $data, int $length, int $flags, string $address, ?int $port = null): int|false {}", "public function sendToSocket($socket, $message){ \n $this->sendReturn = @socket_write($socket, $message, strlen($message) ); \n if($this->sendReturn === false){\n return false;\n }else{\n return true;\n }\n }", "public function write ( $chunk )\n {\n if( $this->write_finished )\n {\n throw new SocketInvalidOperationException( \"Can not write, reading has started.\" );\n }\n\n if( ! $this->write_started )\n {\n fwrite( $this->socket, \"\\r\\n\" ); // Start message body\n $this->write_started = true;\n }\n\n fwrite( $this->socket, sprintf( \"%x\\r\\n\", strlen( $chunk ) ) );\n fwrite( $this->socket, $chunk . \"\\r\\n\" );\n fflush( $this->socket );\n }", "public function send($message)\r\n {\r\n if (!$this->isConnected()) {\r\n return false;\r\n }\r\n\r\n return socket_write($this->socket, $message . \"\\n\");\r\n }", "public function send_buffer(){\n\n $this->_log(\"Buf has \".count($this->_buf).\" items\");\n\n $string = implode(\"\\n\",$this->_buf);\n\n $this->_log('Sending string length: '.strlen($string));\n $len = socket_write($this->_socket,$string,strlen($string));\n //echo \"$len bytes written to socket\\n\";\n $this->_log(\"$len bytes written to socket\");\n\n }", "abstract public function write($buffer);", "protected function write($message)\n {\n $this->assertConnected();\n\n $bytesToSend = strlen($message);\n $numZeroByteWritesLeft = self::ZERO_BYTE_WRITES_ALLOWED;\n\n do {\n $sent = fwrite($this->socket, $message);\n if ($sent === false) {\n throw new RuntimeException('Error writing to socket.');\n }\n\n if ($sent === 0) {\n // according to its documentation's comments, fwrite returns 0 instead of false on\n // many errors, such as connection loss.\n $numZeroByteWritesLeft--;\n if ($numZeroByteWritesLeft < 0) {\n throw new RuntimeException(\n sprintf('Error writing to socket: maximum zero byte writes (%s) exceeded', self::ZERO_BYTE_WRITES_ALLOWED)\n );\n }\n }\n\n $message = substr($message, $sent);\n\n $bytesToSend -= $sent;\n } while ($bytesToSend > 0);\n\n return $this;\n }", "public function Send( $msg ) {\n \n _log( \"$msg\", \"->\" );\n $rc = @socket_write( $this->socket, $msg.\"\\r\\n\" );\n if ($rc === false) {\n slog( \"Failed to write; \". socket_strerror( socket_last_error( $this->socket ) ) );\n $this->Close();\n }\n\n }", "function client_write(StreamSocketInterface $socket, string $response = null) \n\t{\n\t\treturn \\write_socket($socket, $response);\n\t}", "protected function writeShort($value)\n {\n $this->socket->write(Binary::packShort($value));\n }", "public function write(string $message): bool\n {\n if($this->debug === true) { echo \"\\nsending message : $message \\n\"; }\n return fwrite($this->socket, $message, \\strlen($message));\n }", "function mapi_write($socket=NULL, $msg) {\n\t\t// print \"Msg_len: \" . strlen($msg) . \"\\n\";\n\t\tglobal $last_error;\n\n\t\t$fb = 0;\n\t\t$sb = 0;\n\n\t\t$pos = 0;\n\t\t$data = \"\";\n\n\t\t$buf = 0;\n\n\t\t$is_final = FALSE;\n\t\twhile (! $is_final) {\n\t\t\t$data = substr($msg, $pos, min(MAX_PACKET_SIZE, strlen($msg) - $pos));\n\t\t\t$pos += strlen($data);\n\n\t\t\t$end = 0; // more packets will follow\n\t\t\tif ((strlen($msg) - $pos) == 0) {\n\t\t\t\t$is_final = TRUE;\n\t\t\t\t$end = 1;\n\t\t\t}\n\n\t\t\t$fb = (strlen($data) << 1) | $end;\n\n\t\t\t/**\n\t\t\t * socket_write() does not guarantee all data\n\t\t\t * to be transmitted. Make sure that the\n\t\t\t * buffer is flushed.\n\t\t\t */\n\n\t\t\tif (($buf = socket_flush($socket, pack(\"v\", $fb) . $data)) == FALSE) {\n\t\t\t\t$last_error = socket_strerror(socket_last_error());\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t}\n\t\treturn $buf;\n\t}", "public function sendto($ip, $port, $send_data, $server_socket = null) {}", "protected function _writeDataToSocket($socket, $string)\n\t{\n\t\treturn fwrite($socket, $string);\n\t}", "private function sendMessage($bytes)\n {\n if ($this->useChecksum) {\n $checksum = array_sum($bytes) & 0xFF;\n $bytes[] = $checksum;\n }\n\n $this->socket->sendMessage($bytes);\n }", "public function send($buffer, $flags = 0, $length = null)\n {\n if (null === $length) {\n $length = strlen($buffer);\n }\n\n // make sure everything is written\n do {\n $return = @socket_send($this->resource, $buffer, $length, $flags);\n\n if (false !== $return && $return < $length) {\n $buffer = substr($buffer, $return);\n $length -= $return;\n\n } else {\n break;\n }\n } while (true);\n\n if ($return === false) {\n throw new SocketException($this->resource);\n }\n\n return $return;\n }", "private function _write($msg)\n {\n $this->_connect('write');\n if ($result = fwrite($this->_conn['write'], $msg)) {\n if ($this->_role != 'server') {\n try {\n $this->_sendSignal($this->_pid);\n } catch (\\Exception $e) {\n self::$_log->warn($e->getMessage());\n }\n }\n $this->_disconnect('write');\n } else {\n $this->_disconnect('write');\n throw new \\Seraphp\\Exceptions\\IOException(\n 'Cannot write FIFO: '.$this->_fifo\n );\n }\n return $result;\n }", "function write_socket(StreamSocketInterface $socket, string $response = null)\n\t{\n\t\treturn $socket->write($response);\n\t}", "public static function socket_write_all($socket, string $data): void\n {\n if (!($dlen = strlen($data))) {\n return;\n }\n do {\n assert($dlen > 0);\n assert(strlen($data) === $dlen);\n $sent_now = socket_write($socket, $data);\n if (false === $sent_now) {\n $err = socket_last_error($socket);\n throw new \\RuntimeException(\"socket_write() failed! {$err}: \" . socket_strerror($err));\n }\n if (0 === $sent_now) {\n // we'll try *1* last time before throwing exception...\n $sent_now = socket_write($socket, $data);\n if (false === $sent_now) {\n $err = socket_last_error($socket);\n throw new \\RuntimeException(\"socket_write() failed after first returning zero! {$err}: \" . socket_strerror($err));\n }\n if (0 === $sent_now) {\n // something is very wrong but it's not registering as an error at the kernel apis...\n throw new \\RuntimeException(\"socket_write() keeps returning 0 bytes sent while {$dlen} byte(s) to send!\");\n }\n }\n $dlen -= $sent_now;\n $data = substr($data, $sent_now);\n } while ($dlen > 0);\n assert($dlen === 0);\n assert(strlen($data) === 0);\n // all data sent.\n return;\n }", "public function write($value)\n {\n $this->buffer .= $value;\n }", "public function stream_write($data) {\r\n\t\t// buffer the data\r\n\t\t$this->_buffer .= $data;\r\n\t\treturn strlen($data);\r\n }", "public function write($buf)\n {\n if (!$this->isOpen()) {\n throw new TTransportException('ClientTransport not open.', TTransportException::NOT_OPEN);\n }\n $this->client->send($buf);\n }", "private function appendBinaryData($byte)\n {\n $this->currentContext->buffer .= pack('C', $byte);\n\n if (strlen($this->currentContext->buffer) < $this->currentContext->expectedSize) {\n return false;\n }\n\n return true;\n }", "public function write($data) {\n\n return event_buffer_write($this->resource, $data);\n\n }", "public function write(string $buffer) : void;", "public function addByte($x)\n {\n $this->prep(1, 0);\n $this->putByte($x);\n }", "public function write($msg);", "function send_data($f, $string) {\n// $send = '';\n// for ($i = 0; $i < strlen($string); $i++) {\n// $send .= ord($string[$i]) . ' ';\n// }\n// $length = strlen($string);\n// echo \"< $send\\r\\n$length\\r\\n\";\n\n $bytes = fwrite($f, $string);\n// echo PHP_EOL . \"sended $bytes\" .PHP_EOL;\n}", "public function send(string $zpl)\r\n {\r\n if (false === @socket_write($this->socket, $zpl)) {\r\n $error = $this->getLastError();\r\n throw new CommunicationException($error['message'], $error['code']);\r\n }\r\n }", "public function write($data)\n {\n if (fwrite($this->_stream, $data . \"\\r\\n\") === false) {\n throw new Horde_Imap_Client_Exception(\n Horde_Imap_Client_Translation::t(\"Server write error.\"),\n Horde_Imap_Client_Exception::SERVER_WRITEERROR\n );\n }\n\n $this->_debug->client($data);\n }", "protected function _write( $string ) { $this->_buffer .= $string; }", "public function stream_write($data);", "function socket_flush($socket, $data) {\n\t\t$buf = 0;\n\t\t$bytes = strlen($data);\n\n\t\tif ($socket == NULL) {\n\t\t\treturn FALSE;\n\t\t}\n\n\t\twhile (($bytes - $buf) > 0) {\n\t\t\t$buf += socket_write($socket, substr($data, $buf, $bytes), $bytes - $buf);\n\t\t\t//print \"Buf: \" . $buf . \"\\n\";\n\n\t\t\tif ($buf == FALSE) {\n\t\t\t\treturn FALSE;\n\t\t\t}\n\n\t\t}\n\t\treturn $buf;\n\t}", "final protected function _bitWrite($str, $len)\n {\n // $carrier is the sequence of bits, in a string\n $this->_ocarrier .= $str;\n $this->_ocarlen += $len;\n \n while ($this->_ocarlen >= 8)\n {\n $this->_odata .= chr(bindec(substr($this->_ocarrier, 0, 8)));\n $this->_ocarrier = substr($this->_ocarrier, 8);\n $this->_ocarlen -= 8;\n }\n }", "public function writeBytes($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function onConnect(Connection $connection)\n {\n//\n// $byteBuf->writeInt(90);\n// $byteBuf->writeInt(90);\n// $byteBuf->writeInt(90);\n// $byteBuf->writeInt(90);\n// $byteBuf->writeInt(90);\n// $byteBuf->writeInt(90);\n// $byteBuf->writeInt(1);\n// $byteBuf->writeInt(0);\n//\n// $connection->write($byteBuf);\n }", "function writeUByte($val)\n {\n array_push($this->rtn,$val);\n }", "public function write($chunk) {\n $this->buffer.= $chunk;\n if (strlen($this->buffer) > self::BUFFER_SIZE) {\n $this->target->write(dechex(strlen($this->buffer)).\"\\r\\n\".$this->buffer.\"\\r\\n\");\n $this->buffer= '';\n }\n }", "private function replyStatusPacket() {\n fwrite($this->conn, pack(\"N\", 99999997));\n }", "public function stream_write($data) \r\n {\r\n $left = substr($this->_data, 0, $this->_pos);\r\n $right = substr($this->_data, $this->_pos + strlen($data));\r\n $this->_data = $left . $data . $right;\r\n $this->_pos += strlen($data);\r\n return strlen($data);\r\n\r\n return $ret;\r\n }", "private function handleBinaryData($byte)\n {\n if ($this->appendBinaryData($byte)) {\n $this->popStateAndEmitBuffer();\n }\n }", "public function sendBuffer()\n {\n $this->socket->writeRaw($this->buffer);\n unset($this->buffer);\n }", "protected function _write($message) {\n if (!$this->_handle) {\n $this->_handle = $this->_open($this->_config['host'], $this->_config['port'], $this->_config['timeout']);\n if ($this->_handle === false) {\n throw new SocketException('Could not connect to logstash');\n }\n }\n return @fwrite($this->_handle, $message);\n }", "public function send(Socket $socket)\n {\n $socket->write(Str::limit($this->raw, 509).\"\\r\\n\");\n Client::log($this, true);\n }", "function websocket_write($sp, $data,$final=true){\n // Assamble header: FINal 0x80 | Opcode 0x02\n $header=chr(($final?0x80:0) | 0x02); // 0x02 binary\n\n // Mask 0x80 | payload length (0-125) \n if(strlen($data)<126) $header.=chr(0x80 | strlen($data)); \n elseif (strlen($data)<0xFFFF) $header.=chr(0x80 | 126) . pack(\"n\",strlen($data));\n elseif(PHP_INT_SIZE>4) // 64 bit \n $header.=chr(0x80 | 127) . pack(\"Q\",strlen($data));\n else // 32 bit (pack Q dosen't work)\n $header.=chr(0x80 | 127) . pack(\"N\",0) . pack(\"N\",strlen($data));\n\n // Make a random mask\n $mask=pack(\"N\",rand(1,0x7FFFFFFF)); \n $header.=$mask;\n \n // Apply mask to data\n for($i = 0; $i < strlen($data); $i++)\n $data[$i]=chr(ord($data[$i]) ^ ord($mask[$i % 4]));\n \n return fwrite($sp,$header.$data); \n}", "public function writeMessage($message) {\n $binaryLength = strlen($message);\n\n $maxBinaryFrameLength = self::BUFFER_SIZE - 4;\n $socketEndedLength = 0;\n\n $frames = array();\n while ($socketEndedLength < $binaryLength) {\n $notSocketEndedLength = $binaryLength - $socketEndedLength;\n $binaryFrameLength = ($notSocketEndedLength > $maxBinaryFrameLength) ? $maxBinaryFrameLength : $notSocketEndedLength;\n $frames[] = substr($message, $socketEndedLength, $binaryFrameLength);\n $socketEndedLength += $binaryFrameLength;\n }\n\n foreach ($frames as $frame) {\n $msg = pack(\"N\", strlen($frame)) . $frame;\n socket_write($this->socket, $msg, strlen($msg));\n }\n $footer = pack(\"N\", 0);\n //socket_send ($this->socket, $header, strlen($header) , 0);\n socket_write($this->socket, $footer, strlen($footer));\n }", "public function sendOctet(int $number)\n {\n if ($number > 255 || $number < 0) {\n throw new \\InvalidArgumentException(\n 'Number '.$number.' out of valid range of octet value. Valid \n range is 0 - 255.'\n );\n }\n\n $binary = chr($number);\n $this->sendRaw($binary);\n }", "public function writeBytes($data, $num=null)\n {\n // We do not need to check if file position points to the end of \"file\".\n // Only append operation is supported now\n\n if ($num !== null) {\n $this->_data .= substr($data, 0, $num);\n } else {\n $this->_data .= $data;\n }\n\n $this->_position = strlen($this->_data);\n }", "protected function writeLong($value)\n {\n $this->socket->write(Binary::packLong($value));\n }", "public function write(string $buffer): void;", "public function sendData($data)\n {\n return fwrite($this->stream, $data);\n }", "public function stream_write($data){\n $l = strlen($data);\n $this->_stream = substr($this->_stream, 0, $this->_pos) .\n $data .\n substr($this->_stream, $this->_pos += $l);\n\n return $l;\n }", "protected function readByte()\n {\n return Binary::unpackByte($this->socket->read(1));\n }", "public function send($message){ \n if($this->modeOperation === 'server') return false;\n\n $this->sendReturn = @socket_write($this->socketClient, $message, strlen($message) ); \n if($this->sendReturn === false){\n\n if($this->onDisconnectMethod !== null){\n $method = $this->onDisconnectMethod;\n $response = $method((object)array('ip'=>$this->address, 'port'=>$this->port,'socket'=>$this->socketClient),$this); \n }\n \n return false;\n }else{\n return true;\n }\n }", "function send($data){\n\t\tfputs($this->fp, $data.\"\\r\\n\");\n\t}", "protected function send($address, $port, $message)\n {\n socket_sendto($this->socket, $message, strlen($message), 0, $address, $port);\n }", "public function stream_write($data) {\n return fwrite($this->handle, $data);\n }", "public function write ($data);", "public function write($message) {\n\t\tfwrite($this->resource, $message);\n\t}", "public function write($string) \n {\n if ($string !== '') {\n $string = (string)$string . Rediska::EOL;\n\n $this->connect();\n\n\t while ($string !== '') {\n\t $bytes = @fwrite($this->_socket, $string);\n\t\n\t if ($bytes === false) {\n\t $this->disconnect();\n\t throw new Rediska_Connection_Exception(\"Can't write to socket.\");\n\t }\n\t\n\t if ($bytes == 0) {\n\t return true;\n\t }\n\t\n\t $string = substr($string, $bytes);\n\t }\n\n\t return true;\n } else {\n \treturn false;\n }\n }", "private function fwrite($stream, string $bytes)\n {\n if (!strlen($bytes)) {\n return 0;\n }\n $result = @fwrite($stream, $bytes);\n if (0 !== $result) {\n // In cases where some bytes are witten (`$result > 0`) or\n // an error occurs (`$result === false`), the behavior of fwrite() is\n // correct. We can return the value as-is.\n return $result;\n }\n // If we make it here, we performed a 0-length write. Try to distinguish\n // between EAGAIN and EPIPE. To do this, we're going to `stream_select()`\n // the stream, write to it again if PHP claims that it's writable, and\n // consider the pipe broken if the write fails.\n $read = [];\n $write = [$stream];\n $except = [];\n @stream_select($read, $write, $except, 0);\n if (!$write) {\n // The stream isn't writable, so we conclude that it probably really is\n // blocked and the underlying error was EAGAIN. Return 0 to indicate that\n // no data could be written yet.\n return 0;\n }\n // If we make it here, PHP **just** claimed that this stream is writable, so\n // perform a write. If the write also fails, conclude that these failures are\n // EPIPE or some other permanent failure.\n $result = @fwrite($stream, $bytes);\n if (0 !== $result) {\n // The write worked or failed explicitly. This value is fine to return.\n return $result;\n }\n // We performed a 0-length write, were told that the stream was writable, and\n // then immediately performed another 0-length write. Conclude that the pipe\n // is broken and return `false`.\n return false;\n }", "public function write(string $data): void\n {\n $this->deprecated('write() on Connection is deprecated.');\n try {\n $length = strlen($data);\n $written = $this->stream->write($data);\n if ($written < strlen($data)) {\n $this->throwException(new RuntimeException(\"Could only write {$written} out of {$length} bytes.\"));\n }\n $this->logger->debug(\"[connection] Wrote {$written} of {$length} bytes.\");\n } catch (RuntimeException $e) {\n $this->throwException($e);\n }\n }", "public static function writeDataTo($sock, $data, $length = null, $force = false)\n {\n if($force) {\n for($attempt = 10; $attempt > 0; $attempt--) {\n try {\n return socket_write($sock, $data, is_null($length) ? strlen($data) : $length);\n } catch(\\Exception $e) {\n usleep(100);\n }\n }\n } else {\n return socket_write($sock, $data, strlen($data));\n }\n return 0;\n }", "public function write($string, $length = null)\n {\n $this->connect();\n if (is_null($length)) {\n $this->written = fwrite($this->socket, $string);\n } else {\n $this->written = fwrite($this->socket, $string, $length);\n }\n return $this;\n }", "public function addSbyte($x)\n {\n $this->prep(1, 0);\n $this->putSbyte($x);\n }", "private function sendSocketIoMessage($message, $data) {\r\n $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\r\n $result = socket_connect($socket, '127.0.0.1', 3000);\r\n if(!$result) {\r\n die('cannot connect ' . socket_strerror(socket_last_error()) . PHP_EOL);\r\n }\r\n $message = json_encode(Array(\"msg\" => $message, \"data\" => $data));\r\n $sentByteCount = socket_write($socket, $message, strlen($message));\r\n socket_close($socket);\r\n\r\n return $sentByteCount;\r\n }", "public function write($data)\n {\n $this->connection->write($data);\n $this->client->setActiveAt(new \\DateTime('now'));\n }", "function write($data) {\n\n\t\t\t$this->body .= $data;\n\t\t}", "public function setByte($identifier, $value);" ]
[ "0.77187765", "0.7371716", "0.70756257", "0.70649284", "0.6966219", "0.68465996", "0.6825752", "0.6641369", "0.65662724", "0.6433947", "0.63378507", "0.6233998", "0.60810167", "0.6066164", "0.60657644", "0.60326195", "0.5947578", "0.58661366", "0.58476615", "0.5799765", "0.57847095", "0.57805336", "0.57709956", "0.5720105", "0.57034254", "0.5679944", "0.56529254", "0.56403995", "0.5611201", "0.5606035", "0.55915445", "0.5585137", "0.55818874", "0.55682856", "0.5566616", "0.5565058", "0.55492723", "0.54634815", "0.5444815", "0.5444211", "0.5424252", "0.53866094", "0.5377636", "0.5359959", "0.5348575", "0.5341982", "0.5340594", "0.53318423", "0.53223115", "0.5320656", "0.5303292", "0.5296984", "0.52698094", "0.5268862", "0.5228784", "0.52180195", "0.5211541", "0.51643276", "0.51595724", "0.5152709", "0.5152642", "0.5139035", "0.513761", "0.5133332", "0.5129312", "0.5124874", "0.51204", "0.51146823", "0.5113503", "0.51083785", "0.5100359", "0.50992566", "0.50803006", "0.5054404", "0.5054379", "0.50485957", "0.50458425", "0.50371116", "0.5036488", "0.50360674", "0.5034881", "0.5030701", "0.50266093", "0.50220037", "0.50197923", "0.50119376", "0.50116104", "0.5009397", "0.50002843", "0.49847972", "0.49792147", "0.49770644", "0.49639735", "0.4961443", "0.49265492", "0.49230558", "0.49056935", "0.49031502", "0.48989534", "0.4895236" ]
0.75735736
1
Read a byte from the socket.
Считать байт из сокета.
protected function readByte() { return Binary::unpackByte($this->socket->read(1)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function readByte();", "public function readByte();", "public function readByte()\n {\n $this->position ++;\n return fread($this->handle, 1);\n }", "public function readByte()\n {\n return $this->bin->readByte(); // OK\n }", "public function readByte()\r\n\t{\r\n\t\t$s = $this->read(1);\r\n\t\treturn empty($s) ? 0 : ord($s[0]);\r\n\t}", "public function readByte()\n {\n if ($this->in == null) {\n return - 1;\n }\n $c = $this->in->readByte();\n if ($c == - 1) {\n $this->nextStream();\n return $this->readByte();\n }\n return $c;\n }", "public function readByte()\n {\n return ord($this->_data[$this->_position++]);\n }", "protected function readChar()\n {\n return chr(Binary::unpackByte($this->socket->read(1)));\n }", "public function read($size=1024) {\n return socket_read($this->sock,$size,PHP_BINARY_READ);\n }", "function socket_read(Socket $socket, int $length, int $mode = PHP_BINARY_READ): string|false {}", "private function read() {\n return fgets( $this->socket, 128 );\n }", "public function receiveOctet(): int\n {\n $binaryData = $this->receiveRaw(1);\n\n $translatedData = unpack('C', $binaryData);\n return $translatedData[1];\n }", "public function read()\n\t{\n\t\t$this->connect();\n\n\t\t$data = '';\n\n\t\twhile(!feof($this->socket))\n\t\t{\n\t\t\t$data .= fgets($this->socket, 1024);\n\t\t}\n\n\t\treturn strlen($data) ? $data : false;\n\t}", "public function read($length = 1024)\n {\n if (false === ($data = fread($this->fp, $length))) {\n throw new SocketException('socket read error');\n }\n return $data;\n }", "public function read() {\n\t\treturn $this->atEnd() ? -1 : ord(substr($this->streamData, $this->endPointer++, 1));\n\t}", "protected function readBytes()\n {\n $length = $this->readInt();\n if ($length === -1) {\n return null;\n }\n else if ($length === 0) {\n return '';\n }\n else {\n return $this->socket->read($length);\n }\n }", "public function readRawByte() {\n if ($this->position == $this->limit) {\n throw new TIndexOutOfBoundsException(\"Stream is EOF\");\n }\n $value = ord(substr($this->input, $this->position++, 1));\n return $value > 127 ? $value - 256 : $value;\n }", "public function readSingleByte()\n {\n return $this->bin->readSingleByte();\n }", "public function read($len) {\n $read = 0;\n $data = '';\n\n while($read < $len) {\n $fread = @socket_read($this->_handle, $len - $read, PHP_BINARY_READ);\n\n if($fread === false) {\n $errer_no = socket_last_error($this->_handle);\n\n if($errer_no == SOCKET_EINTR) {\n usleep(1);\n continue;\n } else {\n $this->error(self::class . ': Failed to read data from ' . $this->getDomain(), $errer_no);\n }\n } elseif($fread == '') {\n //Connection closed\n $this->error(self::class . ': TSocket read 0 bytes from ' . $this->getDomain(), SOCKET_ECONNRESET);\n }\n\n $read += TStringFuncFactory::create()->strlen($fread);\n $data .= $fread;\n }\n\n return $data;\n }", "function socket_recv(Socket $socket, &$data, int $length, int $flags): int|false {}", "public function receiveBit(): int\n {\n $rawByte = $this->receiveRaw(1);\n\n $value = @($rawByte & 1) ? 1 : 0;\n return $value;\n }", "protected function readInt()\n {\n return Binary::unpackInt($this->socket->read(4));\n }", "public function read(int $length = 2048, int $type = PHP_BINARY_READ)\n {\n if (!$this->isSocketOpened()) {\n throw new ClientTCPSocketException('');\n }\n\n $buffer = @socket_read($this->socket, $length, $type);\n \n return trim($buffer);\n }", "public function read($size = 512)\r\n {\r\n if (!$this->isConnected()) {\r\n return false;\r\n }\r\n $data = socket_read($this->socket, $size);\r\n if (!$data) {\r\n if ($this->getLastError() == 107) {\r\n $this->close();\r\n $this->socket = null;\r\n }\r\n }\r\n return $data;\r\n }", "function client_read(StreamSocketInterface $socket, int $size = -1) \n\t{\n\t\treturn $socket->response($size);\n\t}", "public function readByte(): string\n {\n if ($this->isAtEndOfString())\n throw new \\Exception(\"unable to read Byte, StringReader already at End of String\");\n\n $byte = $this->string[$this->readerPos];\n ++$this->readerPos;\n return $byte;\n }", "protected function _read(int $characterCount): string {\n\t\t$result = fread($this->socket, $characterCount);\n\t\tif ($this->optionBool(self::OPTION_DEBUG_READ)) {\n\t\t\t$this->_log('->read({count}) = {result}', [\n\t\t\t\t'count' => $characterCount, 'result' => $result === false ? 'false' : strlen($result) . ' bytes',\n\t\t\t]);\n\t\t}\n\t\tif (strlen($result) === 0) {\n\t\t\tthrow new Exception_Protocol(\"fread returned empty: $result\");\n\t\t}\n\t\t$this->log(\"< $result\");\n\t\treturn $result;\n\t}", "function read_socket(StreamSocketInterface $socket, int $size = -1)\n\t{\n\t\treturn $socket->read($size);\n\t}", "public function read($len)\n\t{\n\t\treturn $this->inBuf->read($len);\n\t}", "protected function read() : bool\n {\n if (feof($this->socket)) {\n $this->connect();\n }\n // try to read 1 byte from the socket\n $type = stream_get_contents($this->socket, 1);\n\n if (strlen($type) == 0) {\n // no data yet\n return false;\n }\n\n $type = unpack('C', $type)[1];\n\n // got a packet, read length\n $multiplier = 1;\n $len = 0;\n do {\n $encodedByte = unpack('C', stream_get_contents($this->socket, 1))[1];\n $len += ($encodedByte & 0x7F) * $multiplier;\n $multiplier *= 0x80;\n if ($multiplier > 0x80*0x80*0x80) {\n throw new \\RuntimeException(\"Malformed length\");\n }\n } while (($encodedByte & 0x80) != 0);\n\n $data = stream_get_contents($this->socket, $len);\n\n // split the type and flags\n $flags = $type & 0x0F;\n $type = $type & 0xF0;\n\n switch ($type) {\n case self::TYPE_CONNACK:\n case self::TYPE_PINGREQ:\n case self::TYPE_PINGRESP:\n // nothing to do here\n break;\n case self::TYPE_SUBACK:\n $ident = unpack('nident', $data)['ident'];\n unset($this->state[$ident]);\n break;\n case self::TYPE_PUBLISH:\n $this->recvPublish($flags, $data);\n break;\n case self::TYPE_PUBREL:\n $this->recvPubrel($flags, $data);\n break;\n case self::TYPE_PUBACK:\n // TODO verify qos type\n $ident = unpack('n', $data)[1];\n unset($this->state[$ident]);\n case self::TYPE_PUBREC:\n // send PUBREL\n // TODO verify qos type\n $ident = unpack('n', $data)[1];\n $headers = pack('n', $ident);\n $this->send(self::TYPE_PUBREL | self::FLAG_PUBREL, $headers, '');\n $this->state[$ident] = [\n 'last_change' => time(),\n 'onfail' => function() use ($headers) {\n $this->send(self::TYPE_PUBREL | self::FLAG_PUBREL, $headers, '');\n }\n ];\n break;\n case self::TYPE_PUBCOMP:\n // finish publish qos 2\n // TODO verify qos type\n $ident = unpack('n', $data)[1];\n unset($this->state[$ident]);\n break;\n default:\n // unknown type, just ignore for now\n break;\n }\n\n return true;\n }", "public function Read() {\n \n $raw = @socket_read( $this->socket, 512, PHP_NORMAL_READ );\n if ($raw === FALSE) {\n slog( \"Failed to read; \". socket_strerror( socket_last_error( $this->socket ) ) );\n $this->Close();\n return false;\n }\n\n if ($this->buffer) $raw = $this->buffer.$raw;\n\n if (substr($raw,-1) != \"\\n\") {\n $this->buffer = $raw;\n return false;\n }\n\n _log( $raw = trim( $raw ), \"<-\" );\n $this->buffer = \"\";\n unset( $this->Message );\n $this->Message = new Message( trim($raw) );\n return true;\n\n }", "public function read($cmd = 'READ:') {\n $this->sendLine($cmd);\n return $this->php_serial->readPort();\n }", "public function readUnsignedChar(){ }", "protected function readShort()\n {\n return Binary::unpackShort($this->socket->read(2));\n }", "public function read($len);", "public function read($len);", "public function read($len);", "public function read ($bytes=1)\n {\n if ($this->cursor + $bytes > $this->length)\n return false;\n\n $str = substr ($this->string, $this->cursor, $bytes);\n $this->cursor += $bytes;\n\n return $str;\n }", "protected function _read($socket)\n {\n $response = '';\n while ($buff = fread($socket, 8192)) {\n $response .= $buff;\n }\n \n fclose($socket);\n \n return $response;\n }", "public function readChar()\n {\n return $this->char = isset($this->stream[++$this->offset]) ? $this->stream[$this->offset] : false;\n }", "public function read(int $length): string\n {\n if ($length > self::READ_MAX_LENGTH) {\n throw Exception\\Socket::invalidLength($length, self::READ_MAX_LENGTH);\n }\n// $data = $this->stream->recvAll($length, $this->getReadTimeout());\n $data = $this->stream->recvAll($length);\n if ($data === false) {\n throw new Exception(\n sprintf('Read msg error %s:%d (%s [%d])', $this->host, $this->port, $this->stream->errMsg, $this->stream->errCode)\n );\n }\n return $data;\n }", "public function readFromSocketWithGivenLength()\n {\n $this->mockSocket->expects($this->once())\n ->method('read')\n ->with($this->equalTo(3))\n ->will($this->returnValue('foo'));\n $this->assertEquals('foo', $this->socketInputStream->read(3));\n }", "protected function recvStr($read = true)\n\t{\n\t\t$str = @fgets($this->socket);\n\t\tif(!$str)\n\t\t{\n\t\t\t$this->disconnect();\n\t\t\tthrow new \\HandlerSocket\\IOException('Cannot read from socket');\n\t\t}\n\t\treturn substr($str,0,-1);\n\t}", "function socket_recvfrom(Socket $socket, &$data, int $length, int $flags, &$address, &$port = null): int|false {}", "public function readLine()\n {\n \tif (!$this->isConnected()) {\n throw new Rediska_Connection_Exception(\"Can't read without connection to Redis server. Do connect or write first.\");\n \t}\n\n \t$string = @fgets($this->_socket);\n\n if ($string === false) {\n $this->disconnect();\n throw new Rediska_Connection_Exception(\"Can't read from socket.\");\n }\n\n return trim($string);\n }", "public function read($length = 4096)\n {\n $this->connect();\n if (is_null($length)) {\n return fgets($this->socket);\n } else {\n return fgets($this->socket, $length);\n }\n }", "public static function readDataFrom($sock, $length, $binary = true)\n {\n return socket_read($sock, $length, $binary ? PHP_BINARY_READ : PHP_NORMAL_READ);\n }", "public function readChar() {\n\t\treturn $this->atEnd() ? '' : substr($this->streamData, $this->endPointer++, 1);\n\t}", "public function read(int $length);", "public function receive($length = self::DEFAULT_RECEIVE_LENGTH)\n\t{\n\t\t$buffer = '';\n\t\t$metadata['unread_bytes'] = 0;\n\t\t$makeBlockingAfterRead = false;\n\n\t\ttry {\n\t\t\tdo {\n\t\t\t\t// feof means socket has been closed\n\t\t\t\t// also, sometimes in long running processes the system seems to kill the underlying socket\n\t\t\t\tif (!$this->socket || feof($this->socket)) {\n\t\t\t\t\t$this->disconnect();\n\n\t\t\t\t\treturn $buffer;\n\t\t\t\t}\n\n\t\t\t\t$result = fread($this->socket, $length);\n\n\t\t\t\tif ($makeBlockingAfterRead) {\n\t\t\t\t\tstream_set_blocking($this->socket, true);\n\t\t\t\t\t$makeBlockingAfterRead = false;\n\t\t\t\t}\n\n\t\t\t\t// fread FALSE means socket has been closed\n\t\t\t\tif ($result === false) {\n\t\t\t\t\t$this->disconnect();\n\n\t\t\t\t\treturn $buffer;\n\t\t\t\t}\n\n\t\t\t\t$buffer .= $result;\n\n\t\t\t\t// feof means socket has been closed\n\t\t\t\tif (feof($this->socket)) {\n\t\t\t\t\t$this->disconnect();\n\n\t\t\t\t\treturn $buffer;\n\t\t\t\t}\n\n\t\t\t\t$continue = false;\n\n\t\t\t\tif (strlen($result) == 1) {\n\t\t\t\t\t// Workaround Chrome behavior (still needed?)\n\t\t\t\t\t$continue = true;\n\t\t\t\t}\n\n\t\t\t\tif (strlen($result) == $length) {\n\t\t\t\t\t$continue = true;\n\t\t\t\t}\n\n\t\t\t\t// Continue if more data to be read\n\t\t\t\t$metadata = stream_get_meta_data($this->socket);\n\n\t\t\t\tif ($metadata && isset($metadata['unread_bytes'])) {\n\t\t\t\t\tif (!$metadata['unread_bytes']) {\n\t\t\t\t\t\t// stop it, if we read a full message in previous time\n\t\t\t\t\t\t$continue = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$continue = true;\n\t\t\t\t\t\t// it makes sense only if unread_bytes less than DEFAULT_RECEIVE_LENGTH\n\t\t\t\t\t\tif ($length > $metadata['unread_bytes']) {\n\t\t\t\t\t\t\t// http://php.net/manual/en/function.stream-get-meta-data.php\n\t\t\t\t\t\t\t// 'unread_bytes' don't describes real length correctly.\n\t\t\t\t\t\t\t//$length = $metadata['unread_bytes'];\n\n\t\t\t\t\t\t\t// Socket is a blocking by default. When we do a blocking read from an empty\n\t\t\t\t\t\t\t// queue it will block and the server will hang. https://bugs.php.net/bug.php?id=1739\n\t\t\t\t\t\t\tstream_set_blocking($this->socket, false);\n\t\t\t\t\t\t\t$makeBlockingAfterRead = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} while ($continue);\n\n\t\t\treturn $buffer;\n\n\t\t} finally {\n\t\t\tif ($makeBlockingAfterRead) {\n\t\t\t\tstream_set_blocking($this->socket, true);\n\t\t\t}\n\t\t}\n\t}", "public function read($len)\n {\n if (!$this->isOpen()) {\n throw new TTransportException('ClientTransport not open.', TTransportException::NOT_OPEN);\n }\n return $this->client->recv($len, true);\n }", "abstract protected function readBytes($length);", "protected function readLong()\n {\n return Binary::unpackLong($this->socket->read(8));\n }", "private function readBytes($bytes, $noBuffer) {\n\t\tif($noBuffer)\n\t\t\treturn fread($this->socket, $bytes);\n\n\n\t\t$bytes_left = $bytes;\n\t\t$retval = \"\";\n\t\twhile( !feof($this->socket) && $bytes_left > 0 )\n\t\t{\n\t\t\t$res = fread($this->socket, $bytes_left);\n\t\t\t$retval.=$res;\n\t\t\t$bytes_left-=strlen($res);\n\t\t}\n\n\t\treturn $retval;\n\t}", "public function read(int $len)\n {\n return $this->readBlocking($len);\n }", "function mapi_read($socket=NULL) {\n\t\t# get the first 2 bytes\n\t\tif (($header = socket_read($socket, 2)) == FALSE) {\n\t\t\t$last_error = socket_strerror(socket_last_error());\n\t\t\tthrow new Exception('Lost connection with the server: ' . $last_error);\n\t\t}\n\t\t$data = \"\";\n\n\t\t$chunk_size = ((ord($header[1]) << 7) | (ord($header[0]) >> 1));\n\t\t// keep reading until we have everything\n\t\twhile (strlen($data) < $chunk_size) {\n\t\t\t$data .= socket_read($socket, $chunk_size - strlen($data));\n\t\t}\n\n\n\t\twhile ((ord($header[0]) & 1) == 0) {\n\t\t\tif (($header = socket_read($socket, 2)) == FALSE) {\n\t\t\t\t$last_error = socket_strerror(socket_last_error());\n\t\t\t\tthrow new Exception('Lost connection with the server: ' . $last_error);\n\t\t\t}\n\n\t\t\t$chunk_size = ((ord($header[1])) << 7) | (ord($header[0]) >> 1);\n\n\t\t\t$block = \"\";\n\t\t\twhile (strlen($block) < $chunk_size) {\n\t\t\t\tif (($block .= socket_read($socket, $chunk_size - strlen($block))) == FALSE) {\n\t\t\t\t\t$last_error = socket_strerror(socket_last_error());\n\t\t\t\t\tthrow new Exception('Lost connection with the server: ' . $last_error);\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t$data = $data . $block;\n\t\t}\n\t\tif (strlen($data) == 0) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\treturn $data;\n\t}", "function net_read($handle, int $size = -1)\n {\n return Network::read($handle, $size);\n }", "public function stream_read($byteCount) {\r\n\t\tif (empty($data)) {\r\n\t\t\t$data = '';\r\n\t\t}\r\n\t\t\r\n\t\tif (is_resource($this->_fp) && !feof($this->_fp)) {\r\n\t\t\t$data .= fread($this->_fp, $byteCount);\r\n\t\t\t$this->_position = strlen($data);\r\n\t\t}\r\n\t\t\r\n\t\treturn $data;\r\n\t}", "protected function read_dcb() {\n\t\t// Send\n\t\t$this->command(0x93, [0x00, 0x00, 0xff, 0xff]);\n\n\t\t// Get\n\t\t$response = $this->response();\n\t\t$data = $response['data'];\n\n\t\t// Validate. Might throw an exception\n\t\t$this->dcb_valid($response);\n\n\t\t// Return DCB\n\t\treturn array_slice($data, 4);\n\t}", "public function readLine() {\r\n if (!$this -> mHandle) {\r\n $this -> setError('Not connected', '500', mlError);\r\n return '';\r\n } \r\n $lRet = fgets($this -> mHandle, $this -> mByteBuffer);\r\n $this -> dbg('READ : '.$lRet);\r\n if ($lRet === FALSE) {\r\n $this -> setError('TCP: Data not read', 102, mlError);\r\n return '';\r\n }\r\n return $lRet;\r\n }", "public function receiveShort(): int\n {\n $binaryData = $this->receiveRaw(2);\n\n $translatedData = unpack('n', $binaryData);\n return $translatedData[1];\n }", "protected function read_message( $socket ) {\n\t\t$recv = socket_recv( $socket, $header, 4, MSG_WAITALL );\n\t\tif ( strlen( $header ) !== 4 )\n\t\t\tthrow new Exception( \"Prefork::read_message() failed receiving header\" );\n\t\t$length = current( unpack( 'N', $header ) );\n\t\t$recv = socket_recv( $socket, $message, $length, MSG_WAITALL );\n\t\tif ( strlen( $message ) !== $length )\n\t\t\tthrow new Exception( \"Prefork::read_message() failed receiving message\" );\n\t\treturn $message;\n\t}", "public abstract function read($len);", "function tell () {\n return ftell($this->sock);\n }", "public function readBytes($num)\n {\n $returnValue = substr($this->_data, $this->_position, $num);\n $this->_position += $num;\n\n return $returnValue;\n }", "public function read($length = 1024);", "private function _read()\n {\n $read = array($this->_conn['read']);\n if (stream_select($read, $w = null, $x = null, self::TIMEOUT, 15) > 0) {\n unset($w, $e);\n if ($reply = fgets($this->_conn['read'])) {\n return $reply;\n } else {\n throw new \\Seraphp\\Exceptions\\IOException('No reply in FIFO');\n }\n } else {\n throw new \\Seraphp\\Exceptions\\IOException('FIFO read timed out!');\n }\n }", "public function readSockLine($socket)\r\n {\r\n $line = '';\r\n while (true)\r\n {\r\n $byte = socket_read($socket, 1);\r\n if ($byte === false || $byte === '')\r\n break;\r\n if ($byte === \"\\0\")\r\n break;\r\n $line .= $byte;\r\n }\r\n return $line;\r\n }", "public function readUTF()\n {\n return $this->bin->readUTF();\n }", "public function readInt()\n {\n return $this->bin->readInt();\n }", "public function read($num)\n {\n return fread($this->in, $num);\n }", "public function read($length)\n {\n $currentLength = strlen($this->buffer);\n\n if ($length >= $currentLength) {\n // No need to slice the buffer because we don't have enough data.\n $result = $this->buffer;\n $this->position = strlen($this->buffer);\n } else {\n // Slice up the result to provide a subset of the buffer.\n $result = substr($this->buffer, $this->position, $length);\n $this->position = $this->position + $length;\n }\n\n return $result;\n }", "public function read($length);", "public function read($length);", "public function read($length);", "public function receiveRaw(int $bytes): ?string\n {\n if ($this->accumulate) {\n return $this->retrieveFromBuffer($bytes);\n }\n return $this->socket->readRaw($bytes);\n }", "public function read($len = null) {\n return $this->in->read($len);\n }", "public function readByte($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "protected function _receiveResponse()\n {\n $result = $this->socket->read(4096);\n\n $this->socket->close();\n\n return trim($result);\n }", "public function readBinary()\n {\n $length = $this->readVInt();\n $returnValue = substr($this->_data, $this->_position, $length);\n $this->_position += $length;\n return $returnValue;\n }", "public function readInt()\n {\n $str = substr($this->_data, $this->_position, 4);\n $this->_position += 4;\n\n return ord($str[0]) << 24 |\n ord($str[1]) << 16 |\n ord($str[2]) << 8 |\n ord($str[3]);\n }", "public function read($length = 1024) {\n if (!$this->_receivedResponse) {\n return false;\n }\n\n $response = $this->_receivedResponse;\n $this->_receivedResponse = false;\n\n return $response;\n }", "protected function readBoolean()\n {\n $value = $this->socket->read(1);\n return (bool) Binary::unpackByte($value);\n }", "public function read($slaveAddress, $byteCount) {\n $this->ensureConfiguration();\n $defer = new Deferred();\n $this->events()->once(\n 'reply-'.$slaveAddress,\n function ($bytes) use ($defer, $byteCount) {\n if (count($bytes) == $byteCount) {\n $defer->resolve($bytes);\n } else {\n $defer->reject('Invalid I2C response.');\n }\n }\n );\n $request = new I2C\\Request(\n $this->_board, $slaveAddress, self::MODE_READ, $byteCount\n );\n $request->send();\n return $defer;\n }", "public function read($length)\n {\n if (!$this->isConnected()) {\n throw new Rediska_Connection_Exception(\"Can't read without connection to Redis server. Do connect or write first.\");\n }\n\n if ($length > 0) {\n \t$data = $this->_readAndThrowException($length);\n } else {\n \t$data = null;\n }\n\n if ($length !== -1) {\n $this->_readAndThrowException(2);\n }\n\n return $data;\n }", "private function readDataFromPendingClient($socket, int $length, PendingSocketClient $state)\n {\n $data = \\fread($socket, $length);\n\n if ($data === false || $data === '') {\n return null;\n }\n\n $data = $state->receivedDataBuffer . $data;\n\n if (\\strlen($data) < $length) {\n $state->receivedDataBuffer = $data;\n return null;\n }\n\n $state->receivedDataBuffer = '';\n\n Loop::cancel($state->readWatcher);\n\n return $data;\n }", "function dio_read($fd, int $len = 1024) {}", "public function read(): string {\n\t\t$this->_check();\n\t\tif (($pos = strpos($this->buffer, $this->EOL)) === false) {\n\t\t\t$this->buffer .= $this->_read($this->optionInt(self::OPTION_READ_BUFFER_SIZE, self::DEFAULT_OPTION_READ_BUFFER_SIZE));\n\t\t\t$pos = strpos($this->buffer, $this->EOL);\n\t\t\tif ($pos === false) {\n\t\t\t\tthrow new Exception_Protocol(\"Server returned a line not ending in EOL: $this->buffer\");\n\t\t\t}\n\t\t}\n\t\t$eol_len = strlen($this->EOL);\n\t\t$line = substr($this->buffer, 0, $pos + $eol_len);\n\t\t$this->buffer = substr($this->buffer, $pos + $eol_len);\n\t\treturn $line;\n\t}", "public function read($size) {\n\n return event_buffer_read($this->resource, $size);\n\n }", "function net_read($handle, int $size = -1)\n {\n return Networks::read($handle, $size);\n }", "public function stream_read($count) \r\n {\r\n $ret = substr($this->_data, $this->_pos, $count);\r\n $this->_pos += strlen($ret);\r\n return $ret;\r\n }", "public function read($num)\n {\n $chunks = array();\n $len_read_so_far = 0;\n while ($len_read_so_far < $num) {\n $chunk = fread($this->socket, $num - $len_read_so_far);\n $len_read_so_far += strlen($chunk);\n $chunks[] = $chunk;\n }\n return implode('', $chunks);\n }", "abstract public function readChar($timeout = null);", "protected function receiveBytes($length)\r\n\t{\r\n\t\twhile($length > 0 && !feof($this->resource))\r\n\t\t{\r\n\t\t\t$count = ($length > self::BUF_READ_LEN? self::BUF_READ_LEN : $length);\r\n\r\n\t\t\t$buf = $this->receive($count);\r\n\r\n\t\t\t$receivedBytesLength = BinaryString::getLength($buf);\r\n\t\t\t$this->receivedBytesLength += $receivedBytesLength;\r\n\r\n\t\t\tif(!$this->checkErrors($buf))\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t$length -= $receivedBytesLength;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}", "public function receiveLong(): int\n {\n $binaryData = $this->receiveRaw(4);\n\n $translatedData = unpack('N', $binaryData);\n return $translatedData[1];\n }", "public function readFromSocketWithDefaultLength()\n {\n $this->mockSocket->expects($this->once())\n ->method('read')\n ->with($this->equalTo(8192))\n ->will($this->returnValue('foo'));\n $this->assertEquals('foo', $this->socketInputStream->read());\n }", "public function peek() {\n\t\treturn $this->atEnd() ? -1 : ord(substr($this->streamData, $this->endPointer, 1));\n\t}", "public function GetByte( ) : int\n\t\t{\n\t\t\treturn Ord( $this->Get( 1 ) );\n\t\t}", "public function stream_read($count)\n {\n $ret = substr($this->data, $this->pos, $count);\n $this->pos += strlen($ret);\n return $ret;\n }", "function freadbyte($f) {\nreturn ord(fread($f, 1));\n}" ]
[ "0.761144", "0.761144", "0.7425924", "0.73819435", "0.72239715", "0.7207077", "0.71253407", "0.6866188", "0.68138593", "0.68023807", "0.6750473", "0.6560373", "0.6494016", "0.6480514", "0.6452274", "0.64229983", "0.6391831", "0.63436043", "0.62810725", "0.6258313", "0.62503344", "0.62253535", "0.615296", "0.6130359", "0.6126928", "0.6045344", "0.5975343", "0.5971498", "0.5938612", "0.58864224", "0.5868626", "0.586193", "0.5854169", "0.58444375", "0.5828526", "0.5828526", "0.5828526", "0.5823665", "0.5811545", "0.5799479", "0.57856107", "0.5783035", "0.57747906", "0.5763999", "0.5758463", "0.57556564", "0.5708174", "0.56855017", "0.5666334", "0.5639586", "0.563938", "0.5635211", "0.5631896", "0.55938405", "0.5592755", "0.5579733", "0.5575508", "0.5544295", "0.55405146", "0.552689", "0.55225074", "0.5503644", "0.5492041", "0.54889673", "0.5468364", "0.5452963", "0.5444339", "0.5443817", "0.54396766", "0.5437767", "0.54327506", "0.540467", "0.53884375", "0.53884375", "0.53884375", "0.5374881", "0.5359856", "0.53522444", "0.53335917", "0.5329043", "0.53275466", "0.53011113", "0.5285706", "0.52775484", "0.525342", "0.52513105", "0.5244621", "0.5242938", "0.5241324", "0.52355325", "0.5233596", "0.5228055", "0.52240235", "0.5208439", "0.520842", "0.51891804", "0.5181665", "0.51744413", "0.51677376", "0.51642025" ]
0.82759166
0
Write a character to the socket.
Запишите символ в сокет.
protected function writeChar($value) { $this->socket->write(Binary::packByte(ord($value))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function write($socket, $data)\n {\n }", "private function write( $str ) {\n fwrite( $this->socket, $str . \"\\n\" );\n }", "protected function _write($socket, $request)\n {\n fwrite($socket, $request);\n }", "protected function readChar()\n {\n return chr(Binary::unpackByte($this->socket->read(1)));\n }", "public function writeChar($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "protected function _write( $string ) { $this->_buffer .= $string; }", "public function writeByte($byte);", "public function write($str, $off = 0, $len = -1);", "public function write($buf) {\n $written = 0;\n $length = TStringFuncFactory::create()->strlen($buf);\n\n while($written < $length) {\n $fwrite = @socket_write($this->_handle, TStringFuncFactory::create()->substr($buf, $written));\n\n if($fwrite === false) {\n $this->error(self::class . ': Failed to write buffer to ' . $this->getDomain());\n }\n\n $written += $fwrite;\n }\n }", "function socket_write(Socket $socket, string $data, ?int $length = null): int|false {}", "public function setCharAt($idx, $chr) {\n if($idx < 0 || $idx > $this->length()) {\n throw new \\OutOfBoundsException(\"Index out of bounds.\");\n }\n\n $this->buffer[$idx] = $chr;\n }", "public function write($data)\n {\n return fwrite($this->socket, $data);\n }", "function write($str) { return fputs($this->handle, $str); }", "protected function _writeDataToSocket($socket, $string)\n\t{\n\t\treturn fwrite($socket, $string);\n\t}", "public function send_buffer(){\n\n $this->_log(\"Buf has \".count($this->_buf).\" items\");\n\n $string = implode(\"\\n\",$this->_buf);\n\n $this->_log('Sending string length: '.strlen($string));\n $len = socket_write($this->_socket,$string,strlen($string));\n //echo \"$len bytes written to socket\\n\";\n $this->_log(\"$len bytes written to socket\");\n\n }", "protected function sendStr($string)\n\t{\n\t\tif(!$this->isConnected()) throw new \\HandlerSocket\\IOException('No active connection');\n\t\t$string = (string)$string; \n\t\twhile ($string)\n\t\t{ \n\t\t\t$bytes = @fwrite($this->socket, $string); \n\t\t\tif($bytes === false)\n\t\t\t{\n\t\t\t\t$this->disconnect();\n\t\t\t\tthrow new \\HandlerSocket\\IOException('Cannot write to socket');\n\t\t\t}\n\t\t\tif ($bytes == 0)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$string = substr($string, $bytes); \n\t\t}\n\t}", "public function write(string $buffer) : void;", "protected function writeByte($value)\n {\n $this->socket->write(Binary::packByte($value));\n }", "function send_data($f, $string) {\n// $send = '';\n// for ($i = 0; $i < strlen($string); $i++) {\n// $send .= ord($string[$i]) . ' ';\n// }\n// $length = strlen($string);\n// echo \"< $send\\r\\n$length\\r\\n\";\n\n $bytes = fwrite($f, $string);\n// echo PHP_EOL . \"sended $bytes\" .PHP_EOL;\n}", "public function write($string) \n {\n if ($string !== '') {\n $string = (string)$string . Rediska::EOL;\n\n $this->connect();\n\n\t while ($string !== '') {\n\t $bytes = @fwrite($this->_socket, $string);\n\t\n\t if ($bytes === false) {\n\t $this->disconnect();\n\t throw new Rediska_Connection_Exception(\"Can't write to socket.\");\n\t }\n\t\n\t if ($bytes == 0) {\n\t return true;\n\t }\n\t\n\t $string = substr($string, $bytes);\n\t }\n\n\t return true;\n } else {\n \treturn false;\n }\n }", "abstract public function write($buffer);", "public function writeByte($byte)\n {\n return fwrite($this->handle, $byte, 1);\n }", "public function write( $data )\n\t{\n\t\t$this->_buffer .= $data;\n\t}", "public function send(Socket $socket)\n {\n $socket->write(Str::limit($this->raw, 509).\"\\r\\n\");\n Client::log($this, true);\n }", "function client_write(StreamSocketInterface $socket, string $response = null) \n\t{\n\t\treturn \\write_socket($socket, $response);\n\t}", "public function byte($byte)\n {\n $this->buffer .= bin2hex(pack('C', $byte));\n }", "public function writeByte($byte)\n {\n // We do not need to check if file position points to the end of \"file\".\n // Only append operation is supported now\n\n $this->_data .= chr($byte);\n $this->_position = strlen($this->_data);\n\n return 1;\n }", "public function write(string $message): bool\n {\n if($this->debug === true) { echo \"\\nsending message : $message \\n\"; }\n return fwrite($this->socket, $message, \\strlen($message));\n }", "public function write(string $string);", "public function write(string $string);", "public function write(string $buffer): void;", "function writeByte(){\r\n\t\tdie('Not implemented');\r\n\t}", "public function send(string $zpl)\r\n {\r\n if (false === @socket_write($this->socket, $zpl)) {\r\n $error = $this->getLastError();\r\n throw new CommunicationException($error['message'], $error['code']);\r\n }\r\n }", "public function sendToSocket($socket, $message){ \n $this->sendReturn = @socket_write($socket, $message, strlen($message) ); \n if($this->sendReturn === false){\n return false;\n }else{\n return true;\n }\n }", "function writeCharacterStream(){\r\n\t\tdie('Not implemented');\r\n\t}", "public function write($buf);", "protected function writeString($value)\n {\n $this->socket->write(Binary::packString($value));\n }", "function dio_write($fd, string $data, int $len = 0) {}", "function write_socket(StreamSocketInterface $socket, string $response = null)\n\t{\n\t\treturn $socket->write($response);\n\t}", "function send($data){\n\t\tfputs($this->fp, $data.\"\\r\\n\");\n\t}", "public function write($string);", "public abstract function writeByte($b);", "public function setChar(& $char)\r\n {\r\n $this->char = $char;\r\n }", "public function write ( $chunk )\n {\n if( $this->write_finished )\n {\n throw new SocketInvalidOperationException( \"Can not write, reading has started.\" );\n }\n\n if( ! $this->write_started )\n {\n fwrite( $this->socket, \"\\r\\n\" ); // Start message body\n $this->write_started = true;\n }\n\n fwrite( $this->socket, sprintf( \"%x\\r\\n\", strlen( $chunk ) ) );\n fwrite( $this->socket, $chunk . \"\\r\\n\" );\n fflush( $this->socket );\n }", "function socket_send(Socket $socket, string $data, int $length, int $flags): int|false {}", "public static function socket_write_all($socket, string $data): void\n {\n if (!($dlen = strlen($data))) {\n return;\n }\n do {\n assert($dlen > 0);\n assert(strlen($data) === $dlen);\n $sent_now = socket_write($socket, $data);\n if (false === $sent_now) {\n $err = socket_last_error($socket);\n throw new \\RuntimeException(\"socket_write() failed! {$err}: \" . socket_strerror($err));\n }\n if (0 === $sent_now) {\n // we'll try *1* last time before throwing exception...\n $sent_now = socket_write($socket, $data);\n if (false === $sent_now) {\n $err = socket_last_error($socket);\n throw new \\RuntimeException(\"socket_write() failed after first returning zero! {$err}: \" . socket_strerror($err));\n }\n if (0 === $sent_now) {\n // something is very wrong but it's not registering as an error at the kernel apis...\n throw new \\RuntimeException(\"socket_write() keeps returning 0 bytes sent while {$dlen} byte(s) to send!\");\n }\n }\n $dlen -= $sent_now;\n $data = substr($data, $sent_now);\n } while ($dlen > 0);\n assert($dlen === 0);\n assert(strlen($data) === 0);\n // all data sent.\n return;\n }", "public function write($string)\n {\n $this->buffer .= $string;\n\n return strlen($string);\n }", "protected function write($message)\n {\n $this->assertConnected();\n\n $bytesToSend = strlen($message);\n $numZeroByteWritesLeft = self::ZERO_BYTE_WRITES_ALLOWED;\n\n do {\n $sent = fwrite($this->socket, $message);\n if ($sent === false) {\n throw new RuntimeException('Error writing to socket.');\n }\n\n if ($sent === 0) {\n // according to its documentation's comments, fwrite returns 0 instead of false on\n // many errors, such as connection loss.\n $numZeroByteWritesLeft--;\n if ($numZeroByteWritesLeft < 0) {\n throw new RuntimeException(\n sprintf('Error writing to socket: maximum zero byte writes (%s) exceeded', self::ZERO_BYTE_WRITES_ALLOWED)\n );\n }\n }\n\n $message = substr($message, $sent);\n\n $bytesToSend -= $sent;\n } while ($bytesToSend > 0);\n\n return $this;\n }", "public function sendMessage($resource, $message)\n {\n fwrite($resource, $message, self::CHAR_LIMIT);\n }", "abstract public function writeByte($b);", "public function write(string $message)\n {\n if (!$this->isSocketOpened()) {\n throw new ClientTCPSocketException('');\n }\n\n @socket_write($this->socket, $message, strlen($message));\n\n return $this;\n }", "public function write($data)\n {\n if (!fwrite($this->fp, $data)) {\n throw new SocketException(\"socket write:{$data} error\");\n }\n return true;\n }", "public function Send( $msg ) {\n \n _log( \"$msg\", \"->\" );\n $rc = @socket_write( $this->socket, $msg.\"\\r\\n\" );\n if ($rc === false) {\n slog( \"Failed to write; \". socket_strerror( socket_last_error( $this->socket ) ) );\n $this->Close();\n }\n\n }", "public function send($data) {\n $len = strlen($data);\n if ($this->v) l('Sending '.$len.' byte(s): '.$data);\n $sent = socket_write($this->sock, $data, $len);\n return ($sent === $len);\n }", "public function sendData($str) {\n try {\n $charsWritten = fwrite($this->_handle, $str);\n } catch (Exception $e) {\n echo $e->getMessage();\n }\n usleep( (int)(0.1 * 1000000) );\n return $charsWritten;\n }", "public function send($message)\r\n {\r\n if (!$this->isConnected()) {\r\n return false;\r\n }\r\n\r\n return socket_write($this->socket, $message . \"\\n\");\r\n }", "public function write($string, $length = null)\n {\n $this->connect();\n if (is_null($length)) {\n $this->written = fwrite($this->socket, $string);\n } else {\n $this->written = fwrite($this->socket, $string, $length);\n }\n return $this;\n }", "public function write($buf)\n {\n if (!$this->isOpen()) {\n throw new TTransportException('ClientTransport not open.', TTransportException::NOT_OPEN);\n }\n $this->client->send($buf);\n }", "public function write(string $buffer, IConnection $connection): IConnectionHandler;", "function mapi_write($socket=NULL, $msg) {\n\t\t// print \"Msg_len: \" . strlen($msg) . \"\\n\";\n\t\tglobal $last_error;\n\n\t\t$fb = 0;\n\t\t$sb = 0;\n\n\t\t$pos = 0;\n\t\t$data = \"\";\n\n\t\t$buf = 0;\n\n\t\t$is_final = FALSE;\n\t\twhile (! $is_final) {\n\t\t\t$data = substr($msg, $pos, min(MAX_PACKET_SIZE, strlen($msg) - $pos));\n\t\t\t$pos += strlen($data);\n\n\t\t\t$end = 0; // more packets will follow\n\t\t\tif ((strlen($msg) - $pos) == 0) {\n\t\t\t\t$is_final = TRUE;\n\t\t\t\t$end = 1;\n\t\t\t}\n\n\t\t\t$fb = (strlen($data) << 1) | $end;\n\n\t\t\t/**\n\t\t\t * socket_write() does not guarantee all data\n\t\t\t * to be transmitted. Make sure that the\n\t\t\t * buffer is flushed.\n\t\t\t */\n\n\t\t\tif (($buf = socket_flush($socket, pack(\"v\", $fb) . $data)) == FALSE) {\n\t\t\t\t$last_error = socket_strerror(socket_last_error());\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t}\n\t\treturn $buf;\n\t}", "public function write($msg);", "private function _write($msg)\n {\n $this->_connect('write');\n if ($result = fwrite($this->_conn['write'], $msg)) {\n if ($this->_role != 'server') {\n try {\n $this->_sendSignal($this->_pid);\n } catch (\\Exception $e) {\n self::$_log->warn($e->getMessage());\n }\n }\n $this->_disconnect('write');\n } else {\n $this->_disconnect('write');\n throw new \\Seraphp\\Exceptions\\IOException(\n 'Cannot write FIFO: '.$this->_fifo\n );\n }\n return $result;\n }", "abstract function write($message);", "public function write($data)\n {\n if (fwrite($this->_stream, $data . \"\\r\\n\") === false) {\n throw new Horde_Imap_Client_Exception(\n Horde_Imap_Client_Translation::t(\"Server write error.\"),\n Horde_Imap_Client_Exception::SERVER_WRITEERROR\n );\n }\n\n $this->_debug->client($data);\n }", "public function write(string $message)\n {\n $this->output->write($message);\n }", "private function sendDisconnect() {\n\t\t$payload = chr(0xe0).chr(0x00);\n\t\tfwrite($this->socket, $payload, 2);\n\n\t\t$this->debugMessage(\"DISCONNECT sent\");\n\t}", "public function write(string $data): void\n {\n $this->deprecated('write() on Connection is deprecated.');\n try {\n $length = strlen($data);\n $written = $this->stream->write($data);\n if ($written < strlen($data)) {\n $this->throwException(new RuntimeException(\"Could only write {$written} out of {$length} bytes.\"));\n }\n $this->logger->debug(\"[connection] Wrote {$written} of {$length} bytes.\");\n } catch (RuntimeException $e) {\n $this->throwException($e);\n }\n }", "public function write(string $content);", "public function write($value)\n {\n $this->buffer .= $value;\n }", "public function write(string $data): Socket\n {\n // Do not try to reconnect if the previous connection attempt during the current requests lifetime failed\n if ((!$this->isConnected() && $this->connectionPreviouslyFailed) || $this->writingDataPreviouslyFailed) {\n if ($this->connectionPreviouslyFailed) {\n $this->writeToFallback($data, 'Connection to Oneskyapp previously failed');\n\n return $this;\n }\n }\n\n if (!$this->isConnected()) {\n try {\n $this->connect();\n } catch (ConnectionException $e) {\n $this->writeToFallback($data, $e->getMessage());\n\n return $this;\n }\n }\n\n $dataWithNewline = $data . PHP_EOL;\n $length = strlen($dataWithNewline);\n $sent = 0;\n while ($this->isConnected() && $sent < $length) {\n if (0 == $sent) {\n $chunk = $this->fwrite($dataWithNewline);\n } else {\n $chunk = $this->fwrite(substr($dataWithNewline, $sent));\n }\n\n if ($chunk !== false) {\n $socketInfo = $this->streamGetMetadata();\n }\n\n // If we've failed to send the data use the fallback\n if ($chunk === false || ((isset($socketInfo) && $socketInfo['timed_out']))) {\n $this->writingDataPreviouslyFailed = true;\n\n $this->writeToFallback(\n $data,\n ($chunk ?\n sprintf('Time out while writing to %s', $this->url . ':' . $this->port) :\n sprintf('Unknown error when writing to %s', $this->url . ':' . $this->port)\n )\n );\n\n return $this;\n }\n\n $sent += $chunk;\n }\n\n return $this;\n }", "public static function write($str)\n {\n }", "function write($line, $cr = true);", "public function getChar()\n {\n $char = $this->_buffer->readByte();\n if (null !== $char) {\n\n $ord = ord($char);\n if ($ord < 128) {\n $len = 0;\n } else if ($ord < 224) {\n $len = 1;\n } else if ($ord < 240) {\n $len = 2;\n } else if ($ord < 248) {\n $len = 3;\n } else if ($ord < 252) {\n $len = 4;\n } else {\n $len = 5;\n }\n\n while ($len > 0 && null !== $next = $this->_buffer->readByte()) {\n $char .= $next;\n $len -= 1;\n }\n\n }\n\n return $char;\n }", "public function chr($x, $y, $chr)\n {\n $this->out[$y][$x] = $chr;\n }", "public function write($message) {\n\t\tfwrite($this->resource, $message);\n\t}", "public function write($command, $newline = true) {\n fputs($this->conn, $command . ($newline ? \" \\r\\n\" : \"\"));\n }", "public function stream_write($data) {\r\n\t\t// buffer the data\r\n\t\t$this->_buffer .= $data;\r\n\t\treturn strlen($data);\r\n }", "public function write($str)\n\t{\n\t\t// when starting output make sure we send the headers first\n\t\tif (!$this->_bufferOutput and !$this->_httpHeaderSent)\n\t\t\t$this->ensureHeadersSent();\n\t\techo $str;\n\t}", "public function offsetSet(mixed $idx, mixed $char): void\n {\n $this->setAt($idx, $char);\n }", "abstract protected function write_char($size, $angle, $x, $vertical, $fontcolor, $font, $char);", "abstract protected function write($message);", "public function sendBuffer()\n {\n $this->socket->writeRaw($this->buffer);\n unset($this->buffer);\n }", "public function write($line);", "public function write($line);", "public function read_to_char ($char)\n {\n assert ($this->cursor < $this->length);\n\n $s = '';\n $c = null;\n while ($this->cursor < $this->length &&\n ($c = $this->string[$this->cursor++]) !== $char)\n\n {\n $s .= $c;\n }\n\n return $s;\n }", "public function write(string $buf)\n {\n return $this->writeBlocking($buf);\n }", "function chr($ascii)\r\n{\r\n return \\chr($ascii);\r\n}", "function send_data($data) {\n\n if (is_resource($this->connection)) {\n return fwrite($this->connection, $data . CRLF, strlen($data) + 2);\n } else\n return FALSE;\n }", "abstract public function doWrite($message, $newline);", "public function send($player, $message) {\n if (!isSet($player->id) || !isSet($player->socket)) {\n return false;\n }\n socket_write($player->socket, $message . \"\\r\\n\");\n }", "public function write($chunk) {\n $this->buffer.= $chunk;\n if (strlen($this->buffer) > self::BUFFER_SIZE) {\n $this->target->write(dechex(strlen($this->buffer)).\"\\r\\n\".$this->buffer.\"\\r\\n\");\n $this->buffer= '';\n }\n }", "public function setChar(string $chr, $data)\n {\n if (strlen($chr)!==1) {\n throw new Exception(\"Error Processing CHR\", 1);\n }\n\n //TODO watch data format\n $char=[];//a sequence of [burn|x|y]\n\n if (is_string($data)) {\n\n $steps=explode(\"|\",$data);\n\n foreach ($steps as $step) {\n $x=explode(\",\", $step);\n if(count($x)!=3)continue;\n //$bits count must be 3\n $bits=array(3);\n $bits[0]=+$x[0];\n $bits[1]=+$x[1];\n $bits[2]=+$x[2];\n $char[]=$bits;\n }\n\n } else if (is_array($data)) {\n throw new Exception(\"Not implemented\", 1);\n\n }\n $this->chars[ord($chr)]=$char;\n }", "public function stream_write($data) \r\n {\r\n $left = substr($this->_data, 0, $this->_pos);\r\n $right = substr($this->_data, $this->_pos + strlen($data));\r\n $this->_data = $left . $data . $right;\r\n $this->_pos += strlen($data);\r\n return strlen($data);\r\n\r\n return $ret;\r\n }", "function net_write($handle, string $response = '')\n {\n return Network::write($handle, $response);\n }", "protected function _write($message) {\n if (!$this->_handle) {\n $this->_handle = $this->_open($this->_config['host'], $this->_config['port'], $this->_config['timeout']);\n if ($this->_handle === false) {\n throw new SocketException('Could not connect to logstash');\n }\n }\n return @fwrite($this->_handle, $message);\n }", "public function writeString($s, $len=null)\r\n {\r\n if(null === $len) {\r\n $len = strlen($s);\r\n }\r\n $this->writeInt($len);\r\n $this->data .= pack(\"a*\", $s);\r\n }", "public function send($buffer, $flags = 0, $length = null)\n {\n if (null === $length) {\n $length = strlen($buffer);\n }\n\n // make sure everything is written\n do {\n $return = @socket_send($this->resource, $buffer, $length, $flags);\n\n if (false !== $return && $return < $length) {\n $buffer = substr($buffer, $return);\n $length -= $return;\n\n } else {\n break;\n }\n } while (true);\n\n if ($return === false) {\n throw new SocketException($this->resource);\n }\n\n return $return;\n }", "public function raw($raw)\n {\n $raw = substr($raw, 0, 510);\n\n debug(\"[<magenta>{$this->name}</magenta>] << {$raw}\");\n\n try {\n $this->socket->write(\"{$raw}\\r\\n\");\n } catch (BrokenPipeException $e) {\n $this->reconnect();\n }\n }", "public function write($string)\n\t{\n\t\tif (null === $this->stream) {\n\t\t\techo $string;\n\t\t\treturn;\n\t\t}\n\n\t\tfwrite($this->stream, $string);\n\t}", "public function write($data) {\n\n return event_buffer_write($this->resource, $data);\n\n }" ]
[ "0.6298351", "0.628672", "0.61468446", "0.61234146", "0.60380805", "0.59906316", "0.5933404", "0.59121096", "0.58549505", "0.5839703", "0.5808382", "0.57997215", "0.5739319", "0.57268614", "0.57098806", "0.56946033", "0.5677651", "0.5669437", "0.5646952", "0.56463146", "0.56314105", "0.5622856", "0.56192386", "0.5596543", "0.559623", "0.5595638", "0.559514", "0.55831915", "0.5553745", "0.5553745", "0.5548154", "0.55335397", "0.5525009", "0.5515844", "0.55080235", "0.54851776", "0.5483923", "0.5479672", "0.5426955", "0.5370061", "0.53532773", "0.53470904", "0.53435254", "0.53383464", "0.53377414", "0.5335244", "0.53194135", "0.5303951", "0.53039104", "0.5300148", "0.5299646", "0.5295612", "0.52888787", "0.52814937", "0.52616143", "0.52579635", "0.5237673", "0.5204084", "0.52014816", "0.5194771", "0.5176633", "0.5157634", "0.5138463", "0.5137931", "0.51375526", "0.51290065", "0.5093036", "0.50833726", "0.50704527", "0.5060889", "0.5057184", "0.50499916", "0.50479805", "0.5041709", "0.50351566", "0.50265497", "0.5024716", "0.5024099", "0.5015226", "0.5007107", "0.5002421", "0.49974942", "0.49967828", "0.49967828", "0.49787515", "0.49625266", "0.49572515", "0.49492", "0.49444792", "0.49393398", "0.49384937", "0.4928127", "0.49244747", "0.4901334", "0.48929074", "0.48925343", "0.48837698", "0.4876823", "0.487096", "0.48645854" ]
0.75145227
0
Read a character from the socket.
Чтение символа из сокета.
protected function readChar() { return chr(Binary::unpackByte($this->socket->read(1))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function readCharacter();", "public function readChar() {\n\t\treturn $this->atEnd() ? '' : substr($this->streamData, $this->endPointer++, 1);\n\t}", "public function readChar()\n {\n return $this->char = isset($this->stream[++$this->offset]) ? $this->stream[$this->offset] : false;\n }", "private function read() {\n return fgets( $this->socket, 128 );\n }", "public function readChar(){ }", "abstract public function readChar($timeout = null);", "public function read()\n\t{\n\t\t$this->connect();\n\n\t\t$data = '';\n\n\t\twhile(!feof($this->socket))\n\t\t{\n\t\t\t$data .= fgets($this->socket, 1024);\n\t\t}\n\n\t\treturn strlen($data) ? $data : false;\n\t}", "protected function _read(int $characterCount): string {\n\t\t$result = fread($this->socket, $characterCount);\n\t\tif ($this->optionBool(self::OPTION_DEBUG_READ)) {\n\t\t\t$this->_log('->read({count}) = {result}', [\n\t\t\t\t'count' => $characterCount, 'result' => $result === false ? 'false' : strlen($result) . ' bytes',\n\t\t\t]);\n\t\t}\n\t\tif (strlen($result) === 0) {\n\t\t\tthrow new Exception_Protocol(\"fread returned empty: $result\");\n\t\t}\n\t\t$this->log(\"< $result\");\n\t\treturn $result;\n\t}", "function socket_read(Socket $socket, int $length, int $mode = PHP_BINARY_READ): string|false {}", "public function readUnsignedChar(){ }", "public function readLine()\n {\n \tif (!$this->isConnected()) {\n throw new Rediska_Connection_Exception(\"Can't read without connection to Redis server. Do connect or write first.\");\n \t}\n\n \t$string = @fgets($this->_socket);\n\n if ($string === false) {\n $this->disconnect();\n throw new Rediska_Connection_Exception(\"Can't read from socket.\");\n }\n\n return trim($string);\n }", "protected function readByte()\n {\n return Binary::unpackByte($this->socket->read(1));\n }", "public function read() {\n\t\treturn $this->atEnd() ? -1 : ord(substr($this->streamData, $this->endPointer++, 1));\n\t}", "protected function recvStr($read = true)\n\t{\n\t\t$str = @fgets($this->socket);\n\t\tif(!$str)\n\t\t{\n\t\t\t$this->disconnect();\n\t\t\tthrow new \\HandlerSocket\\IOException('Cannot read from socket');\n\t\t}\n\t\treturn substr($str,0,-1);\n\t}", "function receive_char($timeout=-1)\n {\n return $this->evaluate(\"RECEIVE CHAR $timeout\");\n }", "public function read_to_char ($char)\n {\n assert ($this->cursor < $this->length);\n\n $s = '';\n $c = null;\n while ($this->cursor < $this->length &&\n ($c = $this->string[$this->cursor++]) !== $char)\n\n {\n $s .= $c;\n }\n\n return $s;\n }", "protected function _read($socket)\n {\n $response = '';\n while ($buff = fread($socket, 8192)) {\n $response .= $buff;\n }\n \n fclose($socket);\n \n return $response;\n }", "public function readLine() {\r\n if (!$this -> mHandle) {\r\n $this -> setError('Not connected', '500', mlError);\r\n return '';\r\n } \r\n $lRet = fgets($this -> mHandle, $this -> mByteBuffer);\r\n $this -> dbg('READ : '.$lRet);\r\n if ($lRet === FALSE) {\r\n $this -> setError('TCP: Data not read', 102, mlError);\r\n return '';\r\n }\r\n return $lRet;\r\n }", "private function getChar()\n {\n return $this->r->getChar();\n }", "public function getChar()\n {\n $char = $this->_buffer->readByte();\n if (null !== $char) {\n\n $ord = ord($char);\n if ($ord < 128) {\n $len = 0;\n } else if ($ord < 224) {\n $len = 1;\n } else if ($ord < 240) {\n $len = 2;\n } else if ($ord < 248) {\n $len = 3;\n } else if ($ord < 252) {\n $len = 4;\n } else {\n $len = 5;\n }\n\n while ($len > 0 && null !== $next = $this->_buffer->readByte()) {\n $char .= $next;\n $len -= 1;\n }\n\n }\n\n return $char;\n }", "public function readByte();", "public function readByte();", "public function read($len) {\n $read = 0;\n $data = '';\n\n while($read < $len) {\n $fread = @socket_read($this->_handle, $len - $read, PHP_BINARY_READ);\n\n if($fread === false) {\n $errer_no = socket_last_error($this->_handle);\n\n if($errer_no == SOCKET_EINTR) {\n usleep(1);\n continue;\n } else {\n $this->error(self::class . ': Failed to read data from ' . $this->getDomain(), $errer_no);\n }\n } elseif($fread == '') {\n //Connection closed\n $this->error(self::class . ': TSocket read 0 bytes from ' . $this->getDomain(), SOCKET_ECONNRESET);\n }\n\n $read += TStringFuncFactory::create()->strlen($fread);\n $data .= $fread;\n }\n\n return $data;\n }", "public function Read() {\n \n $raw = @socket_read( $this->socket, 512, PHP_NORMAL_READ );\n if ($raw === FALSE) {\n slog( \"Failed to read; \". socket_strerror( socket_last_error( $this->socket ) ) );\n $this->Close();\n return false;\n }\n\n if ($this->buffer) $raw = $this->buffer.$raw;\n\n if (substr($raw,-1) != \"\\n\") {\n $this->buffer = $raw;\n return false;\n }\n\n _log( $raw = trim( $raw ), \"<-\" );\n $this->buffer = \"\";\n unset( $this->Message );\n $this->Message = new Message( trim($raw) );\n return true;\n\n }", "public function read(int $length = 2048, int $type = PHP_BINARY_READ)\n {\n if (!$this->isSocketOpened()) {\n throw new ClientTCPSocketException('');\n }\n\n $buffer = @socket_read($this->socket, $length, $type);\n \n return trim($buffer);\n }", "function nextChar()\r\n\t{\r\n\t\tif (!$this->hasMoreInput())\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn $this->stream[$this->cursor++];\r\n\t}", "public function peekChar() {\n\t\treturn $this->atEnd() ? -1 : substr($this->streamData, $this->endPointer, 1);\n\t}", "function readFromSocket($clientId = 0)\n {\n // start with empty string\n $data = '';\n\n // There are problems when readEndCharacter is longer than\n // readBufferSize - endings won't be detected.\n $lookInData = strlen($this->readEndCharacter) > $this->readBufferSize;\n if ($lookInData) {\n $extraDataLength = strlen($this->readEndCharacter) - $this->readBufferSize;\n }\n\n // read data from socket\n while (true) {\n if ($this->_readLeftOver == null) {\n $buf = socket_read(\n $this->clientFD[$clientId], $this->readBufferSize\n );\n } else {\n $buf = $this->_readLeftOver;\n $this->_readLeftOver = null;\n }\n\n if ($this->readEndCharacter != null) {\n if (strlen($buf) == 0) {\n break;\n }\n\n if (!$lookInData) {\n $posEndChar = strpos($buf, $this->readEndCharacter);\n } else {\n $posEndChar = strpos(substr($data, - $extraDataLength)\n . $buf, $this->readEndCharacter);\n }\n if ($posEndChar === false) {\n $data .= $buf;\n } else {\n $posEndChar += strlen($this->readEndCharacter);\n $data .= substr($buf, 0, $posEndChar);\n if ($posEndChar < strlen($buf)) {\n $this->_readLeftOver = substr($buf, $posEndChar);\n }\n break;\n }\n } else {\n /**\n * readEndCharacter is set to null => don't loop, just return\n */\n $data .= $buf;\n break;\n }\n }\n\n if ($buf === false) {\n $this->_sendDebugMessage(\n 'Could not read from client ' . $clientId . ' ('\n . $this->getLastSocketError($this->clientFD[$clientId])\n . ').');\n return false;\n }\n if ((string)$data === '') {\n return false;\n }\n return $data;\n }", "public function readByte()\r\n\t{\r\n\t\t$s = $this->read(1);\r\n\t\treturn empty($s) ? 0 : ord($s[0]);\r\n\t}", "public function read(): string {\n\t\t$this->_check();\n\t\tif (($pos = strpos($this->buffer, $this->EOL)) === false) {\n\t\t\t$this->buffer .= $this->_read($this->optionInt(self::OPTION_READ_BUFFER_SIZE, self::DEFAULT_OPTION_READ_BUFFER_SIZE));\n\t\t\t$pos = strpos($this->buffer, $this->EOL);\n\t\t\tif ($pos === false) {\n\t\t\t\tthrow new Exception_Protocol(\"Server returned a line not ending in EOL: $this->buffer\");\n\t\t\t}\n\t\t}\n\t\t$eol_len = strlen($this->EOL);\n\t\t$line = substr($this->buffer, 0, $pos + $eol_len);\n\t\t$this->buffer = substr($this->buffer, $pos + $eol_len);\n\t\treturn $line;\n\t}", "public function read($size=1024) {\n return socket_read($this->sock,$size,PHP_BINARY_READ);\n }", "public function getCharAt($offset = 0, $count = 1)\n {\n $offset += $this->getOffset();\n if ($offset >= 0) {\n return substr($this->stream, $offset, $count);\n } else {\n return false;\n }\n }", "public function read()\n {\n return trim(fgets($this->_stdin, 1024), \"\\r\\n\");\n }", "public function read(int $length): string\n {\n if ($length > self::READ_MAX_LENGTH) {\n throw Exception\\Socket::invalidLength($length, self::READ_MAX_LENGTH);\n }\n// $data = $this->stream->recvAll($length, $this->getReadTimeout());\n $data = $this->stream->recvAll($length);\n if ($data === false) {\n throw new Exception(\n sprintf('Read msg error %s:%d (%s [%d])', $this->host, $this->port, $this->stream->errMsg, $this->stream->errCode)\n );\n }\n return $data;\n }", "public function read($cmd = 'READ:') {\n $this->sendLine($cmd);\n return $this->php_serial->readPort();\n }", "public function readByte()\n {\n return ord($this->_data[$this->_position++]);\n }", "protected function readline() {\n\t\tif (!$this->socket) {\n\t\t throw new \\Exception(\"Not connected to IRC Server\");\n\t\t}\n\t\t\n\t\t$string = fgets($this->socket);\n\t\t\n\t\terror_log(\"IRC < $string\");\n\t\t\n\t\t//$result = explode(' ', $string, 2);\n\t\t//return trim($result[1]);\n\t\treturn $string;\n\t }", "public function read($length = 1024)\n {\n if (false === ($data = fread($this->fp, $length))) {\n throw new SocketException('socket read error');\n }\n return $data;\n }", "private function\n\tget_next_char()\n\t{\n\t\tif ( $this->linepos >= $this->bufsize )\n\t\t{\n\t\t\t// End of the buffer.\n\t\t\tif ( $this->bufsize != -1 )\n\t\t\t{\n\t\t\t\t$this->bufsize = -1;\n\t\t\t\t$this->lineno++;\n\t\t\t}\n\n\t\t\t$c = self::EOF;\n\t\t}\n\n\t\telse\n\t\t\t$c = $this->linebuf[$this->linepos++];\n\n\t\treturn $c;\n\t}", "public function read($length = 4096)\n {\n $this->connect();\n if (is_null($length)) {\n return fgets($this->socket);\n } else {\n return fgets($this->socket, $length);\n }\n }", "public function readByte()\n {\n if ($this->in == null) {\n return - 1;\n }\n $c = $this->in->readByte();\n if ($c == - 1) {\n $this->nextStream();\n return $this->readByte();\n }\n return $c;\n }", "private function _read()\n {\n $read = array($this->_conn['read']);\n if (stream_select($read, $w = null, $x = null, self::TIMEOUT, 15) > 0) {\n unset($w, $e);\n if ($reply = fgets($this->_conn['read'])) {\n return $reply;\n } else {\n throw new \\Seraphp\\Exceptions\\IOException('No reply in FIFO');\n }\n } else {\n throw new \\Seraphp\\Exceptions\\IOException('FIFO read timed out!');\n }\n }", "public function read() {\n\t\t\tif (($this->sts) && (!$this->eof)) {\n\t\t\t\tif ($this->pos < $this->len)\n\t\t\t\t\treturn $this->src[$this->pos++];\n\t\t\t\telse {\n\t\t\t\t\t$this->eof = true;\n\t\t\t\t\treturn '';\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function readChar($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function readUTF()\n {\n return $this->bin->readUTF();\n }", "protected function readString()\n {\n $length = $this->readInt();\n if ($length === -1) {\n return null;\n }\n else if ($length === 0) {\n return '';\n }\n else {\n return $this->socket->read($length);\n }\n }", "public function receiveOctet(): int\n {\n $binaryData = $this->receiveRaw(1);\n\n $translatedData = unpack('C', $binaryData);\n return $translatedData[1];\n }", "public function read ($bytes=1)\n {\n if ($this->cursor + $bytes > $this->length)\n return false;\n\n $str = substr ($this->string, $this->cursor, $bytes);\n $this->cursor += $bytes;\n\n return $str;\n }", "function client_read(StreamSocketInterface $socket, int $size = -1) \n\t{\n\t\treturn $socket->response($size);\n\t}", "public function readByte()\n {\n $this->position ++;\n return fread($this->handle, 1);\n }", "public function readSockLine($socket)\r\n {\r\n $line = '';\r\n while (true)\r\n {\r\n $byte = socket_read($socket, 1);\r\n if ($byte === false || $byte === '')\r\n break;\r\n if ($byte === \"\\0\")\r\n break;\r\n $line .= $byte;\r\n }\r\n return $line;\r\n }", "public static function readChar(string $message = '', bool $nl = false): string\n {\n $line = self::readln($message, $nl);\n\n return $line !== '' ? $line[0] : '';\n }", "public function readByte(): string\n {\n if ($this->isAtEndOfString())\n throw new \\Exception(\"unable to read Byte, StringReader already at End of String\");\n\n $byte = $this->string[$this->readerPos];\n ++$this->readerPos;\n return $byte;\n }", "function read() {}", "protected function _receiveResponse()\n {\n $result = $this->socket->read(4096);\n\n $this->socket->close();\n\n return trim($result);\n }", "public function read()\n {\n if (feof($this->_stream)) {\n $this->close();\n $this->_debug->info(\"ERROR: Server closed the connection.\");\n throw new Horde_Imap_Client_Exception(\n Horde_Imap_Client_Translation::t(\"POP3 Server closed the connection unexpectedly.\"),\n Horde_Imap_Client_Exception::DISCONNECT\n );\n }\n\n if (($read = fgets($this->_stream)) === false) {\n $this->_debug->info(\"ERROR: IMAP read/timeout error.\");\n throw new Horde_Imap_Client_Exception(\n Horde_Imap_Client_Translation::t(\"Error when communicating with the mail server.\"),\n Horde_Imap_Client_Exception::SERVER_READERROR\n );\n }\n\n $this->_debug->server(rtrim($read, \"\\r\\n\"));\n\n return $read;\n }", "public function readFromSocketWithGivenLength()\n {\n $this->mockSocket->expects($this->once())\n ->method('read')\n ->with($this->equalTo(3))\n ->will($this->returnValue('foo'));\n $this->assertEquals('foo', $this->socketInputStream->read(3));\n }", "public function readRawByte() {\n if ($this->position == $this->limit) {\n throw new TIndexOutOfBoundsException(\"Stream is EOF\");\n }\n $value = ord(substr($this->input, $this->position++, 1));\n return $value > 127 ? $value - 256 : $value;\n }", "public function read()\n {\n $this->ensureDeviceOpen();\n\n $chars = [];\n\n do {\n $char = fread($this->fd, 1);\n if ($char === '') {\n continue;\n }\n $chars[] = $char;\n } while ($char !== $this->getParser()->getSeparator());\n\n return $this->getParser()->parse($chars);\n }", "public function readByte()\n {\n return $this->bin->readByte(); // OK\n }", "function peekChar($cnt = 1)\r\n\t{\r\n\t\treturn substr($this->stream, $this->cursor, $cnt);\r\n\t}", "public function read() { return trim(fgets($this->handle)); }", "public function read($timeout = 1): string\n {\n if($this->debug === true) { echo \"\\nreceiving message : \\n\"; }\n stream_set_timeout($this->socket, $timeout);\n $read = stream_get_contents($this->socket, $this->length);\n if($this->debug === true) { echo $read.\"\\n\"; }\n return $read;\n }", "protected function readBytes()\n {\n $length = $this->readInt();\n if ($length === -1) {\n return null;\n }\n else if ($length === 0) {\n return '';\n }\n else {\n return $this->socket->read($length);\n }\n }", "public function charAt($idx) {\n if($idx < 0 || $idx > $this->length()) {\n throw new \\OutOfBoundsException(\"Index out of bounds.\");\n }\n return $this->buffer[$idx];\n }", "protected function getChar() {\n // Check to see if we had anything in the look ahead buffer and use that.\n if (isset($this->c)) {\n $char = $this->c;\n unset($this->c);\n\n // Otherwise we start pulling from the input.\n } else {\n $char = substr($this->input, $this->index, 1);\n\n // If the next character doesn't exist return false.\n if (isset($char) && $char === false) {\n return false;\n }\n\n // Otherwise increment the pointer and use this char.\n $this->index++;\n }\n\n // Normalize all whitespace except for the newline character into a\n // standard space.\n if($char !== \"\\n\" && ord($char) < 32) {\n return ' ';\n\t\t}\n return $char;\n }", "public function read($len);", "public function read($len);", "public function read($len);", "function mapi_read($socket=NULL) {\n\t\t# get the first 2 bytes\n\t\tif (($header = socket_read($socket, 2)) == FALSE) {\n\t\t\t$last_error = socket_strerror(socket_last_error());\n\t\t\tthrow new Exception('Lost connection with the server: ' . $last_error);\n\t\t}\n\t\t$data = \"\";\n\n\t\t$chunk_size = ((ord($header[1]) << 7) | (ord($header[0]) >> 1));\n\t\t// keep reading until we have everything\n\t\twhile (strlen($data) < $chunk_size) {\n\t\t\t$data .= socket_read($socket, $chunk_size - strlen($data));\n\t\t}\n\n\n\t\twhile ((ord($header[0]) & 1) == 0) {\n\t\t\tif (($header = socket_read($socket, 2)) == FALSE) {\n\t\t\t\t$last_error = socket_strerror(socket_last_error());\n\t\t\t\tthrow new Exception('Lost connection with the server: ' . $last_error);\n\t\t\t}\n\n\t\t\t$chunk_size = ((ord($header[1])) << 7) | (ord($header[0]) >> 1);\n\n\t\t\t$block = \"\";\n\t\t\twhile (strlen($block) < $chunk_size) {\n\t\t\t\tif (($block .= socket_read($socket, $chunk_size - strlen($block))) == FALSE) {\n\t\t\t\t\t$last_error = socket_strerror(socket_last_error());\n\t\t\t\t\tthrow new Exception('Lost connection with the server: ' . $last_error);\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t$data = $data . $block;\n\t\t}\n\t\tif (strlen($data) == 0) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\treturn $data;\n\t}", "private function readData(){\n\t\t$len= intval($this->getToken(), 10);\n\t\tif(strlen($this->readBuffer) - $this->readPos > $len){\n\t\t\t$data= substr($this->readBuffer, $this->readPos, $len);\n\t\t\t$this->readPos+= $len;\n\t\t}else{\n\t\t\t$data= substr($this->readBuffer, $this->readPos);\n\t\t\t$read= strlen($data);\n\t\t\t$this->clearBuffer();\n\t\t\twhile($read < $len){\n\t\t\t\t$part= $this->con->read($len - $read);\n\t\t\t\t$read+= strlen($part);\n\t\t\t\t$data.= $part;\n\t\t\t}\n\t\t}\n\t\t$this->fillBuffer();\n\t\t// skip the remaining \\r\\n\n\t\t$this->readPos+= 2;\n\t\treturn $data;\n\t}", "public function read($size = 512)\r\n {\r\n if (!$this->isConnected()) {\r\n return false;\r\n }\r\n $data = socket_read($this->socket, $size);\r\n if (!$data) {\r\n if ($this->getLastError() == 107) {\r\n $this->close();\r\n $this->socket = null;\r\n }\r\n }\r\n return $data;\r\n }", "public function readLine()\n\t{\n\t\tif(($idx = strpos($this->_buffer,\"\\n\")) === false) return false;\n\n\t\t$line = substr($this->_buffer,0,$idx);\n\t\t$this->_buffer = substr($this->_buffer,$idx+1);\n\t\treturn rtrim($line,\"\\n\");\n\t}", "protected function read(): string\n\t{\n\t\t$s = '';\n\t\twhile (($line = fgets($this->connection, 1000)) != null) { // intentionally ==\n\t\t\t$s .= $line;\n\t\t\tif (substr($line, 3, 1) === ' ') {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $s;\n\t}", "public function read(int $length);", "protected function read($length) {\n\t\tif ($this->length < $length) {\n\t\t\tthrow new \\Exception('Reading while at end of stream');\n\t\t}\n\t\t$output = substr($this->data, 0, $length);\n\t\t$this->data = substr($this->data, $length);\n\t\t$this->length -= $length;\n\t\treturn $output;\n\t}", "public function receive($length = self::DEFAULT_RECEIVE_LENGTH)\n\t{\n\t\t$buffer = '';\n\t\t$metadata['unread_bytes'] = 0;\n\t\t$makeBlockingAfterRead = false;\n\n\t\ttry {\n\t\t\tdo {\n\t\t\t\t// feof means socket has been closed\n\t\t\t\t// also, sometimes in long running processes the system seems to kill the underlying socket\n\t\t\t\tif (!$this->socket || feof($this->socket)) {\n\t\t\t\t\t$this->disconnect();\n\n\t\t\t\t\treturn $buffer;\n\t\t\t\t}\n\n\t\t\t\t$result = fread($this->socket, $length);\n\n\t\t\t\tif ($makeBlockingAfterRead) {\n\t\t\t\t\tstream_set_blocking($this->socket, true);\n\t\t\t\t\t$makeBlockingAfterRead = false;\n\t\t\t\t}\n\n\t\t\t\t// fread FALSE means socket has been closed\n\t\t\t\tif ($result === false) {\n\t\t\t\t\t$this->disconnect();\n\n\t\t\t\t\treturn $buffer;\n\t\t\t\t}\n\n\t\t\t\t$buffer .= $result;\n\n\t\t\t\t// feof means socket has been closed\n\t\t\t\tif (feof($this->socket)) {\n\t\t\t\t\t$this->disconnect();\n\n\t\t\t\t\treturn $buffer;\n\t\t\t\t}\n\n\t\t\t\t$continue = false;\n\n\t\t\t\tif (strlen($result) == 1) {\n\t\t\t\t\t// Workaround Chrome behavior (still needed?)\n\t\t\t\t\t$continue = true;\n\t\t\t\t}\n\n\t\t\t\tif (strlen($result) == $length) {\n\t\t\t\t\t$continue = true;\n\t\t\t\t}\n\n\t\t\t\t// Continue if more data to be read\n\t\t\t\t$metadata = stream_get_meta_data($this->socket);\n\n\t\t\t\tif ($metadata && isset($metadata['unread_bytes'])) {\n\t\t\t\t\tif (!$metadata['unread_bytes']) {\n\t\t\t\t\t\t// stop it, if we read a full message in previous time\n\t\t\t\t\t\t$continue = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$continue = true;\n\t\t\t\t\t\t// it makes sense only if unread_bytes less than DEFAULT_RECEIVE_LENGTH\n\t\t\t\t\t\tif ($length > $metadata['unread_bytes']) {\n\t\t\t\t\t\t\t// http://php.net/manual/en/function.stream-get-meta-data.php\n\t\t\t\t\t\t\t// 'unread_bytes' don't describes real length correctly.\n\t\t\t\t\t\t\t//$length = $metadata['unread_bytes'];\n\n\t\t\t\t\t\t\t// Socket is a blocking by default. When we do a blocking read from an empty\n\t\t\t\t\t\t\t// queue it will block and the server will hang. https://bugs.php.net/bug.php?id=1739\n\t\t\t\t\t\t\tstream_set_blocking($this->socket, false);\n\t\t\t\t\t\t\t$makeBlockingAfterRead = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} while ($continue);\n\n\t\t\treturn $buffer;\n\n\t\t} finally {\n\t\t\tif ($makeBlockingAfterRead) {\n\t\t\t\tstream_set_blocking($this->socket, true);\n\t\t\t}\n\t\t}\n\t}", "function read_socket(StreamSocketInterface $socket, int $size = -1)\n\t{\n\t\treturn $socket->read($size);\n\t}", "function read () {\n $buff = '';\n $select = $this->select(self::BLOCK_TIMEOUT);\n if ($select === false) {\n return false;\n } else if ($select > 0) {\n $buff = $this->readAll();\n }\n return $buff;\n }", "public function readLine();", "public function readLine();", "public function readLine();", "public function readLine();", "public function readLine();", "public function getChar()\n {\n return $this->char;\n }", "function scanCharacter()\n\t{\n\t\tif ($this->position < $this->length)\n\t\t{\n\t\t\treturn $this->rawtext[$this->position++];\n\t\t}\n\t}", "function read();", "function read();", "protected function read_message( $socket ) {\n\t\t$recv = socket_recv( $socket, $header, 4, MSG_WAITALL );\n\t\tif ( strlen( $header ) !== 4 )\n\t\t\tthrow new Exception( \"Prefork::read_message() failed receiving header\" );\n\t\t$length = current( unpack( 'N', $header ) );\n\t\t$recv = socket_recv( $socket, $message, $length, MSG_WAITALL );\n\t\tif ( strlen( $message ) !== $length )\n\t\t\tthrow new Exception( \"Prefork::read_message() failed receiving message\" );\n\t\treturn $message;\n\t}", "public function readLine(): string \n {\n return fgets($this->handle, 4096);\n }", "protected function writeAndReadSocket(string $buffer)\n {\n $this->writeSocket($buffer . self::SOCKET_MSG_ENDL);\n $read = $this->readSocket();\n if (!is_string($read) || $read === '') {\n throw new GdaemonClientException('No data from daemon');\n }\n\n return $read;\n }", "public function read($len)\n\t{\n\t\treturn $this->inBuf->read($len);\n\t}", "protected function readExpectedChar($ec) {\r\n $c = $this->seqSource->read();\r\n if ((is_string($ec) && $ec!=chr($c)) || (is_integer($ec) && $ec!=$c)) {\r\n throw new Exception(\"expected='$ec' actual='$c' at offset \".$this->seqSource->getPosition());\r\n }\r\n }", "public function stream_read($count) \r\n {\r\n $ret = substr($this->_data, $this->_pos, $count);\r\n $this->_pos += strlen($ret);\r\n return $ret;\r\n }", "public function readAll() {\r\n if (!$this -> mHandle) {\r\n $this -> setError('Not connected', 500, mlError);\r\n return '';\r\n } \r\n $lRet = '';\r\n while (!feof($this -> mHandle)) {\r\n $lTmp = fgets($this -> mHandle, $this -> mByteBuffer);\r\n $this -> dbg('READ : '.$lTmp);\r\n if ($lTmp === FALSE) {\r\n $this -> setError('TCP: Data not read', 102, mlError);\r\n return '';\r\n }\r\n $lRet.= $lTmp;\r\n }\r\n return $lRet;\r\n }", "function getUserChar(string $message, array $chars) {\n echo $message . \"\\n\";\n $char = stream_get_line(STDIN, 10, PHP_EOL);\n if (!in_array($char, $chars)) {\n die('Sorry, invalid input, please start again');\n }\n return $chars;\n}", "public function read(int $length = 8192): string\n {\n return iconv($this->charset, 'UTF-8', $this->inputStream->read($length));\n }", "public function readLine()\n {\n return $this->readUntil(PHP_EOL);\n }", "public function read(): string;", "public function read(): string;" ]
[ "0.75079906", "0.7420183", "0.7284678", "0.72392356", "0.71374947", "0.6942214", "0.6752611", "0.6669127", "0.65879595", "0.6517181", "0.651133", "0.64875215", "0.63716924", "0.62828976", "0.62625855", "0.6259967", "0.62346673", "0.62286276", "0.6179127", "0.6152439", "0.609468", "0.609468", "0.60879123", "0.6032023", "0.60290295", "0.59675974", "0.59587854", "0.5941613", "0.5883573", "0.5875083", "0.58046615", "0.5788187", "0.57785964", "0.5770299", "0.5770114", "0.5764611", "0.57480025", "0.57228684", "0.57035285", "0.569784", "0.56893194", "0.5683673", "0.56310445", "0.56299525", "0.5622975", "0.561443", "0.5599372", "0.5596437", "0.5588096", "0.5575366", "0.55524796", "0.55489177", "0.5545868", "0.55103683", "0.55020916", "0.5482057", "0.5472025", "0.54587466", "0.5430501", "0.54169774", "0.5409317", "0.54068923", "0.53923357", "0.538338", "0.5338529", "0.5333735", "0.53319395", "0.53319395", "0.53319395", "0.53139263", "0.5308602", "0.53028166", "0.5295595", "0.5293162", "0.52911884", "0.5287981", "0.52846754", "0.5271175", "0.52592343", "0.5234519", "0.5234519", "0.5234519", "0.5234519", "0.5234519", "0.5233502", "0.522951", "0.5211616", "0.5211616", "0.5210473", "0.5208154", "0.5195868", "0.5187575", "0.5166901", "0.51537216", "0.51518977", "0.5145", "0.5140465", "0.5136192", "0.51283413", "0.51283413" ]
0.8239107
0
Write a boolean to the socket.
Запишите булево значение в сокет.
protected function writeBoolean($value) { $this->socket->write(Binary::packByte((bool) $value)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writeBoolean(){\r\n\t\tdie('Not implemented');\r\n\t}", "protected function readBoolean()\n {\n $value = $this->socket->read(1);\n return (bool) Binary::unpackByte($value);\n }", "public function writeBoolean($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "function socket_send(Socket $socket, string $data, int $length, int $flags): int|false {}", "public function send($message){ \n if($this->modeOperation === 'server') return false;\n\n $this->sendReturn = @socket_write($this->socketClient, $message, strlen($message) ); \n if($this->sendReturn === false){\n\n if($this->onDisconnectMethod !== null){\n $method = $this->onDisconnectMethod;\n $response = $method((object)array('ip'=>$this->address, 'port'=>$this->port,'socket'=>$this->socketClient),$this); \n }\n \n return false;\n }else{\n return true;\n }\n }", "public function send() {\n if (!$this->client) {\n return false;\n }\n\n $this->addInt8($this->reason);\n \n Sockets::out($this->client, $this);\n\n return true;\n\n }", "function socket_write(Socket $socket, string $data, ?int $length = null): int|false {}", "public function write(string $message): bool\n {\n if($this->debug === true) { echo \"\\nsending message : $message \\n\"; }\n return fwrite($this->socket, $message, \\strlen($message));\n }", "public static function setBoolean(string $name, bool $value): bool\n {\n DynamicalWeb::$globalVariables['db 0x43'][$name] = (int)$value;\n return (bool)DynamicalWeb::$globalVariables['db 0x43'][$name];\n }", "public function send(): bool;", "public function send(): bool;", "public function write()\n {\n return false;\n }", "public function setWrite($var)\n {\n GPBUtil::checkBool($var);\n $this->write = $var;\n\n return $this;\n }", "public function setBoolean($identifier, $value);", "public function sendToSocket($socket, $message){ \n $this->sendReturn = @socket_write($socket, $message, strlen($message) ); \n if($this->sendReturn === false){\n return false;\n }else{\n return true;\n }\n }", "protected function _set_boolean($v)\n\t{\n\t\t//\tThese will have been cast to a TString object.\n\t\t$this->boolean->set(strtoupper(preg_replace('/(' . self::BOOLEAN . ')/i', '$1', $v)));\n\t}", "public function send($message)\r\n {\r\n if (!$this->isConnected()) {\r\n return false;\r\n }\r\n\r\n return socket_write($this->socket, $message . \"\\n\");\r\n }", "function socket_set_option(Socket $socket, int $level, int $option, $value): bool {}", "public function setBlocking($bool)\n {\n if ($bool) {\n @socket_set_block($this->resource);\n } else {\n @socket_set_nonblock($this->resource);\n }\n }", "private function replyStatusPacket() {\n fwrite($this->conn, pack(\"N\", 99999997));\n }", "public function send(int $flags) {}", "public function testEncodeAndDecodeBooleanTrue()\n {\n $value = true;\n // create new value type\n $si = new \\obray\\ipp\\types\\Boolean($value);\n // test length (should be 1 bytes)\n $this->assertSame(1, $si->getLength());\n // encode value to binary\n $binary = $si->encode();\n // convert binary to hex\n $hex = bin2hex($binary);\n // test if hex is correct\n $this->assertSame($hex, \"01\");\n // decode binary\n $decodedValue = $si->decode($binary)->getValue();\n // test if decoded value is same as original\n $this->assertSame($value, (boolean)$decodedValue);\n }", "function socket_set_nonblock(Socket $socket): bool {}", "public function getBoolean();", "public function getBoolean();", "public function readBoolean()\n {\n return $this->bin->readBoolean();\n }", "public function is_writable()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n if ($this->bound_write)\n return TRUE;\n\n try {\n $this->_bind('write');\n } catch (LDAP_Offline_Exception $e) {\n return FALSE;\n }\n\n return TRUE;\n }", "protected function writeByte($value)\n {\n $this->socket->write(Binary::packByte($value));\n }", "public function boolToBinary($val)\n {\n $saved_object_count = $this->writtenObjectCount++;\n $this->objectTable[$saved_object_count] = $val ? \"\\x9\" : \"\\x8\"; // 0x9 is 1001, type indicator for true; 0x8 is 1000, type indicator for false\n return $saved_object_count;\n }", "function client_write(StreamSocketInterface $socket, string $response = null) \n\t{\n\t\treturn \\write_socket($socket, $response);\n\t}", "public function write($string) \n {\n if ($string !== '') {\n $string = (string)$string . Rediska::EOL;\n\n $this->connect();\n\n\t while ($string !== '') {\n\t $bytes = @fwrite($this->_socket, $string);\n\t\n\t if ($bytes === false) {\n\t $this->disconnect();\n\t throw new Rediska_Connection_Exception(\"Can't write to socket.\");\n\t }\n\t\n\t if ($bytes == 0) {\n\t return true;\n\t }\n\t\n\t $string = substr($string, $bytes);\n\t }\n\n\t return true;\n } else {\n \treturn false;\n }\n }", "public function serializeBool( $boolValue )\n {\n return ( $boolValue ? 'true' : 'false' );\n }", "function socket_sendto(Socket $socket, string $data, int $length, int $flags, string $address, ?int $port = null): int|false {}", "public function write($data)\n {\n if (!fwrite($this->fp, $data)) {\n throw new SocketException(\"socket write:{$data} error\");\n }\n return true;\n }", "protected function writeShort($value)\n {\n $this->socket->write(Binary::packShort($value));\n }", "function set($index, $value) {\n\t\t\tif($index >= $this->Length)\n\t\t\t\treturn false;\n\t\t\t\t\n\t\t\tif(!is_bool($value))\n\t\t\t\treturn false;\n\t\t\telse \n\t\t\t\t$this->BitString[$index]\t=\t$this->bool2int($value);\n\t\t\t\t\n\t\t\treturn true;\n\t\t}", "public function isSynched($bool=null);", "function ping()\n {\n if(!$this->is_connected())\n return false;\n fwrite($this->sock,$this->make_packet($this->MRIM_CS_PING));\n return true;\n }", "public function setDirect($bool) {\r\n\t\t$this->direct = $bool;\r\n\t}", "function net_write($handle, string $response = '')\n {\n return Networks::write($handle, $response);\n }", "function SERVER_setServerBoolSetting($var, $val)\n{\n\tRMV_set4IP($var, ($val ? 1 : 0), 'm23ServerSetting');\n}", "function net_write($handle, string $response = '')\n {\n return Network::write($handle, $response);\n }", "public function testEncodeAndDecodeBooleanFalse()\n {\n $value = false;\n // create new value type\n $si = new \\obray\\ipp\\types\\Boolean($value);\n // test length (should be 1 bytes)\n $this->assertSame(1, $si->getLength());\n // encode value to binary\n $binary = $si->encode();\n // convert binary to hex\n $hex = bin2hex($binary);\n // test if hex is correct\n $this->assertSame($hex, \"00\");\n // decode binary\n $decodedValue = $si->decode($binary)->getValue();\n // test if decoded value is same as original\n $this->assertSame($value, (boolean)$decodedValue);\n }", "public function setBlocking(bool $bool): StreamInterface;", "public static function put(): Boolean \n {\n return false;\n }", "public function toRedisBoolean(bool $boolean) : int\n {\n if ($boolean) {\n return 1;\n } else {\n return 0;\n }\n }", "public static function set(string $flag, bool $value = true): bool\n {\n if (!isset(static::$default)) {\n self::capture();\n }\n\n if ($value) {\n self::system(sprintf(\"stty %s\", $flag));\n } else {\n self::system(sprintf(\"stty -%s\", $flag));\n }\n\n return static::changed();\n }", "function socket_bind(Socket $socket, string $address, int $port = 0): bool {}", "public function serialize($value)\n {\n return \\is_null($value) ? $value : (bool) $value;\n }", "public function boolean(): bool {\n return (bool)$this->data();\n }", "protected function setBool(){\n $this->bool = array(\n\t 'true'=>1,\n\t 'false'=>0,\n\t 'yes'=>1,\n\t 'no'=>0,\n\t\t'on'=>1,\n\t\t'off'=>0,\n\t);\n }", "public function getBool()\n {\n return $this->bool;\n }", "function socket_set_block(Socket $socket): bool {}", "public function send()\n {\n\n return true;\n }", "public function serializeBool($value, stubXMLStreamWriter $xmlWriter, $tagName = null)\n {\n if (null === $tagName) {\n $tagName = 'boolean';\n }\n\n return $this->serializeScalarValue((true === $value ? 'true' : 'false'), $xmlWriter, $tagName);\n }", "public function setEnabled($boolean)\n {\n $this->isEnabled = !!$boolean;\n }", "public function bool(): self {\r\n\r\n $this -> type = 'bool';\r\n return $this;\r\n }", "function socket_sendmsg(\n Socket $socket,\n array $message,\n #[PhpStormStubsElementAvailable(from: '5.5', to: '7.4')] int $flags,\n #[PhpStormStubsElementAvailable(from: '8.0')] int $flags = 0\n): int|false {}", "public function buildBooleanColumn($columnName, $sparqlQuery)\n\t{\n\t\t$this->buildColumnStructure($columnName, 'bool not null default 0');\n\t\t\n\t\t$engine = new SPARQL_Engine;\n\t\t$engine->useSparql($sparqlQuery);\n\t\t$sql = $engine->getSql();\n\t\n\t\t$this->report(\"Building boolean column '$columnName' ... \");\n\t\tdebug_time_measure(__METHOD__);\n\t\t\n\t\t\t$store = GAMA_Store::singleton();\n\t\t\t$store->sql(\"\n\t\t\t\tupdate\n\t\t\t\t\t{$this->targetProperty->getStmtTab()} as target,\n\t\t\t\t\t(\n\t\t\t\t\t\tselect r.id\n\t\t\t\t\t\tfrom ($sql) as x join RESOURCE as r on r.uri = x.uri\n\t\t\t\t\t) as source\n\t\t\t\tset target.$columnName = 1\n\t\t\t\twhere target.subject = source.id;\n\t\t\t\t\n\t\t\t\talter table {$this->targetProperty->getStmtTab()} add index ($columnName);\n\t\t\t\");\n\t\t$this->report(debug_time_measure(__METHOD__).\" seconds\\n\");\n\t}", "public function canWrite();", "public function isConnected() {\n return (boolean) $this->conn;\n }", "public function isOpenForWriting() {\n return $this->isOpen();\n }", "public function setBoolValue($boolValue)\n {\n // ignore this\n }", "abstract public function write(Entity\\Station $station): bool;", "public function formatBool($value);", "public function send(string $message) : bool\n {\n // close opposite FD\n $this->sockets[$this->isChild() ? self::PARENT : self::CHILD]->close();\n\n $who = $this->isChild() ? self::CHILD : self::PARENT;\n return $this->sockets[$who]->write($message) ? true : false;\n }", "function write_socket(StreamSocketInterface $socket, string $response = null)\n\t{\n\t\treturn $socket->write($response);\n\t}", "public function toBool() {\n\n\t\tif ($this->nodeValue === 'true') {\n\t\t\treturn true;\n\t\t} else if ($this->nodeValue === 'false') {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn (bool) $this->nodeValue;\n\t\t}\n\t}", "public static function boolean($val)\n\t{\n\t\treturn ($val ? '<span class=\"state on\"><span>' . Lang::txt('JON') : '<span class=\"state off\"><span>' . Lang::txt('JOFF')) . '</span></span>';\n\t}", "public function send($data) {\n $len = strlen($data);\n if ($this->v) l('Sending '.$len.' byte(s): '.$data);\n $sent = socket_write($this->sock, $data, $len);\n return ($sent === $len);\n }", "public function boolean($key);", "public function isConnected()\n {\n return (bool)$this->_connected;\n }", "public function send() {\r\n if (!$this->client) {\r\n return false;\r\n }\r\n\r\n $this->addInt16(1011);// Size packet \r\n $this->addInt32(12900166);\r\n $this->addInt32(1704);\r\n $this->addInt32($this->x);\r\n $this->addInt32($this->y); \r\n $this->addInt32(strlen($this->layoutCompress)-4);//Entries Length + 4\r\n $this->addInt32(strlen($this->layout));//Layout Length\r\n $this->addText($this->layoutCompress);\r\n $this->addInt32(0);//Lines Count\r\n $this->addInt32(strlen($this->textCompress)-4);//String Length + 4\r\n $this->addText(strlen($this->text)); //String Decoded + 4\r\n $this->addText($this->textCompress); \r\n \r\n Sockets::out($this->client, $this); \r\n return true;\r\n }", "public function getIsActive(): bool\n {\n return $this->socket->getIsActive();\n }", "public function bool(bool $value, string $trueChar = '*', string $falseChar = '-'): string\n {\n return $value == true ? $this->true($trueChar) : $this->false($falseChar);\n }", "public function boolean($key)\n\t{\n\t\treturn $this->raw($key) ? true : false;\n\t}", "public function boolean_example()\n\t{\n\t\t$this->expect_boolean_true(TRUE);\n\t\t$this->expect_boolean_false(FALSE);\n\t}", "public function setCanAccept(?bool $value): void {\n $this->getBackingStore()->set('canAccept', $value);\n }", "public function send()\n {\n return false;\n }", "public function check_write()\n\t{\n\t\treturn ( ! $this->_has_written );\n\t}", "private function setWrite($write = false)\n {\n try {\n if (\n ! is_bool(\n $write\n )\n ) {\n throw new \\InvalidArgumentException(\n 'Invalid session write.'\n );\n }\n\n $this->write = $write;\n }\n catch (\n InvalidArgumentException $exception\n ) {\n echo $exception->getMessage();\n exit;\n }\n\n return $this;\n }", "public function boolean(): static\n {\n $this->type = Metadata::TYPE_BOOLEAN;\n\n return $this;\n }", "function _bool($boolean)\n {\n return (bool)$boolean;\n }", "public function getBoolValue()\n {\n return true;\n }", "public function write(string $key, $value): bool\n {\n $this->data[$this->key($key)] = $value;\n\n return true;\n }", "public function is_writable() {\n\t\treturn $this->writable;\n\t}", "public function putBoolean(Object $o, $key, $x = null)\n {\n $x = (boolean) $x;\n try {\n $cl = $o->getClass();\n $f = $cl->getField($key);\n if ($f->getType() == PrimitiveType::BOOLEAN()) {\n $f->setAccessible(true);\n $f->set($o, $x);\n }\n } catch (\\Exception $e) {\n throw new RuntimeException();\n }\n }", "public function send($message)\n {\n if (!$this->isAlive())\n {\n return false;\n }\n\n $this->debug('send message > ' . $message);\n $len = strlen($message);\n $this->logging('info', 'Send %d bytes data started', $len);\n $writed = 0;\n for ($written = 0; $written < $len; $written += $writed)\n {\n $writed = fwrite($this->_resource, substr($message, $written));\n if ($writed === false)\n {\n $this->addError(null, sprintf('Aborted sending data at %d bytes written', $written));\n return false;\n }\n }\n $this->logging('info', 'Sent %d bytes data succeed', $len);\n return true;\n }", "function socket_shutdown(Socket $socket, int $mode = 2): bool {}", "public function fromRedisBoolean($boolean) : bool\n {\n return $boolean == 1;\n }", "public function isBoolean()\n\t{\n\t\treturn true;\n\t}", "public function setOn()\n {\n $pinId = $this->getPinId();\n $on = $this->setHigh($pinId);\n\n // Make sure the device turns on\n if ($on) {\n $this->setStatus($pinId, 'on');\n $this->setState($pinId, 'on');\n return true;\n }\n\n // The device didn't get turned on. Send help.\n return false;\n }", "public function isWrite() {\n\t\tif ($this->write === -1) {\n\t\t\t$this->write = !in_array(strtoupper($this->request->method()), array('GET', 'HEAD'));\n//\t\t\t$this->write = in_array(strtoupper($this->request->method()), array('POST', 'PUT', 'DELETE', 'PATCH'));\n\t\t}\n\t\treturn $this->write;\n\t}", "function formatBool($value);", "function sendSwitchMessage($pipe, $state) {\n\n $msg = array(\"nodeid\" => $pipe, \"action\" => 0, \"state\" => intval($state));\n\n $fp = stream_socket_client(\"tcp://localhost:30000\", $errno, $errstr);\n\n fwrite($fp, json_encode($msg, JSON_NUMERIC_CHECK));\n fclose($fp);\n}", "public function testSetTestBoolean()\n {\n $boolean = true;\n $authRevoke = new AuthRevoke();\n $return = $authRevoke->setTest($boolean);\n $this->assertInstanceOf(AuthRevoke::class, $return);\n }", "#[@test]\n public function bool_wrapper() {\n $this->assertEquals(\n new Boolean(TRUE),\n $this->fixture->convert(Primitive::$BOOL->wrapperClass(), TRUE)\n );\n }", "public function getBoolOneof()\n {\n return $this->readOneof(6);\n }", "public function setLockable($bool)\n {\n $this->isLockable = $bool;\n }", "public function write(): bool\n {\n try {\n $data = isset($this->data) ? $this->data : \"This is incorrect\";\n if ($this->folder_name == \"www\") {\n $myfile = fopen($this->file_name, $this->status);\n } else {\n if (!file_exists($this->folder_name) && !is_dir($this->folder_name)) {\n mkdir($this->folder_name);\n }\n $myfile = fopen($this->folder_name . \"/\" . $this->file_name, $this->status);\n }\n fwrite($myfile, \"\\n\" . $data . \"\\n\");\n fclose($myfile);\n\n return true;\n } catch (Exception $th) {\n return false;\n }\n }" ]
[ "0.6515628", "0.62820804", "0.61840105", "0.6065007", "0.59974486", "0.5987313", "0.57596606", "0.5734712", "0.571133", "0.56681883", "0.56681883", "0.56599444", "0.5622483", "0.56150866", "0.5602005", "0.55868006", "0.5506231", "0.54796964", "0.54396373", "0.5429241", "0.53979635", "0.53353363", "0.5257331", "0.52490664", "0.52490664", "0.52372974", "0.5230386", "0.52301437", "0.52063614", "0.51975965", "0.5180461", "0.5177034", "0.5166976", "0.5142243", "0.51296705", "0.51248646", "0.5120977", "0.5120455", "0.50892323", "0.5080018", "0.5075046", "0.5054916", "0.50420153", "0.5031038", "0.5029838", "0.50293213", "0.5007293", "0.50063974", "0.50023025", "0.49922794", "0.49841648", "0.4979147", "0.49743444", "0.49668697", "0.4957113", "0.49547213", "0.49443555", "0.49351874", "0.49177927", "0.491411", "0.48964193", "0.48950943", "0.48861027", "0.48647752", "0.48529226", "0.4851418", "0.4849194", "0.48484355", "0.48363638", "0.4834308", "0.48342326", "0.48312652", "0.48177063", "0.4802235", "0.48021877", "0.47966778", "0.47878996", "0.4785869", "0.47841188", "0.4783746", "0.477938", "0.47785413", "0.47773197", "0.47687754", "0.47677016", "0.4766275", "0.4763373", "0.47605148", "0.47582528", "0.47527814", "0.47399804", "0.47348934", "0.47347134", "0.4729396", "0.47288242", "0.47286", "0.47277272", "0.47258222", "0.47241247", "0.47175542" ]
0.7896792
0
Read a boolean from the socket.
Считать логическое значение из сокета.
protected function readBoolean() { $value = $this->socket->read(1); return (bool) Binary::unpackByte($value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function readBoolean()\n {\n return $this->bin->readBoolean();\n }", "function socket_read(Socket $socket, int $length, int $mode = PHP_BINARY_READ): string|false {}", "protected function read()\n {\n return $this->readBoolean();\n }", "public function isRead(): bool;", "public function read()\n\t{\n\t\t$this->connect();\n\n\t\t$data = '';\n\n\t\twhile(!feof($this->socket))\n\t\t{\n\t\t\t$data .= fgets($this->socket, 1024);\n\t\t}\n\n\t\treturn strlen($data) ? $data : false;\n\t}", "protected function read() : bool\n {\n if (feof($this->socket)) {\n $this->connect();\n }\n // try to read 1 byte from the socket\n $type = stream_get_contents($this->socket, 1);\n\n if (strlen($type) == 0) {\n // no data yet\n return false;\n }\n\n $type = unpack('C', $type)[1];\n\n // got a packet, read length\n $multiplier = 1;\n $len = 0;\n do {\n $encodedByte = unpack('C', stream_get_contents($this->socket, 1))[1];\n $len += ($encodedByte & 0x7F) * $multiplier;\n $multiplier *= 0x80;\n if ($multiplier > 0x80*0x80*0x80) {\n throw new \\RuntimeException(\"Malformed length\");\n }\n } while (($encodedByte & 0x80) != 0);\n\n $data = stream_get_contents($this->socket, $len);\n\n // split the type and flags\n $flags = $type & 0x0F;\n $type = $type & 0xF0;\n\n switch ($type) {\n case self::TYPE_CONNACK:\n case self::TYPE_PINGREQ:\n case self::TYPE_PINGRESP:\n // nothing to do here\n break;\n case self::TYPE_SUBACK:\n $ident = unpack('nident', $data)['ident'];\n unset($this->state[$ident]);\n break;\n case self::TYPE_PUBLISH:\n $this->recvPublish($flags, $data);\n break;\n case self::TYPE_PUBREL:\n $this->recvPubrel($flags, $data);\n break;\n case self::TYPE_PUBACK:\n // TODO verify qos type\n $ident = unpack('n', $data)[1];\n unset($this->state[$ident]);\n case self::TYPE_PUBREC:\n // send PUBREL\n // TODO verify qos type\n $ident = unpack('n', $data)[1];\n $headers = pack('n', $ident);\n $this->send(self::TYPE_PUBREL | self::FLAG_PUBREL, $headers, '');\n $this->state[$ident] = [\n 'last_change' => time(),\n 'onfail' => function() use ($headers) {\n $this->send(self::TYPE_PUBREL | self::FLAG_PUBREL, $headers, '');\n }\n ];\n break;\n case self::TYPE_PUBCOMP:\n // finish publish qos 2\n // TODO verify qos type\n $ident = unpack('n', $data)[1];\n unset($this->state[$ident]);\n break;\n default:\n // unknown type, just ignore for now\n break;\n }\n\n return true;\n }", "function socket_recv(Socket $socket, &$data, int $length, int $flags): int|false {}", "public function getIsRead()\n {\n return $this->isRead;\n }", "public function isRead()\n {\n return $this->read;\n }", "public function read()\n {\n return false;\n }", "function readConnected() { return ($this->_connection!=null); }", "public function Read() {\n \n $raw = @socket_read( $this->socket, 512, PHP_NORMAL_READ );\n if ($raw === FALSE) {\n slog( \"Failed to read; \". socket_strerror( socket_last_error( $this->socket ) ) );\n $this->Close();\n return false;\n }\n\n if ($this->buffer) $raw = $this->buffer.$raw;\n\n if (substr($raw,-1) != \"\\n\") {\n $this->buffer = $raw;\n return false;\n }\n\n _log( $raw = trim( $raw ), \"<-\" );\n $this->buffer = \"\";\n unset( $this->Message );\n $this->Message = new Message( trim($raw) );\n return true;\n\n }", "protected function parseBoolean() {\r\n $retval = null;\r\n $c = chr($this->seqSource->peek());\r\n if( $c == 't' ) {\r\n $trueString = $this->seqSource->readFully( 4 );\r\n if( $trueString!=TRUE ) {\r\n throw new Exception( \"Error parsing boolean: expected='true' actual='\".$trueString. \r\n \"' at offset \".$this->seqSource->getPosition());\r\n } else {\r\n $retval = COSBoolean::TRUE;\r\n }\r\n } else if( $c == 'f' ) {\r\n $falseString = $this->seqSource->readFully( 5 );\r\n if( $falseString!=FALSE ) {\r\n throw new Exception( \"Error parsing boolean: expected='true' actual='\".$falseString.\r\n \"' at offset \".$this->seqSource->getPosition());\r\n } else {\r\n $retval = COSBoolean::FALSE;\r\n }\r\n } else {\r\n throw new Exception( \"Error parsing boolean expected='t or f' actual='\".$c.\r\n \"' at offset \".$this->seqSource->getPosition());\r\n }\r\n return $retval;\r\n }", "public function getIs_read()\n {\n return $this->is_read;\n }", "abstract protected function checkReadMode(): bool;", "public function getBoolean();", "public function getBoolean();", "public function getReadStatus();", "public function isRead()\n {\n }", "public function shutdownRead()\n {\n if (!is_resource($this->stream)) {\n return false;\n }\n\n $this->isDegenerated = true;\n\n return stream_socket_shutdown($this->stream, STREAM_SHUT_RD);\n }", "public function receiveBit(): int\n {\n $rawByte = $this->receiveRaw(1);\n\n $value = @($rawByte & 1) ? 1 : 0;\n return $value;\n }", "public function read($length = 1024) {\n if (!$this->_receivedResponse) {\n return false;\n }\n\n $response = $this->_receivedResponse;\n $this->_receivedResponse = false;\n\n return $response;\n }", "protected function readByte()\n {\n return Binary::unpackByte($this->socket->read(1));\n }", "private function read() {\n return fgets( $this->socket, 128 );\n }", "public function isConnected(): bool\n {\n return $this->socket && is_resource($this->socket) && !feof($this->socket);\n }", "public function read()\n {\n try {\n $result = $this->adapter()->read();\n } catch (\\Exception $e) {\n $result = false;\n trigger_error('Remote access error: ' . $e->getMessage(), E_USER_WARNING);\n }\n\n return $result;\n }", "abstract public function canRead();", "protected function read($command, $output = true) {\n\t\t\tif( !$this->connected )\n\t\t\t\tthrow new NotConnectedException(\"{$this->address}:{$this->port}\");\n\t\t\t// normal, direct mode\n\t\t\t$line = fgets($this->socket);\n\t\t\t$type = $line[0];\n\t\t\t$line = substr($line, 1, strlen($line) - 3);\n\t\t\tswitch($type) {\n\t\t\t\tcase '+':\n\t\t\t\t\t// status reply\n\t\t\t\t\tif( method_exists($command, 'output') && $output )\n\t\t\t\t\t\treturn $command->output($line);\n\t\t\t\t\treturn ($line == 'OK');\n\t\t\t\tcase ':':\n\t\t\t\t\t// integer reply\n\t\t\t\t\tif( method_exists($command, 'output') && $output )\n\t\t\t\t\t\treturn $command->output($line);\n\t\t\t\t\treturn intval($line);\n\t\t\t\tcase '$':\n\t\t\t\t\t// bulk reply\n\t\t\t\t\t$count = intval($line);\n\t\t\t\t\tif( $count == -1 )\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t$line = fgets($this->socket, $count + 3);\n\t\t\t\t\tif( method_exists($command, 'output') && $output)\n\t\t\t\t\t\treturn $command->output(substr($line, 0, strlen($line) - 2));\n\t\t\t\t\treturn substr($line, 0, strlen($line) - 2);\n\t\t\t\tcase '*':\n\t\t\t\t\t// multi bulk reply\n\t\t\t\t\t$count = intval($line);\n\t\t\t\t\t$result = null;\n\t\t\t\t\tfor($i = 0; $i < $count; $i++) {\n\t\t\t\t\t\t$result[] = $this->read($command, false);\n\t\t\t\t\t}\n\t\t\t\t\tif( $result == null ) {\n\t\t\t\t\t\t// a timeout occured\n\t\t\t\t\t\t// $result = array();\n\t\t\t\t\t}\n\t\t\t\t\tif( method_exists($command, 'output') && $output )\n\t\t\t\t\t\treturn $command->output($result);\n\t\t\t\t\treturn $result;\t\t\t\t\t\n\t\t\t\tcase '-':\n\t\t\t\t\t// error reply\n\t\t\t\t\tthrow new RedisServerException($line);\n\t\t\t\tcase false:\n\t\t\t\t\tthrow new RuntimeException(\"timeout\");\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new RuntimeException(\"received bad reply: '{$type}{$line}'\");\n\t\t\t}\n\t\t}", "public function isOpenForReading() {\n return $this->isOpen();\n }", "function is_connected()\n {\n if(!is_resource($this->sock) || feof($this->sock))\n return false;\n return true;\n }", "public function isConnected() {\n return (boolean) $this->conn;\n }", "public function read($size = 512)\r\n {\r\n if (!$this->isConnected()) {\r\n return false;\r\n }\r\n $data = socket_read($this->socket, $size);\r\n if (!$data) {\r\n if ($this->getLastError() == 107) {\r\n $this->close();\r\n $this->socket = null;\r\n }\r\n }\r\n return $data;\r\n }", "public function isOpen()\n {\n return $this->socket !== null;\n }", "public function readBoolean($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function get_object_read() {\n return (bool) $this->object_read;\n }", "public function getIsActive(): bool\n {\n return $this->socket->getIsActive();\n }", "function socket_accept(Socket $socket): Socket|false {}", "public function getIsActive()\n {\n return $this->_socket !== null;\n }", "protected function readShort()\n {\n return Binary::unpackShort($this->socket->read(2));\n }", "function socket_recvfrom(Socket $socket, &$data, int $length, int $flags, &$address, &$port = null): int|false {}", "public function read($size=1024) {\n return socket_read($this->sock,$size,PHP_BINARY_READ);\n }", "public function boolean(): bool {\n return (bool)$this->data();\n }", "public function isConnected()\n {\n return (bool)$this->_connected;\n }", "public function read()\n\t{\n\t\t// Get the record header (first 8 bytes required)\n\t\t$data = fread($this->socket, 8);\n\t\tif (($len = strlen($data)) < 8) {\n\t\t\tif ($len > 0) {fseek($this->socket, 0 - $len, SEEK_CUR);}\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Parse the record header\n\t\t$this->version = ord($data[0]);\n\t\t$this->type = ord($data[1]);\n\t\t$this->length = (ord($data[4]) << 8) + ord($data[5]);\n\t\t$this->padding = ord($data[6]);\n\t\t$this->content = '';\n\t\t\n\t\tif ($this->debug) {cecho(\"--> Received record ({$this->requestID}:{$this->type}:{$this->length})\\n\");}\n\t\t\n\t\t// Get the record content\n\t\twhile (($clen = strlen($this->content)) < $this->length) {\n\t\t\tif(($data = fread($this->socket, $this->length - $clen)) === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$this->content .= $data;\n\t\t}\n\t\t\t\t\n\t\t// Skip over any padding\n\t\tif ($this->padding > 0) {\n\t\t\tfseek($this->socket, $this->padding, SEEK_CUR);\n\t\t}\n\t\t\n\t\t// Parse the content\n\t\tif ($this->type == MFCGI::END_REQUEST) {\n\n\t\t\t// Decode application status\n\t\t\t$this->appStatus = ord($this->content[0]) << 24;\n\t\t\t$this->appStatus += ord($this->content[1]) << 16;\n\t\t\t$this->appStatus += ord($this->content[2]) << 8;\n\t\t\t$this->appStatus += ord($this->content[3]);\n\t\t\t\n\t\t\t// Decode protocol status\n\t\t\t$this->protocolStatus = ord($this->content[4]);\n\t\t\t// 5-7 = reserved\t\t\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public function isReadable()\n {\n return !$this->isClosed;\n }", "public function isOpen()\n {\n return $this->client->sock > 0;\n }", "public function getBool()\n {\n return $this->bool;\n }", "public function get_boolean($key)\n {\n return $this->get($key) == '1' ? true : false;\n }", "function isReadable() {\n return (!$this->closed);\n }", "public function setRead($var)\n {\n GPBUtil::checkBool($var);\n $this->read = $var;\n\n return $this;\n }", "public function ready()\n {\n return (boolean) $this->message();\n }", "public function isConnected()\r\n {\r\n return !is_null($this->socket);\r\n }", "function client_read(StreamSocketInterface $socket, int $size = -1) \n\t{\n\t\treturn $socket->response($size);\n\t}", "public function fromRedisBoolean($boolean) : bool\n {\n return $boolean == 1;\n }", "public function isConnected() {\n return $this->socket !== null && $this->socket->isConnected();\n }", "public function getRead()\n {\n return $this->read;\n }", "public function getRead()\n {\n return $this->read;\n }", "public function getRead()\n {\n return $this->read;\n }", "public function read($length) // TODO: add return type\r\n {\r\n // so we use stream_get_contents\r\n $ret = stream_get_contents($this->f, $length);\r\n if (strlen($ret) == 0)\r\n return false;\r\n return $ret;\r\n }", "public function nextBoolean(): bool\n {\n $this->expect(JsonToken::BOOLEAN);\n\n $result = (bool)$this->pop();\n\n $this->incrementPathIndex();\n\n return $result;\n }", "public function isConnected()\n {\n if (is_resource($this->socket)) {\n $meta = stream_get_meta_data($this->socket);\n return $meta['timed_out'] === false;\n }\n\n return false;\n }", "public function read($cmd = 'READ:') {\n $this->sendLine($cmd);\n return $this->php_serial->readPort();\n }", "function socketStatus(&$fh)\n {\n $return = false;\n if (is_resource($fh)) {\n $temp = socket_get_status($fh);\n if ($temp['timed_out']) {\n $this->_log('raw', 'e', 'SOCKET TIMED OUT');\n $return = true;\n }\n if ($temp['eof']) {\n $this->_log('raw', 'e', 'SOCKET EOF');\n $return = true;\n }\n unset($temp);\n }\n return $return;\n }", "public function connectToInputDaemon()\n {\n $socket = @stream_socket_client('tcp://localhost:8889', $errno, $errstr, 30);\n if ($socket) {\n $this->readSockets[] = $socket;\n\n return true;\n }\n\n return false;\n }", "public function boolean($key)\n\t{\n\t\treturn $this->raw($key) ? true : false;\n\t}", "public function getIsReadAttribute()\n {\n return $this->isRead();\n }", "public function getBool()\n {\n return $this->getInt() % 2 === 0;\n }", "public function getBooleanValue() {}", "public function isConnected()\n\t{\n\t return (bool) $this->getDocument();\n\t}", "function read() {}", "protected function writeBoolean($value)\n {\n $this->socket->write(Binary::packByte((bool) $value));\n }", "public function isConnected(): bool;", "public function isConnected(): bool;", "public function isConnected(): bool;", "public function isConnected(): bool;", "public function isReceivingDataAvailable() { // {{{\n\t\tif (!$this->success || !$this->isReadMode) return false;\n\t\tif (!isset($this->commChanFdArr[0]) || !is_resource($this->commChanFdArr[0])) return false;\n\n\t\t$commChanFdArr = $this->commChanFdArr;\n\t\t$write = null; $except = null;\n\t\treturn (stream_select($commChanFdArr, $write, $except, 0, 15000) != 0);\n\t}", "protected function recvStr($read = true)\n\t{\n\t\t$str = @fgets($this->socket);\n\t\tif(!$str)\n\t\t{\n\t\t\t$this->disconnect();\n\t\t\tthrow new \\HandlerSocket\\IOException('Cannot read from socket');\n\t\t}\n\t\treturn substr($str,0,-1);\n\t}", "function isActive () {\n\t\t$this->buffer .= $this->listen();\n\t\t$f = stream_get_meta_data ($this->pipes[1]);\n\t\treturn !$f[\"eof\"];\n\t}", "public function isSocketOpened(): bool\n {\n return $this->socket != null && is_resource($this->socket);\n }", "public function isConnected(): bool\n {\n return $this->stream->isConnected();\n }", "function read_socket(StreamSocketInterface $socket, int $size = -1)\n\t{\n\t\treturn $socket->read($size);\n\t}", "function bool_from_yn($yn)\n{\n}", "public function getBoolValue()\n {\n return $this->readOneof(4);\n }", "public function toBool() {\n\n\t\tif ($this->nodeValue === 'true') {\n\t\t\treturn true;\n\t\t} else if ($this->nodeValue === 'false') {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn (bool) $this->nodeValue;\n\t\t}\n\t}", "public function isReadable(): bool {\n\t\treturn $this->_readable;\n\t}", "protected function readInt()\n {\n return Binary::unpackInt($this->socket->read(4));\n }", "function get_state_connection() {\n $f = fopen(\"/var/www/html/checkInternet.txt\", \"r\");\n if ($f) {\n $result = fgets($f);\n fclose($f);\n return $result == 1;\n\t}\n\techo \"get_state_connection failed\";\n\treturn false;\n}", "public function getBoolValue()\n {\n return $this->readOneof(1);\n }", "function read();", "function read();", "public function isConnected(): bool {\n $connected = (bool)$this->connection;\n return $connected;\n }", "public static function getBoolean()\n {\n fscanf(STDIN, \"%s\\n\", $val);\n while ($val !== 't' && $val !== 'f') {\n echo \"invalid input enter again\\n\";\n fscanf(STDIN, \" %s\\n \", $val);\n }\n return $val;\n }", "public static function getBoolean()\n {\n fscanf(STDIN, \"%s\\n\", $val);\n while ($val !== 't' && $val !== 'f') {\n echo \"invalid input enter again\\n\";\n fscanf(STDIN, \" %s\\n \", $val);\n }\n return $val;\n }", "private function _read()\n {\n $read = array($this->_conn['read']);\n if (stream_select($read, $w = null, $x = null, self::TIMEOUT, 15) > 0) {\n unset($w, $e);\n if ($reply = fgets($this->_conn['read'])) {\n return $reply;\n } else {\n throw new \\Seraphp\\Exceptions\\IOException('No reply in FIFO');\n }\n } else {\n throw new \\Seraphp\\Exceptions\\IOException('FIFO read timed out!');\n }\n }", "public static function isConnected(){\n if($connected)\n return true;\n else\n return false;\n }", "function socket_send(Socket $socket, string $data, int $length, int $flags): int|false {}", "public function isConnected() {\n return $this->handshakeComplite;\n }", "function ping(){\n $data = \"PING\";\n $response = $this->send($data);\n return $response == 1 ? true : false;\n }", "public function getBoolOneof()\n {\n return $this->readOneof(6);\n }", "public function readByte()\n {\n return $this->bin->readByte(); // OK\n }" ]
[ "0.743651", "0.70798165", "0.6875518", "0.6727303", "0.66961354", "0.65605944", "0.6173211", "0.61673766", "0.6162303", "0.6106527", "0.60468066", "0.6046437", "0.59824973", "0.59100163", "0.5896308", "0.58880025", "0.58880025", "0.58694935", "0.58644223", "0.58451736", "0.5793552", "0.5792428", "0.5736283", "0.5710099", "0.56773293", "0.56762016", "0.5669447", "0.56184834", "0.55658734", "0.5534332", "0.5532914", "0.55147946", "0.55007976", "0.5500281", "0.54885", "0.54829013", "0.54717726", "0.5466494", "0.546377", "0.5456753", "0.5448406", "0.5429324", "0.54126406", "0.53981364", "0.53951997", "0.5394695", "0.53902", "0.53830105", "0.5366642", "0.5341288", "0.5338765", "0.53377247", "0.5328516", "0.53248715", "0.5313835", "0.5310281", "0.5310281", "0.5310281", "0.52814126", "0.5279496", "0.52606165", "0.5254407", "0.52489394", "0.5246974", "0.5229978", "0.5222091", "0.52208567", "0.5211674", "0.5202872", "0.519384", "0.51841336", "0.5181837", "0.5181837", "0.5181837", "0.5181837", "0.5171648", "0.5170905", "0.5162751", "0.5158915", "0.51442856", "0.5129686", "0.51289207", "0.51221144", "0.5082442", "0.5082395", "0.5066003", "0.5061203", "0.50576085", "0.5049496", "0.5049496", "0.5042193", "0.50418615", "0.50418615", "0.50379825", "0.50230813", "0.5019778", "0.5019746", "0.5016264", "0.5013149", "0.50122666" ]
0.87154233
0
Write a short to the socket.
Напишите короткое сообщение в сокет.
protected function writeShort($value) { $this->socket->write(Binary::packShort($value)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sendShort(int $number)\n {\n if ($number > 65535 || $number < 0) {\n throw new \\InvalidArgumentException(\n 'Number '.$number.' out of valid range of short value. Valid \n range is 0 - 65535.'\n );\n }\n\n $binary = pack('n', $number);\n $this->sendRaw($binary);\n }", "protected function readShort()\n {\n return Binary::unpackShort($this->socket->read(2));\n }", "public function writeShort($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "protected function write()\n {\n $this->writeShort($this->id);\n }", "public function readUnsignedShort()\n {\n return $this->bin->readUnsignedShort();\n }", "function socket_write(Socket $socket, string $data, ?int $length = null): int|false {}", "public function GetShort( ) : int\n\t\t{\n\t\t\tif( $this->Remaining( ) < 2 )\n\t\t\t{\n\t\t\t\tthrow new InvalidPacketException( 'Not enough data to unpack a short.', InvalidPacketException::BUFFER_EMPTY );\n\t\t\t}\n\t\t\t\n\t\t\t$Data = UnPack( 'v', $this->Get( 2 ) );\n\t\t\t\n\t\t\treturn (int)$Data[ 1 ];\n\t\t}", "public function receiveShort(): int\n {\n $binaryData = $this->receiveRaw(2);\n\n $translatedData = unpack('n', $binaryData);\n return $translatedData[1];\n }", "protected function writeInt($value)\n {\n $this->socket->write(Binary::packInt($value));\n }", "private function replyStatusPacket() {\n fwrite($this->conn, pack(\"N\", 99999997));\n }", "public function writeInt16($i)\r\n {\r\n $this->data .= pack(\"v1\", $i);\r\n }", "function socket_send(Socket $socket, string $data, int $length, int $flags): int|false {}", "protected function writeByte($value)\n {\n $this->socket->write(Binary::packByte($value));\n }", "protected function writeChar($value)\n {\n $this->socket->write(Binary::packByte(ord($value)));\n }", "public function sendShortStr(string $value)\n {\n $length = strlen($value);\n if ($length > 255) {\n throw new \\InvalidArgumentException(\n \"Short string is too big. It must be equal or less then 255 \n bytes long. {$length} bytes given.\");\n }\n\n $this->sendOctet($length);\n $this->sendRaw($value);\n }", "function dio_write($fd, string $data, int $len = 0) {}", "public function addShort($x)\n {\n $this->prep(2, 0);\n $this->putShort($x);\n }", "function net_write($handle, string $response = '')\n {\n return Network::write($handle, $response);\n }", "protected function writeLong($value)\n {\n $this->socket->write(Binary::packLong($value));\n }", "public function writeByte($byte);", "public function setShort($short = true) {\n $this->short = $short;\n }", "public function getOsShort();", "function net_write($handle, string $response = '')\n {\n return Networks::write($handle, $response);\n }", "public function write($socket, $data)\n {\n }", "public function readUnsignedShort($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function setShort($identifier, $value);", "public function readShort()\n {\n return $this->bin->readShort();\n }", "private function sendPing() {\n\t\t$this->timeSincePingReq = time();\n\t\t$payload = chr(0xc0).chr(0x00);\n\t\tfwrite($this->socket, $payload, 2);\n\n\t\t$this->debugMessage(\"PING sent\");\n\t}", "public function write($type, $s1 = '', $s2 = '')\n {\n $id = $this->packetID++;\n\n $data = pack('VV', $id, $type);\n $data .= $s1.chr(0).$s2.chr(0);\n $data = pack('V', strlen($data)).$data;\n\n fwrite($this->socket, $data, strlen($data));\n\n return $id;\n }", "public function addUshort($x)\n {\n $this->prep(2, 0);\n $this->putUshort($x);\n }", "function socket_sendto(Socket $socket, string $data, int $length, int $flags, string $address, ?int $port = null): int|false {}", "function client_write(StreamSocketInterface $socket, string $response = null) \n\t{\n\t\treturn \\write_socket($socket, $response);\n\t}", "public function send(int $flags) {}", "public function writeByte($byte)\n {\n return fwrite($this->handle, $byte, 1);\n }", "static public function ToUnsignedShort($word) {\n return (ord($word[0]) << 8) | (ord($word[1]));\n }", "protected function getUnsignedShort(&$buffer, $offset)\n {\n return ($buffer[$offset] | $buffer[$offset + 1] << 8);\n }", "protected function _write($socket, $request)\n {\n fwrite($socket, $request);\n }", "public function sendPacket(string $packet, bool $add_size_header = true): void {\n\t\tif ($add_size_header) {\n\t\t\t$len = strlen($packet);\n\t\t\tif ($len > 65535) {\n\t\t\t\t// note that it's still possible to have several separate packets each individually under 65535 bytes, \n\t\t\t\t// concantenated with the Nagle-algorithm but then you have to add the size headers and adler checksums manually, \n\t\t\t\t// before calling send()\n\t\t\t\tthrow new OutOfRangeException('Cannot automatically add size header a to a packet above 65535 bytes!');\n\t\t\t}\n\t\t\t$packet = to_little_uint16_t($len) . $packet;\n\t\t}\n\t\t$this->socket_write_all($this->socket, $packet);\n\t}", "public function write($data)\n {\n return fwrite($this->socket, $data);\n }", "public function writeInt($i)\r\n {\r\n $this->data .= pack(\"V1\", $i);\r\n }", "function writeByte(){\r\n\t\tdie('Not implemented');\r\n\t}", "public function int16($int16)\n {\n $this->buffer .= bin2hex(pack('v', $int16));\n }", "public function writeInt16(int $value): self\n {\n $this->bytes .= Writer::bit16($value);\n\n return $this;\n }", "public static function writeDataTo($sock, $data, $length = null, $force = false)\n {\n if($force) {\n for($attempt = 10; $attempt > 0; $attempt--) {\n try {\n return socket_write($sock, $data, is_null($length) ? strlen($data) : $length);\n } catch(\\Exception $e) {\n usleep(100);\n }\n }\n } else {\n return socket_write($sock, $data, strlen($data));\n }\n return 0;\n }", "protected function write()\n {\n $this->writeString($this->type);\n $this->writeString($this->name);\n $this->writeString($this->location);\n $this->writeString($this->segmentName);\n $this->writeShort($this->id);\n }", "public function readShort($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "protected function writeString($value)\n {\n $this->socket->write(Binary::packString($value));\n }", "public function short($string);", "function websocket_write($sp, $data,$final=true){\n // Assamble header: FINal 0x80 | Opcode 0x02\n $header=chr(($final?0x80:0) | 0x02); // 0x02 binary\n\n // Mask 0x80 | payload length (0-125) \n if(strlen($data)<126) $header.=chr(0x80 | strlen($data)); \n elseif (strlen($data)<0xFFFF) $header.=chr(0x80 | 126) . pack(\"n\",strlen($data));\n elseif(PHP_INT_SIZE>4) // 64 bit \n $header.=chr(0x80 | 127) . pack(\"Q\",strlen($data));\n else // 32 bit (pack Q dosen't work)\n $header.=chr(0x80 | 127) . pack(\"N\",0) . pack(\"N\",strlen($data));\n\n // Make a random mask\n $mask=pack(\"N\",rand(1,0x7FFFFFFF)); \n $header.=$mask;\n \n // Apply mask to data\n for($i = 0; $i < strlen($data); $i++)\n $data[$i]=chr(ord($data[$i]) ^ ord($mask[$i % 4]));\n \n return fwrite($sp,$header.$data); \n}", "public abstract function writeByte($b);", "public function write($str, $off = 0, $len = -1);", "abstract public function writeByte($b);", "function write_socket(StreamSocketInterface $socket, string $response = null)\n\t{\n\t\treturn $socket->write($response);\n\t}", "protected function writeBytes($value)\n {\n $this->socket->write(Binary::packBytes($value));\n }", "function socket_set_option(Socket $socket, int $level, int $option, $value): bool {}", "public static function shortInt(string &$buffer)\n {\n $tmp = unpack('n', $buffer);\n $buffer = substr($buffer, 2);\n\n return $tmp[1];\n }", "public static function bytesToShort($bytes, $position)\r\n {\r\n $val = 0;\r\n $val = $bytes[$position + 1] & 0xFF;\r\n $val = $val << 8;\r\n $val |= $bytes[$position] & 0xFF;\r\n return $val;\r\n }", "public function send($buffer, $flags = 0, $length = null)\n {\n if (null === $length) {\n $length = strlen($buffer);\n }\n\n // make sure everything is written\n do {\n $return = @socket_send($this->resource, $buffer, $length, $flags);\n\n if (false !== $return && $return < $length) {\n $buffer = substr($buffer, $return);\n $length -= $return;\n\n } else {\n break;\n }\n } while (true);\n\n if ($return === false) {\n throw new SocketException($this->resource);\n }\n\n return $return;\n }", "public static function shortToBytes($val)\r\n {\r\n $byt = array();\r\n $byt[0] = ($val & 0xff);\r\n $byt[1] = ($val >> 8 & 0xff);\r\n return $byt;\r\n }", "function transmit($packet)\n{\n\t$fp = fopen(\"/dev/ttyUSB0\", \"w\") or die(\"unable to open serial\"); \n\tfwrite ($fp, $packet);\n\n\tfclose ($fp);\n\n\treturn 1;\n}", "public function getShort()\n {\n return $this->short;\n }", "private function write( $str ) {\n fwrite( $this->socket, $str . \"\\n\" );\n }", "public function write($string, $length = null)\n {\n $this->connect();\n if (is_null($length)) {\n $this->written = fwrite($this->socket, $string);\n } else {\n $this->written = fwrite($this->socket, $string, $length);\n }\n return $this;\n }", "Public Function WriteLong( $val ) {\n fwrite( $this->fp, pack( 'Q', $val ) );\n }", "public function send(Socket $socket)\n {\n $socket->write(Str::limit($this->raw, 509).\"\\r\\n\");\n Client::log($this, true);\n }", "protected function _send($type, $client, $data) {\n print \"Server: Sending message (\" . strlen($data) . \")\\n\";\n if ( $type == \"hybi-00\" ) {\n $msg = chr(0).$data.chr(255);\n $result = socket_write($client, $msg, strlen($msg));\n if ( !$result ) {\n $this->_disconnect($client);\n $client = false;\n }\n } else {\n // FIXME throw error if message length is longer than 0x7FFFFFFFFFFFFFFF chracters\n $header = \" \";\n $header[0] = chr(0x81);\n $header_length = 1;\n\n //Payload length: 7 bits, 7+16 bits, or 7+64 bits\n $dataLength = strlen($data);\n\n //The length of the payload data, in bytes: if 0-125, that is the payload length.\n if ( $dataLength <= 125 ) {\n $header[1] = chr($dataLength);\n $header_length = 2;\n } else if ( $dataLength <= 65535 ) {\n // If 126, the following 2 bytes interpreted as a 16\n // bit unsigned integer are the payload length.\n $header[1] = chr(126);\n $header[2] = chr($dataLength >> 8);\n $header[3] = chr($dataLength & 0xFF);\n $header_length = 4;\n } else {\n // If 127, the following 8 bytes interpreted as a 64-bit unsigned integer (the\n // most significant bit MUST be 0) are the payload length.\n $header[1] = chr(127);\n $header[2] = chr(($dataLength & 0xFF00000000000000) >> 56);\n $header[3] = chr(($dataLength & 0xFF000000000000) >> 48);\n $header[4] = chr(($dataLength & 0xFF0000000000) >> 40);\n $header[5] = chr(($dataLength & 0xFF00000000) >> 32);\n $header[6] = chr(($dataLength & 0xFF000000) >> 24);\n $header[7] = chr(($dataLength & 0xFF0000) >> 16);\n $header[8] = chr(($dataLength & 0xFF00 ) >> 8);\n $header[9] = chr( $dataLength & 0xFF );\n $header_length = 10;\n }\n\n $result = socket_write($client, $header . $data, strlen($data) + $header_length);\n //$result = socket_write($client, chr(0x81) . chr(strlen($data)) . $data, strlen($data) + 2);\n if ( !$result ) {\n $this->_disconnect($client);\n $client = false;\n }\n }\n }", "public function setShort(string $short)\n {\n $this->short = $short;\n\n return $this;\n }", "protected function writeBoolean($value)\n {\n $this->socket->write(Binary::packByte((bool) $value));\n }", "public function send() {\n if (!$this->client) {\n return false;\n }\n\n $this->addInt8($this->reason);\n \n Sockets::out($this->client, $this);\n\n return true;\n\n }", "public function byte($byte)\n {\n $this->buffer .= bin2hex(pack('C', $byte));\n }", "public function send($data) {\n $len = strlen($data);\n if ($this->v) l('Sending '.$len.' byte(s): '.$data);\n $sent = socket_write($this->sock, $data, $len);\n return ($sent === $len);\n }", "public function write();", "public function write();", "public function send_buffer(){\n\n $this->_log(\"Buf has \".count($this->_buf).\" items\");\n\n $string = implode(\"\\n\",$this->_buf);\n\n $this->_log('Sending string length: '.strlen($string));\n $len = socket_write($this->_socket,$string,strlen($string));\n //echo \"$len bytes written to socket\\n\";\n $this->_log(\"$len bytes written to socket\");\n\n }", "public function writeByte($byte)\n {\n // We do not need to check if file position points to the end of \"file\".\n // Only append operation is supported now\n\n $this->_data .= chr($byte);\n $this->_position = strlen($this->_data);\n\n return 1;\n }", "public function setShort($short)\n {\n if (!is_bool($short)) {\n throw new \\InvalidArgumentException('Short should be boolean');\n }\n \n $this->short = $short;\n \n return $this;\n }", "private function appendInt16Data($byte, $signed = true)\n {\n $this->currentContext->buffer .= pack('C', $byte);\n\n if (2 === strlen($this->currentContext->buffer)) {\n list(, $value) = unpack(\n $signed ? 's' : 'S',\n Utility::convertEndianness($this->currentContext->buffer)\n );\n\n return $value;\n }\n\n return null;\n }", "public function send() {\r\n if (!$this->client) {\r\n return false;\r\n }\r\n\r\n $this->addInt16(1011);// Size packet \r\n $this->addInt32(12900166);\r\n $this->addInt32(1704);\r\n $this->addInt32($this->x);\r\n $this->addInt32($this->y); \r\n $this->addInt32(strlen($this->layoutCompress)-4);//Entries Length + 4\r\n $this->addInt32(strlen($this->layout));//Layout Length\r\n $this->addText($this->layoutCompress);\r\n $this->addInt32(0);//Lines Count\r\n $this->addInt32(strlen($this->textCompress)-4);//String Length + 4\r\n $this->addText(strlen($this->text)); //String Decoded + 4\r\n $this->addText($this->textCompress); \r\n \r\n Sockets::out($this->client, $this); \r\n return true;\r\n }", "public function shortValue($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function write($chunk) {\n $this->buffer.= $chunk;\n if (strlen($this->buffer) > self::BUFFER_SIZE) {\n $this->target->write(dechex(strlen($this->buffer)).\"\\r\\n\".$this->buffer.\"\\r\\n\");\n $this->buffer= '';\n }\n }", "protected function writeHeader()\n {\n $this->writeByte($this->opCode);\n $this->writeInt($this->sessionId);\n }", "public function testWritingInt16($byteOrder, $data, $value)\n {\n $streamMock = $this->getMockBuilder(Stream::class)\n ->disableOriginalConstructor()\n ->setMethods(['getByteOrder', 'write'])\n ->getMock();\n\n $streamMock->expects($this->atLeast(1))\n ->method('getByteOrder')\n ->will($this->returnValue($byteOrder));\n\n $streamMock->expects($this->once())\n ->method('write')\n ->with($data)\n ->will($this->returnValue(2));\n\n /** @var \\GravityMedia\\Stream\\Stream $streamMock */\n $this->assertSame(2, $streamMock->writeInt16($value));\n }", "function sendSwitchMessage($pipe, $state) {\n\n $msg = array(\"nodeid\" => $pipe, \"action\" => 0, \"state\" => intval($state));\n\n $fp = stream_socket_client(\"tcp://localhost:30000\", $errno, $errstr);\n\n fwrite($fp, json_encode($msg, JSON_NUMERIC_CHECK));\n fclose($fp);\n}", "public function stream_write($data) {\r\n\t\t// buffer the data\r\n\t\t$this->_buffer .= $data;\r\n\t\treturn strlen($data);\r\n }", "function sendHello($sock, $port)\n \n{\n $broadcast_string = 'hello world!3';\n print \"SENDING TO PORT: \" . $port . PHP_EOL;\n socket_sendto($sock, $broadcast_string, strlen($broadcast_string), 0, '255.255.255.255', $port);\n}", "public function register($short, $long)\n {\n $this->implementations[$short] = $long;\n }", "function send_to_op($data, $type, $ws, $index) \n{\n $res = array(\n 'msg' => $data,\n 'type' => $type,\n );\n $res = json_encode($res);\n $res = $ws->frame($res);\n var_dump($res);\n socket_write($ws->clients[$index]->getOpClient()->getSocket(), $res, strlen($res));\n}", "public function write($value)\n {\n $this->buffer .= $value;\n }", "public function write($buf);", "public function write(string $buffer) : void;", "protected function shiftShort(&$in, $asNumeric = true)\n {\n $len = strlen($in);\n\n if ($len < 2)\n throw new \\RuntimeException(sprintf('buffer overflow'));\n\n $value = substr($in, 0, 2);\n\n if ($len > 2)\n $in = substr($in, 2);\n else\n $in = '';\n\n return ($asNumeric ? ord($value[0])*ord($value[1]) : $value);\n }", "public function readShortStr()\n {\n $this->_bitCount = 0;\n $this->bits = 0;\n list(,$slen) = unpack('C', $this->rawRead(1));\n return $this->rawRead($slen);\n }", "abstract public function write($buffer);", "function writeLong(){\r\n\t\tdie('Not implemented');\r\n\t}", "public static function readUnsignedShort(array $array, int $i): int\n {\n return Cast::toUnsignedShort($array[$i] | ($array[$i + 1] << 8));\n }", "public function write($buf) {\n $written = 0;\n $length = TStringFuncFactory::create()->strlen($buf);\n\n while($written < $length) {\n $fwrite = @socket_write($this->_handle, TStringFuncFactory::create()->substr($buf, $written));\n\n if($fwrite === false) {\n $this->error(self::class . ': Failed to write buffer to ' . $this->getDomain());\n }\n\n $written += $fwrite;\n }\n }", "public function shortNumber();", "function enc_write_prefixed_bytes($fp,$data,$size){\n\t\t$len=strlen($data);\n\t\tif($len>0){\n\t\t\tenc_write_int($fp,$len,$size);\n\t\t\tfwrite($fp,$data);\n\t\t}\n\t\telse{\n\t\t\tenc_write_int($fp,0,$size);\n\t\t}\n\t}", "function writePc($pc) {\n assert($pc <= 0xFFFF);\n\n $this->pc = $pc;\n }", "final protected function _bitWrite($str, $len)\n {\n // $carrier is the sequence of bits, in a string\n $this->_ocarrier .= $str;\n $this->_ocarlen += $len;\n \n while ($this->_ocarlen >= 8)\n {\n $this->_odata .= chr(bindec(substr($this->_ocarrier, 0, 8)));\n $this->_ocarrier = substr($this->_ocarrier, 8);\n $this->_ocarlen -= 8;\n }\n }" ]
[ "0.66546816", "0.63228154", "0.6313046", "0.6252872", "0.60167545", "0.59541875", "0.5948342", "0.59383756", "0.58557516", "0.58313215", "0.5790902", "0.5740791", "0.5668683", "0.56269157", "0.55866253", "0.55494547", "0.5544316", "0.55130965", "0.5502726", "0.54903543", "0.5444569", "0.54006875", "0.5378847", "0.53765947", "0.53744036", "0.5372599", "0.53565884", "0.534371", "0.53277206", "0.5290799", "0.5264461", "0.52635485", "0.52279335", "0.52254325", "0.5189051", "0.5136297", "0.5134649", "0.5068347", "0.5062782", "0.5059629", "0.5052442", "0.5043264", "0.5029605", "0.5024706", "0.5020762", "0.50153536", "0.49948603", "0.49898085", "0.4988251", "0.49825132", "0.49606586", "0.49499953", "0.49456322", "0.492777", "0.49249607", "0.49120107", "0.48894426", "0.4884088", "0.48785275", "0.48739472", "0.487291", "0.48593777", "0.48389733", "0.47970176", "0.47847545", "0.4765579", "0.4762556", "0.47416794", "0.47399062", "0.47341618", "0.47269478", "0.4724187", "0.4724187", "0.4723445", "0.47209096", "0.4707313", "0.47058365", "0.4704747", "0.46973792", "0.46795893", "0.46645138", "0.46600813", "0.4658578", "0.46535137", "0.46508658", "0.46361753", "0.46180186", "0.46121708", "0.4604602", "0.4582421", "0.4574193", "0.45668596", "0.45608696", "0.45565635", "0.45495686", "0.45490536", "0.45364714", "0.45309705", "0.45159218", "0.4510813" ]
0.7951459
0
Read a short from the socket.
Считать короткое из сокета.
protected function readShort() { return Binary::unpackShort($this->socket->read(2)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function receiveShort(): int\n {\n $binaryData = $this->receiveRaw(2);\n\n $translatedData = unpack('n', $binaryData);\n return $translatedData[1];\n }", "public function GetShort( ) : int\n\t\t{\n\t\t\tif( $this->Remaining( ) < 2 )\n\t\t\t{\n\t\t\t\tthrow new InvalidPacketException( 'Not enough data to unpack a short.', InvalidPacketException::BUFFER_EMPTY );\n\t\t\t}\n\t\t\t\n\t\t\t$Data = UnPack( 'v', $this->Get( 2 ) );\n\t\t\t\n\t\t\treturn (int)$Data[ 1 ];\n\t\t}", "public function readUnsignedShort()\n {\n return $this->bin->readUnsignedShort();\n }", "public function readShort()\n {\n return $this->bin->readShort();\n }", "public function readShortStr()\n {\n $this->_bitCount = 0;\n $this->bits = 0;\n list(,$slen) = unpack('C', $this->rawRead(1));\n return $this->rawRead($slen);\n }", "protected function readByte()\n {\n return Binary::unpackByte($this->socket->read(1));\n }", "private function read() {\n return fgets( $this->socket, 128 );\n }", "function socket_read(Socket $socket, int $length, int $mode = PHP_BINARY_READ): string|false {}", "public function readInt16()\n {\n $value = Reader::bit16($this->bytes);\n\n $this->skip(2);\n\n return $value;\n }", "public function readInt16(){ }", "protected function read()\n {\n return $this->readShort();\n }", "public static function shortInt(string &$buffer)\n {\n $tmp = unpack('n', $buffer);\n $buffer = substr($buffer, 2);\n\n return $tmp[1];\n }", "public function read($size=1024) {\n return socket_read($this->sock,$size,PHP_BINARY_READ);\n }", "function client_read(StreamSocketInterface $socket, int $size = -1) \n\t{\n\t\treturn $socket->response($size);\n\t}", "protected function readInt()\n {\n return Binary::unpackInt($this->socket->read(4));\n }", "public function read(int $length);", "function net_read($handle, int $size = -1)\n {\n return Network::read($handle, $size);\n }", "protected function read_int16() {\r\n $v = unpack ('C2',fread($this->ttf_handle,2)); \r\n $v = pack ('C2', $v[2],$v[1]);\r\n $v= unpack('s1',$v);\r\n return $v[1]; \r\n }", "public function receiveShortStr(): ?string\n {\n $rawLength = $this->receiveRaw(1);\n list(, $length) = unpack('C', $rawLength);\n $data = $this->receiveRaw($length);\n\n return $data;\n }", "protected function readLong()\n {\n return Binary::unpackLong($this->socket->read(8));\n }", "public function readInt16()\r\n {\r\n $ret = unpack(\"v1ele\", substr($this->data, $this->offset, 2));\r\n $this->offset += 2;\r\n\r\n return $ret['ele'];\r\n }", "public function read_unsigned_short(\r\n\t\t$msb_register\t// most significant byte register location\r\n\t) {\r\n\t\t$msb = intval( $this->read_register( $msb_register ), 16 );\r\n\t\t$lsb = intval( $this->read_register( $msb_register + 1 ), 16 );\r\n\t\t$val = ( $msb << 8 ) + $lsb;\r\n\t\t$array = unpack( 'S', pack( 'v', $val ) );\r\n\t\t$decimal_value = $array[1];\r\n\t\treturn $decimal_value;\r\n\t}", "public function read($length);", "public function read($length);", "public function read($length);", "public function read($length = 1024)\n {\n if (false === ($data = fread($this->fp, $length))) {\n throw new SocketException('socket read error');\n }\n return $data;\n }", "function net_read($handle, int $size = -1)\n {\n return Networks::read($handle, $size);\n }", "public function readShort($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function read($len);", "public function read($len);", "public function read($len);", "public function read($length = 1024);", "function dio_read($fd, int $len = 1024) {}", "protected function getUnsignedShort(&$buffer, $offset)\n {\n return ($buffer[$offset] | $buffer[$offset + 1] << 8);\n }", "public function read($length){ }", "public function readUnsignedShort($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function readUnsignedInt16($endian=null){ }", "public function read($length = 4096)\n {\n $this->connect();\n if (is_null($length)) {\n return fgets($this->socket);\n } else {\n return fgets($this->socket, $length);\n }\n }", "public function receiveOctet(): int\n {\n $binaryData = $this->receiveRaw(1);\n\n $translatedData = unpack('C', $binaryData);\n return $translatedData[1];\n }", "function read_socket(StreamSocketInterface $socket, int $size = -1)\n\t{\n\t\treturn $socket->read($size);\n\t}", "public static function readDataFrom($sock, $length, $binary = true)\n {\n return socket_read($sock, $length, $binary ? PHP_BINARY_READ : PHP_NORMAL_READ);\n }", "public function readByte();", "public function readByte();", "public function read($len) {\n $read = 0;\n $data = '';\n\n while($read < $len) {\n $fread = @socket_read($this->_handle, $len - $read, PHP_BINARY_READ);\n\n if($fread === false) {\n $errer_no = socket_last_error($this->_handle);\n\n if($errer_no == SOCKET_EINTR) {\n usleep(1);\n continue;\n } else {\n $this->error(self::class . ': Failed to read data from ' . $this->getDomain(), $errer_no);\n }\n } elseif($fread == '') {\n //Connection closed\n $this->error(self::class . ': TSocket read 0 bytes from ' . $this->getDomain(), SOCKET_ECONNRESET);\n }\n\n $read += TStringFuncFactory::create()->strlen($fread);\n $data .= $fread;\n }\n\n return $data;\n }", "public function readFromSocketWithGivenLength()\n {\n $this->mockSocket->expects($this->once())\n ->method('read')\n ->with($this->equalTo(3))\n ->will($this->returnValue('foo'));\n $this->assertEquals('foo', $this->socketInputStream->read(3));\n }", "public function readSingleByte()\n {\n return $this->bin->readSingleByte();\n }", "public function read($length = null);", "public function read($length = null);", "public function read($length = null);", "public function read(int $len)\n {\n return $this->readBlocking($len);\n }", "public function read(int $length = 2048, int $type = PHP_BINARY_READ)\n {\n if (!$this->isSocketOpened()) {\n throw new ClientTCPSocketException('');\n }\n\n $buffer = @socket_read($this->socket, $length, $type);\n \n return trim($buffer);\n }", "public function readByte()\n {\n $this->position ++;\n return fread($this->handle, 1);\n }", "public function readByte()\n {\n if ($this->in == null) {\n return - 1;\n }\n $c = $this->in->readByte();\n if ($c == - 1) {\n $this->nextStream();\n return $this->readByte();\n }\n return $c;\n }", "public function read($len)\n\t{\n\t\treturn $this->inBuf->read($len);\n\t}", "public function read($size = 512)\r\n {\r\n if (!$this->isConnected()) {\r\n return false;\r\n }\r\n $data = socket_read($this->socket, $size);\r\n if (!$data) {\r\n if ($this->getLastError() == 107) {\r\n $this->close();\r\n $this->socket = null;\r\n }\r\n }\r\n return $data;\r\n }", "protected function _read($socket)\n {\n $response = '';\n while ($buff = fread($socket, 8192)) {\n $response .= $buff;\n }\n \n fclose($socket);\n \n return $response;\n }", "protected function _read() {\n return $this->_readLong();\n }", "public function getOsShort();", "function socket_recv(Socket $socket, &$data, int $length, int $flags): int|false {}", "public function receiveLong(): int\n {\n $binaryData = $this->receiveRaw(4);\n\n $translatedData = unpack('N', $binaryData);\n return $translatedData[1];\n }", "public abstract function read($len);", "public function readUInt32() {\n\t\t$t = unpack(\"V\", $this->stream->readBytes(4));\n\t\treturn $t[1];\n\t}", "function read16FromPc()\n {\n $val = $this->memory->read16($this->pc);\n $this->pc += 2;\n\n return $val;\n }", "public function read($len = null) {\n return $this->in->read($len);\n }", "public function read($length = 1024) {\n if (!$this->_receivedResponse) {\n return false;\n }\n\n $response = $this->_receivedResponse;\n $this->_receivedResponse = false;\n\n return $response;\n }", "public function readInt(){ }", "public function read($len)\n {\n if (!$this->isOpen()) {\n throw new TTransportException('ClientTransport not open.', TTransportException::NOT_OPEN);\n }\n return $this->client->recv($len, true);\n }", "public function read(int $length): string;", "public function read()\n\t{\n\t\t$this->connect();\n\n\t\t$data = '';\n\n\t\twhile(!feof($this->socket))\n\t\t{\n\t\t\t$data .= fgets($this->socket, 1024);\n\t\t}\n\n\t\treturn strlen($data) ? $data : false;\n\t}", "function read() {}", "public function readUnsignedInt(){ }", "protected function readChar()\n {\n return chr(Binary::unpackByte($this->socket->read(1)));\n }", "public function read(int $length): string\n {\n if ($length > self::READ_MAX_LENGTH) {\n throw Exception\\Socket::invalidLength($length, self::READ_MAX_LENGTH);\n }\n// $data = $this->stream->recvAll($length, $this->getReadTimeout());\n $data = $this->stream->recvAll($length);\n if ($data === false) {\n throw new Exception(\n sprintf('Read msg error %s:%d (%s [%d])', $this->host, $this->port, $this->stream->errMsg, $this->stream->errCode)\n );\n }\n return $data;\n }", "public function read($length)\n {\n if (!$this->isConnected()) {\n throw new Rediska_Connection_Exception(\"Can't read without connection to Redis server. Do connect or write first.\");\n }\n\n if ($length > 0) {\n \t$data = $this->_readAndThrowException($length);\n } else {\n \t$data = null;\n }\n\n if ($length !== -1) {\n $this->_readAndThrowException(2);\n }\n\n return $data;\n }", "public function read($len = null)\n {\n return $this->inStream->read($len);\n }", "public function receiveLongLong(): int\n {\n $rawData = $this->receiveRaw(8);\n\n $translated = unpack('J', $rawData);\n return $translated[1];\n }", "public function getShort()\n {\n return $this->short;\n }", "public function read_signed_short($msb_register) {\r\n\r\n\t\t$msb = intval( $this->read_register( $msb_register ), 16 );\r\n\t\t$lsb = intval( $this->read_register( $msb_register + 1 ), 16 );\r\n\t\t$val = ( $msb << 8 ) + $lsb;\r\n\t\t$array = unpack( 's', pack( 'v', $val ) );\r\n\t\t$decimal_value = $array[1];\r\n\t\treturn $decimal_value;\r\n\t}", "protected function recvStr($read = true)\n\t{\n\t\t$str = @fgets($this->socket);\n\t\tif(!$str)\n\t\t{\n\t\t\t$this->disconnect();\n\t\t\tthrow new \\HandlerSocket\\IOException('Cannot read from socket');\n\t\t}\n\t\treturn substr($str,0,-1);\n\t}", "protected function _read(int $characterCount): string {\n\t\t$result = fread($this->socket, $characterCount);\n\t\tif ($this->optionBool(self::OPTION_DEBUG_READ)) {\n\t\t\t$this->_log('->read({count}) = {result}', [\n\t\t\t\t'count' => $characterCount, 'result' => $result === false ? 'false' : strlen($result) . ' bytes',\n\t\t\t]);\n\t\t}\n\t\tif (strlen($result) === 0) {\n\t\t\tthrow new Exception_Protocol(\"fread returned empty: $result\");\n\t\t}\n\t\t$this->log(\"< $result\");\n\t\treturn $result;\n\t}", "public function readint32()\n {\n $bytes = $this->read(4);\n if (4 != $this->strlen($bytes)) {\n return false;\n }\n $endian_letter = ('big' == $this->endian) ? 'N' : 'V';\n $int = unpack($endian_letter, $bytes);\n return reset($int);\n }", "function mapi_read($socket=NULL) {\n\t\t# get the first 2 bytes\n\t\tif (($header = socket_read($socket, 2)) == FALSE) {\n\t\t\t$last_error = socket_strerror(socket_last_error());\n\t\t\tthrow new Exception('Lost connection with the server: ' . $last_error);\n\t\t}\n\t\t$data = \"\";\n\n\t\t$chunk_size = ((ord($header[1]) << 7) | (ord($header[0]) >> 1));\n\t\t// keep reading until we have everything\n\t\twhile (strlen($data) < $chunk_size) {\n\t\t\t$data .= socket_read($socket, $chunk_size - strlen($data));\n\t\t}\n\n\n\t\twhile ((ord($header[0]) & 1) == 0) {\n\t\t\tif (($header = socket_read($socket, 2)) == FALSE) {\n\t\t\t\t$last_error = socket_strerror(socket_last_error());\n\t\t\t\tthrow new Exception('Lost connection with the server: ' . $last_error);\n\t\t\t}\n\n\t\t\t$chunk_size = ((ord($header[1])) << 7) | (ord($header[0]) >> 1);\n\n\t\t\t$block = \"\";\n\t\t\twhile (strlen($block) < $chunk_size) {\n\t\t\t\tif (($block .= socket_read($socket, $chunk_size - strlen($block))) == FALSE) {\n\t\t\t\t\t$last_error = socket_strerror(socket_last_error());\n\t\t\t\t\tthrow new Exception('Lost connection with the server: ' . $last_error);\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t$data = $data . $block;\n\t\t}\n\t\tif (strlen($data) == 0) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\treturn $data;\n\t}", "public function readByte()\n {\n return $this->bin->readByte(); // OK\n }", "protected function writeShort($value)\n {\n $this->socket->write(Binary::packShort($value));\n }", "public function stream_read($count) \r\n {\r\n $ret = substr($this->_data, $this->_pos, $count);\r\n $this->_pos += strlen($ret);\r\n return $ret;\r\n }", "protected function readBoolean()\n {\n $value = $this->socket->read(1);\n return (bool) Binary::unpackByte($value);\n }", "private function readDataFromPendingClient($socket, int $length, PendingSocketClient $state)\n {\n $data = \\fread($socket, $length);\n\n if ($data === false || $data === '') {\n return null;\n }\n\n $data = $state->receivedDataBuffer . $data;\n\n if (\\strlen($data) < $length) {\n $state->receivedDataBuffer = $data;\n return null;\n }\n\n $state->receivedDataBuffer = '';\n\n Loop::cancel($state->readWatcher);\n\n return $data;\n }", "public function read(int $length): string\n {\n }", "private function _read()\n {\n $read = array($this->_conn['read']);\n if (stream_select($read, $w = null, $x = null, self::TIMEOUT, 15) > 0) {\n unset($w, $e);\n if ($reply = fgets($this->_conn['read'])) {\n return $reply;\n } else {\n throw new \\Seraphp\\Exceptions\\IOException('No reply in FIFO');\n }\n } else {\n throw new \\Seraphp\\Exceptions\\IOException('FIFO read timed out!');\n }\n }", "public function receiveBit(): int\n {\n $rawByte = $this->receiveRaw(1);\n\n $value = @($rawByte & 1) ? 1 : 0;\n return $value;\n }", "public function readByte()\r\n\t{\r\n\t\t$s = $this->read(1);\r\n\t\treturn empty($s) ? 0 : ord($s[0]);\r\n\t}", "protected function read() : bool\n {\n if (feof($this->socket)) {\n $this->connect();\n }\n // try to read 1 byte from the socket\n $type = stream_get_contents($this->socket, 1);\n\n if (strlen($type) == 0) {\n // no data yet\n return false;\n }\n\n $type = unpack('C', $type)[1];\n\n // got a packet, read length\n $multiplier = 1;\n $len = 0;\n do {\n $encodedByte = unpack('C', stream_get_contents($this->socket, 1))[1];\n $len += ($encodedByte & 0x7F) * $multiplier;\n $multiplier *= 0x80;\n if ($multiplier > 0x80*0x80*0x80) {\n throw new \\RuntimeException(\"Malformed length\");\n }\n } while (($encodedByte & 0x80) != 0);\n\n $data = stream_get_contents($this->socket, $len);\n\n // split the type and flags\n $flags = $type & 0x0F;\n $type = $type & 0xF0;\n\n switch ($type) {\n case self::TYPE_CONNACK:\n case self::TYPE_PINGREQ:\n case self::TYPE_PINGRESP:\n // nothing to do here\n break;\n case self::TYPE_SUBACK:\n $ident = unpack('nident', $data)['ident'];\n unset($this->state[$ident]);\n break;\n case self::TYPE_PUBLISH:\n $this->recvPublish($flags, $data);\n break;\n case self::TYPE_PUBREL:\n $this->recvPubrel($flags, $data);\n break;\n case self::TYPE_PUBACK:\n // TODO verify qos type\n $ident = unpack('n', $data)[1];\n unset($this->state[$ident]);\n case self::TYPE_PUBREC:\n // send PUBREL\n // TODO verify qos type\n $ident = unpack('n', $data)[1];\n $headers = pack('n', $ident);\n $this->send(self::TYPE_PUBREL | self::FLAG_PUBREL, $headers, '');\n $this->state[$ident] = [\n 'last_change' => time(),\n 'onfail' => function() use ($headers) {\n $this->send(self::TYPE_PUBREL | self::FLAG_PUBREL, $headers, '');\n }\n ];\n break;\n case self::TYPE_PUBCOMP:\n // finish publish qos 2\n // TODO verify qos type\n $ident = unpack('n', $data)[1];\n unset($this->state[$ident]);\n break;\n default:\n // unknown type, just ignore for now\n break;\n }\n\n return true;\n }", "abstract public function read($n);", "function read();", "function read();", "function tell () {\n return ftell($this->sock);\n }", "public function read($cmd = 'READ:') {\n $this->sendLine($cmd);\n return $this->php_serial->readPort();\n }", "public function readInt()\n {\n return $this->bin->readInt();\n }", "public function stream_read($count)\n {\n $ret = substr($this->data, $this->pos, $count);\n $this->pos += strlen($ret);\n return $ret;\n }", "private function appendInt16Data($byte, $signed = true)\n {\n $this->currentContext->buffer .= pack('C', $byte);\n\n if (2 === strlen($this->currentContext->buffer)) {\n list(, $value) = unpack(\n $signed ? 's' : 'S',\n Utility::convertEndianness($this->currentContext->buffer)\n );\n\n return $value;\n }\n\n return null;\n }" ]
[ "0.7668519", "0.71574146", "0.7002427", "0.67322147", "0.6330443", "0.60824674", "0.6024666", "0.5974407", "0.5968955", "0.5955776", "0.5933586", "0.58791554", "0.58719987", "0.5835241", "0.5809817", "0.5767827", "0.5741699", "0.5737616", "0.56726474", "0.5626738", "0.5564198", "0.5557441", "0.55498755", "0.55498755", "0.55498755", "0.5517494", "0.5516005", "0.5502786", "0.5498515", "0.5498515", "0.5498515", "0.5482831", "0.54788864", "0.5475454", "0.5467405", "0.5464765", "0.54379123", "0.5427081", "0.5358153", "0.5357794", "0.53501505", "0.5346686", "0.5346686", "0.53312916", "0.5318541", "0.53124094", "0.52955776", "0.52955776", "0.52955776", "0.52942914", "0.5287659", "0.5232891", "0.5214728", "0.5202968", "0.5193837", "0.5169024", "0.51675797", "0.5164895", "0.5143884", "0.5138547", "0.5130868", "0.51290715", "0.51290256", "0.51091594", "0.50792384", "0.5057507", "0.5047624", "0.5038279", "0.5032561", "0.5030521", "0.5009881", "0.50005084", "0.5000087", "0.49925673", "0.49913168", "0.49883196", "0.49872154", "0.497731", "0.49750456", "0.49644807", "0.49561557", "0.4934219", "0.49261722", "0.4925175", "0.49055424", "0.49000138", "0.48980707", "0.489461", "0.4866119", "0.48587778", "0.48467392", "0.48458892", "0.48442906", "0.4840421", "0.4840421", "0.48393434", "0.4811211", "0.48086143", "0.48030445", "0.48019475" ]
0.8569188
0
Write an integer to the socket.
Запишите целое число в сокет.
protected function writeInt($value) { $this->socket->write(Binary::packInt($value)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function writeInt($i)\r\n {\r\n $this->data .= pack(\"V1\", $i);\r\n }", "function socket_write(Socket $socket, string $data, ?int $length = null): int|false {}", "public function writeInt($value)\n {\n // We do not need to check if file position points to the end of \"file\".\n // Only append operation is supported now\n\n settype($value, 'integer');\n $this->_data .= chr($value>>24 & 0xFF) .\n chr($value>>16 & 0xFF) .\n chr($value>>8 & 0xFF) .\n chr($value & 0xFF);\n\n $this->_position = strlen($this->_data);\n }", "protected function writeByte($value)\n {\n $this->socket->write(Binary::packByte($value));\n }", "function writeInt(){\r\n\t\tdie('Not implemented');\r\n\t}", "protected function writeLong($value)\n {\n $this->socket->write(Binary::packLong($value));\n }", "function socket_send(Socket $socket, string $data, int $length, int $flags): int|false {}", "public function write($data)\n {\n return fwrite($this->socket, $data);\n }", "public function write($socket, $data)\n {\n }", "public function writeVInt($value)\n {\n // We do not need to check if file position points to the end of \"file\".\n // Only append operation is supported now\n\n settype($value, 'integer');\n while ($value > 0x7F) {\n $this->_data .= chr( ($value & 0x7F)|0x80 );\n $value >>= 7;\n }\n $this->_data .= chr($value);\n\n $this->_position = strlen($this->_data);\n }", "public static function write_varint(\\Psr\\Http\\Message\\StreamInterface $mem, int $i): int {\r\n $len = 0;\r\n do {\r\n $v = $i & 0x7F;\r\n $i = $i >> 7;\r\n\r\n if ($i != 0)\r\n $v |= 0x80;\r\n\r\n if ($mem->write(chr($v)) !== 1)\r\n throw new \\Exception(\"write_varint(): Error writing byte\");\r\n\r\n $len ++;\r\n } while ( $i != 0 );\r\n\r\n return $len;\r\n }", "public function sendOctet(int $number)\n {\n if ($number > 255 || $number < 0) {\n throw new \\InvalidArgumentException(\n 'Number '.$number.' out of valid range of octet value. Valid \n range is 0 - 255.'\n );\n }\n\n $binary = chr($number);\n $this->sendRaw($binary);\n }", "protected function writeShort($value)\n {\n $this->socket->write(Binary::packShort($value));\n }", "public function write(string $data): int {\n\t\t$this->_check();\n\t\t$this->log(\"> $data\");\n\t\treturn $this->writeData($data . $this->EOL);\n\t}", "protected function writeBytes($value)\n {\n $this->socket->write(Binary::packBytes($value));\n }", "protected function writeChar($value)\n {\n $this->socket->write(Binary::packByte(ord($value)));\n }", "public function writeInt16($i)\r\n {\r\n $this->data .= pack(\"v1\", $i);\r\n }", "public function write(string $string): int;", "public function write(string $string): int\n {\n }", "protected function writeString($value)\n {\n $this->socket->write(Binary::packString($value));\n }", "private function write(int $value): void\n {\n $this->tape[$this->cursor] = $value;\n }", "private function replyStatusPacket() {\n fwrite($this->conn, pack(\"N\", 99999997));\n }", "public function write($type, $s1 = '', $s2 = '')\n {\n $id = $this->packetID++;\n\n $data = pack('VV', $id, $type);\n $data .= $s1.chr(0).$s2.chr(0);\n $data = pack('V', strlen($data)).$data;\n\n fwrite($this->socket, $data, strlen($data));\n\n return $id;\n }", "function socket_sendto(Socket $socket, string $data, int $length, int $flags, string $address, ?int $port = null): int|false {}", "public function writeInt($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "protected function _write(string $message): int {\n\t\t$this->debug($message);\n\t\t$this->output[] = $message;\n\n\t\treturn 0;\n\t}", "protected function _write($socket, $request)\n {\n fwrite($socket, $request);\n }", "public function write($value)\n {\n $this->buffer .= $value;\n }", "public function stream_write($data) {\r\n\t\t// buffer the data\r\n\t\t$this->_buffer .= $data;\r\n\t\treturn strlen($data);\r\n }", "public function write($id, $data);", "public function sendLongLong(int $number)\n {\n $binary = pack('J', $number);\n $this->sendRaw($binary);\n }", "public function write(string $content): int;", "function client_write(StreamSocketInterface $socket, string $response = null) \n\t{\n\t\treturn \\write_socket($socket, $response);\n\t}", "public function write($string) : int\n\t{\n\t\tif (! \\is_resource($this->resource))\n\t\t{\n\t\t\tthrow new Exception\\UnwritableStreamException('Stream is not resourceable');\n\t\t}\n\n\t\tif (! $this->isWritable())\n\t\t{\n\t\t\tthrow new Exception\\UnwritableStreamException('Stream is not writable');\n\t\t}\n\n\t\t$result = \\fwrite($this->resource, $string);\n\n\t\tif (false === $result)\n\t\t{\n\t\t\tthrow new Exception\\UnwritableStreamException('Unable to write to the stream');\n\t\t}\n\n\t\treturn $result;\n\t}", "function enc_write_int($fp,$num,$size){\n\t\tfor($i=$size-1;$i>=0;$i--){\n\t\t\tfwrite($fp,chr(($num>>$i*8)&0xFF));\n\t\t}\n\t}", "public static function writeDataTo($sock, $data, $length = null, $force = false)\n {\n if($force) {\n for($attempt = 10; $attempt > 0; $attempt--) {\n try {\n return socket_write($sock, $data, is_null($length) ? strlen($data) : $length);\n } catch(\\Exception $e) {\n usleep(100);\n }\n }\n } else {\n return socket_write($sock, $data, strlen($data));\n }\n return 0;\n }", "public function stream_write($data){\n $l = strlen($data);\n $this->_stream = substr($this->_stream, 0, $this->_pos) .\n $data .\n substr($this->_stream, $this->_pos += $l);\n\n return $l;\n }", "function dio_write($fd, string $data, int $len = 0) {}", "function write_socket(StreamSocketInterface $socket, string $response = null)\n\t{\n\t\treturn $socket->write($response);\n\t}", "Public Function WriteLong( $val ) {\n fwrite( $this->fp, pack( 'Q', $val ) );\n }", "function mapi_write($socket=NULL, $msg) {\n\t\t// print \"Msg_len: \" . strlen($msg) . \"\\n\";\n\t\tglobal $last_error;\n\n\t\t$fb = 0;\n\t\t$sb = 0;\n\n\t\t$pos = 0;\n\t\t$data = \"\";\n\n\t\t$buf = 0;\n\n\t\t$is_final = FALSE;\n\t\twhile (! $is_final) {\n\t\t\t$data = substr($msg, $pos, min(MAX_PACKET_SIZE, strlen($msg) - $pos));\n\t\t\t$pos += strlen($data);\n\n\t\t\t$end = 0; // more packets will follow\n\t\t\tif ((strlen($msg) - $pos) == 0) {\n\t\t\t\t$is_final = TRUE;\n\t\t\t\t$end = 1;\n\t\t\t}\n\n\t\t\t$fb = (strlen($data) << 1) | $end;\n\n\t\t\t/**\n\t\t\t * socket_write() does not guarantee all data\n\t\t\t * to be transmitted. Make sure that the\n\t\t\t * buffer is flushed.\n\t\t\t */\n\n\t\t\tif (($buf = socket_flush($socket, pack(\"v\", $fb) . $data)) == FALSE) {\n\t\t\t\t$last_error = socket_strerror(socket_last_error());\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t}\n\t\treturn $buf;\n\t}", "private function sink($int)\n {\n }", "public function write(string $path, $data, int $flags = 0) : int;", "public function write($data)\n {\n if (!fwrite($this->fp, $data)) {\n throw new SocketException(\"socket write:{$data} error\");\n }\n return true;\n }", "public function write($string): int\n {\n if (!is_resource($this->resource)) {\n throw new RuntimeException('Stream has no resource');\n }\n\n if (!$this->isWritable()) {\n throw new RuntimeException('Stream is not writable');\n }\n\n $result = fwrite($this->resource, $string);\n if ($result === false) {\n throw new RuntimeException('Unable to write to the stream');\n }\n\n return $result;\n }", "public function write( $data )\n\t{\n\t\t$this->_buffer .= $data;\n\t}", "private function sendSocketIoMessage($message, $data) {\r\n $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\r\n $result = socket_connect($socket, '127.0.0.1', 3000);\r\n if(!$result) {\r\n die('cannot connect ' . socket_strerror(socket_last_error()) . PHP_EOL);\r\n }\r\n $message = json_encode(Array(\"msg\" => $message, \"data\" => $data));\r\n $sentByteCount = socket_write($socket, $message, strlen($message));\r\n socket_close($socket);\r\n\r\n return $sentByteCount;\r\n }", "public function send(int $flags) {}", "public function write($data)\n {\n if (fwrite($this->_stream, $data . \"\\r\\n\") === false) {\n throw new Horde_Imap_Client_Exception(\n Horde_Imap_Client_Translation::t(\"Server write error.\"),\n Horde_Imap_Client_Exception::SERVER_WRITEERROR\n );\n }\n\n $this->_debug->client($data);\n }", "private function write( $str ) {\n fwrite( $this->socket, $str . \"\\n\" );\n }", "public function sendRaw(string $data): ?int\n {\n if ($this->accumulate) {\n @$this->buffer .= $data;\n return null;\n }\n return $this->socket->writeRaw($data);\n }", "public function send($data) {\n $len = strlen($data);\n if ($this->v) l('Sending '.$len.' byte(s): '.$data);\n $sent = socket_write($this->sock, $data, $len);\n return ($sent === $len);\n }", "public function stream_write($data) {\n return fwrite($this->handle, $data);\n }", "public abstract function writeByte($b);", "public function stream_write($data);", "public function sendShort(int $number)\n {\n if ($number > 65535 || $number < 0) {\n throw new \\InvalidArgumentException(\n 'Number '.$number.' out of valid range of short value. Valid \n range is 0 - 65535.'\n );\n }\n\n $binary = pack('n', $number);\n $this->sendRaw($binary);\n }", "public function write(string $buffer): int\n {\n if ($buffer === null) {\n throw new Exception('You must inform some data to be written');\n }\n\n $bytesToWrite = strlen($buffer);\n\n $hasWriteLen = $this->stream->sendAll($buffer, $this->getWriteTimeout());\n\n if($hasWriteLen !== $bytesToWrite) {\n $this->ioException();\n }\n\n return $hasWriteLen;\n }", "public function write ($data);", "private function _write($msg)\n {\n $this->_connect('write');\n if ($result = fwrite($this->_conn['write'], $msg)) {\n if ($this->_role != 'server') {\n try {\n $this->_sendSignal($this->_pid);\n } catch (\\Exception $e) {\n self::$_log->warn($e->getMessage());\n }\n }\n $this->_disconnect('write');\n } else {\n $this->_disconnect('write');\n throw new \\Seraphp\\Exceptions\\IOException(\n 'Cannot write FIFO: '.$this->_fifo\n );\n }\n return $result;\n }", "public function writeInt32(int $value): self\n {\n $this->bytes .= Writer::bit32($value);\n\n return $this;\n }", "public function write($string)\n {\n $this->buffer .= $string;\n\n return strlen($string);\n }", "public function sendto($ip, $port, $send_data, $server_socket = null) {}", "function net_write($handle, string $response = '')\n {\n return Network::write($handle, $response);\n }", "public function send(string $number, string $content);", "public function sendToSocket($socket, $message){ \n $this->sendReturn = @socket_write($socket, $message, strlen($message) ); \n if($this->sendReturn === false){\n return false;\n }else{\n return true;\n }\n }", "function writeByte(){\r\n\t\tdie('Not implemented');\r\n\t}", "private function write1argInt($b) \n {\n $out->write($b);\n }", "public function writeByte($byte);", "abstract public function writeByte($b);", "public function sendLong(int $number)\n {\n if ($number > 4294967295 || $number < 0) {\n throw new \\InvalidArgumentException(\n 'Number '.$number.' out of valid range of long value. Valid \n range is 0 - 4 294 967 295.'\n );\n }\n\n $binary = pack('N', $number);\n $this->sendRaw($binary);\n }", "public function write($data) {\n\n return event_buffer_write($this->resource, $data);\n\n }", "public static function socket_write_all($socket, string $data): void\n {\n if (!($dlen = strlen($data))) {\n return;\n }\n do {\n assert($dlen > 0);\n assert(strlen($data) === $dlen);\n $sent_now = socket_write($socket, $data);\n if (false === $sent_now) {\n $err = socket_last_error($socket);\n throw new \\RuntimeException(\"socket_write() failed! {$err}: \" . socket_strerror($err));\n }\n if (0 === $sent_now) {\n // we'll try *1* last time before throwing exception...\n $sent_now = socket_write($socket, $data);\n if (false === $sent_now) {\n $err = socket_last_error($socket);\n throw new \\RuntimeException(\"socket_write() failed after first returning zero! {$err}: \" . socket_strerror($err));\n }\n if (0 === $sent_now) {\n // something is very wrong but it's not registering as an error at the kernel apis...\n throw new \\RuntimeException(\"socket_write() keeps returning 0 bytes sent while {$dlen} byte(s) to send!\");\n }\n }\n $dlen -= $sent_now;\n $data = substr($data, $sent_now);\n } while ($dlen > 0);\n assert($dlen === 0);\n assert(strlen($data) === 0);\n // all data sent.\n return;\n }", "public function write(string $id, string $data)\n {\n }", "protected function write()\n {\n $this->writeShort($this->id);\n }", "function net_write($handle, string $response = '')\n {\n return Networks::write($handle, $response);\n }", "public function write();", "public function write();", "public function stream_write($data) \r\n {\r\n $left = substr($this->_data, 0, $this->_pos);\r\n $right = substr($this->_data, $this->_pos + strlen($data));\r\n $this->_data = $left . $data . $right;\r\n $this->_pos += strlen($data);\r\n return strlen($data);\r\n\r\n return $ret;\r\n }", "public function send($buffer, $flags = 0, $length = null)\n {\n if (null === $length) {\n $length = strlen($buffer);\n }\n\n // make sure everything is written\n do {\n $return = @socket_send($this->resource, $buffer, $length, $flags);\n\n if (false !== $return && $return < $length) {\n $buffer = substr($buffer, $return);\n $length -= $return;\n\n } else {\n break;\n }\n } while (true);\n\n if ($return === false) {\n throw new SocketException($this->resource);\n }\n\n return $return;\n }", "public function write($data);", "public function write($data);", "public function write($data);", "public function write($data);", "public function write($data);", "public function write($data);", "public function write($msg);", "private function send($id, $type, $value = array()){\n $message = array(\n 'id' => $id,\n 'type' => $type,\n 'value' => $value\n );\n\n $this->conn->send(json_encode($message));\n }", "public function write($data)\n {\n $this->ensureDeviceOpen();\n\n $dataWritten = fwrite($this->fd, $data);\n if (false !== $dataWritten) {\n fflush($this->fd);\n\n return $dataWritten;\n }\n\n throw new WriteNotAllowed();\n }", "public function write($data)\n {\n $this->connection->write($data);\n $this->client->setActiveAt(new \\DateTime('now'));\n }", "public function send($message)\r\n {\r\n if (!$this->isConnected()) {\r\n return false;\r\n }\r\n\r\n return socket_write($this->socket, $message . \"\\n\");\r\n }", "protected function _write($message) {\n if (!$this->_handle) {\n $this->_handle = $this->_open($this->_config['host'], $this->_config['port'], $this->_config['timeout']);\n if ($this->_handle === false) {\n throw new SocketException('Could not connect to logstash');\n }\n }\n return @fwrite($this->_handle, $message);\n }", "function stream_write($data)\n {\n $left = substr($this->_varname, 0, $this->_position);\n $right = substr($this->_varname, $this->_position + strlen($data));\n $this->_varname = $left . $data . $right;\n $this->_position += strlen($data);\n return strlen($data);\n }", "function sendSwitchMessage($pipe, $state) {\n\n $msg = array(\"nodeid\" => $pipe, \"action\" => 0, \"state\" => intval($state));\n\n $fp = stream_socket_client(\"tcp://localhost:30000\", $errno, $errstr);\n\n fwrite($fp, json_encode($msg, JSON_NUMERIC_CHECK));\n fclose($fp);\n}", "function radius_put_int($radius_handle, $type, $value, $options = false, $tag = NULL)\n{\n}", "function write($data);", "function write($data);", "public function stream_write($data)\n {\n if (self::$logger instanceof Zend_Log) {\n self::$logger->log(\"stream_write($data)\", Zend_Log::DEBUG);\n }\n\n if (!$this->_objectName) {\n return 0;\n }\n $len = strlen($data);\n $this->_objectBuffer .= $data;\n $this->_objectSize += $len;\n return $len;\n }", "protected function write($message)\n {\n $this->assertConnected();\n\n $bytesToSend = strlen($message);\n $numZeroByteWritesLeft = self::ZERO_BYTE_WRITES_ALLOWED;\n\n do {\n $sent = fwrite($this->socket, $message);\n if ($sent === false) {\n throw new RuntimeException('Error writing to socket.');\n }\n\n if ($sent === 0) {\n // according to its documentation's comments, fwrite returns 0 instead of false on\n // many errors, such as connection loss.\n $numZeroByteWritesLeft--;\n if ($numZeroByteWritesLeft < 0) {\n throw new RuntimeException(\n sprintf('Error writing to socket: maximum zero byte writes (%s) exceeded', self::ZERO_BYTE_WRITES_ALLOWED)\n );\n }\n }\n\n $message = substr($message, $sent);\n\n $bytesToSend -= $sent;\n } while ($bytesToSend > 0);\n\n return $this;\n }", "function socket_set_option(Socket $socket, int $level, int $option, $value): bool {}", "public function addInt($x)\n {\n $this->prep(4, 0);\n $this->putInt($x);\n }" ]
[ "0.70908684", "0.6981528", "0.6823753", "0.6461725", "0.6431887", "0.64160323", "0.63963354", "0.63076586", "0.6271474", "0.6198911", "0.61201876", "0.6109699", "0.6078748", "0.6054211", "0.6049845", "0.60384244", "0.5888165", "0.585381", "0.58290195", "0.57939875", "0.57759774", "0.5749193", "0.57382274", "0.5725521", "0.57096785", "0.56796014", "0.5677799", "0.56614006", "0.5645509", "0.5637676", "0.5609431", "0.55967045", "0.5595754", "0.5560265", "0.55597574", "0.5558445", "0.55024415", "0.5496288", "0.5483373", "0.54690766", "0.546231", "0.54497176", "0.54182994", "0.53170604", "0.5310927", "0.53082323", "0.52908057", "0.5286586", "0.52832013", "0.5265913", "0.5264612", "0.52598035", "0.5248603", "0.5243373", "0.5236309", "0.5227454", "0.5213661", "0.520611", "0.5202916", "0.5190769", "0.5189068", "0.51889664", "0.5187404", "0.51754695", "0.51703775", "0.5164862", "0.515841", "0.515718", "0.515595", "0.5155445", "0.51528597", "0.51490366", "0.51447463", "0.51418525", "0.5136131", "0.5123545", "0.5123545", "0.51199144", "0.51184183", "0.51138926", "0.51138926", "0.51138926", "0.51138926", "0.51138926", "0.51138926", "0.51077455", "0.5099252", "0.5080728", "0.5080487", "0.5072428", "0.5071693", "0.5057485", "0.504791", "0.5044391", "0.5028943", "0.5028943", "0.5018968", "0.500987", "0.5008192", "0.50002867" ]
0.8281491
0
Read an integer from the socket.
Чтение целого числа из сокета.
protected function readInt() { return Binary::unpackInt($this->socket->read(4)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function receiveOctet(): int\n {\n $binaryData = $this->receiveRaw(1);\n\n $translatedData = unpack('C', $binaryData);\n return $translatedData[1];\n }", "protected function readInteger()\n {\n if ($this->littleEndian) {\n $result = unpack('Vint', fread($this->file, 4));\n } else {\n $result = unpack('Nint', fread($this->file, 4));\n }\n\n return $result['int'];\n }", "public function readUnsignedInt(){ }", "protected function readInteger() {\r\n\t\tif ($this->littleEndian) {\r\n\t\t\t$result = unpack ( 'Vint', fread ( $this->file, 4 ) );\r\n\t\t} else {\r\n\t\t\t$result = unpack ( 'Nint', fread ( $this->file, 4 ) );\r\n\t\t}\r\n\t\t\r\n\t\treturn $result ['int'];\r\n\t}", "public function readInt()\n {\n return $this->bin->readInt();\n }", "public function receiveLong(): int\n {\n $binaryData = $this->receiveRaw(4);\n\n $translatedData = unpack('N', $binaryData);\n return $translatedData[1];\n }", "public function readInt(){ }", "protected function readLong()\n {\n return Binary::unpackLong($this->socket->read(8));\n }", "protected function readInt() {\r\n $this->skipSpaces();\r\n $retval = 0;\r\n $intBuffer = $this->readStringNumber();\r\n try {\r\n $retval = 0 + $intBuffer;\r\n } catch( Exception $e ) {\r\n $this->seqSource->unread($intBuffer);\r\n throw new Exception( \"Error: Expected an integer type at offset \".$this->seqSource->getPosition());\r\n }\r\n return $retval;\r\n }", "function socket_recv(Socket $socket, &$data, int $length, int $flags): int|false {}", "protected function readByte()\n {\n return Binary::unpackByte($this->socket->read(1));\n }", "public function readInt()\n {\n $str = substr($this->_data, $this->_position, 4);\n $this->_position += 4;\n\n return ord($str[0]) << 24 |\n ord($str[1]) << 16 |\n ord($str[2]) << 8 |\n ord($str[3]);\n }", "function socket_read(Socket $socket, int $length, int $mode = PHP_BINARY_READ): string|false {}", "public function receiveShort(): int\n {\n $binaryData = $this->receiveRaw(2);\n\n $translatedData = unpack('n', $binaryData);\n return $translatedData[1];\n }", "public function readint32()\n {\n $bytes = $this->read(4);\n if (4 != $this->strlen($bytes)) {\n return false;\n }\n $endian_letter = ('big' == $this->endian) ? 'N' : 'V';\n $int = unpack($endian_letter, $bytes);\n return reset($int);\n }", "function client_read(StreamSocketInterface $socket, int $size = -1) \n\t{\n\t\treturn $socket->response($size);\n\t}", "function read_socket(StreamSocketInterface $socket, int $size = -1)\n\t{\n\t\treturn $socket->read($size);\n\t}", "public function read($size=1024) {\n return socket_read($this->sock,$size,PHP_BINARY_READ);\n }", "public function receiveBit(): int\n {\n $rawByte = $this->receiveRaw(1);\n\n $value = @($rawByte & 1) ? 1 : 0;\n return $value;\n }", "private function read() {\n return fgets( $this->socket, 128 );\n }", "protected function readInteger($content)\n {\n $int = unpack('N', substr($content, 0, 4));\n return $int[1];\n }", "public function readUInt32() {\n\t\t$t = unpack(\"V\", $this->stream->readBytes(4));\n\t\treturn $t[1];\n\t}", "function readint32()\n {\n }", "public function receiveLongLong(): int\n {\n $rawData = $this->receiveRaw(8);\n\n $translated = unpack('J', $rawData);\n return $translated[1];\n }", "protected function readInt($data)\n {\n $ary = unpack('Nlength', $data);\n return $ary['length'];\n }", "function socket_recvfrom(Socket $socket, &$data, int $length, int $flags, &$address, &$port = null): int|false {}", "public function read() {\n\t\treturn $this->atEnd() ? -1 : ord(substr($this->streamData, $this->endPointer++, 1));\n\t}", "public function getRead(): int\n {\n return (int)$this->getMetric('getRead');\n }", "public function int()\n {\n // Go through the pack-unpack thing so php 32 bit doesn't turn 255.255.255.255 into a float\n $data = unpack(\"Nint\", pack(\"CCCC\", $this->address[0], $this->address[1], $this->address[2], $this->address[3]));\n return $data['int'];\n }", "public function read(int $length = 2048, int $type = PHP_BINARY_READ)\n {\n if (!$this->isSocketOpened()) {\n throw new ClientTCPSocketException('');\n }\n\n $buffer = @socket_read($this->socket, $length, $type);\n \n return trim($buffer);\n }", "public function readByte()\n {\n if ($this->in == null) {\n return - 1;\n }\n $c = $this->in->readByte();\n if ($c == - 1) {\n $this->nextStream();\n return $this->readByte();\n }\n return $c;\n }", "function net_read($handle, int $size = -1)\n {\n return Network::read($handle, $size);\n }", "protected function _read() {\n return $this->_readLong();\n }", "public function read($value)\n {\n if (is_null($value)) {\n $value = 0;\n }\n \n if (!is_numeric($value)) {\n throw new IntegerException('Reading from non-integer: ' . $value);\n }\n\n $this->_buffer = intval($value);\n }", "protected function readShort()\n {\n return Binary::unpackShort($this->socket->read(2));\n }", "public function read()\n\t{\n\t\t$this->connect();\n\n\t\t$data = '';\n\n\t\twhile(!feof($this->socket))\n\t\t{\n\t\t\t$data .= fgets($this->socket, 1024);\n\t\t}\n\n\t\treturn strlen($data) ? $data : false;\n\t}", "public function readLong()\n {\n return $this->bin->readLong();\n }", "public function get_raw_integer() {\n $x = 0;\n $b = $this->get_bytes((PHP_INT_SIZE+3)&~3);\n foreach (unpack('L*', $b) as $w) {\n $x <<= 32;\n $x |= $w;\n }\n return $x;\n }", "public function read($length = 1024)\n {\n if (false === ($data = fread($this->fp, $length))) {\n throw new SocketException('socket read error');\n }\n return $data;\n }", "public function read(int $length): string\n {\n if ($length > self::READ_MAX_LENGTH) {\n throw Exception\\Socket::invalidLength($length, self::READ_MAX_LENGTH);\n }\n// $data = $this->stream->recvAll($length, $this->getReadTimeout());\n $data = $this->stream->recvAll($length);\n if ($data === false) {\n throw new Exception(\n sprintf('Read msg error %s:%d (%s [%d])', $this->host, $this->port, $this->stream->errMsg, $this->stream->errCode)\n );\n }\n return $data;\n }", "public function readPhpInt()\n {\n list(,$res) = unpack('N', $this->rawRead(4));\n\n if ($this->_is64bit) {\n $sres = sprintf (\"%u\", $res);\n return (int) $sres;\n } else {\n return $res;\n }\n }", "private function read(): int\n {\n if (!array_key_exists($this->cursor, $this->tape)) {\n $this->tape[$this->cursor] = 0;\n }\n return $this->tape[$this->cursor];\n }", "public function read(int $length);", "public function readInt32(){ }", "public function read($num)\n {\n $chunks = array();\n $len_read_so_far = 0;\n while ($len_read_so_far < $num) {\n $chunk = fread($this->socket, $num - $len_read_so_far);\n $len_read_so_far += strlen($chunk);\n $chunks[] = $chunk;\n }\n return implode('', $chunks);\n }", "public function readInt32()\n {\n $bytes = $this->read(4);\n if (4 != $this->strLen($bytes))\n return false;\n $endianLetter = ('big' == $this->endian) ? 'N' : 'V';\n $int = unpack($endianLetter, $bytes);\n return array_shift($int);\n }", "function net_read($handle, int $size = -1)\n {\n return Networks::read($handle, $size);\n }", "abstract public function read($n);", "public function readVInt()\n {\n $nextByte = ord($this->_data[$this->_position++]);\n $val = $nextByte & 0x7F;\n\n for ($shift=7; ($nextByte & 0x80) != 0; $shift += 7) {\n $nextByte = ord($this->_data[$this->_position++]);\n $val |= ($nextByte & 0x7F) << $shift;\n }\n return $val;\n }", "public function readNumber($n)\r\n\t{\r\n\t\t$s = $this->read($n);\r\n\t\t$l = strlen($s);\r\n\t\t$r = 0;\r\n\t\tfor($i = 0; $i < $l; $i++)\r\n\t\t\t$r += ord($s[$i]) << (8*$i);\r\n\t\treturn $r;\r\n\t}", "public function readInt32()\n {\n $value = Reader::bit32($this->bytes);\n\n $this->skip(4);\n\n return $value;\n }", "public function readFromSocketWithGivenLength()\n {\n $this->mockSocket->expects($this->once())\n ->method('read')\n ->with($this->equalTo(3))\n ->will($this->returnValue('foo'));\n $this->assertEquals('foo', $this->socketInputStream->read(3));\n }", "public function readByte();", "public function readByte();", "public function readInt()\r\n {\r\n $ret = unpack(\"V1ele\", substr($this->data, $this->offset, 4));\r\n $this->offset += 4;\r\n\r\n return $ret['ele'];\r\n }", "public function read($num)\n {\n return fread($this->in, $num);\n }", "public function GetLong( ) : int\n\t\t{\n\t\t\tif( $this->Remaining( ) < 4 )\n\t\t\t{\n\t\t\t\tthrow new InvalidPacketException( 'Not enough data to unpack a long.', InvalidPacketException::BUFFER_EMPTY );\n\t\t\t}\n\t\t\t\n\t\t\t$Data = UnPack( 'l', $this->Get( 4 ) );\n\t\t\t\n\t\t\treturn (int)$Data[ 1 ];\n\t\t}", "public function read($len) {\n $read = 0;\n $data = '';\n\n while($read < $len) {\n $fread = @socket_read($this->_handle, $len - $read, PHP_BINARY_READ);\n\n if($fread === false) {\n $errer_no = socket_last_error($this->_handle);\n\n if($errer_no == SOCKET_EINTR) {\n usleep(1);\n continue;\n } else {\n $this->error(self::class . ': Failed to read data from ' . $this->getDomain(), $errer_no);\n }\n } elseif($fread == '') {\n //Connection closed\n $this->error(self::class . ': TSocket read 0 bytes from ' . $this->getDomain(), SOCKET_ECONNRESET);\n }\n\n $read += TStringFuncFactory::create()->strlen($fread);\n $data .= $fread;\n }\n\n return $data;\n }", "function mapi_read($socket=NULL) {\n\t\t# get the first 2 bytes\n\t\tif (($header = socket_read($socket, 2)) == FALSE) {\n\t\t\t$last_error = socket_strerror(socket_last_error());\n\t\t\tthrow new Exception('Lost connection with the server: ' . $last_error);\n\t\t}\n\t\t$data = \"\";\n\n\t\t$chunk_size = ((ord($header[1]) << 7) | (ord($header[0]) >> 1));\n\t\t// keep reading until we have everything\n\t\twhile (strlen($data) < $chunk_size) {\n\t\t\t$data .= socket_read($socket, $chunk_size - strlen($data));\n\t\t}\n\n\n\t\twhile ((ord($header[0]) & 1) == 0) {\n\t\t\tif (($header = socket_read($socket, 2)) == FALSE) {\n\t\t\t\t$last_error = socket_strerror(socket_last_error());\n\t\t\t\tthrow new Exception('Lost connection with the server: ' . $last_error);\n\t\t\t}\n\n\t\t\t$chunk_size = ((ord($header[1])) << 7) | (ord($header[0]) >> 1);\n\n\t\t\t$block = \"\";\n\t\t\twhile (strlen($block) < $chunk_size) {\n\t\t\t\tif (($block .= socket_read($socket, $chunk_size - strlen($block))) == FALSE) {\n\t\t\t\t\t$last_error = socket_strerror(socket_last_error());\n\t\t\t\t\tthrow new Exception('Lost connection with the server: ' . $last_error);\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t$data = $data . $block;\n\t\t}\n\t\tif (strlen($data) == 0) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\treturn $data;\n\t}", "public function read($size = 512)\r\n {\r\n if (!$this->isConnected()) {\r\n return false;\r\n }\r\n $data = socket_read($this->socket, $size);\r\n if (!$data) {\r\n if ($this->getLastError() == 107) {\r\n $this->close();\r\n $this->socket = null;\r\n }\r\n }\r\n return $data;\r\n }", "public function read(int $len)\n {\n return $this->readBlocking($len);\n }", "protected function read() : bool\n {\n if (feof($this->socket)) {\n $this->connect();\n }\n // try to read 1 byte from the socket\n $type = stream_get_contents($this->socket, 1);\n\n if (strlen($type) == 0) {\n // no data yet\n return false;\n }\n\n $type = unpack('C', $type)[1];\n\n // got a packet, read length\n $multiplier = 1;\n $len = 0;\n do {\n $encodedByte = unpack('C', stream_get_contents($this->socket, 1))[1];\n $len += ($encodedByte & 0x7F) * $multiplier;\n $multiplier *= 0x80;\n if ($multiplier > 0x80*0x80*0x80) {\n throw new \\RuntimeException(\"Malformed length\");\n }\n } while (($encodedByte & 0x80) != 0);\n\n $data = stream_get_contents($this->socket, $len);\n\n // split the type and flags\n $flags = $type & 0x0F;\n $type = $type & 0xF0;\n\n switch ($type) {\n case self::TYPE_CONNACK:\n case self::TYPE_PINGREQ:\n case self::TYPE_PINGRESP:\n // nothing to do here\n break;\n case self::TYPE_SUBACK:\n $ident = unpack('nident', $data)['ident'];\n unset($this->state[$ident]);\n break;\n case self::TYPE_PUBLISH:\n $this->recvPublish($flags, $data);\n break;\n case self::TYPE_PUBREL:\n $this->recvPubrel($flags, $data);\n break;\n case self::TYPE_PUBACK:\n // TODO verify qos type\n $ident = unpack('n', $data)[1];\n unset($this->state[$ident]);\n case self::TYPE_PUBREC:\n // send PUBREL\n // TODO verify qos type\n $ident = unpack('n', $data)[1];\n $headers = pack('n', $ident);\n $this->send(self::TYPE_PUBREL | self::FLAG_PUBREL, $headers, '');\n $this->state[$ident] = [\n 'last_change' => time(),\n 'onfail' => function() use ($headers) {\n $this->send(self::TYPE_PUBREL | self::FLAG_PUBREL, $headers, '');\n }\n ];\n break;\n case self::TYPE_PUBCOMP:\n // finish publish qos 2\n // TODO verify qos type\n $ident = unpack('n', $data)[1];\n unset($this->state[$ident]);\n break;\n default:\n // unknown type, just ignore for now\n break;\n }\n\n return true;\n }", "private function _read()\n {\n $read = array($this->_conn['read']);\n if (stream_select($read, $w = null, $x = null, self::TIMEOUT, 15) > 0) {\n unset($w, $e);\n if ($reply = fgets($this->_conn['read'])) {\n return $reply;\n } else {\n throw new \\Seraphp\\Exceptions\\IOException('No reply in FIFO');\n }\n } else {\n throw new \\Seraphp\\Exceptions\\IOException('FIFO read timed out!');\n }\n }", "public function read($length = 4096)\n {\n $this->connect();\n if (is_null($length)) {\n return fgets($this->socket);\n } else {\n return fgets($this->socket, $length);\n }\n }", "public function getUserID($socket){\n\t\treturn intval($socket);\n\t}", "protected function _read(int $characterCount): string {\n\t\t$result = fread($this->socket, $characterCount);\n\t\tif ($this->optionBool(self::OPTION_DEBUG_READ)) {\n\t\t\t$this->_log('->read({count}) = {result}', [\n\t\t\t\t'count' => $characterCount, 'result' => $result === false ? 'false' : strlen($result) . ' bytes',\n\t\t\t]);\n\t\t}\n\t\tif (strlen($result) === 0) {\n\t\t\tthrow new Exception_Protocol(\"fread returned empty: $result\");\n\t\t}\n\t\t$this->log(\"< $result\");\n\t\treturn $result;\n\t}", "public static function readDataFrom($sock, $length, $binary = true)\n {\n return socket_read($sock, $length, $binary ? PHP_BINARY_READ : PHP_NORMAL_READ);\n }", "public function readLine()\n {\n \tif (!$this->isConnected()) {\n throw new Rediska_Connection_Exception(\"Can't read without connection to Redis server. Do connect or write first.\");\n \t}\n\n \t$string = @fgets($this->_socket);\n\n if ($string === false) {\n $this->disconnect();\n throw new Rediska_Connection_Exception(\"Can't read from socket.\");\n }\n\n return trim($string);\n }", "public function readByte()\n {\n return $this->bin->readByte(); // OK\n }", "public function readLong()\n {\n $this->_bitCount = 0;\n $this->bits = 0;\n list(,$res) = unpack('N', $this->rawRead(4));\n $sres = sprintf(\"%u\", $res);\n return $sres;\n }", "function tell () {\n return ftell($this->sock);\n }", "public function read($cmd = 'READ:') {\n $this->sendLine($cmd);\n return $this->php_serial->readPort();\n }", "public function pop(): int\n {\n $redis = $this->getConnection();\n\n return (int) $redis->eval(\n LuaScripts::pop(),\n 3,\n \"{$this->channelPrefix}{$this->channel}:waiting\",\n \"{$this->channelPrefix}{$this->channel}:reserved\",\n \"{$this->channelPrefix}{$this->channel}:attempts\",\n $this->options['handle_timeout'] ?? 60 * 30\n );\n }", "public function readByte()\n {\n $this->position ++;\n return fread($this->handle, 1);\n }", "public function read($len);", "public function read($len);", "public function read($len);", "protected function _read($socket)\n {\n $response = '';\n while ($buff = fread($socket, 8192)) {\n $response .= $buff;\n }\n \n fclose($socket);\n \n return $response;\n }", "protected function read_message( $socket ) {\n\t\t$recv = socket_recv( $socket, $header, 4, MSG_WAITALL );\n\t\tif ( strlen( $header ) !== 4 )\n\t\t\tthrow new Exception( \"Prefork::read_message() failed receiving header\" );\n\t\t$length = current( unpack( 'N', $header ) );\n\t\t$recv = socket_recv( $socket, $message, $length, MSG_WAITALL );\n\t\tif ( strlen( $message ) !== $length )\n\t\t\tthrow new Exception( \"Prefork::read_message() failed receiving message\" );\n\t\treturn $message;\n\t}", "public function readInt16(){ }", "function dio_read($fd, int $len = 1024) {}", "public function readByte()\r\n\t{\r\n\t\t$s = $this->read(1);\r\n\t\treturn empty($s) ? 0 : ord($s[0]);\r\n\t}", "function enc_read_int($fp,$size){\n\t\t$ret=0;\n\t\t$val=fread($fp,$size);\n\t\twhile(strlen($val)){\n\t\t\t$ret=$ret<<8;\n\t\t\t$ret+=ord($val);\n\t\t\t$val=substr($val,1);\n\t\t}\n\t\treturn $ret;\n\t}", "private static function getInt($param)\n {\n list(, $size) = unpack('N', $param);\n if ((PHP_INT_SIZE !== 4)) {\n $size = sprintf(\"%u\", $size);\n }\n\n return (int)$size;\n }", "public function GetUnsignedLong( ) : int\n\t\t{\n\t\t\tif( $this->Remaining( ) < 4 )\n\t\t\t{\n\t\t\t\tthrow new InvalidPacketException( 'Not enough data to unpack an usigned long.', InvalidPacketException::BUFFER_EMPTY );\n\t\t\t}\n\t\t\t\n\t\t\t$Data = UnPack( 'V', $this->Get( 4 ) );\n\t\t\t\n\t\t\treturn (int)$Data[ 1 ];\n\t\t}", "public function readUnsignedInt32($endian=null){ }", "protected function readLong() {\r\n $this->skipSpaces();\r\n $retval = 0;\r\n $longBuffer = $this->readStringNumber();\r\n try {\r\n $retval = 0 + $longBuffer;\r\n } catch( Exception $e ) {\r\n $this->seqSource->unread($longBuffer);\r\n throw new Exception( \"Error: Expected a long type at offset \"\r\n .$this->seqSource->getPosition().\", instead got '$longBuffer'\");\r\n }\r\n return $retval;\r\n }", "public function read($length = 1024);", "function read() {}", "private static function unpackVarInt($fp, &$response = null)\n {\n $int = 0;\n $pos = 0;\n while (true) {\n $chunk = fread($fp, 1);\n if ($response !== null) {\n $response .= $chunk;\n }\n $byte = ord($chunk);\n $int |= ($byte & 0x7F) << $pos++ * 7;\n if ($pos > 5) {\n throw new RuntimeException('VarInt too big');\n }\n if (($byte & 0x80) !== 128) {\n break;\n }\n }\n return $int;\n }", "public function read($length)\n {\n if (!$this->isConnected()) {\n throw new Rediska_Connection_Exception(\"Can't read without connection to Redis server. Do connect or write first.\");\n }\n\n if ($length > 0) {\n \t$data = $this->_readAndThrowException($length);\n } else {\n \t$data = null;\n }\n\n if ($length !== -1) {\n $this->_readAndThrowException(2);\n }\n\n return $data;\n }", "private function processInteger() {\n if (!$this->isOfType('e'))\n $this->throwException();\n\n $this->pointer++;\n\n $delim_pos = strpos($this->content, 'e', $this->pointer);\n $integer = substr($this->content, $this->pointer, $delim_pos - $this->pointer);\n if (($integer == '-0') || ((substr($integer, 0, 1) == '0') && (strlen($integer) > 1)))\n $this->throwException();\n\n $integer = abs(intval($integer));\n $this->pointer = $delim_pos + 1;\n return $integer;\n }", "public function read($len)\n {\n if (!$this->isOpen()) {\n throw new TTransportException('ClientTransport not open.', TTransportException::NOT_OPEN);\n }\n return $this->client->recv($len, true);\n }", "public function readUnsignedChar(){ }", "public function readLine() {\r\n if (!$this -> mHandle) {\r\n $this -> setError('Not connected', '500', mlError);\r\n return '';\r\n } \r\n $lRet = fgets($this -> mHandle, $this -> mByteBuffer);\r\n $this -> dbg('READ : '.$lRet);\r\n if ($lRet === FALSE) {\r\n $this -> setError('TCP: Data not read', 102, mlError);\r\n return '';\r\n }\r\n return $lRet;\r\n }", "public function read()\n {\n if (feof($this->_stream)) {\n $this->close();\n $this->_debug->info(\"ERROR: Server closed the connection.\");\n throw new Horde_Imap_Client_Exception(\n Horde_Imap_Client_Translation::t(\"POP3 Server closed the connection unexpectedly.\"),\n Horde_Imap_Client_Exception::DISCONNECT\n );\n }\n\n if (($read = fgets($this->_stream)) === false) {\n $this->_debug->info(\"ERROR: IMAP read/timeout error.\");\n throw new Horde_Imap_Client_Exception(\n Horde_Imap_Client_Translation::t(\"Error when communicating with the mail server.\"),\n Horde_Imap_Client_Exception::SERVER_READERROR\n );\n }\n\n $this->_debug->server(rtrim($read, \"\\r\\n\"));\n\n return $read;\n }", "public function readRawByte() {\n if ($this->position == $this->limit) {\n throw new TIndexOutOfBoundsException(\"Stream is EOF\");\n }\n $value = ord(substr($this->input, $this->position++, 1));\n return $value > 127 ? $value - 256 : $value;\n }", "public function readByte()\n {\n return ord($this->_data[$this->_position++]);\n }", "public function read($length);", "public function read($length);" ]
[ "0.7061859", "0.7023628", "0.70133704", "0.6947106", "0.6887837", "0.67263883", "0.6713436", "0.6602487", "0.659605", "0.6549112", "0.64157605", "0.6401958", "0.63996047", "0.6376937", "0.63135624", "0.6310745", "0.62537163", "0.62133926", "0.6193919", "0.61895645", "0.6185175", "0.6158093", "0.61349607", "0.6127356", "0.60280013", "0.5985837", "0.59766483", "0.5966433", "0.59559053", "0.5940525", "0.59356266", "0.59330386", "0.5926539", "0.58812094", "0.5789158", "0.5786811", "0.5777245", "0.5766185", "0.5766082", "0.57635", "0.5754794", "0.5754623", "0.5754589", "0.5754211", "0.574848", "0.57473946", "0.5717908", "0.5701727", "0.5696066", "0.56423223", "0.55896395", "0.55867964", "0.55737334", "0.55737334", "0.5553317", "0.5540715", "0.5515999", "0.549642", "0.5485165", "0.5416563", "0.54152465", "0.53895426", "0.5367235", "0.53638196", "0.5347868", "0.5334365", "0.5327207", "0.5307292", "0.53071606", "0.5285263", "0.5277205", "0.52645344", "0.5260107", "0.5259722", "0.5245004", "0.5245004", "0.5245004", "0.5235982", "0.5231897", "0.5216729", "0.5215533", "0.5214467", "0.5203338", "0.5202554", "0.519732", "0.51903564", "0.5190117", "0.51819086", "0.5179484", "0.5158701", "0.51504093", "0.5148629", "0.51449245", "0.51246375", "0.510931", "0.50998175", "0.5097796", "0.5079024", "0.50722635", "0.50722635" ]
0.81396043
0
Write a long to the socket.
Напишите long в сокет.
protected function writeLong($value) { $this->socket->write(Binary::packLong($value)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Public Function WriteLong( $val ) {\n fwrite( $this->fp, pack( 'Q', $val ) );\n }", "function socket_write(Socket $socket, string $data, ?int $length = null): int|false {}", "public function sendLongLong(int $number)\n {\n $binary = pack('J', $number);\n $this->sendRaw($binary);\n }", "public function writeLong($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function writeLong($value)\n {\n // We do not need to check if file position points to the end of \"file\".\n // Only append operation is supported now\n\n /**\n * Check, that we work in 64-bit mode.\n * fseek() and ftell() use long for offset. Thus, largest index segment file size in 32bit mode is 2Gb\n */\n if (PHP_INT_SIZE > 4) {\n settype($value, 'integer');\n $this->_data .= chr($value>>56 & 0xFF) .\n chr($value>>48 & 0xFF) .\n chr($value>>40 & 0xFF) .\n chr($value>>32 & 0xFF) .\n chr($value>>24 & 0xFF) .\n chr($value>>16 & 0xFF) .\n chr($value>>8 & 0xFF) .\n chr($value & 0xFF);\n } else {\n $this->writeLong32Bit($value);\n }\n\n $this->_position = strlen($this->_data);\n }", "public function sendLong(int $number)\n {\n if ($number > 4294967295 || $number < 0) {\n throw new \\InvalidArgumentException(\n 'Number '.$number.' out of valid range of long value. Valid \n range is 0 - 4 294 967 295.'\n );\n }\n\n $binary = pack('N', $number);\n $this->sendRaw($binary);\n }", "public function receiveLongLong(): int\n {\n $rawData = $this->receiveRaw(8);\n\n $translated = unpack('J', $rawData);\n return $translated[1];\n }", "function writeLong(){\r\n\t\tdie('Not implemented');\r\n\t}", "protected function writeInt($value)\n {\n $this->socket->write(Binary::packInt($value));\n }", "function socket_send(Socket $socket, string $data, int $length, int $flags): int|false {}", "public function receiveLong(): int\n {\n $binaryData = $this->receiveRaw(4);\n\n $translatedData = unpack('N', $binaryData);\n return $translatedData[1];\n }", "public function write($data)\n {\n return fwrite($this->socket, $data);\n }", "protected function readLong()\n {\n return Binary::unpackLong($this->socket->read(8));\n }", "protected function writeShort($value)\n {\n $this->socket->write(Binary::packShort($value));\n }", "public function write($socket, $data)\n {\n }", "public static function writeDataTo($sock, $data, $length = null, $force = false)\n {\n if($force) {\n for($attempt = 10; $attempt > 0; $attempt--) {\n try {\n return socket_write($sock, $data, is_null($length) ? strlen($data) : $length);\n } catch(\\Exception $e) {\n usleep(100);\n }\n }\n } else {\n return socket_write($sock, $data, strlen($data));\n }\n return 0;\n }", "function dio_write($fd, string $data, int $len = 0) {}", "private function replyStatusPacket() {\n fwrite($this->conn, pack(\"N\", 99999997));\n }", "public function stream_write($data){\n $l = strlen($data);\n $this->_stream = substr($this->_stream, 0, $this->_pos) .\n $data .\n substr($this->_stream, $this->_pos += $l);\n\n return $l;\n }", "public function readLongLong()\n {\n $this->_bitCount = 0;\n $this->_bits = 0;\n $hi = unpack('N', $this->rawRead(4));\n $lo = unpack('N', $this->rawRead(4));\n\n // workaround signed/unsigned braindamage in php\n $hi = sprintf (\"%u\", $hi[1]);\n $lo = sprintf (\"%u\", $lo[1]);\n\n return bcadd(bcmul($hi, \"4294967296\"), $lo);\n }", "function socket_sendto(Socket $socket, string $data, int $length, int $flags, string $address, ?int $port = null): int|false {}", "public function stream_write($data) {\r\n\t\t// buffer the data\r\n\t\t$this->_buffer .= $data;\r\n\t\treturn strlen($data);\r\n }", "protected function writeByte($value)\n {\n $this->socket->write(Binary::packByte($value));\n }", "public function readLong()\n {\n return $this->bin->readLong();\n }", "public function write(string $data): int {\n\t\t$this->_check();\n\t\t$this->log(\"> $data\");\n\t\treturn $this->writeData($data . $this->EOL);\n\t}", "function mapi_write($socket=NULL, $msg) {\n\t\t// print \"Msg_len: \" . strlen($msg) . \"\\n\";\n\t\tglobal $last_error;\n\n\t\t$fb = 0;\n\t\t$sb = 0;\n\n\t\t$pos = 0;\n\t\t$data = \"\";\n\n\t\t$buf = 0;\n\n\t\t$is_final = FALSE;\n\t\twhile (! $is_final) {\n\t\t\t$data = substr($msg, $pos, min(MAX_PACKET_SIZE, strlen($msg) - $pos));\n\t\t\t$pos += strlen($data);\n\n\t\t\t$end = 0; // more packets will follow\n\t\t\tif ((strlen($msg) - $pos) == 0) {\n\t\t\t\t$is_final = TRUE;\n\t\t\t\t$end = 1;\n\t\t\t}\n\n\t\t\t$fb = (strlen($data) << 1) | $end;\n\n\t\t\t/**\n\t\t\t * socket_write() does not guarantee all data\n\t\t\t * to be transmitted. Make sure that the\n\t\t\t * buffer is flushed.\n\t\t\t */\n\n\t\t\tif (($buf = socket_flush($socket, pack(\"v\", $fb) . $data)) == FALSE) {\n\t\t\t\t$last_error = socket_strerror(socket_last_error());\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t}\n\t\treturn $buf;\n\t}", "public function setLong($identifier, $value);", "public function readLong()\n {\n $this->_bitCount = 0;\n $this->bits = 0;\n list(,$res) = unpack('N', $this->rawRead(4));\n $sres = sprintf(\"%u\", $res);\n return $sres;\n }", "public function sendLongStr(string $value)\n {\n $length = strlen($value);\n $limit = pow(2,32) - 1;\n if ($length > $limit) {\n throw new \\InvalidArgumentException(\n 'Long string is too big. It must be less than 2^32 bytes.'\n );\n }\n $this->sendLong($length);\n $this->sendRaw($value);\n\n }", "public function write($type, $s1 = '', $s2 = '')\n {\n $id = $this->packetID++;\n\n $data = pack('VV', $id, $type);\n $data .= $s1.chr(0).$s2.chr(0);\n $data = pack('V', strlen($data)).$data;\n\n fwrite($this->socket, $data, strlen($data));\n\n return $id;\n }", "protected function write()\n {\n $this->writeShort($this->id);\n }", "public function send($buffer, $flags = 0, $length = null)\n {\n if (null === $length) {\n $length = strlen($buffer);\n }\n\n // make sure everything is written\n do {\n $return = @socket_send($this->resource, $buffer, $length, $flags);\n\n if (false !== $return && $return < $length) {\n $buffer = substr($buffer, $return);\n $length -= $return;\n\n } else {\n break;\n }\n } while (true);\n\n if ($return === false) {\n throw new SocketException($this->resource);\n }\n\n return $return;\n }", "public function int64($int64)\n {\n $this->buffer .= bin2hex(pack('P', $int64));\n }", "protected function writeBytes($value)\n {\n $this->socket->write(Binary::packBytes($value));\n }", "public function getLong();", "public function getLong();", "public function addLong($x)\n {\n $this->prep(8, 0);\n $this->putLong($x);\n }", "public function stream_write($data) \r\n {\r\n $left = substr($this->_data, 0, $this->_pos);\r\n $right = substr($this->_data, $this->_pos + strlen($data));\r\n $this->_data = $left . $data . $right;\r\n $this->_pos += strlen($data);\r\n return strlen($data);\r\n\r\n return $ret;\r\n }", "public function stream_write($data) {\n return fwrite($this->handle, $data);\n }", "public function write($str, $off = 0, $len = -1);", "function client_write(StreamSocketInterface $socket, string $response = null) \n\t{\n\t\treturn \\write_socket($socket, $response);\n\t}", "public static function socket_write_all($socket, string $data): void\n {\n if (!($dlen = strlen($data))) {\n return;\n }\n do {\n assert($dlen > 0);\n assert(strlen($data) === $dlen);\n $sent_now = socket_write($socket, $data);\n if (false === $sent_now) {\n $err = socket_last_error($socket);\n throw new \\RuntimeException(\"socket_write() failed! {$err}: \" . socket_strerror($err));\n }\n if (0 === $sent_now) {\n // we'll try *1* last time before throwing exception...\n $sent_now = socket_write($socket, $data);\n if (false === $sent_now) {\n $err = socket_last_error($socket);\n throw new \\RuntimeException(\"socket_write() failed after first returning zero! {$err}: \" . socket_strerror($err));\n }\n if (0 === $sent_now) {\n // something is very wrong but it's not registering as an error at the kernel apis...\n throw new \\RuntimeException(\"socket_write() keeps returning 0 bytes sent while {$dlen} byte(s) to send!\");\n }\n }\n $dlen -= $sent_now;\n $data = substr($data, $sent_now);\n } while ($dlen > 0);\n assert($dlen === 0);\n assert(strlen($data) === 0);\n // all data sent.\n return;\n }", "public function setWriteTimeout($timeout_write)\n {\n return $this->timeout_write = intval($timeout_write);\n }", "public function GetLong( ) : int\n\t\t{\n\t\t\tif( $this->Remaining( ) < 4 )\n\t\t\t{\n\t\t\t\tthrow new InvalidPacketException( 'Not enough data to unpack a long.', InvalidPacketException::BUFFER_EMPTY );\n\t\t\t}\n\t\t\t\n\t\t\t$Data = UnPack( 'l', $this->Get( 4 ) );\n\t\t\t\n\t\t\treturn (int)$Data[ 1 ];\n\t\t}", "function net_write($handle, string $response = '')\n {\n return Network::write($handle, $response);\n }", "private function write( $str ) {\n fwrite( $this->socket, $str . \"\\n\" );\n }", "public function writeInt64(int $value): self\n {\n $this->bytes .= Writer::bit64($value);\n\n return $this;\n }", "public function send(Socket $socket)\n {\n $socket->write(Str::limit($this->raw, 509).\"\\r\\n\");\n Client::log($this, true);\n }", "protected function _write($socket, $request)\n {\n fwrite($socket, $request);\n }", "public function writeInt($i)\r\n {\r\n $this->data .= pack(\"V1\", $i);\r\n }", "public function writeByte($byte);", "public function write(string $path, $data, int $flags = 0) : int;", "function write_socket(StreamSocketInterface $socket, string $response = null)\n\t{\n\t\treturn $socket->write($response);\n\t}", "public function write($id, $data);", "public function stream_write($data);", "public function write( $data, $length = false ) {\n if( $length === false ) {\n $result = fwrite( $this->stream, $data );\n }\n else {\n $result = fwrite( $this->stream, $data, $length );\n }\n return $result;\n }", "public function send($data) {\n $len = strlen($data);\n if ($this->v) l('Sending '.$len.' byte(s): '.$data);\n $sent = socket_write($this->sock, $data, $len);\n return ($sent === $len);\n }", "public function write(string $string): int;", "public function send_buffer(){\n\n $this->_log(\"Buf has \".count($this->_buf).\" items\");\n\n $string = implode(\"\\n\",$this->_buf);\n\n $this->_log('Sending string length: '.strlen($string));\n $len = socket_write($this->_socket,$string,strlen($string));\n //echo \"$len bytes written to socket\\n\";\n $this->_log(\"$len bytes written to socket\");\n\n }", "protected function _write(string $message): int {\n\t\t$this->debug($message);\n\t\t$this->output[] = $message;\n\n\t\treturn 0;\n\t}", "public function write($buf) {\n $written = 0;\n $length = TStringFuncFactory::create()->strlen($buf);\n\n while($written < $length) {\n $fwrite = @socket_write($this->_handle, TStringFuncFactory::create()->substr($buf, $written));\n\n if($fwrite === false) {\n $this->error(self::class . ': Failed to write buffer to ' . $this->getDomain());\n }\n\n $written += $fwrite;\n }\n }", "function net_write($handle, string $response = '')\n {\n return Networks::write($handle, $response);\n }", "function stream_write($data)\n {\n $left = substr($this->_varname, 0, $this->_position);\n $right = substr($this->_varname, $this->_position + strlen($data));\n $this->_varname = $left . $data . $right;\n $this->_position += strlen($data);\n return strlen($data);\n }", "protected function write($message)\n {\n $this->assertConnected();\n\n $bytesToSend = strlen($message);\n $numZeroByteWritesLeft = self::ZERO_BYTE_WRITES_ALLOWED;\n\n do {\n $sent = fwrite($this->socket, $message);\n if ($sent === false) {\n throw new RuntimeException('Error writing to socket.');\n }\n\n if ($sent === 0) {\n // according to its documentation's comments, fwrite returns 0 instead of false on\n // many errors, such as connection loss.\n $numZeroByteWritesLeft--;\n if ($numZeroByteWritesLeft < 0) {\n throw new RuntimeException(\n sprintf('Error writing to socket: maximum zero byte writes (%s) exceeded', self::ZERO_BYTE_WRITES_ALLOWED)\n );\n }\n }\n\n $message = substr($message, $sent);\n\n $bytesToSend -= $sent;\n } while ($bytesToSend > 0);\n\n return $this;\n }", "public function writeInt($value)\n {\n // We do not need to check if file position points to the end of \"file\".\n // Only append operation is supported now\n\n settype($value, 'integer');\n $this->_data .= chr($value>>24 & 0xFF) .\n chr($value>>16 & 0xFF) .\n chr($value>>8 & 0xFF) .\n chr($value & 0xFF);\n\n $this->_position = strlen($this->_data);\n }", "function socket_set_option(Socket $socket, int $level, int $option, $value): bool {}", "public function write(string $buffer): int\n {\n if ($buffer === null) {\n throw new Exception('You must inform some data to be written');\n }\n\n $bytesToWrite = strlen($buffer);\n\n $hasWriteLen = $this->stream->sendAll($buffer, $this->getWriteTimeout());\n\n if($hasWriteLen !== $bytesToWrite) {\n $this->ioException();\n }\n\n return $hasWriteLen;\n }", "public function write(string $string): int\n {\n }", "function writeInt(){\r\n\t\tdie('Not implemented');\r\n\t}", "public function writeFixed64(Stream $stream, $value)\n {\n $bytes = pack('V*', $value & 0xffffffff, $value / (0xffffffff + 1));\n\n $this->writeBytes($stream, $bytes, 8);\n }", "protected function writeString($value)\n {\n $this->socket->write(Binary::packString($value));\n }", "function writeVal($val)\n {\n if($val<0)\n {\n //negative number ignored\n \n \n }\n else if($val<128)\n {\n //write bits 0-6 in a single byte\n //\n array_push($this->rtn,$val);\n }\n else if($val<16384)\n {\n //write bits 0-13 in two bytes\n //\n \n $v1=$val & 127;\n $v1=$v1 | 128;\n $v2=$val>>7;\n \n array_push($this->rtn,$v1);\n array_push($this->rtn,$v2);\n }\n else\n {\n //val >= 16384\n //so write bits 0-29 from val\n //in 4 bytes (32 bits)\n \n \n $v1=$val & 127;\n $v1=$v1 | 128;\n $v2=$val>>7;\n $v2=$v2 | 128;\n \n array_push($this->rtn,$v1);\n array_push($this->rtn,$v2);\n \n \n //and use bits 14- in top two bytes\n \n $v3=$val>>14;\n $v4=$val>>22;\n \n array_push($this->rtn,$v3);\n array_push($this->rtn,$v4);\n \n }\n }", "public function stream_write($data)\n {\n if (self::$logger instanceof Zend_Log) {\n self::$logger->log(\"stream_write($data)\", Zend_Log::DEBUG);\n }\n\n if (!$this->_objectName) {\n return 0;\n }\n $len = strlen($data);\n $this->_objectBuffer .= $data;\n $this->_objectSize += $len;\n return $len;\n }", "public function write($string)\n {\n $this->buffer .= $string;\n\n return strlen($string);\n }", "public function receiveShort(): int\n {\n $binaryData = $this->receiveRaw(2);\n\n $translatedData = unpack('n', $binaryData);\n return $translatedData[1];\n }", "static function packInt64($x) {\n if (version_compare(PHP_VERSION, '5.6.3', '>=')) {\n return pack('J', $x);\n } else {\n return \"\\x00\\x00\\x00\\x00\" . pack('N', $x);\n }\n }", "public function write( $data )\n\t{\n\t\t$this->_buffer .= $data;\n\t}", "public function sendToSocket($socket, $message){ \n $this->sendReturn = @socket_write($socket, $message, strlen($message) ); \n if($this->sendReturn === false){\n return false;\n }else{\n return true;\n }\n }", "public function write(string $format, ...$arguments): void\n {\n if (!$this->isConnected()) {\n $this->connect();\n }\n\n $packedData = pack($format, ...$arguments);\n\n $packedDataLength = strlen($packedData);\n for ($written = 0; $written < $packedDataLength; $written += $result) {\n $result = @fwrite($this->streamSocket, substr($packedData, $written));\n if ($result === false || feof($this->streamSocket)) {\n if (!$this->isConnected()) {\n $this->connect();\n $result = 0; // try to write once again the same data\n } else {\n throw new NetworkException(['error' => 'Can not write to the stream']);\n }\n }\n }\n }", "public function write($data)\n {\n if (fwrite($this->_stream, $data . \"\\r\\n\") === false) {\n throw new Horde_Imap_Client_Exception(\n Horde_Imap_Client_Translation::t(\"Server write error.\"),\n Horde_Imap_Client_Exception::SERVER_WRITEERROR\n );\n }\n\n $this->_debug->client($data);\n }", "public function send(int $flags) {}", "public function getSocketTimeoutWrite()\n {\n if ($this->agentConfig) {\n return $this->agentConfig->getSocketTimeoutWrite();\n }\n\n return Config::SOCKET_TIMEOUT_WRITE;\n }", "public function writeByte($byte)\n {\n return fwrite($this->handle, $byte, 1);\n }", "function socket_flush($socket, $data) {\n\t\t$buf = 0;\n\t\t$bytes = strlen($data);\n\n\t\tif ($socket == NULL) {\n\t\t\treturn FALSE;\n\t\t}\n\n\t\twhile (($bytes - $buf) > 0) {\n\t\t\t$buf += socket_write($socket, substr($data, $buf, $bytes), $bytes - $buf);\n\t\t\t//print \"Buf: \" . $buf . \"\\n\";\n\n\t\t\tif ($buf == FALSE) {\n\t\t\t\treturn FALSE;\n\t\t\t}\n\n\t\t}\n\t\treturn $buf;\n\t}", "public abstract function writeByte($b);", "protected function _write($message) {\n if (!$this->_handle) {\n $this->_handle = $this->_open($this->_config['host'], $this->_config['port'], $this->_config['timeout']);\n if ($this->_handle === false) {\n throw new SocketException('Could not connect to logstash');\n }\n }\n return @fwrite($this->_handle, $message);\n }", "public function write(string $content): int;", "public function write($msg);", "public static function write_varint(\\Psr\\Http\\Message\\StreamInterface $mem, int $i): int {\r\n $len = 0;\r\n do {\r\n $v = $i & 0x7F;\r\n $i = $i >> 7;\r\n\r\n if ($i != 0)\r\n $v |= 0x80;\r\n\r\n if ($mem->write(chr($v)) !== 1)\r\n throw new \\Exception(\"write_varint(): Error writing byte\");\r\n\r\n $len ++;\r\n } while ( $i != 0 );\r\n\r\n return $len;\r\n }", "public function GetUnsignedLong( ) : int\n\t\t{\n\t\t\tif( $this->Remaining( ) < 4 )\n\t\t\t{\n\t\t\t\tthrow new InvalidPacketException( 'Not enough data to unpack an usigned long.', InvalidPacketException::BUFFER_EMPTY );\n\t\t\t}\n\t\t\t\n\t\t\t$Data = UnPack( 'V', $this->Get( 4 ) );\n\t\t\t\n\t\t\treturn (int)$Data[ 1 ];\n\t\t}", "public function write($buf);", "public function setLongAttribute($value)\n {\n $this->attributes['long'] = $value;\n }", "public static function sendDataTo($sock, $data, $length = null, $force = false)\n {\n if($force) {\n for($attempt = 10; $attempt > 0; $attempt--) {\n try {\n return socket_send($sock, $data, is_null($length) ? strlen($data) : $length, 0);\n } catch(\\Exception $e) {\n usleep(100);\n }\n }\n } else {\n return socket_send($sock, $data, strlen($data), 0);\n }\n }", "public function handleInt64($byte)\n {\n $value = $this->appendInt64Data($byte);\n\n if (null !== $value) {\n $this->popStateAndEmitValue($value);\n }\n }", "abstract public function writeByte($b);", "function writeByte(){\r\n\t\tdie('Not implemented');\r\n\t}", "public function sendRaw(string $data): ?int\n {\n if ($this->accumulate) {\n @$this->buffer .= $data;\n return null;\n }\n return $this->socket->writeRaw($data);\n }", "public function lockWrite(int $timeout = null) : void\n {\n $this->_getLock($timeout?? static::DEFAULT_WRITE_TIMEOUT, true);\n }", "protected function writeChar($value)\n {\n $this->socket->write(Binary::packByte(ord($value)));\n }", "private function write1argInt($b) \n {\n $out->write($b);\n }" ]
[ "0.7365779", "0.64151734", "0.61465734", "0.61432105", "0.6025963", "0.6020054", "0.6010069", "0.5991464", "0.5961415", "0.5934853", "0.5647493", "0.5629453", "0.562012", "0.55812347", "0.55661976", "0.5521626", "0.5416794", "0.5376491", "0.5367641", "0.53562534", "0.534397", "0.5260322", "0.5220055", "0.51836586", "0.51373136", "0.51203966", "0.5117413", "0.51013875", "0.5059105", "0.50250185", "0.50212765", "0.50199485", "0.49943495", "0.4989829", "0.49632072", "0.49632072", "0.49558783", "0.4950159", "0.49343184", "0.48922205", "0.4890781", "0.4887612", "0.48774233", "0.48714474", "0.4871112", "0.4861023", "0.48524544", "0.48468563", "0.48384106", "0.4826688", "0.48108456", "0.4807306", "0.47496098", "0.47495466", "0.47369793", "0.47348574", "0.4731448", "0.47275504", "0.47129655", "0.47004408", "0.46998367", "0.4695894", "0.46818882", "0.46663576", "0.46652263", "0.46592507", "0.46582544", "0.4651609", "0.46304852", "0.46278563", "0.4626586", "0.46094364", "0.46088022", "0.46016973", "0.4593209", "0.45895728", "0.45831934", "0.45800743", "0.45742", "0.4571228", "0.45637137", "0.45625994", "0.45557302", "0.45547286", "0.45508224", "0.45352748", "0.45284423", "0.4528415", "0.4528339", "0.45275235", "0.45236737", "0.4523477", "0.45178732", "0.45178404", "0.45176345", "0.45170966", "0.45137435", "0.4512195", "0.4495317", "0.44924912" ]
0.76756227
0
Read a long from the socket.
Считайте длинное из сокета.
protected function readLong() { return Binary::unpackLong($this->socket->read(8)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function receiveLong(): int\n {\n $binaryData = $this->receiveRaw(4);\n\n $translatedData = unpack('N', $binaryData);\n return $translatedData[1];\n }", "public function readLong()\n {\n return $this->bin->readLong();\n }", "public function readLong()\n {\n $this->_bitCount = 0;\n $this->bits = 0;\n list(,$res) = unpack('N', $this->rawRead(4));\n $sres = sprintf(\"%u\", $res);\n return $sres;\n }", "public function receiveLongLong(): int\n {\n $rawData = $this->receiveRaw(8);\n\n $translated = unpack('J', $rawData);\n return $translated[1];\n }", "protected function _read() {\n return $this->_readLong();\n }", "public function GetLong( ) : int\n\t\t{\n\t\t\tif( $this->Remaining( ) < 4 )\n\t\t\t{\n\t\t\t\tthrow new InvalidPacketException( 'Not enough data to unpack a long.', InvalidPacketException::BUFFER_EMPTY );\n\t\t\t}\n\t\t\t\n\t\t\t$Data = UnPack( 'l', $this->Get( 4 ) );\n\t\t\t\n\t\t\treturn (int)$Data[ 1 ];\n\t\t}", "protected function readLong() {\r\n $this->skipSpaces();\r\n $retval = 0;\r\n $longBuffer = $this->readStringNumber();\r\n try {\r\n $retval = 0 + $longBuffer;\r\n } catch( Exception $e ) {\r\n $this->seqSource->unread($longBuffer);\r\n throw new Exception( \"Error: Expected a long type at offset \"\r\n .$this->seqSource->getPosition().\", instead got '$longBuffer'\");\r\n }\r\n return $retval;\r\n }", "private static function readLong($handle)\n {\n return self::readUnpacked($handle, 'V', 4);\n }", "function socket_read(Socket $socket, int $length, int $mode = PHP_BINARY_READ): string|false {}", "function socket_recv(Socket $socket, &$data, int $length, int $flags): int|false {}", "public function readLong()\n {\n /**\n * Check, that we work in 64-bit mode.\n * fseek() uses long for offset. Thus, largest index segment file size in 32bit mode is 2Gb\n */\n if (PHP_INT_SIZE > 4) {\n $str = substr($this->_data, $this->_position, 8);\n $this->_position += 8;\n\n return ord($str[0]) << 56 |\n ord($str[1]) << 48 |\n ord($str[2]) << 40 |\n ord($str[3]) << 32 |\n ord($str[4]) << 24 |\n ord($str[5]) << 16 |\n ord($str[6]) << 8 |\n ord($str[7]);\n } else {\n return $this->readLong32Bit();\n }\n }", "public function readLongLong()\n {\n $this->_bitCount = 0;\n $this->_bits = 0;\n $hi = unpack('N', $this->rawRead(4));\n $lo = unpack('N', $this->rawRead(4));\n\n // workaround signed/unsigned braindamage in php\n $hi = sprintf (\"%u\", $hi[1]);\n $lo = sprintf (\"%u\", $lo[1]);\n\n return bcadd(bcmul($hi, \"4294967296\"), $lo);\n }", "public function GetUnsignedLong( ) : int\n\t\t{\n\t\t\tif( $this->Remaining( ) < 4 )\n\t\t\t{\n\t\t\t\tthrow new InvalidPacketException( 'Not enough data to unpack an usigned long.', InvalidPacketException::BUFFER_EMPTY );\n\t\t\t}\n\t\t\t\n\t\t\t$Data = UnPack( 'V', $this->Get( 4 ) );\n\t\t\t\n\t\t\treturn (int)$Data[ 1 ];\n\t\t}", "public function read($size=1024) {\n return socket_read($this->sock,$size,PHP_BINARY_READ);\n }", "protected function readInt()\n {\n return Binary::unpackInt($this->socket->read(4));\n }", "private function read() {\n return fgets( $this->socket, 128 );\n }", "function socket_recvfrom(Socket $socket, &$data, int $length, int $flags, &$address, &$port = null): int|false {}", "protected function readShort()\n {\n return Binary::unpackShort($this->socket->read(2));\n }", "public function read($length = 1024)\n {\n if (false === ($data = fread($this->fp, $length))) {\n throw new SocketException('socket read error');\n }\n return $data;\n }", "public function readLongStr()\n {\n $this->_bitCount = 0;\n $this->_bits = 0;\n $slen = $this->readPhpInt();\n if ($slen < 0) {\n throw new Exception(\"String is longer than supported on this platform\");\n }\n\n return $this->rawRead($slen);\n }", "public function getLong();", "public function getLong();", "public function read($len) {\n $read = 0;\n $data = '';\n\n while($read < $len) {\n $fread = @socket_read($this->_handle, $len - $read, PHP_BINARY_READ);\n\n if($fread === false) {\n $errer_no = socket_last_error($this->_handle);\n\n if($errer_no == SOCKET_EINTR) {\n usleep(1);\n continue;\n } else {\n $this->error(self::class . ': Failed to read data from ' . $this->getDomain(), $errer_no);\n }\n } elseif($fread == '') {\n //Connection closed\n $this->error(self::class . ': TSocket read 0 bytes from ' . $this->getDomain(), SOCKET_ECONNRESET);\n }\n\n $read += TStringFuncFactory::create()->strlen($fread);\n $data .= $fread;\n }\n\n return $data;\n }", "function read_socket(StreamSocketInterface $socket, int $size = -1)\n\t{\n\t\treturn $socket->read($size);\n\t}", "public function receiveShort(): int\n {\n $binaryData = $this->receiveRaw(2);\n\n $translatedData = unpack('n', $binaryData);\n return $translatedData[1];\n }", "public function read(int $length): string\n {\n if ($length > self::READ_MAX_LENGTH) {\n throw Exception\\Socket::invalidLength($length, self::READ_MAX_LENGTH);\n }\n// $data = $this->stream->recvAll($length, $this->getReadTimeout());\n $data = $this->stream->recvAll($length);\n if ($data === false) {\n throw new Exception(\n sprintf('Read msg error %s:%d (%s [%d])', $this->host, $this->port, $this->stream->errMsg, $this->stream->errCode)\n );\n }\n return $data;\n }", "public function readInt64()\n {\n $value = Reader::bit64($this->bytes);\n\n $this->skip(8);\n\n return $value;\n }", "public function readLong($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "function net_read($handle, int $size = -1)\n {\n return Network::read($handle, $size);\n }", "public function read(int $len)\n {\n return $this->readBlocking($len);\n }", "function client_read(StreamSocketInterface $socket, int $size = -1) \n\t{\n\t\treturn $socket->response($size);\n\t}", "public function read(int $length);", "public function read(int $length = 2048, int $type = PHP_BINARY_READ)\n {\n if (!$this->isSocketOpened()) {\n throw new ClientTCPSocketException('');\n }\n\n $buffer = @socket_read($this->socket, $length, $type);\n \n return trim($buffer);\n }", "protected function readByte()\n {\n return Binary::unpackByte($this->socket->read(1));\n }", "public function read($len);", "public function read($len);", "public function read($len);", "public function read($length = 1024);", "function dio_read($fd, int $len = 1024) {}", "public function read($length = 4096)\n {\n $this->connect();\n if (is_null($length)) {\n return fgets($this->socket);\n } else {\n return fgets($this->socket, $length);\n }\n }", "public function receive($length = self::DEFAULT_RECEIVE_LENGTH)\n\t{\n\t\t$buffer = '';\n\t\t$metadata['unread_bytes'] = 0;\n\t\t$makeBlockingAfterRead = false;\n\n\t\ttry {\n\t\t\tdo {\n\t\t\t\t// feof means socket has been closed\n\t\t\t\t// also, sometimes in long running processes the system seems to kill the underlying socket\n\t\t\t\tif (!$this->socket || feof($this->socket)) {\n\t\t\t\t\t$this->disconnect();\n\n\t\t\t\t\treturn $buffer;\n\t\t\t\t}\n\n\t\t\t\t$result = fread($this->socket, $length);\n\n\t\t\t\tif ($makeBlockingAfterRead) {\n\t\t\t\t\tstream_set_blocking($this->socket, true);\n\t\t\t\t\t$makeBlockingAfterRead = false;\n\t\t\t\t}\n\n\t\t\t\t// fread FALSE means socket has been closed\n\t\t\t\tif ($result === false) {\n\t\t\t\t\t$this->disconnect();\n\n\t\t\t\t\treturn $buffer;\n\t\t\t\t}\n\n\t\t\t\t$buffer .= $result;\n\n\t\t\t\t// feof means socket has been closed\n\t\t\t\tif (feof($this->socket)) {\n\t\t\t\t\t$this->disconnect();\n\n\t\t\t\t\treturn $buffer;\n\t\t\t\t}\n\n\t\t\t\t$continue = false;\n\n\t\t\t\tif (strlen($result) == 1) {\n\t\t\t\t\t// Workaround Chrome behavior (still needed?)\n\t\t\t\t\t$continue = true;\n\t\t\t\t}\n\n\t\t\t\tif (strlen($result) == $length) {\n\t\t\t\t\t$continue = true;\n\t\t\t\t}\n\n\t\t\t\t// Continue if more data to be read\n\t\t\t\t$metadata = stream_get_meta_data($this->socket);\n\n\t\t\t\tif ($metadata && isset($metadata['unread_bytes'])) {\n\t\t\t\t\tif (!$metadata['unread_bytes']) {\n\t\t\t\t\t\t// stop it, if we read a full message in previous time\n\t\t\t\t\t\t$continue = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$continue = true;\n\t\t\t\t\t\t// it makes sense only if unread_bytes less than DEFAULT_RECEIVE_LENGTH\n\t\t\t\t\t\tif ($length > $metadata['unread_bytes']) {\n\t\t\t\t\t\t\t// http://php.net/manual/en/function.stream-get-meta-data.php\n\t\t\t\t\t\t\t// 'unread_bytes' don't describes real length correctly.\n\t\t\t\t\t\t\t//$length = $metadata['unread_bytes'];\n\n\t\t\t\t\t\t\t// Socket is a blocking by default. When we do a blocking read from an empty\n\t\t\t\t\t\t\t// queue it will block and the server will hang. https://bugs.php.net/bug.php?id=1739\n\t\t\t\t\t\t\tstream_set_blocking($this->socket, false);\n\t\t\t\t\t\t\t$makeBlockingAfterRead = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} while ($continue);\n\n\t\t\treturn $buffer;\n\n\t\t} finally {\n\t\t\tif ($makeBlockingAfterRead) {\n\t\t\t\tstream_set_blocking($this->socket, true);\n\t\t\t}\n\t\t}\n\t}", "public function readFromSocketWithGivenLength()\n {\n $this->mockSocket->expects($this->once())\n ->method('read')\n ->with($this->equalTo(3))\n ->will($this->returnValue('foo'));\n $this->assertEquals('foo', $this->socketInputStream->read(3));\n }", "function ovrimos_longreadlen($result_id, $length)\n{\n}", "public static function readDataFrom($sock, $length, $binary = true)\n {\n return socket_read($sock, $length, $binary ? PHP_BINARY_READ : PHP_NORMAL_READ);\n }", "public function receiveOctet(): int\n {\n $binaryData = $this->receiveRaw(1);\n\n $translatedData = unpack('C', $binaryData);\n return $translatedData[1];\n }", "function net_read($handle, int $size = -1)\n {\n return Networks::read($handle, $size);\n }", "public function read($length);", "public function read($length);", "public function read($length);", "public function readUInt32() {\n\t\t$t = unpack(\"V\", $this->stream->readBytes(4));\n\t\treturn $t[1];\n\t}", "public function read($len)\n\t{\n\t\treturn $this->inBuf->read($len);\n\t}", "public function read($size = 512)\r\n {\r\n if (!$this->isConnected()) {\r\n return false;\r\n }\r\n $data = socket_read($this->socket, $size);\r\n if (!$data) {\r\n if ($this->getLastError() == 107) {\r\n $this->close();\r\n $this->socket = null;\r\n }\r\n }\r\n return $data;\r\n }", "public function readUnsignedInt(){ }", "function readTimestamp()\n {\n return $this->readLongLong();\n }", "public function getLongValue() {}", "private static function getLong($param)\n {\n $hi = unpack('N', substr($param, 0, 4));\n $lo = unpack('N', substr($param, 4, 4));\n\n // workaround signed/unsigned braindamage in php\n $hi = sprintf(\"%u\", $hi[1]);\n $lo = sprintf(\"%u\", $lo[1]);\n\n return bcadd(bcmul($hi, \"4294967296\"), $lo);\n }", "private function readMultibytes($length)\n {\n $string = $this->_socket->read($length);\n while (\n mb_strlen($string) < $length &&\n $this->_socket->hasReadableData()\n ) {\n $string .= $this->_socket->read($length - mb_strlen($string));\n }\n return $string;\n }", "public function receiveLongStr(): ?string\n {\n $length = $this->receiveLong();\n $string = $this->receiveRaw($length);\n\n return $string;\n }", "public function read()\n\t{\n\t\t$this->connect();\n\n\t\t$data = '';\n\n\t\twhile(!feof($this->socket))\n\t\t{\n\t\t\t$data .= fgets($this->socket, 1024);\n\t\t}\n\n\t\treturn strlen($data) ? $data : false;\n\t}", "public function getReadTimeout() {\n\t\treturn $this->readTimeout;\n\t}", "public function read($len)\n {\n if (!$this->isOpen()) {\n throw new TTransportException('ClientTransport not open.', TTransportException::NOT_OPEN);\n }\n return $this->client->recv($len, true);\n }", "public function read($length)\n {\n if (isset($this->out) && !feof($this->out)) {\n $ret = fread($this->out, $length);\n if (strlen($ret) == 0) {\n $metas = stream_get_meta_data($this->out);\n if ($metas['timedout']) {\n throw new Exception('Connection to ' . $this->getReadConnectionDescription() . ' Timed Out');\n }\n }\n\n return $ret;\n }\n }", "public function readLineFromSocketWithGivenLength()\n {\n $this->mockSocket->expects($this->once())\n ->method('readLine')\n ->with($this->equalTo(3))\n ->will($this->returnValue('foo'));\n $this->assertEquals('foo', $this->socketInputStream->readLine(3));\n }", "public abstract function read($len);", "protected function _receiveResponse()\n {\n $result = $this->socket->read(4096);\n\n $this->socket->close();\n\n return trim($result);\n }", "public function read($timeout = 1): string\n {\n if($this->debug === true) { echo \"\\nreceiving message : \\n\"; }\n stream_set_timeout($this->socket, $timeout);\n $read = stream_get_contents($this->socket, $this->length);\n if($this->debug === true) { echo $read.\"\\n\"; }\n return $read;\n }", "function mapi_read($socket=NULL) {\n\t\t# get the first 2 bytes\n\t\tif (($header = socket_read($socket, 2)) == FALSE) {\n\t\t\t$last_error = socket_strerror(socket_last_error());\n\t\t\tthrow new Exception('Lost connection with the server: ' . $last_error);\n\t\t}\n\t\t$data = \"\";\n\n\t\t$chunk_size = ((ord($header[1]) << 7) | (ord($header[0]) >> 1));\n\t\t// keep reading until we have everything\n\t\twhile (strlen($data) < $chunk_size) {\n\t\t\t$data .= socket_read($socket, $chunk_size - strlen($data));\n\t\t}\n\n\n\t\twhile ((ord($header[0]) & 1) == 0) {\n\t\t\tif (($header = socket_read($socket, 2)) == FALSE) {\n\t\t\t\t$last_error = socket_strerror(socket_last_error());\n\t\t\t\tthrow new Exception('Lost connection with the server: ' . $last_error);\n\t\t\t}\n\n\t\t\t$chunk_size = ((ord($header[1])) << 7) | (ord($header[0]) >> 1);\n\n\t\t\t$block = \"\";\n\t\t\twhile (strlen($block) < $chunk_size) {\n\t\t\t\tif (($block .= socket_read($socket, $chunk_size - strlen($block))) == FALSE) {\n\t\t\t\t\t$last_error = socket_strerror(socket_last_error());\n\t\t\t\t\tthrow new Exception('Lost connection with the server: ' . $last_error);\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t$data = $data . $block;\n\t\t}\n\t\tif (strlen($data) == 0) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\treturn $data;\n\t}", "protected function _read($socket)\n {\n $response = '';\n while ($buff = fread($socket, 8192)) {\n $response .= $buff;\n }\n \n fclose($socket);\n \n return $response;\n }", "private function readDataFromPendingClient($socket, int $length, PendingSocketClient $state)\n {\n $data = \\fread($socket, $length);\n\n if ($data === false || $data === '') {\n return null;\n }\n\n $data = $state->receivedDataBuffer . $data;\n\n if (\\strlen($data) < $length) {\n $state->receivedDataBuffer = $data;\n return null;\n }\n\n $state->receivedDataBuffer = '';\n\n Loop::cancel($state->readWatcher);\n\n return $data;\n }", "public function getRead(): int\n {\n return (int)$this->getMetric('getRead');\n }", "function tell () {\n return ftell($this->sock);\n }", "public function read($length){ }", "public function getReadTimeout()\n {\n return $this->readTimeout;\n }", "public function read($length = 1024) {\n if (!$this->_receivedResponse) {\n return false;\n }\n\n $response = $this->_receivedResponse;\n $this->_receivedResponse = false;\n\n return $response;\n }", "protected function recvStr($read = true)\n\t{\n\t\t$str = @fgets($this->socket);\n\t\tif(!$str)\n\t\t{\n\t\t\t$this->disconnect();\n\t\t\tthrow new \\HandlerSocket\\IOException('Cannot read from socket');\n\t\t}\n\t\treturn substr($str,0,-1);\n\t}", "protected function readInteger()\n {\n if ($this->littleEndian) {\n $result = unpack('Vint', fread($this->file, 4));\n } else {\n $result = unpack('Nint', fread($this->file, 4));\n }\n\n return $result['int'];\n }", "protected function readInteger() {\r\n\t\tif ($this->littleEndian) {\r\n\t\t\t$result = unpack ( 'Vint', fread ( $this->file, 4 ) );\r\n\t\t} else {\r\n\t\t\t$result = unpack ( 'Nint', fread ( $this->file, 4 ) );\r\n\t\t}\r\n\t\t\r\n\t\treturn $result ['int'];\r\n\t}", "public function stream_read($count) {\n return fread($this->handle, $count);\n }", "public function read() {\n\t\treturn $this->atEnd() ? -1 : ord(substr($this->streamData, $this->endPointer++, 1));\n\t}", "protected function read_message( $socket ) {\n\t\t$recv = socket_recv( $socket, $header, 4, MSG_WAITALL );\n\t\tif ( strlen( $header ) !== 4 )\n\t\t\tthrow new Exception( \"Prefork::read_message() failed receiving header\" );\n\t\t$length = current( unpack( 'N', $header ) );\n\t\t$recv = socket_recv( $socket, $message, $length, MSG_WAITALL );\n\t\tif ( strlen( $message ) !== $length )\n\t\t\tthrow new Exception( \"Prefork::read_message() failed receiving message\" );\n\t\treturn $message;\n\t}", "public function stream_read($count) \r\n {\r\n $ret = substr($this->_data, $this->_pos, $count);\r\n $this->_pos += strlen($ret);\r\n return $ret;\r\n }", "public function readLong32Bit()\n {\n $wordHigh = $this->readInt();\n $wordLow = $this->readInt();\n\n if ($wordHigh & (int)0x80000000) {\n // It's a negative value since the highest bit is set\n if ($wordHigh == (int)0xFFFFFFFF && ($wordLow & (int)0x80000000)) {\n return $wordLow;\n } else {\n require_once 'Zend/Search/Lucene/Exception.php';\n throw new Zend_Search_Lucene_Exception('Long integers lower than -2147483648 (0x80000000) are not supported on 32-bit platforms.');\n }\n\n }\n\n if ($wordLow < 0) {\n // Value is large than 0x7FFF FFFF. Represent low word as float.\n $wordLow &= 0x7FFFFFFF;\n $wordLow += (float)0x80000000;\n }\n\n if ($wordHigh == 0) {\n // Return value as integer if possible\n return $wordLow;\n }\n\n return $wordHigh*(float)0x100000000/* 0x00000001 00000000 */ + $wordLow;\n }", "public function toLong()\n {\n return ip2long($this->format(self::DEFAULT_FORMAT));\n }", "function readAll ($readLen = self::READ_LENGTH) {\n $buff = '';\n do {\n $buff .= $chk = fread($this->sock, $readLen);\n $smd = stream_get_meta_data($this->sock);\n $readLen = min($smd['unread_bytes'], $readLen);\n } while ($chk !== false && $smd['unread_bytes'] > 0);\n if (! $chk) {\n trigger_error(\"Stream fread returned false\", E_USER_WARNING);\n $this->errFlag |= 1;\n }\n if (Connection::DEBUG) {\n echo \"\\n<read>\\n\";\n echo wire\\Hexdump::hexdump($buff);\n }\n return $buff;\n }", "public function getReadTime()\n {\n $value = $this->get(self::READ_TIME);\n return $value === null ? (integer)$value : $value;\n }", "public function stream_read($count)\n {\n $ret = substr($this->data, $this->pos, $count);\n $this->pos += strlen($ret);\n return $ret;\n }", "public function read($length = null);", "public function read($length = null);", "public function read($length = null);", "public function read($len = null) {\n return $this->in->read($len);\n }", "public function read($cmd = 'READ:') {\n $this->sendLine($cmd);\n return $this->php_serial->readPort();\n }", "public function readLine() {\r\n if (!$this -> mHandle) {\r\n $this -> setError('Not connected', '500', mlError);\r\n return '';\r\n } \r\n $lRet = fgets($this -> mHandle, $this -> mByteBuffer);\r\n $this -> dbg('READ : '.$lRet);\r\n if ($lRet === FALSE) {\r\n $this -> setError('TCP: Data not read', 102, mlError);\r\n return '';\r\n }\r\n return $lRet;\r\n }", "public function readSockLine($socket)\r\n {\r\n $line = '';\r\n while (true)\r\n {\r\n $byte = socket_read($socket, 1);\r\n if ($byte === false || $byte === '')\r\n break;\r\n if ($byte === \"\\0\")\r\n break;\r\n $line .= $byte;\r\n }\r\n return $line;\r\n }", "public function read($length)\n {\n if (!$this->isConnected()) {\n throw new Rediska_Connection_Exception(\"Can't read without connection to Redis server. Do connect or write first.\");\n }\n\n if ($length > 0) {\n \t$data = $this->_readAndThrowException($length);\n } else {\n \t$data = null;\n }\n\n if ($length !== -1) {\n $this->_readAndThrowException(2);\n }\n\n return $data;\n }", "public function readTimestamp() {\n\t\treturn $this->readBigInt() / 1000;\n\t}", "public function readInt()\n {\n return $this->bin->readInt();\n }", "public function Read() {\n \n $raw = @socket_read( $this->socket, 512, PHP_NORMAL_READ );\n if ($raw === FALSE) {\n slog( \"Failed to read; \". socket_strerror( socket_last_error( $this->socket ) ) );\n $this->Close();\n return false;\n }\n\n if ($this->buffer) $raw = $this->buffer.$raw;\n\n if (substr($raw,-1) != \"\\n\") {\n $this->buffer = $raw;\n return false;\n }\n\n _log( $raw = trim( $raw ), \"<-\" );\n $this->buffer = \"\";\n unset( $this->Message );\n $this->Message = new Message( trim($raw) );\n return true;\n\n }", "public function stream_read($length)\n {\n\n //Abstract mb_* functions\n $substr = function_exists('mb_substr') ? 'mb_substr' : 'substr';\n $strlen = function_exists('mb_strlen') ? 'mb_strlen' : 'strlen';\n\n //Read that stuff chunk by chunk (whatever buffersize there is)\n $result = $substr($this->data, $this->position, $length);\n $this->position += $strlen($result);\n\n return $result;\n }", "public function readLine()\n {\n \tif (!$this->isConnected()) {\n throw new Rediska_Connection_Exception(\"Can't read without connection to Redis server. Do connect or write first.\");\n \t}\n\n \t$string = @fgets($this->_socket);\n\n if ($string === false) {\n $this->disconnect();\n throw new Rediska_Connection_Exception(\"Can't read from socket.\");\n }\n\n return trim($string);\n }", "public function stream_read($count) {\n $p =& $this->_pos;\n $ret = substr($this->_stream, $this->_pos, $count);\n $this->pos += strlen($ret);\n return $ret;\n }" ]
[ "0.7906339", "0.7620175", "0.7574481", "0.72462916", "0.71545064", "0.71517235", "0.7054856", "0.653716", "0.65351796", "0.6498451", "0.64108926", "0.63036233", "0.6270744", "0.6219164", "0.6151167", "0.6084252", "0.5968116", "0.5961074", "0.59429693", "0.5936434", "0.59339386", "0.59339386", "0.5909535", "0.5894448", "0.58849984", "0.58484393", "0.5833826", "0.5831491", "0.57915187", "0.574789", "0.5745515", "0.573604", "0.5710569", "0.5690221", "0.56562024", "0.56562024", "0.56562024", "0.563633", "0.5619402", "0.56134415", "0.5581727", "0.5566415", "0.5557616", "0.5543822", "0.5526864", "0.5520885", "0.5502523", "0.5502523", "0.5502523", "0.5493408", "0.54852337", "0.5463538", "0.5438476", "0.5424607", "0.5401809", "0.5369096", "0.53651905", "0.5363251", "0.5351501", "0.53256434", "0.5314867", "0.53127474", "0.53066915", "0.53016555", "0.5290044", "0.52842045", "0.52794194", "0.52778155", "0.5275372", "0.5260728", "0.5259976", "0.52596617", "0.52512586", "0.524807", "0.52335125", "0.5232398", "0.52001363", "0.51927817", "0.5163036", "0.51511955", "0.5137737", "0.5136261", "0.5129561", "0.5122821", "0.5117813", "0.5116263", "0.51094663", "0.51094663", "0.51094663", "0.5106257", "0.5099899", "0.5092552", "0.5085606", "0.50821275", "0.5075801", "0.50679874", "0.5064048", "0.50537884", "0.5029928", "0.50220966" ]
0.86545074
0
Read a string from the socket.
Прочитать строку из сокета.
protected function readString() { $length = $this->readInt(); if ($length === -1) { return null; } else if ($length === 0) { return ''; } else { return $this->socket->read($length); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function recvStr($read = true)\n\t{\n\t\t$str = @fgets($this->socket);\n\t\tif(!$str)\n\t\t{\n\t\t\t$this->disconnect();\n\t\t\tthrow new \\HandlerSocket\\IOException('Cannot read from socket');\n\t\t}\n\t\treturn substr($str,0,-1);\n\t}", "private function read() {\n return fgets( $this->socket, 128 );\n }", "public function readLine()\n {\n \tif (!$this->isConnected()) {\n throw new Rediska_Connection_Exception(\"Can't read without connection to Redis server. Do connect or write first.\");\n \t}\n\n \t$string = @fgets($this->_socket);\n\n if ($string === false) {\n $this->disconnect();\n throw new Rediska_Connection_Exception(\"Can't read from socket.\");\n }\n\n return trim($string);\n }", "public function read()\n\t{\n\t\t$this->connect();\n\n\t\t$data = '';\n\n\t\twhile(!feof($this->socket))\n\t\t{\n\t\t\t$data .= fgets($this->socket, 1024);\n\t\t}\n\n\t\treturn strlen($data) ? $data : false;\n\t}", "function read_str()\r\n\t{\r\n\t\t$len = $this->read_dword();\r\n\t\tif (!$this->state || $len < 0)\r\n\t\t{\r\n\t\t\t$this->push_error(\"ERR_STR_READ_FAIL\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// empty string\r\n\t\tif (!$len)\r\n\t\t\treturn \"\";\r\n\r\n\t\tif (($this->pos + $len > $this->datalen))\r\n\t\t{\r\n\t\t\t$this->push_error(\"ERR_STR_READ_FAIL\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$r = substr($this->data, $this->pos, $len);\r\n\t\t$this->pos += $len;\r\n\t\treturn $r;\r\n\t}", "function socket_read(Socket $socket, int $length, int $mode = PHP_BINARY_READ): string|false {}", "public function readLine() {\r\n if (!$this -> mHandle) {\r\n $this -> setError('Not connected', '500', mlError);\r\n return '';\r\n } \r\n $lRet = fgets($this -> mHandle, $this -> mByteBuffer);\r\n $this -> dbg('READ : '.$lRet);\r\n if ($lRet === FALSE) {\r\n $this -> setError('TCP: Data not read', 102, mlError);\r\n return '';\r\n }\r\n return $lRet;\r\n }", "public function readString()\n {\n return $this->readBytes();\n }", "public function read(int $length): string\n {\n if ($length > self::READ_MAX_LENGTH) {\n throw Exception\\Socket::invalidLength($length, self::READ_MAX_LENGTH);\n }\n// $data = $this->stream->recvAll($length, $this->getReadTimeout());\n $data = $this->stream->recvAll($length);\n if ($data === false) {\n throw new Exception(\n sprintf('Read msg error %s:%d (%s [%d])', $this->host, $this->port, $this->stream->errMsg, $this->stream->errCode)\n );\n }\n return $data;\n }", "public function read($len) {\n $read = 0;\n $data = '';\n\n while($read < $len) {\n $fread = @socket_read($this->_handle, $len - $read, PHP_BINARY_READ);\n\n if($fread === false) {\n $errer_no = socket_last_error($this->_handle);\n\n if($errer_no == SOCKET_EINTR) {\n usleep(1);\n continue;\n } else {\n $this->error(self::class . ': Failed to read data from ' . $this->getDomain(), $errer_no);\n }\n } elseif($fread == '') {\n //Connection closed\n $this->error(self::class . ': TSocket read 0 bytes from ' . $this->getDomain(), SOCKET_ECONNRESET);\n }\n\n $read += TStringFuncFactory::create()->strlen($fread);\n $data .= $fread;\n }\n\n return $data;\n }", "protected function _read($socket)\n {\n $response = '';\n while ($buff = fread($socket, 8192)) {\n $response .= $buff;\n }\n \n fclose($socket);\n \n return $response;\n }", "public function Read() {\n \n $raw = @socket_read( $this->socket, 512, PHP_NORMAL_READ );\n if ($raw === FALSE) {\n slog( \"Failed to read; \". socket_strerror( socket_last_error( $this->socket ) ) );\n $this->Close();\n return false;\n }\n\n if ($this->buffer) $raw = $this->buffer.$raw;\n\n if (substr($raw,-1) != \"\\n\") {\n $this->buffer = $raw;\n return false;\n }\n\n _log( $raw = trim( $raw ), \"<-\" );\n $this->buffer = \"\";\n unset( $this->Message );\n $this->Message = new Message( trim($raw) );\n return true;\n\n }", "protected function readline() {\n\t\tif (!$this->socket) {\n\t\t throw new \\Exception(\"Not connected to IRC Server\");\n\t\t}\n\t\t\n\t\t$string = fgets($this->socket);\n\t\t\n\t\terror_log(\"IRC < $string\");\n\t\t\n\t\t//$result = explode(' ', $string, 2);\n\t\t//return trim($result[1]);\n\t\treturn $string;\n\t }", "public function read(): string {\n\t\t$this->_check();\n\t\tif (($pos = strpos($this->buffer, $this->EOL)) === false) {\n\t\t\t$this->buffer .= $this->_read($this->optionInt(self::OPTION_READ_BUFFER_SIZE, self::DEFAULT_OPTION_READ_BUFFER_SIZE));\n\t\t\t$pos = strpos($this->buffer, $this->EOL);\n\t\t\tif ($pos === false) {\n\t\t\t\tthrow new Exception_Protocol(\"Server returned a line not ending in EOL: $this->buffer\");\n\t\t\t}\n\t\t}\n\t\t$eol_len = strlen($this->EOL);\n\t\t$line = substr($this->buffer, 0, $pos + $eol_len);\n\t\t$this->buffer = substr($this->buffer, $pos + $eol_len);\n\t\treturn $line;\n\t}", "public function read(int $length = 2048, int $type = PHP_BINARY_READ)\n {\n if (!$this->isSocketOpened()) {\n throw new ClientTCPSocketException('');\n }\n\n $buffer = @socket_read($this->socket, $length, $type);\n \n return trim($buffer);\n }", "public static function readString(string &$buffer)\n {\n $length = unpack('n', $buffer)[1];\n if ($length + 2 > strlen($buffer)) {\n echo \"buffer:\" . bin2hex($buffer) . \" length:$length not enough for unpackString\\n\";\n }\n\n $string = substr($buffer, 2, $length);\n $buffer = substr($buffer, $length + 2);\n return $string;\n }", "protected function read(): string\n\t{\n\t\t$s = '';\n\t\twhile (($line = fgets($this->connection, 1000)) != null) { // intentionally ==\n\t\t\t$s .= $line;\n\t\t\tif (substr($line, 3, 1) === ' ') {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $s;\n\t}", "protected function _read(int $characterCount): string {\n\t\t$result = fread($this->socket, $characterCount);\n\t\tif ($this->optionBool(self::OPTION_DEBUG_READ)) {\n\t\t\t$this->_log('->read({count}) = {result}', [\n\t\t\t\t'count' => $characterCount, 'result' => $result === false ? 'false' : strlen($result) . ' bytes',\n\t\t\t]);\n\t\t}\n\t\tif (strlen($result) === 0) {\n\t\t\tthrow new Exception_Protocol(\"fread returned empty: $result\");\n\t\t}\n\t\t$this->log(\"< $result\");\n\t\treturn $result;\n\t}", "public function readString($length = 1) {\n\t\tif($length < 0) {\n\t\t\tthrow new Exception('String index out of bounds');\n\t\t}\n\t\t\n\t\t$length = $length > $this->size - $this->endPointer ? $this->size - $this->endPointer : $length;\n\t\t\n\t\t$readString = '';\n\t\tfor($currentCharacter = 0; $currentCharacter < $length; $currentCharacter++) {\n\t\t\t$readString .= substr($this->streamData, $this->endPointer++, 1);\n\t\t}\n\t\t\n\t\treturn $readString;\n\t}", "public function read($length = 4096)\n {\n $this->connect();\n if (is_null($length)) {\n return fgets($this->socket);\n } else {\n return fgets($this->socket, $length);\n }\n }", "public function readSockLine($socket)\r\n {\r\n $line = '';\r\n while (true)\r\n {\r\n $byte = socket_read($socket, 1);\r\n if ($byte === false || $byte === '')\r\n break;\r\n if ($byte === \"\\0\")\r\n break;\r\n $line .= $byte;\r\n }\r\n return $line;\r\n }", "public function read($timeout = 1): string\n {\n if($this->debug === true) { echo \"\\nreceiving message : \\n\"; }\n stream_set_timeout($this->socket, $timeout);\n $read = stream_get_contents($this->socket, $this->length);\n if($this->debug === true) { echo $read.\"\\n\"; }\n return $read;\n }", "function readFromSocket($clientId = 0)\n {\n // start with empty string\n $data = '';\n\n // There are problems when readEndCharacter is longer than\n // readBufferSize - endings won't be detected.\n $lookInData = strlen($this->readEndCharacter) > $this->readBufferSize;\n if ($lookInData) {\n $extraDataLength = strlen($this->readEndCharacter) - $this->readBufferSize;\n }\n\n // read data from socket\n while (true) {\n if ($this->_readLeftOver == null) {\n $buf = socket_read(\n $this->clientFD[$clientId], $this->readBufferSize\n );\n } else {\n $buf = $this->_readLeftOver;\n $this->_readLeftOver = null;\n }\n\n if ($this->readEndCharacter != null) {\n if (strlen($buf) == 0) {\n break;\n }\n\n if (!$lookInData) {\n $posEndChar = strpos($buf, $this->readEndCharacter);\n } else {\n $posEndChar = strpos(substr($data, - $extraDataLength)\n . $buf, $this->readEndCharacter);\n }\n if ($posEndChar === false) {\n $data .= $buf;\n } else {\n $posEndChar += strlen($this->readEndCharacter);\n $data .= substr($buf, 0, $posEndChar);\n if ($posEndChar < strlen($buf)) {\n $this->_readLeftOver = substr($buf, $posEndChar);\n }\n break;\n }\n } else {\n /**\n * readEndCharacter is set to null => don't loop, just return\n */\n $data .= $buf;\n break;\n }\n }\n\n if ($buf === false) {\n $this->_sendDebugMessage(\n 'Could not read from client ' . $clientId . ' ('\n . $this->getLastSocketError($this->clientFD[$clientId])\n . ').');\n return false;\n }\n if ((string)$data === '') {\n return false;\n }\n return $data;\n }", "public function read(int $length): string\n {\n $this->deprecated('read() on Connection is deprecated.');\n try {\n $data = '';\n while (strlen($data) < $length) {\n $buffer = $this->stream->read($length - strlen($data));\n if ($buffer === '') {\n $this->throwException(new RuntimeException('Empty read; connection dead?'));\n }\n $data .= $buffer;\n $read = strlen($data);\n $this->logger->debug(\"[connection] Read {$read} of {$length} bytes.\");\n }\n return $data;\n } catch (RuntimeException $e) {\n $this->throwException($e);\n }\n }", "protected function writeAndReadSocket(string $buffer)\n {\n $this->writeSocket($buffer . self::SOCKET_MSG_ENDL);\n $read = $this->readSocket();\n if (!is_string($read) || $read === '') {\n throw new GdaemonClientException('No data from daemon');\n }\n\n return $read;\n }", "public function read($size=1024) {\n return socket_read($this->sock,$size,PHP_BINARY_READ);\n }", "public function read ($bytes=1)\n {\n if ($this->cursor + $bytes > $this->length)\n return false;\n\n $str = substr ($this->string, $this->cursor, $bytes);\n $this->cursor += $bytes;\n\n return $str;\n }", "public function read()\n {\n if (feof($this->_stream)) {\n $this->close();\n $this->_debug->info(\"ERROR: Server closed the connection.\");\n throw new Horde_Imap_Client_Exception(\n Horde_Imap_Client_Translation::t(\"POP3 Server closed the connection unexpectedly.\"),\n Horde_Imap_Client_Exception::DISCONNECT\n );\n }\n\n if (($read = fgets($this->_stream)) === false) {\n $this->_debug->info(\"ERROR: IMAP read/timeout error.\");\n throw new Horde_Imap_Client_Exception(\n Horde_Imap_Client_Translation::t(\"Error when communicating with the mail server.\"),\n Horde_Imap_Client_Exception::SERVER_READERROR\n );\n }\n\n $this->_debug->server(rtrim($read, \"\\r\\n\"));\n\n return $read;\n }", "protected function readChar()\n {\n return chr(Binary::unpackByte($this->socket->read(1)));\n }", "public function readLine(): string \n {\n return fgets($this->handle, 4096);\n }", "function _getnextstring($buffer_size = 512) {\n $buffer = \"\";\n $buffer = fgets ( $this->socket, $buffer_size );\n \n $this->socket_status = socket_get_status ( $this->socket );\n \n if ($this->socket_status [\"timed_out\"]) {\n $this->_cleanup ();\n return \"POP3 _getnextstring() - Socket_Timeout_reached.\";\n }\n $this->socket_status = FALSE;\n \n return $buffer;\n }", "public function readString($length=null){ }", "protected function readBytes()\n {\n $length = $this->readInt();\n if ($length === -1) {\n return null;\n }\n else if ($length === 0) {\n return '';\n }\n else {\n return $this->socket->read($length);\n }\n }", "public function readMessage() {\n $message = \"\";\n while (true) {\n socket_recv($this->socket, $buf, 4, MSG_WAITALL);\n if ($buf == null) {\n return $buf;\n }\n $frameSize = unpack(\"Nsize\", $buf);\n $frameSize = $frameSize[\"size\"];\n if ($frameSize == 0) {\n return $message;\n }\n socket_recv($this->socket, $buf, $frameSize, MSG_WAITALL);\n $message .= $buf;\n }\n return $message;\n }", "public function readUTF()\n {\n return $this->bin->readUTF();\n }", "function mapi_read($socket=NULL) {\n\t\t# get the first 2 bytes\n\t\tif (($header = socket_read($socket, 2)) == FALSE) {\n\t\t\t$last_error = socket_strerror(socket_last_error());\n\t\t\tthrow new Exception('Lost connection with the server: ' . $last_error);\n\t\t}\n\t\t$data = \"\";\n\n\t\t$chunk_size = ((ord($header[1]) << 7) | (ord($header[0]) >> 1));\n\t\t// keep reading until we have everything\n\t\twhile (strlen($data) < $chunk_size) {\n\t\t\t$data .= socket_read($socket, $chunk_size - strlen($data));\n\t\t}\n\n\n\t\twhile ((ord($header[0]) & 1) == 0) {\n\t\t\tif (($header = socket_read($socket, 2)) == FALSE) {\n\t\t\t\t$last_error = socket_strerror(socket_last_error());\n\t\t\t\tthrow new Exception('Lost connection with the server: ' . $last_error);\n\t\t\t}\n\n\t\t\t$chunk_size = ((ord($header[1])) << 7) | (ord($header[0]) >> 1);\n\n\t\t\t$block = \"\";\n\t\t\twhile (strlen($block) < $chunk_size) {\n\t\t\t\tif (($block .= socket_read($socket, $chunk_size - strlen($block))) == FALSE) {\n\t\t\t\t\t$last_error = socket_strerror(socket_last_error());\n\t\t\t\t\tthrow new Exception('Lost connection with the server: ' . $last_error);\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t$data = $data . $block;\n\t\t}\n\t\tif (strlen($data) == 0) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\treturn $data;\n\t}", "public function read(): string;", "public function read(): string;", "public function readFromSocketWithGivenLength()\n {\n $this->mockSocket->expects($this->once())\n ->method('read')\n ->with($this->equalTo(3))\n ->will($this->returnValue('foo'));\n $this->assertEquals('foo', $this->socketInputStream->read(3));\n }", "private function readString($unshared)\n {\n $str = '';\n $tc = $this->bin->readSingleByte();\n switch ($tc) {\n case self::TC_STRING:\n $str = $this->bin->readUTF();\n break;\n \n case self::TC_LONGSTRING:\n $str = $this->bin->readLongUTF();\n break;\n \n default:\n $format = 'invalid type code %02X';\n throw new StreamCorruptedException(sprintf($format, $tc));\n }\n $this->passHandle = $this->handles->assign(\n $unshared ? self::$unsharedMarker : $str);\n $this->handles->finish($this->passHandle);\n return $str;\n }", "public function readAll() {\r\n if (!$this -> mHandle) {\r\n $this -> setError('Not connected', 500, mlError);\r\n return '';\r\n } \r\n $lRet = '';\r\n while (!feof($this -> mHandle)) {\r\n $lTmp = fgets($this -> mHandle, $this -> mByteBuffer);\r\n $this -> dbg('READ : '.$lTmp);\r\n if ($lTmp === FALSE) {\r\n $this -> setError('TCP: Data not read', 102, mlError);\r\n return '';\r\n }\r\n $lRet.= $lTmp;\r\n }\r\n return $lRet;\r\n }", "public function receiveShortStr(): ?string\n {\n $rawLength = $this->receiveRaw(1);\n list(, $length) = unpack('C', $rawLength);\n $data = $this->receiveRaw($length);\n\n return $data;\n }", "public function read($length = 1024)\n {\n if (false === ($data = fread($this->fp, $length))) {\n throw new SocketException('socket read error');\n }\n return $data;\n }", "function client_read(StreamSocketInterface $socket, int $size = -1) \n\t{\n\t\treturn $socket->response($size);\n\t}", "protected function _receiveResponse()\n {\n $result = $this->socket->read(4096);\n\n $this->socket->close();\n\n return trim($result);\n }", "protected function _readString($buf, $pos)\n {\n return ($len = strpos(substr($buf, $pos), chr(0)))\n ? substr($buf, $pos, $len)\n : '';\n }", "function read_socket(StreamSocketInterface $socket, int $size = -1)\n\t{\n\t\treturn $socket->read($size);\n\t}", "public function read(int $length = 8192): string\n {\n return iconv($this->charset, 'UTF-8', $this->inputStream->read($length));\n }", "public function read($length) : string\n\t{\n\t\tif (! \\is_resource($this->resource))\n\t\t{\n\t\t\tthrow new Exception\\UnreadableStreamException('Stream is not resourceable');\n\t\t}\n\n\t\tif (! $this->isReadable())\n\t\t{\n\t\t\tthrow new Exception\\UnreadableStreamException('Stream is not readable');\n\t\t}\n\n\t\t$result = \\fread($this->resource, $length);\n\n\t\tif (false === $result)\n\t\t{\n\t\t\tthrow new Exception\\UnreadableStreamException('Unable to read from the stream');\n\t\t}\n\n\t\treturn $result;\n\t}", "public function read(int $length): string;", "public function readLongStr()\n {\n $this->_bitCount = 0;\n $this->_bits = 0;\n $slen = $this->readPhpInt();\n if ($slen < 0) {\n throw new Exception(\"String is longer than supported on this platform\");\n }\n\n return $this->rawRead($slen);\n }", "protected function read_message( $socket ) {\n\t\t$recv = socket_recv( $socket, $header, 4, MSG_WAITALL );\n\t\tif ( strlen( $header ) !== 4 )\n\t\t\tthrow new Exception( \"Prefork::read_message() failed receiving header\" );\n\t\t$length = current( unpack( 'N', $header ) );\n\t\t$recv = socket_recv( $socket, $message, $length, MSG_WAITALL );\n\t\tif ( strlen( $message ) !== $length )\n\t\t\tthrow new Exception( \"Prefork::read_message() failed receiving message\" );\n\t\treturn $message;\n\t}", "public function receive($length = self::DEFAULT_RECEIVE_LENGTH)\n\t{\n\t\t$buffer = '';\n\t\t$metadata['unread_bytes'] = 0;\n\t\t$makeBlockingAfterRead = false;\n\n\t\ttry {\n\t\t\tdo {\n\t\t\t\t// feof means socket has been closed\n\t\t\t\t// also, sometimes in long running processes the system seems to kill the underlying socket\n\t\t\t\tif (!$this->socket || feof($this->socket)) {\n\t\t\t\t\t$this->disconnect();\n\n\t\t\t\t\treturn $buffer;\n\t\t\t\t}\n\n\t\t\t\t$result = fread($this->socket, $length);\n\n\t\t\t\tif ($makeBlockingAfterRead) {\n\t\t\t\t\tstream_set_blocking($this->socket, true);\n\t\t\t\t\t$makeBlockingAfterRead = false;\n\t\t\t\t}\n\n\t\t\t\t// fread FALSE means socket has been closed\n\t\t\t\tif ($result === false) {\n\t\t\t\t\t$this->disconnect();\n\n\t\t\t\t\treturn $buffer;\n\t\t\t\t}\n\n\t\t\t\t$buffer .= $result;\n\n\t\t\t\t// feof means socket has been closed\n\t\t\t\tif (feof($this->socket)) {\n\t\t\t\t\t$this->disconnect();\n\n\t\t\t\t\treturn $buffer;\n\t\t\t\t}\n\n\t\t\t\t$continue = false;\n\n\t\t\t\tif (strlen($result) == 1) {\n\t\t\t\t\t// Workaround Chrome behavior (still needed?)\n\t\t\t\t\t$continue = true;\n\t\t\t\t}\n\n\t\t\t\tif (strlen($result) == $length) {\n\t\t\t\t\t$continue = true;\n\t\t\t\t}\n\n\t\t\t\t// Continue if more data to be read\n\t\t\t\t$metadata = stream_get_meta_data($this->socket);\n\n\t\t\t\tif ($metadata && isset($metadata['unread_bytes'])) {\n\t\t\t\t\tif (!$metadata['unread_bytes']) {\n\t\t\t\t\t\t// stop it, if we read a full message in previous time\n\t\t\t\t\t\t$continue = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$continue = true;\n\t\t\t\t\t\t// it makes sense only if unread_bytes less than DEFAULT_RECEIVE_LENGTH\n\t\t\t\t\t\tif ($length > $metadata['unread_bytes']) {\n\t\t\t\t\t\t\t// http://php.net/manual/en/function.stream-get-meta-data.php\n\t\t\t\t\t\t\t// 'unread_bytes' don't describes real length correctly.\n\t\t\t\t\t\t\t//$length = $metadata['unread_bytes'];\n\n\t\t\t\t\t\t\t// Socket is a blocking by default. When we do a blocking read from an empty\n\t\t\t\t\t\t\t// queue it will block and the server will hang. https://bugs.php.net/bug.php?id=1739\n\t\t\t\t\t\t\tstream_set_blocking($this->socket, false);\n\t\t\t\t\t\t\t$makeBlockingAfterRead = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} while ($continue);\n\n\t\t\treturn $buffer;\n\n\t\t} finally {\n\t\t\tif ($makeBlockingAfterRead) {\n\t\t\t\tstream_set_blocking($this->socket, true);\n\t\t\t}\n\t\t}\n\t}", "public function read() { return trim(fgets($this->handle)); }", "public function read() {\n\t\t\tif (($this->sts) && (!$this->eof)) {\n\t\t\t\tif ($this->pos < $this->len)\n\t\t\t\t\treturn $this->src[$this->pos++];\n\t\t\t\telse {\n\t\t\t\t\t$this->eof = true;\n\t\t\t\t\treturn '';\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function read()\n {\n return trim(fgets($this->_stdin, 1024), \"\\r\\n\");\n }", "function read() {\n\t\t$fullResult = '';\n\t\t\n\t\tif(!empty($this->link)) {\n\t\t\twhile(true) {\n\t\t\t\t$message = fgets($this->link, 1024);\n\t\t\t\n\t\t\t\tif($message != null) {\n\t\t\t\t\t$fullResult .= $message;\n\t\t\t\t\tif(substr($fullResult, -5, 5) == 'close') {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$fullResult = substr(trim($fullResult), 0, -5);\n\t\t\t$fullResult = base64_decode($fullResult);\n\t\t\t$fullResult = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $this->key, $fullResult, MCRYPT_MODE_CBC, $this->iv);\n\t\t\t\n\t\t\t$pos = strpos($fullResult, '[');\n\t\t\tif($pos != false) {\n\t\t\t\t$fullResult = substr($fullResult, $pos);\n\t\t\t}\n\t\t}\n\t\treturn trim($fullResult);\n\t}", "private static function readString($handle, $length)\n {\n return self::readUnpacked($handle, 'a*', $length);\n }", "public function readChar() {\n\t\treturn $this->atEnd() ? '' : substr($this->streamData, $this->endPointer++, 1);\n\t}", "public function receiveLongStr(): ?string\n {\n $length = $this->receiveLong();\n $string = $this->receiveRaw($length);\n\n return $string;\n }", "public function read($len)\n {\n return '';\n }", "public function readLineFromSocketWithGivenLength()\n {\n $this->mockSocket->expects($this->once())\n ->method('readLine')\n ->with($this->equalTo(3))\n ->will($this->returnValue('foo'));\n $this->assertEquals('foo', $this->socketInputStream->readLine(3));\n }", "public function read(int $length): string\n {\n }", "public function readLine(int $length = 8192): string\n {\n return iconv($this->charset, 'UTF-8', $this->inputStream->readLine($length));\n }", "function read() {}", "private function readClient($client){\n\t\t$buffer = \"\";\n\t\t$input = \"\";\n\n\t\tif($client !== $this->socket)\n\t\t{\n\t\t\tif( ($bytes = @socket_recv($client, $input, 2048, MSG_DONTWAIT)) > 0 ){\n\t\t\t\tif(!empty($input)){\n\t\t\t\t\t$buffer .= $input;\n\t\t\t\t}\n\t\t\t} else if($bytes === FALSE) {\n\t\t\t\t$this->log(\"[SRVR] Connection Lost\");\n\t\t\t\t$this->closeUser($client);\n\t\t\t\treturn $this->null;\n\t\t\t}\n\n\t\t\t//A length less than 2 is always a disconnect\n\t\t\tif( strlen($bytes) < 2 ){\n\t\t\t\t$this->log(\"[SRVR] Connection Dropped\");\n\t\t\t\t$this->closeUser($client);\n\t\t\t\treturn $this->null;\n\t\t\t} else {\n\t\t\t\t$buffer = $this->unmask($buffer);\n\t\t\t\t$buffer = json_decode($buffer);\n\t\t\t}\n\t\t}\n\n\t\treturn $buffer;\n\t}", "public function read($length): string\n {\n $data = parent::read($length);\n\n if (true !== $this->eof) {\n $this->data = $data;\n }\n\n if ($this->eof()) {\n $this->eof = true;\n }\n\n return $data;\n }", "protected function readString( $length=-1 ) {\r\n\t\tif (!is_integer($length)) return;\r\n $this->skipSpaces();\r\n $c = chr($this->seqSource->read());\r\n //average string size is around 2 and the normal string buffer size is\r\n //about 16 so lets save some space.\r\n $buffer = \"\";\r\n\t\tif ($length>-1) {\r\n\t\t\twhile( !ctype_space($c) && !$this->isClosing($c) && ord($c) != 255 && strlen($buffer) < $length &&\r\n\t\t\t\t\t$c != '[' &&\r\n\t\t\t\t\t$c != '<' &&\r\n\t\t\t\t\t$c != '(' &&\r\n\t\t\t\t\t$c != '/' )\r\n\t\t\t{\r\n\t\t\t\t$buffer .= $c;\r\n\t\t\t\t$c = chr($this->seqSource->read());\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$c = ord($c);\r\n\t\t\twhile( !$this->isEndOfName($c) && $c != -1 && $c != 255) {\r\n\t\t\t\t$buffer.=chr($c);\r\n\t\t\t\t$c = $this->seqSource->read();\r\n\t\t\t}\r\n\t\t}\r\n if ((is_integer($c) && $c!=-1) || (ord($c) != 255)) {\r\n $this->seqSource->unread($c);\r\n }\r\n return $buffer;\r\n }", "public function read($len);", "public function read($len);", "public function read($len);", "public function read(int $length = null): string;", "public function read($length);", "public function read($length);", "public function read($length);", "public function readLine()\n\t{\n\t\tif(($idx = strpos($this->_buffer,\"\\n\")) === false) return false;\n\n\t\t$line = substr($this->_buffer,0,$idx);\n\t\t$this->_buffer = substr($this->_buffer,$idx+1);\n\t\treturn rtrim($line,\"\\n\");\n\t}", "public function read($size = 512)\r\n {\r\n if (!$this->isConnected()) {\r\n return false;\r\n }\r\n $data = socket_read($this->socket, $size);\r\n if (!$data) {\r\n if ($this->getLastError() == 107) {\r\n $this->close();\r\n $this->socket = null;\r\n }\r\n }\r\n return $data;\r\n }", "public function read(int $length);", "public function readLine();", "public function readLine();", "public function readLine();", "public function readLine();", "public function readLine();", "public function read($length): string\n {\n if (!is_resource($this->resource)) {\n throw new RuntimeException('Stream has no resource');\n }\n\n if (!$this->isReadable()) {\n throw new RuntimeException('Stream is not readable');\n }\n\n $result = fread($this->resource, $length);\n if ($result === false) {\n throw new RuntimeException('Unable to read from the stream');\n }\n\n return $result;\n }", "protected function readByte()\n {\n return Binary::unpackByte($this->socket->read(1));\n }", "public function read(): ?string;", "public function stream_read($length)\n {\n\n //Abstract mb_* functions\n $substr = function_exists('mb_substr') ? 'mb_substr' : 'substr';\n $strlen = function_exists('mb_strlen') ? 'mb_strlen' : 'strlen';\n\n //Read that stuff chunk by chunk (whatever buffersize there is)\n $result = $substr($this->data, $this->position, $length);\n $this->position += $strlen($result);\n\n return $result;\n }", "public function read($length)\n {\n $currentLength = strlen($this->buffer);\n\n if ($length >= $currentLength) {\n // No need to slice the buffer because we don't have enough data.\n $result = $this->buffer;\n $this->position = strlen($this->buffer);\n } else {\n // Slice up the result to provide a subset of the buffer.\n $result = substr($this->buffer, $this->position, $length);\n $this->position = $this->position + $length;\n }\n\n return $result;\n }", "protected function read($length) {\n\t\tif ($this->length < $length) {\n\t\t\tthrow new \\Exception('Reading while at end of stream');\n\t\t}\n\t\t$output = substr($this->data, 0, $length);\n\t\t$this->data = substr($this->data, $length);\n\t\t$this->length -= $length;\n\t\treturn $output;\n\t}", "public function read($num)\n {\n $chunks = array();\n $len_read_so_far = 0;\n while ($len_read_so_far < $num) {\n $chunk = fread($this->socket, $num - $len_read_so_far);\n $len_read_so_far += strlen($chunk);\n $chunks[] = $chunk;\n }\n return implode('', $chunks);\n }", "private function curlCB_readBody($ch, $string) {\n //at first call, sent headers to client\n if (!$this->headersAlreadySent) {\n $this->sendHeaders();\n }\n\n //dump content to client\n echo $string;\n @ob_flush(); // flush output\n @flush();\n\n return strlen($string);\n }", "public function read()\n {\n $this->ensureDeviceOpen();\n\n $chars = [];\n\n do {\n $char = fread($this->fd, 1);\n if ($char === '') {\n continue;\n }\n $chars[] = $char;\n } while ($char !== $this->getParser()->getSeparator());\n\n return $this->getParser()->parse($chars);\n }", "private function _read()\n {\n $read = array($this->_conn['read']);\n if (stream_select($read, $w = null, $x = null, self::TIMEOUT, 15) > 0) {\n unset($w, $e);\n if ($reply = fgets($this->_conn['read'])) {\n return $reply;\n } else {\n throw new \\Seraphp\\Exceptions\\IOException('No reply in FIFO');\n }\n } else {\n throw new \\Seraphp\\Exceptions\\IOException('FIFO read timed out!');\n }\n }", "function read () {\n $buff = '';\n $select = $this->select(self::BLOCK_TIMEOUT);\n if ($select === false) {\n return false;\n } else if ($select > 0) {\n $buff = $this->readAll();\n }\n return $buff;\n }", "public abstract function read($len);", "function readAll ($readLen = self::READ_LENGTH) {\n $buff = '';\n do {\n $buff .= $chk = fread($this->sock, $readLen);\n $smd = stream_get_meta_data($this->sock);\n $readLen = min($smd['unread_bytes'], $readLen);\n } while ($chk !== false && $smd['unread_bytes'] > 0);\n if (! $chk) {\n trigger_error(\"Stream fread returned false\", E_USER_WARNING);\n $this->errFlag |= 1;\n }\n if (Connection::DEBUG) {\n echo \"\\n<read>\\n\";\n echo wire\\Hexdump::hexdump($buff);\n }\n return $buff;\n }", "private function readData(){\n\t\t$len= intval($this->getToken(), 10);\n\t\tif(strlen($this->readBuffer) - $this->readPos > $len){\n\t\t\t$data= substr($this->readBuffer, $this->readPos, $len);\n\t\t\t$this->readPos+= $len;\n\t\t}else{\n\t\t\t$data= substr($this->readBuffer, $this->readPos);\n\t\t\t$read= strlen($data);\n\t\t\t$this->clearBuffer();\n\t\t\twhile($read < $len){\n\t\t\t\t$part= $this->con->read($len - $read);\n\t\t\t\t$read+= strlen($part);\n\t\t\t\t$data.= $part;\n\t\t\t}\n\t\t}\n\t\t$this->fillBuffer();\n\t\t// skip the remaining \\r\\n\n\t\t$this->readPos+= 2;\n\t\treturn $data;\n\t}", "public function read($len)\n {\n // TODO: Implement read() method.\n if (TStringFuncFactory::create()->strlen($this->rBuf_) === 0) {\n $this->_readFrame();\n }\n\n // Just return full buff\n if ($len >= TStringFuncFactory::create()->strlen($this->rBuf_)) {\n $out = $this->rBuf_;\n $this->rBuf_ = null;\n\n return $out;\n }\n\n // Return TStringFuncFactory::create()->substr\n $out = TStringFuncFactory::create()->substr($this->rBuf_, 0, $len);\n $this->rBuf_ = TStringFuncFactory::create()->substr($this->rBuf_, $len);\n\n return $out;\n }", "public function readByte(): string\n {\n if ($this->isAtEndOfString())\n throw new \\Exception(\"unable to read Byte, StringReader already at End of String\");\n\n $byte = $this->string[$this->readerPos];\n ++$this->readerPos;\n return $byte;\n }", "function stream_read($nCount)\n {\n $strValue = $this->get();\n\n $ret = substr($strValue, $this->nPosition, $nCount);\n $this->nPosition += strlen($ret);\n\n return $ret;\n }" ]
[ "0.7619894", "0.7493284", "0.7386689", "0.71831703", "0.71561915", "0.7111963", "0.7054978", "0.70235914", "0.70149034", "0.6991926", "0.69145215", "0.6694541", "0.66854733", "0.6647172", "0.65658516", "0.6546773", "0.6469433", "0.6432371", "0.6428615", "0.6369948", "0.6364038", "0.6362232", "0.63120323", "0.63093305", "0.62594914", "0.62537986", "0.6246219", "0.6205209", "0.61886185", "0.6187709", "0.61658067", "0.616185", "0.6160811", "0.613853", "0.61304414", "0.61286765", "0.6115763", "0.6115763", "0.6090639", "0.60761267", "0.60689694", "0.60330445", "0.60270387", "0.6020048", "0.60059893", "0.5995001", "0.5985903", "0.5979598", "0.59767944", "0.5972856", "0.5967363", "0.5917606", "0.5911813", "0.58949095", "0.5890697", "0.5887046", "0.5876815", "0.5862131", "0.5845931", "0.5845333", "0.5840379", "0.5838666", "0.58367103", "0.5822609", "0.58188814", "0.5807383", "0.5795074", "0.57945913", "0.57914233", "0.57914233", "0.57914233", "0.5786468", "0.57192594", "0.57192594", "0.57192594", "0.56950986", "0.5693709", "0.56925565", "0.56808686", "0.56808686", "0.56808686", "0.56808686", "0.56808686", "0.56801534", "0.5676514", "0.56504667", "0.5650153", "0.5625433", "0.5618304", "0.56067073", "0.55968076", "0.5589957", "0.55884445", "0.5577519", "0.55772036", "0.55609167", "0.55403835", "0.5538834", "0.5507337", "0.5506688" ]
0.77870053
0
Get the value of taxableDeviceLine
Получить значение taxableDeviceLine
public function getTaxableDeviceLine(): TaxableDeviceLine { return $this->taxableDeviceLine; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTaxableDeviceLineAmount(): int;", "public function getTaxableDeviceLineTaxCode(): ?string;", "public function getLineValue(){\n\t\treturn (double)($this->qtty * $this->price);\n\t\t\n\t}", "public function getTax(): float;", "public function getLine(): int\n {\n return $this->getValue()->getExtraValue();\n }", "public function testTaxCanBeCalculatedForMoreThanOneTaxableDeviceLine()\n {\n $taxRatePercentage = 20;\n\n // Create tax rate\n $this->createDefaultTaxRate($taxRatePercentage);\n\n // Create tax calculator\n $taxCalculator = new TaxCalculatorFixture();\n\n // Create taxable device\n $taxableDevice = new TaxableDeviceFixture(1, 'order');\n\n // Create a couple of taxable device lines.\n $taxableDeviceLine1 = new TaxableDeviceLineFixture(1, 'order-line', '100L', 100, false);\n $taxableDeviceLine2 = new TaxableDeviceLineFixture(2, 'order-line', '100L', 100, false);\n\n // Add the device line to the device\n $taxableDevice->setTaxableDeviceLines(...[$taxableDeviceLine1, $taxableDeviceLine2]);\n\n // Add the device to the tax calculator and calculate tax\n $taxCalculator->addTaxableDevice($taxableDevice);\n $taxLineList = $taxCalculator->calculate();\n\n // Calculate expected tax\n $expected = ($taxRatePercentage / 100) * (100 + 100);\n\n // Test\n $this->assertEquals($expected, $taxLineList->totalAmount());\n }", "public function testTaxCanBeCalculatedForTaxableDeviceLineWithInclusiveTax()\n {\n $taxRatePercentage = 20;\n\n // Create tax rate\n $this->createDefaultTaxRate($taxRatePercentage);\n\n // Create tax calculator\n $taxCalculator = new TaxCalculatorFixture();\n\n // Create taxable device\n $taxableDevice = new TaxableDeviceFixture(1, 'order');\n\n // Create a couple of taxable device lines.\n $taxableDeviceLine = new TaxableDeviceLineFixture(1, 'order-line', '100L', 100, true);\n\n // Add the device line to the device\n $taxableDevice->setTaxableDeviceLines(...[$taxableDeviceLine]);\n\n // Add the device to the tax calculator and calculate tax\n $taxCalculator->addTaxableDevice($taxableDevice);\n $taxLineList = $taxCalculator->calculate();\n\n // Calculate expected tax\n $expected = ($taxRatePercentage / 100) * (100);\n\n // Test\n $this->assertEquals($expected, $taxLineList->totalAmount());\n $this->assertEquals($expected, $taxLineList->inclusiveAmount());\n $this->assertEquals(0, $taxLineList->exclusiveAmount());\n }", "public function getExternalTaxRate();", "public function getDisplayTaxAttribute();", "public function getTaxAmount();", "public function getTaxAmount();", "public function getTax():int;", "public function get_line_tax($item)\n {\n }", "public function getVatTaxAmount();", "public function getTaxRate();", "public function getTaxRate();", "public function getTax()\n {\n return $this->tax;\n }", "public function getTax()\n {\n return $this->tax;\n }", "public function getTax()\n {\n return $this->tax;\n }", "public function getTax()\n {\n return $this->tax;\n }", "public function tax()\n {\n $product = $this->getProduct();\n\n $rate = new LocationTaxRate();\n\n $tax = $this->money();\n\n if (!$product->taxable || $product->free) {\n return $tax;\n }\n\n $value = $this->value();\n $discount = $this->discount();\n\n $value = $value->subtract($discount);\n $tax = $value->multiply($rate->float());\n\n return $tax;\n }", "public function getLine() {\n switch ($this->mode) {\n case $this::MODE_HATERS:\n return $this->getHaters();\n break;\n\n case $this::MODE_PROCON:\n return $this->getProCon();\n break;\n\n case $this::MODE_WRECKEDEM:\n return $this->getWreckedEm();\n break;\n }\n }", "public function getTax()\n {\n return $this->_tax;\n }", "public function getTaxableAmount();", "public function getLine() {\n return $this->line;\n }", "public function getLinePrice() : int\n {\n return int_val($this->price);\n }", "public function getTaxReference();", "public function getTax()\n\t\t{\n\t\t\treturn $this->tax;\n\t\t}", "public function getLine() {\n return $this->line;\n }", "function toGetTax($domain_id)\r\n\t\t{\r\n\t\t\tglobal $CFG,$objSmarty;\r\n\t\t $sqlsel = \"SELECT tax_rate FROM \".$CFG['table']['store_details']. \" WHERE domain_id = '\".$this->filterInput($domain_id).\"'\";\r\n\t\t\t$sqlres = $this->ExecuteQuery($sqlsel,'select');\r\n\t\t\treturn $sqlres[0]['tax_rate'];\r\n\t\t\t//$objSmarty->assign('tax_value',$sqlres[0]['tax']);\r\n\t\t}", "public function getTax(): float\n {\n $tax = 0.0;\n foreach ($this->data() as $item) {\n $tax += (float)$item['quantity'] * ((float)$item['tax'] ?? 0);\n }\n return $tax;\n }", "function cart_tax()\n\t{\n\t\treturn $this->view_formatted_number($this->_calculate_tax());\n\t}", "public function getTaxableAmount()\n {\n $amount = $this->quantity*$this->unit_final_price;\n\n if ( Configuration::isFalse('ENABLE_ECOTAXES') ) return $amount;\n\n if ( $this->line_type == 'service' ) return $amount;\n if ( $this->line_type == 'shipping' ) return $amount;\n\n if ( $this->product->ecotax_id <= 0 ) return $amount;\n\n if ( Configuration::isTrue('PRICES_ENTERED_WITH_ECOTAX') ) return $amount;\n \n // Apply Eco-Tax\n\n // Get rules\n // $rules = $product->getTaxRules( $this->taxingaddress, $this->customer );\n // Gorrino style, instead:\n $ecotax = $this->product->ecotax;\n\n // Apply rules\n // $document_line->applyTaxRules( $rules );\n // Gorrino style again\n $amount = $amount*(1.0+$ecotax->percent/100.0) + $ecotax->amount * $this->quantity;\n\n return $amount;\n }", "public function getLine ()\n {\n return $this->line;\n }", "public function getLine()\n {\n $this->addFieldCache('line');\n\n if (!isset($this->data['fields']['line']) &&\n !$this->isFieldInQuery('line'))\n {\n $this->loadFull();\n }\n // Still not set? It can only be null\n if (!isset($this->data['fields']['line'])) {\n $this->data['fields']['line'] = null;\n }\n\n return $this->data['fields']['line'];\n }", "public function getLine()\n {\n return $this->line;\n }", "public function getLine()\n {\n return $this->line;\n }", "public function getLine()\n {\n return $this->line;\n }", "public function getLine()\n {\n return $this->line;\n }", "public function getLine()\n {\n return $this->line;\n }", "public function getLine()\n {\n return $this->line;\n }", "public function getLine()\n {\n return $this->line;\n }", "public function getLine()\n {\n return $this->line;\n }", "public function getProductline()\n\t{\n\t\treturn $this->productline;\n\t}", "public function tax()\n {\n return $this->price()->multiply($this->taxRate / 100);\n }", "public function getDisplayTaxAttribute()\n {\n return Shop::format(array_key_exists('tax', $this->attributes) ? $this->attributes['tax'] : 0.00);\n }", "public function getShippingTaxAmount();", "public function getTaxTotalPrice()\n {\n \n \n\n }", "function get_tax_number()\n {\n\t\t\tif (!empty($this->business_center_id)) {\n\t\t\t\t$tax_row = DistributorIdentification::getByDistributorIdCountryId($this->distributor_id, $this->country_id, $this->creation_date);\n\t\t\t\t$tax_array = $tax_row->toArray();\n \t$tax_number = $tax_array[0]['distributor_identification_number'];\n\t\t\t\tif (!empty($tax_number)) {\n\t\t\t\t\treturn $tax_number;\n\t\t\t\t}\n\t\t\t}\n return false;\n\t\t}", "private function makeLineTaxes() :string\n {\n $tax_map = $this->entity_calc->getTaxMap();\n\n $data = '';\n\n foreach ($tax_map as $tax) {\n $data .= '<tr class=\"line_taxes\">';\n $data .= '<td>'.$tax['name'].'</td>';\n $data .= '<td>'.Number::formatMoney($tax['total'], $this->client).'</td></tr>';\n }\n\n return $data;\n }", "public function value()\n {\n $product = $this->getProduct();\n\n return $product->retail_price->multiply($this->qt);\n }", "public function getTaxumpath() {\n return null;\n }", "public function get_vat_value() {\n\t\treturn array_sum(\n\t\t\tarray_map(\n\t\t\t\tfunction( $line ) {\n\t\t\t\t\treturn $line->get_vat_value();\n\t\t\t\t},\n\t\t\t\t$this->get_lines()\n\t\t\t)\n\t\t);\n\t}", "public function getTerminalNumber() { return $this->get('terminalNumber'); }", "public function getTaxId()\n {\n return $this->tax_id;\n }", "public function getShippingChargeTax()\n {\n return $this->_fields['ShippingChargeTax']['FieldValue'];\n }", "public function getValue(): float\n {\n return $this->value;\n }", "public function value()\n {\n return Common::decimal($this->getAttribute('value'));\n }", "public function getLine()\n {\n return $this->_line;\n }", "public function testTaxCanBeCalculatedForMoreThanOneTaxableDevice()\n {\n $taxRatePercentage = 20;\n\n // Create tax rate\n $this->createDefaultTaxRate($taxRatePercentage);\n\n // Create tax calculator\n $taxCalculator = new TaxCalculatorFixture();\n\n // Create taxable device\n $taxableDevice1 = new TaxableDeviceFixture(1, 'order');\n $taxableDevice2 = new TaxableDeviceFixture(2, 'order');\n\n // Create a couple of taxable device lines.\n $taxableDeviceLine1 = new TaxableDeviceLineFixture(1, 'order-line', '100L', 100, false);\n $taxableDeviceLine2 = new TaxableDeviceLineFixture(2, 'order-line', '100L', 100, false);\n\n // Add the device line to the device\n $taxableDevice1->setTaxableDeviceLines(...[$taxableDeviceLine1]);\n $taxableDevice2->setTaxableDeviceLines(...[$taxableDeviceLine2]);\n\n // Add the device to the tax calculator and calculate tax\n $taxCalculator->addTaxableDevice($taxableDevice1);\n $taxCalculator->addTaxableDevice($taxableDevice2);\n $taxLineList = $taxCalculator->calculate();\n\n // Calculate expected tax\n $expected = ($taxRatePercentage / 100) * (100 + 100);\n\n // Test\n $this->assertEquals($expected, $taxLineList->totalAmount());\n }", "public function getPodtline()\n {\n return $this->podtline;\n }", "public function getInvoiceLine()\n {\n return $this->invoiceLine;\n }", "public function getTaxRate()\n {\n return 10;\n }", "public function getTotalTaxAmount();", "public function getTotalTax()\n {\n return isset($this->TotalTax) ? $this->TotalTax : null;\n }", "public function getTotalTax()\n {\n return isset($this->TotalTax) ? $this->TotalTax : null;\n }", "public function getFormattedTaxAttribute(): string\n {\n return $this->formattedTax();\n }", "public function detailsTaxedTotal();", "public function getTaxTotal()\n {\n return $this->taxTotal;\n }", "public function getTax() {\n\t\t$tax = 0.00;\n\t\t$taxAddress = @$_SESSION['cart_checkout']['address']['shipping_address'];\n\t\tforeach ($this->getCartItems() as $item) {\n\t\t\t$taxClass = $item->getProduct()->getTaxClass();\n\t\t\t$taxRate = CartTaxRate::getTaxRate($taxClass, $taxAddress);\n\t\t\t$rate = $taxRate->getRate();\n\t\t\t$tmpTax = $rate * ($item->getPrice() * $item->getQuantity());\n\t\t\t$tmpTax = ceil($tmpTax);\n\t\t\t$tmpTax = $tmpTax / 100;\n\t\t\t$tax += $tmpTax;\n\t\t}\n\t\treturn $this->round($tax);\t\t\n\t}", "public function getTax()\n {\n return number_format($this->order->getTaxAmount(), 2, '.', '');\n }", "public function get_cart_tax()\n {\n }", "public function getTaxFeeNumber(){\n\t\treturn $this->taxFee_number;\n\t}", "public function get_line() {\n return $this->line;\n }", "public function getLineItemDetails();", "public function getline1()\r\n {\r\n return $this->line_1;\r\n }", "public function getSpecifiedTaxRegistration()\n {\n return $this->specifiedTaxRegistration;\n }", "public function getTax() {\n $config = SiteConfig::current_site_config();\n (float)$price = $this->Price;\n (float)$rate = $config->TaxRate;\n\n if($rate > 0)\n (float)$tax = ($price / 100) * $rate; // Get our tax amount from the price\n else\n (float)$tax = 0;\n\n return number_format($tax, 2);\n }", "public function getShowTaxString();", "public function getTaxRate()\n {\n return 0.10;\n }", "public function getValue()\n\t\t{\n\t\t\treturn $this->trade_value;\n\t\t}", "public function get_total_tax()\n {\n }", "public function get_fee_tax()\n {\n }", "public function get_id_tax()\n\t{\n\t\treturn $this->id_tax;\n\t}", "public function getShowPriceWithTax();", "public function getBillingAddressLine3();", "protected function getLineType($line) {\n\t\treturn $line[0];\n\t}", "final public static function getLine() {\n\t\t$line = self::$line;\n\t\t\n\t\t// call hook\n\t\tHook::call('Error.getLine', array(&$line));\n\t\t\n\t\treturn $line;\n\t}", "public function getTaxRegistrationDetails()\n {\n return $this->taxRegistrationDetails;\n }", "public function getTotalTax()\n {\n if (is_null($this->totalTax)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_TOTAL_TAX);\n if (is_null($data)) {\n return null;\n }\n\n $this->totalTax = CentPrecisionMoneyModel::of($data);\n }\n\n return $this->totalTax;\n }", "protected function extractValue(): mixed\n {\n $tokens = $this->extractLineTokens();\n $value = implode(' ', $tokens);\n //fix for different stat output for older versions\n $value = trim($value);\n if ($value[0] === '`') {\n $value = substr($value, 1, strlen($value));\n }\n\n if ($value[strlen($value)-1] === \"'\") {\n $value = substr($value, 0, -1);\n }\n\n return $value;\n }", "public function getLineItemInfo()\n {\n return $this->line_item_info;\n }", "public function getOedtline()\n {\n return $this->oedtline;\n }", "public function getTotalValue(){\n $data = $this->quantity * $this->gia_tri;\n return $data;\n }", "public function getValue(): Iota\n {\n return $this->value;\n }", "public function getValue()\n {\n return isset($this->value) ? $this->value : 0.0;\n }", "public function getInvoiceFeeIncludeTax ()\n\t{\n\t\treturn $this->getTotal()\n\t\t\t->getAddress()\n\t\t\t->getInvoiceFee();\n\t}", "public static function line() {\n\t\treturn new Highcharts\\Line();\n\t}", "public function line(): int;", "public function getTaxRate()\n\t{\n\t\treturn $this->tax_rate;\n\t}" ]
[ "0.79383224", "0.7319253", "0.7249787", "0.6406185", "0.6265806", "0.6224695", "0.6105332", "0.5978801", "0.59549844", "0.59400874", "0.59400874", "0.5925063", "0.59142125", "0.59091026", "0.58779436", "0.58779436", "0.58645767", "0.58645767", "0.58645767", "0.58645767", "0.5856818", "0.5793614", "0.57774967", "0.5747191", "0.57303286", "0.5683002", "0.56793535", "0.5676585", "0.5638948", "0.56158495", "0.5613961", "0.56047523", "0.5604611", "0.5579924", "0.55757993", "0.55728245", "0.55728245", "0.55728245", "0.55728245", "0.55728245", "0.55728245", "0.55728245", "0.55728245", "0.55647767", "0.5551245", "0.5550362", "0.5549752", "0.5543525", "0.55345166", "0.55276513", "0.5525326", "0.54996777", "0.5498938", "0.5484673", "0.54571605", "0.54284567", "0.54267085", "0.542126", "0.54189533", "0.5413315", "0.5408003", "0.5404322", "0.5404012", "0.539093", "0.53855324", "0.53855324", "0.5383506", "0.5382243", "0.5367932", "0.5364464", "0.53585607", "0.53585243", "0.53583467", "0.5344031", "0.53400654", "0.5338357", "0.53283983", "0.52991754", "0.52987796", "0.5258949", "0.5248522", "0.52449787", "0.52270263", "0.52266276", "0.5226406", "0.52221626", "0.52182645", "0.520205", "0.5201476", "0.51971895", "0.5197081", "0.51928586", "0.518597", "0.5184662", "0.5182683", "0.51819104", "0.517908", "0.51762766", "0.51693684", "0.5165859" ]
0.7966269
0
/ Constructor from csv line
Конструктор из строки CSV
public function __construct($row_csv) { $this->id = $row_csv[0] ; $this->first_name = $row_csv[1]; $this->last_name = $row_csv[2] ; $this->gender = $row_csv[3] ; $this->age = $row_csv[4]; $this->address = $row_csv[5] ; $this->phone_number = $row_csv[6] ; /* Extra for name frequency */ $this->first_name_freq = '0'; $this->last_name_freq = '0'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __construct($csv_row, $xmlstr = NULL) {\n\n if(!is_null($xmlstr)) {\n\n parent::__construct($xmlstr);\n } else {\n\n parent::__construct(self::MODS_XML);\n }\n\n $this->set_record($csv_row);\n }", "function __construct( string $delimeter, string $headerRow ) {\n $columns = explode( $delimeter, $headerRow );\n $this->ColCount = count( $columns );\n }", "public function buildFromCsv(CsvLine $csv_line_base = null)\n\t{\n\t\t$this->csv_line_base = $csv_line_base ? $csv_line_base : new CsvLine;\n\t\t$this->csv_parser->setConfig($this->config_file_parse);\n\t\t$this->csv_line_base->setConfig($this->config_model);\n\n\t\t$this->updateCsvHeader();\n\n\t\t// Csv loop\n\t\twhile ( ($csv_line_array = $this->csv_parser->parseCsvFile()) != false )\n\t\t{\n\t\t\tif( count($csv_line_array) && (! ( (count($csv_line_array) == 1) && is_null($csv_line_array[0]) ) ) )\n\t\t\t{\n\t\t\t\t// create csv_line\n\t\t\t\t$csv_line = clone $this->csv_line_base;\n\t\t\t\t$csv_line->forceSetAttributes($csv_line_array);\n\t\t\t\t$this->appendLine($csv_line);\n\t\t\t}\n\t\t}\n\t}", "public function parse()\n {\n // Verify if the CSV File is Valid\n $this->checkFile();\n\n // parse the csv\n $items = array_map('str_getcsv', file($this->getCsv()));\n\n // Set the CSV Header\n $headers = array_shift($items);\n $this->headers = array_map(array($this,\"_sanitize\"), $headers);\n $this->data = array_map(array($this, 'mapHeaderToRow'), $items);\n }", "protected function initCSV() {}", "public function __construct($lineNumber, $line, array $row, $parsedData)\n {\n $this->lineNumber = $lineNumber;\n $this->line = $line;\n $this->row = $row;\n $this->parsedData = $parsedData;\n }", "function __construct($file, $seperator = ',', $enclose = '\"', $escape = ''){\n\t\t\n\t\t$this->mFldSeperator = $seperator;\n\t\t$this->mFldEnclosure = $enclose;\n\t\t$this->mFldEscapor = $escape;\n\t\t\n\t\t$this->mSkipEmptyRows = TRUE;\n\t\t$this->mTrimFields = TRUE;\n\t\t\n\t\t$this->mRowCount = 0;\n\t\t$this->mSkippedRowCount = 0;\n\t\t\n\t\t$this->mRowSize = 4096;\n\t\t\n\t\t// Open file \n\t\t$this->mHandle = @fopen($file, \"r\") or trigger_error('Unable to open csv file', E_USER_ERROR);\n\t}", "public function __construct($csv_path,$emails,$shop)\n {\n $this->csv = $csv_path;\n $this->emails = $emails;\n $this->shop = $shop;\n }", "public function __construct()\n {\n //bilbiotheek;Cultuur;Kathleen Somers; xxxxx-xxxxx-xxxx-....\n //administratie;Cultuur;Kathleen Somers; xxxxx-xxxxx-xxxx-....\n //;Financien;Ellen De Backer; xxxxx-xxxxx-xxxx-....\n $this->dienstencsv =\"database/csv/Diensten.csv\";\n $this->delimiter = ';';\n }", "public function __construct(CsvReader $csvReader)\n {\n $this->csvReader = $csvReader;\n }", "static function parse($line)\n\t{\n\t\t$line = (string) str_replace(\"\\t\", \" \", $line);\n\t\t$line = preg_replace(\"/[\\\\000-\\x1f\\x7f]/\", \"\", $line);\n\t\t$a = explode(\":\", $line, 2);\n\t\t$name = rtrim($a[0]);\n\t\t$value = count($a) == 2? trim($a[1]) : \"\";\n\t\treturn new self($name, $value);\n\t}", "public function read() {\n $row = 1;\n $this->columns = array();\n $this->rows = array();\n if (($handle = fopen($this->filename, \"r\")) !== FALSE) {\n while (($data = fgetcsv($handle,0,$this->delimiter)) !== FALSE) {\n $num = count($data);\n if ($row==1) {\n for ($c=0; $c < $num; $c++) {\n $h = TABULAR::makeValidColName($data[$c]);\n $this->columns[] = $h;\n }\n } else {\n $rec = array();\n // If we encounter a row that is completely blank, we will not add that row to the results.\n $allEmpty = true;\n for ($c=0; $c < $num; $c++) {\n if (isset($this->colMap[$this->columns[$c]])) {\n $column = $this->colMap[$this->columns[$c]];\n } else {\n $column = $this->columns[$c];\n }\n if ((!empty($column)) || !$this->suppressNoNameCols) {\n $d = trim($data[$c]);\n $d = str_replace(\"\\x0D\",\"\",$d); // remove MS-DOS carriage returns (^M)\n $rec[$column] = $d;\n if ($d != '') {\n $allEmpty = false;\n }\n }\n }\n if (!$allEmpty) {\n $this->rows[] = $rec;\n }\n }\n $row++;\n }\n fclose($handle);\n } else {\n throw new Exception(\"CSV File not found: $this->filename\");\n }\n // Return $this to allow method chaining.\n return $this;\n }", "private function parseCSVLine($line) {\n if (count($line) > 3) {\n // Data is likey malformed, throw an exception.\n $message = \"Malformed line in CSV file: @line\";\n MigrationMessage::varDumpToDrush($line, $message);\n $message = \"Error with CSV file: more than three items detected per line. Each line should only contain 'depth, title, link'. \\n\";\n throw new MigrateException($message);\n }\n $depth = trim((!empty($line[0])) ? $line[0] : '');\n $title = trim((!empty($line[1])) ? $line[1] : '');\n $backup_link = $this->parameters->getFallbackPage();\n $link = trim((!empty($line[2])) ? $line[2] : $backup_link);\n // If it uses the backup link, don't normalize it.\n $url = ($link === $backup_link) ? $link : $this->normalizeUri($link);\n\n // Menu items are like '-My Title {\"url\":\"https://www.site.com/blah\"}'.\n $menu_item = \"{$depth}{$title} {\\\"url\\\":\\\"{$url}\\\"}\\n\";\n\n return $menu_item;\n }", "function __construct()\n\t{\n parent::__construct('../data/SetDetail.csv', 'Id', 'SetDetailEntity');\n }", "public static function ParseCSVLine($p_line) {\n \t Debug::Singleton()->log(\"Util::ParseCSVLine($p_line)\");\n\t $v_line = preg_replace('/,/', ',_', $p_line);\n\t /* ugly workaround to make the first character of the fields\n\t non-vulnerable */\n \t Debug::Singleton()->log(\"Util::ParseCSVLine(): \\$v_line = $v_line\");\n\t $v_csv_record_arr = str_getcsv($v_line);\n\t foreach($v_csv_record_arr as &$v_field) {\n\t $v_field = preg_replace('/^_/', '', $v_field);\n\t }\n\t return $v_csv_record_arr;\n }", "public function __construct($fileLine = null)\n {\n if ($fileLine !== null) {\n $this->parseLine($fileLine);\n }\n }", "public function __construct($fileName, $delimiter = ',', $fieldEnclosure = '\"', $escapeChar = '\\\\')\n {\n parent::__construct($fileName, 'r');\n $this->setFlags(\\SplFileObject::READ_CSV | \\SplFileObject::READ_AHEAD | \\SplFileObject::SKIP_EMPTY | \\SplFileObject::DROP_NEW_LINE);\n $this->setCsvControl($delimiter, $fieldEnclosure, $escapeChar);\n }", "function __construct(){\n //$this->_checks_array = ['addr', 'point', 'phone_site'];\n $this->_checks_array = ['addr', 'point'];\n // $this->_check_patterns= [\n // 'addr'=>['city','street_type','street','house','apartment'],\n // 'point'=>['lng','lat'],\n // 'phone_site'=>['phone','site']\n // ];\n $this->_check_patterns= [\n 'addr'=>['city','street_type','street','house','apartment'],\n 'point'=>['lng','lat'], \n ];\n /**\n * Set $_GET Data to $this->_opt\n */ \n $this->setOptsFromGET(); \n /**\n * Load CSV file Data into $this->_file\n */\n $this->readCsvFile($this->_file_url);\n /**\n * Copy initial CSV file Data into $this->_init_file\n */\n $this->_init_file = $this->_file;\n /**\n * Initialize DB Class\n */ \n $this->_db = new CSVModel; \n }", "public function __construct()\n\t{\n\t\tparent::__construct(\"../data/Categories.csv\", 'id');\n\t}", "public function readCSVLine($separator = \",\", $enclosure = '\"');", "function getUserData($fileLine) {\n $dataArr = explode(\",\", $fileLine);\n $newUser = new User($dataArr);\n\n return $newUser;\n }", "public function csv($csv)\n\t{\n\t\t$this->csv = $csv;\n\t\treturn $this;\n\t}", "public function getProductsFromCsv() {\n $labels = array('id', 'sku', 'title', 'description', 'price', 'special', 'link');\n $fh = fopen('./Model/products.csv', 'r');\n if($fh) {\n while(!feof($fh)) {\n $row = fgetcsv($fh);\n if(isset($row) && is_array($row) && count($row) > 0) {\n foreach($row as $key => $value) {\n $tempRow[$labels[$key]] = $value;\n }\n $this->products[] = $tempRow;\n }\n }\n }\n }", "function __construct() {\n $importer = new CsvImporter(\"../uploads/userData.csv\", true);\n while ($data = $importer->get()) {\n self::insert($data);\n }\n }", "public static function parse ($str, $opts=[])\n {\n if (is_string($opts))\n {\n $opts = ['delimiter'=>$opts];\n }\n elseif (!is_array($opts))\n {\n throw new \\Exception(\"Invalid options passed to CSV::parse()\");\n }\n\n if (isset($opts['delimiter']))\n {\n $delimiter = $opts['delimiter'];\n }\n elseif (isset($opts['tabs']) && $opts['tabs'])\n {\n $delimiter = \"\\t\";\n }\n else\n {\n $delimiter = \",\";\n }\n\n $useregex = isset($opts['regex']) ? $opts['regex'] : false;\n $trimcols = isset($opts['trim']) ? $opts['trim'] : false;\n $assoc = isset($opts['assoc']) ? $opts['assoc'] : false;\n $escape = isset($opts['escape']) ? $opts['escape'] : \"\\0\";\n\n if (is_string($useregex))\n {\n $delimiter = $useregex;\n $useregex = true;\n }\n\n $str = preg_replace_callback('/([^\"]*)(\"((\"\"|[^\"])*)\"|$)/s', \n function ($matches) use ($escape, $delimiter)\n {\n if (count($matches) > 3)\n {\n $str = str_replace(\"\\r\", $escape.'R', $matches[3]);\n $str = str_replace(\"\\n\", $escape.'N', $str);\n $str = str_replace('\"\"', $escape.'Q', $str);\n $str = str_replace($delimiter, $escape.'D', $str);\n return $matches[1] . $str;\n }\n else\n {\n return $matches[1];\n }\n }, \n $str\n );\n\n $str = preg_replace('/\\n$/', '', $str); // Remove last newline.\n\n $lines = explode(\"\\n\", $str);\n\n $rows = array_map(function ($line) \n use ($delimiter, $trimcols, $escape, $useregex)\n {\n if ($useregex)\n {\n $fields = preg_split($delimiter, $line);\n }\n else\n {\n $fields = explode($delimiter, $line);\n }\n return array_map(function ($field) use ($delimiter, $escape, $trimcols)\n {\n $field = str_replace($escape.'D', $delimiter, $field);\n $field = str_replace($escape.'Q', '\"', $field);\n $field = str_replace($escape.'N', \"\\n\", $field);\n $field = str_replace($escape.'R', \"\\r\", $field);\n if ($trimcols) $line = trim($field);\n return $field;\n },\n $fields);\n }, $lines);\n\n if ($assoc)\n { // Generate an associative array. The first row is the headers.\n# error_log(\"building associative array from CSV data\");\n $header = null;\n $assoc = [];\n foreach ($rows as $row)\n {\n if (!isset($header))\n {\n $header = $row;\n# error_log(\"found header: \".json_encode($header));\n }\n else\n {\n $assoc[] = array_combine($header, $row);\n }\n }\n return $assoc;\n }\n else\n { // Return the flat rows, including the header.\n return $rows;\n }\n }", "function set_record($csv_row) {\n $title_values = array_slice($csv_row, 1, 3);\n $this->add_title($title_values);\n\n $name_values = array_slice($csv_row, 4, 4);\n $this->add_name($name_values);\n\n $name_values = array_slice($csv_row, 8, 4);\n $this->add_name($name_values);\n\n $name_values = array_slice($csv_row, 12, 4);\n $this->add_name($name_values);\n\n $name_values = array_slice($csv_row, 16, 4);\n $this->add_name($name_values);\n\n $origin_info_values = array_slice($csv_row, 20, 4);\n $this->add_origin_info($origin_info_values);\n\n $related_item_first = array_slice($csv_row, 24, 8);\n $this->add_related_item_first($related_item_first);\n\n $related_item_second = array_slice($csv_row, 32, 6);\n $this->add_related_item_second($related_item_second);\n\n $this->add_note(array_slice($csv_row, 38, 1));\n\n /*\n \"File\",\n\n\"titleInfo_title\",\"titleInfo_subTitle\",\"titleInfo_partName\",\n\n\"name1_authorityURI\",\"name1_displayForm\",\"name1_affilliation\",\"name1_role\",\n\"name2_authorityURI\",\"name2_displayForm\",\"name2_affilliation\",\"name2_role\",\n\"name3_authorityURI\",\"name3_displayForm\",\"name3_affilliation\",\"name3_role\",\n\"name4_authorityURI\",\"name4_displayForm\",\"name4_affilliation\",\"name4_role\",\n\n\"originInfo_place_placeTerm\",\"originInfo_Publisher\",\"originInfo_frequency_authorityMARCfrequency\",\"originInfo_dateIssued_ISO8601\",\n\n\"relatedItem_typeHost_titleInfo_title\",\n\"relatedItem_identifier_typeISSN\",\n\"relatedItem_part1_detaii1_typeVolume_caption\",\n\"relatedItem_part1_detail1_typeVolume_number\",\n\"relatedItem_part1_detail1_typeIssue_caption\",\n\"relatedItem_part1_detail1_typeIssue_number\",\n\"relatedItem_part1_date_qualifierApproximate\",\n\"relatedItem_part1_date_encodingISO8601\",\n\n\"relatedItem_part2_detail2_typeVolume_caption\",\n\"relatedItem_part2_detail1_typeVolume_number\",\n\"relatedItem_part2_detail2_typeIssue_caption\",\n\"relatedItem_part2_detail2_typeIssue_number\",\n\"relatedItem_part2_date_qualifierApproximate\",\n\"relatedItem_part2_date_encodingISO8601\",\n\n\"note\"\n */\n\n $this->set_collection('Shakespeare Bulletin Archive');\n\n return $this->validate();\n }", "public function __construct( $filename = FALSE , $columns = NULL , $delimiter = ',' , $enclosure = '\"' )\n\t{\n\t\t$this->_delimiter = (string) $delimiter;\n\t\t$this->_enclosure = (string) $enclosure;\n\n\t\t// sanitize the filename\n\t\t$filename = (string) str_ireplace( '.csv' , '' , (string) $filename );\n\t\t$filename = sanitize_title_with_dashes( trim( $filename ));\n\t\t$this->_filename = $filename ? $filename .'.csv' : sanitize_title_with_dashes( date('r')) .'.csv';\n\n\t\t// set the columns (it's important for CSVs to have the same number of columns in every row)\n\t\tif( $columns )\n\t\t\t$this->_set_columns( $columns );\n\n\t}", "function __construct()\n {\n parent::__construct('../data/assets.csv','id');\n }", "public function fromCSV($value)\r\n {\r\n return $this->_category;\r\n }", "public static function loadFromFileLine($line)\n {\n $line = explode(':', $line, 2);\n if (count($line) !== 2) {\n return null;\n }\n return new self($line[0], $line[1]);\n }", "public function __construct($line1 = NULL, $line2 = NULL, $line3 = NULL, $city = NULL, $region = NULL, $postalCode = NULL, $country = 'USA', $taxRegionId = 0)\r\n\t{\r\n\t\t$this->Line1 = $line1;\r\n\t\t$this->Line2 = $line2;\r\n\t\t$this->Line3 = $line3;\r\n\t\t$this->City = $city;\r\n\t\t$this->Region = $region;\r\n\t\t$this->PostalCode = $postalCode;\r\n\t\t$this->Country = $country;\r\n\t\t$this->TaxRegionId = $taxRegionId;\r\n\t}", "public function __construct(Batch $batch, CollectionPoint $collectionPoint, $csv)\n {\n $this->batch = $batch;\n $this->collectionPoint = $collectionPoint;\n $this->csv = $csv;\n }", "public function loadCSV()\n {\n $parser = new CSVParser($this->file);\n $count = 0;\n foreach ($parser as $row) {\n $this->rows[]= $row;\n $count++;\n if ($count == $this->previewcount) {\n break;\n }\n }\n $firstrow = array_keys($this->rows[0]);\n\n //hack to include first row as a\n array_unshift($this->rows, array_combine($firstrow, $firstrow));\n\n if (count($this->rows) > 0) {\n $this->headings = $firstrow;\n }\n }", "private function import() {\n\t\t\t\n\t\t\t$csv = $this->_file['tmp_name'];\n\t\t\t\n\t\t\t$header = true;\n\t\t\t$handle = fopen($csv,\"r\");\n\t\t\twhile (($data = fgetcsv($handle, 1000, \",\")) !== FALSE) {\n\t\t\t\t// Stores each csv line to an array\n\t\t\t\t// Check if header line\n\t\t\t\tif ( !$header ) {\n\t\t\t\t\t$i=0;\n\t\t\t\t\t$table = $this->getTable($heads[$i]);\n\t\t\t\t\tfor ($i=0; $i < count($data); $i++) {\n\t\t\t\t\t\t$table = $this->getTable($heads[$i]);\n\t\t\t\t\t\t$field = $heads[$i];\n\t\t\t\t\t\tif ($table != '') {\n\t\t\t\t\t\t\tif ($table == 'users-roles') {\n\t\t\t\t\t\t\t\t$user[$table][$heads[$i]] = $data[$i] != 0 ? $this->getRoleID($heads[$i]) : $data[$i];\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$user[$table][$heads[$i]] = $data[$i];\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\tarray_push($this->data, $user);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$heads = $data;\n\t\t\t\t\t$header = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}", "public static function getCSVParser(){\n require_once LIBS_DIR . DS . 'Parsecsv' . DS . 'parsecsv.lib.php';\n return new parseCSV();\n }", "public function __construct($data = array()) {\n\t\ttry {\n\t\t\t// Build Data\n\t\t\tforeach($data as $key => $value) {\n\t\t\t\tif(is_array($value)) {\n\t\t\t\t\t$this->_data[$key] = new self($value);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$this->_data[$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(\\Exception $ex) {\n\t\t\t\\Bedrock\\Common\\Logger::exception($ex);\n\t\t\tthrow new \\Bedrock\\Common\\DataFormat\\Exception('A problem was encountered while attempting to construct a CSV object from the supplied data.');\n\t\t}\n\t}", "public function __construct($params = array())\r\n {\r\n $this->config = array(\r\n 'inputFile' => 'data/hotels.csv',\r\n 'outputFileName' => 'hotels',\r\n 'convertToFormat' => 'all', //'all' as all available formats\r\n //'sortBy' => 'stars'\r\n );\r\n\r\n // Merge passed in params with defaults for config.\r\n $this->config = array_merge($this->config, $params);\r\n\r\n if (!isset($this->config['inputFile'])) {\r\n throw new Exception('FileDataConverter Class missing \"inputFile\" parameter.');\r\n }\r\n\r\n $this->fileReader = new CSVFileReader();\r\n \r\n }", "function __construct($row){\r\n\r\n // Import results from a database row into this particular instance\r\n $this->exp = $row[\"LifeExpectancy\"];\r\n $this->name = $row[\"Name\"];\r\n $this->cap = $row[\"Capital\"];\r\n $this->code = $row[\"Code\"];\r\n $this->govt = $row[\"GovernmentForm\"];\r\n $this->cont = $row[\"Continent\"];\r\n $this->reg = $row[\"Region\"];\r\n $this->head = $row[\"HeadOfState\"];\r\n $this->pop = $row[\"Population\"];\r\n $this->indep = $row[\"IndepYear\"];\r\n\r\n // flags use the country code in lowercase form\r\n $this->code2 = strtolower($row[\"Code2\"]);\r\n $this->flag = 'svg/'.$this->code2.'.svg';\r\n\r\n }", "function parse_csv($content, $has_header = 1, $separator = \",\")\n{\n $lines = explode(\"\\n\", $content);\n $result = array();\n\n # If the CSV file has a header, load up the titles into $headers\n if ($has_header)\n {\n $headcount = 1;\n $header = array_shift($lines);\n foreach (explode($separator,$header) as $heading)\n {\n if (trim($heading) != \"\")\n {\n $headers[$headcount] = trim($heading);\n $headcount++;\n }\n }\n }\n\n # Process every line\n foreach ($lines as $line)\n {\n if ($line != \"\")\n {\n $entrycount = 1;\n foreach (explode($separator,$line) as $entry)\n {\n # If we use header, place the value inside the named array entry\n # Otherwise, just stuff it in numbered fields in the array\n if (trim($entry) != \"\")\n {\n if ($has_header)\n {\n $line_array[$headers[$entrycount]] = trim($entry);\n } else {\n $line_array[] = trim($entry);\n }\n }\n $entrycount++;\n }\n\n # Add resulting line array to final result\n $result[] = $line_array; unset($line_array);\n }\n }\n\n return $result;\n}", "private function parseCSVFile() {\n $file = $this->parameters->getSourceUri();\n drush_print_r(\"Parsing CSV file: $file\");\n $lines = array_map('str_getcsv', file($file));\n drush_print(\"Creating menu import with \" . count($lines) . \" items.\");\n foreach ($lines as $line) {\n $this->menuFileContents .= $this->parseCSVLine($line);\n }\n }", "public function __construct( $row ) {\n\t\t// the (string) cast seems unneccessary, but without it, we were getting SimpleXML objects\n\t\t$this->initial = array(); // store the initial loaded values so we can tell during save what changed\n\t\tforeach( $row as $k => $v ) {\n\t\t\t$this->$k = (string) $v;\n\t\t\t$this->initial[$k] = (string) $v;\n\t\t} // end foreach\n\t}", "public function __construct($row = null)\n {\n // Check if row is an an array, then check to see if array key was set.\n if (is_array($row)) {\n if(array_key_exists('Product Name', $row)) {\n $this->setStrProductName(trim($row['Product Name']));\n }\n if(array_key_exists('Product Description', $row)) {\n $this->setStrProductDesc(trim($row['Product Description']));\n }\n if(array_key_exists('Product Code', $row)) {\n $this->setStrProductCode(trim($row['Product Code']));\n }\n if(array_key_exists('Stock', $row)) {\n $this->setIntStock(trim(trim($row['Stock'])));\n }\n if(array_key_exists('Cost in GBP', $row)) {\n $this->setDecPrice(trim($row['Cost in GBP']));\n }\n if(array_key_exists('Discontinued', $row)) {\n $this->setDtmDiscontinued(trim($row['Discontinued']));\n }\n // If row is not null or an array, we throw an exception\n } elseif (!is_null($row)) {\n throw new Library\\FeedProccessor\\FeedProccessorException('Invalid parameter passed to constructor');\n }\n }", "public function parse($line);", "public function parse($line, &$d01_data, &$data_totals, $CSV_separator = '') {\r\n if ($CSV_separator != '') {\r\n $this->data = str_getcsv($line, $CSV_separator);\r\n $this->data = $this->data[$this->start-1];\r\n } else {\r\n $this->data = substr($line, $this->start-1, $this->size);\r\n }\r\n $this->isParsed = true;\r\n\r\n $this->isInputNull=false;\r\n if ($this->data=='' || $this->data==\"\\x0A\" || $this->data==\"\\x0D\" || $this->data==\"\\x0D\\x0A\") {\r\n $this->data=str_pad($this->data, $this->size, ' ');\r\n $this->isInputNull=true;\r\n }\r\n\r\n if ($this->getD01Field() != '') {\r\n $d01fields = split(',',$this->getD01Field());\r\n if (is_array($d01fields)) {\r\n foreach($d01fields as $d01field) {\r\n $d01_data[$d01field]=$this->data;\r\n if ($this->getConversionType() != '') {\r\n switch($this->getConversionType()) {\r\n case 'AAMMJJ':\r\n $d01_data[$d01field]=substr($this->data,4,2).'/'.substr($this->data,2,2).'/'.substr($this->data,0,2);\r\n break;\r\n case 'CP2DPT':\r\n $d01_data[$d01field]=substr(substr(\"000000\".$this->data,-6),1,2);\r\n break;\r\n case 'AAAAMMJJ':\r\n $d01_data[$d01field]=substr($this->data,6,2).'/'.substr($this->data,4,2).'/'.substr($this->data,2,2);\r\n break;\r\n case 'JJMMAAAA':\r\n $d01_data[$d01field]=substr($this->data,0,6);\r\n break;\r\n case 'TRIM':\r\n $d01_data[$d01field]=trim($this->data);\r\n break;\r\n case 'INTVAL':\r\n $d01_data[$d01field]=intval($this->data);\r\n break;\r\n case 'FLOATVAL':\r\n $d01_data[$d01field]=floatval($this->data);\r\n break;\r\n case 'VOLUMELEBO': // 0082251 = 0,082251 metres cubes => 000000000000008 (D01)\r\n $d01_data[$d01field]=substr('000000000000'.$this->data,0,15);\r\n break;\r\n case 'G2KG': // Grammes vers KG\r\n $d01_data[$d01field]=number_format($this->data/1000,2);\r\n break;\r\n case 'SWCPREST':\r\n switch($this->data) {\r\n case 'RE':\r\n $d01_data[$d01field]='10';\r\n break;\r\n case 'GO':\r\n $d01_data[$d01field]='31';\r\n break;\r\n default:\r\n $d01_data[$d01field]='10';\r\n break;\r\n }\r\n break;\r\n case 'UNM49': // Codes pays numériques selon la norme UN M.49\r\n switch(intval($this->data)) {\r\n case 56:\r\n $d01_data[$d01field]='BE';\r\n break;\r\n case 250:\r\n $d01_data[$d01field]='FR';\r\n break;\r\n case 724:\r\n $d01_data[$d01field]='ES';\r\n break;\r\n case 380:\r\n $d01_data[$d01field]='IT';\r\n break;\r\n case 620:\r\n $d01_data[$d01field]='PT';\r\n break;\r\n case 276:\r\n $d01_data[$d01field]='DE';\r\n break;\r\n default:\r\n $d01_data[$d01field]='FR';\r\n break;\r\n }\r\n break;\r\n default:\r\n throw new Exception('Conversion type \"'.$this->getConversionType().'\" unknown');\r\n break;\r\n }\r\n }\r\n // Adding to total\r\n switch($d01field) {\r\n case 'P0_POIDS':\r\n case 'P0_UNITES_MANUTENTION':\r\n case 'P0_NOMBRE_COLIS':\r\n case 'P0_NOMBRE_PALETTES_EUROPE':\r\n case 'L0_NOMBRE_PALETTES_EUROPE':\r\n case 'L0_NOMBRE_PALETTES_PERDUE':\r\n case 'L0_NOMBRE_PALETTES_DIVERSE':\r\n case 'P0_VOLUME':\r\n $data_totals[$d01field]+=$d01_data[$d01field];\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n }", "public function datasetFromCsvAction()\n {\n $csvFile = realpath($this->getRequest()->getParam('file'));\n $importer = new Dataset();\n $importer->importFromCsv($csvFile);\n }", "function parseToArray($fp, $accountId){\r\n /**\r\n * count Rows of csv\r\n *\r\n * @var int\r\n */\r\n $csvRow = 0;\r\n /**\r\n * is set true, a line contains \";\" , but not the correct number for this parser (5)\r\n *\r\n * @var boolean\r\n */\r\n $noValidFile = NULL;\r\n /**\r\n * is set true, after the header was ignored\r\n *\r\n * @var boolean\r\n */\r\n $headerIgnored = NULL;\r\n //for every line\r\n\r\n /*****\r\n * avoid \" & \\ in the title & description,\r\n * those characters could cause problems\r\n */\r\n function avoid_bad_sign($strings) {\r\n $strings = str_replace(\"\\\"\", \"\", $strings);\r\n $strings = str_replace(\"\\\\\", \"\", $strings);\r\n $strings = str_replace(\"\\n\", \" \",$strings);\r\n return $strings;\r\n }\r\n \r\n while (!feof($fp)) {\r\n\r\n $rowArray = NULL;\r\n \r\n //read one line\r\n $line = fgets($fp, 1024);\r\n\r\n //skip header\r\n if (!$headerIgnored) {\r\n $tmp = strpos($line, HEADER_END_MARKER);\r\n //Need this complex check as the source file is reported to say \"Buchungstag\" and Buchungstag\r\n //(with and without quotes) at random\r\n if ($tmp !== false && $tmp <= 2) {\r\n $headerIgnored = true;\r\n }\r\n continue;\r\n }\r\n\r\n if ( !empty( $line ) && !strpos($line, FOOTER_END_MARKER_A) && !strpos($line, FOOTER_END_MARKER_E)) {\r\n if (substr_count ($line, \";\") == 2 ) {\r\n $description = \"\";\r\n $line1 = 1; //set the first line of dataset\r\n\r\n // divide String to an array\r\n $transactionArray = explode(\";\", $line);\r\n\r\n //format date YY-MM-DD or YYYY-MM-DD\r\n $transactionArray[1] = avoid_bad_sign($transactionArray[1]);\r\n $valutaDate = explode(\".\", $transactionArray[1]); //Valuta Date\r\n $valutaDate[4] = $valutaDate[2] . \"-\" . $valutaDate[1] . \"-\" . $valutaDate[0];\r\n $valutaDate1 = new Date($valutaDate[4]);\r\n\r\n $transactionArray[2] = avoid_bad_sign($transactionArray[2]);\r\n $description .= $transactionArray[2];\r\n\r\n } elseif ($line1 == 1 && !strpos($line,';')){\r\n $transactionArray[3] = avoid_bad_sign($line);\r\n $transactionPartner = $transactionArray[3];\r\n $description .= $transactionArray[3];\r\n ++$line1;\r\n } elseif ($line1 == 2 && !strpos($line,';')){\r\n $description .= avoid_bad_sign($line);\r\n $line1++;\r\n } elseif ($line1 == 3 && !strpos($line,';')){\r\n $description .= avoid_bad_sign($line);\r\n $line1++;\r\n } elseif ($line1 == 4 && !strpos($line,';')){\r\n $description .= avoid_bad_sign($line);\r\n $line1++;\r\n } elseif ($line1 == 5 && !strpos($line,';')){\r\n $description .= avoid_bad_sign($line);\r\n $line1++;\r\n } elseif ($line1 == 6 && !strpos($line,';')){\r\n $description .= avoid_bad_sign($line);\r\n $line1++;\r\n } elseif ($line1 == 7 && !strpos($line,';')){\r\n $description .= avoid_bad_sign($line);\r\n $line1++;\r\n } elseif ($line1 == 8 && !strpos($line,';')){\r\n $description .= avoid_bad_sign($line);\r\n $line1++;\r\n } elseif ($line1 == 9 && !strpos($line,';')){\r\n $description .= avoid_bad_sign($line);\r\n $line1++;\r\n } elseif ($line1 ==10 && !strpos($line,';')){\r\n $description .= avoid_bad_sign($line);\r\n $line1++;\r\n\r\n //if line contains excactly 3 ';', to ensure it is a valid VR-Bank csv file\r\n } elseif (substr_count ($line, \";\")==3){\r\n $line1 = 0;\r\n $transactionArray3 = \"\";\r\n // divide String to an array\r\n $transactionArray3 = explode(\";\", $line);\r\n //avoid \" & \\ in the title & description, those characters could cause problems\r\n $transactionArray3[0] = avoid_bad_sign($transactionArray3[0]);\r\n $description .= $transactionArray3[0];\r\n $transactionArray3[1] = avoid_bad_sign($transactionArray3[1]);\r\n\r\n // inserts the amount\r\n $transactionArray3[2] = avoid_bad_sign($transactionArray3[2]);\r\n $transactionArray3[2] = str_replace(\",\",\".\",$transactionArray3[2]);\r\n\r\n // get the sign for balance: i.e. \"H\" == plus(input); \"S\" == minus(out)\r\n $transactionArray3[3] = str_replace(\"\\\"\",\"\",$transactionArray3[3]);\r\n $transactionArray3[3] = str_replace(\"\\\\\",\"\",$transactionArray3[3]);\r\n\r\n // checks for \"S\" == minus(out) and adds a \"-\"sign\r\n if ($transactionArray3[3] == \"S\\n\") {\r\n $transactionArray3[2] = \"-\".$transactionArray3[2]; //\"-\".\r\n }\r\n }\r\n\r\n /**\r\n * transaction array\r\n *\r\n * @var array\r\n */\r\n if ($line1 == 0) {\r\n $rowArray = array (\r\n \"categoryId\" => \"\",\r\n \"accountId\" => $accountId,\r\n \"title\" => substr($transactionArray[2].$transactionArray[3],0,99),// cut title with more than 100 chars\r\n \"description\" => $description,\r\n \"valutaDate\" => $valutaDate1,\r\n \"amount\" => new Amount($transactionArray3[2]),\r\n \"transactionPartner\" => $transactionPartner\r\n );\r\n }\r\n\r\n // if a row contains valid data\r\n if ($rowArray && $line1 ==0){\r\n /**\r\n * array of all transaction arrays\r\n *\r\n * @var array\r\n */\r\n $importedTransactions[$csvRow] = $rowArray;\r\n $csvRow++;\r\n //print_r ($rowArray);\r\n }\r\n }\r\n }\r\n if ($noValidFile) {\r\n throw new badgerException('importCsv', 'wrongSeperatorNumber');\r\n //close file\r\n fclose ($fp);\r\n } else {\r\n if ($csvRow == 0){\r\n throw new badgerException('importCsv', 'noSeperator');\r\n //close file\r\n fclose ($fp);\r\n } else{\r\n //delete footer (1 line)\r\n unset($importedTransactions[$csvRow-1]);\r\n //close file\r\n fclose ($fp);\r\n return $importedTransactions;\r\n }\r\n }\r\n}", "public function __construct($row) {\n $this->id = $row['id'];\n $this->PH_ID = $row['PH_ID'];\n $this->A_ID = $row['A_ID'];\n $this->coverageStart = $row['coverageStart'];\n $this->coverageStop = $row['coverageStop'];\n $this->policyType = $row['policyType'];\n $this->notes = $row['notes'];\n\n }", "public function __construct($row) {\r\n\t\t$this->id = $row[\"m_id\"];\r\n\t\t$this->u_id = $row[\"u_id\"];\r\n\t\t$this->text = $row[\"m_text\"];\r\n\t\t$this->ts_insert = $row[\"m_ts_insert\"];\r\n\t\t$this->dir = $row[\"m_dir\"];\r\n\t}", "public function testCsvParser() {\n $csv = '橙 daidai,35.64594541953124,139.7080492973328,本日の麺セット,日替り麺・日替り小丼・サラダ・漬物,\"改行のテスト\n正しくパースされるといいな\",,1,,900,\"日替り麺,日本食\",';\n $res = Menu::csvParser($csv);\n $expected = array(\n 'Restaurant' => array(\n 'name' => '橙 daidai',\n ),\n 'RestaurantGeo' => array(\n 'latitude' => '35.64594541953124',\n\t'longitude' => '139.7080492973328',\n ),\n 'Menu' => array(\n 'name' => '本日の麺セット',\n\t'description' => '日替り麺・日替り小丼・サラダ・漬物',\n\t'remarks' => '改行のテスト\n正しくパースされるといいな',\n\t'combo' => false,\n\t'lunch' => true,\n\t'dinner' => false,\n\t'price' => '900',\n\t'tags' => '日替り麺,日本食',\n\t'image' => NULL,\n )\n );\n $this->assertIdentical($res, $expected);\n\n // without latlng\n $csv = '橙 daidai,,,本日の麺セット,日替り麺・日替り小丼・サラダ・漬物,\"改行のテスト\n正しくパースされるといいな\",,1,,900,\"日替り麺,日本食\",';\n $res = Menu::csvParser($csv);\n $expected = array(\n 'Restaurant' => array(\n 'name' => '橙 daidai',\n ),\n 'Menu' => array(\n 'name' => '本日の麺セット',\n\t'description' => '日替り麺・日替り小丼・サラダ・漬物',\n\t'remarks' => '改行のテスト\n正しくパースされるといいな',\n\t'combo' => false,\n\t'lunch' => true,\n\t'dinner' => false,\n\t'price' => '900',\n\t'tags' => '日替り麺,日本食',\n\t'image' => NULL,\n )\n );\n $this->assertIdentical($res, $expected);\n }", "public function insertOne($row)\n {\n if (self::isValidString($row)) {\n $row = str_getcsv((string) $row, $this->delimiter, $this->enclosure, $this->escape);\n }\n if (! is_array($row)) {\n throw new InvalidArgumentException(\n 'the row provided must be an array of a valid string that can be converted into an array'\n );\n }\n $check = array_filter($row, function ($value) {\n return self::isValidString($value);\n });\n if (count($check) == count($row)) {\n $this->csv->fputcsv($row, $this->delimiter, $this->enclosure);\n\n return $this;\n }\n throw new InvalidArgumentException(\n 'the provided data can not be transform into a single CSV data row'\n );\n }", "public function __construct()\n {\n parent::__construct();\n $this->file = config('larex.csv.path');\n }", "#[@test]\n public function readLineDelimitedByCommas() {\n $in= $this->newReader('Timm,Karlsruhe,76137', create(new \\text\\csv\\CsvFormat())->withDelimiter(','));\n $this->assertEquals(array('Timm', 'Karlsruhe', '76137'), $in->read());\n }", "public function import_csv() {\r\n\t\t$raw_file = file_get_contents(\"lol.txt\");\r\n\t\t$rows = preg_split('/\\n/', $raw_file);\r\n\t\t$i = 0;\r\n\t\tforeach ($rows as $row) {\r\n\t\t\t$tokens = preg_split('/,/', $row);\r\n\t\t\t$data[$i] = $tokens[0];\r\n\t\t\t\r\n\t\t\t$i++;\r\n\t\t}\r\n\t\t/*\r\n\t\t<input name=\"data[Part][part_no]\" maxlength=\"11\" type=\"text\" id=\"PartPartNo\"/>\r\n\t\t<input name=\"data[Part][rev]\" maxlength=\"4\" type=\"text\" id=\"PartRev\"/>\r\n\t\t<input name=\"data[Part][class]\" maxlength=\"64\" type=\"text\" id=\"PartClass\"/>\r\n\t\t<input name=\"data[Part][type]\" maxlength=\"64\" type=\"text\" id=\"PartType\"/>\r\n\t\t<textarea name=\"data[Part][description]\" cols=\"30\" rows=\"6\" id=\"PartDescription\"></textarea>\r\n\t\t<input name=\"data[Part][material_type]\" maxlength=\"64\" type=\"text\" id=\"PartMaterialType\"/>\r\n\t\t<input name=\"data[Part][source]\" maxlength=\"64\" type=\"text\" id=\"PartSource\"/>\r\n\t\t<input name=\"data[Part][unit_cost]\" step=\"any\" type=\"number\" id=\"PartUnitCost\"/>\r\n\t\t<textarea name=\"data[Part][note]\" cols=\"30\" rows=\"6\" id=\"PartNote\"></textarea>\r\n\t\t<input name=\"data[Part][package]\" maxlength=\"64\" type=\"text\" id=\"PartPackage\"/>\r\n\t\t<input type=\"hidden\" name=\"data[Part][active]\" id=\"PartActive_\" value=\"0\"/>\r\n\t\t<input type=\"checkbox\" name=\"data[Part][active]\" value=\"1\" id=\"PartActive\"/>\r\n\t\t*/\r\n\t\t$this->set('lols', $data);\r\n\t}", "public function __construct($row)\n {\n $this->username = $row[\"username\"];\n $this->DevTeam = $row[\"development_team\"];\n $this->experience = $row[\"experience\"];\n $this->type = $row[\"type\"];\n }", "public function __construct($string='',$method=self::INIT_STR,$config=null) {\r\n\t\tswitch ($method) {\r\n\r\n\t\t\t//on alimente le csv_str\r\n\t\t\tcase self::INIT_PATH_TO_STR :\r\n\t\t\t\t$string = file_get_contents($string);\r\n\t\t\tcase self::INIT_STR :\r\n\t\t\t\t$this->setStr($string);\r\n\t\t\tbreak;\r\n\r\n\t\t\t//on alimente le csv_path\r\n\t\t\tcase self::INIT_PATH :\r\n\t\t\t\t$this->setPath($string);\r\n\t\t\tbreak;\r\n\r\n\t\t}\r\n\r\n\t\tif ($config) {\r\n\t\t\t$this->setConfig(\r\n\t\t\t\tisset($config[0])? $config[0]:null,\r\n\t\t\t\tisset($config[1])? $config[1]:null,\r\n\t\t\t\tisset($config[2])? $config[2]:null\r\n\t\t\t);\r\n\t\t}\r\n\t}", "public function __construct($filename) {\r\n // verify file exists\r\n if (!file_exists($filename)) {\r\n die(\"[Error] File does not exist: $filename\\n\");\r\n }\r\n\r\n // verify it is a csv file\r\n if (pathinfo($filename, PATHINFO_EXTENSION) != \"csv\") {\r\n die(\"[Error] File is not a csv file: $filename\\n\");\r\n }\r\n\r\n // verify file is not empty\r\n $contents = file_get_contents($filename);\r\n if (empty($contents)) {\r\n die(\"[Error] File is empty: $filename\\n\");\r\n }\r\n\r\n // set filename\r\n $this->filename = $filename;;\r\n }", "protected function newReader($str, \\text\\csv\\CsvFormat $format= null) {\n return new CsvListReader(new \\io\\streams\\TextReader(new MemoryInputStream($str)), $format);\n }", "public function parse(string $line) {\n }", "public function buildFromCSV($csv, array $headers = null): self\n {\n if (\\is_string($csv)) {\n $csv = explode(PHP_EOL, $csv);\n }\n // Ignore empty lines.\n $lines = array_filter(array_map('trim', $csv));\n $rows = array_map('str_getcsv', $lines);\n\n if (null === $headers) {\n $headers = array_shift($rows);\n }\n\n $items = array_map(static function ($values) use ($headers) {\n return array_combine($headers, $values);\n }, $rows);\n\n return $this->buildFromData($items);\n }", "public function __construct()\n\t{\n $this->table = 'penerbangan';\n $this->filename = base_path('/database/seeds/csvs/penerbangan_table.csv');\n $this->offset_rows = 1;\n $this->mapping = [\n 0 => 'id',\n 1 => 'no_penerbangan',\n 2 => 'asal',\n 3 => 'tujuan',\n 4 => 'waktu_berangkat',\n 5 => 'waktu_sampai',\n 6 => 'pesawat_id'\n ];\n $this->should_trim = true;\n\t}", "public function __construct($cadena,$csvCad,$position,$in) {\n\t\t$this -> c = $cadena;\n\t\t$this -> l = strlen($this -> c);\n\t\t$this -> f = 1;\n\t\t$this -> arr = explode(\" \", $this -> c);\n\t\t$this -> dit = array_fill(0, 37, 0);\n\t\t$this -> lDit = 0;\n\t\t\n\t\t$this -> indice = $in;\n\t\t$this -> csv = $csvCad;\n\t\t$this -> pos = $position;\n\n\t\tfor ($i = 0; $i < $this -> l; $i++) {\n\t\t\tif ($this -> c[$i] >= '0' && $this -> c[$i] <= '9') {\n\t\t\t\t$this -> dit[ord($this -> c[$i]) - ord('0')]++;\n\t\t\t\t$this -> lDit++;\n\t\t\t} else if ($this -> c[$i] >= 'a' && $this -> c[$i] <= 'z') {\n\t\t\t\t$this -> dit[ord($this -> c[$i]) - ord('a') + 10]++;\n\t\t\t\t$this -> lDit++;\n\t\t\t} else if ($this -> c[$i] == 'ñ') {\n\t\t\t\t$this -> dit[36]++;\n\t\t\t\t$this -> lDit++;\n\t\t\t}\n\t\t}\n\n\t}", "function __construct($row){\r\n\t\t$this->columns = $row;\r\n\t}", "public function __construct($code) {\n \t$this->code = $code;\n \t$csv = array_map('str_getcsv', file('cart/data/pruducts.csv'));\n\n \t\t$result = [];\n \t\tfor($i = 1; $i < count($csv); $i++){\n \t\t\tfor($j = 0; $j <= count($csv[0])-1; $j++){\n \t\t\t\t$result[$i][$csv[0][$j]] = $csv[$i][$j];\n \t\t\t}\n \t\t}\n \t\tforeach ($result as $key => $value) {\n \t\t\tif($value['Code'] == $code){\n \t\t\t\t$this->name = $value['Product'];\n \t\t\t\t$this->price = floatval(str_replace('$', '', $value['Price']));\n \t\t\t}\n \t\t}\n \t}", "private function parse_Csv( $csv = null ) {\n\t\tif ( $csv === NULL ) {\n\t\t\t$csv = $this->__response;\n\t\t}\n\t\t// output temporary file\n\t\t// its want to use fgetcsv function, \n\t\t// that is safty parsing for csv data.\n\t\t// becausethe the funcion cannot be to use on variables data.\n\t\t$fp = tmpfile();\n\t\t\n\t\t$length = strlen( $csv );\n\t\t\t\n\t\t// write csv data\n\t\tfwrite( $fp, $csv, $length );\n\t\t// rewind the position of a file pointer\n\t\trewind( $fp );\n\t\t\n\t\t// get fields line\n\t\t$fields = fgetcsv( $fp, 0 );\n\t\t\n\t\t$fieldCount = count( $fields );\n\t\t\n\t\t$parsedData = array();\n\t\twhile ( feof( $fp ) == FALSE ) {\n\t\t\t// read line data\n\t\t\t$linedata = fgetcsv( $fp, 0 );\n\t\t\t\n\t\t\tif ( $linedata == NULL || count( $linedata ) == 0 ) continue;\n\t\t\t\n\t\t\t$datas = null; $i = 0;\n\t\t\twhile ( $i < $fieldCount ) {\n\t\t\t\t$datas[$fields[$i]] = $linedata[$i]; $i++;\n\t\t\t}\n\t\t\t$parsedData[] = $datas;\n\t\t}\n\t\treturn $parsedData;\n\t}", "public function initWithContentsOfCSVFile($filePath, $delimiter = ',', $enclosure = '\"', $escape = '\\\\')\n {\n $csvParser = new \\Iresults\\Core\\Parser\\CsvFileParser();\n $csvParserConfiguration = [];\n $numberOfArguments = func_num_args();\n switch (true) {\n /** @noinspection PhpMissingBreakStatementInspection */\n case $numberOfArguments > 3:\n $csvParserConfiguration['escape'] = $escape;\n /** @noinspection PhpMissingBreakStatementInspection */\n case $numberOfArguments > 2:\n $csvParserConfiguration['delimiter'] = $delimiter;\n case $numberOfArguments > 1:\n $csvParserConfiguration['enclosure'] = $enclosure;\n default;\n }\n $csvParser->setConfiguration($csvParserConfiguration);\n\n $this->data = $csvParser->parse($filePath);\n $this->_markAsDirty();\n\n return $this;\n }", "function __construct(){\r\n\t\t\t$this->fileName_comunas = \"files/comunas.csv\";\r\n\t\t\t$this->fileName_zonas = \"files/zonas.csv\";\r\n\t\t}", "public function __construct($file, $delimiter=',')\n {\n try {\n $this->filePointer = fopen($file, 'r');\n $this->delimiter = $delimiter;\n }\n catch (Exception $e) \n{\n throw new Exception('The file \"'.$file.'\" cannot be read.');\n } \n }", "public function __construct($row)\n {\n $this->row = $row;\n }", "function importFromCSV($file_name, $options = []) {\r\n $delimiter\t\t= isset($options[\"Delimiter\"]) ? $options[\"Delimiter\"] : \",\";\r\n $got_header\t\t= isset($options[\"GotHeader\"]) ? $options[\"GotHeader\"] : false;\r\n $skip_columns\t= isset($options[\"SkipColumns\"]) ? $options[\"SkipColumns\"] : array(-1);\r\n $default_serie_name\t= isset($options[\"DefaultSerieName\"]) ? $options[\"DefaultSerieName\"] : \"Serie\";\r\n\r\n $handle = @fopen($file_name,\"r\");\r\n if ($handle) {\r\n $header_parsed = false; \r\n $serie_names = \"\";\r\n \r\n while (!feof($handle)) {\r\n $buffer = fgets($handle, 4096);\r\n $buffer = str_replace(chr(10),\"\",$buffer);\r\n $buffer = str_replace(chr(13),\"\",$buffer);\r\n $values = preg_split(\"/\".$delimiter.\"/\",$buffer);\r\n\r\n if ( $buffer != \"\" ) {\r\n if ( $got_header && !$header_parsed ) {\r\n foreach($values as $key => $name) { \r\n if ( !in_array($key,$skip_columns) ) { \r\n $serie_names[$key] = $name; \r\n } \r\n }\r\n \r\n $header_parsed = true;\r\n } else {\r\n if ($serie_names === \"\" ) { \r\n foreach($values as $key => $name) { \r\n if ( !in_array($key, $skip_columns) ) { \r\n $serie_names[$key] = $default_serie_name.$key; \r\n } \r\n } \r\n }\r\n \r\n foreach($values as $key => $value) { \r\n if ( !in_array($key, $skip_columns) ) { \r\n $this->addPoints($value, $serie_names[$key]); \r\n } \r\n }\r\n }\r\n }\r\n }\r\n fclose($handle);\r\n \r\n }\r\n }", "function transformers_actions_csv_import($csv_text, $delimiter = ',', $skip_first_line = FALSE) {\n $csv = NULL;\n $array = preg_split(\"/\\n/\", $csv_text);\n $j = 0;\n foreach ($array as $i => $line) {\n if ((!$skip_first_line) || ($i >0)) {\n if (!empty($line)) {\n $csv[$j] = preg_split(\"/$delimiter/\", $line);\n $j++;\n }\n }\n }\n return array('csv' => $csv);\n}", "protected abstract function parseLine();", "public function __construct($arguments) {\n parent::__construct($arguments);\n $this->description = t('Import 10 simple nodes from CSV file.');\n\n // Create a map object for tracking the relationships between source rows\n // Only tracking the UUID and the node id relationship.\n // arg 1: Machine Name\n // arg 2: Source Key\n // arg 3: Destination Key\n $this->map = new MigrateSQLMap($this->machineName,\n array(\n 'UUID' => array('type' => 'varchar',\n 'length' => 255,\n 'not null' => TRUE,\n 'description' => 'UUID',\n ),\n ),\n MigrateDestinationNode::getKeySchema()\n );\n\n // Create a MigrateSource object, which manages retrieving the input data.\n $this->source = new MigrateSourceCSV($arguments['source_file'],\n $this->csvcolumns(),\n array(\"header_rows\" => 1),\n $this->fields());\n\n // Add destination to standard basic page content type\n $this->destination = new MigrateDestinationNode('page');\n\n $this->addFieldMapping(NULL, 'UUID')\n ->description('Simple unique id for tracking once imported.');\n $this->addFieldMapping('title', 'Title');\n $this->addFieldMapping('body', 'description-en');\n $this->addFieldMapping('language')\n ->defaultValue('en');\n $this->addFieldMapping(NULL, 'description-fr')\n ->description('Not needed yet.');\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->filePath = storage_path().'/import/discounts.csv';\n }", "public function loadFromCsv($filename)\n {\n if (!is_readable($filename)) {\n throw new \\RuntimeException('File missing ' . $filename);\n }\n $handle = fopen($filename, 'r');\n $this->items = [];\n while(!feof($handle)) {\n $fields = fgetcsv($handle, 0, ';', '\"');\n if (is_array($fields) && $fields[1] !== 'Selective Scan') {\n $this->items[] = new Item($fields);\n }\n }\n fclose($handle);\n }", "public function parse() {\n if (!isset($this->_rows)) {\n $fh = fopen($this->_sourceFile, 'r', false);\n\n // We could not open the file.\n if (!$fh) throw new UnexpectedValueException(\n 'Source file went away. We were looking for '\n . var_export($this->_sourceFile, true)\n );\n\n $this->_rows = array();\n $key = 0;\n\n // Gather the format settings.\n extract($this->_format);\n\n // Fetch the first row to determine the columns.\n $row = fgetCsv($fh, 0, $delimiter, $enclosure, $escape);\n\n // See if we want actual column names or simple column indices.\n if ($this->_fetchColumnNames) {\n $this->_columns = array_values($row);\n $this->_fetchedColumns = true;\n } else {\n $this->_columns = array_keys($row);\n\n // Apparently we shouldn't have fetched the first row yet, although we\n // needed it to determine the column indices.\n // We should rewind.\n rewind($fh);\n }\n\n // Fetch the rows.\n while ($row = fgetcsv($fh, 0, $delimiter, $enclosure, $escape)) {\n // Apply any filters.\n $this->_rows[$key] = $this->_applyFilters(\n $this->_fetchedColumns\n ? array_combine($this->_columns, array_values($row))\n : $row\n );\n\n // Flush empty rows.\n if ($this->_flushOnAfterFilter) $this->_flushEmptyRow($row, $key, true);\n\n // Increment the key.\n $key++;\n }\n\n // Flush the filters.\n $this->flushFilters();\n\n // We won't need the file anymore.\n unset($fh);\n } elseif (empty($this->_filters)) {\n // Nothing to do here.\n // We return now to avoid triggering garbage collection.\n return $this;\n }\n\n if (!empty($this->_filters)) {\n // We explicitely divide the strategies here, since checking this\n // after applying filters on every row makes for a double iteration\n // through $this->flushEmptyRows().\n // We therefore do this while iterating, but array_map cannot supply\n // us with a proper index and therefore the flush would be delayed.\n if ($this->_flushOnAfterFilter) {\n foreach ($this->_rows as $index => &$row) {\n // Apply the filters.\n $row = $this->_applyFilters($row);\n\n // Flush it if it's empty.\n $this->_flushEmptyRow($row, $index);\n }\n } else {\n // Apply our filters.\n $this->_rows = array_map(\n array($this, '_applyFilters'),\n $this->_rows\n );\n }\n\n // Flush the filters.\n $this->flushFilters();\n }\n\n // Do some garbage collection to free memory of garbage we won't use.\n // @see http://php.net/manual/en/function.gc-collect-cycles.php\n if ($this->_garbageCollection) gc_collect_cycles();\n\n return $this;\n }", "function parse_csvtemplate($csv)\n { \n try\n {\n $descriptor = new row_descriptor();\n $line_num = 0;\n while (($row = fgetcsv($csv, 0,\",\", '\"')) !== false)\n {\n $line_num++;\n $bilan_row=[];\n $descriptor = new row_descriptor();\n $consistency=$descriptor->check_consistency($row, $line_num);\n if ($consistency)\n { \n $bilan_row = $descriptor->get_bilan_row();\n $bilan_row['solde'] = $this->get_montant($descriptor->variable_name,$bilan_row['linetype']);\n $this->bilan_table [] =$bilan_row;\n if ($descriptor->flatten){\n foreach ($descriptor->code_ranges as $range)\n {\n $code_left = $range[\"left\"];\n $code_right = $range[\"right\"];\n $leaf_postes = $this->get_range_postes($code_left,$code_right);\n if (! is_null($leaf_postes)){\n $this->bilan_table =array_merge($this->bilan_table,$leaf_postes);\n }\n else {\n }\n }\n }\n else{\n }\n }\n else \n {\n //first line and blank lines are skipped \n }\n }\n }\n catch (Exception $exc) {\n printf(_('Erreur dans le fichier %s ligne %s : %s'),$this->csvfilename,$line_num,$exc->getMessage());\n }\n return;\n }", "static function getFromCsv($content){\r\n\t\t\t$sected = explode(\"\\n\", $content) ;\r\n\r\n\t\t\t/* getting rows(header) name */\r\n\t\t\t$rows = explode(',',trim($sected[0])) ;\r\n\t\t\t/* getting rows number */\r\n\t\t\t$number_rows = count($rows) ;\r\n\t\t\t/* creating lines array to receive all the lines */\r\n\t\t\t$lines = [] ;\r\n\r\n\t\t\t/* extracting datas */\r\n\t\t\tforeach($sected as $id => $val) {\r\n\t\t\t\tif($id && strlen(trim($val))){\r\n\t\t\t\t\t/* getting rows in data line */\r\n\t\t\t\t\t$data_line_rows = explode(',', $val) ;\r\n\t\t\t\t\t/* have this line same rows number as the header ? */\r\n\t\t\t\t\tif(count($data_line_rows)==count($rows)){\r\n\t\t\t\t\t\t/* creating associated array for line with array(col=>value) */\r\n\t\t\t\t\t\t$line = [] ;\r\n\t\t\t\t\t\t/* looping on rows to create associated array */\r\n\t\t\t\t\t\tfor($i=0; $i<count($rows); $i++){\r\n\t\t\t\t\t\t\t/*$line[$rows[$i]] = $data_line_rows[$i] ;*/\r\n\t\t\t\t\t\t\t$line[] = $data_line_rows[$i] ;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/* now adding this line to lines array */\r\n\t\t\t\t\t\t$lines[] = $line ;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tthrow new Exception(\"Le nombre de colones de la ligne \".$id.\" ne correspond pas au nombre de ligne dans l'entête du fichier\", 1);\r\n\t\t\t\t\t\t/*break ;*/\r\n\t\t\t\t\t\treturn false ;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t/* returning the result */\r\n\t\t\treturn $lines ;\r\n\t\t}", "static function get_csv_parser(){\n\t\t\tif(!class_exists('parseCSV')){\n\t\t\t\tinclude WOOBULKDISCOUNTUPLOADER_DIR . 'classes/parsecsv.lib.php';\n\t\t\t}\n\t\t\n\t\t\treturn new parseCSV();\n\t\t}", "public function __construct($type, $contents, $line) {\n $this->contents = $contents;\n $this->type = $type;\n $this->line = $line;\n }", "public function __construct()\n\t{\n\t\t$this->table = 'smarthome';\n\t\t// Filename and location of data in csv file.\t\n\t\t$this->filename = public_path().'/dataset/dataset.csv'; \n\t}", "function import()\r\n\t{\r\n\t\t$fp = fopen($_FILES[\"csv_file\"][\"tmp_name\"], 'r');\r\n\t\r\n\t\tif (fgetcsv($fp) !== FALSE)\r\n\t\t{\r\n\t\t\t$this->loadData($fp);\r\n\t\r\n\t\t\t$this->save();\r\n\t\t\r\n\t\t\t$this->writeLog();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\techo \"<div class='error'>Cannot open data file.</div>\\n\";\r\n\t\t}\r\n\t}", "public function __construct($headers) {\r\n\t\t$lines = explode(\"\\n\", $headers);\r\n\t\t$headers = array();\r\n\t\tforeach($lines as $line) {\r\n\t\t\t$args = explode(':', $line,2);\r\n\t\t\tif(count($args) > 1) {\r\n\t\t\t\t$key = strtolower(trim($args[0]));\r\n\t\t\t\tif(!isset($headers[$key])) {\r\n\t\t\t\t\t$headers[$key] = array();\r\n\t\t\t\t}\r\n\t\t\t\t$values = explode(',', $args[1]);\r\n\t\t\t\t$values = array_map('trim', $values);\r\n\t\t\t\t$headers[$key] = array_merge($headers[$key], $values);\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->headers = $headers;\r\n\t}", "public function setCsv($csv)\n {\n // Verify if the CSV File is Valid\n $this->checkFile($csv);\n\n $this->csv = $csv;\n }", "public function __construct($row)\r\n {\r\n $this->ID = $row['aid'];\r\n if (trim($row['accession number']) != \"\") {\r\n $this->accessionNumber = trim($row['accession number']);\r\n }\r\n if (trim($row['name']) != \"\") {\r\n $this->name = trim($row['name']);\r\n }\r\n if (trim($row['continent']) != \"\") {\r\n $this->continent = trim($row['continent']);\r\n }\r\n if (trim($row['country']) != \"\") {\r\n $this->country = trim($row['country']);\r\n }\r\n if (trim($row['region']) != \"\") {\r\n $this->region = trim($row['region']);\r\n }\r\n if (trim($row['city']) != \"\") {\r\n $this->city = trim($row['city']);\r\n }\r\n if (trim($row['locality']) != \"\") {\r\n $this->locality = trim($row['locality']);\r\n }\r\n if (trim($row['cat1']) != \"\") {\r\n $this->nomenCategory = trim($row['cat1']);\r\n }\r\n if (trim($row['class1']) != \"\") {\r\n $this->nomenClassification = trim($row['class1']);\r\n }\r\n if (trim($row['subclass1']) != \"\") {\r\n $this->nomenSubClassification = trim($row['subclass1']);\r\n }\r\n if (trim($row['nomen2_1']) > 0) {\r\n $this->hasSecondaryNomen = true;\r\n }\r\n if (trim($row['cat2']) != \"\") {\r\n $this->sec_nomenCategory = trim($row['cat2']);\r\n }\r\n if (trim($row['class2']) != \"\") {\r\n $this->sec_nomenClassification = trim($row['class2']);\r\n }\r\n if (trim($row['subclass2']) != \"\") {\r\n $this->sec_nomenSubClassification = trim($row['subclass2']);\r\n }\r\n if (trim($row['period 1']) != \"\") {\r\n $this->period = trim($row['period 1']);\r\n }\r\n if (trim($row['period 3 date']) != \"\") {\r\n $this->periodDate = trim($row['period 3 date']);\r\n }\r\n if (trim($row['visual description']) != \"\") {\r\n $this->visualDescription = trim($row['visual description']);\r\n }\r\n if (trim($row['religion 1']) != \"\") {\r\n $this->religion = trim($row['religion 1']);\r\n }\r\n if (trim($row['culture']) != \"\") {\r\n $this->culture = trim($row['culture']);\r\n }\r\n $this->dimension1 = $row['dimen 1 number'];\r\n $this->dimension2 = $row['dimen 2 number'];\r\n $this->dimension3 = $row['dimen 3 number'];\r\n if (trim($row['dimen 1 type']) != \"\") {\r\n $this->dimensionType1 = trim($row['dimen 1 type']);\r\n }\r\n if (trim($row['dimen 2 type']) != \"\") {\r\n $this->dimensionType2 = trim($row['dimen 2 type']);\r\n }\r\n if (trim($row['dimen 3 type']) != \"\") {\r\n $this->dimensionType3 = trim($row['dimen 3 type']);\r\n }\r\n if (trim($row['materials 2']) != \"\") {\r\n $this->materials = trim($row['materials 2']);\r\n }\r\n if (trim($row['manufacturing processes 2']) != \"\") {\r\n $this->manufacturingProcess = trim($row['manufacturing processes 2']);\r\n }\r\n if (trim($row['measuring remarks']) != \"\") {\r\n $this->measuringRemarks = trim($row['measuring remarks']);\r\n }\r\n $this->weight = $row['weight'];\r\n if (trim($row['munsell color information']) != \"\") {\r\n $this->munsellColorInfo = trim($row['munsell color information']);\r\n }\r\n if (trim($row['reproduction']) != \"\") {\r\n $this->reproduction = trim($row['reproduction']);\r\n }\r\n if (trim($row['reproduction notes']) != \"\") {\r\n $this->reproductionNotes = trim($row['reproduction notes']);\r\n }\r\n if (trim($row['published description']) != \"\") {\r\n $this->publishedDescription = trim($row['published description']);\r\n }\r\n if (trim($row['scholarly notes']) != \"\") {\r\n $this->scholarlyNotes = trim($row['scholarly notes']);\r\n }\r\n if (trim($row['bibliography']) != \"\") {\r\n $this->bibliography = nl2br(trim($row['bibliography']));\r\n }\r\n if (trim($row['comparanda']) != \"\") {\r\n $this->comparanda = nl2br(trim($row['comparanda']));\r\n }\r\n if (trim($row['exhibit label']) != \"\") {\r\n $this->exhibitLabel = trim($row['exhibit label']);\r\n }\r\n if (trim($row['artist']) != \"\") {\r\n $this->artist = trim($row['artist']);\r\n }\r\n if (trim($row['spurlock loc 2']) != \"\") {\r\n $this->location2 = trim($row['spurlock loc 2']);\r\n }\r\n if (trim($row['spurlock loc 3']) != \"\") {\r\n $this->location = trim($row['spurlock loc 3']);\r\n }\r\n if (trim($row['archaeological data']) != \"\") {\r\n $this->archaeologicalData = trim($row['archaeological data']);\r\n }\r\n if (trim($row['credit line']) != \"\") {\r\n $this->creditLine = trim($row['credit line']);\r\n }\r\n if (trim($row['provenance']) != \"\") {\r\n $this->provenance = trim($row['provenance']);\r\n }\r\n if (trim($row['museum dedication']) != \"\") {\r\n $this->museumDedication = trim($row['museum dedication']);\r\n }\r\n if (trim($row['on_display']) != \"\") {\r\n $this->onDisplay = (boolean)trim($row['on_display']);\r\n }\r\n if (trim($row['public description']) != \"\") {\r\n $this->publicDescription = trim($row['public description']);\r\n }\r\n if (trim($row['working set 5 wb']) != \"\") {\r\n $this->workingSet5 = trim($row['working set 5 wb']);\r\n }\r\n if (trim($row['image source']) != \"\") {\r\n $this->imageSource = trim($row['image source']);\r\n }\r\n if (trim($row['cm mec ma']) != \"\") {\r\n $this->CMMecMA = trim($row['cm mec ma']);\r\n }\r\n if (trim($row['webprivate']) != \"\") {\r\n $this->webPrivate = trim($row['webprivate']);\r\n }\r\n $this->viewCount = $row['view_cnt'];\r\n\r\n //If high res images are not suppressed, then find them\r\n if (strpos($this->webPrivate, \"Hi-Res\") === FALSE) {\r\n $this->hiresImages = $this->findODPs();\r\n }\r\n\r\n $this->thumbImage = $this->findThumb();\r\n\r\n if (array_key_exists('relevance', $row)) {\r\n $this->relevance = $row['relevance'];\r\n }\r\n }", "public function test_from_csv($array, $csv)\n\t{\n\t\t$this->assertEquals($array, Format::forge($csv, 'csv')->to_array());\n\n\t}", "public function setCsvLineNo($lineNo)\n {\n $this->csvLineNo = $lineNo;\n }", "function csv_split($line,$delim=',',$removeQuotes=true) {\n\n\t\t$fields = array();\n\t\t$fldCount = 0;\n\t\t$inQuotes = false;\n\t\tfor ($i = 0; $i < strlen($line); $i++) {\n\t\t\tif (!isset($fields[$fldCount])) $fields[$fldCount] = \"\";\n\t\t\t$tmp = substr($line,$i,strlen($delim));\n\t\t\t\n\t\t\tif ($tmp === $delim && !$inQuotes) {\n\t\t\t\t$fldCount++;\n\t\t\t\t$i += strlen($delim)-1;\n\t\t\t}\n\t\t\telse if ($fields[$fldCount] == \"\" && $line[$i] == '\"' && !$inQuotes) {\n\t\t\t\tif (!$removeQuotes) $fields[$fldCount] .= $line[$i];\n\t\t\t\t$inQuotes = true;\n\t\t\t}\n\t\t\telse if ($line[$i] == '\"') {\n\t\t\t\tif ($line[$i+1] == '\"') {\n\t\t\t\t\t$i++;\n\t\t\t\t\t$fields[$fldCount] .= $line[$i];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (!$removeQuotes) $fields[$fldCount] .= $line[$i];\n\t\t\t\t\t$inQuotes = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$fields[$fldCount] .= $line[$i];\n\t\t\t}\n\t\t}\n\t\treturn $fields;\n\t}", "function parseCsvLine($str, $separatorChar = \",\", $enclosureChar = '\"', $escapeChar = \"\\\"\", $simpleMode = false) {\n //$str .= PHP_EOL;\n\n $data = [];\n $currentCellData = '';\n $insideEnclosure = false;\n $justEndedEnclosure = false;\n\n $lengthStr = strlen($str);\n\n $previousCharacter = null;\n\n try {\n\n for($i=0; $i < $lengthStr; $i++) {\n $character = $str[$i];\n/*\n if($justEndedEnclosure && $enclosureChar !== null && ($character !== $separatorChar && $character !== PHP_EOL)) {\n $debugInfo = array(\n 'character' => showWhitespace($character),\n 'position' => $i,\n 'current portion of string: ' => $currentCellData,\n 'full line' => $str,\n );\n throw new \\Exception(\"Malformed delimited line: Expecting separator or end of line, debug data: \" . print_r($debugInfo, true));\n }\n*/\n $isEscape = $character === $escapeChar;\n\n // BND REVISIT empty cell handling \"\"\n\n if($insideEnclosure && $isEscape && $escapeChar === $enclosureChar) {\n if($i >= $lengthStr - 1) {\n $nextCharacter = NULL;\n } else {\n $nextCharacter = $str[$i + 1];\n }\n\n if($nextCharacter === $escapeChar) {\n $currentCellData .= $escapeChar;\n $i += 1;\n continue;\n }\n }\n\n if($insideEnclosure && $isEscape) {\n if($i >= $lengthStr - 1) {\n $nextCharacter = NULL;\n } else {\n $nextCharacter = $str[$i + 1];\n }\n\n if(($escapeChar !== $enclosureChar)\n || (($nextCharacter !== $separatorChar && $nextCharacter !== null && $nextCharacter !== PHP_EOL))\n && ($previousCharacter !== $separatorChar && $previousCharacter !== null && $previousCharacter !== PHP_EOL)) {\n $currentCellData .= $nextCharacter;\n $i += 1;\n continue;\n }\n }\n\n if($character === $separatorChar && !$insideEnclosure) {\n if($simpleMode) {\n $data[] = $currentCellData;\n } else {\n $currentData = [\n \"data\" => $currentCellData,\n \"enclosed\" => $justEndedEnclosure\n ];\n $data[] = $currentData;\n }\n\n $currentCellData = '';\n $justEndedEnclosure = false;\n } else if($character === $enclosureChar && $enclosureChar !== null) {\n if($insideEnclosure) {\n $justEndedEnclosure = true;\n }\n $insideEnclosure = !$insideEnclosure;\n } else {\n $currentCellData .= $character;\n }\n }\n } catch(Exception $e) {\n printMsg(\"parseCsvLine(): Exception processing: \" . print_r($str, true));\n throw $e;\n }\n\n //$data[] = [\"data\" => $currentCellData, \"enclosed\" => $justEndedEnclosure];\n if($simpleMode) {\n $data[] = $currentCellData;\n } else {\n $currentData = [\n \"data\" => $currentCellData,\n \"enclosed\" => $justEndedEnclosure\n ];\n $data[] = $currentData;\n }\n\n return $data;\n}", "public function __construct($column, $row)\n {\n $this->column = $column;\n $this->row = $row;\n }", "public function csvData()\n {\n }", "public function setFromLine(string $line) : self\n\t\t{\n\t\tif (\\strpos($line, '# '))\n\t\t\t{\n\t\t\tthrow new Exception\\LogLine('Not a valid Slow log line: ' . $line);\n\t\t\t}\n\n\t\t// parse the following lines:\n\t\t//\n\t\t// # Time: 2020-12-02T19:08:43.462468Z\n\t\t// # User@Host: root[root] @ localhost [::1] Id: 8\n\t\t// # Query_time: 0.001519 Lock_time: 0.000214 Rows_sent: 0 Rows_examined: 0\n\n\t\t$line = \\trim($line);\n\t\t// special handling for # User@Host: root[root] @ localhost [::1] Id: 8\n\t\tif (\\strpos($line, 'User@Host:'))\n\t\t\t{\n\t\t\t$line = \\str_replace('# User@Host', '# User', $line);\n\t\t\t$line = \\str_replace('@', 'Host:', $line);\n\t\t\t$line = \\str_replace(' [', '[', $line);\n\t\t\t}\n\n\t\t$parts = \\explode(' ', \\substr($line, 2));\n\n\t\twhile (\\count($parts))\n\t\t\t{\n\t\t\t$field = \\trim(\\str_replace(':', '', \\array_shift($parts)));\n\n\t\t\tif (isset($this->fields[$field]))\n\t\t\t\t{\n\t\t\t\tdo\n\t\t\t\t\t{\n\t\t\t\t\t$value = \\trim(\\array_shift($parts));\n\t\t\t\t\t}\n\t\t\t\twhile ('' === $value);\n\t\t\t\t$this->fields[$field] = $value;\n\t\t\t\t}\n\t\t\t}\n\n\t\treturn $this;\n\t\t}", "private function importCSV($csv,$uuid) \n\t{\n\t\t//$EncryptFile = new EncryptFile();\n\t\t//$this->fp = $EncryptFile->fileOpen($csv);\n \n\t\t$this->fp = fopen($csv, 'r');\n\n\t\t//$header = fgetcsv($this->fp);\n\n\t\twhile (($row = fgetcsv($this->fp)) !== FALSE) \n\t\t{\n\t\t\t$command = Yii::app()->db->createCommand(\"\n\t\t\t\tINSERT INTO raw_import(\n\t\t\t\t\n\t\t\t\t\tMASTER_CCR_ID,\n\t\t\t\t\tCCR_ID,\n\t\t\t\t\tCCR_Client_URN,\n\t\t\t\t\tCCR_Source,\n\t\t\t\t\tCCR_Title,\n\t\t\t\t\tCCR_Forename,\n\t\t\t\t\tCCR_Surname,\n\t\t\t\t\tCCR_Address1,\n\t\t\t\t\tCCR_Address2,\n\t\t\t\t\tCCR_Address3,\n\t\t\t\t\tCCR_Address4,\n\t\t\t\t\tCCR_Address5,\n\t\t\t\t\tCCR_Address6,\n\t\t\t\t\tCCR_Town,\n\t\t\t\t\tCCR_County,\n\t\t\t\t\tCCR_DPS,\n\t\t\t\t\tCCR_Postcode,\n\t\t\t\t\tCCR_Country,\n\t\t\t\t\tCCR_Phone1,\n\t\t\t\t\tCCR_Phone2,\n\t\t\t\t\tCCR_Email,\n\t\t\t\t\tCCR_PAF,\n\t\t\t\t\tCCR_Ind_Set,\n\t\t\t\t\tCCR_Ind_Dupe1,\n\t\t\t\t\tCCR_Organisation,\n\t\t\t\t\tCCR_Email_Allow,\n\t\t\t\t\tCleaning_UUID\n\t\t\t\t)\n\t\t\t\t\tVALUES\n\t\t\t\t\n\t\t\t\t(\n\t\t\t\t\t:MASTER_CCR_ID,\n\t\t\t\t\t:CCR_ID,\n\t\t\t\t\t:CCR_Client_URN,\n\t\t\t\t\t:CCR_Source,\n\t\t\t\t\t:CCR_Title,\n\t\t\t\t\t:CCR_Forename,\n\t\t\t\t\t:CCR_Surname,\n\t\t\t\t\t:CCR_Address1,\n\t\t\t\t\t:CCR_Address2,\n\t\t\t\t\t:CCR_Address3,\n\t\t\t\t\t:CCR_Address4,\n\t\t\t\t\t:CCR_Address5,\n\t\t\t\t\t:CCR_Address6,\n\t\t\t\t\t:CCR_Town,\n\t\t\t\t\t:CCR_County,\n\t\t\t\t\t:CCR_DPS,\n\t\t\t\t\t:CCR_Postcode,\n\t\t\t\t\t:CCR_Country,\n\t\t\t\t\t:CCR_Phone1,\n\t\t\t\t\t:CCR_Phone2,\n\t\t\t\t\t:CCR_Email,\n\t\t\t\t\t:CCR_PAF,\n\t\t\t\t\t:CCR_Ind_Set,\n\t\t\t\t\t:CCR_Ind_Dupe1,\n\t\t\t\t\t:CCR_Organisation,\n\t\t\t\t\t:CCR_Email_Allow,\n\t\t\t\t\t:Cleaning_UUID\n\t\t\t\t\t\n\t\t\t\t)\n\t\t\t\t;\n\t\t\t\");\n\t\t\t\n\t\t\t$command->bindValues(array(\n\t\t\t\t':MASTER_CCR_ID'\t=> (int)$row[0],\n\t\t\t\t':CCR_ID'\t\t\t=> (int)$row[1],\n\t\t\t\t':CCR_Client_URN'\t=> strlen($row[2]) ? mb_convert_encoding($row[2], 'UTF-8') : null,\n\t\t\t\t':CCR_Source'\t\t=> (int)$row[3],\n\t\t\t\t':CCR_Title'\t\t=> strlen($row[4]) ? mb_convert_encoding($row[4], 'UTF-8') : null,\n\t\t\t\t':CCR_Forename'\t\t=> strlen($row[5]) ? mb_convert_encoding($row[5], 'UTF-8') : null,\n\t\t\t\t\n\t\t\t\t// Encrypt surname\n\t\t\t\t':CCR_Surname'\t\t=> strlen($row[6]) ? trim(base64_encode(mcrypt_encrypt($this->cipher, $this->key3, mb_convert_encoding($row[6], 'UTF-8'), $this->mode, $this->iv))) : null,\n\t\t\t\t\n\t\t\t\t// encrypt address 1\n\t\t\t\t':CCR_Address1'\t\t=> strlen($row[7]) ? trim(base64_encode(mcrypt_encrypt($this->cipher, $this->key2, mb_convert_encoding($row[7], 'UTF-8'), $this->mode, $this->iv))) : null,\n\t\t\t\t\n\t\t\t\t':CCR_Address2'\t\t=> strlen($row[8]) ? mb_convert_encoding($row[8], 'UTF-8') : null,\n\t\t\t\t':CCR_Address3'\t\t=> strlen($row[9]) ? mb_convert_encoding($row[9], 'UTF-8') : null,\n\t\t\t\t':CCR_Address4'\t\t=> strlen($row[10]) ? mb_convert_encoding($row[10], 'UTF-8') : null,\n\t\t\t\t':CCR_Address5'\t\t=> strlen($row[11]) ? mb_convert_encoding($row[11], 'UTF-8') : null,\n\t\t\t\t':CCR_Address6'\t\t=> strlen($row[12]) ? mb_convert_encoding($row[12], 'UTF-8') : null,\n\t\t\t\t':CCR_Town'\t\t\t=> strlen($row[13]) ? mb_convert_encoding($row[13], 'UTF-8') : null,\n\t\t\t\t':CCR_County'\t\t=> strlen($row[14]) ? mb_convert_encoding($row[14], 'UTF-8') : null,\n\t\t\t\t':CCR_DPS'\t\t\t=> strlen($row[15]) ? mb_convert_encoding($row[15], 'UTF-8') : null,\n\t\t\t\t':CCR_Postcode'\t\t=> strlen($row[16]) ? mb_convert_encoding($row[16], 'UTF-8') : null,\n\t\t\t\t':CCR_Country'\t\t=> strlen($row[17]) ? mb_convert_encoding($row[17], 'UTF-8') : null,\n\t\t\t\t\n\t\t\t\t// encrypt phones\n\t\t\t\t':CCR_Phone1'\t\t=> strlen($row[18]) ? trim(base64_encode(mcrypt_encrypt($this->cipher, $this->key4, (int)preg_replace('@[^0-9]@', '', $row[18]), $this->mode, $this->iv))) : null,\n\t\t\t\t':CCR_Phone2'\t\t=> strlen($row[19]) ? trim(base64_encode(mcrypt_encrypt($this->cipher, $this->key5, (int)preg_replace('@[^0-9]@', '', $row[19]), $this->mode, $this->iv))) : null,\n\t\t\t\t\n\t\t\t\t// encrypt email\n\t\t\t\t':CCR_Email'\t\t=> strlen($row[20]) ? trim(base64_encode(mcrypt_encrypt($this->cipher, $this->key1, strtolower(mb_convert_encoding($row[20], 'UTF-8')), $this->mode, $this->iv))) : null,\n\t\t\t\t\n\t\t\t\t':CCR_PAF'\t\t\t=> strlen($row[21]) ? mb_convert_encoding($row[21], 'UTF-8') : null,\n\t\t\t\t':CCR_Ind_Set'\t\t=> (int)$row[24],\n\t\t\t\t':CCR_Ind_Dupe1'\t=> isset($row[25]) ? mb_convert_encoding($row[25], 'UTF-8') : null,\n\t\t\t\t':CCR_Organisation'\t=> mb_convert_encoding($row[22], 'UTF-8'),\n\t\t\t\t':CCR_Email_Allow'\t=> mb_convert_encoding($row[23], 'UTF-8'),\n\t\t\t\t':Cleaning_UUID' \t=> $uuid,\n\t\t\t));\n\t\t\t\n\t\t\t$command->execute();\n\t\t\t\n\t\t\tunset($command);\n\t\t}\n\t\t\n\t\t/*\n\t\t$dbvars = Yii::app()->params['db'];\n\t\t\n\t\t\n\t\t$db = new PDO($dbvars['connectionString'], $dbvars['username'], $dbvars['password'], array(PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING));\n\n\n\t\tprint 'Importing ' . $csv .\"\\n\\r\";\n\n\t\t//get a row from encrpyted file\n\t\t//$EncryptFile = new EncryptFile();\n\t\t//$this->fp = $EncryptFile->fileOpen($csv);\n \n\t\t$this->fp = fopen($csv, 'r');\n\n\t\t$header = fgetcsv($this->fp); \n\n\t\twhile (($row = fgetcsv($this->fp)) !== FALSE) \n\t\t{ \n\t\t\t\t\t\n\t\t\t$sql = \"INSERT INTO raw_import (MASTER_CCR_ID,CCR_ID,CCR_Client_URN,CCR_Source,CCR_Title,CCR_Forename,CCR_Surname,CCR_Address1,CCR_Address2,CCR_Address3,CCR_Address4,CCR_Address5,CCR_Town,CCR_County,CCR_DPS,CCR_Postcode,CCR_Country,CCR_Phone1,CCR_Phone2,CCR_Email,CCR_PAF,CCR_Ind_Set,CCR_Ind_Dupe1,CCR_Organisation,CCR_Email_Allow,Cleaning_UUID) \n\t\t\t\tvalues ('\".addslashes($row[0]).\"','\".addslashes($row[1]).\"','\".addslashes($row[2]).\"','\".addslashes($row[3]).\"','\".addslashes($row[4]).\"','\".addslashes($row[5]).\"','\".addslashes($row[6]).\"','\".addslashes($row[7]).\"','\".addslashes($row[8]).\"','\".addslashes($row[9]).\"','\".addslashes($row[10]).\"','\".addslashes($row[11]).\"','\".addslashes($row[13]).\"','\".addslashes($row[14]).\"','\".addslashes($row[15]).\"','\".addslashes($row[16]).\"','\".addslashes($row[17]).\"','\".addslashes($row[18]).\"','\".addslashes($row[19]).\"','\".addslashes($row[20]).\"','\".addslashes($row[21]).\"','\".addslashes($row[22]).\"','\".addslashes($row[23]).\"','\".addslashes($row[24]).\"','\".addslashes($row[25]).\"','$uuid')\";\n\t\t\t $result = $db->exec($sql);\n\t\t\t\n\t\t}\n\t\t*/\n\n\t}", "public static function fromString($headerLine)\n {\n $dateHeader = new static();\n\n list($name, $date) = GenericHeader::splitHeaderLine($headerLine);\n\n // check to ensure proper header type for this factory\n if (strtolower($name) !== strtolower($dateHeader->getFieldName())) {\n throw new Exception\\InvalidArgumentException(\n 'Invalid header line for \"' . $dateHeader->getFieldName() . '\" header string'\n );\n }\n\n $dateHeader->setDate($date);\n\n return $dateHeader;\n }", "public function __construct($no, $lineNo)\n {\n $this->no = $no;\n $this->lineNo = $lineNo;\n }", "function _ipeds_import_parse_csv($filepath) {\n $fd = fopen($filepath, \"r\");\n\n while (!feof($fd)) {\n $line = fgets($fd);\n\n if (!isset($file_arr)) {\n $keys_arr = str_getcsv($line, ',', '\"');\n $file_arr = array();\n } else {\n if ( count($keys_arr)!= count(str_getcsv($line, ',', '\"')) ) {\n continue;\n }\n $file_arr[] = array_combine($keys_arr, str_getcsv($line, ',', '\"'));\n }\n }\n fclose($fd);\n\n return _ipeds_import_generate_derrived_fields($file_arr);\n}", "function __construct($data, $deliminator = \",\")\n {\n if (!is_array($data)) {\n throw new Exception('CSV_Writer only accepts data as arrays');\n }\n $this->CI = & get_instance();\n $this->data = $data;\n $this->deliminator = $deliminator;\n }", "public function __construct($delimeter = ',', $enclosure = '\"')\n {\n $this->setDelimeter($delimeter)\n ->setEnclosure($enclosure)\n ;\n }", "public function __construct($file, $delimiter=',')\n {\n try {\n $this->filePointer = fopen($file, 'r');\n $this->delimiter = $delimiter;\n }\n catch (Exception $e) {\n throw new Exception('The file \"'.$file.'\" cannot be read.');\n } \n }", "public function testInstantiationFailInvalidDataHandler()\n {\n new CSV(array(\n 'map' => array(\n 'name' => 0,\n 'surname' => 1,\n ),\n 'handler' => true\n ));\n }", "public function __construct($type, $message, $file, $line)\r\n {\r\n $this->file = $file;\r\n $this->line = $line;\r\n\r\n parent::__construct($message, $type);\r\n }" ]
[ "0.7129038", "0.6851376", "0.66124547", "0.66046387", "0.65774804", "0.64734745", "0.6471622", "0.63801247", "0.6241443", "0.6223903", "0.6218243", "0.61861455", "0.6168321", "0.6128539", "0.6084115", "0.6080921", "0.6069491", "0.60656226", "0.605014", "0.6032591", "0.6004042", "0.5990954", "0.59616053", "0.5953925", "0.5943913", "0.5933509", "0.5912209", "0.59074265", "0.589367", "0.58695775", "0.58627594", "0.5828502", "0.58271796", "0.5821582", "0.5806127", "0.5804529", "0.57991844", "0.578834", "0.57882315", "0.5788093", "0.5780802", "0.57753074", "0.57734287", "0.5772707", "0.57519054", "0.57356113", "0.57353926", "0.5722662", "0.5718902", "0.57005966", "0.5695631", "0.56841755", "0.56802315", "0.56731886", "0.5666978", "0.565123", "0.5637707", "0.563633", "0.563036", "0.56204396", "0.56080335", "0.5606553", "0.5582913", "0.5580438", "0.55771106", "0.55631685", "0.554587", "0.55454195", "0.5542059", "0.5538865", "0.55135465", "0.5512213", "0.55092406", "0.55025274", "0.5488759", "0.5483642", "0.5467331", "0.5460216", "0.54569894", "0.5443836", "0.54362637", "0.5427664", "0.54237473", "0.54018", "0.5398045", "0.5390473", "0.5388393", "0.5384749", "0.53837204", "0.5367775", "0.536543", "0.5357397", "0.5353342", "0.53525424", "0.53513104", "0.53418934", "0.5340721", "0.5339512", "0.53392434", "0.533376" ]
0.7335785
0
Filters the content using JSMIN
Фильтрует содержимое с использованием JSMIN
public function filter($content) {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function filter($content){ }", "abstract protected function _doFilter($content);", "public static function in_content_filter()\n {\n }", "public function filter();", "public function content_filter($in_the_content) ///< The content in need of filtering.\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n $old_content = $in_the_content; // We check to see if we added anything.\n // Simple searches can be mixed in with other content.\n $in_the_content = $this->display_table_search($in_the_content);\n \n $options = $this->getBMLTOptions_by_id($this->my_http_vars['bmlt_settings_id']);\n if (file_exists(dirname(__FILE__).'/themes/'.$options['theme'].'/styles.css') && file_exists(dirname(__FILE__).'/themes/'.$options['theme'].'/nouveau_map_styles.css')) {\n $in_the_content = $this->display_simple_search($in_the_content);\n\n $in_the_content = $this->display_changes($in_the_content);\n \n $in_the_content = $this->display_new_map_search($in_the_content);\n \n $in_the_content = $this->display_bmlt_nouveau($in_the_content);\n \n $in_the_content = $this->display_quicksearch($in_the_content);\n }\n \n // This simply ensures that we remove any unused mobile shortcodes.\n $in_the_content = self::replace_shortcode($in_the_content, 'bmlt_mobile', '');\n \n if ($in_the_content != $old_content) { // If we made changes, we add a wrapper element, so we can have some strong specificity.\n $in_the_content = \"<div id=\\\"bmlt_page_items\\\" class=\\\"bmlt_page_items\\\">$in_the_content</div>\";\n }\n \n return $in_the_content;\n }", "public function filters();", "function filters()\n {\n }", "function filter(&$mag){\r\n\t\t//get content to be filtered\r\n\t\t//get list of 'things' to search for\r\n\t\t//perform some operation,\r\n\t\t\t//types: exec, replace, disabled\r\n\t\t\t//exec just evals php code in place\r\n\t\t\t//replace just performs a simple operation\t\t\t\r\n\t\t$filters = $this->Filter->findAll('Filter.active');\r\n\t\t//id/name/text/type/code/active\r\n\t\tforeach($filters as $filter){\t\t\t\r\n\t\t\t$curr = split($filter['Filter']['text'], $mag['Mag']['content']);\r\n\t\t\t\r\n\t\t\tif(count($curr)>1){\r\n\t\t\t\t//$this is expected to directly modify the mag array however it has to.\r\n\t\t\t\tif($filter['Filter']['type']==\"php\"){\r\n\t\t\t\t\tob_start();\r\n\t\t\t\t\t$out = eval($filter['Filter']['code']);\r\n\t\t\t\t\t$out .=\tob_get_contents();\r\n\t\t\t\t\tob_end_clean();\r\n\t\t\t\t\tif($out != \"\"){\r\n\t\t\t\t\t\t$this->log('Filter output is not clean: '.$out);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}else if($filter['Filter']['type'] == \"text\"){\r\n\t\t\t\t\t//simple replace, for why i dont know.\r\n\t\t\t\t\t$mag['Mag']['content'] = ereg_replace($filter['Filter']['text'],$filter['Filter']['code'],$mag['Mag']['content']);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private function filterContent()\n\t{\n\t\t// Flag to mark if field specific search is done from the search box\n\t\t$filterFieldFound = 0;\n\n\t\t// Flag to mark if any filter is applied or not\n\t\t$filterApplied = 0;\n\n\t\t// Variable to store count of the self joins on the fields_value table\n\t\t$filterFieldsCount = 0;\n\n\t\t// Apply search filter\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true);\n\t\t$query->select('fv1.content_id');\n\t\t$query->from($db->quoteName('#__tjfields_fields_value', 'fv1'));\n\t\t$query->join('INNER', $db->qn('#__tjfields_fields', 'f') . ' ON (' . $db->qn('fv1.field_id') . ' = ' . $db->qn('f.id') . ')');\n\t\t$query->where($db->quoteName('f.state') . ' =1');\n\t\t$query->where($db->quoteName('f.client') . ' = ' . $db->quote($this->client));\n\n\t\t// Filter by field value\n\t\t$search = $this->getState('filter.search');\n\n\t\tif (!empty($this->fields) && (stripos($search, 'id:') !== 0))\n\t\t{\n\t\t\tforeach ($this->fields as $fieldId => $field)\n\t\t\t{\n\t\t\t\t// For field specific search\n\t\t\t\tif (stripos($search, $field . ':') === 0)\n\t\t\t\t{\n\t\t\t\t\t$filterFieldsCount++;\n\n\t\t\t\t\tif ($filterFieldsCount > 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$query->join('LEFT', $db->qn('#__tjfields_fields_value', 'fv' . $filterFieldsCount) . ' ON (' . $db->qn('fv' .\n\t\t\t\t\t\t($filterFieldsCount - 1) . '.content_id') . ' = ' . $db->qn('fv' . $filterFieldsCount . '.content_id') . ')');\n\t\t\t\t\t}\n\n\t\t\t\t\t$search = trim(str_replace($field . ':', '', $search));\n\t\t\t\t\t$query->where($db->qn('fv' . $filterFieldsCount . '.field_id') . ' = ' . $fieldId);\n\t\t\t\t\t$query->where($db->qn('fv' . $filterFieldsCount . '.value') . ' LIKE ' . $db->q('%' . $search . '%'));\n\t\t\t\t\t$filterFieldFound = 1;\n\t\t\t\t\t$filterApplied = 1;\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// For generic search\n\t\tif ($filterFieldFound == 0 && !empty($search) && (stripos($search, 'id:') !== 0))\n\t\t{\n\t\t\t$filterFieldsCount++;\n\n\t\t\tif ($filterFieldsCount > 1)\n\t\t\t{\n\t\t\t\t$query->join('LEFT', $db->qn('#__tjfields_fields_value', 'fv' . $filterFieldsCount) . ' ON (' . $db->qn('fv' .\n\t\t\t\t($filterFieldsCount - 1) . '.content_id') . ' = ' . $db->qn('fv' . $filterFieldsCount . '.content_id') . ')');\n\t\t\t}\n\n\t\t\t$query->where($db->quoteName('fv' . $filterFieldsCount . '.value') . ' LIKE ' . $db->q('%' . $search . '%'));\n\t\t\t$filterApplied = 1;\n\t\t}\n\n\t\t// For filterable fields\n\t\tJLoader::import('components.com_tjfields.models.fields', JPATH_ADMINISTRATOR);\n\t\t$fieldsModel = JModelLegacy::getInstance('Fields', 'TjfieldsModel', array('ignore_request' => true));\n\t\t$fieldsModel->setState('filter.client', $this->client);\n\t\t$fieldsModel->setState('filter.filterable', 1);\n\t\t$fields = $fieldsModel->getItems();\n\n\t\tforeach ($fields as $field)\n\t\t{\n\t\t\t$filterValue = $this->getState('filter.field.' . $field->name);\n\n\t\t\tif ($filterValue != '')\n\t\t\t{\n\t\t\t\t$filterFieldsCount++;\n\n\t\t\t\tif ($filterFieldsCount > 1)\n\t\t\t\t{\n\t\t\t\t\t$query->join('LEFT', $db->qn('#__tjfields_fields_value', 'fv' . $filterFieldsCount) . ' ON (' . $db->qn('fv' .\n\t\t\t\t\t($filterFieldsCount - 1) . '.content_id') . ' = ' . $db->qn('fv' . $filterFieldsCount . '.content_id') . ')');\n\t\t\t\t}\n\n\t\t\t\t$query->where($db->qn('fv' . $filterFieldsCount . '.field_id') . ' = ' . $field->id);\n\t\t\t\t$query->where($db->qn('fv' . $filterFieldsCount . '.value') . ' = ' . $db->q($filterValue));\n\t\t\t\t$filterApplied = 1;\n\t\t\t}\n\t\t}\n\n\t\t$query->order('fv1.content_id DESC');\n\t\t$query->group('fv1.content_id');\n\n\t\t// If there is any filter applied then only execute the query\n\t\tif ($filterApplied)\n\t\t{\n\t\t\t$db->setQuery($query);\n\n\t\t\treturn $db->loadColumn();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public function filter($content)\n {\n return $this->_doFilter($content);\n }", "public function filter()\n {\n \n }", "function _oembed_filter_feed_content($content)\n{\n}", "function ivona_wr_content_filter($content) {\r\n // If rendering RSS or ATOM do nothing \r\n if(is_feed()) return $content;\r\n if(!self::$isLiblaryLoaded){\r\n self::append_wr_script();\r\n }\r\n global $post;\r\n $o = ''; \t\r\n \t$id = $post->ID; \r\n \t\r\n \t\r\n \t$a = self::addPostId($id);\r\n \t// Return regular contnent if is not page or not single \r\n \tif(!$a && !is_single() && !is_page()) return $content;\r\n \t\r\n \t\r\n \t// Modified date\r\n \t$modified = '';\r\n \tif(self::getVar('wr_readModDate','yes')=='yes'){\r\n \t$modified = '<div style=\"display:none\">\r\n \t '.substr($post->post_date,0,-3).'\r\n\r\n\r\n </div>';\r\n \t}\r\n \t\r\n \t// Title\r\n \t$title = '<div style=\"display:none\">'.$post->post_title.'\r\n \r\n \r\n </div>';\r\n \r\n $wr_hiddenLink = '';\r\n \tif( self::getVar('wr_hiddenLink') == 'yes' ){\r\n \t $wr_hiddenLink = '<a href=\"http://www.iwebreader.com\" class=\"'.IVONA_WR_PLAYERINNER_CLASS.'\" style=\"display:none\">iWebReader - Professional Voice Over for Webpages</a>';\r\n \t}\r\n \r\n $wr_marginTop = self::getVar('wr_marginTop',0);\r\n $wr_marginBottom = self::getVar('wr_marginBottom',0);\r\n $alignmentStyle = ( (self::getVar('wr_scrollMode',0)==1) ? 'float:right;':'float:left;');\r\n $playerStyle='margin-top:'.$wr_marginTop.';margin-bottom:'.$wr_marginBottom.';'.$alignmentStyle;\r\n \r\n \r\n \t\r\n \t\r\n \t\r\n \r\n$o .= '\r\n<script type=\"text/javascript\">\r\n<!--//--><![CDATA[//><!-- \r\ntry{\r\nWebreaderAsyncCommands.push(function(){\r\n Webreader.create({ \r\n ';\r\n foreach(self::$config as $k => $v){\r\n $k = substr($k,3,strlen($k));\r\n if(in_array($k,self::$js_options)){\r\n // Replace -1 to 0\r\n // Because not null values are stored in WP DB\r\n $v = ($v==-1?0:$v);\r\n // Print the option\r\n $o .= $k.':\"'.$v.'\",\r\n ';\r\n }else continue;\r\n \r\n }\r\n $o .= 'parentId:\"'.IVONA_WR_CONTAINER_PREFIX.$id.'\",\r\n lang:\"'.self::getVar('lang','en').'\",\r\n soundUrl:escape(\"http://www.ivona.com/online/fileWebRead.php\"+\r\n \"?v=\"+'.self::getVar('voiceID',14/*Kimberly*/).'+';\r\n $o .='\"&dc=\"+\"'.IVONA_WR_READTHIS_PREFIX.$id.'\"+';\r\n // Skip ids\r\n if( is_string(self::getVar('wr_skip_id','')) && strlen(self::getVar('wr_skip_id','')) > 0 ){\r\n $o .='\"&sdi=\"+\"'.self::getVar('wr_skip_id','').'\"+';\r\n }\r\n // Skip classes\r\n if( is_string(self::getVar('wr_skip_class','')) && strlen(self::getVar('wr_skip_class','')) > 0 ){\r\n $o .='\"&sdc=\"+\"'.self::getVar('wr_skip_class','').','.IVONA_WR_PLAYERINNER_CLASS.'\"+';\r\n }else{\r\n $o .='\"&sdc=\"+\"'.IVONA_WR_PLAYERINNER_CLASS.'\"+';\r\n }\r\n $o .= '\"&pv=\"+\"'.self::getVar('wr_speechVolume',100).'\"+\r\n \"&pr=\"+\"'.self::getVar('wr_speechRate',130).'\"+\r\n \"&i=\"+\"'.self::getVar('wr_userID').'\"+\r\n \"&u=\"+escape(document.location.href)) \r\n },'.self::getVar('wr_playerHeight',26).');\r\n \r\n});\r\n}catch(e){}\r\n//--><!]]> \r\n</script>\r\n'; \r\n \r\n \t\r\n \tif( is_string(self::getVar('wr_position',0)) && strlen(self::getVar('wr_position','')) > 0 && 'bottom'==self::getVar('wr_position','') ){\r\n \t \r\n\t $o .= '<div class=\"'.IVONA_WR_READTHIS_PREFIX.$id.'\">'.$title.$modified.$content.'</div>';\r\n \t$o .= '<div style=\"float:left;width:100%\"><div id=\"'.IVONA_WR_CONTAINER_PREFIX.$id.'\" style=\"'.$playerStyle.'\" ></div>'.$wr_hiddenLink.'</div>';\r\n\t }else{\r\n\t $o .= '<div style=\"float:left;width:100%\"><div id=\"'.IVONA_WR_CONTAINER_PREFIX.$id.'\" style=\"'.$playerStyle.'\" ></div>'.$wr_hiddenLink.'</div>';\r\n \t$o .= '<div class=\"'.IVONA_WR_READTHIS_PREFIX.$id.'\" >'.$title.$modified.$content.'</div>';\r\n\t }\r\n \treturn $o;\r\n\r\n }", "public function filterAction()\n {\n // Process only AJAX requests.\n if (!$this->_request->isXmlHttpRequest()) {\n throw new Omeka_Controller_Exception_403;\n }\n \n $db = $this->_helper->db->getDb();\n $joins = array(\"$db->Item AS items ON items.id = locations.item_id\");\n $wheres = array(\"items.public = 1\");\n \n // Filter item type.\n if ($this->_request->getParam('itemType')) {\n $wheres[] = $db->quoteInto(\"items.item_type_id = ?\", $this->_request->getParam('itemType'), Zend_Db::INT_TYPE);\n }\n // Filter map coverage.\n if ($this->_request->getParam('mapCoverage')) {\n $alias = \"map_coverage\";\n $joins[] = \"$db->ElementText AS $alias ON $alias.record_id = items.id AND $alias.record_type = 'Item' \" \n . $db->quoteInto(\"AND $alias.element_id = ?\", self::ELEMENT_ID_MAP_COVERAGE);\n $wheres[] = $db->quoteInto(\"$alias.text = ?\", $this->_request->getParam('mapCoverage'));\n }\n // Filter place types (inclusive).\n if ($this->_request->getParam('placeTypes')) {\n $alias = \"place_types\";\n $joins[] = \"$db->ElementText AS $alias ON $alias.record_id = items.id AND $alias.record_type = 'Item' \" \n . $db->quoteInto(\"AND $alias.element_id = ?\", self::ELEMENT_ID_PLACE_TYPE);\n $placeTypes = array();\n foreach ($this->_request->getParam('placeTypes') as $text) {\n $placeTypes[] = $db->quoteInto(\"$alias.text = ?\", $text);\n }\n $wheres[] = implode(\" OR \", $placeTypes);\n // Filter event types (inclusive).\n } else if ($this->_request->getParam('eventTypes')) {\n $alias = \"event_types\";\n $joins[] = \"$db->ElementText AS $alias ON $alias.record_id = items.id AND $alias.record_type = 'Item' \" \n . $db->quoteInto(\"AND $alias.element_id = ?\", self::ELEMENT_ID_EVENT_TYPE);\n $eventTypes = array();\n foreach ($this->_request->getParam('eventTypes') as $text) {\n $eventTypes[] = $db->quoteInto(\"$alias.text = ?\", $text);\n }\n $wheres[] = implode(\" OR \", $eventTypes);\n }\n \n // Build the SQL.\n $sql = \"SELECT items.id, locations.latitude, locations.longitude\\nFROM $db->Location AS locations\";\n foreach ($joins as $join) {\n $sql .= \"\\nJOIN $join\";\n }\n foreach ($wheres as $key => $where) {\n $sql .= (0 == $key) ? \"\\nWHERE\" : \"\\nAND\";\n $sql .= \" ($where)\";\n }\n $sql .= \"\\nGROUP BY items.id\";\n \n // Build geoJSON: http://www.geojson.org/geojson-spec.html\n $data = array('type' => 'FeatureCollection', 'features' => array());\n foreach ($db->query($sql)->fetchAll() as $row) {\n $data['features'][] = array(\n 'type' => 'Feature', \n 'geometry' => array(\n 'type' => 'Point', \n 'coordinates' => array($row['longitude'], $row['latitude']), \n ), \n 'properties' => array(\n 'id' => $row['id'], \n ), \n );\n }\n $this->_helper->json($data);\n }", "public function kunyomi() {\n\t\t$this->filter('japanese');\n\t}", "function post_filter($content) {\r\n\t\t\tif (preg_match('/\\\\['.$this->tag_name_start.'\\\\](.*?)\\\\[\\\\/'.$this->tag_name_end.'\\\\]/is', $content, $matches)) {\r\n\t\t\t\t################################################################################\n\t\t\t\t### SMS:Key v1.0.6 ###\n\t\t\t\tif (intval($this->key_id) > 200000) {\n\t\t\t\t\tif($this->language == \"\") {\n\t\t\t\t\t\t$this->language = \"english\";\n\t\t\t\t\t}\n\t\t\t\t\tif($this->s_enc == \"\") {\n\t\t\t\t\t\t$this->s_enc=\"UTF-8\";\n\t\t\t\t\t}\n\t\t\t\t\t$old_ua = @ini_set('user_agent', 'smscoin_key_1.0.6');\n\t\t\t\t\t$response = @file(\"http://service.smscoin.com/language/$this->language/key/?s_pure=1&s_enc=$this->s_enc&s_key=\".$this->key_id\n\t\t\t\t\t.\"&s_pair=\".urlencode(substr($_GET[\"s_pair\"],0,10))\n\t\t\t\t\t.\"&s_language=\".urlencode(substr($_GET[\"s_language\"],0,10))\n\t\t\t\t\t.\"&s_ip=\".$_SERVER[\"REMOTE_ADDR\"]\n\t\t\t\t\t.\"&s_url=\".$_SERVER[\"SERVER_NAME\"].htmlentities(urlencode($_SERVER[\"REQUEST_URI\"])));\n\t\t\t\t\t@ini_set('user_agent', $old_ua);\n\t\t\t\t\tif ($response !== false) {\n\t\t\t\t\t\tif (count($response)>1 || $response[0] != 'true') {\n\t\t\t\t\t\t\t$rpl_hidd = implode(\"\", $response);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$rpl_hidd= $matches[1];\n\t\t\t\t\t\t}\n\t\t\t\t\t} else { die('Could not request external server');}\n\t\t\t\t} else {\n\t\t\t\t\t$rpl_hidd = '<div style=\"text-align: left ;\"> Hidden text </div>';\n\t\t\t\t}\n\t\t\t\t# Replase hidden part of the content with relevant text\n\t\t\t\t$content = preg_replace('/\\\\['.$this->tag_name_start.'\\\\].*?\\\\[\\\\/'.$this->tag_name_end.'\\\\]/is', $rpl_hidd, $content);\n\t\t\t\t### SMS:Key end ###\n\t\t\t\t################################################################################\r\n\t\t\t}\r\n\t\t\treturn $content;\r\n\t\t}", "public function display_simple_search($in_content) ///< This is the content to be filtered.\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n $options_id = $this->cms_get_page_settings_id($in_content);\n \n if ($options_id) {\n $options = $this->getBMLTOptions_by_id($options_id);\n $this->adapt_to_lang($options['lang']);\n $root_server_root = $options['root_server'];\n }\n \n if ($root_server_root) {\n while ($params = self::get_shortcode($in_content, 'bmlt_simple')) {\n $param_array = explode('##-##', $params); // You can specify a settings ID, by separating it from the URI parameters with a ##-##.\n \n $params = null;\n \n if (is_array($param_array) && (count($param_array) > 1)) {\n $options = $this->getBMLTOptions_by_id($param_array[0]);\n $this->adapt_to_lang($options['lang']);\n $root_server_root = $options['root_server'];\n }\n \n $params = (count($param_array) > 0) ? '?'.str_replace(array ( '&#038;', '&#038;#038;', '&#038;amp;', '&#038;amp;', '&amp;#038;', '&amp;', '&amp;amp;' ), '&', $param_array[count($param_array)-1]) : null;\n \n $uri = $root_server_root.\"/client_interface/simple/index.php\".$params;\n\n $the_new_content = bmlt_satellite_controller::call_curl($uri);\n $in_content = self::replace_shortcode($in_content, 'bmlt_simple', $the_new_content);\n }\n }\n \n return $in_content;\n }", "public function filter($data);", "function bmab_add_filter_prefilter($content)\n{\n $pattern = '#</ul>\\s*<div class=\\'noFilter\\'>#ms';\n $replacement = '\n <li id=\"filter_added_by\" {if !isset($filter.added_by)}style=\"display:none\"{/if}>\n <a href=\"#\" class=\"removeFilter\" title=\"remove this filter\"><span>[x]</span></a>\n <input type=\"checkbox\" name=\"filter_added_by_use\" class=\"useFilterCheckbox\" {if isset($filter.added_by)}checked=\"checked\"{/if}>\n <p>{\\'Added by %s\\'|@translate|sprintf:\"\"}</p>\n <select name=\"filter_added_by\" size=\"1\">\n {html_options options=$added_by_options selected=$added_by_selected}\n </select>\n </li>\n </ul>\n\n <div class=\"noFilter\">';\n $content = preg_replace($pattern, $replacement, $content);\n\n // then we add the \"Added by\" in the filter selector\n $pattern = '#</div>\\s*<a id=\"removeFilters\"#ms';\n $replacement = '\n <a data-value=\"filter_added_by\" {if isset($filter.added_by)}disabled=\"disabled\"{/if}>{\\'Added by %s\\'|@translate|sprintf:\"\"}</a>\n </div>\n <a id=\"removeFilters\"';\n $content = preg_replace($pattern, $replacement, $content);\n\n // add specific CSS instructions\n $pattern = '#{footer_script}#';\n $replacement = '{combine_css path=\"plugins/batch_manager_added_by/batch_manager.css\"}\n{*\n{if $themeconf.id eq \"roma\"}{combine_css path=\"plugins/batch_manager_added_by/batch_manager_roma.css\"}{/if}\n*}\n\n{footer_script}';\n $content = preg_replace($pattern, $replacement, $content);\n\n return $content;\n}", "function plugin_myContentFilter($content)\r\n {\r\n return substr($content, 0, 300);\r\n }", "public function filter() {\n\t $this->use_layout=false;\n\t if($_POST['filter']) {\n \t\t$conditions = \"\";\n \t if($this->filter_columns) {\n \t foreach($this->filter_columns as $filter) $conditions .= \"OR $filter LIKE '%{$_POST['filter']}%'\";\n \t $conditions = ltrim($conditions, \"OR\");\n }\n $this->model->filter($conditions);\n\t }\n\t $this->all_rows = $this->model->order($this->get_order())->limit($this->list_limit)->all();\n\t\t$this->list = $this->render_partial(\"list\");\n\t}", "public function applyFilter();", "public function filterservicecontentlist(){\n $inputData = Input::all();\n $filter_lang = $inputData['filter_lang'];\n $data['filter'] = 1;\n $data['filter_lang'] = $filter_lang;\n $data['scList'] = AdminServiceContent::getServiceContentList();\n //return \\View::make('admin.filterscontentlist')->with('data', $data);\n $view = \\View::make('admin.filterscontentlist')->with('data', $data);\n\n //if(Request::ajax()) {\n if($inputData){\n $sections = $view->renderSections(); // returns an associative array of 'content', 'head' and 'footer'\n\n return $sections['content']; // this will only return whats in the content section\n\n }\n // just a regular request so return the whole view\n return $view;\n exit;\n }", "public function filter_content()\n\t{\n\t\t$cpts = $this->cpts;\n\n\t\tforeach ( $cpts as $name => $cpt ) {\n\t\t\tif ( isset( $cpt['shortcodable'] ) && true === $cpt['shortcodable'] ) {\n\n\t\t\t\tadd_filter( 'the_content', function ( $the_content ) use ( $name ) {\n\t\t\t\t\tglobal $post;\n\n\t\t\t\t $query = get_posts(\"post_type=$name\"); // Use $name\n\n\t\t\t\t if ( $query ) {\n\t\t\t\t foreach ( $query as $q ) {\n\n\t\t\t\t $options = get_post_meta($q->ID, $name, true);\n\n\t\t\t\t if ( ( $options !== \"\" && isset( $options ) ) && array_key_exists( 'display_to_page', $options ) && array_key_exists( 'shortcode', $options ) && get_the_ID() == $options['display_to_page'] ) {\n\t\t\t\t $the_content .= do_shortcode( $options['shortcode'] );\n\t\t\t\t }\n\n\t\t\t\t }\n\t\t\t\t }\n\n\t\t\t\t return $the_content;\n\t\t\t\t} );\n\n\t\t\t}\n\t\t}\n\t}", "protected function jsFilter() {\n\t\t//echo $jsChars, '<br/>';\n\t\t\n\t\t$js = <<<JSFILTER\n\t\t\nString.prototype.allReplace = function(obj) {\n var retStr = this;\n for (var x in obj) {\n retStr = retStr.replace(new RegExp(x, 'g'), obj[x]);\n }\n return retStr;\n};\t\t\n\t\t\nfunction filter(url,div,fname,preset) {\n\tvar checkedItems = fname ? \n\t\tjQuery('input:checkbox[name='+fname+']:checked').map(\n\t\t\tfunction() { \n\t\t\t\treturn jQuery(this).val().toString().allReplace({'\\'':'_', ',':'~', '\"':'*', '\\[+]':'plus', '/':':', ' ':'-', '-&-':'-n-'});\n\t\t\t\t//return jQuery(this).val().toString().allReplace({ $jsChars }); \n\t\t\t} \n\t\t).get().join(\",\") : (preset ? preset : null);\n\t\n\tajaxCall(url+checkedItems+'/',div,1);\n}\nJSFILTER;\n\n\t\tif ($this->disabledAgentDiv)\n\t\t\t$js .= \"\n/* disabled func */\t\t\nfunction agentDiv(n, px) { return false; }\t\t\n\";\n\n\t\treturn ($js);\n\t}", "public function display_bmlt_nouveau($in_content) ///< This is the content to be filtered.\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n $theshortcode = 'bmlt';\n \n $options_id = $this->cms_get_page_settings_id($in_content);\n\n $in_content = str_replace(array ( '&#038;', '&#038;#038;', '&#038;amp;', '&amp;#038;', '&amp;', '&amp;amp;' ), '&', $in_content); // This stupid kludge is because WordPress does an untoward substitution. Won't do anything unless WordPress has been naughty.\n \n $first = true;\n\n while ($params = self::get_shortcode($in_content, $theshortcode)) {\n if ($params !== true && intval($params)) {\n $options_id = intval($params);\n }\n \n $options = $this->getBMLTOptions_by_id($options_id);\n\n $this->adapt_to_lang($options['lang']);\n $uid = htmlspecialchars('bmlt_nouveau_'.uniqid());\n \n $the_new_content = '<noscript>'.$this->process_text($this->my_current_language->local_noscript).'</noscript>'; // We let non-JS browsers know that this won't work for them.\n \n if ($first) { // We only load this the first time.\n // These are the basic global JavaScript properties.\n $the_new_content .= $this->BMLTPlugin_nouveau_map_search_global_javascript_stuff($options_id);\n // Most of the display is built in DOM, but this is how we get our localized strings into JS. We put them in globals.\n $the_new_content .= '<script type=\"text/javascript\">' . (defined('_DEBUG_MODE_') ? \"\\n\" : '');\n $the_new_content .= \"var g_NouveauMapSearch_advanced_name_string ='\".$this->process_text($this->my_current_language->local_nouveau_advanced_button).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_NouveauMapSearch_map_name_string ='\".$this->process_text($this->my_current_language->local_nouveau_map_button).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_NouveauMapSearch_text_name_string ='\".$this->process_text($this->my_current_language->local_nouveau_text_button).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_text_go_button_string ='\".$this->process_text($this->my_current_language->local_nouveau_text_go_button).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_text_location_label_text ='\".$this->process_text($this->my_current_language->local_nouveau_text_location_label_text).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_text_item_default_text ='\".$this->process_text($this->my_current_language->local_nouveau_text_item_default_text).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_advanced_weekdays_disclosure_text ='\".$this->process_text($this->my_current_language->local_nouveau_advanced_weekdays_disclosure_text).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_advanced_formats_disclosure_text ='\".$this->process_text($this->my_current_language->local_nouveau_advanced_formats_disclosure_text).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_advanced_service_bodies_disclosure_text ='\".$this->process_text($this->my_current_language->local_nouveau_advanced_service_bodies_disclosure_text).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_no_search_results_text ='\".$this->process_text($this->my_current_language->local_nouveau_cant_find_meetings_display).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_cant_lookup_display ='\".$this->process_text($this->my_current_language->local_nouveau_cant_lookup_display).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_select_search_spec_text ='\".$this->process_text($this->my_current_language->local_nouveau_select_search_spec_text).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_select_search_results_text ='\".$this->process_text($this->my_current_language->local_nouveau_select_search_results_text).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_display_map_results_text ='\".$this->process_text($this->my_current_language->local_nouveau_display_map_results_text).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_display_list_results_text ='\".$this->process_text($this->my_current_language->local_nouveau_display_list_results_text).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n \n $the_new_content .= \"var g_Nouveau_location_services_set_my_location_advanced_button ='\".$this->process_text($this->my_current_language->local_nouveau_location_services_set_my_location_advanced_button).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_services_find_all_meetings_nearby_button ='\".$this->process_text($this->my_current_language->local_nouveau_location_services_find_all_meetings_nearby_button).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_services_find_all_meetings_nearby_later_today_button ='\".$this->process_text($this->my_current_language->local_nouveau_location_services_find_all_meetings_nearby_later_today_button).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_services_find_all_meetings_nearby_tomorrow_button ='\".$this->process_text($this->my_current_language->local_nouveau_location_services_find_all_meetings_nearby_tomorrow_button).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n\n $the_new_content .= \"var g_Nouveau_meeting_results_count_sprintf_format ='\".$this->my_current_language->local_nouveau_meeting_results_count_sprintf_format.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_meeting_results_selection_count_sprintf_format ='\".$this->my_current_language->local_nouveau_meeting_results_selection_count_sprintf_format.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_meeting_results_single_selection_count_sprintf_format ='\".$this->my_current_language->local_nouveau_meeting_results_single_selection_count_sprintf_format.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_single_time_sprintf_format ='\".$this->my_current_language->local_nouveau_single_time_sprintf_format.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n \n $the_new_content .= \"var g_Nouveau_location_sprintf_format_loc_street_info = '\".$this->my_current_language->local_nouveau_location_sprintf_format_loc_street_info.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_loc_street = '\".$this->my_current_language->local_nouveau_location_sprintf_format_loc_street.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_street_info = '\".$this->my_current_language->local_nouveau_location_sprintf_format_street_info.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_loc_info = '\".$this->my_current_language->local_nouveau_location_sprintf_format_loc_info.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_street = '\".$this->my_current_language->local_nouveau_location_sprintf_format_street.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_loc = '\".$this->my_current_language->local_nouveau_location_sprintf_format_loc.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_loc_street_info_town_province_zip = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_loc_street_info_town_province_zip.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_loc_street_town_province_zip = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_loc_street_town_province_zip.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_street_info_town_province_zip = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_street_info_town_province_zip.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_loc_info_town_province_zip = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_loc_info_town_province_zip.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_street_town_province_zip = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_street_town_province_zip.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_loc_town_province_zip = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_loc_town_province_zip.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_loc_street_info_town_province = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_loc_street_info_town_province.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_loc_street_town_province = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_loc_street_town_province.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_street_info_town_province = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_street_info_town_province.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_loc_info_town_province = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_loc_info_town_province.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_street_town_province = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_street_town_province.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_loc_town_province = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_loc_town_province.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_loc_street_info_town_zip = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_loc_street_info_town_zip.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_loc_street_town_zip = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_loc_street_town_zip.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_street_info_town_zip = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_street_info_town_zip.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_loc_info_town_zip = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_loc_info_town_zip.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_street_town_zip = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_street_town_zip.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_loc_town_zip = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_loc_town_zip.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_loc_street_info_province_zip = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_loc_street_info_province_zip.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_loc_street_province_zip = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_loc_street_province_zip.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_street_info_province_zip = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_street_info_province_zip.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_loc_info_province_zip = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_loc_info_province_zip.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_street_province_zip = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_street_province_zip.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_loc_province_zip = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_loc_province_zip.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_loc_street_info_province = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_loc_street_info_province.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_loc_street_province = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_loc_street_province.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_street_info_province = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_street_info_province.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_loc_info_province = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_loc_info_province.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_street_province = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_street_province.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_loc_province = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_loc_province.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_loc_street_info_zip = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_loc_street_info_zip.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_loc_street_zip = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_loc_street_zip.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_street_info_zip = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_street_info_zip.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_loc_info_zip = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_loc_info_zip.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_street_zip = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_street_zip.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_loc_zip = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_loc_zip.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_loc_street_info = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_loc_street_info.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_loc_street = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_loc_street.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_street_info = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_street_info.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_loc_info = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_loc_info.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_street = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_street.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_single_loc = '\".$this->my_current_language->local_nouveau_location_sprintf_format_single_loc.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_wtf ='\".$this->process_text($this->my_current_language->local_nouveau_location_sprintf_format_wtf).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n\n $the_new_content .= \"var g_Nouveau_time_sprintf_format = '\".$this->my_current_language->local_nouveau_time_sprintf_format.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_am ='\".$this->process_text($this->my_current_language->local_nouveau_am).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_pm ='\".$this->process_text($this->my_current_language->local_nouveau_pm).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_noon ='\".$this->process_text($this->my_current_language->local_nouveau_noon).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_midnight ='\".$this->process_text($this->my_current_language->local_nouveau_midnight).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_advanced_map_radius_label_1 ='\".$this->process_text($this->my_current_language->local_nouveau_advanced_map_radius_label_1).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_advanced_map_radius_label_2 ='\".$this->process_text($this->my_current_language->local_nouveau_advanced_map_radius_label_2).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_advanced_map_radius_value_2_km ='\".$this->process_text($this->my_current_language->local_nouveau_advanced_map_radius_value_km).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_advanced_map_radius_value_2_mi ='\".$this->process_text($this->my_current_language->local_nouveau_advanced_map_radius_value_mi).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_advanced_map_radius_value_auto ='\".$this->process_text($this->my_current_language->local_nouveau_advanced_map_radius_value_auto).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_advanced_map_radius_value_array = [ \".$this->my_current_language->local_nouveau_advanced_map_radius_value_array.\" ];\";\n $the_new_content .= \"var g_Nouveau_meeting_details_link_title = '\".$this->process_text($this->my_current_language->local_nouveau_meeting_details_link_title).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_meeting_details_map_link_uri_format = '\".htmlspecialchars($this->my_current_language->local_nouveau_meeting_details_map_link_uri_format).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_meeting_details_map_link_text = '\".$this->process_text($this->my_current_language->local_nouveau_meeting_details_map_link_text).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_array_keys = {\";\n $first = true;\n foreach ($this->my_current_language->local_nouveau_prompt_array as $key => $value) {\n if (!$first) {\n $the_new_content .= ',';\n }\n $first = false;\n $the_new_content .= '\"'.$key.'\":';\n $the_new_content .= '\"'.$this->process_text($value).'\"';\n }\n $the_new_content .= \"};\";\n $the_new_content .= 'var g_Nouveau_military_time = '.((isset($options['military_time']) && $options['military_time']) ? 'true' : 'false' ).';';\n $the_new_content .= 'var g_Nouveau_start_week = '.((isset($options['startWeekday']) && $options['startWeekday']) ? $options['startWeekday'] : self::$default_startWeekday ).';';\n $the_new_content .= 'var g_Nouveau_array_header_text = new Array ( \"'.join('\",\"', $this->my_current_language->local_nouveau_table_header_array).'\");';\n $the_new_content .= 'var g_Nouveau_weekday_long_array = new Array ( \"'.join('\",\"', $this->my_current_language->local_nouveau_weekday_long_array).'\");';\n $the_new_content .= 'var g_Nouveau_weekday_short_array = new Array ( \"'.join('\",\"', $this->my_current_language->local_nouveau_weekday_short_array).'\");';\n $the_new_content .= \"var g_Nouveau_lookup_location_failed = '\".$this->process_text($this->my_current_language->local_nouveau_lookup_location_failed).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_lookup_location_server_error = '\".$this->process_text($this->my_current_language->local_nouveau_lookup_location_server_error).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_default_geo_width = \".$options['default_geo_width'].\";\";\n $the_new_content .= \"var g_Nouveau_default_details_map_zoom = \".self::$default_details_map_zoom.';';\n $the_new_content .= \"var g_Nouveau_default_marker_aggregation_threshold_in_pixels = 8;\";\n\n $the_new_content .= \"var g_Nouveau_single_formats_label = '\".$this->process_text($this->my_current_language->local_nouveau_single_formats_label).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_single_service_body_label = '\".$this->process_text($this->my_current_language->local_nouveau_single_service_body_label).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n \n $the_new_content .= \"var g_Nouveau_user_logged_in = '\".((isset($this->m_is_logged_in_user) && $this->m_is_logged_in_user) ? \"true\" : \"false\" ).(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_default_duration = '\".self::$default_duration.\"';\";\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_duration_title = '\".$this->my_current_language->local_nouveau_location_sprintf_format_duration_title.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_duration_hour_only_title = '\".$this->my_current_language->local_nouveau_location_sprintf_format_duration_hour_only_title.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_duration_hour_only_and_minutes_title = '\".$this->my_current_language->local_nouveau_location_sprintf_format_duration_hour_only_and_minutes_title.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_location_sprintf_format_duration_hours_only_title = '\".$this->my_current_language->local_nouveau_location_sprintf_format_duration_hours_only_title.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_single_duration_sprintf_format_1_hr ='\".$this->my_current_language->local_nouveau_single_duration_sprintf_format_1_hr.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_single_duration_sprintf_format_mins ='\".$this->my_current_language->local_nouveau_single_duration_sprintf_format_mins.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_single_duration_sprintf_format_hrs ='\".$this->my_current_language->local_nouveau_single_duration_sprintf_format_hrs.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_single_duration_sprintf_format_hr_mins ='\".$this->my_current_language->local_nouveau_single_duration_sprintf_format_hr_mins.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n $the_new_content .= \"var g_Nouveau_single_duration_sprintf_format_hrs_mins ='\".$this->my_current_language->local_nouveau_single_duration_sprintf_format_hrs_mins.(defined('_DEBUG_MODE_') ? \"';\\n\" : \"';\");\n \n $the_new_content .= '</script>';\n $first = false;\n }\n \n $in_options_id = $options['id'];\n \n if (defined('_DEBUG_MODE_')) {\n $the_new_content .= \"\\n\"; // These just make the code easier to look at.\n }\n // This is the overall container div.\n $the_new_content .= '<div id=\"'.$uid.'_container\" class=\"bmlt_nouveau_container\">';\n $single_meeting_id = isset($this->my_http_vars['single_meeting_id']) ? intval($this->my_http_vars['single_meeting_id']) : 0;\n // What we do here, is tell the client to create a global variable (in JS DOM), with a unique handler for this instance of the Nouveau search.\n $the_new_content .= '<script type=\"text/javascript\">' . (defined('_DEBUG_MODE_') ? \"\\n\" : '').'var g_instance_'.$uid.'_js_handler = new NouveauMapSearch ( \\''.$uid.'\\', \\''\n .$options['bmlt_initial_view'].'\\','\n .$options['map_center_latitude'].\",\"\n .$options['map_center_longitude'].\",\"\n .$options['map_zoom'].\",'\"\n .$options['distance_units'].\"','\"\n .$this->get_plugin_path().\"themes/\".$options['theme'].\"','\"\n .htmlspecialchars($this->get_ajax_base_uri()).\"?bmlt_settings_id=$in_options_id&redirect_ajax_json=', '', \".($options['bmlt_location_checked'] ? 'true' : 'false').\", \"\n .($options['bmlt_location_services'] == 0 || ($options['bmlt_location_services'] == 1 && BMLTPlugin_weAreMobile($this->my_http_vars)) ? 'true' : 'false').\", \"\n .$single_meeting_id.\", \"\n .$options['grace_period'].\");\" . (defined('_DEBUG_MODE_') ? \"\\n\" : '').\"</script>\";\n $the_new_content .= '</div>';\n\n $in_content = self::replace_shortcode($in_content, $theshortcode, $the_new_content);\n }\n \n return $in_content;\n }", "public function display_new_map_search($in_content) ///< This is the content to be filtered.\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n $options_id = $this->cms_get_page_settings_id($in_content);\n\n $in_content = str_replace(array ( '&#038;', '&#038;#038;', '&#038;amp;', '&amp;#038;', '&amp;', '&amp;amp;' ), '&', $in_content); // This stupid kludge is because WordPress does an untoward substitution. Won't do anything unless WordPress has been naughty.\n \n $first = true;\n\n while ($params = self::get_shortcode($in_content, 'bmlt_map')) {\n if ($params !== true && intval($params)) {\n $options_id = intval($params);\n }\n \n $options = $this->getBMLTOptions_by_id($options_id);\n $this->adapt_to_lang($options['lang']);\n $uid = htmlspecialchars('BMLTuid_'.uniqid());\n \n $the_new_content = '<noscript>'.$this->process_text($this->my_current_language->local_noscript).'</noscript>'; // We let non-JS browsers know that this won't work for them.\n \n if ($first) { // We only load this the first time.\n $the_new_content .= $this->BMLTPlugin_map_search_global_javascript_stuff($options_id);\n $first = false;\n }\n\n $the_new_content .= '<div class=\"bmlt_map_container_div bmlt_map_container_div_theme_'.htmlspecialchars($options['theme']).'\" style=\"display:none\" id=\"'.$uid.'\">'; // This starts off hidden, and is revealed by JS.\n $the_new_content .= '<div class=\"bmlt_map_container_div_header\">'; // This allows a CSS \"hook.\"\n $the_new_content .= $this->BMLTPlugin_map_search_location_options($options_id, $uid); // This is the box of location search choices.\n $the_new_content .= $this->BMLTPlugin_map_search_search_options($options_id, $uid); // This is the box of basic search choices.\n $the_new_content .= $this->BMLTPlugin_map_search_local_javascript_stuff($options_id, $uid);\n $the_new_content .= '</div>';\n $the_new_content .= '<div class=\"bmlt_search_map_div\" id=\"'.$uid.'_bmlt_search_map_div\"></div>';\n $the_new_content .= '<script type=\"text/javascript\">var g_military_time = '.($options['military_time'] ? 'true' : 'false' ).';g_no_meetings_found=\"'.htmlspecialchars($this->my_current_language->local_cant_find_meetings_display).'\";document.getElementById(\\''.$uid.'\\').style.display=\\'block\\';c_ms_'.$uid.' = new MapSearch ( \\''.htmlspecialchars($uid).'\\',\\''.htmlspecialchars($options_id).'\\', document.getElementById(\\''.$uid.'_bmlt_search_map_div\\'), {\\'latitude\\':'.$options['map_center_latitude'].',\\'longitude\\':'.$options['map_center_longitude'].',\\'zoom\\':'.$options['map_zoom'].'} );var g_Nouveau_start_week = '.((isset($options['startWeekday']) && $options['startWeekday']) ? $options['startWeekday'] : self::$default_startWeekday ).';</script>';\n $the_new_content .= '</div>';\n \n $in_content = self::replace_shortcode($in_content, 'bmlt_map', $the_new_content);\n }\n \n return $in_content;\n }", "function filterJadwal(){\n\t\t$res = $this->LogistikTransModel->getFilterKodeDetailKursus($_GET['q']);\n\t\techo json_encode($res);\n\t}", "public static function filterText($text)\n {\n // Filter settings\n $config = JComponentHelper::getParams('com_config');\n $user = JFactory::getUser();\n $userGroups = JAccess::getGroupsByUser($user->get('id'));\n\n $filters = $config->get('filters');\n\n $blackListTags = array();\n $blackListAttributes = array();\n\n $customListTags = array();\n $customListAttributes = array();\n\n $whiteListTags = array();\n $whiteListAttributes = array();\n\n $noHtml = false;\n $whiteList = false;\n $blackList = false;\n $customList = false;\n $unfiltered = false;\n\n // Cycle through each of the user groups the user is in.\n // Remember they are included in the Public group as well.\n foreach ($userGroups as $groupId)\n {\n // May have added a group but not saved the filters.\n if (!isset($filters->$groupId)) {\n continue;\n }\n\n // Each group the user is in could have different filtering properties.\n $filterData = $filters->$groupId;\n $filterType = strtoupper($filterData->filter_type);\n\n if ($filterType == 'NH') {\n // Maximum HTML filtering.\n $noHtml = true;\n }\n elseif ($filterType == 'NONE') {\n // No HTML filtering.\n $unfiltered = true;\n }\n else {\n // Black, white or custom list.\n // Preprocess the tags and attributes.\n $tags = explode(',', $filterData->filter_tags);\n $attributes = explode(',', $filterData->filter_attributes);\n $tempTags = array();\n $tempAttributes = array();\n\n foreach ($tags as $tag)\n {\n $tag = trim($tag);\n\n if ($tag) {\n $tempTags[] = $tag;\n }\n }\n\n foreach ($attributes as $attribute)\n {\n $attribute = trim($attribute);\n\n if ($attribute) {\n $tempAttributes[] = $attribute;\n }\n }\n\n // Collect the black or white list tags and attributes.\n // Each lists is cummulative.\n if ($filterType == 'BL') {\n $blackList = true;\n $blackListTags = array_merge($blackListTags, $tempTags);\n $blackListAttributes = array_merge($blackListAttributes, $tempAttributes);\n }\n elseif ($filterType == 'CBL') {\n // Only set to true if Tags or Attributes were added\n if ($tempTags || $tempAttributes) {\n $customList = true;\n $customListTags = array_merge($customListTags, $tempTags);\n $customListAttributes = array_merge($customListAttributes, $tempAttributes);\n }\n }\n elseif ($filterType == 'WL') {\n $whiteList = true;\n $whiteListTags = array_merge($whiteListTags, $tempTags);\n $whiteListAttributes = array_merge($whiteListAttributes, $tempAttributes);\n }\n }\n }\n\n // Remove duplicates before processing (because the black list uses both sets of arrays).\n $blackListTags = array_unique($blackListTags);\n $blackListAttributes = array_unique($blackListAttributes);\n $customListTags = array_unique($customListTags);\n $customListAttributes = array_unique($customListAttributes);\n $whiteListTags = array_unique($whiteListTags);\n $whiteListAttributes = array_unique($whiteListAttributes);\n\n // Unfiltered assumes first priority.\n if ($unfiltered) {\n // Dont apply filtering.\n }\n else {\n // Custom blacklist precedes Default blacklist\n if ($customList) {\n $filter = JFilterInput::getInstance(array(), array(), 1, 1);\n\n // Override filter's default blacklist tags and attributes\n if ($customListTags) {\n $filter->tagBlacklist = $customListTags;\n }\n if ($customListAttributes) {\n $filter->attrBlacklist = $customListAttributes;\n }\n }\n // Black lists take third precedence.\n elseif ($blackList) {\n // Remove the white-listed attributes from the black-list.\n $filter = JFilterInput::getInstance(\n array_diff($blackListTags, $whiteListTags), // blacklisted tags\n array_diff($blackListAttributes, $whiteListAttributes), // blacklisted attributes\n 1, // blacklist tags\n 1 // blacklist attributes\n );\n // Remove white listed tags from filter's default blacklist\n if ($whiteListTags) {\n $filter->tagBlacklist = array_diff($filter->tagBlacklist, $whiteListTags);\n }\n // Remove white listed attributes from filter's default blacklist\n if ($whiteListAttributes) {\n $filter->attrBlacklist = array_diff($filter->attrBlacklist);\n }\n\n }\n // White lists take fourth precedence.\n elseif ($whiteList) {\n $filter = JFilterInput::getInstance($whiteListTags, $whiteListAttributes, 0, 0, 0); // turn off xss auto clean\n }\n // No HTML takes last place.\n else {\n $filter = JFilterInput::getInstance();\n }\n\n $text = $filter->clean($text, 'html');\n }\n\n return $text;\n }", "public function onyomi() {\n\t\t$this->filter('chinese');\n\t}", "public function wrapFilter() {\n if ( func_num_args() < 1 ){\n return false;\n }\n\n // The first argument is the entry that is automatically passed.\n $html = func_get_arg(0);\n\n // Return false is no MTML is passed\n if ( empty($html) ){\n return false;\n }\n\n // Remove the first argument and set the argumetns array\n $arguments = array_slice(func_get_args(), 1);\n\n // Blanks settings\n $elements = null;\n $class = null;\n $data = null;\n $count = null;\n $first = false;\n $openers = array();\n $closers = array();\n\n if ( !empty($arguments) ) {\n\n // Loop through to see if there are any numeric values. If so, assume this is a count\n foreach ($arguments as &$setting) {\n if (is_numeric($setting) && is_null($count) ) {\n $count = $setting;\n }\n }\n // Check if any strings in the arguments contain the %i query and replace with the count\n if (!is_null($count)) {\n // print_r($arguments);\n\n array_walk_recursive($arguments, function(&$value, &$key) use($count) {\n if ( is_string($value) ) {\n $value = str_replace('%i', $count, $value);\n }\n });\n }\n\n // Loop through arguments and define settings\n foreach ($arguments as &$setting) {\n\n // Element and class\n if (is_string($setting)) {\n if ( is_null($elements) ) {\n $elements = $setting;\n } else if ( is_null($class) ) {\n $class = $setting;\n }\n }\n\n // Data\n if (is_array($setting)) {\n if ( is_null($data) && count($setting) == 2 ) {\n $data = $setting;\n }\n }\n\n }\n }\n\n if (isset($elements)) {\n\n $elementsArray = explode(' ', $elements);\n\n foreach ($elementsArray as &$element ) {\n $singleton = false;\n\n if (in_array($element, $this->singletons)) {\n $singleton = true;\n switch ($element) {\n case \"base\":\n $output = \"<base href='\".$html.\"'>\";\n break;\n case \"img\":\n $output = \"<img src='\".$html.\"' alt='\".$html.\"'>\";\n break;\n case \"embed\":\n $output = \"<embed src='\".$html.\"'>\";\n break;\n case \"link\":\n $output = \"<link href='\".$html.\"'>\";\n break;\n case \"source\":\n $output = \"<source src='\".$html.\"'>\";\n break;\n }\n\n array_push($openers, $output);\n\n } else {\n\n if (!$first) {\n $first = true;\n\n $firstElement = '<'.$element;\n\n // If selector starts with a hash, define an ID instead of a class\n if ( isset($class) ) {\n $firstElement .= ($class[0] == '#') ? ' id=\"'.str_replace(\"#\", \"\", $class).'\"' : ' class=\"'.$class.'\"';\n }\n\n // If array is passed with two elements, assume the first is a data-attribute name, and the second is the data attribute value\n if ( isset($data) ) {\n $firstElement .= ' data-'.$data[0].'=\"'.$data[1].'\"';\n }\n\n array_push($openers, $firstElement.'>');\n\n } else {\n\n array_push($openers, '<'.$element.'>');\n\n }\n\n if (!$singleton) {\n array_push($closers, '</'.$element.'>');\n }\n }\n }\n\n return implode(\"\",$openers).(!$singleton ? rtrim($html) : null).implode(\"\", array_reverse($closers));\n\n } else {\n return $html;\n }\n }", "public function getFilteredContent()\n {\n if (!$html = $this->getData('filtered_content')) {\n\n /** @var AntoineK_Cms_Helper_Data $helper */\n $helper = Mage::helper('antoinek_cms');\n\n $html = $helper->filter($this->getCmsBlock()->getContent());\n\n $this->setData('filtered_content', $html);\n }\n\n return $html;\n }", "public function filters()\n {\n //\n }", "public function the_content_filter( $content ) {\n\t\treturn $content;\n\t}", "public function filters()\n {\n }", "public function filter($content)\n {\n $content = preg_replace_callback('/\\{\\*(.*?)\\*\\}/usi', array($this, 'translate'), $content);\n return ($content);\n }", "public function renderList()\n {\n if (isset($this->_filter) && '' == trim($this->_filter)) {\n $this->_filter = $this->original_filter;\n }\n\n $content = parent::renderList();\n\n return $content;\n }", "public function assetsFiltersJsminFilterSpaces(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - spaces');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $actual = $jsmin->filter(\n 'if ( a == b ) { document . writeln(\"hello\") ; }'\n );\n\n $I->assertEquals(\n \"\\n\" . 'if(a==b){document.writeln(\"hello\");}',\n $actual\n );\n }", "function do_filter($hook,$content)\n{\n global $filters;\n if(isset($filters[$hook]))\n {\n foreach($filters[$hook] as $filter)\n {\n if(function_exists($filter))\n $content = call_user_func($filter,$content);\n }\n }\n return $content;\n}", "function coindev_property_shortcode_search_filter() {\n\tob_start();\n\tcoindev_property_search_filter();\n\treturn ob_get_clean();\n}", "public function filter($code);", "abstract public function filter(\\Talis\\Message\\aMessage $message):void;", "protected function filters()\n {\n if ($this->getRequest()->isPost()== true) {\n \tSession::getInstance()->set($this->namepageactual,1);\n $parramsfilter = array();\n\t\t\t\t\t$parramsfilter['quienes_titulo'] = $this->_getSanitizedParam(\"quienes_titulo\");Session::getInstance()->set($this->namefilter, $parramsfilter);\n }\n if ($this->_getSanitizedParam(\"cleanfilter\") == 1) {\n Session::getInstance()->set($this->namefilter, '');\n Session::getInstance()->set($this->namepageactual,1);\n }\n }", "public function filter(){\n // get input fields into array\n $filter=array();\n $params=array();\n $search=array('name','mobile','email');\n $like=array();\n $this->RESPONSE['error']=FALSE;\n $form=$this->input->safe_get();\n ENVIRONMENT !== 'production' ? $this->RESPONSE['request']=$form: '';\n ////////////////////////////////////////////////////////////////////////////////\n if(isset($form['search'])){foreach($search as $value){$like[$value]=$form['search'];} }\n ///////////////////////////////////////////\n $params['limit']=$this->PAGE_LIMIT;\n isset($form['page']) ? $params['offset']=intval($form['page'])*$this->PAGE_LIMIT : '';\n isset($form['sortby'])&&!empty($form['sortby']) ? $params['orderby']=$form['sortby'] : $params['orderby']='mid DESC';\n isset($form['search']) ? $params['like']=$like : '';\n $params['select']='name,email,mobile,image,city,address,reset_code,status,type,auth,date,2fa_enabled';\n $this->RESPONSE['rows']=$this->user_m->get_rows($filter,$params);\n $this->RESPONSE['total_rows']=$this->user_m->get_rows($filter,'',true);\n ////////////////////////////////////////////////////////////////////////\n echo json_encode( $this->RESPONSE);\n \n }", "public static function filter_the_content( $content ) {\n\t\t$ignore = true;\n\n\t\t// Older search forms did not include result page id, but always location text\n\t\tif ( !isset( $_POST['results_page_id'] ) and isset( $_POST['location_text'] ) )\n\t\t\t$ignore = false;\n\n\t\tif ( isset( $_POST['results_page_id'] ) and $_POST['results_page_id'] == get_the_ID() )\n\t\t\t$ignore = false;\n\n\t\tif ( $ignore )\n\t\t\treturn $content;\n\n\t\t// Remove this filter to prevent recursion\n\t\tremove_filter( 'the_content', array( __CLASS__, 'filter_the_content' ) );\n\n\t\t$geo_search = new GeoMashupSearch( $_POST );\n\n\t\t// Buffer templated results and append to content\n\t\tob_start();\n\t\t$geo_search->load_template( 'search-results' );\n\t\t$content .= ob_get_clean();\n\n\t\t// Add the filter back - it's possbible that content preprocessors will cause it to be run again\n\t\tadd_filter( 'the_content', array( __CLASS__, 'filter_the_content' ) );\n\n\t\treturn $content;\n\t}", "function acf_allow_unfiltered_html() {}", "function filter( $search ){\n\t\tforeach ($this->_def['regex']['filter'] as $regex){\n\t\t\t$search = preg_replace($regex,\"\",$search);\n\t\t\t//if($this->_debug) printf( \"query during: %s - regex:%s \\n\", $query,$catregex );\n\t\t}\n\t\treturn trim( str_replace( $this->ed_def['strip'], ' ', $search ) );\n\t}", "public function filterlisting() {\n $data = array('data' => [], 'message' => \"No data found\", 'response' => \"false\");\n $data['data'] = $this->Patient_model->getlistingoffilters();\n if (sizeof($data['data']) > 0) {\n $data['response'] = \"true\";\n $data['message'] = \"listing of filters\";\n $this->response($data);\n }\n }", "function _geshifilter_process($format, $text) {\n // load GeSHi library (if not already)\n $geshi_library = _geshifilter_check_geshi_library();\n if (!$geshi_library['success']) {\n drupal_set_message($geshi_library['message'], 'error');\n return $text;\n }\n // get the available tags\n list($generic_code_tags, $language_tags, $tag_to_lang) = _geshifilter_get_tags($format);\n if (in_array(GESHIFILTER_BRACKETS_PHPBLOCK, array_filter(_geshifilter_tag_styles($format)))) {\n $language_tags[] = 'questionmarkphp';\n $tag_to_lang['questionmarkphp'] = 'php';\n }\n $tags = array_merge($generic_code_tags, $language_tags);\n // escape special (regular expression) characters in tags (for tags like 'c++' and 'c#')\n $tags = preg_replace('#(\\\\+|\\\\#)#', '\\\\\\\\$1', $tags);\n $tags_string = implode('|', $tags);\n // Pattern for matching the prepared \"<code>...</code>\" stuff\n $pattern = '#\\\\[geshifilter-('. $tags_string .')([^\\\\]]*)\\\\](.*?)(\\\\[/geshifilter-\\1\\\\])#s';\n $text = preg_replace_callback($pattern, create_function('$match', \"return _geshifilter_replace_callback(\\$match, $format);\"), $text);\n return $text;\n}", "public function ApplyFilter()\n\t{\n\t\tif( !$this->request->is('ajax') && !Configure::read('debug') > 0)\n\t\t\treturn;\n\t\t$response = $this->Sublet->getFilteredMarkerIdList($this->params['url']);\n\t\t$this->layout = 'ajax';\n\t\t$this->set('response', $response);\n\t}", "public static function filter($buffer)\r\n\t{\r\n\t\t// Pull out the script blocks\r\n\t\tpreg_match_all(\"!<script[^>]+>.*?</script>!is\", $buffer, $match);\r\n\t\t$script_blocks = $match[0];\r\n\t\t$buffer = preg_replace(\r\n\t\t\t\"!<script[^>]+>.*?</script>!is\",\r\n\t\t\t'@@@SAVANT:TRIM:SCRIPT@@@',\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// Pull out the pre blocks\r\n\t\tpreg_match_all(\"!<pre[^>]*>.*?</pre>!is\", $buffer, $match);\r\n\t\t$pre_blocks = $match[0];\r\n\t\t$buffer = preg_replace(\r\n\t\t\t\"!<pre[^>]*>.*?</pre>!is\",\r\n\t\t\t'@@@SAVANT:TRIM:PRE@@@',\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// Pull out the textarea blocks\r\n\t\tpreg_match_all(\"!<textarea[^>]+>.*?</textarea>!is\", $buffer, $match);\r\n\t\t$textarea_blocks = $match[0];\r\n\t\t$buffer = preg_replace(\r\n\t\t\t\"!<textarea[^>]+>.*?</textarea>!is\",\r\n\t\t\t'@@@SAVANT:TRIM:TEXTAREA@@@',\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// remove all leading spaces, tabs and carriage returns NOT\r\n\t\t// preceeded by a php close tag.\r\n\t\t$buffer = trim(preg_replace('/((?<!\\?>)\\n)[\\s]+/m', '\\1', $buffer));\r\n\t\r\n\t\t// replace script blocks\r\n\t\tSavant3_Filter_trimwhitespace::replace(\r\n\t\t\t\"@@@SAVANT:TRIM:SCRIPT@@@\",\r\n\t\t\t$script_blocks,\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// replace pre blocks\r\n\t\tSavant3_Filter_trimwhitespace::replace(\r\n\t\t\t\"@@@SAVANT:TRIM:PRE@@@\",\r\n\t\t\t$pre_blocks,\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\t// replace textarea blocks\r\n\t\tSavant3_Filter_trimwhitespace::replace(\r\n\t\t\t\"@@@SAVANT:TRIM:TEXTAREA@@@\",\r\n\t\t\t$textarea_blocks,\r\n\t\t\t$buffer\r\n\t\t);\r\n\t\r\n\t\treturn $buffer;\r\n\t}", "public function search(){\n\t\t$parishID = Convert::raw2sql($this->request->getVar('ParishID'));\t\t\n\t\tif(!$this->canAccess($parishID)){\n\t\t\treturn $this->renderWith(array('Unathorised_access', 'App'));\n\t\t}\n\t\t\n\t\t\n\t\t$this->title = 'Search Catholic Magazine';\n\t\t$this->list = $this->Results();\n\t\treturn $this->renderWith(array('CatholicMagazine_results','App'));\n\t}", "public function assetsFiltersJsminFilter(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter()');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $actual = $jsmin->filter('{}}');\n\n $I->assertEquals(\n \"\\n\" . '{}}',\n $actual\n );\n }", "abstract public function filterCountryList($pageContents);", "public function display_popup_search(\n $in_content, ///< This is the content to be filtered.\n $in_text, ///< The text that has the parameters in it.\n &$out_count ///< This is set to 1, if a substitution was made.\n ) {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n $options_id = $this->cms_get_page_settings_id($in_content);\n $params = self::get_shortcode($in_content, 'simple_search_list');\n if ($in_text && $params) {\n $temp_id = $this->cms_get_page_settings_id($in_content);\n \n if ($temp_id) {\n $options_id = $temp_id;\n }\n \n if ($params !== true && intval($params)) {\n $options_id = intval($params);\n }\n\n if ($options_id) {\n $options = $this->getBMLTOptions_by_id($options_id);\n $this->adapt_to_lang($options['lang']);\n }\n \n $display = '';\n\n $text_ar = explode(\"\\n\", $in_text);\n \n if (is_array($text_ar) && count($text_ar)) {\n $display .= '<noscript class=\"no_js\">'.$this->process_text($this->my_current_language->local_noscript).'</noscript>';\n $display .= '<div id=\"interactive_form_div\" class=\"interactive_form_div\" style=\"display:none\"><form action=\"#\" onsubmit=\"return false\"><div>';\n $display .= '<label class=\"meeting_search_select_label\" for=\"meeting_search_select\">Find Meetings:</label> ';\n $display .= '<select id=\"meeting_search_select\"class=\"simple_search_list\" onchange=\"BMLTPlugin_simple_div_filler (this.value,this.options[this.selectedIndex].text);this.options[this.options.length-1].disabled=(this.selectedIndex==0)\">';\n $display .= '<option disabled=\"disabled\" selected=\"selected\">'.$this->process_text($this->my_current_language->local_select_search).'</option>';\n $lines_max = count($text_ar);\n $lines = 0;\n while ($lines < $lines_max) {\n $line['parameters'] = trim($text_ar[$lines++]);\n $line['prompt'] = trim($text_ar[$lines++]);\n if ($line['parameters'] && $line['prompt']) {\n $uri = $this->get_ajax_base_uri().'?bmlt_settings_id='.$options_id.'&amp;direct_simple&amp;search_parameters='.urlencode($line['parameters']);\n $display .= '<option value=\"'.$uri.'\">'.__($line['prompt']).'</option>';\n }\n }\n $display .= '<option disabled=\"disabled\"></option>';\n $display .= '<option disabled=\"disabled\" value=\"\">'.$this->process_text($this->my_current_language->local_clear_search).'</option>';\n $display .= '</select></div></form>';\n \n $display .= '<script type=\"text/javascript\">' . (defined('_DEBUG_MODE_') ? \"\\n\" : '');\n $display .= 'document.getElementById(\\'interactive_form_div\\').style.display=\\'block\\';' . (defined('_DEBUG_MODE_') ? \"\\n\" : '');\n $display .= 'document.getElementById(\\'meeting_search_select\\').selectedIndex=0;' . (defined('_DEBUG_MODE_') ? \"\\n\" : '');\n $url = $this->get_plugin_path();\n $img_url = htmlspecialchars($url.'themes/'.$options['theme'].'/images/');\n \n $display .= \"var c_g_BMLTPlugin_images = '$img_url';\" . (defined('_DEBUG_MODE_') ? \"\\n\" : '');\n $display .= '</script>';\n $display .= '<div id=\"simple_search_container\"></div></div>';\n }\n \n if ($display) {\n $in_content = self::replace_shortcode($in_content, 'simple_search_list', $display);\n \n $out_count = 1;\n }\n }\n \n return $in_content;\n }", "public function setContentFilter($val)\n {\n $this->_propDict[\"contentFilter\"] = $val;\n return $this;\n }", "public function getFilter()\n {\n $tagModel = new \\App\\Tag();\n $tagsForCheckbox = $tagModel->getTagsForCheckboxes();\n\n return view('content.filter')->with('tagsForCheckbox', $tagsForCheckbox);\n }", "public function setFilterContent() {\n\n $content = \"\";\n $getGivenValues = new GetExistingEntries();\n\n switch ($_POST['site']) {\n\n case \"client\":\n\n $content = '<form>\n <fieldset>\n \n <label for=\"name\">MIC</label>\n <div class=\"divHelp\"> \n <input type=\"text\" onkeyup=\"newClient()\" name=\"name\" id=\"input-name\" class=\"modal-input form-control\">\n <a class=\"tooltips\" id=\"helpMic\" href=\"#\">\n <div class=\"glyphicon glyphicon-question-sign helpSigns\" alt=\"Keine Sonderzeichen erlaubt\"></div>\n <span>Keine Sonderzeichen erlaubt</span>\n </a>\n </div>\n \n <label for=\"user\">Benutzer</label>\n <select class=\"form-control modal-input\" id=\"input-user\" name=\"user\">\n <option value=\"\" disabled selected></option>\n ' . $getGivenValues->getValues(\"user\", \"name\") . '\n </select>\n \n <label for=\"location\">Standort</label>\n <select id=\"input-location\" name=\"location\" class=\"form-control modal-input\">\n <option value=\"\" disabled selected></option>\n ' . $getGivenValues->getValues(\"location\", \"town\") . '\n </select>\n \n <label for=\"department\">Abteilung</label>\n <select id=\"input-department\" name=\"department\" class=\"form-control modal-input\">\n <option value=\"\" disabled selected></option>\n ' . $getGivenValues->getValues(\"department\", \"name\") . '\n </select>\n\n <label for=\"model\">Modell</label>\n <select id=\"model\" name=\"model\" class=\"modal-input form-control\">\n <option value=\"\" disabled selected><option>\n ' . $getGivenValues->getValues(\"model\", \"model_name\") . '\n </select>\n \n <label for=\"screen\">Bildschirm-Modell</label>\n <select id=\"input-screen\" name=\"screen\" class=\"modal-input form-control\">\n <option value=\"\" disabled selected><option>\n ' . $getGivenValues->getValues(\"screen\", \"screen_name\") . '\n </select>\n\n <label id=\"newLblAcquisitionDatePc\" for=\"acquisition_date_pc\">Anschaffungsdatum PC VON</label>\n <input type=\"text\" name=\"acquisition_date_pc\" id=\"input-acquisition_date_pc\" class=\"modal-input form-control datepicker\">\n \n <div id=\"newInputAcquisitionDatePcTo\">\n <label id=\"newLblAcquisitionDatePcTo\" for=\"acquisition_date_pc_to\">Anschaffungsdatum PC BIS</label>\n <input type=\"text\" name=\"acquisition_date_pc_to\" class=\"form-control modal-input datepicker\">\n </div>\n\n <label id=\"newLblAcquisitionDateScreen\" for=\"acquisition_date_screen\">Anschaffungsdatum Bildschirm VON</label>\n <input type=\"text\" name=\"acquisition_date_screen\" id=\"input-acquisition_date_screen\" value=\"\" class=\"modal-input form-control datepicker\">\n \n <div id=\"newInputAcquisitionDateScreenTo\">\n <label id=\"newLblAcquisitionDateScreenTo\" for=\"acquisition_date_screen_to\">Anschaffungsdatum Bildschirm BIS</label>\n <input type=\"text\" name=\"acquisition_date_screen_to\" class=\"form-control modal-input datepicker\">\n </div>\n\n <label for=\"serial\">Serien-Nr.</label> \n <div class=\"divHelp\"> \n <input type=\"text\" onkeyup=\"newClient()\" name=\"serial\" id=\"input-serial\" class=\"modal-input form-control\">\n <a class=\"tooltips\" id=\"helpSerial\" href=\"#\">\n <div class=\"glyphicon glyphicon-question-sign helpSigns\" alt=\"Keine Sonderzeichen erlaubt\"></div>\n <span>Keine Sonderzeichen erlaubt</span>\n </a>\n </div>\n\n <label for=\"asset_nr\">Anlagen-Nr.</label> \n <div class=\"divHelp\"> \n <input type=\"text\" onkeyup=\"newClient()\" name=\"asset_nr\" id=\"input-asset_nr\" class=\"modal-input form-control\">\n <a class=\"tooltips\" id=\"helpAssetNr\" href=\"#\">\n <div class=\"glyphicon glyphicon-question-sign helpSigns\" alt=\"Keine Sonderzeichen erlaubt\"></div>\n <span>Nur Zahlen erlaubt</span>\n </a>\n </div>\n\n <label for=\"asset_nr\">IP-Adresse</label>\n <div class=\"divHelp\"> \n <input type=\"text\" onkeyup=\"newClient()\" name=\"ip_adress\" id=\"input-ip_adress\" class=\"modal-input form-control\">\n <a class=\"tooltips\" id=\"helpIpAdress\" href=\"#\">\n <div class=\"glyphicon glyphicon-question-sign helpSigns\" ></div>\n <span>Bspw. 172.28.11.1</span>\n </a>\n </div>\n \n <label for=\"hardware\">Hardware-Konfiguration</label>\n <select id=\"input-hardware\" name=\"hardware\" class=\"modal-input form-control\">\n <option value=\"\" disabled selected><option>\n ' . $getGivenValues->getValues(\"hardware\", \"cpu, ram, hd\") . '\n </select>\n \n \n <label for=\"divToReplace\">Muss ersetzt werden</label>\n <div id=\"toReplaceOverlay\">\n <div id=\"divToReplace\" class=\"radio\">\n <label><input type=\"radio\" value=\"1\" name=\"to_replace\">Ja</label>\n </div>\n <div class=\"radio\">\n <label><input type=\"radio\" value=\"0\" name=\"to_replace\">Nein</label>\n </div>\n </div>\n \n <label for=\"to_replace_date\">Datum an dem ersetzt werden muss</label>\n <input type=\"text\" name=\"to_replace_date\" id=\"input-to_replace_date\" class=\"modal-input form-control datepicker\">\n\n </fieldset>\n </form>';\n break;\n\n case \"printer\":\n\n $content = '<form>\n <fieldset>\n \n <label for=\"windows_name\">Windows Name</label>\n <input type=\"text\" name=\"windows_name\" onkeyup=\"newPrinter()\" id=\"input-windows_name\" class=\"form-control modal-input\">\n \n <label for=\"sap_name\">SAP Bezeichnung</label>\n <input type=\"text\" name=\"sap_name\" onkeyup=\"newPrinter()\" id=\"input-sap_name\" class=\"modal-input form-control\">\n \n <label for=\"benteler_inventory\">B.I.N.</label>\n <input type=\"text\" name=\"benteler_inventory\" onkeyup=\"newPrinter()\" id=\"input-benteler_inventory\" class=\"modal-input form-control\">\n \n <label for=\"ip_adress\">IP-Adresse</label>\n <div class=\"divHelp\"> \n <input type=\"text\" onkeyup=\"newPrinter()\" name=\"ip_adress\" id=\"input-ip_adress\" class=\"modal-input form-control\">\n <a class=\"tooltips\" id=\"helpIpAdress\" href=\"#\">\n <div class=\"glyphicon glyphicon-question-sign helpSigns\" ></div>\n <span>Bspw. 172.28.11.1</span>\n </a>\n </div>\n \n <label for=\"location\">Standort</label>\n <select id=\"input-location\" name=\"location\" onchange=\"newPrinter()\" class=\"form-control modal-input \">\n <option value=\"\" disabled selected></option>\n ' . $getGivenValues->getValues(\"location\", \"town\") . '\n </select>\n \n <label for=\"department\">Abteilung</label>\n <select id=\"input-department\" name=\"department\" onchange=\"newPrinter()\" class=\"form-control modal-input \">\n <option value=\"\" disabled selected></option>\n ' . $getGivenValues->getValues(\"department\", \"name\") . '\n </select>\n\n <label for=\"model\">Modell</label>\n <select id=\"input-model\" name=\"model\" onchange=\"newPrinter()\" class=\"modal-input form-control\">\n <option value=\"\" disabled selected><option>\n ' . $getGivenValues->getValues(\"model\", \"model_name\") . '\n </select>\n \n <label for=\"fax\">Fax-Nr.</label>\n <div class=\"divHelp\"> \n <input type=\"text\" onkeyup=\"newPrinter()\" name=\"fax\" id=\"input-fax\" class=\"modal-input form-control\">\n <a class=\"tooltips\" id=\"helpFax\" href=\"#\">\n <div class=\"glyphicon glyphicon-question-sign helpSigns\" ></div>\n <span>Nur Zahlen erlaubt!</span>\n </a>\n </div>\n \n <label for=\"email\">E-Mail Adresse</label>\n <div class=\"divHelp\"> \n <input type=\"text\" onkeyup=\"newPrinter()\" name=\"email\" id=\"input-email\" class=\"modal-input form-control\">\n <a class=\"tooltips\" id=\"helpEmail\" href=\"#\">\n <div class=\"glyphicon glyphicon-question-sign helpSigns\" ></div>\n <span>max.mustermann@muster.de</span>\n </a>\n </div>\n \n <label for=\"serial\">Serien-Nr.</label> \n <div class=\"divHelp\"> \n <input type=\"text\" onkeyup=\"newPrinter()\" name=\"serial_number\" id=\"input-serial_number\" class=\"modal-input form-control\">\n <a class=\"tooltips\" id=\"helpSerial\" href=\"#\">\n <div class=\"glyphicon glyphicon-question-sign helpSigns\" alt=\"Keine Sonderzeichen erlaubt\"></div>\n <span>Keine Sonderzeichen erlaubt</span>\n </a>\n </div>\n \n <label id=\"lblAcquisitionDatePrinter\" for=\"acquisition_date\">Anschaffungsdatum VON</label>\n <input type=\"text\" name=\"acquisition_date\" onkeyup=\"newPrinter()\" id=\"input-acquisition_date\" class=\"modal-input datepicker form-control\">\n\n <div id=\"newInputAcquisitionDatePrinterTo\">\n <label id=\"newLblAcquisitionDatePrinterTo\" for=\"acquisition_date_printer\">Anschaffungsdatum BIS</label>\n <input type=\"text\" id=\"input-acquisition_date_printer_to\" onkeyup=\"newPrinter()\" name=\"acquisition_date_printer_to\" class=\"form-control datepicker modal-input\">\n </div>\n\n </fieldset>\n </form>';\n break;\n\n case \"network\":\n $content = '<form>\n <fieldset>\n \n <label for=\"model\">Modell</label>\n <select id=\"input-model\" onchange=\"newNetwork()\" name=\"model\" class=\"modal-input form-control\">\n <option value=\"\" disabled selected><option>\n ' . $getGivenValues->getValues(\"model\", \"model_name\") . '\n </select>\n \n <label for=\"serial\">Serien-Nr.</label>\n <input type=\"text\" onkeyup=\"newNetwork()\" name=\"serial\" id=\"input-serial\" class=\"modal-input form-control\">\n \n <label for=\"function\">Funktion</label>\n <select id=\"input-function\" onchange=\"newNetwork()\" name=\"function\" class=\"modal-input form-control\">\n <option value=\"\" disabled selected><option>\n ' . $getGivenValues->getValues(\"function\", \"description\") . '\n </select>\n \n <label for=\"description\">Funktions-Beschreibung</label>\n <input type=\"text\" name=\"description\" onkeyup=\"newNetwork()\" id=\"input-description\" class=\"modal-input form-control\">\n \n <label for=\"ip_adress\">IP-Adresse</label>\n <div class=\"divHelp\"> \n <input type=\"text\" onkeyup=\"newNetwork()\" name=\"ip_adress\" id=\"input-ip_adress\" class=\"modal-input form-control\">\n <a class=\"tooltips\" id=\"helpIpAdress\" href=\"#\">\n <div class=\"glyphicon glyphicon-question-sign helpSigns\" ></div>\n <span>Bspw. 172.28.11.1</span>\n </a>\n </div>\n \n <label for=\"location\">Standort</label>\n <select id=\"input-location\" onchange=\"newNetwork()\" name=\"location\" class=\"form-control modal-input \">\n <option value=\"\" disabled selected></option>\n ' . $getGivenValues->getValues(\"location\", \"town\") . '\n </select>\n \n <label for=\"department\">Abteilung</label>\n <select id=\"input-department\" onchange=\"newNetwork()\" name=\"department\" class=\"form-control modal-input \">\n <option value=\"\" disabled selected></option>\n ' . $getGivenValues->getValues(\"department\", \"name\") . '\n </select>\n\n <label for=\"start_date\">Start-Datum</label>\n <input type=\"text\" onchange=\"newNetwork()\" name=\"start_date\" id=\"input-start_date\" class=\"form-control modal-input datepicker\">\n \n <label for=\"end_date\">End-Datum</label>\n <input type=\"text\" onchange=\"newNetwork()\" name=\"end_date\" id=\"input-end_date\" class=\"form-control modal-input datepicker\">\n \n </fieldset>\n </form>';\n break;\n\n case \"tva\":\n\n $content = '<form>\n <fieldset>\n \n <label for=\"phone_number\">Telefon-Nr.</label>\n <div class=\"divHelp\"> \n <input type=\"text\" onkeyup=\"newTva()\" name=\"phone_number\" id=\"input-phone_number\" class=\"modal-input form-control\">\n <a class=\"tooltips\" id=\"helpPhoneNumber\" href=\"#\">\n <div class=\"glyphicon glyphicon-question-sign helpSigns\" ></div>\n <span>Nur Zahlen erlaubt</span>\n </a>\n </div>\n\n <label for=\"user\">Benutzer</label>\n <select class=\"form-control modal-input\" onchange=\"newTva()\" id=\"input-user\" name=\"user\">\n <option value=\"\" disabled selected></option>\n ' . $getGivenValues->getValues(\"user\", \"name\") . '\n </select>\n \n \n <label for=\"model\">Modell</label>\n <select id=\"input-model\" onchange=\"newTva()\" name=\"model\" class=\"modal-input form-control\">\n <option value=\"\" disabled selected><option>\n ' . $getGivenValues->getValues(\"model\", \"model_name\") . '\n </select>\n \n </fieldset>\n </form>';\n\n break;\n }\n\n echo $content;\n }", "function filter( $search ){\n\t\tforeach ($this->_def['regex']['filter'] as $regex){\n\t\t\t$search = preg_replace($regex,\"\",$search);\n\t\t\t//if($this->_debug) printf( \"query during: %s - regex:%s \\n\", $query,$catregex );\n\t\t}\n\t\t$search = trim(str_replace( $this->ed_def['strip'], ' ', $search ));\n\t\treturn $search;\n\t}", "function uga_filter($content) {\r\n uga_debug(\"Start uga_filter: $content\");\r\n if (!uga_in_feed() && uga_track_user()) {\r\n // $pattern = '<a(.*?)href\\s*=\\s*[\\'\"](.*?)[\\'\"]([^>]*)>(.*?)<\\s*/a\\s*>';\r\n $pattern = '<a\\s([^>]*?)href\\s*=\\s*[\\'\"](.*?)[\\'\"]([^>]*)>(.*?)</a\\s*>';\r\n uga_debug(\"Calling preg_replace_callback: $pattern\");\r\n $content = preg_replace_callback('@'.$pattern.'@i', 'uga_preg_callback', $content);\r\n }\r\n uga_debug(\"Ending uga_filter: $content\");\r\n return $content;\r\n}", "public function filterQuery(): void;", "protected function getFilter()\n {\n \t$filtros = \" 1 = 1 \";\n\t\t$contenido= $this->_getSanitizedParam(\"contenido\");\n\t\t$filtros = $filtros.\" AND quienes_aliado = '$contenido' \";\n if (Session::getInstance()->get($this->namefilter)!=\"\") {\n $filters =(object)Session::getInstance()->get($this->namefilter);\n if ($filters->quienes_titulo != '') {\n $filtros = $filtros.\" AND quienes_titulo LIKE '%\".$filters->quienes_titulo.\"%'\";\n }\n\t\t}\n return $filtros;\n }", "function is_filtered()\n {\n }", "public function filter($module=''){\n // get input fields into array\n $filter=array();\n $params=array();\n $search=array();\n $like=array();\n $this->RESPONSE['error']=FALSE;\n $form=$this->input->safe_get();\n ENVIRONMENT !== 'production' ? $this->RESPONSE['request']=$form: '';\n ////////////////////////////////////////////////////////////////////////////////\n switch (strtolower($module)) {\n /////load row\n case 'subjects':{\n isset($form['class_id'])&&!empty($form['class_id']) ? $filter['class_id']=$form['class_id'] : '';\n ///////////////////////////////////////////\n $params['select']='name,';\n $this->RESPONSE['rows']=$this->subject_m->get_rows($filter,$params);\n }\n break; \n }\n ////////////////////////////////////////////////////////////////////////\n echo json_encode( $this->RESPONSE);\n \n }", "function filter() {\n // the page we will redirect to\n $url['action'] = 'index';\n\n // build a URL will all the search elements in it\n // the resulting URL will be\n // example.com/cake/posts/index/Search.keywords:mykeyword/Search.tag_id:3\n foreach ($this->data as $k => $v) {\n foreach ($v as $kk => $vv) {\n $url[$k . '.' . $kk] = $vv;\n }\n }\n\n // redirect the user to the url\n $this->redirect($url, null, true);\n }", "function executeFrontendOutputFilter($content) {\n\t\t// get output filter settings from database\n\t\t$filter_settings = getOutputFilterSettings();\n\t\t$sFilterDirectory = str_replace('\\\\', '/', dirname(__FILE__)).'/filters/';\n\t\t$output_filter_mode = 0;\n\t\t$output_filter_mode |= ($filter_settings['email_filter'] * pow(2, 0)); // n | 2^0\n\t\t$output_filter_mode |= ($filter_settings['mailto_filter'] * pow(2, 1)); // n | 2^1\n\t\tdefine('OUTPUT_FILTER_AT_REPLACEMENT', $filter_settings['at_replacement']);\n\t\tdefine('OUTPUT_FILTER_DOT_REPLACEMENT', $filter_settings['dot_replacement']);\n\n/* ### filter type: execute droplets filter ################################# */\n\t\tif (file_exists($sFilterDirectory.'filterDroplets.php')) {\n\t\t\trequire($sFilterDirectory.'filterDroplets.php');\n\t\t\t$content = doFilterDroplets($content);\n\t\t}\n/* ### filter type: protect email addresses ################################# */\n\t\tif( ($output_filter_mode & pow(2, 0)) || ($output_filter_mode & pow(2, 1)) ) {\n\t\t\tif (file_exists($sFilterDirectory.'filterEmail.php')) {\n\t\t\t\trequire($sFilterDirectory.'filterEmail.php');\n\t\t\t\t$content = doFilterEmail($content, $output_filter_mode);\n\t\t\t}\n\t\t}\n/* ### filter type: change [wblinkxx] into real URLs ######################## */\n\t\tif (file_exists($sFilterDirectory.'filterWbLink.php')) {\n\t\t\trequire($sFilterDirectory.'filterWbLink.php');\n\t\t\t$content = doFilterWbLink($content);\n\t\t}\n/* ### filter type: full qualified URLs to relative URLs##################### */\n if($filter_settings['sys_rel'] == 1){\n\t\t\tif (file_exists($sFilterDirectory.'filterRelUrl.php')) {\n\t\t\t\trequire($sFilterDirectory.'filterRelUrl.php');\n\t\t\t\t$content = doFilterRelUrl($content);\n\t\t\t}\n\t\t}\n/* ### filter type: moves css definitions from <body> into <head> ########### */\n\t\tif (file_exists($sFilterDirectory.'filterCssToHead.php')) {\n\t\t\trequire($sFilterDirectory.'filterCssToHead.php');\n\t\t\t$content = doFilterCssToHead($content);\n\t\t}\n\n/* ### end of filters ####################################################### */\n\t\treturn $content;\n\t}", "function filter()\n {\n // the page we will redirect to\n $url['action'] = 'index';\n\n // build a URL will all the search elements in it\n // the resulting URL will be\n // example.com/cake/posts/index/Search.keywords:mykeyword/Search.tag_id:3\n foreach ($this->data as $k => $v) {\n foreach ($v as $kk => $vv) {\n $url[$k . '.' . $kk] = $vv;\n }\n }\n\n // redirect the user to the url\n $this->redirect($url, null, true);\n }", "public function assetsFiltersJsminFilterTabs(UnitTester $I)\n {\n $I->wantToTest('Assets\\Filters\\Jsmin - filter() - tabs');\n\n $I->skipTest('Need Phalcon implementation');\n\n $jsmin = new Jsmin();\n\n $actual = $jsmin->filter(\n \"\\n\" . \"if ( a == b ) { document . writeln('\\t') ; }\"\n );\n\n $I->assertEquals(\n \"\\n\" . \"if(a==b){document.writeln('\\t');}\",\n $actual\n );\n }", "function hook_filter ( ) {\n\t\t$extConf =& $this->extConf;\n\t\t$charset = $this->pi1->extConf['charset']['upper'];\n\t\t$ref_read =& $this->pi1->ref_read;\n\n\t\t// Init statistics\n\t\t$this->pi1->stat['authors'] = array();\n\t\t$astat =& $this->pi1->stat['authors'];\n\n\t\t$filter = array ( );\n\n\t\t//\n\t\t// Fetch all surnames and initialize letters\n\t\t//\n\t\t$astat['surnames'] = $ref_read->fetch_author_surnames();\n\t\t$astat['sel_surnames'] = array();\n\t\t$this->init_letters ( $astat['surnames'] );\n\n\t\t// aliases\n\t\t$surnames =& $astat['surnames'];\n\t\t$sel_author =& $extConf['sel_author'];\n\t\t$sel_letter =& $extConf['sel_letter'];\n\t\t$sel_surnames =& $astat['sel_surnames'];\n\n\t\t// Filter for selected author letter\n\t\t// with a temporary filter\n\t\tif ( strlen ( $sel_letter ) > 0 ) {\n\t\t\t$filters = $this->pi1->extConf['filters'];\n\n\t\t\t$txt = $sel_letter;\n\t\t\t$spec = htmlentities ( $txt, ENT_QUOTES, $charset );\n\t\t\t$pats = array ( $txt . '%' );\n\t\t\tif ( $spec != $txt ) \n\t\t\t\t$pats[] = $spec . '%';\n\n\t\t\t// Append surname letter to filter\n\t\t\tforeach ( $pats as $pat ) {\n\t\t\t\t$filter[] = array ( 'surname' => $pat );\n\t\t\t}\n\n\t\t\t$filters['temp'] = array();\n\t\t\t$filters['temp']['author'] = array();\n\t\t\t$filters['temp']['author']['authors'] = $filter;\n\n\t\t\t//\n\t\t\t// Fetch selected surnames\n\t\t\t//\n\t\t\t$ref_read->set_filters ( $filters );\n\t\t\t$sel_surnames = $ref_read->fetch_author_surnames ( );\n\t\t\t//t3lib_div::debug ( $sel_surnames );\n\n\t\t\t//\n\t\t\t// Remove ampersand strings from surname list\n\t\t\t//\n\t\t\t$lst = array();\n\t\t\t$spec = FALSE;\n\t\t\t$sel_up = mb_strtoupper ( $sel_letter, $charset);\n\t\t\t$sel_low = mb_strtolower ( $sel_letter, $charset);\n\t\t\tforeach ( $sel_surnames as $name ) {\n\t\t\t\tif ( !( strpos ( $name, '&' ) === FALSE ) ) {\n\t\t\t\t\t$name = html_entity_decode ( $name, ENT_COMPAT, $charset );\n\t\t\t\t\t$spec = TRUE;\n\t\t\t\t\t//t3lib_div::debug ( array ( 'sur' => $name ) );\n\t\t\t\t}\n\t\t\t\t// check if first letter matches\n\t\t\t\t$ll = mb_substr ( $name, 0, 1, $charset );\n\t\t\t\tif ( ( $ll != $sel_up ) && ( $ll != $sel_low ) ) {\n\t\t\t\t\t//t3lib_div::debug ( array ( 'sel' => $sel_letter, 'll' => $ll ) );\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif ( !in_array ( $name, $lst ) ) {\n\t\t\t\t\t$lst[] = $name;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( $spec ) {\n\t\t\t\tusort ( $lst, 'strcoll' );\n\t\t\t}\n\t\t\t$sel_surnames = $lst;\n\t\t\t//t3lib_div::debug ( $sel_surnames );\n\n\t\t\t//\n\t\t\t// Restore filter\n\t\t\t//\n\t\t\t$ref_read->set_filters ( $this->pi1->extConf['filters'] );\n\t\t}\n\n\t\t//\n\t\t// Setup filter for selected author\n\t\t//\n\t\t//t3lib_div::debug ( array ( 'sel_author' => $sel_author ) );\n\t\tif ( $sel_author != '0' ) {\n\t\t\t$spec = htmlentities ( $sel_author, ENT_QUOTES, $charset );\n\n\t\t\t// Check if the selected author is available\n\t\t\tif ( in_array ( $sel_author, $sel_surnames )\n\t\t\t\t|| in_array ( $spec, $sel_surnames ) )\n\t\t\t{\n\t\t\t\t$pats = array ( $sel_author );\n\t\t\t\tif ( $spec != $sel_author )\n\t\t\t\t\t$pats[] = $spec;\n\n\t\t\t\t//t3lib_div::debug ( array ( 'pats' => $pats ) );\n\t\t\t\t// Reset filter with the surname only\n\t\t\t\t$filter = array ( );\n\t\t\t\tforeach ( $pats as $pat ) {\n\t\t\t\t\t$filter[] = array ( 'surname' => $pat );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$sel_author = '0';\n\t\t\t}\n\t\t}\n\n\t\t// Append filter\n\t\tif ( sizeof ( $filter ) > 0 ) {\n\t\t\t$ff =& $this->pi1->extConf['filters'];\n\t\t\t$ff['author'] = array();\n\t\t\t$ff['author']['author'] = array();\n\t\t\t$ff['author']['author']['authors'] = $filter;\n\n\t\t\t//t3lib_div::debug ( $extConf['filters'] );\n\t\t\t$ref_read->set_filters ( $ff );\n\t\t}\n\t}", "static function content_filter($content){\n\t\t \n\t\t if(is_page()) return $content;\n\t\t \n\t\t global $post;\n\t\t $global_cat = self::get_global_term();\n\t\t \n\t\t if($global_cat){\n\t\t\t$category = $global_cat;\n\t\t }\n\t\t else{\n\t\t\t$categories = get_the_category($post->ID);\n\t\t\t$category = $categories[0]->term_id;\n\t\t }\n\t\t \n\t\treturn self::sanitized_content($content, $category);\t\n\t\t \n\t }", "public function HTMLFilter(){\n\t\treturn 'text/html';\n\t}", "public function getFilter ();", "function kses_init_filters() {\n\t// Normal filtering.\n\tadd_filter('pre_comment_content', 'wp_filter_kses');\n\tadd_filter('title_save_pre', 'wp_filter_kses');\n\n\t// Post filtering\n\tadd_filter('content_save_pre', 'wp_filter_post_kses');\n\tadd_filter('excerpt_save_pre', 'wp_filter_post_kses');\n\tadd_filter('content_filtered_save_pre', 'wp_filter_post_kses');\n}", "public function initFilter() {\n\t\t$te = new ilTextInputGUI($this->pl->txt('title'), 'title');\n\t\t$this->addFilterItemWithValue($te);\n\t\tparent::initFilter();\n\t}", "public function filter($input){ //Filter input from all user, filtered from sqli,and xss\n $filter = addslashes(trim(stripslashes(strip_tags($input))));\n return $filter;\n }", "public function typoSearchTagsRemovesBodyContentOutsideMarkers() {}", "function content($arr)\n {\n $j_arr = json_encode($arr);\n $cl = $this->courses_list();\n $eis = json_encode($_GET['eis']);\n\n // build a page\n $html=\"<div id='filter_options' data-role='collapsible-set' data-theme='a' data-collapsed-icon='gear' data-expanded-icon='gear' data-iconpos='right'>\n <div data-role='collapsible' data-collapsed='false'>\n <h3>Studiengänge filtern<div class='subtitle'>Durch die Filter kannst du bestimmte Studiengänge anzeigen oder verbergen.</div></h3>\".$this->filter().\"</div></div>\n <ul data-role='listview' data-inset='true'>\".$cl.\"</ul> \n <script src='views/studiengaenge/data/scripts/checkboxes_control.js'></script>\n <script>filter($j_arr)</script>\n <script src='views/studiengaenge/data/scripts/filter_control.js'></script>\n <script>fcontrol($eis)</script>\";\n \n return $html;\n }", "public function filter($query);", "public function filter($query);", "function hyperlight_before_filter($content) {\n return preg_replace_callback(\n '#<pre(.*?)>(.*?)</pre>#is',\n 'hyperlight_highlight_block',\n $content\n );\n}", "public function get_tags() {\n\t\t\t\t$this->tags = $this->strip_javascript($this->contents);\n\t \t\t}", "public function jsearch() {\r\n\t\t$result = array ();\r\n\t\t$c = strip_tags(trim($this->input->get('xm')));\r\n\t\t$SQL = \"select name from items where name like '{$c}%' limit 10\";\r\n\t\tif ($c) {\r\n\t\t\t$mec = new Memcache();\r\n\t\t\t$mec->connect('127.0.0.1', 11211);\r\n\t\t\tif ($result = $mec->get('itm_' . $c)) {\r\n\t\t\t} else {\r\n\t\t\t\t$result = $this->db->query($SQL)->result_array();\r\n\t\t\t\tif (!empty ($result)) {\r\n\t\t\t\t\t$mec->set('itm_' . $c, $result, 0, 1800);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$mec->close();\r\n\t\t}\r\n\t\techo json_encode($result);\r\n\t}", "function welcome_user_msg_filter($text)\n{\n}", "public function filter()\n {\n $blueprints = $this->blueprints();\n $values = $blueprints->filter($this->toArray());\n $this->header($values['header']);\n }", "function wp_filter_kses($data)\n{\n}", "public function filterFeed($filter) {\n if ($filter->titlecontains !== '') {\n $this->filterTitleContains($filter->titlecontains, \"keep\");\n }\n if ($filter->titledoesntcontains !== '') {\n $this->filterTitleContains($filter->titledoesntcontains, \"remove\");\n }\n if ($filter->titleequals !== '') {\n $this->filterTitle($filter->titleequals, \"keep\");\n }\n if ($filter->titledoesntequal !== '') {\n $this->filterTitle($filter->titledoesntequal, \"remove\");\n }\n $limit = intval($filter->limit);\n if ($limit > 0) {\n $this->noWalks($limit);\n }\n $dist = floatval($filter->filterdistance);\n if ($dist > 0) {\n $this->filterDistanceFromLatLong(floatval($filter->filtercentrelatitude), floatval($filter->filtercentrelongitude), $dist);\n }\n if (count($filter->filternationalgrades) > 0) {\n $this->filterNationalGrade($filter->filternationalgrades);\n }\n if (count($filter->filterdaysofweek) > 0) {\n $this->filterDayofweek($filter->filterdaysofweek);\n }\n if ($filter->filterstrand !== '') {\n $this->filterStrands($filter->filterstrand);\n }\n }", "function _geshifilter_prepare($format, $text) {\n // get the available tags\n list($generic_code_tags, $language_tags, $tag_to_lang) = _geshifilter_get_tags($format);\n $tags = array_merge($generic_code_tags, $language_tags);\n // escape special (regular expression) characters in tags (for tags like 'c++' and 'c#')\n $tags = preg_replace('#(\\\\+|\\\\#)#', '\\\\\\\\$1', $tags);\n $tags_string = implode('|', $tags);\n // Pattern for matching \"<code>...</code>\" like stuff\n // Also matches \"<code>...$\" where \"$\" refers to end of string, not end of\n // line (because PCRE_MULTILINE (modifier 'm') is not enabled), so matching\n // still works when teaser view trims inside the source code.\n\n // Replace the code container tag brackets\n // and prepare the container content (newline and angle bracket protection).\n // @todo: make sure that these replacements can be done in serie.\n $tag_styles = array_filter(_geshifilter_tag_styles($format));\n if (in_array(GESHIFILTER_BRACKETS_ANGLE, $tag_styles)) {\n // Prepare <foo>..</foo> blocks.\n $pattern = '#(<)('. $tags_string .')((\\s+[^>]*)*)(>)(.*?)(</\\2\\s*>|$)#s';\n $text = preg_replace_callback($pattern, create_function('$match', \"return _geshifilter_prepare_callback(\\$match, $format);\"), $text);\n }\n if (in_array(GESHIFILTER_BRACKETS_SQUARE, $tag_styles)) {\n // Prepare [foo]..[/foo] blocks.\n $pattern = '#((?<!\\[)\\[)('. $tags_string .')((\\s+[^\\]]*)*)(\\](?!\\[))(.*?)((?<!\\[)\\[/\\2\\s*\\](?<!\\[)|$)#s';\n $text = preg_replace_callback($pattern, create_function('$match', \"return _geshifilter_prepare_callback(\\$match, $format);\"), $text);\n }\n if (in_array(GESHIFILTER_BRACKETS_DOUBLESQUARE, $tag_styles)) {\n // Prepare [[foo]]..[[/foo]] blocks.\n $pattern = '#(\\[\\[)('. $tags_string .')((\\s+[^\\]]*)*)(\\]\\])(.*?)(\\[\\[/\\2\\s*\\]\\]|$)#s';\n $text = preg_replace_callback($pattern, create_function('$match', \"return _geshifilter_prepare_callback(\\$match, $format);\"), $text);\n }\n if (in_array(GESHIFILTER_BRACKETS_PHPBLOCK, $tag_styles)) {\n // Prepare < ?php ... ? > blocks.\n $pattern = '#[\\[<](\\?php|\\?PHP|%)(.+?)((\\?|%)[\\]>]|$)#s';\n $text = preg_replace_callback($pattern, '_geshifilter_prepare_php_callback', $text);\n }\n return $text;\n}", "function beforeFilter()\r\n {\r\n $this->checkSessionAll();\r\n \t$this->set('content_list', $this->Volume->findAllThreaded());\r\n \t$this->set('magid', 0);//reset this if we have a priciple mag\r\n \t$this->set('admin_enable', false);\r\n }", "public function onViewFilter() {\n\n $this->getObLista();//Substituir por backbone.js\n $filtro = $_POST;\n\n $this->obLista->setFiltro($filtro);\n\n }", "protected function _page_filter() {\r\n\t\t// e.g. $this->core_model->where('id', 1);\r\n\t}", "public function getContentFilters()\n {\n return $this->_contentHelperData->getKlevuFilters();\n }", "public function filter(&$logs);", "public function filter($value);", "public function filter($value);", "public function filter($value);", "public function filter($value);", "public function search_promocode(){\n\n $inputData = Input::all();\n $filter_code = $inputData['filter_promocode'];\n if(!empty($inputData) && count($inputData)> 0 && isset($filter_code)) {\n $data['acList'] = AdminPromocode::search_promocode($filter_code);\n $view = \\View::make('admin.promocode_search')->with('data', $data);\n\n if($inputData){\n $sections = $view->renderSections(); // returns an associative array of 'content', 'head' and 'footer'\n return $sections['content']; // this will only return whats in the content section\n }\n\n }else{\n $data['acList'] = (object) array();\n }\n return $view;\n }", "public function filter(){\n try {\n // Sparql10.g:235:3: ( FILTER constraint ) \n // Sparql10.g:236:3: FILTER constraint \n {\n $this->match($this->input,$this->getToken('FILTER'),self::$FOLLOW_FILTER_in_filter875); \n $this->pushFollow(self::$FOLLOW_constraint_in_filter877);\n $this->constraint();\n\n $this->state->_fsp--;\n\n\n }\n\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n \n return ;\n }", "public function searchContent($arg1 = \" \");", "function preview_theme_ob_filter($content)\n{\n}" ]
[ "0.72505826", "0.67556185", "0.6286809", "0.62706095", "0.62526083", "0.6202633", "0.6163433", "0.6093594", "0.59893024", "0.597537", "0.58577794", "0.58511597", "0.58365273", "0.5775305", "0.57694757", "0.57387966", "0.5712642", "0.5702569", "0.5690148", "0.56790304", "0.56335473", "0.5611831", "0.55966544", "0.5578446", "0.55362105", "0.546925", "0.5461796", "0.5453359", "0.54199916", "0.53931165", "0.53910846", "0.53716135", "0.5358505", "0.5357662", "0.5340757", "0.53236866", "0.5311118", "0.5310742", "0.5290554", "0.5289429", "0.528531", "0.52774626", "0.5257353", "0.5252729", "0.52404445", "0.52399397", "0.5232524", "0.5212014", "0.5211873", "0.52108324", "0.52028835", "0.5158964", "0.51499856", "0.5149736", "0.51354825", "0.5129627", "0.51229316", "0.5121922", "0.51090276", "0.50947946", "0.5091777", "0.5085447", "0.5072574", "0.50706124", "0.507038", "0.5049724", "0.50495523", "0.5048508", "0.50241905", "0.50220025", "0.5021659", "0.50124407", "0.50117517", "0.5004993", "0.5003461", "0.50010085", "0.500051", "0.4994876", "0.4994876", "0.4988336", "0.4983855", "0.49802715", "0.49726713", "0.49696428", "0.49621034", "0.49599972", "0.4958687", "0.49526584", "0.49498287", "0.49490288", "0.494208", "0.4935691", "0.49334654", "0.49334654", "0.49334654", "0.49334654", "0.49325848", "0.4932082", "0.4925706", "0.49217385" ]
0.718078
1
TRANSLATION / function getTablesList($ignore_sys_tables) This function gets all the tables from the database
Функция getTablesList($ignore_sys_tables) Получает все таблицы из базы данных
function getTablesList($ignore_sys_tables = false){ $system_tables = array('groups_users'=>'groups_users','rules'=>'rules','settings'=>'settings'); $table_schema = $this->query("SELECT TABLE_NAME AS name FROM INFORMATION_SCHEMA.TABLES AS Backend WHERE TABLE_SCHEMA<>'information_schema' AND TABLE_NAME NOT LIKE '%_translations'"); $table_list = array(); foreach($table_schema as $tables){ $table_list[$tables['Backend']['name']] = $tables['Backend']['name']; } if($ignore_sys_tables){ return $table_list; }else{ $tables_list_clear = array_diff($table_list, $system_tables); return $tables_list_clear; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function showTables($ignore_prefix=false)\n {\n \t $data = $this->query('SHOW TABLES');\n \t $tables = array();\n \t\twhile( $result = $data->fetch() )\n if($ignore_prefix || ! substr_compare($result[0],$this->prefix,0,strlen($this->prefix)))\n \t\t$tables[] = $result[0];\n \t\treturn $tables;\n \t}", "public function getListOfTables($ignoreSequences = true);", "public function getTables() {\n\t\t$this->connect();\n\n\t\tif(method_exists('DB', 'table_list')) {\n\t\t\treturn DB::table_list();\n\t\t} else {\n\t\t\treturn DB::tableList();\n\t\t}\n\t}", "public static function listTables()\r\n {\r\n $sql = \"SELECT tablename AS name,\r\n pg_catalog.obj_description(pg_catalog.pg_class.oid) AS label\r\n FROM pg_catalog.pg_tables\r\n LEFT JOIN pg_catalog.pg_class\r\n ON pg_catalog.pg_tables.tablename = pg_catalog.pg_class.relname\r\n WHERE schemaname NOT IN ('pg_catalog', 'information_schema');\";\r\n\r\n return \\Db\\Conn::getInstance()->query($sql);\r\n }", "public function listDbTables() {\n \tif($this->dbLayer === 'MDB2') {\n \t\t$ret = $this->_db->mgListTables();\n \t\treturn $ret;\n \t}\n \telseif ($this->dbLayer === 'PDO') {\n \t\tif($this->objEngine->pdsn['phptype'] == 'pgsql') {\n \t\t\t$sql = \"select * from information_schema.tables where table_schema='public' and table_type='BASE TABLE'\";\n \t\t\ttry {\n \t\t\t\t$ret = $this->query($sql);\n \t\t\t}\n \t\t\tcatch (PDOException $e) {\n \t\t\t\tthrow new customException($e->getMessage());\n \t\t\t\tcustomException::cleanUp();\n \t\t\t\texit;\n \t\t\t}\n \t\t\tforeach($ret as $tables) {\n \t\t\t\t$tbls[] = $tables['table_name'];\n \t\t\t}\n \t\t\treturn $tbls;\n \t\t}\n \t\telseif($this->objEngine->pdsn['phptype'] == 'mysql' || $this->objEngine->pdsn['phptype'] == 'mysqli') {\n \t\t\t$query = \"SHOW /*!50002 FULL*/ TABLES\";\n \t\t\tif (!is_NULL($this->objEngine->pdsn['database'])) {\n \t\t\t\t$database = $this->objEngine->pdsn['database'];\n \t\t$query .= \" FROM $database\";\n \t\t}\n \t\t$query.= \"/*!50002 WHERE Table_type = 'BASE TABLE'*/\";\n \t\ttry {\n \t\t\t$ret = $this->query($query);\n \t\t}\n \t\tcatch (PDOException $e) {\n \t\t\t\tthrow new customException($e->getMessage());\n \t\t\t\tcustomException::cleanUp();\n \t\t\t\texit;\n \t\t\t}\n \t\tforeach($ret as $tables) {\n \t\t\t\t$tbls[] = $tables[0];\n \t\t\t}\n \t\t\treturn $tbls;\n \t\t}\n \t}\n }", "public function listTables()\n\t{\n\t\ttry {\n\t\t\t$dbh = $this->getDbh();\n\t\t} catch (PDOException $e) {\n\t\t\tthrow new PDOException($e->getMessage());\n\t\t}\n\t\tif ('mysql' == $this->type) {\n\t\t\t$sql = \"SHOW TABLES\";\n\t\t}\n\t\t//from Zend Db Adapter\n\t\tif ('pgsql' == $this->type) {\n\t\t\t$sql = \"SELECT c.relname AS table_name \"\n\t\t\t\t. \"FROM pg_class c, pg_user u \"\n\t\t\t\t. \"WHERE c.relowner = u.usesysid AND c.relkind = 'r' \"\n\t\t\t\t. \"AND NOT EXISTS (SELECT 1 FROM pg_views WHERE viewname = c.relname) \"\n\t\t\t\t. \"AND c.relname !~ '^(pg_|sql_)' \"\n\t\t\t\t. \"UNION \"\n\t\t\t\t. \"SELECT c.relname AS table_name \"\n\t\t\t\t. \"FROM pg_class c \"\n\t\t\t\t. \"WHERE c.relkind = 'r' \"\n\t\t\t\t. \"AND NOT EXISTS (SELECT 1 FROM pg_views WHERE viewname = c.relname) \"\n\t\t\t\t. \"AND NOT EXISTS (SELECT 1 FROM pg_user WHERE usesysid = c.relowner) \"\n\t\t\t\t. \"AND c.relname !~ '^pg_'\";\n\t\t}\n\t\tif ('sqlite' == $this->type) {\n\t\t\t$sql = \"\n\t\t\t\tSELECT name FROM sqlite_master\n\t\t\t\tWHERE type='table'\n\t\t\t\tORDER BY name\n\t\t\t\t\";\n\t\t}\n\t\t$sth = $dbh->prepare($sql);\n\t\tif (!$sth) {\n\t\t\t$errs = $dbh->errorInfo();\n\t\t\tif (isset($errs[2])) {\n\t\t\t\tthrow new Dase_DBO_Exception('could not create handle: '.$errs[2]);\n\t\t\t}\n\t\t}\n\t\t$sth->execute();\n\t\treturn ($sth->fetchAll(PDO::FETCH_COLUMN));\n\t}", "public function getTableList() {\n $sql = 'SHOW TABLES';\n\n $result = $this->connection->execute($sql);\n\n $key = 'Tables_in_' . $this->connection->getDsn()->getDatabase();\n $tables = array();\n foreach ($result as $row) {\n $tables[] = $row[$key];\n }\n\n return $tables;\n }", "public function list_tables()\n {\n return $this->fetch_all('SHOW TABLES');\n }", "function get_table_list(){\n global $conn;\n\n $list = [];\n $query_select_tables_name = \"SELECT table_name FROM information_schema.tables WHERE table_type = 'base table'\n and table_schema = '\" . constant('DB_NAME') . \"' and table_name != 'user'\";\n $query_rs = mysqli_query($conn, $query_select_tables_name);\n\n while ($row = mysqli_fetch_assoc($query_rs)) {\n $list[] = $row['table_name'];\n }\n\n return $list;\n}", "public function getTables()\n {\n $this->tables = [];\n $query = $this->dbms->queryStrictObject('SELECT TABLE_NAME, TABLE_COMMENT FROM information_schema.TABLES '\n . 'WHERE TABLE_SCHEMA = \"' . $this->escapeSQL($this->database) . '\"');\n while ($row = $query->fetch_row()) {\n if ($row[0] === TAB_PREFIX . 'admin') {\n continue; // admin table (or its rows) MUST NOT be accessed through admin.php\n }\n $this->tables[$row[0]] = $row[1];\n }\n }", "protected function get_tables_list() {\n\t\t$all_tables = array();\n\t\t$tables = array(\n\t\t\t'bitscr_content',\n\t\t\t'bitscr_courses',\n\t\t\t'bitscr_notes', //Added extra table for Notes updated by suresh on 26-6-2020\n\t\t);\n\t\tforeach ( $tables as &$table ) {\n\t\t\t$all_tables[] = $this->wp_db->prefix . $table;\n\t\t}\n\n\t\treturn $all_tables;\n\t}", "function list_tables($constrain_by_prefix = FALSE) {\n// Is there a cached result?\n if (isset($this->data_cache['table_names'])) {\n return $this->data_cache['table_names'];\n }\n if (FALSE === ($sql = $this->_list_tables($constrain_by_prefix))) {\n if ($this->db_debug || CoreLoader::$system['error_manage']) {\n return $this->display_error('db_unsupported_function');\n }\n return FALSE;\n }\n $retval = array();\n $query = $this->query($sql);\n if ($query->num_rows() > 0) {\n foreach ($query->result_array() as $row) {\n if (isset($row['TABLE_NAME'])) {\n $retval[] = $row['TABLE_NAME'];\n } else {\n $retval[] = array_shift($row);\n }\n }\n }\n $this->data_cache['table_names'] = $retval;\n return $this->data_cache['table_names'];\n }", "function getTablesList( ) {\n\t\t$iParNum = func_num_args( );\n\t\t$aPar = func_get_args( );\n\t\t\n\t\tswitch( $iParNum ) {\n\t\t\tcase 0:\n\t\t\t\t$rs = mysql_list_tables( $this->db['dbName'], $this->conn_id );\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\t$rs = mysql_list_tables( $aPar[0], $this->conn_id );\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$rs = mysql_list_tables( $aPar[0], $aPar[1] );\n\t\t\t\tbreak;\n\t\t}\n\t\t$aReturn = array( );\n\t\twhile( $rc = mysql_fetch_array( $rs ) ) {\n\t\t\t$aReturn[] = $rc;\n\t\t}\n\t\t\n\t\treturn $aReturn;\n\t}", "public function listTables()\n {\n $sql = \"SELECT tabname \"\n . \"FROM systables \";\n\n return $this->_adapter->fetchCol($sql);\n }", "function get_table_names() {\n\t\tglobal $INFO;\n\t\tmysql_query($this->utf_String);\n\t\t$result = mysql_list_tables($INFO['DBname']);\n\t\t//$result = mysql_list_tables($this->dbname);\n\t\t$num_tables = @mysql_num_rows($result);\n\t\tfor ($i = 0; $i < $num_tables; $i++)\n\t\t{\n\t\t\t$tables[] = mysql_tablename($result, $i);\n\t\t}\n\n\t\tmysql_free_result($result);\n\n\t\treturn $tables;\n\t}", "public function getTables()\n {\n $objResult = $this->query(\"SHOW TABLES\");\n $strToReturn = array();\n while ($strRowArray = $objResult->fetchRow()) {\n array_push($strToReturn, $strRowArray[0]);\n }\n return $strToReturn;\n }", "public function list_tables()\n {\n return $this->fetch_all('SELECT c.relname AS table FROM pg_class c, pg_user u '\n .\"WHERE c.relowner = u.usesysid AND c.relkind = 'r' \"\n .'AND NOT EXISTS (SELECT 1 FROM pg_views WHERE viewname = c.relname) '\n .\"AND c.relname !~ '^(pg_|sql_)' UNION \"\n .'SELECT c.relname AS table_name FROM pg_class c '\n .\"WHERE c.relkind = 'r' \"\n .'AND NOT EXISTS (SELECT 1 FROM pg_views WHERE viewname = c.relname) '\n .'AND NOT EXISTS (SELECT 1 FROM pg_user WHERE usesysid = c.relowner) '\n .\"AND c.relname !~ '^pg_'\");\n }", "public static function get_all_tables(){\n\t\tglobal $wpdb;\n\n\t\t$god_query = \"SELECT TABLE_NAME FROM information_schema.TABLES where TABLE_SCHEMA='\" . $wpdb->dbname . \"' AND TABLE_NAME LIKE '\" . $wpdb->prefix . \"%'\";\n\n\t\t//Done this way because like wp_% will return all other tables as well such as wp_2\n //so we exclude all the possibles e.g. wp_2, wp_3, wp_4 up to 9\n\t\t$not_like = null;\n if( is_multisite() && $wpdb->blogid == 1 ){\n for( $i = 1; $i <= 9; $i ++ ){\n $not_like .= \"'\" . $wpdb->prefix . $i . \"',\";\n }\n $not_like = substr( $not_like, 0, - 1 );\n $god_query .= ' AND SUBSTRING(TABLE_NAME,1,4) NOT IN (' . $not_like . ')';\n }\n\n\t\treturn $wpdb->get_results( $god_query );\n\t}", "public function admin_get_tables()\n {\n $whichTables = array();\n\n $tables_result = mysql_query('SHOW TABLE STATUS FROM `' . TYPO3_db . '`', $this->link);\n\n $this->setAllSQLVars();\n\n if (!mysql_error()) {\n while ($theTable = mysql_fetch_assoc($tables_result)) {\n $whichTables[$theTable['Name']] = $theTable;\n }\n\n $this->sql_free_result($tables_result);\n }\n\n return $whichTables;\n }", "private function getListTable()\n {\n if ($this->option('only')) {\n $tables = explode(',', trim($this->option('only')));\n } else {\n $tables = $this->schema->getTables();\n }\n\n if ($this->option('exclude')) {\n $excludeTables = explode(',', trim($this->option('exclude')));\n $tables = array_diff($tables, $excludeTables);\n }\n\n return $tables;\n }", "function getTableList() {\n\n\t\t$sql = 'SHOW TABLES';\n\t\t$query = mysql_query($sql);\n\t\t\n\t\twhile($data = mysql_fetch_array($query)) {\n\t\t\t$tables[] = $data[0];\n \t\t}\n \n \t\treturn $tables;\n\t}", "public function getTableList() {\r\n \r\n $stmt = $this->pdo->query(\"SELECT name\r\n FROM sqlite_master\r\n WHERE type = 'table'\r\n ORDER BY name\");\r\n $tables = [];\r\n while ($row = $stmt->fetch(\\PDO::FETCH_ASSOC)) {\r\n $tables[] = $row['name'];\r\n }\r\n \r\n return $tables;\r\n }", "function list_tables(){\n\t\t$database_name = $this->database_name;\n\t\treturn mysql_list_tables($database_name);\n\t}", "public static function getTablesList()\n {\n $tablesList = self::getRemoteConnection()->getAll('\n SHOW FULL TABLES\n FROM prologis2\n WHERE Table_type = \\'BASE TABLE\\'\n ');\n\n $list = [];\n foreach ($tablesList as $table) {\n $list[] = new Table($table->Tables_in_prologis2, self::getRemoteConnection());\n }\n return $list;\n }", "function getTables(){\n\t\tunset($tables);\n\t\t$sql = \"show tables\";\n\t\tif(!$result = @mysql_query($sql,$this->conId))\n\t\t\t$this->myerror();\n\t\twhile($row = @mysql_fetch_array($result)){\n\t\t\t$tables[]=$row[0];\n\t\t}\n\t\treturn $tables;\n\n\t}", "function loadTables(){\r\n $call = \\DatabaseService::newQuery( \"\r\n select `TABLE_NAME`, `TABLE_COMMENT`\r\n from `INFORMATION_SCHEMA`.`TABLES`\r\n where `table_schema`='{$this->database}'\r\n and `TABLE_NAME` not like 'rev_%'\r\n and `TABLE_NAME` not like '%Lookup'\r\n or `TABLE_NAME` = 'acc_Account'\r\n \" );\r\n\t\t\t$call->execute();\r\n $this->tables = $call->getAssociatedArray();\r\n }", "public function listTables();", "public function databaseTables()\n {\n $arrTables = array();\n $arrTablesHidden = $this->getTablesHidden();\n\n foreach ($this->Database->listTables() as $key => $value)\n {\n // Check if table is a hidden one.\n if (in_array($value, $arrTablesHidden) || preg_match(\"/synccto_temp_.*/\", $value))\n {\n continue;\n }\n\n $arrTables[] = $value;\n }\n\n return $arrTables;\n }", "private function listTables() {\n\t\t$tables = array('user', 'page', 'page_restrictions', 'revision', 'text',\n\t\t\t'pagelinks', 'imagelinks', 'categorylinks',\n\t\t\t'templatelinks', 'externallinks', 'langlinks',\n\t\t\t'site_stats', 'hitcounter',\n\t\t\t'ipblocks', 'image', 'oldimage',\n\t\t\t'recentchanges',\n\t\t\t'watchlist', 'math', 'searchindex',\n\t\t\t'interwiki', 'querycache',\n\t\t\t'objectcache', 'job', 'redirect',\n\t\t\t'querycachetwo', 'archive', 'user_groups'\n\t\t);\n\t\t\n\t\t// Allow extensions to add to the list of tables to duplicate;\n\t\t// may be necessary if they hook into page save or other code\n\t\t// which will require them while running tests.\n\t\twfRunHooks( 'ParserTestTables', array( &$tables ) );\n\n\t\treturn $tables;\n\t}", "public function list_tables()\n {\n // get tables if not cached\n if ($this->tables === null) {\n // first fetch current database name\n $d = $this->query(\"SELECT database()\");\n $d = $this->fetch_array($d);\n\n // get list of tables in current database\n $q = $this->query(\"SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES\"\n . \" WHERE TABLE_SCHEMA = ? AND TABLE_TYPE = 'BASE TABLE'\"\n . \" ORDER BY TABLE_NAME\", $d ? $d[0] : '');\n\n $this->tables = $q ? $q->fetchAll(PDO::FETCH_COLUMN, 0) : array();\n }\n\n return $this->tables;\n }", "public static function get_tables()\n {\n }", "public function getAllTables() {\n \t return $this->connection->select($this->grammar->compileGetAllTables());\n\t}", "public function listTables($strDatabase=null, $blnNoCache=false)\n\t{\n\t\tif ($strDatabase === null)\n\t\t{\n\t\t\t$strDatabase = $this->arrConfig['dbDatabase'];\n\t\t}\n\n\t\tif (!$blnNoCache && isset($this->arrCache[$strDatabase]))\n\t\t{\n\t\t\treturn $this->arrCache[$strDatabase];\n\t\t}\n\n\t\t$arrReturn = array();\n\t\t$objTables = $this->query(sprintf($this->strListTables, $strDatabase));\n\n\t\twhile ($objTables->next())\n\t\t{\n\t\t\t$arrReturn[] = current($objTables->row());\n\t\t}\n\n\t\t$this->arrCache[$strDatabase] = $arrReturn;\n\n\t\treturn $this->arrCache[$strDatabase];\n\t}", "protected function _getTables(){\r\n\t\ttry {\r\n\t\t\t$stmt = $this->handler->query('SHOW TABLES');\r\n\t\t\t$tbs = $stmt->fetchAll(PDO::FETCH_NUM);\r\n\t\t\t$i=0;\r\n\t\t\tforeach($tbs as $table){\r\n\t\t\t //echo '<br>Table: '. $table[0];\r\n\t\t\t if ( $this->useIncludeTables ) {\r\n\t\t\t //echo ' - useIncludes';\r\n\t\t\t if ( !in_array($table[0],$this->includeTables)) {\r\n\t\t\t //echo ' - exclude me';\r\n\t\t\t continue;\r\n\t\t\t }\r\n\t\t\t } elseif ( $this->useExcludeTables ) {\r\n if ( in_array($table[0],$this->excludeTables)) {\r\n continue;\r\n }\r\n }\r\n\t\t\t\t$this->tables[$i]['name'] = $table[0];\r\n\t\t\t\t$this->tables[$i]['create'] = $this->_getColumns($table[0]);\r\n\t\t\t\t//$this->tables[$i]['data'] = $this->_getData($table[0]);\r\n\t\t\t\t$i++;\r\n\t\t\t}\r\n\t\t\tunset($stmt);\r\n\t\t\tunset($tbs);\r\n\t\t\tunset($i);\r\n\r\n\t\t\treturn true;\r\n\t\t} catch (PDOException $e) {\r\n\t\t\t$this->handler = null;\r\n\t\t\t$this->error[] = $e->getMessage();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public static function getTables() {\n }", "function dbGetTables();", "public function system_table_list()\n\t{\n\t\treturn 'SELECT `TABLE_NAME` FROM `information_schema`.`TABLES`\n\t\t\tWHERE `TABLE_SCHEMA`=\\'information_schema\\'';\n\t}", "public function getListOfTables() {}", "function TableList() { /* {{{ */\n\t\tswitch($this->_driver) {\n\t\t\tcase 'mysql':\n\t\t\t\t$sql = \"select TABLE_NAME as name from information_schema.tables where TABLE_SCHEMA='\".$this->_database.\"' and TABLE_TYPE='BASE TABLE'\";\n\t\t\t\tbreak;\n\t\t\tcase 'sqlite':\n\t\t\t\t$sql = \"select tbl_name as name from sqlite_master where type='table'\";\n\t\t\t\tbreak;\n\t\t\tcase 'pgsql':\n\t\t\t\t$sql = \"select tablename as name from pg_catalog.pg_tables where schemaname='public'\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\t\t$arr = $this->getResultArray($sql);\n\t\t$res = array();\n\t\tforeach($arr as $tmp)\n\t\t\t$res[] = $tmp['name'];\n\t\treturn $res;\n\t}", "public function getTables()\r\n\t{\r\n\t\treturn db::fetchPairs(\"\r\n\t\t\tSELECT table_name FROM information_schema.tables\r\n\t\t\tWHERE table_schema = 'public' AND table_type = 'BASE TABLE'\r\n\t\t\"); \r\n\t}", "abstract function list_tables();", "public function getTablesList(){\n return $this->_get(2);\n }", "public function getTableList() {\n $sql = 'SELECT name FROM sqlite_master WHERE type = ' . $this->connection->quoteValue('table');\n\n $result = $this->connection->execute($sql);\n\n $tables = array();\n foreach ($result as $row) {\n $tables[] = $row['name'];\n }\n\n return $tables;\n }", "protected function getTables() {\n\t\t$tables = Yii::app()->db->schema->tableNames;\n\t\t$tables[] = '*';\n\t\treturn $tables;\n\t}", "public function get_tables($exclude = array()) {\r\r\n $this->connect();\r\r\n $structure = $this->query(\"SHOW TABLES FROM `\" . $this->db_name . \"`;\");\r\r\n if (is_array($structure)) {\r\r\n $tables = array();\r\r\n foreach ($structure as $k => $v) {\r\r\n if (!in_array($v[\"Tables_in_\" . $this->db_name], $exclude)) {\r\r\n $tables[] = $v[\"Tables_in_\" . $this->db_name];\r\r\n }\r\r\n }\r\r\n return $tables;\r\r\n }\r\r\n return false;\r\r\n }", "public function get_tables()\n\t{\n\t\t//return $this->mysql->query(\"SHOW FULL TABLES WHERE TABLE_TYPE LIKE 'BASE TABLE'\")->fetchAllColumn(0);\n\t\treturn $this->mysql->query(\"SHOW TABLE STATUS WHERE `Comment` NOT LIKE 'VIEW'\")->fetchAllColumn(0);\n\t}", "public function listTables()\n {\n return $this->__call(__FUNCTION__, array());\n }", "public function getTables();", "public function getTables();", "public function tables()\n {\n return array_map(\n array('Horde_String', 'lower'),\n $this->selectValues('SELECT table_name FROM USER_TABLES')\n );\n }", "public function getTables($dbName = null) {\n $sql = \"SELECT TABLE_NAME\nFROM information_schema.tables\nWHERE table_schema=DATABASE() and table_type = 'BASE TABLE'\n AND TABLE_NAME NOT IN (\n SELECT DISTINCT TABLE_NAME\n FROM information_schema.key_column_usage WHERE table_schema=DATABASE()\n AND referenced_table_name IS NOT NULL)\n \n union all\n \n SELECT DISTINCT TABLE_NAME\nFROM information_schema.referential_constraints\nWHERE CONSTRAINT_SCHEMA=DATABASE()\n AND referenced_table_name NOT IN\n (SELECT DISTINCT TABLE_NAME\n FROM information_schema.table_constraints\n WHERE constraint_type = 'FOREIGN KEY')\n AND TABLE_NAME NOT IN\n (SELECT DISTINCT TABLE_NAME\n FROM information_schema.referential_constraints\n WHERE referenced_table_name IN\n (SELECT DISTINCT TABLE_NAME\n FROM information_schema.table_constraints\n WHERE constraint_type = 'FOREIGN KEY'))\n \n union all \n SELECT DISTINCT TABLE_NAME\nFROM information_schema.referential_constraints\nWHERE CONSTRAINT_SCHEMA=DATABASE()\n AND referenced_table_name IN\n (SELECT DISTINCT TABLE_NAME\n FROM information_schema.table_constraints\n WHERE constraint_type = 'FOREIGN KEY'); \";\n \t\t$cmd = Yii::$app->db->createCommand ( $sql );\n \t\t$tables = $cmd->queryColumn ();\n// Yii::warning($tables);\n \t\treturn $tables;\n \t}", "private function tables(){\n static $tables = array();\n if(count($tables) < 1){\n $result = $this->_db->query('SHOW TABLES');\n foreach($result as $row){\n $tables[] = $row[0];\n }\n }\n return $tables;\n }", "function getTables() {\n\t\t$out = array();\n\t\t\n\t\t// *** Retrieve tables listing and cache\n\t\tif (!$this->cache_tables) {\n\t\t\tif ($this->connection) {\n\t\t\t\t$rows = $this->query('SHOW TABLES;');\n\t\t\t\n\t\t\t\tforeach ($rows as $row) {\n\t\t\t\t\t$this->cache_tables[] = $row[0];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// *** Return cached values\n\t\t$out = $this->cache_tables;\n\t\t\n\t\treturn $out;\n\t}", "protected static function _getTables()\r\n\t{\r\n\t\treturn array();\r\n\t}", "function get_all_tables($database,$db=null){\n\tif($db === null){\n\t\t$db=getDBFromSession($database);\n\t\t$closeFlag=1;\n\t}\n\n\t$_dbs=fetch_arrays_from_sql($db, \"show tables\");\n\n\tif(isset($closeFlag)){\n\t\t$db->close();\n\t}\n\t$tables=array();\n\n\tforeach($_dbs as $row){\n\n\t\t$tables[]=array('name'=>$row[0]);\n\t}\n\treturn $tables;\n}", "public function list_tables ( $like = NULL )\n\t{\n\t\treturn array();\n\t}", "function get_tables()\n{\n $tables = array();\n\n $query = '\nSHOW TABLES\n;';\n $result = pwg_query($query);\n\n while ($row = pwg_db_fetch_row($result))\n {\n if (preg_match('/^'.PREFIX_TABLE.'/', $row[0]))\n {\n $tables[] = $row[0];\n }\n }\n\n return $tables;\n}", "public function admin_get_tables() {}", "protected function getTables()\n {\n $stmt = $this->dbRead->query('SHOW TABLES');\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_COLUMN);\n }", "function get_tables()\r\n\t{\r\n\t\t$tables = mysql_query(\"SHOW TABLES FROM `{$this->db}`\", $this->cnx) or $this->error(mysql_error());\r\n\t\t\r\n\t\t//Create a list of tables to be exported\r\n\t\t$table_list = array();\r\n\t\twhile($t = mysql_fetch_array($tables)) {\r\n\t\t\tarray_push($table_list, $t[0]);\r\n\t\t}\r\n\t\treturn $table_list;\r\n\t}", "public function systemTableList(): string\n\t{\n\t\treturn 'SELECT `TABLE_NAME` FROM `information_schema`.`TABLES`\n\t\t\tWHERE `TABLE_SCHEMA`=\\'information_schema\\'';\n\t}", "public function getTables(){\n return $this->getPDO()->query('SHOW TABLES')->fetchAll(PDO::FETCH_COLUMN, 0);\n }", "public function list_tables()\n\t{\n\t\treturn $this->sql_tables;\n\t}", "public function databaseTablesNoneRecommendedWithHidden()\n {\n // None recommended tables\n $arrBlacklist = deserialize($GLOBALS['TL_CONFIG']['syncCto_database_tables']);\n if (!is_array($arrBlacklist))\n {\n $arrBlacklist = array();\n }\n\n $arrHiddenlist = deserialize($GLOBALS['SYC_CONFIG']['table_hidden']);\n if (!is_array($arrHiddenlist))\n {\n $arrHiddenlist = array();\n }\n\n $arrTablesPermission = $this->BackendUser->syncCto_tables;\n\n $arrTables = array();\n\n foreach ($this->Database->listTables() as $key => $value)\n {\n if (!in_array($value, $arrBlacklist) && !in_array($value, $arrHiddenlist) || preg_match(\"/synccto_temp_.*/\", $value))\n {\n continue;\n }\n\n if (is_array($arrTablesPermission) && !in_array($value, $arrTablesPermission) && $this->BackendUser->isAdmin != true)\n {\n continue;\n }\n\n $arrTables[$value] = $this->getTableMeta($value);\n }\n\n return $arrTables;\n }", "function getTables(&$Model, $connection = 'default'){\n\t\t\t$this->db = ConnectionManager::getDataSource($connection);\n\t\t\t$tables = $this->db->query('SHOW TABLES;');\n\t\t\t$databseName = $this->db->config['database'];\n\n\t\t\tunset($this->db);\n\n\t\t\treturn Set::extract('/TABLE_NAMES/Tables_in_'.$databseName, $tables);\n\t\t}", "public function listTables() {\n\t\treturn $this->tables;\n\t}", "function getTables();", "public function listTables(): array;", "public function databaseTablesNoneRecommended()\n {\n // None recommended tables\n $arrBlacklist = deserialize($GLOBALS['TL_CONFIG']['syncCto_database_tables']);\n if (!is_array($arrBlacklist))\n {\n $arrBlacklist = array();\n }\n\n $arrTablesPermission = $this->BackendUser->syncCto_tables;\n\n $arrTables = array();\n\n foreach ($this->databaseTables() as $key => $value)\n {\n if (!in_array($value, $arrBlacklist) || preg_match(\"/synccto_temp_.*/\", $value))\n {\n continue;\n }\n\n if (is_array($arrTablesPermission) && !in_array($value, $arrTablesPermission) && $this->BackendUser->isAdmin != true)\n {\n continue;\n }\n\n $arrTables[$value] = $this->getTableMeta($value);\n }\n\n return $arrTables;\n }", "public function showTables()\n {\n $array = array();\n $sth = $this->dbh->prepare('SHOW tables'); \n $sth->execute(); \n $tableinfo = $sth->fetchAll(\\PDO::FETCH_ASSOC); \n foreach ($tableinfo as $key => $value) { \n $array[] = $value['Tables_in_' . $this->database];\n } \n return $array;\n }", "static private function retrieveTableNames() {\n\t\tif (!empty(self::$tableNameCache)) {\n\t\t\treturn;\n\t\t}\n\n\t\tself::$tableNameCache = $GLOBALS['TYPO3_DB']->admin_get_tables();\n\t}", "public function getTableNames()\n\t{\n\t\t$result = $this->nativeQuery('SHOW TABLES');\n\t\tif (!$result) throw new DB_QueryException(\"Show tables query failed: \" . $this->native->error);\n\t\tif ($result->num_rows == 0) return null;\n\t\t\n\t\t$tables = array();\n\t\twhile (($row = $result->fetch_row())) $tables[] = $row[0];\n\t\treturn $tables;\n\t}", "public function listTables()\n {\n list($sql, $params) = $this->_dialect->listTables($this->_connection->config());\n $result = [];\n $statement = $this->_connection->execute($sql, $params);\n while ($row = $statement->fetch()) {\n $result[] = $row[0];\n }\n $statement->closeCursor();\n return $result;\n }", "abstract public function getTables($database);", "function list_tables() {\n\t\tif (!$this->conn) return false;\n\t\t\r\n\t\t$result = mysql_query('SHOW TABLES', $this->conn);\r\n\t\t\n\t\t$ret = new DataObjectSet();\r\n\t\tif ($result)\r\n\t\t\twhile ($row = mysql_fetch_row($result)) {\n\t\t\t\t$table = $row[0];\n\t\t\t\t$o = new DataObject;\n\t\t\t\t$o->table = $table;\n\t\t\t\t$o->selected = !isset($this->exclude_tables[$table]);\n\t\t\t\t$o->records = $this->count_records($table);\n\t\t\t\t$o->small = ($o->records < 200);\n\t\t\t\t$ret->push($o);\n\t\t\t}\n\t\t\n\t\treturn $ret;\n\t}", "public function list_tables(&$strip = \"\")\n {\n $result = $this->query(\"SHOW tables\");\n if (!$result)\n return array(\n $this->get_error()\n );\n $ret_value = array();\n while (false != ($data = $result->fetchRow( MYSQL_ASSOC )))\n {\n $ret_value[] = array_shift( $data );\n }\n if ($strip != \"\")\n {\n foreach ($ret_value as &$ref)\n $ref = str_replace($strip, \"\", $ref);\n }\n return $ret_value;\n }", "function get_tables(){\n //\n //Get the table names\n $results = $this->query(\n \"select \"\n . \"table_name \"\n . \"from \"\n . \"information_schema.tables \"\n . \"where \"\n . \"table_schema = '$this->dbname'\" \n );\n //\n //Cerat an empty list of tables\n $tables = [];\n //\n //Retrieve the results an insert the indexed tables\n while($result = $results->fetch()){\n //\n //Get the table name\n $tname = $result[0]; \n //\n $tables[$tname] = new table($tname);\n }\n //\n //return teh tables\n return $tables;\n }", "public function getTableList() {\n\t\tif(! is_dir($this->Dir))\n\t\t\treturn array();\n\t\tif (!is_array($this->tbl_list)) {\n\t\t\tglobal $dbcnf;\n\t\t\t$this->tbl_list = array();\n\t\t\t$dh = opendir($this->Dir);\n\t\t\twhile(($file = readdir($dh)) != false) {\n\t\t\t\tif( is_file($this->Dir.$file) && ( substr($file,-8,8) == \".tbl.php\")) {\n\t\t\t\t\t$tableName = substr($file,0,-8);\n\t\t\t\t\t$this->tbl_list[]=$tableName;\n\t\t\t\t}\n\t\t\t}\n\t\t\tforeach($this->tbl_list as $table_name)\n\t\t\t\trequire_once($this->Dir.$table_name.\".tbl.php\");\n\n\t\t\t$Max = count($this->tbl_list);\n\t\t\tfor($i = 0;$i<$Max-1;$i++) {\n\t\t\t\t$min = $i;\n\t\t\t\tfor($j = $i+1;$j<$Max;$j++)\n\t\t\t\t\tif($this->compareTable($this->tbl_list[$j],$this->tbl_list[$min])<0)\n\t\t\t\t\t\t$min = $j;\n\t\t\t\tif($min != $i) {\n\t\t\t\t\t$x = $this->tbl_list[$i];\n\t\t\t\t\t$this->tbl_list[$i] = $this->tbl_list[$min];\n\t\t\t\t\t$this->tbl_list[$min] = $x;\n\t\t\t\t}\n\t\t\t}\n\t\t\tglobal $connect;\n\t\t\t$connect->printDebug(\"tbl_list:\".print_r($this->tbl_list,true));\n\t\t}\n\t\treturn $this->tbl_list;\n\t}", "function show_tables()\n\t{\n\t\t$q = $this->db->query('SHOW TABLES FROM intralist');\n\t\tforeach ($q->result() as $table):\n\t\t\t$names[] = $table;\n\t\tendforeach;\n\t\treturn $names;\n\t}", "private function getTables()\n {\n $sql = \"show tables\";\n $tables = $this->db->query( $sql );\n if( is_array($tables) && 0 < count($tables) )\n {\n foreach( $tables AS $table )\n {\n $name = current( $table );\n \n // Check if database table is of myisam type\n // Repair only works on myisam\n $sql = sprintf('SHOW TABLE STATUS WHERE Name = \"%s\"', $name);\n $tableInfo = $this->db->query( $sql );\n if( is_array($tableInfo) && 1 === count($tableInfo) )\n {\n $info = current($tableInfo);\n if( 'myisam' === strtolower( $info['Engine'] ) )\n {\n $this->tables[] = $name;\n $this->length = ( $this->length < mb_strlen( $name ) ? mb_strlen( $name ) : $this->length );\n }\n }\n }\n }\n }", "public function getTables() {\n return $this->dbDao->getTables();\n }", "public function getTablesDb(){\n // para obtener las tablas de la base de datos\n $con = Conexion::getInstance();\n $con->conectar();\n $sql = \"SHOW FULL TABLES FROM sistdelivery\";\n $result = $con->querry($sql);\n while ($record = mysqli_fetch_array($result)){\n echo $record['Tables_in_sistdelivery'].\", \".$record['Table_type'].\"<br>\";\n }\n }", "private function getTables($dbname){\r\n\t\tglobal $conn;\r\n\t\r\n\t\t// Obtain SQL code.\r\n\t\t$sql = $this->mySql(1, $dbname);\r\n\t\t\r\n\t\t$result = $conn->query($sql);\r\n\t\t// If table search is successful, assign table names to variable array\r\n\t\t$myTables = array();\r\n\t\tif($result->num_rows > 0){\r\n\t\t\t$i = 0;\r\n\t\t\twhile($row = $result->fetch_assoc()){\r\n\t\t\t\t$myTables[$i] = $row['TABLE_NAME'];\r\n\t\t\t\t$i++;\r\n\t\t\t}\r\n\t\t} else{\r\n\t\t\techo \"Can't read tables\";\r\n\t\t}\r\n\t\t\r\n\t\treturn $myTables;\r\n\t}", "public function listTableNames()\n {\n $sql = $this->_platform->getListTablesSQL($this->_database);\n\n $tables = $this->_conn->fetchAll($sql);\n $tableNames = $this->_getPortableTablesList($tables);\n return $this->filterAssetNames($tableNames);\n }", "private function loadTables()\n\t{\n\t\treturn $this->_load_tables('/mydoli/sql/');\n\t}", "public static function getSystemDBTables()\r\n {\r\n static $tables = null;\r\n\r\n if ($tables == null)\r\n $tables = array('biz__relation', 'biz__list', 'biz__search');\r\n\r\n return $tables;\r\n }", "protected function _getTables()\n\t{\n\t\t/* Grab all tables to convert */\n\t\t$stmt = \\IPSUtf8\\Db::i()->prepare( \"SHOW TABLES\" );\n\t\t$stmt->execute();\n\t\t$stmt->bind_result( $tableName );\n\t\t\n\t\t$tables = array();\n\t\t$allTables = array();\n\t\t$data = array( 'version' => \\IPSUtf8\\Convert::VERSION_ID, 'tableCount' => 0, 'totalCount' => 0, 'convertedCount' => 0, 'charSets' => array() );\n\t\t\n\t\tif ( defined( 'FORCE_CONVERT' ) AND FORCE_CONVERT === TRUE )\n\t\t{\n\t\t\t$data['force_conversion'] = 1;\n\t\t}\n\t\t\n\t\twhile ( $stmt->fetch() === true )\n\t\t{\n\t\t\t/* Skip x_utf_ prefixed tables in case we don't have a prefix set */\n\t\t\tif ( mb_substr( $tableName, 0, 6 ) === 'x_utf_' )\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif ( mb_substr( $tableName, 0, 5 ) === 'orig_' )\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif ( mb_substr( $tableName, 0, mb_strlen( \\IPSUtf8\\Db::i()->prefix ) ) === \\IPSUtf8\\Db::i()->prefix )\n\t\t\t{\n\t\t\t\t$tableNameNoPrefix = $tableName;\n\t\t\t\t\n\t\t\t\tif ( \\IPSUtf8\\Db::i()->prefix )\n\t\t\t\t{\n\t\t\t\t\t$tableNameNoPrefix = mb_substr( $tableName, mb_strlen( \\IPSUtf8\\Db::i()->prefix ) );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$tables[] = $tableNameNoPrefix;\n\t\t\t}\n\t\t}\n\t\t\n\t\tforeach( $tables as $table )\n\t\t{\n\t\t\t/* Get count */\n\t\t\t$row = \\IPSUtf8\\Db::i()->query( \"SELECT COUNT(*) as count FROM `\" . \\IPSUtf8\\Db::i()->prefix . \"{$table}`\" )->fetch_assoc();\n\t\t\t$count = $row['count'];\n\t\t\t\n\t\t\t$data['totalCount'] += $count;\n\t\t\t$data['tableCount']++;\n\t\t\t\n\t\t\t$row = \\IPSUtf8\\Db::i()->query( \"SHOW CREATE TABLE `\" . \\IPSUtf8\\Db::i()->prefix . \"{$table}`\" )->fetch_assoc();\n\t\t\n\t\t\tif ( preg_match( '#\\scharset=([a-z0-9]+?)(\\s|$)#i', $row['Create Table'], $matches ) )\n\t\t\t{\n\t\t\t\t$tblCharset = $matches[1];\n\t\t\t\t\n\t\t\t\t$data['charSets'][ mb_strtolower( $tblCharset ) ][] = $table;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$row = \\IPSUtf8\\Db::i()->query( \"SHOW TABLE STATUS WHERE Name='\" . \\IPSUtf8\\Db::i()->prefix . \"{$table}'\" )->fetch_assoc();\n\t\t\t\t\n\t\t\t\tif ( isset( $row['Collation'] ) )\n\t\t\t\t{\n\t\t\t\t\t$tblCharset = mb_substr( $row['Collation'], 0, strpos( $row['Collation'], '_' ) );\n\t\t\t\t\t\n\t\t\t\t\t$data['charSets'][ mb_strtolower( $tblCharset ) ][] = $table;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$data['charSets'][ mb_strtolower( \\IPSUtf8\\Convert::i()->database_charset ) ][] = $table;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/* Get other data */\n\t\t\t$allTables[ $table ] = array(\n\t\t\t\t'name' => $table,\n\t\t\t\t'definition' => \\IPSUtf8\\Db::i()->getTableDefinition( $table ),\n\t\t\t\t'count' => $count,\n\t\t\t\t'charset' => $tblCharset\n\t\t\t);\n\t\t}\n\t\t\n\t\treturn array( 'tables' => $allTables, 'data' => $data );\n\t}", "public function getTables()\n {\n $tables = [];\n $table_schemas = $this->schema_db()->get('*.schema');\n foreach ($table_schemas as $key => $table_info) {\n $tables[] = $table_info['table_name'];\n }\n\n return $tables;\n }", "public function getTables($unPrefix = true)\r\n {\r\n $cache = $this->getCache();\r\n if (!$cache->get($this->tables, array('id' => 'tables'))) {\r\n if (is_null($this->tables)) {\r\n $this->tables = array();\r\n $stmt = $this->query('SHOW TABLES');\r\n $this->tables['raw'] = $stmt->fetchAll(db::FETCH_COLUMN);\r\n $this->tables['unprefix'] = array();\r\n foreach ($this->tables['raw'] as $r) {\r\n $this->tables['unprefix'][$r] = $this->cfg->prefix ? str_replace($this->cfg->prefix, '', $r) : $r;\r\n }\r\n }\r\n $cache->save();\r\n }\r\n\r\n return $this->tables[$unPrefix ? 'raw' : 'unprefix'];\r\n }", "public function list_tables($constrain_by_prefix = FALSE)\n\t{\n\t\t// Is there a cached result?\n\t\tif (isset($this->data_cache['table_names']))\n\t\t{\n\t\t\treturn $this->data_cache['table_names'];\n\t\t}\n\n\t\tif (FALSE === ($sql = $this->_list_tables($constrain_by_prefix)))\n\t\t{\n\t\t\treturn ($this->db_debug) ? $this->display_error('db_unsupported_function') : FALSE;\n\t\t}\n\n\t\t$this->data_cache['table_names'] = array();\n\t\t$query = $this->query($sql);\n\n\t\tforeach ($query->result_array() as $row)\n\t\t{\n\t\t\t// Do we know from which column to get the table name?\n\t\t\tif ( ! isset($key))\n\t\t\t{\n\t\t\t\tif (isset($row['table_name']))\n\t\t\t\t{\n\t\t\t\t\t$key = 'table_name';\n\t\t\t\t}\n\t\t\t\telseif (isset($row['TABLE_NAME']))\n\t\t\t\t{\n\t\t\t\t\t$key = 'TABLE_NAME';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t/* We have no other choice but to just get the first element's key.\n\t\t\t\t\t * Due to array_shift() accepting its argument by reference, if\n\t\t\t\t\t * E_STRICT is on, this would trigger a warning. So we'll have to\n\t\t\t\t\t * assign it first.\n\t\t\t\t\t */\n\t\t\t\t\t$key = array_keys($row);\n\t\t\t\t\t$key = array_shift($key);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->data_cache['table_names'][] = $row[$key];\n\t\t}\n\n\t\treturn $this->data_cache['table_names'];\n\t}", "public function getTables() {\n return $this->getPDO()->query('SHOW TABLES')->fetchAll(PDO::FETCH_COLUMN, 0);\n }", "abstract public function list_tables($like = NULL);", "public function showTables()\n\t{\n\t\t//prepare and execute query\n\t\t$stmt\t\t= $this->conn->prepare('SHOW TABLES');\n\t\t$stmt->execute();\n\t\treturn $stmt->fetchAll(PDO::FETCH_COLUMN);\n\t}", "public function list_tables()\n\t\t{\n\t\t\t$this->result = mssql_query(\"show tables\");\n\t\t\t$this->query = \"show tables\";\n\t\t\t\n\t\t\tif ($this->result)\n\t\t\t{\n\t\t\t\t$tables = array();\n\t\t\t\twhile($row = mssql_fetch_array($this->result))\n\t\t\t\t{\n\t\t\t\t\t$tables[] = $row[0];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tforeach ($tables as $table)\n\t\t\t\t{\n\t\t\t\t\tprint $table . \"<br />\";\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function getTablesForDB(knjdb_db $db){\n\t\t\treturn $this->knjdb->tables()->getTables();\n\t\t}", "public function getTables(): array\n {\n $query = 'SHOW TABLES';\n return Utils::flatArray(Config::$dbEngine->select($query));\n }", "public function list_tables()\n\t\t{\n\t\t\t$this->result = mysqli_query($this->con, \"show tables\");\n\t\t\t$this->query = \"show tables\";\n\t\t\t\n\t\t\tif ($this->result)\n\t\t\t{\n\t\t\t\t$tables = array();\n\t\t\t\twhile($row = mysqli_fetch_array($this->result))\n\t\t\t\t{\n\t\t\t\t\t$tables[] = $row[0];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tforeach ($tables as $table)\n\t\t\t\t{\n\t\t\t\t\tprint $table . \"<br />\";\n\t\t\t\t}\n\t\t\t}\n\t\t}", "protected function _fetchTableList($schema)\n {\n if ($schema) {\n $cmd = \"\n SELECT name FROM {$schema}.sqlite_master WHERE type = 'table'\n ORDER BY name\n \";\n } else {\n $cmd = \"\n SELECT name FROM sqlite_master WHERE type = 'table'\n UNION ALL\n SELECT name FROM sqlite_temp_master WHERE type = 'table'\n ORDER BY name\n \";\n }\n \n return $this->fetchCol($cmd);\n }", "function getImportTables(){\n\t\t$res = mysql_query(\"SHOW TABLES LIKE '\".$this->tablename.\"__import_%'\", $this->db);\n\t\tif ( !$res ){\n\t\t\ttrigger_error(\"Error getting import table list for table '\".$this->tablename.\"'.\".Dataface_Error::printStackTrace(), E_USER_ERROR);\n\t\t}\n\t\t\n\t\t$tables = array();\n\t\twhile ( $row = mysql_fetch_row($res) ){\n\t\t\t$tables[] = $row[0];\n\t\t}\n\t\tmysql_free_result($res);\n\t\treturn $tables;\n\t}", "protected function getDatabaseStructureTables()\n {\n // Listing all tables from database\n if (empty($this->dumpSettings['include-tables'])) {\n // include all tables for now, blacklisting happens later\n foreach ($this->dbHandler->query($this->typeAdapter->showTables($this->dbName)) as $row) {\n $this->tables[] = current($row);\n }\n } else {\n // include only the tables mentioned in include-tables\n foreach ($this->dbHandler->query($this->typeAdapter->showTables($this->dbName)) as $row) {\n if (in_array(current($row), $this->dumpSettings['include-tables'], true)) {\n $this->tables[] = current($row);\n $elem = array_search(\n current($row),\n $this->dumpSettings['include-tables']\n );\n unset($this->dumpSettings['include-tables'][$elem]);\n }\n }\n }\n\n return;\n }" ]
[ "0.75700676", "0.7472323", "0.7464422", "0.7464063", "0.74524754", "0.7436808", "0.742689", "0.7422102", "0.74095166", "0.7407504", "0.74041337", "0.72903985", "0.7290235", "0.72724974", "0.72645813", "0.7222542", "0.72132856", "0.72129965", "0.72129804", "0.72126704", "0.72071826", "0.7198465", "0.71892977", "0.7188466", "0.7173312", "0.71651167", "0.7151135", "0.7149857", "0.7146149", "0.7143419", "0.71430135", "0.71391165", "0.7123795", "0.7114135", "0.7110833", "0.7109628", "0.7107505", "0.710718", "0.7091912", "0.70880336", "0.70860666", "0.7073184", "0.70719224", "0.7055011", "0.7053768", "0.70438087", "0.7034705", "0.70333815", "0.70333815", "0.7016854", "0.701453", "0.7012592", "0.7011551", "0.70018446", "0.6990925", "0.6990525", "0.69753236", "0.69741493", "0.69689846", "0.69621766", "0.69600517", "0.6959201", "0.69378877", "0.6936416", "0.693376", "0.6932031", "0.69274366", "0.69138104", "0.6907506", "0.68885624", "0.6886467", "0.6886163", "0.6883959", "0.6875553", "0.68717605", "0.6869734", "0.6866613", "0.6850555", "0.6846859", "0.68381804", "0.6831435", "0.6825247", "0.68128604", "0.6811077", "0.6807071", "0.6805884", "0.6805828", "0.68007547", "0.6794272", "0.6789655", "0.6788412", "0.6786538", "0.678533", "0.6780453", "0.6772013", "0.67580366", "0.6750039", "0.6744405", "0.67383844", "0.67070305" ]
0.87507844
0
/ function createTranslationTable($model) This function creates a translation table for the table passed as param
/ функция createTranslationTable($model) Эта функция создает таблицу перевода для переданной в качестве параметра таблицы
function createTranslationTable($table_name){ $tableName = Inflector::singularize($table_name); $this->query("CREATE TABLE `".$tableName."_translations` ( `id` INT(10) NOT NULL AUTO_INCREMENT, `locale` VARCHAR(6) NOT NULL, `model` VARCHAR(255) NOT NULL, `foreign_key` INT(10) NOT NULL, `field` VARCHAR(255) NOT NULL, `content` TEXT NULL, PRIMARY KEY (`id`), INDEX `locale` (`locale`), INDEX `model` (`model`), INDEX `row_id` (`foreign_key`), INDEX `field` (`field`) )COLLATE='utf8_general_ci' ENGINE=InnoDB;"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createModelTable(){\n $this->dbc->drop_table_by_name($this->model['table']);\n $this->dbc->create_table_by_model($this->model);\n }", "public function buildCreateTableSQL( $model, $if_not_exists = false );", "public function createTable($model){\n //Init the model\n $model = new $model();\n\n $name = str_replace(OrmConnector::$quoteSeparator, '', $model->tableName);\n $tables = $model->rawQuery(\"SHOW TABLES LIKE '\".$name.\"'\")->run();\n\n if($tables && count($tables) > 0){\n return;\n }\n\n //Prepare query\n $query = \"CREATE TABLE \".$model->tableName.\" (\";\n $columns = array();\n $createLog = array();\n $this->unique = array();\n $this->index = array();\n\n //Create the ID column\n $columns[] = $model->getIdName().\" INT NOT NULL AUTO_INCREMENT PRIMARY KEY\";\n\n //Check all rows and make specific query\n /** @var $structure Array */\n foreach($model::$structure as $name => $column){\n $columns[] = $this->makeRowSQL($name, $column);\n $createLog[] = $name;\n }\n\n //create the index query\n if(count($this->index)){\n $columns[] = \"INDEX (\".join(',', $this->index).\")\";\n }\n\n //create the unique query\n if(count($this->unique)){\n $columns[] = \"UNIQUE (\".join(',', $this->unique).\")\";\n }\n\n //finish the query\n $query .= join(',', $columns).\" )\";\n\n //check if a engine is specified on the model\n if(property_exists($model, 'engine')){\n /** @var $engine String */\n $query .= \" ENGINE = \".$model::$engine;\n }else{\n $query .= \" ENGINE = INNODB\";\n }\n\n //check if a engine is specified on the model\n if(property_exists($model, 'encode')){\n /** @var $encode String */\n $set = array_shift(explode('_', $model::$encode));\n $query .= \" CHARACTER SET $set COLLATE \".$model::$encode;\n }else{\n $query .= \" CHARACTER SET utf8 COLLATE utf8_unicode_ci\";\n }\n\n //create the table\n $test = $model->reset()->rawQuery($query)->run(true);\n\n if(!$test){\n $errors = OrmWrapper::$log;\n $error = array_pop($errors);\n $sql = array_pop($errors);\n print_r($error->getMessage().\"\\n\".$sql.\"\\n\\n\");\n exit(0);\n }\n\n print \"Table \".$model->tableName.\" created \\n\";\n }", "public function creating(Model $model){\n\n $translationRepository = \\App::make(TranslationRepository::class);\n $locales = \\App::make(LanguageRepository::class)->all();\n\n\n foreach ($model->translatableAttributes() as $attribute) {\n\n //check for multiple translations being saved\n if(is_array($model->getRawAttribute($attribute))){\n\n foreach ($model->getRawAttribute($attribute) as $locale => $translation){\n if($translation != ''){\n $translationRepository->updateByCode($locale, $model->translationCodeFor($attribute), $translation);\n }\n }\n\n //set attribute to default localized string\n $model->setAttribute($attribute, $model->getRawAttribute($attribute)[$translationRepository->defaultLocale]);\n }\n\n }\n }", "public static function rdv_create_table_message_function();", "public function createTable()\n {\n $table = self::$table_name;\n $table_source = FRAMEWORK_TABLE_PREFIX.'basic_i18n_source';\n $table_file = FRAMEWORK_TABLE_PREFIX.'basic_i18n_scan_file';\n $SQL = <<<EOD\n CREATE TABLE IF NOT EXISTS `$table` (\n `reference_id` INT(11) NOT NULL AUTO_INCREMENT,\n `locale_id` INT(11) NOT NULL DEFAULT -1,\n `file_id` INT(11) NOT NULL DEFAULT -1,\n `line_number` INT(11) NOT NULL DEFAULT -1,\n `locale_usage` ENUM('FORM_FIELD','FORM_LABEL','ALERT','TRANSLATOR','TWIG','UNKNOWN') NOT NULL DEFAULT 'UNKNOWN',\n `timestamp` TIMESTAMP,\n PRIMARY KEY (`reference_id`),\n INDEX (`locale_id`, `file_id`),\n CONSTRAINT\n FOREIGN KEY (`locale_id`)\n REFERENCES `$table_source` (`locale_id`)\n ON DELETE CASCADE,\n CONSTRAINT\n FOREIGN KEY (`file_id`)\n REFERENCES `$table_file` (`file_id`)\n ON DELETE CASCADE\n )\n COMMENT='Locale references for the localeEditor'\n ENGINE=InnoDB\n AUTO_INCREMENT=1\n DEFAULT CHARSET=utf8\n COLLATE='utf8_general_ci'\nEOD;\n try {\n $this->app['db']->query($SQL);\n $this->app['monolog']->addDebug(\"Created table '\".self::$table_name);\n } catch (\\Doctrine\\DBAL\\DBALException $e) {\n throw new \\Exception($e);\n }\n }", "public function createModel($model, $table_fields){\r\n return $this->createTemplate(\"model\", MODEL_PATH, \"model\" . $model, \r\n array(\r\n \"table\" => $model,\r\n \"model_name\" => \"Model\" . ucwords($model),\r\n \"model\" => ucwords($model),\r\n \"table_fields\" => $table_fields,\r\n )\r\n );\r\n }", "public function generateTable($obj)\n {\n $iname = $obj->tableName().'_i18n';\n $res = $this->migration_createI18nTable($obj,$iname);\n if(PEAR::isError($res)) {\n trigger_error('failed creating '.$iname.' : '.$res->getMessage().' : '.$res->userinfo,E_USER_WARNING);\n $obj->rollback();\n return false;\n }\n $res = $this->migration_createI18nIndexes($obj,$iname);\n if(PEAR::isError($res)) {\n trigger_error('failed creating indexes for '.$iname.' : '.$res->getMessage().' : '.$res->userinfo,E_USER_WARNING);\n $obj->rollback();\n return false;\n }\n $res = $this->migration_copyDataToI18n($obj,$iname);\n $res = $this->migration_removeNonI18nFields($obj,$iname);\n if(PEAR::isError($res)) {\n trigger_error('failed removing non i18n fields for '.$iname.' : '.$res->getMessage().' : '.$res->userinfo,E_USER_WARNING);\n $obj->rollback();\n return false;\n }\n $res = $this->migration_rebuildObjects($obj,$iname);\n $res = $this->migration_removeI18nFieldsFromOriginal($obj,$iname);\n if(PEAR::isError($res)) {\n trigger_error('failed removing i18n fields from '.$obj->tableName().' : '.$res->getMessage().' : '.$res->userinfo,E_USER_WARNING);\n $obj->rollback();\n return false;\n }\n }", "public function setupModel() {\n\t\tswitch ($this->dbType()) {\n\t\tcase 'mysql': default:\n\t\t\t$theSql = \"CREATE TABLE IF NOT EXISTS {$this->getTableName()} \".\n\t\t\t\t\"( namespace CHAR(40) NOT NULL\".\n\t\t\t\t\", \".static::MAPKEY_NAME.\" CHAR(40) NOT NULL\".\n\t\t\t\t\", value NVARCHAR(250) NULL\".\n\t\t\t\t\", val_def NVARCHAR(250) NULL\".\n\t\t\t\t\", PRIMARY KEY (namespace, \".static::MAPKEY_NAME.\")\".\n\t\t\t\t') ' . CommonMySql::TABLE_SPEC_FOR_UNICODE;\n\t\t}\n\t\t$this->execDML($theSql);\n\t\t$this->debugLog($this->getRes('install/msg_create_table_x_success/'.$this->getTableName()));\n\t}", "function create_table()\n {\n }", "function create_table()\n {\n }", "public static function rdv_create_table_function();", "public static function localization_text_default(TextModel $model)\n {\n // model: Indoraptor\\Localization\\TextModel\n // table: default\n $model->insert(['keyword' => 'accordion', 'type' => 'sys-defined'], ['mn' => ['text' => 'Аккордеон'], 'en' => ['text' => 'Accordion']]);\n $model->insert(['keyword' => 'account', 'type' => 'sys-defined'], ['mn' => ['text' => 'Хэрэглэгч'], 'en' => ['text' => 'Account']]);\n $model->insert(['keyword' => 'accounts', 'type' => 'sys-defined'], ['mn' => ['text' => 'Хэрэглэгчид'], 'en' => ['text' => 'Accounts']]);\n $model->insert(['keyword' => 'action', 'type' => 'sys-defined'], ['mn' => ['text' => 'Үйлдэл'], 'en' => ['text' => 'Action']]);\n $model->insert(['keyword' => 'actions', 'type' => 'sys-defined'], ['mn' => ['text' => 'Үйлдлүүд'], 'en' => ['text' => 'Actions']]);\n $model->insert(['keyword' => 'active', 'type' => 'sys-defined'], ['mn' => ['text' => 'Идэвхитэй'], 'en' => ['text' => 'Active']]);\n $model->insert(['keyword' => 'add', 'type' => 'sys-defined'], ['mn' => ['text' => 'Нэмэх'], 'en' => ['text' => 'Add']]);\n $model->insert(['keyword' => 'address', 'type' => 'sys-defined'], ['mn' => ['text' => 'Хаяг'], 'en' => ['text' => 'Address']]);\n $model->insert(['keyword' => 'admins', 'type' => 'sys-defined'], ['mn' => ['text' => 'Удирдах хэрэглэгчид'], 'en' => ['text' => 'Admins']]);\n $model->insert(['keyword' => 'all', 'type' => 'sys-defined'], ['mn' => ['text' => 'Бүгд'], 'en' => ['text' => 'All']]);\n $model->insert(['keyword' => 'accept', 'type' => 'sys-defined'], ['mn' => ['text' => 'Зөвшөөрөх'], 'en' => ['text' => 'Accept']]);\n $model->insert(['keyword' => 'alerts', 'type' => 'sys-defined'], ['mn' => ['text' => 'Мэдэгдлүүд'], 'en' => ['text' => 'Alerts']]);\n $model->insert(['keyword' => 'back', 'type' => 'sys-defined'], ['mn' => ['text' => 'Буцах'], 'en' => ['text' => 'Back']]);\n $model->insert(['keyword' => 'banner', 'type' => 'sys-defined'], ['mn' => ['text' => 'Баннер'], 'en' => ['text' => 'Banner']]);\n $model->insert(['keyword' => 'boxed', 'type' => 'sys-defined'], ['mn' => ['text' => 'Хайрцагласан'], 'en' => ['text' => 'Boxed']]);\n $model->insert(['keyword' => 'cancel', 'type' => 'sys-defined'], ['mn' => ['text' => 'Болих'], 'en' => ['text' => 'Cancel']]);\n $model->insert(['keyword' => 'categories', 'type' => 'sys-defined'], ['mn' => ['text' => 'Ангилалууд'], 'en' => ['text' => 'Categories']]);\n $model->insert(['keyword' => 'category', 'type' => 'sys-defined'], ['mn' => ['text' => 'Ангилал'], 'en' => ['text' => 'Category']]);\n $model->insert(['keyword' => 'change', 'type' => 'sys-defined'], ['mn' => ['text' => 'Өөрчлөх'], 'en' => ['text' => 'Change']]);\n $model->insert(['keyword' => 'chat', 'type' => 'sys-defined'], ['mn' => ['text' => 'Харилцан яриа'], 'en' => ['text' => 'Chat']]);\n $model->insert(['keyword' => 'city', 'type' => 'sys-defined'], ['mn' => ['text' => 'Хот'], 'en' => ['text' => 'City']]);\n $model->insert(['keyword' => 'clear', 'type' => 'sys-defined'], ['mn' => ['text' => 'Цэвэрлэх'], 'en' => ['text' => 'Clear']]);\n $model->insert(['keyword' => 'close', 'type' => 'sys-defined'], ['mn' => ['text' => 'Хаах'], 'en' => ['text' => 'Close']]);\n $model->insert(['keyword' => 'closed', 'type' => 'sys-defined'], ['mn' => ['text' => 'Хаалттай'], 'en' => ['text' => 'Closed']]);\n $model->insert(['keyword' => 'code', 'type' => 'sys-defined'], ['mn' => ['text' => 'Код'], 'en' => ['text' => 'Code']]);\n $model->insert(['keyword' => 'copy', 'type' => 'sys-defined'], ['mn' => ['text' => 'Хуулах'], 'en' => ['text' => 'Copy']]);\n $model->insert(['keyword' => 'ololt', 'type' => 'sys-defined'], ['mn' => ['text' => 'Ололт'], 'en' => ['text' => 'ololt']]);\n $model->insert(['keyword' => 'comment', 'type' => 'sys-defined'], ['mn' => ['text' => 'Сэтгэгдэл'], 'en' => ['text' => 'Comment']]);\n $model->insert(['keyword' => 'comments', 'type' => 'sys-defined'], ['mn' => ['text' => 'Сэтгэгдлүүд'], 'en' => ['text' => 'Comments']]);\n $model->insert(['keyword' => 'confirm', 'type' => 'sys-defined'], ['mn' => ['text' => 'Батлах'], 'en' => ['text' => 'Confirm']]);\n $model->insert(['keyword' => 'confirmation', 'type' => 'sys-defined'], ['mn' => ['text' => 'Лавлагаа'], 'en' => ['text' => 'Confirmation']]);\n $model->insert(['keyword' => 'contact', 'type' => 'sys-defined'], ['mn' => ['text' => 'Холбоо барих'], 'en' => ['text' => 'Contact']]);\n $model->insert(['keyword' => 'content', 'type' => 'sys-defined'], ['mn' => ['text' => 'Агуулга'], 'en' => ['text' => 'Content']]);\n $model->insert(['keyword' => 'continue', 'type' => 'sys-defined'], ['mn' => ['text' => 'Үргэлжлүүлэх'], 'en' => ['text' => 'Continue']]);\n $model->insert(['keyword' => 'countries', 'type' => 'sys-defined'], ['mn' => ['text' => 'Улсууд'], 'en' => ['text' => 'Countries']]);\n $model->insert(['keyword' => 'country', 'type' => 'sys-defined'], ['mn' => ['text' => 'Улс'], 'en' => ['text' => 'Country']]);\n $model->insert(['keyword' => 'created', 'type' => 'sys-defined'], ['mn' => ['text' => 'Үүсгэгдсэн'], 'en' => ['text' => 'Created']]);\n $model->insert(['keyword' => 'customize', 'type' => 'sys-defined'], ['mn' => ['text' => 'Тохируулах'], 'en' => ['text' => 'Customize']]);\n $model->insert(['keyword' => 'dark', 'type' => 'sys-defined'], ['mn' => ['text' => 'Бараан'], 'en' => ['text' => 'Dark']]);\n $model->insert(['keyword' => 'dashboard', 'type' => 'sys-defined'], ['mn' => ['text' => 'Хянах самбар'], 'en' => ['text' => 'Dashboard']]);\n $model->insert(['keyword' => 'date', 'type' => 'sys-defined'], ['mn' => ['text' => 'Он сар'], 'en' => ['text' => 'Date']]);\n $model->insert(['keyword' => 'dear', 'type' => 'sys-defined'], ['mn' => ['text' => 'Эрхэм'], 'en' => ['text' => 'Dear']]);\n $model->insert(['keyword' => 'default', 'type' => 'sys-defined'], ['mn' => ['text' => 'Өгөгдмөл'], 'en' => ['text' => 'Default']]);\n $model->insert(['keyword' => 'delete', 'type' => 'sys-defined'], ['mn' => ['text' => 'Устгах'], 'en' => ['text' => 'Delete']]);\n $model->insert(['keyword' => 'discussion', 'type' => 'sys-defined'], ['mn' => ['text' => 'Хэлэлцүүлэг'], 'en' => ['text' => 'Discussion']]);\n $model->insert(['keyword' => 'dr', 'type' => 'sys-defined'], ['mn' => ['text' => 'Доктор'], 'en' => ['text' => 'Dr']]);\n $model->insert(['keyword' => 'edit', 'type' => 'sys-defined'], ['mn' => ['text' => 'Засах'], 'en' => ['text' => 'Edit']]);\n $model->insert(['keyword' => 'email', 'type' => 'sys-defined'], ['mn' => ['text' => 'Имэйл'], 'en' => ['text' => 'Email']]);\n $model->insert(['keyword' => 'error', 'type' => 'sys-defined'], ['mn' => ['text' => 'Алдаа'], 'en' => ['text' => 'Error']]);\n $model->insert(['keyword' => 'faq', 'type' => 'sys-defined'], ['mn' => ['text' => 'Түгээмэл асуулт хариултууд'], 'en' => ['text' => 'FAQ']]);\n $model->insert(['keyword' => 'feedback', 'type' => 'sys-defined'], ['mn' => ['text' => 'Санал хүсэлт'], 'en' => ['text' => 'Feedback']]);\n $model->insert(['keyword' => 'feedbacks', 'type' => 'sys-defined'], ['mn' => ['text' => 'Санал хүсэлтүүд'], 'en' => ['text' => 'Feedbacks']]);\n $model->insert(['keyword' => 'female', 'type' => 'sys-defined'], ['mn' => ['text' => 'Эмэгтэй'], 'en' => ['text' => 'Female']]);\n $model->insert(['keyword' => 'file', 'type' => 'sys-defined'], ['mn' => ['text' => 'Файл'], 'en' => ['text' => 'File']]);\n $model->insert(['keyword' => 'files', 'type' => 'sys-defined'], ['en' => ['text' => 'Files'], 'mn' => ['text' => 'Файлууд']]);\n $model->insert(['keyword' => 'first', 'type' => 'sys-defined'], ['en' => ['text' => 'First'], 'mn' => ['text' => 'Эхний']]);\n $model->insert(['keyword' => 'firstname', 'type' => 'sys-defined'], ['mn' => ['text' => 'Нэр'], 'en' => ['text' => 'First Name']]);\n $model->insert(['keyword' => 'fixed', 'type' => 'sys-defined'], ['mn' => ['text' => 'Бэхэлсэн'], 'en' => ['text' => 'Fixed']]);\n $model->insert(['keyword' => 'flag', 'type' => 'sys-defined'], ['en' => ['text' => 'Flag'], 'mn' => ['text' => 'Далбаа']]);\n $model->insert(['keyword' => 'fluid', 'type' => 'sys-defined'], ['mn' => ['text' => 'Урсамтгай'], 'en' => ['text' => 'Fluid']]);\n $model->insert(['keyword' => 'footer', 'type' => 'sys-defined'], ['en' => ['text' => 'Footer'], 'mn' => ['text' => 'Хөл']]);\n $model->insert(['keyword' => 'founders', 'type' => 'sys-defined'], ['mn' => ['text' => 'Үүсгэн байгуулагчид'], 'en' => ['text' => 'Founders']]);\n $model->insert(['keyword' => 'framework', 'type' => 'sys-defined'], ['en' => ['text' => 'Framework'], 'mn' => ['text' => 'Фреймворк']]);\n $model->insert(['keyword' => 'frontsite', 'type' => 'sys-defined'], ['mn' => ['text' => 'Үндсэн сайт'], 'en' => ['text' => 'Front Site']]);\n $model->insert(['keyword' => 'fullname', 'type' => 'sys-defined'], ['en' => ['text' => 'Full Name'], 'mn' => ['text' => 'Бүтэн нэр']]);\n $model->insert(['keyword' => 'fullscreen', 'type' => 'sys-defined'], ['mn' => ['text' => 'Дэлгэц дүүрэн'], 'en' => ['text' => 'Full Screen']]);\n $model->insert(['keyword' => 'gallery', 'type' => 'sys-defined'], ['mn' => ['text' => 'Галлерэй'], 'en' => ['text' => 'Gallery']]);\n $model->insert(['keyword' => 'general', 'type' => 'sys-defined'], ['mn' => ['text' => 'Ерөнхий'], 'en' => ['text' => 'General']]);\n $model->insert(['keyword' => 'header', 'type' => 'sys-defined'], ['mn' => ['text' => 'Толгой'], 'en' => ['text' => 'Header']]);\n $model->insert(['keyword' => 'help', 'type' => 'sys-defined'], ['mn' => ['text' => 'Тусламж'], 'en' => ['text' => 'Help']]);\n $model->insert(['keyword' => 'history', 'type' => 'sys-defined'], ['mn' => ['text' => 'Түүх'], 'en' => ['text' => 'History']]);\n $model->insert(['keyword' => 'home', 'type' => 'sys-defined'], ['en' => ['text' => 'Home'], 'mn' => ['text' => 'Нүүр']]);\n $model->insert(['keyword' => 'homepage', 'type' => 'sys-defined'], ['mn' => ['text' => 'Нүүр хуудас'], 'en' => ['text' => 'Home page']]);\n $model->insert(['keyword' => 'hover', 'type' => 'sys-defined'], ['mn' => ['text' => 'Ховер'], 'en' => ['text' => 'Hover']]);\n $model->insert(['keyword' => 'id', 'type' => 'sys-defined'], ['en' => ['text' => 'ID'], 'mn' => ['text' => 'Дугаар']]);\n $model->insert(['keyword' => 'image', 'type' => 'sys-defined'], ['mn' => ['text' => 'Зураг'], 'en' => ['text' => 'Image']]);\n $model->insert(['keyword' => 'images', 'type' => 'sys-defined'], ['en' => ['text' => 'Images'], 'mn' => ['text' => 'Зурагнууд']]);\n $model->insert(['keyword' => 'inactive', 'type' => 'sys-defined'], ['mn' => ['text' => 'Идэвхигүй'], 'en' => ['text' => 'Inactive']]);\n $model->insert(['keyword' => 'key', 'type' => 'sys-defined'], ['en' => ['text' => 'Key'], 'mn' => ['text' => 'Түлхүүр']]);\n $model->insert(['keyword' => 'keyword', 'type' => 'sys-defined'], ['mn' => ['text' => 'Түлхүүр үг'], 'en' => ['text' => 'Keyword']]);\n $model->insert(['keyword' => 'language', 'type' => 'sys-defined'], ['en' => ['text' => 'Language'], 'mn' => ['text' => 'Хэл']]);\n $model->insert(['keyword' => 'languages', 'type' => 'sys-defined'], ['mn' => ['text' => 'Хэлнүүд'], 'en' => ['text' => 'Languages']]);\n $model->insert(['keyword' => 'last', 'type' => 'sys-defined'], ['mn' => ['text' => 'Сүүлийн'], 'en' => ['text' => 'Last']]);\n $model->insert(['keyword' => 'lastname', 'type' => 'sys-defined'], ['mn' => ['text' => 'Овог'], 'en' => ['text' => 'Last name']]);\n $model->insert(['keyword' => 'layout', 'type' => 'sys-defined'], ['mn' => ['text' => 'Бүтэц'], 'en' => ['text' => 'Layout']]);\n $model->insert(['keyword' => 'left', 'type' => 'sys-defined'], ['mn' => ['text' => 'Зүүн'], 'en' => ['text' => 'Left']]);\n $model->insert(['keyword' => 'light', 'type' => 'sys-defined'], ['mn' => ['text' => 'Цайвар'], 'en' => ['text' => 'Light']]);\n $model->insert(['keyword' => 'links', 'type' => 'sys-defined'], ['en' => ['text' => 'Links'], 'mn' => ['text' => 'Холбоосууд']]);\n $model->insert(['keyword' => 'list', 'type' => 'sys-defined'], ['mn' => ['text' => 'Жагсаалт'], 'en' => ['text' => 'List']]);\n $model->insert(['keyword' => 'loading', 'type' => 'sys-defined'], ['mn' => ['text' => 'Ачаалж байна'], 'en' => ['text' => 'Loading']]);\n $model->insert(['keyword' => 'lock', 'type' => 'sys-defined'], ['en' => ['text' => 'Lock'], 'mn' => ['text' => 'Түгжих']]);\n $model->insert(['keyword' => 'log', 'type' => 'sys-defined'], ['mn' => ['text' => 'Протокол'], 'en' => ['text' => 'Log']]);\n $model->insert(['keyword' => 'logs', 'type' => 'sys-defined'], ['mn' => ['text' => 'Протокол'], 'en' => ['text' => 'Logs']]);\n $model->insert(['keyword' => 'login', 'type' => 'sys-defined'], ['en' => ['text' => 'Login'], 'mn' => ['text' => 'Нэвтрэх']]);\n $model->insert(['keyword' => 'signin', 'type' => 'sys-defined'], ['en' => ['text' => 'Sign In'], 'mn' => ['text' => 'Нэвтрэх']]);\n $model->insert(['keyword' => 'loginname', 'type' => 'sys-defined'], ['mn' => ['text' => 'Нэвтрэх нэр'], 'en' => ['text' => 'Login name']]);\n $model->insert(['keyword' => 'logout', 'type' => 'sys-defined'], ['en' => ['text' => 'Logout'], 'mn' => ['text' => 'Гарах']]);\n $model->insert(['keyword' => 'lookup', 'type' => 'sys-defined'], ['mn' => ['text' => 'Лавлаж харах'], 'en' => ['text' => 'Lookup']]);\n $model->insert(['keyword' => 'localization', 'type' => 'sys-defined'], ['mn' => ['text' => 'Нутагшуулалт'], 'en' => ['text' => 'Localization']]);\n $model->insert(['keyword' => 'male', 'type' => 'sys-defined'], ['en' => ['text' => 'Male'], 'mn' => ['text' => 'Эрэгтэй']]);\n $model->insert(['keyword' => 'main-website', 'type' => 'sys-defined'], ['en' => ['text' => 'Main Website'], 'mn' => ['text' => 'Үндсэн веб хуудас']]);\n $model->insert(['keyword' => 'media', 'type' => 'sys-defined'], ['mn' => ['text' => 'Медиа'], 'en' => ['text' => 'Media']]);\n $model->insert(['keyword' => 'members', 'type' => 'sys-defined'], ['mn' => ['text' => 'Гишүүд'], 'en' => ['text' => 'Members']]);\n $model->insert(['keyword' => 'menu', 'type' => 'sys-defined'], ['mn' => ['text' => 'Меню'], 'en' => ['text' => 'Menu']]);\n $model->insert(['keyword' => 'message', 'type' => 'sys-defined'], ['mn' => ['text' => 'Зурвас'], 'en' => ['text' => 'Message']]);\n $model->insert(['keyword' => 'messages', 'type' => 'sys-defined'], ['mn' => ['text' => 'Зурвасууд'], 'en' => ['text' => 'Messages']]);\n $model->insert(['keyword' => 'meta', 'type' => 'sys-defined'], ['mn' => ['text' => 'Мета'], 'en' => ['text' => 'Meta']]);\n $model->insert(['keyword' => 'misc', 'type' => 'sys-defined'], ['en' => ['text' => 'Misc'], 'mn' => ['text' => 'Бусад']]);\n $model->insert(['keyword' => 'model', 'type' => 'sys-defined'], ['mn' => ['text' => 'Загвар'], 'en' => ['text' => 'Model']]);\n $model->insert(['keyword' => 'modified', 'type' => 'sys-defined'], ['mn' => ['text' => 'Зассан'], 'en' => ['text' => 'Modified']]);\n $model->insert(['keyword' => 'more-info', 'type' => 'sys-defined'], ['mn' => ['text' => 'Дэлгэрэнгүй мэдээлэл'], 'en' => ['text' => 'More Info']]);\n $model->insert(['keyword' => 'mr', 'type' => 'sys-defined'], ['mn' => ['text' => 'Ноён'], 'en' => ['text' => 'Mr']]);\n $model->insert(['keyword' => 'ms', 'type' => 'sys-defined'], ['mn' => ['text' => 'Хатагтай'], 'en' => ['text' => 'Mrs']]);\n $model->insert(['keyword' => 'name', 'type' => 'sys-defined'], ['mn' => ['text' => 'Нэр'], 'en' => ['text' => 'Name']]);\n $model->insert(['keyword' => 'navigation', 'type' => 'sys-defined'], ['mn' => ['text' => 'Залуур'], 'en' => ['text' => 'Navigation']]);\n $model->insert(['keyword' => 'new', 'type' => 'sys-defined'], ['mn' => ['text' => 'Шинэ'], 'en' => ['text' => 'New']]);\n $model->insert(['keyword' => 'news', 'type' => 'sys-defined'], ['mn' => ['text' => 'Мэдээлэл'], 'en' => ['text' => 'News']]);\n $model->insert(['keyword' => 'next', 'type' => 'sys-defined'], ['mn' => ['text' => 'Дараах'], 'en' => ['text' => 'Next']]);\n $model->insert(['keyword' => 'no', 'type' => 'sys-defined'], ['mn' => ['text' => 'Үгүй'], 'en' => ['text' => 'No']]);\n $model->insert(['keyword' => 'notice', 'type' => 'sys-defined'], ['mn' => ['text' => 'Мэдэгдэл'], 'en' => ['text' => 'Notice']]);\n $model->insert(['keyword' => 'notifications', 'type' => 'sys-defined'], ['mn' => ['text' => 'Мэдэгдлүүд'], 'en' => ['text' => 'Notifications']]);\n $model->insert(['keyword' => 'ok', 'type' => 'sys-defined'], ['mn' => ['text' => 'Тийм'], 'en' => ['text' => 'Ok']]);\n $model->insert(['keyword' => 'open', 'type' => 'sys-defined'], ['mn' => ['text' => 'Нээлттэй'], 'en' => ['text' => 'Open']]);\n $model->insert(['keyword' => 'page', 'type' => 'sys-defined'], ['mn' => ['text' => 'Хуудас'], 'en' => ['text' => 'Page']]);\n $model->insert(['keyword' => 'pages', 'type' => 'sys-defined'], ['mn' => ['text' => 'Хуудсууд'], 'en' => ['text' => 'Pages']]);\n $model->insert(['keyword' => 'partners', 'type' => 'sys-defined'], ['mn' => ['text' => 'Хамтрагч байгууллагууд'], 'en' => ['text' => 'Partners']]);\n $model->insert(['keyword' => 'password', 'type' => 'sys-defined'], ['mn' => ['text' => 'Нууц үг'], 'en' => ['text' => 'Password']]);\n $model->insert(['keyword' => 'payment', 'type' => 'sys-defined'], ['mn' => ['text' => 'Төлбөр'], 'en' => ['text' => 'Payment']]);\n $model->insert(['keyword' => 'phone', 'type' => 'sys-defined'], ['mn' => ['text' => 'Утас'], 'en' => ['text' => 'Phone']]);\n $model->insert(['keyword' => 'photo', 'type' => 'sys-defined'], ['mn' => ['text' => 'Зураг'], 'en' => ['text' => 'Photo']]);\n $model->insert(['keyword' => 'play', 'type' => 'sys-defined'], ['mn' => ['text' => 'Тоглох'], 'en' => ['text' => 'Play']]);\n $model->insert(['keyword' => 'player', 'type' => 'sys-defined'], ['mn' => ['text' => 'Тоглогч'], 'en' => ['text' => 'Player']]);\n $model->insert(['keyword' => 'players', 'type' => 'sys-defined'], ['mn' => ['text' => 'Тоглогчид'], 'en' => ['text' => 'Players']]);\n $model->insert(['keyword' => 'position', 'type' => 'sys-defined'], ['mn' => ['text' => 'Байршил'], 'en' => ['text' => 'Position']]);\n $model->insert(['keyword' => 'purpose', 'type' => 'sys-defined'], ['mn' => ['text' => 'Зорилго'], 'en' => ['text' => 'Purpose']]);\n $model->insert(['keyword' => 'prev', 'type' => 'sys-defined'], ['mn' => ['text' => 'Өмнөх'], 'en' => ['text' => 'Prev']]);\n $model->insert(['keyword' => 'print', 'type' => 'sys-defined'], ['mn' => ['text' => 'Хэвлэх'], 'en' => ['text' => 'Print']]);\n $model->insert(['keyword' => 'processing', 'type' => 'sys-defined'], ['en' => ['text' => 'Processing'], 'mn' => ['text' => 'Боловcруулж байна']]);\n $model->insert(['keyword' => 'prof', 'type' => 'sys-defined'], ['mn' => ['text' => 'Проф'], 'en' => ['text' => 'Prof']]);\n $model->insert(['keyword' => 'profile', 'type' => 'sys-defined'], ['mn' => ['text' => 'Хувийн мэдээлэл'], 'en' => ['text' => 'Profile']]);\n $model->insert(['keyword' => 'rank', 'type' => 'sys-defined'], ['mn' => ['text' => 'Дараалал'], 'en' => ['text' => 'Rank']]);\n $model->insert(['keyword' => 'read-more', 'type' => 'sys-defined'], ['mn' => ['text' => 'Дэлгэрэнгүй'], 'en' => ['text' => 'Read more']]);\n $model->insert(['keyword' => 'reference', 'type' => 'sys-defined'], ['mn' => ['text' => 'Лавлах'], 'en' => ['text' => 'Reference']]);\n $model->insert(['keyword' => 'register', 'type' => 'sys-defined'], ['mn' => ['text' => 'Бүртгэх'], 'en' => ['text' => 'Register']]);\n $model->insert(['keyword' => 'registered', 'type' => 'sys-defined'], ['mn' => ['text' => 'Бүртгэгдсэн'], 'en' => ['text' => 'Registered']]);\n $model->insert(['keyword' => 'remove', 'type' => 'sys-defined'], ['mn' => ['text' => 'Арилгах'], 'en' => ['text' => 'Remove']]);\n $model->insert(['keyword' => 'report', 'type' => 'sys-defined'], ['mn' => ['text' => 'Тайлан'], 'en' => ['text' => 'Report']]);\n $model->insert(['keyword' => 'request', 'type' => 'sys-defined'], ['mn' => ['text' => 'Хүсэлт'], 'en' => ['text' => 'Request']]);\n $model->insert(['keyword' => 'reviews', 'type' => 'sys-defined'], ['mn' => ['text' => 'Хэлэлцүүлгүүд'], 'en' => ['text' => 'Reviews']]);\n $model->insert(['keyword' => 'right', 'type' => 'sys-defined'], ['mn' => ['text' => 'Баруун'], 'en' => ['text' => 'Right']]);\n $model->insert(['keyword' => 'role', 'type' => 'sys-defined'], ['mn' => ['text' => 'Үүрэг'], 'en' => ['text' => 'Role']]);\n $model->insert(['keyword' => 'role2', 'type' => 'sys-defined'], ['mn' => ['text' => 'Дүр'], 'en' => ['text' => 'Role']]);\n $model->insert(['keyword' => 'samples', 'type' => 'sys-defined'], ['mn' => ['text' => 'Загварууд'], 'en' => ['text' => 'Samples']]);\n $model->insert(['keyword' => 'save', 'type' => 'sys-defined'], ['mn' => ['text' => 'Хадгалах'], 'en' => ['text' => 'Save']]);\n $model->insert(['keyword' => 'search', 'type' => 'sys-defined'], ['mn' => ['text' => 'Хайх'], 'en' => ['text' => 'Search']]);\n $model->insert(['keyword' => 'select', 'type' => 'sys-defined'], ['mn' => ['text' => 'Сонгох'], 'en' => ['text' => 'Select']]);\n $model->insert(['keyword' => 'send', 'type' => 'sys-defined'], ['mn' => ['text' => 'Илгээх'], 'en' => ['text' => 'Send']]);\n $model->insert(['keyword' => 'setting', 'type' => 'sys-defined'], ['mn' => ['text' => 'Тохиргоо'], 'en' => ['text' => 'Setting']]);\n $model->insert(['keyword' => 'settings', 'type' => 'sys-defined'], ['mn' => ['text' => 'Тохиргоонууд'], 'en' => ['text' => 'Settings']]);\n $model->insert(['keyword' => 'service', 'type' => 'sys-defined'], ['mn' => ['text' => 'Сервис'], 'en' => ['text' => 'Service']]);\n $model->insert(['keyword' => 'share', 'type' => 'sys-defined'], ['mn' => ['text' => 'Хуваалцах'], 'en' => ['text' => 'Share']]);\n $model->insert(['keyword' => 'short', 'type' => 'sys-defined'], ['mn' => ['text' => 'Богино'], 'en' => ['text' => 'Short']]);\n $model->insert(['keyword' => 'shortcuts', 'type' => 'sys-defined'], ['mn' => ['text' => 'Холбоосууд'], 'en' => ['text' => 'Shortcuts']]);\n $model->insert(['keyword' => 'signup', 'type' => 'sys-defined'], ['mn' => ['text' => 'Бүртгүүлэх'], 'en' => ['text' => 'Sign Up']]);\n $model->insert(['keyword' => 'sitemap', 'type' => 'sys-defined'], ['en' => ['text' => 'Site map'], 'mn' => ['text' => 'Сайтын бүтэц']]);\n $model->insert(['keyword' => 'size', 'type' => 'sys-defined'], ['en' => ['text' => 'Size'], 'mn' => ['text' => 'Хэмжээ']]);\n $model->insert(['keyword' => 'slider', 'type' => 'sys-defined'], ['en' => ['text' => 'Slider'], 'mn' => ['text' => 'Слайд']]);\n $model->insert(['keyword' => 'sorry', 'type' => 'sys-defined'], ['mn' => ['text' => 'Уучлаарай'], 'en' => ['text' => 'Sorry']]);\n $model->insert(['keyword' => 'status', 'type' => 'sys-defined'], ['mn' => ['text' => 'Төлөв'], 'en' => ['text' => 'Status']]);\n $model->insert(['keyword' => 'step', 'type' => 'sys-defined'], ['mn' => ['text' => 'Алхам'], 'en' => ['text' => 'Step']]);\n $model->insert(['keyword' => 'submit', 'type' => 'sys-defined'], ['mn' => ['text' => 'Батлах'], 'en' => ['text' => 'Submit']]);\n $model->insert(['keyword' => 'success', 'type' => 'sys-defined'], ['en' => ['text' => 'Success'], 'mn' => ['text' => 'Амжилттай']]);\n $model->insert(['keyword' => 'system', 'type' => 'sys-defined'], ['en' => ['text' => 'System'], 'mn' => ['text' => 'Систем']]);\n $model->insert(['keyword' => 'table', 'type' => 'sys-defined'], ['mn' => ['text' => 'Хүснэгт'], 'en' => ['text' => 'Table']]);\n $model->insert(['keyword' => 'tag', 'type' => 'sys-defined'], ['mn' => ['text' => 'Шошиг'], 'en' => ['text' => 'Tag']]);\n $model->insert(['keyword' => 'tags', 'type' => 'sys-defined'], ['mn' => ['text' => 'Шошигнууд'], 'en' => ['text' => 'Tags']]);\n $model->insert(['keyword' => 'tasks', 'type' => 'sys-defined'], ['mn' => ['text' => 'Даалгаврууд'], 'en' => ['text' => 'Tasks']]);\n $model->insert(['keyword' => 'telephone', 'type' => 'sys-defined'], ['mn' => ['text' => 'Утас'], 'en' => ['text' => 'Telephone']]);\n $model->insert(['keyword' => 'theme', 'type' => 'sys-defined'], ['mn' => ['text' => 'Загвар'], 'en' => ['text' => 'Theme']]);\n $model->insert(['keyword' => 'title', 'type' => 'sys-defined'], ['en' => ['text' => 'Title'], 'mn' => ['text' => 'Гарчиг']]);\n $model->insert(['keyword' => 'tool', 'type' => 'sys-defined'], ['mn' => ['text' => 'Хэрэгсэл'], 'en' => ['text' => 'Tool']]);\n $model->insert(['keyword' => 'tools', 'type' => 'sys-defined'], ['mn' => ['text' => 'Хэрэгслүүд'], 'en' => ['text' => 'Tools']]);\n $model->insert(['keyword' => 'town', 'type' => 'sys-defined'], ['mn' => ['text' => 'Тосгон'], 'en' => ['text' => 'Тown']]);\n $model->insert(['keyword' => 'translation', 'type' => 'sys-defined'], ['mn' => ['text' => 'Орчуулга'], 'en' => ['text' => 'Translation']]);\n $model->insert(['keyword' => 'type', 'type' => 'sys-defined'], ['mn' => ['text' => 'Төрөл'], 'en' => ['text' => 'Type']]);\n $model->insert(['keyword' => 'or', 'type' => 'sys-defined'], ['mn' => ['text' => 'Эсвэл'], 'en' => ['text' => 'Or']]);\n $model->insert(['keyword' => 'unknown', 'type' => 'sys-defined'], ['mn' => ['text' => 'Үл мэдэгдэх'], 'en' => ['text' => 'Unknown']]);\n $model->insert(['keyword' => 'user', 'type' => 'sys-defined'], ['mn' => ['text' => 'Хэрэглэгч'], 'en' => ['text' => 'User']]);\n $model->insert(['keyword' => 'username', 'type' => 'sys-defined'], ['en' => ['text' => 'Username'], 'mn' => ['text' => 'Хэрэглэгчийн нэр']]);\n $model->insert(['keyword' => 'users', 'type' => 'sys-defined'], ['en' => ['text' => 'Users'], 'mn' => ['text' => 'Хэрэглэгчид']]);\n $model->insert(['keyword' => 'video', 'type' => 'sys-defined'], ['mn' => ['text' => 'Видео'], 'en' => ['text' => 'Video']]);\n $model->insert(['keyword' => 'videos', 'type' => 'sys-defined'], ['mn' => ['text' => 'Видеонууд'], 'en' => ['text' => 'Videos']]);\n $model->insert(['keyword' => 'view', 'type' => 'sys-defined'], ['mn' => ['text' => 'Харах'], 'en' => ['text' => 'View']]);\n $model->insert(['keyword' => 'visibility', 'type' => 'sys-defined'], ['mn' => ['text' => 'Харагдац'], 'en' => ['text' => 'Visibility']]);\n $model->insert(['keyword' => 'webpage', 'type' => 'sys-defined'], ['mn' => ['text' => 'Веб хуудас'], 'en' => ['text' => 'Webpage']]);\n $model->insert(['keyword' => 'welcome', 'type' => 'sys-defined'], ['mn' => ['text' => 'Тавтай морил'], 'en' => ['text' => 'Welcome']]);\n $model->insert(['keyword' => 'yes', 'type' => 'sys-defined'], ['en' => ['text' => 'Yes'], 'mn' => ['text' => 'Тийм']]);\n $model->insert(['keyword' => 'avatar', 'type' => 'sys-defined'], ['en' => ['text' => 'Avatar'], 'mn' => ['text' => 'Хөрөг']]);\n $model->insert(['keyword' => 'picture', 'type' => 'sys-defined'], ['mn' => ['text' => 'Зураг'], 'en' => ['text' => 'Picture']]);\n $model->insert(['keyword' => 'detailed', 'type' => 'sys-defined'], ['mn' => ['text' => 'Дэлгэрэнгүй'], 'en' => ['text' => 'Detailed']]);\n $model->insert(['keyword' => 'failure', 'type' => 'sys-defined'], ['mn' => ['text' => 'Амжилтгүй'], 'en' => ['text' => 'Failure']]);\n $model->insert(['keyword' => 'introduction', 'type' => 'sys-defined'], ['mn' => ['text' => 'Танилцуулга'], 'en' => ['text' => 'Introduction']]);\n $model->insert(['keyword' => 'information', 'type' => 'sys-defined'], ['mn' => ['text' => 'Мэдээлэл'], 'en' => ['text' => 'Information']]);\n $model->insert(['keyword' => 'parent', 'type' => 'sys-defined'], ['mn' => ['text' => 'Эцэг'], 'en' => ['text' => 'Parent']]);\n $model->insert(['keyword' => 'supplier', 'type' => 'sys-defined'], ['mn' => ['text' => 'Нийлүүлэгч'], 'en' => ['text' => 'Supplier']]);\n $model->insert(['keyword' => 'number', 'type' => 'sys-defined'], ['mn' => ['text' => 'Дугаар'], 'en' => ['text' => 'Number']]);\n $model->insert(['keyword' => 'description', 'type' => 'sys-defined'], ['mn' => ['text' => 'Тайлбар'], 'en' => ['text' => 'Description']]);\n $model->insert(['keyword' => 'building', 'type' => 'sys-defined'], ['mn' => ['text' => 'Барилга'], 'en' => ['text' => 'Building']]);\n $model->insert(['keyword' => 'floor', 'type' => 'sys-defined'], ['mn' => ['text' => 'Давхар'], 'en' => ['text' => 'Floor']]);\n $model->insert(['keyword' => 'logo', 'type' => 'sys-defined'], ['mn' => ['text' => 'Лого'], 'en' => ['text' => 'Logo']]);\n $model->insert(['keyword' => 'room', 'type' => 'sys-defined'], ['mn' => ['text' => 'Өрөө'], 'en' => ['text' => 'Room']]);\n $model->insert(['keyword' => 'full', 'type' => 'sys-defined'], ['mn' => ['text' => 'Бүрэн'], 'en' => ['text' => 'Full']]);\n $model->insert(['keyword' => 'asset', 'type' => 'sys-defined'], ['en' => ['text' => 'Asset'], 'mn' => ['text' => 'Үндсэн хөрөнгө']]);\n $model->insert(['keyword' => 'specification', 'type' => 'sys-defined'], ['mn' => ['text' => 'Тодорхойлолт'], 'en' => ['text' => 'Specification']]);\n $model->insert(['keyword' => 'quantity', 'type' => 'sys-defined'], ['mn' => ['text' => 'Тоо хэмжээ'], 'en' => ['text' => 'Quantity']]);\n $model->insert(['keyword' => 'price', 'type' => 'sys-defined'], ['mn' => ['text' => 'Үнэ'], 'en' => ['text' => 'Price']]);\n $model->insert(['keyword' => 'balance', 'type' => 'sys-defined'], ['mn' => ['text' => 'Үлдэгдэл'], 'en' => ['text' => 'Balance']]);\n $model->insert(['keyword' => 'highlights', 'type' => 'sys-defined'], ['mn' => ['text' => 'Онцлох мэдээ'], 'en' => ['text' => 'Highlights']]);\n $model->insert(['keyword' => 'register-now', 'type' => 'sys-defined'], ['mn' => ['text' => 'Яг одоо бүртгүүлэх'], 'en' => ['text' => 'Register now']]);\n $model->insert(['keyword' => 'create', 'type' => 'sys-defined'], ['mn' => ['text' => 'Үүсгэх'], 'en' => ['text' => 'Create']]);\n $model->insert(['keyword' => 'menu-type', 'type' => 'sys-defined'], ['mn' => ['text' => 'Цэсний төрөл'], 'en' => ['text' => 'Menu Type']]);\n $model->insert(['keyword' => 'alias', 'type' => 'sys-defined'], ['mn' => ['text' => 'Хоч'], 'en' => ['text' => 'Alias']]);\n $model->insert(['keyword' => 'publish', 'type' => 'sys-defined'], ['mn' => ['text' => 'Нийтлэх'], 'en' => ['text' => 'Publish']]);\n $model->insert(['keyword' => 'content-type', 'type' => 'sys-defined'], ['mn' => ['text' => 'Агуулгын төрөл'], 'en' => ['text' => 'Content Type']]);\n $model->insert(['keyword' => 'read', 'type' => 'sys-defined'], ['mn' => ['text' => 'Унших'], 'en' => ['text' => 'Read']]);\n $model->insert(['keyword' => 'write', 'type' => 'sys-defined'], ['mn' => ['text' => 'Бичих'], 'en' => ['text' => 'Write']]);\n $model->insert(['keyword' => 'path', 'type' => 'sys-defined'], ['mn' => ['text' => 'Зам'], 'en' => ['text' => 'Path']]);\n $model->insert(['keyword' => 'thumbnail', 'type' => 'sys-defined'], ['mn' => ['text' => 'Өнгөц зураг'], 'en' => ['text' => 'Thumbnail']]);\n $model->insert(['keyword' => 'visible', 'type' => 'sys-defined'], ['mn' => ['text' => 'Харагдах'], 'en' => ['text' => 'Visible']]);\n $model->insert(['keyword' => 'contact-us', 'type' => 'sys-defined'], ['mn' => ['text' => 'Холбоо барих'], 'en' => ['text' => 'Contact Us']]);\n $model->insert(['keyword' => 'about-us', 'type' => 'sys-defined'], ['mn' => ['text' => 'Бидний тухай'], 'en' => ['text' => 'About Us']]);\n $model->insert(['keyword' => 'events', 'type' => 'sys-defined'], ['mn' => ['text' => 'Үйл явдлууд'], 'en' => ['text' => 'Events']]);\n $model->insert(['keyword' => 'announcement', 'type' => 'sys-defined'], ['mn' => ['text' => 'Зар мэдээ'], 'en' => ['text' => 'Announcement']]);\n $model->insert(['keyword' => 'scholarship', 'type' => 'sys-defined'], ['mn' => ['text' => 'Тэтгэлэг'], 'en' => ['text' => 'Scholarship']]);\n $model->insert(['keyword' => 'follow-us', 'type' => 'sys-defined'], ['mn' => ['text' => 'Биднийг дагах'], 'en' => ['text' => 'Follow Us']]);\n $model->insert(['keyword' => 'partner', 'type' => 'sys-defined'], ['mn' => ['text' => 'Хамтрагч '], 'en' => ['text' => 'Partner']]);\n $model->insert(['keyword' => 'please-wait', 'type' => 'sys-defined'], ['mn' => ['text' => 'Түр хүлээнэ үү'], 'en' => ['text' => 'Please wait']]);\n $model->insert(['keyword' => 'enter-search-terms', 'type' => 'sys-defined'], ['mn' => ['text' => 'Хайх утгаа оруулна уу..'], 'en' => ['text' => 'Enter search terms..']]);\n $model->insert(['keyword' => 'done', 'type' => 'sys-defined'], ['en' => ['text' => 'Done'], 'mn' => ['text' => 'Болсон']]);\n $model->insert(['keyword' => 'failed', 'type' => 'sys-defined'], ['mn' => ['text' => 'Амжилтгүй'], 'en' => ['text' => 'Failed']]);\n $model->insert(['keyword' => 'warning', 'type' => 'sys-defined'], ['en' => ['text' => 'Warning'], 'mn' => ['text' => 'Сануулга']]);\n $model->insert(['keyword' => 'social-network', 'type' => 'sys-defined'], ['en' => ['text' => 'Social network'], 'mn' => ['text' => 'Олон нийтийн сүлжээ']]);\n $model->insert(['keyword' => 'slide', 'type' => 'sys-defined'], ['en' => ['text' => 'Slide'], 'mn' => ['text' => 'Слайд']]);\n $model->insert(['keyword' => 'style', 'type' => 'sys-defined'], ['en' => ['text' => 'Style'], 'mn' => ['text' => 'Загвар']]);\n $model->insert(['keyword' => 'version', 'type' => 'sys-defined'], ['en' => ['text' => 'Version'], 'mn' => ['text' => 'Цуврал']]);\n $model->insert(['keyword' => 'icon', 'type' => 'sys-defined'], ['en' => ['text' => 'Icon'], 'mn' => ['text' => 'Дүрс']]);\n $model->insert(['keyword' => 'options', 'type' => 'sys-defined'], ['en' => ['text' => 'Options'], 'mn' => ['text' => 'Тохируулгууд']]);\n $model->insert(['keyword' => 'option', 'type' => 'sys-defined'], ['en' => ['text' => 'Option'], 'mn' => ['text' => 'Тохиргоо']]);\n $model->insert(['keyword' => 'teaser', 'type' => 'sys-defined'], ['mn' => ['text' => 'Оршил'], 'en' => ['text' => 'Teaser']]);\n $model->insert(['keyword' => 'link', 'type' => 'sys-defined'], ['mn' => ['text' => 'Холбоос'], 'en' => ['text' => 'Link']]);\n $model->insert(['keyword' => 'facebook', 'type' => 'sys-defined'], ['en' => ['text' => 'Facebook'], 'mn' => ['text' => 'Фейсбүүк']]);\n $model->insert(['keyword' => 'twitter', 'type' => 'sys-defined'], ['en' => ['text' => 'Twitter'], 'mn' => ['text' => 'Твиттер']]);\n $model->insert(['keyword' => 'youtube', 'type' => 'sys-defined'], ['en' => ['text' => 'YouTube'], 'mn' => ['text' => 'Ютүүб']]);\n $model->insert(['keyword' => 'width', 'type' => 'sys-defined'], ['en' => ['text' => 'Width'], 'mn' => ['text' => 'Өргөн']]);\n $model->insert(['keyword' => 'updated', 'type' => 'sys-defined'], ['en' => ['text' => 'Updated'], 'mn' => ['text' => 'Шинэчилсэн']]);\n $model->insert(['keyword' => 'choose', 'type' => 'sys-defined'], ['mn' => ['text' => 'Сонгох'], 'en' => ['text' => 'Choose']]);\n $model->insert(['keyword' => 'client', 'type' => 'sys-defined'], ['mn' => ['text' => 'Үйлчлүүлэгч '], 'en' => ['text' => 'Client']]);\n $model->insert(['keyword' => 'sum', 'type' => 'sys-defined'], ['mn' => ['text' => 'Дүн'], 'en' => ['text' => 'Sum']]);\n $model->insert(['keyword' => 'receipt', 'type' => 'sys-defined'], ['mn' => ['text' => 'Баримт'], 'en' => ['text' => 'Receipt']]);\n $model->insert(['keyword' => 'organization', 'type' => 'sys-defined'], ['mn' => ['text' => 'Байгууллага'], 'en' => ['text' => 'Organization']]);\n $model->insert(['keyword' => 'organizations', 'type' => 'sys-defined'], ['mn' => ['text' => 'Байгууллагууд'], 'en' => ['text' => 'Organizations']]);\n $model->insert(['keyword' => 'properties', 'type' => 'sys-defined'], ['mn' => ['text' => 'Шинж чанарууд'], 'en' => ['text' => 'Properties']]);\n $model->insert(['keyword' => 'group', 'type' => 'sys-defined'], ['mn' => ['text' => 'Бүлэг'], 'en' => ['text' => 'Group']]);\n $model->insert(['keyword' => 'gerege', 'type' => 'sys-defined'], ['mn' => ['text' => 'Гэрэгэ'], 'en' => ['text' => 'Gerege']]);\n $model->insert(['keyword' => 'developer', 'type' => 'sys-defined'], ['mn' => ['text' => 'Хөгжүүлэгч'], 'en' => ['text' => 'Developer']]);\n $model->insert(['keyword' => 'open-hours', 'type' => 'sys-defined'], ['mn' => ['text' => 'Нээлттэй цаг'], 'en' => ['text' => 'Open hours']]);\n $model->insert(['keyword' => 'current', 'type' => 'sys-defined'], ['en' => ['text' => 'Current'], 'mn' => ['text' => 'Одоогийн']]);\n $model->insert(['keyword' => 'website', 'type' => 'sys-defined'], ['mn' => ['text' => 'Вэбсайт'], 'en' => ['text' => 'Website']]);\n $model->insert(['keyword' => 'google', 'type' => 'sys-defined'], ['mn' => ['text' => 'Google'], 'en' => ['text' => 'Гүүгл']]);\n $model->insert(['keyword' => 'route', 'type' => 'sys-defined'], ['mn' => ['text' => 'Чиглэл'], 'en' => ['text' => 'Route']]);\n $model->insert(['keyword' => 'passport', 'type' => 'sys-defined'], ['mn' => ['text' => 'Паспорт'], 'en' => ['text' => 'Passport']]);\n $model->insert(['keyword' => 'warehouse', 'type' => 'sys-defined'], ['mn' => ['text' => 'Агуулах'], 'en' => ['text' => 'Warehouse']]);\n $model->insert(['keyword' => 'owner', 'type' => 'sys-defined'], ['mn' => ['text' => 'Эзэмшигч'], 'en' => ['text' => 'Owner']]);\n }", "abstract protected function modelTable();", "public function createTableByModel($modelClass){\n if(!is_subclass_of($modelClass, model::class)){\n throw new \\Exception(\"Class $classname not inherits class model\");\n }\n \n //get Date\n $table = $modelClass::tableGateway()->getTable();\n $fields = $modelClass::fields();\n \n $this->createTable($table, $fields , $modelClass::dbAdapter());\n }", "public static function model($model)\n\t{\n\t\treturn new ModelTranslator(app('translator')->getActiveLanguage(), $model);\n\t}", "public function create_table() {\n\n\t\tglobal $wpdb;\n\n\t\trequire_once ABSPATH . 'wp-admin/includes/upgrade.php';\n\n\t\t$charset_collate = '';\n\n\t\tif ( ! empty( $wpdb->charset ) ) {\n\t\t\t$charset_collate .= \"DEFAULT CHARACTER SET {$wpdb->charset}\";\n\t\t}\n\t\tif ( ! empty( $wpdb->collate ) ) {\n\t\t\t$charset_collate .= \" COLLATE {$wpdb->collate}\";\n\t\t}\n\n\t\t$sql = \"CREATE TABLE {$this->table_name} (\n\t\t\tid bigint(20) NOT NULL AUTO_INCREMENT,\n\t\t\taction varchar(255) NOT NULL,\n\t\t\tdata longtext NOT NULL,\n\t\t\tdate datetime NOT NULL,\n\t\t\tPRIMARY KEY (id)\n\t\t) {$charset_collate};\";\n\n\t\tdbDelta( $sql );\n\t}", "public function createTable()\r {\r\r if (!$this->checkProperty('model')) {\r exit;\r }\r\r if (!$this->model->checkModel()) {\r exit;\r }\r\r if (!$this->checkConnection()) {\r return false;\r }\r\r if ($this->model->isObjectOfClass(AbstractOrmModel::class)) {\r (new LogMessage())->writeError('AbstractOrmModel Class. Class: ' . $this->model->getClassName());\r }\r\r $sql = new TextDirectory();\r\r /** @var AbstractTable $table */\r $table = null;\r\r if ($this->connection->isObjectOfClass(MySqlConnection::class)) {\r $table = new MySqlTable();\r }\r\r if ($this->connection->isObjectOfClass(SqLiteConnection::class)) {\r $table = new SqLiteTable();\r }\r\r $table->connection = $this->connection;\r $table->tableName = $this->model->tableName;\r $table->primaryIndex = $this->model->primaryIndex;\r\r foreach ($this->model->getTypeList(true) as $type) {\r\r if ($type->isObjectOfClass(AbstractExternalComplexType::class)) {\r $setup = new ModelSetup();\r $setup->model = $type->getExternalModel();\r $setup->createTable();\r }\r\r if ($type->isObjectOfClass(UniqueIdType::class)) {\r $table->addTextField($type->fieldName, 36, $type->allowNullValue);\r }\r\r if ($type->isObjectOfClass(NumberExternalIdType::class)) {\r $table->addNumberField($type->fieldName, $type->allowNullValue);\r }\r\r if ($type->isObjectOfClass(LargeNumberExternalIdType::class)) {\r $table->addLargeNumberField($type->fieldName, $type->allowNullValue);\r }\r\r if ($type->isObjectOfClass(UniqueIdExternalIdType::class)) {\r $table->addTextField($type->fieldName, 36, $type->allowNullValue);\r }\r\r if ($type->isObjectOfClass(TextType::class) && !$type->isObjectOfClass(TranslationTextType::class)) {\r $table->addTextField($type->fieldName, $type->length, $type->allowNullValue);\r }\r\r if ($type->isObjectOfClass(TranslationTextType::class)) {\r foreach ((new LanguageConfig)->getLanguageList() as $language) {\r $table->addTextField($type->fieldName . '_' . $language, $type->length, $type->allowNullValue);\r }\r }\r\r if ($type->isObjectOfClass(TranslationLargeTextType::class)) {\r foreach ((new LanguageConfig)->getLanguageList() as $language) {\r $table->addLargeTextField($type->fieldName . '_' . $language, $type->length, $type->allowNullValue);\r }\r }\r\r if ($type->isObjectOfClass(AbstractFileType::class)) {\r $table->addTextField($type->fieldName, 255, $type->allowNullValue);\r }\r\r if ($type->isObjectOfClass(LargeTextType::class)) {\r $table->addLargeTextField($type->fieldName, $type->allowNullValue);\r }\r\r if ($type->isObjectOfClass(NumberType::class)) {\r $table->addNumberField($type->fieldName, $type->allowNullValue);\r }\r\r if ($type->isObjectOfClass(LargeNumberType::class)) {\r $table->addLargeNumberField($type->fieldName, $type->allowNullValue);\r }\r\r if ($type->isObjectOfClass(DecimalNumberType::class)) {\r $table->addDecimalNumberField($type->fieldName, $type->allowNullValue);\r }\r\r if ($type->isObjectOfClass(YesNoType::class)) {\r $table->addYesNoField($type->fieldName, $type->allowNullValue);\r }\r\r if ($type->isObjectOfClass(DateType::class)) {\r $table->addDateField($type->fieldName, $type->allowNullValue);\r }\r\r if ($type->isObjectOfClass(TimeType::class)) {\r $table->addTimeField($type->fieldName, $type->allowNullValue);\r }\r\r if ($type->getClassName() == DateTimeType::class) {\r $table->addDateTimeField($type->fieldName, $type->allowNullValue);\r }\r\r if ($type->isObjectOfClass(CreatedDateTimeType::class)) {\r\r if ($this->connection->isObjectOfClass(MySqlConnection::class)) {\r $table->addCreatedTimestamp($type->fieldName);\r }\r\r if ($this->connection->isObjectOfClass(SqLiteConnection::class)) {\r $table->addDateTimeField($type->fieldName);\r }\r\r }\r\r if ($type->isObjectOfClass(ModifiedDateTimeType::class)) {\r\r if ($this->connection->isObjectOfClass(MySqlConnection::class)) {\r $table->addModifiedTimestamp($type->fieldName);\r }\r\r if ($this->connection->isObjectOfClass(SqLiteConnection::class)) {\r $table->addDateTimeField($type->fieldName);\r }\r\r }\r\r }\r\r foreach ($this->model->getIndexList() as $index) {\r\r $dbIndex = null;\r if ($index->getClassName() == ModelIndex::class) {\r\r if ($this->connection->isObjectOfClass(MySqlConnection::class)) {\r $dbIndex = new MySqlIndex($table);\r }\r\r if ($this->connection->isObjectOfClass(SqLiteConnection::class)) {\r $dbIndex = new SqLiteIndex($table);\r }\r\r }\r\r if ($index->getClassName() == ModelUniqueIndex::class) {\r\r if ($this->connection->isObjectOfClass(MySqlConnection::class)) {\r $dbIndex = new MySqlUniqueIndex($table);\r }\r\r if ($this->connection->isObjectOfClass(SqLiteConnection::class)) {\r $dbIndex = new SqLiteUniqueIndex($table);\r }\r\r }\r\r if ($index->getClassName() == ModelSearchIndex::class) {\r\r if ($this->connection->isObjectOfClass(MySqlConnection::class)) {\r $dbIndex = new MySqlFullTextIndex($table);\r }\r\r if ($this->connection->isObjectOfClass(SqLiteConnection::class)) {\r $dbIndex = new SqLiteIndex($table);\r }\r\r }\r\r if ($dbIndex !== null) {\r $dbIndex->indexName = $index->indexName;\r foreach ($index->getFieldNameList() as $fieldName) {\r $dbIndex->addField($fieldName);\r }\r }\r\r }\r\r $table->createTable();\r\r foreach ($this->model->getTypeList(true) as $type) {\r\r if ($type->isObjectOfClass(FileType::class)) {\r (new Path($type->getDataPath()))->createPath();\r }\r\r if ($type->isObjectOfClass(ImageType::class)) {\r foreach ($type->getFormatList() as $resizeFormat) {\r $path = $type->getDataPath() . $resizeFormat->getPath();\r (new Path($path))->createPath();\r }\r }\r\r if ($type->isObjectOfClass(RedirectFilenameType::class)) {\r (new Path($type->file->getDataPath()))->createPath();\r }\r\r\r }\r\r SetupLog::$modelList[] = $this->model;\r\r (new LogPath())->createPath();\r $logFilename = (new SetupLogPath())->getFilename();\r\r $fileWriter = new TextFileWriter($logFilename);\r //$fileWriter->createDirectory = true;\r $fileWriter->appendToExistingFile = true;\r $fileWriter->addLine($this->model->tableName);\r $fileWriter->writeFile();\r\r\r\r return $sql;\r\r }", "public function getTranslationTable(): string\n {\n $model = $this->getTranslationModel();\n\n return (new $model())->getTable();\n }", "public function create_table( ) {\n\t\t$this->table_obj = $this->glue->make_temp_table( $this->table_obj );\n\n\t\t$this->table = $this->table_obj->get_name();\n\t\t$this->table_id_obj->set_name( $this->table );\n\t\t\n\t\treturn $this->table; \n\t\t\n\t}", "public function createTable()\n {\n parent::createTable();\n\n // There's no TemplateCachesRecord – need to set the FK manually\n craft()->db->createCommand()->addForeignKey($this->getTableName(), 'cacheId', 'templatecaches', 'id', static::CASCADE);\n\n }", "protected function create_table_object() {\n\t\treturn new DBTable('test');\t\t\n\t}", "function getStTableCreate( $tablename, $fields, $characterutf8 = true )\n\t{\n/*\nUNSIGNED?\nCREATE TABLE `#__st_lang` (\n `langid` char(5) NOT NULL default '',\n `name` varchar(20) NOT NULL default '',\n `remark` varchar(100),\n `id` int(11) unsigned NOT NULL auto_increment,\n PRIMARY KEY (`itemid`, `langid`, `propertyid`)\n UNIQUE KEY `st0_section_value_value_aro` (`section_value`(100),`value`(100)),\n KEY `st0_gacl_hidden_aro` (`hidden`)\n) TYPE=MyISAM CHARACTER SET `utf8`;\n\narray('fieldid' => \n\tarray('type' => 'text', 'digit' => 11, 'decimalplace' => 0, 'defaultvalue' => '', 'nullclass' => '1', 'pkclass' => '1', 'incclass' => '1')\n);\n\nVCHAR,NUM,CHAR\n*/\n\t\t$out = \"\";\n\t\t$pk = \"\";\n\t\tfor ($loopi = 0; $loopi < 2; $loopi++) {\n\t\t\tforeach ($fields as $field) {\n\t\t\t\tif($loopi == 0 && $field->pkclass != '1') {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif($loopi == 1 && $field->pkclass == '1') {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif($out != '') {\n\t\t\t\t\t$out .= \",\\r\\n\";\n\t\t\t\t}\n\t\t\t\t$out .= \" \".$this->nameQuote(strtolower($field->itemid));\n\t\t\t\tif($field->datatype == 'VCHAR') {\n\t\t\t\t\t$out .= \" VARCHAR(\".$field->digit.\")\";\n\t\t\t\t}\n\t\t\t\telse if($field->datatype == 'CHAR') {\n\t\t\t\t\t$out .= \" CHAR(\".$field->digit.\")\";\n\t\t\t\t}\n\t\t\t\telse if($field->datatype == 'TEXT') {\n\t\t\t\t\t$out .= \" TEXT\";\n\t\t\t\t}\n\t\t\t\telse if($field->datatype == 'BLOB') {\n\t\t\t\t\t$out .= \" BLOB\";\n\t\t\t\t}\n\t\t\t\telse if($field->datatype == 'DATETIME') {\n\t\t\t\t\t$out .= \" DATETIME\";\n\t\t\t\t}\n\t\t\t\telse if($field->datatype == 'NUM') {\n\t\t\t\t\t$out .= ' INT';\n\t\t\t\t\tif($field->digit != '0') {\n\t\t\t\t\t\t$out .= '('.$field->digit;\n\t\t\t\t\t\tif($field->decimalplace != '0') {\n\t\t\t\t\t\t\t$out .= ', '.$field->decimalplace;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$out .= ')';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if($field->datatype == 'UNUM') {\n\t\t\t\t\t$out .= ' INT';\n\t\t\t\t\tif($field->digit != '0') {\n\t\t\t\t\t\t$out .= '('.$field->digit;\n\t\t\t\t\t\tif($field->decimalplace != '0') {\n\t\t\t\t\t\t\t$out .= ', '.$field->decimalplace;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$out .= ')';\n\t\t\t\t\t}\n\t\t\t\t\t$out .= ' UNSIGNED';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$out .= \" \".strtoupper($field->datatype);\n\t\t\t\t\tif($field->digit != '0') {\n\t\t\t\t\t\t$out .= '('.$field->digit;\n\t\t\t\t\t\tif($field->decimalplace != '0') {\n\t\t\t\t\t\t\t$out .= ', '.$field->decimalplace;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$out .= ')';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($field->pkclass == '1') {\n\t\t\t\t\tif($pk != '') {\n\t\t\t\t\t\t$pk .= \", \";\n\t\t\t\t\t}\n\t\t\t\t\t$pk .= $this->nameQuote(strtolower($field->itemid));\n\t\t\t\t\t$out .= \" NOT NULL\";\n\t\t\t\t}\n\t\t\t\telse if($field->nullclass == '0') {\n\t\t\t\t\t$out .= \" NOT NULL\";\n\t\t\t\t}\n\t\t\t\tif($field->incclass == '1') {\n\t\t\t\t\t$out .= \" AUTO_INCREMENT\";\n\t\t\t\t}\n\t\t\t\telse if($field->defaultvalue != '') {\n\t\t\t\t\t$out .= \" DEFAULT \".$this->Quote($field->defaultvalue);\n\t\t\t\t}\n\t\t\t\telse if($field->defaultblank == '1' && $field->datatype != 'NUM' && $field->datatype != 'UNUM') {\n\t\t\t\t\t$out .= \" DEFAULT \".$this->Quote('');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif($pk != '') {\n\t\t\t$out .= \",\\r\\n\";\n\t\t\t$out .= \" PRIMARY KEY ($pk)\";\n\t\t}\n\t\telse {\n\t\t\t$out .= \"\\r\\n\";\n\t\t}\n\n\t\t$result = \"CREATE TABLE \".$this->nameQuote($tablename).\" (\\r\\n\" . $out.\"\\r\\n\";\n//for error at 5.5.27, remove next\n//\t\t$result .= ') TYPE=MyISAM';\n\t\t$result .= ') ';\n\t\t//if($characterutf8) {\n\t\t//\t$result .= ' CHARACTER SET `utf8`';\n\t\t//}\n\t\t$result .= \";\\r\\n\";\n\t\treturn $result;\n\t}", "private function __createModelTable($fileSenchaModel, $databaseTable = NULL, $fields = array())\n {\n try\n {\n $recordSet = self::$__conn->query(\"SHOW FULL COLUMNS IN \".$databaseTable.\";\");\n $tableColumns = $recordSet->fetchAll(PDO::FETCH_ASSOC);\n $fields = '';\n foreach($tableColumns as $column) $fields .= MatchaUtils::t(2).self::__renderSenchaFieldSyntax($column).chr(13);\n }\n catch(PDOException $e)\n {\n MatchaErrorHandler::__errorProcess($e);\n return false;\n }\n }", "function show_create_table($table);", "public static function initTable($rows, $model, $attributes) { \n \n $modelRef = 'rifka\\\\'.$model;\n\n foreach ($rows as $row) {\n $structure = array();\n try {\n foreach ($attributes as $attribute) {\n $structure[$attribute] = $row->$attribute;\n }\n // Create new table\n $newTable = $modelRef::create($structure); \n } catch (Exception $e) {\n echo $e;\n }\n }\n }", "public function create_table() {\n\n\t\tglobal $wpdb;\n\t\t\n\t\t$table_name \t = $this->table_name;\n\t\t$charset_collate = $wpdb->get_charset_collate();\n\n\t\t$query = \"CREATE TABLE {$table_name} (\n\t\t\tid bigint(10) NOT NULL AUTO_INCREMENT,\n\t\t\ttype varchar(255) NOT NULL,\n\t\t\tname text NOT NULL,\n\t\t\tcolor text NOT NULL,\n\t\t\tcolor_text text,\n\t\t\tis_default tinyint(1) NOT NULL,\n\t\t\tis_visible tinyint(1) NOT NULL,\n\t\t\tis_bookable tinyint(1) NOT NULL,\n\t\t\tauto_pending varchar(20),\n\t\t\tcalendar_id bigint(10) NOT NULL,\n\t\t\tPRIMARY KEY id (id)\n\t\t) {$charset_collate};\";\n\n\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\t\tdbDelta( $query );\n\n\t}", "function create_link_table($second_model){\n if(!array_search($this->link_table($second_model), $this->tables())){\n $sql = 'CREATE TABLE `' . $this->link_table($second_model) . '` (\n `' . $this->foreign_key() . '` int(11) unsigned NOT NULL,\n `' . $second_model->foreign_key() . '` int(11) unsigned NOT NULL,\n UNIQUE KEY `combo` (`' . $this->foreign_key() . '`,`' . $second_model->foreign_key() . '`)\n ) DEFAULT CHARSET=' . DB_CHARSET . ';';\n $this->query($sql);\n }\n }", "function create_table() {\n\n\t\tglobal $wpdb;\n\n\t\t$table_name\t= $this->make_table_name();\n\n\t\t// check that table already exist\n\t\t$table = $wpdb->get_var(\n\t\t\t$wpdb->prepare( \"SHOW TABLES LIKE '$table_name'\", \"%s\" )\n\t\t);\n\n\t\tif ( $table !== $table_name ) {\n\n\t\t\t// create table\n\t\t\t$sql = \"CREATE TABLE {$table_name} (\n\t\t\t\tid \t\t\t\tint \t\t NOT NULL AUTO_INCREMENT,\n\t\t\t\tuser_id\t \t\tvarchar(255) NOT NULL,\n\t\t\t\tprimary_pages \tvarchar(255),\n\t\t\t\tcustom_pages \tvarchar(255),\n\t\t\t\ttags \t\t\tvarchar(255),\n\t\t\t\tcategories \t\tvarchar(255),\n\t\t\t\tPRIMARY KEY (id)\n\t\t\t);\";\n\n\t\t\t// execute statement\n\t\t\t$stat = $wpdb->query( $sql );\n\t\t}\n\t}", "public static function create($model)\n {\n $config = Config::get('Database');\n $table = 'YAPF\\\\Core\\\\Database\\\\Driver\\\\' . $config['driver'] . '\\\\Table';\n\n return new $table($model);\n }", "function CreateTable()\n {\n $name['nameTable'] = $_POST['nameTable'];\n $name['nameUser'] = $_SESSION['userNick'];\n $this->Chat_model->insert_name_table($name);\n $name['nameTable'] = $this->Chat_model->get_all_room();\n $this->load->view(\"chatView\", $this->newChat());\n }", "function createDatabaseTable($tableJSON,$typeTrans){\n $table = json_decode($tableJSON);\n $cols = array();\n foreach ($table->fields as $field){\n $myCol = \"'\".$field->name.\"' \".$typeTrans[$field->type];\n if ($field->name==$table->identifier_field){\n $myCol .= ' PRIMARY KEY';\n } else if ($field->required){\n $myCol .= \" NOT NULL\";\n }\n foreach ($field->properties as $prop){\n $myCol .= \" \".$prop;\n }\n $cols[] = $myCol;\n }\n $createTableSQL = \"CREATE TABLE \".$table->name.\" (\n \".implode($cols,\",\\n\").\"\n );\";\n return $createTableSQL;\n}", "public function create_table() {\n\n\t\tglobal $wpdb;\n\n\t\trequire_once ABSPATH . 'wp-admin/includes/upgrade.php';\n\n\t\t$charset_collate = '';\n\n\t\tif ( ! empty( $wpdb->charset ) ) {\n\t\t\t$charset_collate .= \"DEFAULT CHARACTER SET {$wpdb->charset}\";\n\t\t}\n\t\tif ( ! empty( $wpdb->collate ) ) {\n\t\t\t$charset_collate .= \" COLLATE {$wpdb->collate}\";\n\t\t}\n\n\t\t$sql = \"CREATE TABLE {$this->table_name} (\n\t\t\tid bigint(20) NOT NULL AUTO_INCREMENT,\n\t\t\tentry_id bigint(20) NOT NULL,\n\t\t\tform_id bigint(20) NOT NULL,\n\t\t\tfield_id int(11) NOT NULL,\n\t\t\tvalue longtext NOT NULL,\n\t\t\tdate datetime NOT NULL,\n\t\t\tPRIMARY KEY (id),\n\t\t\tKEY entry_id (entry_id),\n\t\t\tKEY form_id (form_id),\n\t\t\tKEY field_id (field_id)\n\t\t) {$charset_collate};\";\n\n\t\tdbDelta( $sql );\n\t}", "public function getTranslationModel();", "static function create_the_table(){\n\t\t$table = self::get_table_name();\n\t\t$sql = \"CREATE TABLE IF NOT EXISTS $table(\n\t\t\t`id` bigint unsigned NOT NULL AUTO_INCREMENT,\n\t\t\t`term_id` bigint unsigned NOT NULL,\n\t\t\t`position` tinyint NOT NULL,\n\t\t\t`name` varchar(100) NOT NULL,\n\t\t\t`content` longtext DEFAULT NULL,\n\t\t\tPRIMARY KEY(id),\n\t\t\tUNIQUE(term_id)\t \n\t\t)\";\n\t\t\n\t\tif(!function_exists('dbDelta')) :\n\t\t\tinclude ABSPATH . 'wp-admin/includes/upgrade.php';\n\t\tendif;\n\t\tdbDelta($sql);\n\t }", "function create_table()\n {\n $this->load->dbforge();\n \n /* Specify the table schema */\n $fields = array(\n 'id' => array(\n 'type' => 'INT',\n 'constraint' => 5,\n 'unsigned' => TRUE,\n 'auto_increment' => TRUE\n ),\n 'message' => array(\n 'type' => 'TEXT'\n ),\n 'time' => array(\n 'type' => 'INT'\n )\n );\n \n /* Add the field before creating the table */\n $this->dbforge->add_field($fields);\n \n \n /* Specify the primary key to the 'id' field */\n $this->dbforge->add_key('id', TRUE);\n \n \n /* Create the table (if it doesn't already exist) */\n $this->dbforge->create_table('Chats', TRUE);\n }", "protected function createModel($modelname, $prefix, $table_name)\n {\n//\n//\n// if($table_name) {\n// $this->output->info('Custom table name: '.$prefix.$table_name);\n// $this->appendToEndOfFile(app_path().'/'.$modelname.'.php', \" protected \\$table = '\".$table_name.\"';\\n\\n}\", 2);\n// }\n\n\n $columns = $this->getColumns($table_name);\n\n// $cc = collect($columns);\n//\n// if(!$cc->contains('name', 'updated_at') || !$cc->contains('name', 'created_at')) {\n// $this->appendToEndOfFile(app_path().'/'.$modelname.'.php', \" public \\$timestamps = false;\\n\\n}\", 2, true);\n// }\n\n // Verbose $this->output->info('Model created, columns: ' . json_encode($columns));\n return $columns;\n }", "protected function makeTranslatedDataFromModelData(array $model)\n {\n // translated model is sluggable if model is, but on translated property or column\n $sluggable = ($model['sluggable'] && array_get($model, 'sluggable_setup.translated'));\n\n return [\n 'module' => $model['module'],\n 'name' => $model['name'] . config('pxlcms.generator.models.translation_model_postfix'),\n 'table' => ! empty($model['table'])\n ? $model['table'] . snake_case(config('pxlcms.tables.translation_postfix', '_ml'))\n : null,\n 'cached' => $model['cached'],\n 'is_translated' => false,\n 'is_translation' => true, // only true if it is a Translation model itself\n 'is_listified' => false,\n 'order_by' => [],\n // attributes\n 'normal_fillable' => $model['translated_attributes'],\n 'translated_fillable' => [],\n 'hidden' => [],\n 'casts' => [],\n 'dates' => [],\n 'defaults' => [],\n 'normal_attributes' => [],\n 'translated_attributes' => [],\n 'timestamps' => null,\n // categories\n 'categories_module' => null,\n // relations\n 'relations_config' => [],\n 'relationships' => [\n 'normal' => [],\n 'reverse' => [],\n 'image' => [],\n 'file' => [],\n 'checkbox' => [],\n ],\n // special\n 'sluggable' => $sluggable,\n 'sluggable_setup' => $sluggable ? $model['sluggable_setup'] : [],\n 'scope_active' => false,\n 'scope_position' => false,\n ];\n }", "public function actionCreate()\n\t{\n\t\t$model = new DefineTable;\n\n\t\tif ($model->load($_POST) && $model->save()) {\n\t\t\t\t\n\t\t\t$sql=SqlData::getCreateTableSql($model->name_en);\n\t\t\tLuLu::execute($sql);\n\t\t\t\n\t\t\t$this->addFields($model);\n\n\t\t\tCacheDataManager::createTableCache();\n\t\t\tCacheDataManager::createFieldCache();\n\t\t\treturn $this->redirect(['index']);\n\t\t} else {\n\t\t\t$locals =[];\n\t\t\t$locals['model']=$model;\n\t\t\treturn $this->render('create', $locals);\n\t\t}\n\t}", "public function createTable()\n {\n $table = self::$table_name;\n $SQL = <<<EOD\n CREATE TABLE IF NOT EXISTS `$table` (\n `unassigned_id` INT(11) NOT NULL AUTO_INCREMENT,\n `file_path` TEXT NOT NULL,\n `file_md5` VARCHAR(64) NOT NULL DEFAULT '',\n `extension` VARCHAR(64) NOT NULL DEFAULT '',\n `locale_locale` VARCHAR(2) NOT NULL DEFAULT 'EN',\n `locale_source` TEXT NOT NULL,\n `locale_source_plain` TEXT NOT NULL,\n `locale_md5` VARCHAR(64) NOT NULL DEFAULT '',\n `locale_type` ENUM ('DEFAULT', 'CUSTOM', 'METRIC') NOT NULL DEFAULT 'DEFAULT',\n `translation_text` TEXT NOT NULL,\n `translation_text_plain` TEXT NOT NULL,\n `translation_md5` VARCHAR(64) NOT NULL DEFAULT '',\n `timestamp` TIMESTAMP,\n PRIMARY KEY (`unassigned_id`)\n )\n COMMENT='Unassigned locale sources for the i18nEditor',\n ENGINE=InnoDB\n AUTO_INCREMENT=1\n DEFAULT CHARSET=utf8\n COLLATE='utf8_general_ci'\nEOD;\n try {\n $this->app['db']->query($SQL);\n $this->app['monolog']->addDebug(\"Created table '\".self::$table_name);\n } catch (\\Doctrine\\DBAL\\DBALException $e) {\n throw new \\Exception($e);\n }\n }", "function custom_label_tbl(){\n global $wpdb;\n $tablename =$wpdb->prefix .\"manage_labels\"; \n if($wpdb->get_var(\"SHOW TABLES LIKE '$tablename'\") != $tablename) {\n //if it does not exists we create the table\n $sql=\"CREATE TABLE `$tablename`(\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `value` varchar(500) DEFAULT NULL,\n `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\n PRIMARY KEY (id)\n );\";\n //wordpress function for updating the table\n require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n dbDelta($sql);\n }\n}", "abstract protected function createTable(Table $table);", "public function createtables(){\r\n\t\t\techo \"Ha llegao al crear tablas\";\r\n\t\t\t$this->createTableUser();\r\n\t\t}", "public function create(Model $model) ;", "public function createTable( $table, $languages ) {\n\t\t\t$table_exists = $this->getOne( \"SHOW TABLES LIKE '{$table['name']}'\" );\n\t\t\t\n\t\t\t$table_fields_natural_order = array();\n\t\t\t\n\t\t\tif( $table->fields && count( $table->fields->children() ) && !$table_exists ) {\n\t\t\t\t$charset = ( !empty( $table->options->charset ) ? \"DEFAULT CHARSET = {$table->options->charset}\" : '' );\n\t\t\t\t$collate = ( !empty( $table->options->collate ) ? \"DEFAULT COLLATE = {$table->options->collate}\" : '' );\n\t\t\t\t\n\t\t\t\t$fields = array();\n\t\t\t\t$multilang_fields = array();\n\t\t\t\tforeach( $table->fields->children() as $field ) {\n\t\t\t\t\t$field_name = trim( strval( $field->name ) );\n\t\t\t\t\t\n\t\t\t\t\t/// Save all table fields, ordered as they defined in XML\n\t\t\t\t\t$table_fields_natural_order[] = $field_name;\n\t\t\t\t\t\n\t\t\t\t\t/// Creating option string for the field ( type, length, comments, etc. )\n\t\t\t\t\t$options = $this->buildFieldOptions( $field );\n\t\t\t\t\t\n\t\t\t\t\tif( isset( $field->{'multi-lingual'} ) ) {\n\t\t\t\t\t\t$multilang_fields[] = $field_name;\n\t\t\t\t\t\t\n\t\t\t\t\t\tforeach( $languages as $lang ) {\n\t\t\t\t\t\t\t$fields[] = \"`{$field_name}_{$lang}` {$options}\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$fields[] = \"`{$field_name}` {$options}\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$field_string = implode( \",\\n\\t\", $fields );\n\t\t\t\t\n\t\t\t\t$create_sql = \"CREATE TABLE codb_table({$table['name']}) ( \\n\\t{$field_string}\\n ) ENGINE = {$table->options->engine} {$charset} {$collate};\";\n\t\t\t\t\n\t\t\t\t$create_res = $this->query( $create_sql );\n\t\t\t\t\n\t\t\t\tif( !$create_res ) {\n\t\t\t\t\t$this->addError( codb::CODB_ERROR_TABLE_CREATE, $table['name'], mysql_error( $this->database_link ), $table['name'] );\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/// Creating table indexes in exists\n\t\t\t\tif( count( $table->indexes->children() ) ) {\n\t\t\t\t\n\t\t\t\t\t/// Looping into the index nodes \n\t\t\t\t\tforeach( $table->indexes->children() as $index_type => $indexes ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t/// Define index type\n\t\t\t\t\t\t$index_type = ( $index_type == 'index' ? \"INDEX\" : \"{$index_type} INDEX\" );\n\t\t\t\t\t\t\n\t\t\t\t\t\tforeach( $indexes->children() as $node_type => $index_field ) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$index_fields_arr = array();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/// If index contains more than one field ( group index )\n\t\t\t\t\t\t\tif( $node_type == 'index-group' ) {\n\t\t\t\t\t\t\t\t$index_name = trim( strval( $index_field['group-name'] ) );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t/// Looping through the index fields and store\n\t\t\t\t\t\t\t\tforeach( $index_field->children() as $group_index_field ) {\n\t\t\t\t\t\t\t\t\t$idx_length = '';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif( !empty( $group_index_field['length'] ) ) {\n\t\t\t\t\t\t\t\t\t\t$idx_length = \"( {$group_index_field['length']} )\";\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif( in_array( $group_index_field['field'], $multilang_fields ) ) {\n\t\t\t\t\t\t\t\t\t\tforeach( $languages as $lang ) {\n\t\t\t\t\t\t\t\t\t\t\t$index_fields_arr[] = \"`{$group_index_field['field']}_{$lang}` {$idx_length}\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t$index_fields_arr[] = \"`{$group_index_field['field']}` {$idx_length}\";\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/// Single field index\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t$index_name = trim( strval( $index_field['name'] ) );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$idx_length = '';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif( !empty( $index_field['length'] ) ) {\n\t\t\t\t\t\t\t\t\t$idx_length = \"( {$index_field['length']} )\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t/// Create multi-language fields as a separated indexes, not group. To prevent max. index length exceed\n\t\t\t\t\t\t\t\tif( in_array( $index_field['field'], $multilang_fields ) ) {\n\t\t\t\t\t\t\t\t\tforeach( $languages as $lang ) {\n\t\t\t\t\t\t\t\t\t\t$index_field_name = \"{$index_field['field']}_{$lang}\";\n\t\t\t\t\t\t\t\t\t\t$index_field_title = \"{$index_name}_{$lang}\";\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$index_query = \"CREATE {$index_type} `{$index_field_title}` ON codb_table({$table['name']}) ( `{$index_field_name}` {$idx_length} )\";\n\t\t\t\t\t\t\t\t\t\t$create_index_res = $this->query( $index_query );\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif( !$create_index_res ) {\n\t\t\t\t\t\t\t\t\t\t\t$this->addError( codb::CODB_ERROR_INDEX_CREATE . $index_query, mysql_error( $this->database_link ), $table['name'] );\n// \t\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t$index_fields_arr[] = \"`{$index_field['field']}` {$idx_length}\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif( !in_array( $index_field['field'], $multilang_fields ) ) {\n\t\t\t\t\t\t\t\t$fields_to_index = implode( \", \", $index_fields_arr );\n\t\t\t\t\t\t\t\t$indexes_query = \"CREATE {$index_type} `{$index_name}` ON codb_table({$table['name']}) ( $fields_to_index )\";\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$create_indexes_res = $this->query( $indexes_query );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif( !$create_indexes_res ) {\n\t\t\t\t\t\t\t\t\t$this->addError( codb::CODB_ERROR_INDEX_CREATE . $indexes_query, mysql_error( $this->database_link ), $table['name'] );\n// \t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/// Trying pre-populate table\n\t\t\t\t$this->fillTables( $table, $multilang_fields );\n\t\t\t}\n\t\t\telseif( !$table->fields || !count( $table->fields->children() ) ) {\n\t\t\t\t$this->addError( codb::CODB_ERROR_NO_TABLE_FIELDS, $table['name'] );\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telseif( $table_exists ) {\n\t\t\t\t$this->addError( codb::CODB_ERROR_TABLE_EXISTS, $table['name'] );\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}", "function create_plugin_database_table(){\n\n}", "protected function createModel($modelname, $prefix, $table_name) {\n//\n//\n// if($table_name) {\n// $this->output->info('Custom table name: '.$prefix.$table_name);\n// $this->appendToEndOfFile(app_path().'/'.$modelname.'.php', \" protected \\$table = '\".$table_name.\"';\\n\\n}\", 2);\n// }\n\n\n $columns = $this->getColumns($table_name);\n\n// $cc = collect($columns);\n//\n// if(!$cc->contains('name', 'updated_at') || !$cc->contains('name', 'created_at')) {\n// $this->appendToEndOfFile(app_path().'/'.$modelname.'.php', \" public \\$timestamps = false;\\n\\n}\", 2, true);\n// }\n\n $this->output->info('Model created, columns: '.json_encode($columns));\n return $columns;\n }", "private function writeTranslationModel(): void\n {\n echo \"Creazione del Model translatable [{$this->model}Translation]\" . PHP_EOL;\n $translationModel = str_replace('##model##', $this->model, file_get_contents(__DIR__ . '/stubs/translation_model.stub'));\n\n // Richiedi conferma e crea Model.\n $this->writeFile(app_path(\"{$this->model}Translation.php\"), $translationModel);\n }", "public function buildCreateTableSQL( $model, $if_not_exists = false )\n {\n Charcoal_ParamTrait::validateIsA( 1, 'Charcoal_ITableModel', $model );\n Charcoal_ParamTrait::validateBoolean( 2, $if_not_exists );\n\n try{\n $field_list = $model->getFieldList();\n\n $SQL_pk_list = array();\n $SQL_field_list = array();\n\n foreach( $field_list as $name )\n {\n $name = s($name);\n\n $pk = $model->getAnnotationValue( $name, s('pk') );\n $type = $model->getAnnotationValue( $name, s('type') );\n $notnull = $model->getAnnotationValue( $name, s('notnull') );\n $charset = $model->getAnnotationValue( $name, s('charset') );\n $serial = $model->getAnnotationValue( $name, s('serial') );\n $default = $model->getAnnotationValue( $name, s('default') );\n $comment = $model->getAnnotationValue( $name, s('comment') );\n\n /** @var Charcoal_AnnotationValue $type */\n\n $type_name = $this->mapType( $type->getValue() );\n\n $field_expr = \"`$name` $type_name\";\n\n if ( $pk ){\n $SQL_pk_list[] = \"`$name`\";\n if ( $notnull ){\n $field_expr .= ' NOT NULL';\n }\n if ( $serial ){\n $field_expr .= ' AUTO_INCREMENT';\n }\n if ( $comment ){\n $field_expr .= \" COMMENT '\" . $comment->getValue() . \"'\";\n }\n }\n else{\n if ( $default ){\n $field_expr .= ' DEFAULT ' . $default->getValue();\n }\n if ( $charset ){\n $field_expr .= \" CHARACTER SET $charset\";\n }\n if ( $notnull ){\n $field_expr .= ' NOT NULL';\n }\n if ( $comment ){\n $field_expr .= \" COMMENT '\" . $comment->getValue() . \"'\";\n }\n }\n\n $SQL_field_list[] = $field_expr;\n }\n\n $SQL_field_list = implode( \",\\n\", $SQL_field_list );\n $SQL_pk_list = implode( ',', $SQL_pk_list );\n\n $table_name = $model->getTableName();\n $if_not_exists = ub($if_not_exists) ? 'IF NOT EXISTS' : '';\n\n $sql = \"CREATE TABLE $if_not_exists `$table_name` (\\n $SQL_field_list \\n ,PRIMARY KEY( $SQL_pk_list ) )\";\n\n log_debug( \"debug,sql,smart_gateway\", \"buildCreateTableSQL result: $sql\", self::TAG );\n\n return $sql;\n }\n catch ( Exception $e )\n {\n _throw( new Charcoal_SQLBuilderException( \"MySQL_SQLBuilder#buildCreateTableSQL failed\" ) );\n }\n return '';\n }", "protected function createTable(string $tableName = 'foo')\n\t{\n\t\t$this->forge->addField([\n\t\t\t'id' => [\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'constraint' => 11,\n\t\t\t\t'unsigned' => true,\n\t\t\t\t'auto_increment' => true,\n\t\t\t],\n\t\t\t'name' => [\n\t\t\t\t'type' => 'varchar',\n\t\t\t\t'constraint' => 255,\n\t\t\t\t'null' => false,\n\t\t\t],\n\t\t]);\n\t\t$this->forge->createTable($tableName . '_fk');\n\n\t\t// Create main table\n\t\t$this->forge->addField([\n\t\t\t'id' => [\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'constraint' => 11,\n\t\t\t\t'unsigned' => true,\n\t\t\t\t'auto_increment' => true,\n\t\t\t],\n\t\t\t'name' => [\n\t\t\t\t'type' => 'varchar',\n\t\t\t\t'constraint' => 255,\n\t\t\t\t'null' => false,\n\t\t\t],\n\t\t\t'email' => [\n\t\t\t\t'type' => 'varchar',\n\t\t\t\t'constraint' => 255,\n\t\t\t\t'null' => true,\n\t\t\t],\n\t\t\t'key_id' => [\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'constraint' => 11,\n\t\t\t\t'unsigned' => true,\n\t\t\t],\n\t\t]);\n\t\t$this->forge->addPrimaryKey('id');\n\t\t$this->forge->addKey('name');\n\t\t$this->forge->addUniqueKey('email');\n\t\t$this->forge->addForeignKey('key_id', $tableName . '_fk', 'id');\n\t\t$this->forge->createTable($tableName);\n\t}", "function create($create_flag)\n\t{\n\t\tglobal $tr;\n\t\t// call the parent create() first\n\t\t$result = parent::create($create_flag);\n\n\t\t// was the table created?\n\t\tif (PEAR::isError($result) || ! $result) \n\t\t{\n\t\t\t// table not created\n\t\t\treturn $result;\n\t\t} else {\n\t\t\t// table created successfully; insert some rows...\n\t\t\t$data_file = './i18n.txt';\n\t\t\tif (! is_readable($data_file))\n\t\t\t{\n\t\t\t\tdie('Fatal: Cant read '.htmlspecialchars($data_file));\n\t\t\t}\n\n\t\t\t$data = file($data_file);\n\t\t\t$res = null;\n\n\t\t\tforeach($data as $key => $values)\n\t\t\t{\n\t\t\t\t$val = explode(':::', $values);\n\t\t\t\t$cols = array(\n\t\t\t\t\t'id' => $val[0],\n\t\t\t\t\t'string_id'=> $val[1],\n\t\t\t\t\t'name_en' => $val[2],\n\t\t\t\t\t'name_ru' => $val[3],\n\t\t\t\t);\n\n\t\t\t\t$res = $this->insert($cols);\n\n\t\t\t\tif (PEAR::isError($res)) \n\t\t\t\t{ \n\t\t\t\t\treturn PEAR::throwError('Fatal: '.htmlspecialchars($res->getMessage())); \n\t\t\t\t}\n\t\t\t}\n\t\t\t// ... and return the insert results.\n\t\t\treturn $res;\n\t\t}\n\t}", "function create_table(){\r\n\t\t$tables = array();\r\n\t\t/**\r\n\t\t* Table structure for table ''\r\n\t\t*/\r\n\t\t$fields = array(\r\n\t\t\tarray(\"es_identifier\"\t\t,\"unsigned integer\"\t\t\t,\"NOT NULL\"\t,\"auto_increment\",\"key\"),\r\n\t\t\tarray(\"es_client\"\t\t\t,\"unsigned integer\"\t\t\t,\"NOT NULL\"\t,\"default '0'\",\"key\"),\r\n\t\t\tarray(\"es_label\"\t\t\t,\"varchar(255)\"\t\t\t\t,\"NOT NULL\"\t,\"default ''\"),\r\n\t\t\tarray(\"es_date_created\"\t\t,\"datetime\"\t\t\t\t\t,\"NOT NULL\"\t,\"default '0000-00-00 00:00:00'\"),\r\n\t\t\tarray(\"es_status\"\t\t\t,\"unsigned integer\"\t\t\t,\"NOT NULL\"\t,\"default '0'\"),\r\n\t\t\tarray(\"es_menu\"\t\t\t\t,\"unsigned integer\"\t\t\t,\"NOT NULL\"\t,\"default '0'\"),\r\n\t\t\tarray(\"es_base_uri\"\t\t\t,\"text\"\t\t\t\t\t\t,\"NOT NULL\"\t,\"default ''\"),\r\n\t\t\tarray(\"es_cache\"\t\t\t,\"unsigned integer\"\t\t\t,\"NOT NULL\"\t,\"default ''\"),\r\n\t\t\tarray(\"es_auto_clean\"\t\t,\"unsigned small integer\"\t,\"NOT NULL\"\t,\"default ''\"),\r\n\t\t\tarray(\"es_last_cached\"\t\t,\"unsigned integer\"\t\t\t,\"NOT NULL\"\t,\"default '0'\")\r\n\t\t);\r\n\t\t$primary =\"es_identifier\";\r\n\t\t$tables[count($tables)] = array(\"embedscript_list\", $fields, $primary);\r\n\r\n\t\treturn $tables;\r\n\t}", "function createLanguageTable(){\r\r\n $hidden = PHPWS_Form::formHidden(array(\"module\"=>\"language\", \"lng_adm_op\"=>\"createLanguage\")); \r\r\n $languages = $this->getCodeArray();\r\r\n\r\r\n if ($current_languages = $this->getRegularLanguages())\r\r\n foreach ($current_languages as $del_abbr=>$devNull)\r\r\n\tunset($languages[$del_abbr]);\r\r\n \r\r\n if ($dyn_languages = $this->getDynamicLanguages())\r\r\n foreach ($dyn_languages as $del_abbr=>$devNull)\r\r\n\tunset($current_languages[$del_abbr]);\r\r\n\r\r\n $title = $_SESSION[\"translate\"]->it(\"Create Language Table\") . CLS_help::show_link(\"language\", \"createTable\");\r\r\n\r\r\n $content = \"\r\r\n<form action=\\\"index.php\\\" method=\\\"post\\\">\r\r\n$hidden\";\r\r\n $content .= PHPWS_Form::formSelect(\"reg_opt_language\", $languages).\" \";\r\r\n $content .= PHPWS_Form::formSubmit($_SESSION[\"translate\"]->it(\"Create Language Table\"), \"regLanguage\").\"<br /><br />\";\r\r\n\r\r\n if (count($current_languages)){ \r\r\n $content .= PHPWS_Form::formSelect(\"dyn_opt_language\", $current_languages).\" \";\r\r\n $content .= PHPWS_Form::formSubmit($_SESSION[\"translate\"]->it(\"Create Dynamic Table\"), \"dynLanguage\").\"<br /><br />\";\r\r\n }\r\r\n$content .= \"</form>\";\r\r\n\r\r\n $GLOBALS[\"CNT_lang\"][\"title\"] = $title;\r\r\n $GLOBALS[\"CNT_lang\"][\"content\"] = $this->link_to_admin().\"<br /><br />\";\r\r\n $GLOBALS[\"CNT_lang\"][\"content\"] .= $content;\r\r\n }", "public function actionCreate()\n {\n $model = new Table();\n $request = Yii::$app->request;\n\n if ($request->isPost) {\n $post = $this->requestParams();\n $data = $post['Table'];\n $data['create_time'] = $data['update_time'] = time();\n $post['Table'] = $data;\n\n try{\n $this->createTable($data);\n $model->load($post) && $model->save();\n return $this->Success('新增模型成功!',['table/index']);\n\n }catch(Exception $e){\n return $this->Error($e->getMessage(),['table/index']);\n }\n\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public static function create_tables()\n {\n }", "function create_table($tbl_name)\n\t{\n\t\t$this->load->dbforge();\n\t\t$this->dbforge->drop_table($tbl_name,TRUE);\n\t\t/* DEFAULT FIELDS */\n\t\t$fields = $this->{'table_'.$tbl_name}();\n\t\t// debug($fields);\n\t\t/* CREATE TABLE */\n\t\t$this->dbforge->add_key('id', TRUE);\n\t\t$this->dbforge->add_field($fields);\n\t\tif (! $result = $this->dbforge->create_table($tbl_name, TRUE)){\n\t\t\tdebug('FAILED !');\n\t\t}\n\t\tdebug('SUCCESS !');\n\t}", "private function addTableSection(Model $model, array $fields): void\n {\n $cardTable = CardTable::addTo($this, ['class' => $this->tableClass]);\n $cardTable->setModel($model, $fields);\n }", "public function table(object $dataModel): static;", "function newNewsTable(){\n global $wpdb;\n $table_name = $wpdb->prefix . \"Simplenews\";\n $sql = \" CREATE TABLE $table_name(\n NewsID int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,\n NewsText VARCHAR(1000) NOT NULL,\n NewsImageUrl VARCHAR(1000) NOT NULL\n ) ;\";\n require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n dbDelta($sql);}", "public function createMigrationTable() {}", "public function buildExistsTableSQL( $database, $model );", "private function createTournamentTable()\n {\n $sql = 'CREATE TABLE IF NOT EXISTS ' . self::TOURNAMENT_TABLE . '\n (\n `id` INT(11) NOT NULL AUTO_INCREMENT,\n `grouping` VARCHAR(64),\n `casino` VARCHAR(64),\n `game` VARCHAR(64),\n `schedule` datetime,\n `cost` VARCHAR(64),\n `fee_percent` VARCHAR(64),\n `s_points` VARCHAR(64),\n `notes` VARCHAR(64),\n PRIMARY KEY (`id`)\n );';\n $this->query($sql);\n }", "public static function getTableName(string $model) : string\n {\n return (new $model())->getTable();\n }", "function create_table(){\r\n\t\t$tables = array();\r\n\r\n\t\t/**\r\n\t\t* Table structure for table 'embed_libertas_form'\r\n\t\t*/\r\n\t\t/*\r\n\t\t$fields = array(\r\n\t\t\tarray(\"embed_identifier\"\t\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"auto_increment\",\"key\"),\r\n\t\t\tarray(\"trans_identifier\"\t\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"default '0'\"),\r\n\t\t\tarray(\"client_identifier\"\t\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"default '0'\"),\r\n\t\t\tarray(\"form_int_identifier\"\t\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"default '0'\"),\r\n\t\t\tarray(\"form_str_identifier\"\t\t,\"varchar(255)\"\t\t,\"NOT NULL\"\t,\"default ''\"),\r\n\t\t\tarray(\"module_starter\"\t\t\t,\"varchar(50)\"\t\t,\"NOT NULL\"\t,\"default ''\")\r\n\t\t);\r\n\t\t$primary =\"embed_identifier\";\r\n\t\t$tables[count($tables)] = array(\"embed_libertas_form\", $fields, $primary);\r\n\t\t*/\r\n\t\treturn $tables;\r\n\t}", "public function tableCreate()\n {\n $path = get_home_path();\n\n global $wpdb;\n\n require_once( $path . '/wp-admin/includes/upgrade.php');\n\n $table_name_api = $this->get_api_table();\n $table_name_social = $this->get_social_table();\n\n $charset_collate = $wpdb->get_charset_collate();\n\n\n $api = \"CREATE TABLE $table_name_api (\n id mediumint(9) NOT NULL AUTO_INCREMENT,\n time datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,\n api_name text NOT NULL,\n api_key mediumtext NOT NULL,\n api_secret mediumtext NOT NULL,\n UNIQUE KEY id (id)\n ) $charset_collate;\";\n\n\n $social = \"CREATE TABLE $table_name_social (\n id mediumint(9) NOT NULL AUTO_INCREMENT,\n time datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,\n social_source text NOT NULL,\n social_content_type text NOT NULL,\n social_title text NOT NULL,\n social_geo text NOT NULL,\n social_url longtext NOT NULL,\n social_api_key mediumtext NOT NULL,\n social_api_secret mediumtext NOT NULL,\n social_api_name text NOT NULL,\n UNIQUE KEY id (id)\n ) $charset_collate;\";\n\n\n dbDelta( $api );\n dbDelta( $social );\n\n}", "public function created(Model $model): void\n {\n DB::table($model::longTableName())->insert($model::makeLongEntries($model->getAttributes()));\n $this->log($model, 'created');\n }", "public static function create_messages_table($db) {\n $sql = \"CREATE TABLE IF NOT EXISTS messages (\n id INT(11) AUTO_INCREMENT PRIMARY KEY,\n name VARCHAR(100) NOT NULL,\n text VARCHAR(510) NOT NULL,\n created TIMESTAMP DEFAULT CURRENT_TIMESTAMP);\";\n if ($db->query($sql) === TRUE) {\n echo \"Table Messages created successfully\";\n } else {\n echo \"Error creating table: \" . $db->error;\n }\n }", "public function new_test_table($tb_name){\n\n\t\t\t$this->load->dbforge();\n\n\t\t\t$fields['id'] = array(\n\t\t\t\t\t\t\t\t\t'type' => 'INT',\n\t\t\t\t\t\t\t\t\t'constraint' => 11,\n\t\t\t\t\t\t\t\t\t'null' => FALSE,\n\t\t\t\t\t\t\t\t\t'auto_increment' =>TRUE\n\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t$fields['col_name'] = array(\n\t\t\t\t\t\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t\t\t\t\t\t'constraint' => 255,\n\t\t\t\t\t\t\t\t\t'null' => FALSE\n\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t$fields['col_slug'] = array(\n\t\t\t\t\t\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t\t\t\t\t\t'constraint' => 255,\n\t\t\t\t\t\t\t\t\t'null' => FALSE\n\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t$fields['cat'] = array(\n\t\t\t\t\t\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t\t\t\t\t\t'constraint' => 255,\n\t\t\t\t\t\t\t\t\t'null' => FALSE\n\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t$fields['interpretations'] = array(\n\t\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t\t'null' => TRUE\n );\n \n\t\t\t$this->dbforge->add_field($fields);\n\t\t\t$this->dbforge->add_key('id',TRUE);\n\t\t\t$this->dbforge->create_table($tb_name);\n }", "function createtable(){\r\n\r\n\t\tglobal $wpdb;\r\n\r\n\t\t$table_name = $wpdb->prefix . \"custom_widget\";\r\n\r\n\t\t$charset_collate = $wpdb->get_charset_collate();\r\n\r\n\t\t$sql = \"CREATE TABLE $table_name (\r\n\t\t widget_id mediumint(9) NOT NULL AUTO_INCREMENT,\r\n\t\t name tinytext NOT NULL,\r\n\t\t emailaddress varchar(255) DEFAULT '' NOT NULL,\r\n\t\t subject varchar(255) NOT NULL,\r\n\t\t pnumber varchar(255) NOT NULL,\r\n\t\t website varchar(255) NOT NULL,\r\n\t\t message varchar(255) DEFAULT '' NOT NULL,\r\n\t\t PRIMARY KEY (widget_id)\r\n\t\t) $charset_collate;\";\r\n\r\n\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\r\n\t\tdbDelta( $sql );\r\n\t}", "private static function create_custom_table() {\n\t global $wpdb;\n\n\t $charset_collate = $wpdb->get_charset_collate();\n\t $query = \"CREATE TABLE \" . VSPI_CACHE_TABLE . \" (\n id mediumint(9) NOT NULL AUTO_INCREMENT,\n name tinytext NOT NULL,\n xmldata longblob,\n lastupdated tinytext,\n PRIMARY KEY (id)\n ) $charset_collate;\";\n\n\t require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n\t dbDelta($query);\n }", "public static function table($model)\n\t{\n\t\treturn Table::of('orchestra.resources: list', function ($table) use ($model)\n\t\t{\n\t\t\t// attach the list\n\t\t\t$table->with($model, false);\n\n\t\t\t$table->column('name', function ($column)\n\t\t\t{\n\t\t\t\t$column->escape(false);\n\t\t\t\t$column->value(function ($row)\n\t\t\t\t{\n\t\t\t\t\t$link = HTML::link(handles(\"orchestra/foundation::resources/{$row->id}\"), e($row->name));\n\t\t\t\t\treturn HTML::create('strong', HTML::raw($link));\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}", "public function creating($model)\n {\n //\n }", "public static function newTable() {\n\t\ttry {\n\t\t\tDB::getInstance()->createTable(self::$table_name, array('name' => 'VARCHAR(80)', 'status' => 'INT(1)'));\n\t\t} catch(TableCreationFailedException $e) {\n\t\t\tthrow $e;\n\t\t}\t\t\n\t\t\n\t}", "private function createDummyTable() {}", "public function createEntityTable($tableName, $entity, $multiSeq = false)\n {\n\n $colData = [];\n\n //<attribute name=\"name\" type=\"varchar\" size=\"120\" required=\"false\" >\n\n foreach ($entity as $attribute) {\n $colData[] = $this->columnAttributeData($attribute, $tableName, $multiSeq);\n }\n\n $this->createTable($tableName, $colData);\n Message::addMessage('Tabelle '.$tableName.' wurde erfolgreich erstellt');\n\n }", "public function executeTableTranslation()\n { \n $base = realpath(dirname(__FILE__).'/../../../../..').'/lib/vendor/diem/dmAdminPlugin/modules/dmPage/data/dataTableTranslation/';\n $translationFile = $base . $this->getUser()->getCulture().'.txt';\n\n if(!file_exists($translationFile))\n {\n $translationFile = $base . 'en.txt';\n }\n \n return $this->renderText(file_get_contents($translationFile));\n }", "public function check_gettext_table( $language_code ){\n $table_name = sanitize_text_field( $this->get_gettext_table_name($language_code) );\n if ( $this->db->get_var( \"SHOW TABLES LIKE '$table_name'\" ) != $table_name ) {\n // table not in database. Create new table\n $charset_collate = $this->db->get_charset_collate();\n\n $sql = \"CREATE TABLE `\" . $table_name . \"`(\n id bigint(20) AUTO_INCREMENT NOT NULL PRIMARY KEY,\n original longtext NOT NULL,\n translated longtext,\n domain longtext,\n status int(20),\n UNIQUE KEY id (id) )\n $charset_collate;\";\n require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n dbDelta( $sql );\n\n $this->maybe_record_automatic_translation_error(array( 'details' => 'Error creating gettext strings tables' ) );\n\n $sql_index = \"CREATE INDEX index_name ON `\" . $table_name . \"` (original(100));\";\n $this->db->query( $sql_index );\n\n // full text index for original\n $sql_index = \"CREATE FULLTEXT INDEX original_fulltext ON `\" . $table_name . \"`(original);\";\n $this->db->query( $sql_index );\n }\n }", "public function getTranslationTable() {\n\t\tif (!isset($this->translation_table)) {\n\t\t\t$this->fetchAllTranslations();\n\t\t} // end if\n\t\treturn $this->translation_table;\n\t}", "public function actionCreate() {\n\n $model = new WordTranslation();\n if ($model->load(\\Yii::$app->request->post())) {\n\n $source_word = \\app\\models\\WordManagement\\Word::findOne($model->wt_source_word_id);\n $model->wt_source_lang_id = $source_word->word_lang_id;\n\n $target_word = \\app\\models\\WordManagement\\Word::findOne($model->wt_target_word_id);\n $model->wt_target_lang_id = $target_word->word_lang_id;\n\n if ($model->save())\n return $this->redirect(['view', 'id' => $model->wt_id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "abstract function createTable($tablename);", "protected function _buildTable()\n {\n $this->object_table = new Table( $this->object_table_name, $this->object_database );\n }", "function createTable($name = '') {\n\t\tif (!$name) {\n\t\t\t$name = \"table\" . strval($this->id);\n\t\t\t$this->id++;\n\t\t}\n\t\tself::$db->exec(\"CREATE TABLE $name (id INT PRIMARY KEY AUTO_INCREMENT,\" .\n\t\t\t\t\" letters VARCHAR(20), number INT, big TEXT, appt DATE, gender ENUM('male', 'female'))\");\n\t}", "public function table($model)\n {\n return Table::of('control.roles', function ($table) use ($model) {\n // attach Model and set pagination option to true.\n $table->with($model)->paginate(true);\n\n $table->sortable();\n $table->searchable(array('name'));\n\n $table->layout('orchestra/foundation::components.table');\n\n // Add columns.\n $table->column(trans('orchestra/foundation::label.name'), 'name');\n });\n }", "function create_assign_vaults_table(){\n $table_name = \"zv_assign_vaults\";\n $fields = array();\n if (!Schema::hasTable($table_name)){\n\n $fields[] = array('name' => 'user_id', 'type' => 'text');\n $fields[] = array('name' => 'chambers', 'type' => 'mediumtext');\n $fields[] = array('name' => 'secrets', 'type' => 'mediumtext');\n \n $response = $this->createTable($table_name, $fields);\n }\n\n }", "public function createTable ()\n {\n }", "public function getTableFromDbModel($tableName);", "public function bakeTable(Table $model, array $data, Arguments $args, ConsoleIo $io): void\n {\n if ($args->getOption('no-table')) {\n return;\n }\n\n $namespace = Configure::read('App.namespace');\n $pluginPath = '';\n if ($this->plugin) {\n $namespace = $this->_pluginNamespace($this->plugin);\n }\n\n $name = $model->getAlias();\n $entity = $this->_entityName($model->getAlias());\n $schema = $model->getSchema();\n $searchField = null;\n if (in_array('name', $schema->columns())) {\n $searchField = 'name';\n }\n if (in_array('title', $schema->columns())) {\n $searchField = 'title';\n }\n $searchPluginLoaded = \\Cake\\Core\\Plugin::isLoaded('Search');\n\n $data += [\n 'plugin' => $this->plugin,\n 'pluginPath' => $pluginPath,\n 'namespace' => $namespace,\n 'name' => $name,\n 'entity' => $entity,\n 'associations' => [],\n 'primaryKey' => 'id',\n 'displayField' => null,\n 'table' => null,\n 'validation' => [],\n 'rulesChecker' => [],\n 'behaviors' => [],\n 'connection' => $this->connection,\n 'searchPluginLoaded' => $searchPluginLoaded,\n 'searchField' => $searchField,\n ];\n\n $renderer = new TemplateRenderer($this->theme);\n $renderer->set($data);\n $out = $renderer->generate('Model/baked');\n\n $path = $this->getPath($args);\n $filename = $path . 'Table' . DS . 'Baked' . DS . $name . 'Table.php';\n $io->out(\"\\n\" . sprintf('Baking table class for %s...', $name), 1, ConsoleIo::QUIET);\n $io->createFile($filename, $out);\n\n // Work around composer caching that classes/files do not exist.\n // Check for the file as it might not exist in tests.\n if (file_exists($filename)) {\n require_once $filename;\n }\n TableRegistry::getTableLocator()->clear();\n\n $emptyFile = $path . 'Table' . DS . 'Baked' . DS . 'empty';\n $this->deleteEmptyFile($emptyFile, $io);\n }", "protected function createTable()\n {\n $stmt = 'CREATE TABLE IF NOT EXISTS \"' . $this->name;\n $stmt.= '\" (\"' . $this->keyColumnName . '\" TEXT PRIMARY KEY, \"';\n $stmt.= $this->valueColumnName . '\" TEXT);';\n $this->db->exec($stmt);\n }", "function createTable() {\n\t}", "private function createTable()\r\n\t{\r\n\t\t\r\n\t}", "private function _createContentTable(string $tableName): void\n {\n $migration = new CreateSuperTableContentTable([\n 'tableName' => $tableName,\n ]);\n\n ob_start();\n $migration->up();\n ob_end_clean();\n }", "public function create_table ()\n {\n $this->_query .= 'CREATE TABLE `' . $this->_db_name . '_' . $this->_tablename . '` (\n `id` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY';\n }", "private function createMigration()\n {\n $table = Str::snake(Str::pluralStudly(class_basename($this->getNameInput() . 'Meta')));\n\n $this->call('hwa:migration', [\n 'name' => \"create_{$table}_table\",\n '--create' => $table,\n ]);\n }", "private function create_table(){\n\n $sql = \"CREATE TABLE IF NOT EXISTS mails ( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,\n company TEXT NULL,\n contactName TEXT NULL,\n contactMail TEXT NULL,\n invoiceCenter TEXT NULL,\n payment TEXT NULL,\n dMessage TEXT NULL,\n bookLike TEXT NULL,\n yMessage TEXT NULL,\n attention INTEGER NULL,\n date TEXT NULL)\";\n\n $this->db->query($sql);\n }", "protected function createTable(){\n \t/*\n \t * $columns = array(\n\t\t\t\t'id'\t=>\t'pk',\n\t\t\t\t'title'\t=>\t'string',\n\t\t\t\t'body'\t=>\t'text',\n\t\t\t\t'status'\t=>\t'boolean',\n\t\t\t\t'comment_cnt'\t=>\t'int',\n\t\t\t\t'rating'\t\t=>\t'float',\n\t\t);\n\t\ttry {\n\t\t\t$this->getDbConnection()->createCommand(\n\t\t\t\t\tYii::app()->getDb()->getSchema()->createTable($this->tableName(), $columns)\n\t\t\t)->execute();\n\t\t\t$this->getDbConnection()->createCommand(\n\t\t\t\t\tYii::app()->getDb()->getSchema()->addPrimaryKey('id_lang', $this->tableName(), 'id,language')\n\t\t\t)->execute();\n\t\t\t// Reference tables\n\t\t\t$ref = new Blocktheme();\n\t\t\t$this->getDbConnection()->createCommand(\n\t\t\t\t\tYii::app()->getDb()->getSchema()->addForeignKey('fk_block_blocktheme', $this->tableName(), 'bid', $ref->tableName(), 'block')\n\t\t\t)->execute();\n\t\t} catch (CDbException $e){\n\t\t\tYii::log($e->getMessage(), 'warning');\n\t\t}\n\t\t$this->refreshMetaData();\n \t */\n \treturn FALSE;\n }", "private function generateModel(Table $model) {\n\t\t$this->logger->info('Generate Actions from Model: ' . $model->getOriginCommonName());\n\n\t\t// generate action type(s)\n\t\tforeach (Types::getModelTypes($model) as $type) {\n\t\t\t$this->generateModelAction($model, $type);\n\t\t}\n\n\t\t// generate relationship actions\n\t\tif (!$model->isReadOnly()) {\n\t\t\t$relationships = $this->modelService->getRelationships($model);\n\t\t\tforeach ($relationships->getAll() as $relationship) {\n\t\t\t\tforeach (Types::getRelationshipTypes($relationship) as $type) {\n\t\t\t\t\t$this->generateRelationshipAction($relationship, $type);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function create_table() {\n\t\trequire_once ABSPATH . 'wp-admin/includes/upgrade.php';\n\t\t$meta_table = \"\n\t\tCREATE TABLE IF NOT EXISTS `{$this->wpdb->prefix}{$this->meta_type}meta` (\n\t\t\t`meta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n\t\t\t`{$this->meta_type}_id` bigint(20) unsigned NOT NULL DEFAULT '0',\n\t\t\t`meta_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n\t\t\t`meta_value` longtext COLLATE utf8mb4_unicode_ci,\n\t\t\tPRIMARY KEY (`meta_id`),\n\t\t\tKEY `{$this->meta_type}_id` (`{$this->meta_type}_id`),\n\t\t\tKEY `meta_key` (`meta_key`(191))\n\t\t) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;\n\t\t\";\n\n\t\tdbDelta( $meta_table );\n\t}", "public function check_table( $default_language, $language_code ){\n $table_name = sanitize_text_field( $this->get_table_name( $language_code, $default_language ) );\n if ( $this->db->get_var( \"SHOW TABLES LIKE '$table_name'\" ) != $table_name ) {\n // table not in database. Create new table\n $charset_collate = $this->db->get_charset_collate();\n\n $sql = \"CREATE TABLE `\" . $table_name . \"`(\n id bigint(20) AUTO_INCREMENT NOT NULL PRIMARY KEY,\n original longtext NOT NULL,\n translated longtext,\n status int(20) DEFAULT \" . $this::NOT_TRANSLATED .\",\n block_type int(20) DEFAULT \" . $this::BLOCK_TYPE_REGULAR_STRING .\",\n original_id bigint(20) DEFAULT NULL,\n UNIQUE KEY id (id) )\n $charset_collate;\";\n require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n dbDelta( $sql );\n\n $sql_index = \"CREATE INDEX index_name ON `\" . $table_name . \"` (original(100));\";\n $this->db->query( $sql_index );\n\n $this->maybe_record_automatic_translation_error(array( 'details' => 'Error creating regular tables' ) );\n\n if ( $this->db->get_var( \"SHOW TABLES LIKE '$table_name'\" ) != $table_name ) {\n // table still doesn't exist after creation\n $this->maybe_record_automatic_translation_error(array( 'details' => 'Error creating regular strings tables' ), true );\n }else {\n // full text index for original\n $sql_index = \"CREATE FULLTEXT INDEX original_fulltext ON `\" . $table_name . \"`(original);\";\n $this->db->query( $sql_index );\n\n //syncronize all translation blocks.\n $this->copy_all_translation_blocks_into_table($default_language, $language_code);\n }\n }else{\n\t $this->check_for_block_type_column( $language_code, $default_language );\n\t $this->check_for_original_id_column( $language_code, $default_language );\n }\n }", "public function createTable()\n {\n $sql = \"CREATE TABLE $this->tableName (\n id mediumint(9) NOT NULL AUTO_INCREMENT,\n name VARCHAR(255) DEFAULT '' NOT NULL,\n type VARCHAR(255) DEFAULT '' NOT NULL,\n max VARCHAR(255) DEFAULT '' NOT NULL,\n columns TEXT DEFAULT '' NOT NULL,\n remote_id VARCHAR(255) DEFAULT '' NOT NULL,\n UNIQUE KEY id (id)\n );\";\n\n dbDelta($sql);\n }", "public static function createTable()\n {\n }" ]
[ "0.7242559", "0.65452534", "0.65381867", "0.65149075", "0.6362801", "0.6336437", "0.6304286", "0.6178784", "0.61454546", "0.6134698", "0.6134698", "0.6061999", "0.6048614", "0.6043651", "0.6012805", "0.5968847", "0.5906079", "0.5859121", "0.58053434", "0.5773639", "0.57674325", "0.5766721", "0.5744884", "0.57338005", "0.57119334", "0.5699574", "0.5681156", "0.5680182", "0.567581", "0.56714505", "0.5667131", "0.56483364", "0.56450784", "0.56443334", "0.56258625", "0.5616896", "0.55864817", "0.55859375", "0.5583877", "0.5578318", "0.55753726", "0.55690867", "0.55678064", "0.5564063", "0.5558135", "0.5556012", "0.5554252", "0.554998", "0.5528395", "0.5528355", "0.55272365", "0.5517445", "0.5516723", "0.5514801", "0.55123067", "0.5500068", "0.5496072", "0.5460745", "0.5459169", "0.5451401", "0.5449536", "0.54393506", "0.54237515", "0.5417023", "0.54069954", "0.54068124", "0.5398668", "0.5398254", "0.539419", "0.5393777", "0.53937536", "0.5390101", "0.53900903", "0.53872865", "0.53852355", "0.53830355", "0.53774816", "0.5374654", "0.5367259", "0.53591084", "0.5356508", "0.5351623", "0.5351594", "0.53492725", "0.53482515", "0.5338288", "0.5330468", "0.53303814", "0.53301257", "0.5319499", "0.53193736", "0.5318219", "0.5312969", "0.53126866", "0.5311665", "0.5309973", "0.5307073", "0.5303797", "0.53004277", "0.52972466" ]
0.76530796
0
Register the make:repository generator.
Зарегистрируйте генератор make:repository.
private function registerRepositoryGenerator() { $this->app->singleton( 'command.thirdsense.repository', function ($app) { return $app[RepositoryMakeCommand::class]; } ); $this->commands('command.thirdsense.repository'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function registerMakeRepositoryCommand()\n {\n // Make repository command.\n $this->app['command.repository.make'] = $this->app->share(\n function($app) {\n return new MakeRepositoryCommand($app['RepositoryGenerator'], $app['Composer']);\n }\n );\n }", "protected function registerGenerator()\n\t{\n\t\t$this->app->bind('Cerbero\\Workflow\\Scaffolding\\GeneratorInterface', 'Cerbero\\Workflow\\Scaffolding\\Generator');\n\t}", "public function createRepository()\n {\n $this->create('repository')->stub('repository')->generate();\n }", "private function makeRepository()\n {\n if (! config('apiskeleton.files.repositories')) {\n return;\n }\n\n if (! config('apiskeleton.folders.repositories')) {\n $this->warn('The option to create a repository is enabled, but there is no folder set where it should be created.');\n\n return;\n }\n\n if ($this->option('repository') || $this->askRepository()) {\n $factoryName = sprintf(\n '%s/%sRepository',\n $this->namespace,\n $this->modelName\n );\n\n Artisan::call('make:apiskeleton-repository', [\n 'name' => $factoryName,\n ]);\n\n $this->info(\"The repository {$factoryName} has been created.\");\n }\n }", "private function registerTransformerGenerator()\n {\n $this->app->singleton(\n 'command.thirdsense.transformer',\n function ($app) {\n return $app[TransformerMakeCommand::class];\n }\n );\n\n $this->commands('command.thirdsense.transformer');\n }", "protected function createRepository()\r\n {\r\n $repository = Str::studly(class_basename($this->argument('name')));\r\n\r\n $this->call('make:repository', [\r\n 'name' => \"{$repository}Repository\",\r\n '--model' => $this->qualifyClass($this->getNameInput()),\r\n ]);\r\n }", "private function createRepository()\n {\n $name = str_replace(config(\"easy-laravel-package.service_interface_suffix\"), \"\", $this->argument(\"name\"));\n $name = Str::studly($name);\n\n $this->call(\"make:repository\", [\n \"name\" => $name,\n ]);\n }", "public function registerUrlGeneratorFactory(): void\n {\n $this->app->singleton('mediable.url.factory', function (Container $app) {\n $factory = new UrlGeneratorFactory;\n\n $config = $app['config']->get('mediable.url_generators', []);\n foreach ($config as $driver => $generator) {\n $factory->setGeneratorForFilesystemDriver($generator, $driver);\n }\n\n return $factory;\n });\n $this->app->alias('mediable.url.factory', UrlGeneratorFactory::class);\n }", "private function registerMigrationGenerator()\n\t{\n\t\t$this->app->singleton('command.codedungeon.migrate', function ($app) {\n\t\t\treturn $app['CodeDungeon\\Addons\\Commands\\MigrationMakeCommand'];\n\t\t});\n\n\t\t$this->commands('command.codedungeon.migrate');\n\t}", "public function register()\n {\n $this->registerRepositoryGenerator();\n }", "private function registerEntityGenerator()\r\n {\r\n $this->app->singleton('command.emirsator.entity', function ($app) {\r\n return $app['emirsator\\Generators\\Commands\\EntityMakeCommand'];\r\n });\r\n $this->commands('command.emirsator.entity');\r\n }", "public function register()\n {\n $this->app->singleton(\n 'artomator.publish',\n function ($app) {\n return new GeneratorPublishCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.api',\n function ($app) {\n return new APIGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.scaffold',\n function ($app) {\n return new ScaffoldGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.publish.layout',\n function ($app) {\n return new LayoutPublishCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.publish.templates',\n function ($app) {\n return new PublishTemplateCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.api_scaffold',\n function ($app) {\n return new APIScaffoldGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.migration',\n function ($app) {\n return new MigrationGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.model',\n function ($app) {\n return new ModelGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.repository',\n function ($app) {\n return new RepositoryGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.api.controller',\n function ($app) {\n return new APIControllerGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.api.requests',\n function ($app) {\n return new APIRequestsGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.api.tests',\n function ($app) {\n return new TestsGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.scaffold.controller',\n function ($app) {\n return new ControllerGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.scaffold.requests',\n function ($app) {\n return new RequestsGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.scaffold.views',\n function ($app) {\n return new ViewsGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.scaffold.routes',\n function ($app) {\n return new RoutesGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.rollback',\n function ($app) {\n return new RollbackGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.publish.user',\n function ($app) {\n return new PublishUserCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.graphql',\n function ($app) {\n return new GraphQLGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.graphql_scaffold',\n function ($app) {\n return new GraphQLScaffoldGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.graphql.query',\n function ($app) {\n return new GraphQLQueryGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.graphql.mutations',\n function ($app) {\n return new GraphQLMutationsGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.graphql.type',\n function ($app) {\n return new GraphQLTypeGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.graphql.subscription',\n function ($app) {\n return new GraphQLSubscriptionGeneratorCommand();\n }\n );\n\n parent::register();\n\n $this->commands(\n [\n 'artomator.publish',\n 'artomator.api',\n 'artomator.scaffold',\n 'artomator.api_scaffold',\n 'artomator.publish.layout',\n 'artomator.publish.templates',\n 'artomator.migration',\n 'artomator.model',\n 'artomator.repository',\n 'artomator.api.controller',\n 'artomator.api.requests',\n 'artomator.api.tests',\n 'artomator.scaffold.controller',\n 'artomator.scaffold.requests',\n 'artomator.scaffold.views',\n 'artomator.scaffold.routes',\n 'artomator.rollback',\n 'artomator.publish.user',\n 'artomator.graphql',\n 'artomator.graphql_scaffold',\n 'artomator.graphql.query',\n 'artomator.graphql.mutations',\n 'artomator.graphql.type',\n 'artomator.graphql.subscription',\n Console\\InstallCommand::class,\n ]\n );\n }", "public function createRepository(): void;", "public function register()\n {\n // TODO: these commands names should be collected from the directory, to remove the step of manual registration of commands.\n $this->registerGenerators([\n 'Action',\n 'Controller',\n 'Exception',\n 'Model',\n 'Repository',\n 'Request',\n 'Route',\n 'Task',\n 'Transformer'\n // Register more generator commands here..\n ]);\n }", "public function createNewRepository()\n {\n $this->object = new \\Yana\\Plugins\\Repositories\\Repository();\n }", "private function registerGenerators()\n {\n $generator = Factory::create();\n\n // Register a boolean generator\n $this->app\n ->singleton(\n RandomBooleanGenerator::class,\n function ($app) use ($generator) {\n\n $booleanGenerator = new RandomBooleanGenerator();\n $booleanGenerator->setGenerator($generator);\n\n return $booleanGenerator;\n }\n );\n\n // Register the random integer generator\n $this->app\n ->singleton(\n RandomIntegerGenerator::class,\n function ($app) use ($generator) {\n\n $integerGenerator = new RandomIntegerGenerator();\n $integerGenerator->setGenerator($generator);\n\n return $integerGenerator;\n }\n );\n\n // Register the race strategy event generator\n $this->app->singleton(\n RandomRaceStrategyEventGenerator::class,\n function ($app) {\n\n $factory = $app->make(AthleteRaceStrategyFactory::class);\n\n $eventGenerator = new RandomRaceStrategyEventGenerator();\n\n $eventGenerator->setStrategyFactory($factory);\n\n return $eventGenerator;\n }\n );\n }", "public function register()\n {\n $this->app->singleton('Number7even.publish', function ($app) {\n return new GeneratorPublishCommand();\n });\n\n $this->app->singleton('Number7even.api', function ($app) {\n return new APIGeneratorCommand();\n });\n\n $this->app->singleton('Number7even.scaffold', function ($app) {\n return new ScaffoldGeneratorCommand();\n });\n\n $this->app->singleton('Number7even.publish.layout', function ($app) {\n return new LayoutPublishCommand();\n });\n\n $this->app->singleton('Number7even.publish.templates', function ($app) {\n return new PublishTemplateCommand();\n });\n\n $this->app->singleton('Number7even.api_scaffold', function ($app) {\n return new APIScaffoldGeneratorCommand();\n });\n\n $this->app->singleton('Number7even.migration', function ($app) {\n return new MigrationGeneratorCommand();\n });\n\n $this->app->singleton('Number7even.model', function ($app) {\n return new ModelGeneratorCommand();\n });\n\n $this->app->singleton('Number7even.repository', function ($app) {\n return new RepositoryGeneratorCommand();\n });\n\n $this->app->singleton('Number7even.api.controller', function ($app) {\n return new APIControllerGeneratorCommand();\n });\n\n $this->app->singleton('Number7even.api.requests', function ($app) {\n return new APIRequestsGeneratorCommand();\n });\n\n $this->app->singleton('Number7even.api.tests', function ($app) {\n return new TestsGeneratorCommand();\n });\n\n $this->app->singleton('Number7even.scaffold.controller', function ($app) {\n return new ControllerGeneratorCommand();\n });\n\n $this->app->singleton('Number7even.scaffold.requests', function ($app) {\n return new RequestsGeneratorCommand();\n });\n\n $this->app->singleton('Number7even.scaffold.views', function ($app) {\n return new ViewsGeneratorCommand();\n });\n\n $this->app->singleton('Number7even.rollback', function ($app) {\n return new RollbackGeneratorCommand();\n });\n\n $this->app->singleton('Number7even.vuejs', function ($app) {\n return new VueJsGeneratorCommand();\n });\n $this->app->singleton('Number7even.publish.vuejs', function ($app) {\n return new VueJsLayoutPublishCommand();\n });\n\n $this->commands([\n 'Number7even.publish',\n 'Number7even.api',\n 'Number7even.scaffold',\n 'Number7even.api_scaffold',\n 'Number7even.publish.layout',\n 'Number7even.publish.templates',\n 'Number7even.migration',\n 'Number7even.model',\n 'Number7even.repository',\n 'Number7even.api.controller',\n 'Number7even.api.requests',\n 'Number7even.api.tests',\n 'Number7even.scaffold.controller',\n 'Number7even.scaffold.requests',\n 'Number7even.scaffold.views',\n 'Number7even.rollback',\n 'Number7even.vuejs',\n 'Number7even.publish.vuejs',\n ]);\n }", "public function register()\n\t{\n $cache = new \\Way\\Generators\\Cache($this->app['files']);\n $resource_generator = new \\Way\\Generators\\Generators\\ResourceGenerator($this->app['files']);\n $view_generator = new \\Tresyz\\HellesManager\\Generators\\ViewGenerator($this->app['files'], $cache);\n\n $this->app['admin.add.user'] = $this->app->share(function() {\n return new Commands\\AddUser();\n });\n $this->app['admin.install'] = $this->app->share(function() {\n return new Commands\\Install();\n });\n $this->app['admin.remove.user'] = $this->app->share(function() {\n return new Commands\\RemoveUser();\n });\n $this->app['admin.scaffold'] = $this->app->share(function() use($resource_generator, $cache) {\n \n return new Commands\\Scaffold($resource_generator, $cache);\n });\n\n $this->app['admin.generate.view'] = $this->app->share(function() use($view_generator) {\n return new Commands\\ViewGenerator($view_generator);\n });\n \n $this->commands('admin.install');\n $this->commands('admin.add.user');\n $this->commands('admin.remove.user');\n $this->commands('admin.scaffold');\n $this->commands('admin.generate.view');\n\t}", "public function register() {\n $this->mergeConfigFrom(__DIR__ . '/../config/repositories.php', 'repositories');\n $this->commands([\n RepositoryMakeCommand::class\n ]);\n }", "protected function createRepository()\n {\n passthru(\"hub create \" . $this->project_name_and_org);\n }", "public function setGenerator(GeneratorInterface $generator);", "private function registerSeedGenerator()\n\t{\n\t\t$this->app->singleton('command.codedungeon.seed', function ($app) {\n\t\t\treturn $app['CodeDungeon\\Addons\\Commands\\SeedMakeCommand'];\n\t\t});\n\n\t\t$this->commands('command.codedungeon.seed');\n\t}", "public function openGenerator(): GeneratorInterface;", "public function register()\n {\n// dump($this->getCommands());\n foreach ($this->getCommands() as $command) {\n $this->commands($command);\n\n }\n\n// dump('DwGeneratorServiceProvider');\n\n// $this->commands($this->commands);\n }", "abstract protected function createRepository();", "protected function registerCreator()\n {\n $this->app->singleton('entity.creator', function ($app){\n\n return new Creator($app['files']);\n });\n }", "public function register ()\n\t{\n\t\t$this->registerRepositoryGeneratorCommand();\n\t\t$this->publishes([\n\t\t\t__DIR__ . '/../config/generator.php' => config_path('generator.php'),\n\t\t]);\n\n\t}", "public function register()\n {\n $this->commands(BreadGenerator::class);\n }", "protected function registerModelGenerator()\n {\n $app = $this->app;\n\n $app->singleton('datamapper.eloquent.generator', function ($app) {\n $path = storage_path('framework/entities');\n\n return new ModelGenerator($app['files'], $path);\n });\n }", "public function register(): void\n {\n $this->commands([\n Builder::class,\n Generator::class\n ]);\n }", "public function createRepository()\n {\n if (!interface_exists('Puli\\Repository\\Api\\ResourceRepository')) {\n throw new RuntimeException('Please install puli/repository to create ResourceRepository instances.');\n }\n\n $repo = new JsonRepository(__DIR__.'/path-mappings.json', __DIR__.'/..', true);\n\n return $repo;\n }", "public function __construct(RepositoryGenerator $generator)\n {\n parent::__construct();\n\n $this->generator = $generator;\n }", "public function register()\n {\n if ($this->app->environment() === 'local') {\n $this->commands(['b3nl\\MWBModel\\Console\\Commands\\MakeMWBModel']);\n\n $this->app->register('Laracasts\\Generators\\GeneratorsServiceProvider');\n }\n }", "public function register()\n {\n foreach (static::$repositories as $repository) {\n $this->app->singleton(\n $repository[0],\n $repository[1]\n );\n }\n }", "public function register()\r\n {\r\n $this->registerEntityGenerator();\r\n }", "public function register()\n {\n $this->app->extend('command.model.make', function() {\n return resolve( ModelMake::class );\n });\n\n $this->app->extend('command.resource.make', function() {\n return resolve( ResourceMake::class );\n });\n\n $this->app->extend('command.controller.make', function() {\n return resolve( ControllerMake::class );\n });\n }", "public function register()\n\t{\n $this->app['command.migration-generator'] = $this->app->share(function($app)\n {\n $cache = new Cache($app['files']);\n $generator = new Generators\\MigrationGenerator($app['files'], $cache);\n $config = $app['config']->get('laravel-migration-generator::config');\n\n return new MigrationGeneratorCommand($generator,$config);\n });\n $this->commands('command.migration-generator');\n\t}", "public function register()\n {\n $this->commands(\n 'AndreaCivita\\ApiCrudGenerator\\Commands\\ApiCrudGenerator'\n );\n }", "protected function registerUrlGeneratorBindings()\n {\n $this->singleton('url', function () {\n return new Routing\\UrlGenerator($this);\n });\n }", "public function register()\n\t{\n\t\t// Register bindings.\n $this->registerBindings();\n\n // Register make repository command.\n $this->registerMakeRepositoryCommand();\n\n // Register commands\n $this->commands('command.repository.make');\n\t}", "protected function registerRepository()\r\n {\r\n $this->app->bindShared('migration.repository', function($app) {\r\n $table = $app['config']['database.migrations'];\r\n\r\n return new DatabaseMigrationRepository($app['db'], $table);\r\n });\r\n }", "protected function registerCreator()\n {\n $this->app->singleton('eav.entity.migration.creator', function ($app) {\n return new EntityMigrationCreator($app['files']);\n });\n\n $this->app->singleton('eav.attribute.migration.creator', function ($app) {\n return new AttributeMigrationCreator($app['files']);\n });\n\n $this->app->singleton('eav.entity.attribute.map.creator', function ($app) {\n return new EntityAttributeMapCreator($app['files']);\n });\n }", "public function register()\n {\n // merge config\n $configPath = __DIR__ . '/config/config.php';\n $this->mergeConfigFrom($configPath, 'generators');\n\n // register all the artisan commands\n $this->registerCommand(PublishCommand::class, 'publish');\n\n $this->registerCommand(ModelCommand::class, 'model');\n $this->registerCommand(ViewCommand::class, 'view');\n $this->registerCommand(ControllerCommand::class, 'controller');\n\n $this->registerCommand(RequestCommand::class, 'request');\n $this->registerCommand(MiddlewareCommand::class, 'middleware');\n\n $this->registerCommand(SeederCommand::class, 'seeder');\n $this->registerCommand(MigrationCommand::class, 'migration');\n $this->registerCommand(MigrationPivotCommand::class, 'migrate.pivot');\n\n $this->registerCommand(NotificationCommand::class, 'notification');\n\n $this->registerCommand(EventCommand::class, 'event');\n $this->registerCommand(ListenerCommand::class, 'listener');\n $this->registerCommand(EventGenerateCommand::class, 'event.generate');\n\n $this->registerCommand(TraitCommand::class, 'trait');\n $this->registerCommand(ContractCommand::class, 'contract');\n $this->registerCommand(RepositoryCommand::class, 'repository');\n\n $this->registerCommand(LivewireCommand::class, 'livewire');\n $this->registerCommand(ComponentCommand::class, 'component');\n\n $this->registerCommand(TestCommand::class, 'test');\n $this->registerCommand(FactoryCommand::class, 'factory');\n\n $this->registerCommand(JobCommand::class, 'job');\n $this->registerCommand(ConsoleCommand::class, 'console');\n\n $this->registerCommand(ExceptionCommand::class, 'exception');\n\n $this->registerCommand(ResourceCommand::class, 'resource');\n\n $this->registerCommand(FileCommand::class, 'file');\n }", "public function register()\n {\n $this->defineRepositories();\n }", "private function registerRepository()\n {\n $this->app->singleton('firewall.repository', function($app) {\n return new Repository(\n $app['firewall.cache'],\n $app['firewall.config'],\n $app['firewall.ip.address'],\n $app['firewall.ip.list'],\n $app['firewall.countries'],\n $this->app\n );\n });\n }", "public function register()\n {\n $this->repository();\n }", "public function makeRegistry();", "public function register()\n {\n $this->registerRepositoryGenerator();\n $this->registerTransformerGenerator();\n }", "private function callRepositoryCreator(string $repository, array $config): TokenRepositoryInterface\n {\n return $this->repositoryCreators[$repository]($this->app, $config);\n }", "public function addGenerator(){\n\t\tif($this->version == Feed::ATOM){\n\t\t\t$this->setChannelElement('atom:generator', 'FeedWriter', array('uri' => 'https://github.com/mibe/FeedWriter'));\n\t\t}\n\t\telse if($this->version == Feed::RSS2){\n\t\t\t$this->setChannelElement('generator', 'FeedWriter');\n\t\t}\n\t\telse{\n\t\t\tdie('The generator element is not supported in RSS1 feeds.');\n\t\t}\n\n\t\treturn $this;\n\t}", "public function registerApiRepo() {\n return $this->app->bind('App\\Repositories\\Api\\Register\\RegisterRepositoryInterface', 'App\\Repositories\\Api\\Register\\RegisterRepository');\n }", "public function register()\n\t{\n\t\t$this->registerGenerator();\n\n\t\t$this->registerCompiler();\n\n\t\t$this->registerCommand();\n\t}", "protected function registerCreator(): void\n {\n $this->app->singleton('updater.creator', function ($app) {\n return new UpdateCreator($app['files']);\n });\n }", "private function registerPivotMigrationGenerator()\n\t{\n\t\t$this->app->singleton('command.codedungeon.migrate.pivot', function ($app) {\n\t\t\treturn $app['CodeDungeon\\Addons\\Commands\\PivotMigrationMakeCommand'];\n\t\t});\n\n\t\t$this->commands('command.codedungeon.migrate.pivot');\n\t}", "public function register()\n {\n $this->publishes($this->assetsPath(), $this->packageName);\n\n $this->app->register('Laracasts\\Generators\\GeneratorsServiceProvider');\n\n $this->commands(\n 'Pelletiermaxime\\LaravelScaffoldAdmin\\Commands\\ScaffoldControllerCommand',\n 'Pelletiermaxime\\LaravelScaffoldAdmin\\Commands\\ScaffoldMigration',\n 'Pelletiermaxime\\LaravelScaffoldAdmin\\Commands\\ScaffoldModel',\n 'Pelletiermaxime\\LaravelScaffoldAdmin\\Commands\\ScaffoldView',\n 'Pelletiermaxime\\LaravelScaffoldAdmin\\Commands\\ScaffoldGenerateCommand'\n );\n }", "public function register() {\n\n\t\t\tDomainToolConfig::setMaker([$this->app, 'make']);\n\t\t\tDomainToolConfig::setProfileLoader($this->app->make('Atrauzzi\\DomainToolLaravel\\ProfileLoader'));\n\n\t\t}", "protected function registerUrlGeneratorBindings()\n {\n $this->singleton('url', static function ($app) {\n return new UrlGenerator($app);\n });\n }", "public function register()\n {\n /*\n |--------------------------------------------------------------------------\n | Register the Commands\n |--------------------------------------------------------------------------\n */\n $this->commands([\n \\Coredigital\\Scaffold\\Console\\ScaffoldGenerator::class\n ]);\n }", "protected function registerRepository(): void\n {\n $this->app->singleton('update.repository', function ($app) {\n return new DatabaseUpdateRepository($app['db'], $app['config']['update.migrations']);\n });\n }", "public function register()\n {\n $this->app->extend('command.model.make', function ($command, $app) {\n return new ModelMakeCommand($app['files']);\n });\n }", "public function register()\n {\n $this->app->singleton(FakerGenerator::class, function () {\n return FakerFactory::create('zh_cn');\n });\n }", "public function register()\n\t{\n\t\t$this->app->bind('arrilot_widget', function(){\n\n\t\t\t$config = [\n\t\t\t\t'defaultNamespace' => Config::get('laravel-widgets::default_namespace'),\n\t\t\t\t'customNamespaces' => Config::get('laravel-widgets::custom_namespaces_for_specific_widgets', [])\n\t\t\t];\n\t\t\treturn new WidgetFactory($config);\n\t\t});\n\n\n\t\t$this->app['make.widget'] = $this->app->share(function($app)\n\t\t{\n\t\t\t$generator = $this->app->make('Way\\Generators\\Generator');\n\n\t\t\treturn new MakeWidgetCommand($generator);\n\t\t});\n\t\t$this->commands('make.widget');\n\t}", "private function registerRepositoryInterface()\n {\n foreach (self::$repositoryInterfaces as $interface => $implementation) {\n $this->app->bind($interface, $implementation);\n }\n }", "protected function registerCreator()\n {\n $this->app->singleton('migration.creator', function ($app) {\n return new MigrationCreator($app['files']);\n });\n }", "public function register()\n {\n // FIXME in the fiture, fideloper fixed this, see https://github.com/fideloper/TrustedProxy\n\n // Override Laravels UrlGenerator with my own\n // Original UrlGenerator class is found in\n // vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php\n // And the original service is registered in\n // vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php\n // I simply created a new Mrcore/Mrcore/UrlGenerator.php class and copied\n // the register closure below from Illuminate/Routing/RoutingServiceProvider.php\n // I only overwrite one function, the getRootUrl() ffunction.\n // This is responsible for determining if the original request is http or https\n // But because I usually run laravel behind a loadbalancer, all requests are seen\n // internally as http. So I have to force https if defined in my config\n // ->share means url is a singleton, same as bindShared\n\n #$this->app['url'] = $this->app->share(function ($app) {\n $this->app->singleton('url', function ($app) {\n // The URL generator needs the route collection that exists on the router.\n // Keep in mind this is an object, so we're passing by references here\n // and all the registered routes will be available to the generator.\n $routes = $app['router']->getRoutes();\n\n return new UrlGenerator($routes, $app->rebinding('request', function ($app, $request) {\n $app['url']->setRequest($request);\n }));\n });\n }", "public function register()\n {\n $this->app->bind('App\\Http\\Repositories\\Repository', function () {\n $router = request()->route();\n $action = $router->getAction();\n $controller = explode('@',$action['controller'] ?? '');\n $logic = str_ireplace('Controllers','Repositories',reset($controller));\n $logic = str_ireplace('Controller','Repository',$logic);\n return class_exists($logic) ? resolve($logic) : resolve(BaseRepository::class);\n });\n }", "protected function registerRepository()\n {\n $this->app->singleton('migration.repository', function ($app) {\n $table = $app['config']['database.migrations'];\n\n return new DatabaseMigrationRepository($app['db'], $table);\n });\n }", "public function register()\n {\n $resources = [\n 'Account',\n 'Bill',\n 'Category',\n 'Goal',\n 'Transaction',\n ];\n\n foreach ($resources as $resource) {\n $this->app->bind(\n 'Bdgt\\Repositories\\Contracts\\\\' . $resource . 'RepositoryInterface',\n function ($app) use ($resource) {\n $repositoryPath = 'Bdgt\\Repositories\\Eloquent\\Eloquent' . $resource . 'Repository';\n return $app->make($repositoryPath);\n }\n );\n }\n }", "public function register()\n {\n $this->loadViewsFrom(__DIR__ . '/resources/stubs', 'CrudGenerator');\n }", "public function register(): void\n {\n // リポジトリの実装切り替え\n $this->app->singleton(\n TodoItemRepositoryInterface::class,\n function (Container $app) {\n return $app->make($this->repositoryClasses[config('laratodo.impl')]);\n }\n );\n\n // PDO用の設定\n $this->app->singleton(Impls\\POPOAndPDO\\TodoItemRepository::class);\n $this->app->when(Impls\\POPOAndPDO\\TodoItemRepository::class)\n ->needs(PDO::class)\n ->give(\n function () {\n return new PDO('sqlite:' . config('database.connections.sqlite.database'));\n }\n );\n\n // Atlas用の設定\n $this->app->singleton(\n Atlas::class,\n function () {\n return Atlas::new(\n 'sqlite:' . config('database.connections.sqlite.database')\n );\n }\n );\n }", "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../resources/config/laravel-medialibrary.php', 'laravel-medialibrary');\n\n $this->app->bind(Filesystem::class, function (Application $app) {\n return new Filesystem($this->app->filesystem->disk($app->config->get('laravel-medialibrary.filesystem')), $app->config);\n });\n\n $this->app->bind(UrlGenerator::class, function (Application $app) {\n $urlGeneratorClass = 'Spatie\\MediaLibrary\\UrlGenerator\\\\'.ucfirst($this->getDriverType()).'UrlGenerator';\n\n $customClass = $app->config->get('laravel-medialibrary.custom_url_generator_class');\n\n if ($customClass != '' && class_exists($customClass) && is_subclass_of($customClass, UrlGenerator::class)) {\n $urlGeneratorClass = $customClass;\n }\n\n return $this->app->make($urlGeneratorClass);\n });\n\n $this->app->singleton(MediaRepository::class);\n\n $this->app['command.medialibrary:regenerate'] = $this->app->make(RegenerateCommand::class);\n\n $this->commands(['command.medialibrary:regenerate']);\n }", "public function register()\n {\n $this->commands(Console\\MakeProviderCommand::class);\n }", "public function run()\n {\n $repositories = GitHub::user()\n ->repositories(\n $this->_username,\n $this->_type,\n $this->_sort,\n $this->_direction,\n $this->_visibility,\n $this->_affiliation\n );\n\n foreach ($repositories as $data)\n {\n $repository = [\n 'node_id' => $data['node_id'],\n 'name' => $data['name'],\n 'full_name' => $data['full_name'],\n 'html_url' => $data['html_url'],\n 'url' => $data['url'],\n 'commits_url' => $data['commits_url'],\n 'git_commits_url' => $data['git_commits_url'],\n 'repo_created_at' => $data['created_at'],\n 'repo_updated_at' => $data['updated_at'],\n 'repo_pushed_at' => $data['pushed_at'],\n ];\n\n factory(\\App\\Repository::class)->create($repository);\n }\n }", "public function register(){\n array_walk($this->repositories, function($repository){\n $this->app->bind('App\\Winner\\Repositories\\Contracts\\\\'.$repository.'Interface',\n 'App\\Winner\\Repositories\\Eloquent\\\\'.$repository.'Repository'\n );\n });\n }", "public function run()\n {\n factory(Repository::class, 10)\n ->create();\n }", "public function register()\n {\n $this->app->bind('Laragento\\Catalog\\Repositories\\Product\\ProductRepositoryInterface',\n 'Laragento\\Catalog\\Repositories\\Product\\ProductRepository');\n $this->app->bind('Laragento\\Catalog\\Repositories\\Product\\ProductAttributeRepositoryInterface',\n 'Laragento\\Catalog\\Repositories\\Product\\ProductAttributeRepository');\n $this->app->bind('Laragento\\Catalog\\Repositories\\Category\\CategoryRepositoryInterface',\n 'Laragento\\Catalog\\Repositories\\Category\\CategoryRepository');\n $this->app->bind('Laragento\\Catalog\\Repositories\\Category\\CategoryProductRepositoryInterface',\n 'Laragento\\Catalog\\Repositories\\Category\\CategoryProductRepository');\n $this->app->bind('Laragento\\Catalog\\Repositories\\Category\\CategoryAttributeRepositoryInterface',\n 'Laragento\\Catalog\\Repositories\\Category\\CategoryAttributeRepository');\n $this->app->bind('Laragento\\Catalog\\Repositories\\Catalog\\CatalogAttributeRepositoryInterface',\n 'Laragento\\Catalog\\Repositories\\Catalog\\CatalogAttributeRepository');\n $this->app->bind('Laragento\\Catalog\\Repositories\\Media\\ImageRepositoryInterface',\n 'Laragento\\Catalog\\Repositories\\Media\\ImageRepository');\n $this->app->bind('Laragento\\Catalog\\Repositories\\Pricing\\PriceRepositoryInterface',\n 'Laragento\\Catalog\\Repositories\\Pricing\\PriceRepository');\n $this->app->bind('Laragento\\Eav\\Repositories\\AttributeRepositoryInterface',\n 'Laragento\\Eav\\Repositories\\AttributeRepository');\n $this->app->bind('Laragento\\Store\\Repositories\\StoreRepositoryInterface',\n 'Laragento\\Store\\Repositories\\StoreRepository');\n\n $this->app->alias(ProductRepository::class, 'product'); // ????\n //$this->app->make($controller); // ????\n }", "public function register()\n {\n // $this->mergeConfigFrom(__DIR__.'/../config/generator.php', 'generator');\n\n // Register the service the package provides.\n// $this->app->singleton('generator', function ($app) {\n// return new Generator;\n// });\n }", "protected function withFaker()\n {\n return Container::getInstance()->make(Generator::class);\n }", "protected function withFaker()\n {\n return Container::getInstance()->make(Generator::class);\n }", "public function register()\n {\n $models = array('Category', 'Comment', 'CommentsSentence', 'PasswordReset', 'Profile', 'Role', 'Sentence', 'SentencesCategory', 'SocialNetwork', 'Student', 'StudentsComment', 'SupportTicket', 'User', 'UsersRole', 'UsersSocialNetwork');\n /* 'User',\n 'Role',\n 'Profile',\n 'PasswordReset',\n 'SocialNetwork'*/\n \n foreach ($models as $idx => $model) { \n $this->app->bind(\"App\\Repositories\\\\{$model}\\I{$model}Repo\", \"App\\Repositories\\\\{$model}\\\\Eloquent{$model}\");\n }\n }", "public function register()\n {\n\n $this->commands([\n\n app\\Console\\Commands\\build::class\n\n ]);\n\n }", "public function register()\n {\n $this->commands(\n 'Appzcoder\\CrudGenerator\\Commands\\CrudCommand',\n 'Appzcoder\\CrudGenerator\\Commands\\GenControllerCommand',\n 'Appzcoder\\CrudGenerator\\Commands\\GenViewCommand'\n );\n }", "public function register()\n {\n //\n if ($this->app->environment() == 'local') {\n $this->app->register('Laracasts\\Generators\\GeneratorsServiceProvider');\n }\n }", "function onCreate(RepositoryConnectorInterface $repo);", "public static function makeResourceRepository(string $repository): Repository\n {\n $api = App::make(ApiClient::class);\n\n return new $repository($api);\n }", "public function register()\n { \n $this->registerCommands($this->commands);\n\n $this->mergeConfigFrom(\n __DIR__.'/../config/config.php', 'laravel-generator'\n );\n }", "public function register()\r\n\t{\r\n\t\t$this->registerRepository();\r\n\t}", "public function register()\n {\n $driver = $this->app['config']['modules.driver'];\n\n if ($driver == 'custom') {\n $className = $this->app['config']['modules.custom_driver'];\n } else {\n $className = 'Nova\\Module\\Repositories\\\\' .ucfirst($driver) .'Repository';\n }\n\n $this->app->bind('Nova\\Module\\RepositoryInterface', $className);\n }", "public function createRepository()\n {\n $schema = $this->getConnection()->getSchemaBuilder();\n\n $schema->create(static::$table, function ($table) {\n $table->increments('id');\n $table->string('seeder');\n $table->string('environment');\n $table->timestamp('ran_at');\n });\n }", "public function register()\n {\n $models = array(\n 'Receipt',\n 'Warehouse',\n 'Request',\n 'Category',\n 'UserRoles',\n 'User',\n 'Supplier',\n 'Staff',\n 'Settings',\n 'Restock',\n 'PurchaseOrder',\n 'Product',\n 'Model',\n 'Message',\n 'Invoice',\n 'Dispatch',\n 'Department',\n 'Customer',\n 'Category',\n 'Company',\n 'SalesOrder',\n 'Currency',\n 'Payment',\n 'Language',\n 'Translation'\n\n );\n foreach ($models as $model) {\n $this->app->bind(\"CodedCell\\\\Repository\\\\{$model}\\\\{$model}Interface\", \"CodedCell\\\\Repository\\\\{$model}\\\\{$model}Entity\");\n }\n\n }", "private static function registerGenerateCommands(GenerateFileCommandBuilder $builder) : void {\n\t\t$builder->file(\"command\", \"Create a new console command.\", \"src/Console/Command/Command.php\", ClassFileSettings::class)\n\t\t\t->before(static function(GenerateFileCommand $command) : void {\n\t\t\t\t$command->getFileSettings()->appendBase();\n\t\t\t});\n\t\t$builder->modelFile(\"factory\", \"Create a new model factory.\", \"database/factories/Factory.php\")\n\t\t\t->before(static function(GenerateFileCommand $command) : void {\n\t\t\t\t$command->getFileSettings()->appendBase();\n\t\t\t});\n\t\t$builder->file(\"migration\", \"Create a new model migration.\", \"database/migration/migration.php\", ClassFileSettings::class)\n\t\t\t->withNameFormat(static function(GenerateFileCommand $command, string $input) : string {\n\t\t\t\t$name = Str::snake(trim($input));\n\t\t\t\t[$table, $create] = TableGuesser::guess($name);\n\t\t\t\t$base = ($create ? \"create\" : \"update\") . \"_\" . $table . \"_table\";\n\n\t\t\t\t$file = $command->getFileSettings();\n\n\t\t\t\t$file->getView()->with(\"table\", $table); // set the table name var for the template\n\t\t\t\t$file->setOutputClassName(Str::studly($base)); // class name\n\n\t\t\t\treturn date(\"Y_m_d_His\") . \"_\" . $base; // filename\n\t\t\t});\n\t\t$builder->file(\"model\", \"Create a new eloquent model.\", \"src/Model/Model.php\", ClassFileSettings::class)\n\t\t\t->withNameFormat(static function(GenerateFileCommand $command, string $input) : string {\n\t\t\t\treturn (string) Str::of($input)->studly();\n\t\t\t});\n\t\t$builder->file(\"provider\", \"Create a new service provider.\", \"src/Provider/ServiceProvider.php\", ClassFileSettings::class)\n\t\t\t->before(static function(GenerateFileCommand $command) : void {\n\t\t\t\t$command->getFileSettings()->appendBase();\n\t\t\t})\n\t\t\t->after(static function(GenerateFileCommand $command) : void {\n\t\t\t\t$file = $command->getComposerSettings();\n\t\t\t\t$file->merge([\n\t\t\t\t\t\"extra\" => [\n\t\t\t\t\t\t\"laravel\" => [\n\t\t\t\t\t\t\t\"providers\" => [\n\t\t\t\t\t\t\t\t$command->getFileSettings()->getFqn(),\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t]);\n\t\t\t\t$file->toFile($command->getModuleDisk());\n\t\t\t});\n\t}", "public function set_generators(\n\t\tSchema_Generator $schema_generator,\n\t\tOpen_Graph_Locale_Generator $open_graph_locale_generator,\n\t\tOpen_Graph_Image_Generator $open_graph_image_generator,\n\t\tTwitter_Image_Generator $twitter_image_generator,\n\t\tBreadcrumbs_Generator $breadcrumbs_generator\n\t) {\n\t\t$this->schema_generator = $schema_generator;\n\t\t$this->open_graph_locale_generator = $open_graph_locale_generator;\n\t\t$this->open_graph_image_generator = $open_graph_image_generator;\n\t\t$this->twitter_image_generator = $twitter_image_generator;\n\t\t$this->breadcrumbs_generator = $breadcrumbs_generator;\n\t}", "public function register()\n {\n // $this->app->singleton(\n // \\App\\Repositories\\Product\\ProductRepositoryInterface::class,\n // \\App\\Repositories\\Product\\ProductEloquentRepository::class,\n\n // \\App\\Repositories\\Profile\\ProfileRepositoryInterface::class,\n // \\App\\Repositories\\Profile\\ProfileEloquentRepository::class\n // );\n $models = array(\n 'Product',\n 'Profile',\n );\n\n foreach ($models as $model) {\n $this->app->bind(\"App\\Repositories\\\\{$model}\\\\{$model}RepositoryInterface\", \n \"App\\Repositories\\\\{$model}\\\\{$model}EloquentRepository\");\n }\n }", "public function register()\n {\n // Khai báo cái repository ở đây\n //$this->app->singleton(ServiceGroupRepositoryInterface::class, ServiceGroupRepository::class);\n }", "public function register()\n {\n /*$this->app->bind('UserRepository', function($app){\n return new UserRepository;\n });*/\n $this->app->bind('BaseRepository', function($app){\n return new BaseRepository;\n });\n }", "public function createRepository()\n {\n $schema = $this->getConnection()->getSchemaBuilder();\n\n $schema->create($this->table, function ($table) {\n // The patches table is responsible for keeping track of which of the\n // patches have actually run for the application. We'll create the\n // table to hold the migration file's path as well as the batch ID.\n $table->increments('id');\n $table->string('patch');\n $table->integer('batch');\n });\n }", "public function register()\n {\n //\n $url = $this->app['url'];\n $this->app->singleton('url', function () use ($url) {\n return new CustomUrlGenerator($url);\n });\n }", "public function register()\n {\n $this->app->bindShared('package.creator', function ($app) {\n return new PackageCreator($app['files']);\n });\n\n $this->app->bindShared('command.orchestrate', function ($app) {\n return new ExtensionMakeCommand($app['package.creator']);\n });\n\n $this->commands('command.orchestrate');\n }", "public function provides()\n {\n return ['generator'];\n }", "public function register()\n {\n\t\tif ($this->app->environment() == 'local') {\n\t $this->app->register('Iber\\Generator\\ModelGeneratorProvider');\n\t }\n }" ]
[ "0.67129636", "0.65945566", "0.6473312", "0.63688344", "0.6206008", "0.6196259", "0.61828375", "0.60810745", "0.60243964", "0.60221785", "0.59946215", "0.5988854", "0.5925319", "0.5839448", "0.57920694", "0.5764248", "0.57016826", "0.56594044", "0.56340104", "0.56330496", "0.56296825", "0.56233495", "0.55838126", "0.5566174", "0.550861", "0.5476838", "0.5462656", "0.54521745", "0.5447228", "0.5443065", "0.54277277", "0.53733796", "0.53194255", "0.5299203", "0.529544", "0.52829707", "0.52506346", "0.5250344", "0.52471447", "0.52427626", "0.5240991", "0.5235214", "0.52314734", "0.52220213", "0.52159494", "0.5208606", "0.5206761", "0.5202949", "0.5202373", "0.5188065", "0.5183269", "0.51762956", "0.5174781", "0.51622176", "0.5153759", "0.5145238", "0.5139888", "0.5137946", "0.5131033", "0.51249945", "0.5117276", "0.51163006", "0.51001924", "0.50960857", "0.5091", "0.50907785", "0.5085592", "0.5074726", "0.50738543", "0.5066208", "0.50540686", "0.50526565", "0.504045", "0.5035865", "0.50237125", "0.5021044", "0.5019929", "0.49826437", "0.49826437", "0.49533227", "0.49368587", "0.49341404", "0.49336115", "0.49326128", "0.49324813", "0.49315274", "0.49280694", "0.49267817", "0.49220645", "0.49215192", "0.49204484", "0.49168146", "0.4914266", "0.49139252", "0.4913644", "0.49133173", "0.49120146", "0.49110284", "0.49096587", "0.48963916" ]
0.82694227
0
Register the make:transformer generator.
Зарегистрируйте генератор make:transformer.
private function registerTransformerGenerator() { $this->app->singleton( 'command.thirdsense.transformer', function ($app) { return $app[TransformerMakeCommand::class]; } ); $this->commands('command.thirdsense.transformer'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function registerTransformer()\n {\n $this->app->singleton('output.transformer', function ($app) {\n return new TransformerFactory($app, $this->app->make(Fractal::class));\n });\n }", "public function registerTransformer()\n {\n $this->app->singleton(Transformer::class, function () {\n return new Transformer(config('transformer.rule_packs', []));\n });\n }", "protected function registerGenerator()\n\t{\n\t\t$this->app->bind('Cerbero\\Workflow\\Scaffolding\\GeneratorInterface', 'Cerbero\\Workflow\\Scaffolding\\Generator');\n\t}", "protected function generateTransformer()\n {\n $name = (string) $this->argument( 'name' );\n $path = $this->laravel->basePath() . '/app/Transformers/' . $name . '.php';\n\n if ( $this->files->exists( $path ) ) {\n return $this->error( $name . ' already exists!' );\n }\n\n $this->makeDirectory( $path );\n\n $stubPath = $this->option( 'pivot' ) ? 'resources/stubs/transformer.pivot.stub' : 'resources/stubs/transformer.stub';\n $stub = $this->files->get( __DIR__ . '/../../' . $stubPath );\n\n $this->files->put( $path, $this->makeTransformer( $name, $stub ) );\n\n $this->info( 'Transformer created successfully.' );\n }", "public function generateTransformer($request)\n {\n $this->setInput($request);\n //get generator parameter\n $this->setGeneratorParameter($request);\n $this->writeTransformer();\n return $this->getTransformer();\n }", "private function registerEntityGenerator()\r\n {\r\n $this->app->singleton('command.emirsator.entity', function ($app) {\r\n return $app['emirsator\\Generators\\Commands\\EntityMakeCommand'];\r\n });\r\n $this->commands('command.emirsator.entity');\r\n }", "public function register()\n {\n $this->app->singleton(\n 'artomator.publish',\n function ($app) {\n return new GeneratorPublishCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.api',\n function ($app) {\n return new APIGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.scaffold',\n function ($app) {\n return new ScaffoldGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.publish.layout',\n function ($app) {\n return new LayoutPublishCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.publish.templates',\n function ($app) {\n return new PublishTemplateCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.api_scaffold',\n function ($app) {\n return new APIScaffoldGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.migration',\n function ($app) {\n return new MigrationGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.model',\n function ($app) {\n return new ModelGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.repository',\n function ($app) {\n return new RepositoryGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.api.controller',\n function ($app) {\n return new APIControllerGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.api.requests',\n function ($app) {\n return new APIRequestsGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.api.tests',\n function ($app) {\n return new TestsGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.scaffold.controller',\n function ($app) {\n return new ControllerGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.scaffold.requests',\n function ($app) {\n return new RequestsGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.scaffold.views',\n function ($app) {\n return new ViewsGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.scaffold.routes',\n function ($app) {\n return new RoutesGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.rollback',\n function ($app) {\n return new RollbackGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.publish.user',\n function ($app) {\n return new PublishUserCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.graphql',\n function ($app) {\n return new GraphQLGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.graphql_scaffold',\n function ($app) {\n return new GraphQLScaffoldGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.graphql.query',\n function ($app) {\n return new GraphQLQueryGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.graphql.mutations',\n function ($app) {\n return new GraphQLMutationsGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.graphql.type',\n function ($app) {\n return new GraphQLTypeGeneratorCommand();\n }\n );\n\n $this->app->singleton(\n 'artomator.graphql.subscription',\n function ($app) {\n return new GraphQLSubscriptionGeneratorCommand();\n }\n );\n\n parent::register();\n\n $this->commands(\n [\n 'artomator.publish',\n 'artomator.api',\n 'artomator.scaffold',\n 'artomator.api_scaffold',\n 'artomator.publish.layout',\n 'artomator.publish.templates',\n 'artomator.migration',\n 'artomator.model',\n 'artomator.repository',\n 'artomator.api.controller',\n 'artomator.api.requests',\n 'artomator.api.tests',\n 'artomator.scaffold.controller',\n 'artomator.scaffold.requests',\n 'artomator.scaffold.views',\n 'artomator.scaffold.routes',\n 'artomator.rollback',\n 'artomator.publish.user',\n 'artomator.graphql',\n 'artomator.graphql_scaffold',\n 'artomator.graphql.query',\n 'artomator.graphql.mutations',\n 'artomator.graphql.type',\n 'artomator.graphql.subscription',\n Console\\InstallCommand::class,\n ]\n );\n }", "public static function create_transformer($name)\n {\n }", "private function registerGenerators()\n {\n $generator = Factory::create();\n\n // Register a boolean generator\n $this->app\n ->singleton(\n RandomBooleanGenerator::class,\n function ($app) use ($generator) {\n\n $booleanGenerator = new RandomBooleanGenerator();\n $booleanGenerator->setGenerator($generator);\n\n return $booleanGenerator;\n }\n );\n\n // Register the random integer generator\n $this->app\n ->singleton(\n RandomIntegerGenerator::class,\n function ($app) use ($generator) {\n\n $integerGenerator = new RandomIntegerGenerator();\n $integerGenerator->setGenerator($generator);\n\n return $integerGenerator;\n }\n );\n\n // Register the race strategy event generator\n $this->app->singleton(\n RandomRaceStrategyEventGenerator::class,\n function ($app) {\n\n $factory = $app->make(AthleteRaceStrategyFactory::class);\n\n $eventGenerator = new RandomRaceStrategyEventGenerator();\n\n $eventGenerator->setStrategyFactory($factory);\n\n return $eventGenerator;\n }\n );\n }", "protected function registerModelGenerator()\n {\n $app = $this->app;\n\n $app->singleton('datamapper.eloquent.generator', function ($app) {\n $path = storage_path('framework/entities');\n\n return new ModelGenerator($app['files'], $path);\n });\n }", "public function loadTransformations(Transformer $transformer)\n {\n $received = array();\n $transformations = $this->getConfigValueFromPath('transformations/transformation');\n if (is_array($transformations)) {\n if (isset($transformations['writer'])) {\n $received[] = new Transformation(\n isset($transformations['query']) ? $transformations['query'] : '',\n $transformations['writer'],\n isset($transformations['source']) ? $transformations['source'] : '',\n isset($transformations['artifact']) ? $transformations['artifact'] : ''\n );\n } else {\n foreach ($transformations as $transformation) {\n if (is_array($transformation)) {\n $received[] = new Transformation(\n isset($transformations['query']) ? $transformations['query'] : '',\n $transformations['writer'],\n isset($transformations['source']) ? $transformations['source'] : '',\n isset($transformations['artifact']) ? $transformations['artifact'] : ''\n );\n }\n }\n }\n }\n\n if (!empty($received)) {\n $template = new Template('__');\n foreach ($received as $transformation) {\n $template[] = $transformation;\n }\n $transformer->getTemplates()->append($template);\n }\n }", "public function register()\n {\n // TODO: these commands names should be collected from the directory, to remove the step of manual registration of commands.\n $this->registerGenerators([\n 'Action',\n 'Controller',\n 'Exception',\n 'Model',\n 'Repository',\n 'Request',\n 'Route',\n 'Task',\n 'Transformer'\n // Register more generator commands here..\n ]);\n }", "private function registerMigrationGenerator()\n\t{\n\t\t$this->app->singleton('command.codedungeon.migrate', function ($app) {\n\t\t\treturn $app['CodeDungeon\\Addons\\Commands\\MigrationMakeCommand'];\n\t\t});\n\n\t\t$this->commands('command.codedungeon.migrate');\n\t}", "public function register()\n {\n $this->registerTransformers();\n }", "public function registerUrlGeneratorFactory(): void\n {\n $this->app->singleton('mediable.url.factory', function (Container $app) {\n $factory = new UrlGeneratorFactory;\n\n $config = $app['config']->get('mediable.url_generators', []);\n foreach ($config as $driver => $generator) {\n $factory->setGeneratorForFilesystemDriver($generator, $driver);\n }\n\n return $factory;\n });\n $this->app->alias('mediable.url.factory', UrlGeneratorFactory::class);\n }", "protected function createTestTransformer()\n {\n $transformer = new class extends Transformer\n {\n public function transform( $model ):array\n {\n return [\n 'name' => (string) $model->name,\n 'price' => (int) $model->price,\n 'isRotten' => (bool) false\n ];\n }\n };\n\n $this->app->bind( 'test.transformer', function () use ( $transformer ) {\n return new $transformer();\n } );\n }", "public function register()\r\n {\r\n $this->registerEntityGenerator();\r\n }", "public function register()\n {\n $this->registerRepositoryGenerator();\n $this->registerTransformerGenerator();\n }", "public function make($data): TransformerInterface;", "public function setGenerator(GeneratorInterface $generator);", "private function registerPivotMigrationGenerator()\n\t{\n\t\t$this->app->singleton('command.codedungeon.migrate.pivot', function ($app) {\n\t\t\treturn $app['CodeDungeon\\Addons\\Commands\\PivotMigrationMakeCommand'];\n\t\t});\n\n\t\t$this->commands('command.codedungeon.migrate.pivot');\n\t}", "public function register(Transformer $transformer)\n {\n $this->transformers[$transformer->transforms()] = $transformer;\n }", "private function registerRepositoryGenerator()\n {\n $this->app->singleton(\n 'command.thirdsense.repository',\n function ($app) {\n return $app[RepositoryMakeCommand::class];\n }\n );\n\n $this->commands('command.thirdsense.repository');\n }", "public function register()\n\t{\n\t\t$this->registerGenerator();\n\n\t\t$this->registerCompiler();\n\n\t\t$this->registerCommand();\n\t}", "public function register()\n\t{\n $this->app['command.migration-generator'] = $this->app->share(function($app)\n {\n $cache = new Cache($app['files']);\n $generator = new Generators\\MigrationGenerator($app['files'], $cache);\n $config = $app['config']->get('laravel-migration-generator::config');\n\n return new MigrationGeneratorCommand($generator,$config);\n });\n $this->commands('command.migration-generator');\n\t}", "public function register()\n {\n $this->app->singleton('Number7even.publish', function ($app) {\n return new GeneratorPublishCommand();\n });\n\n $this->app->singleton('Number7even.api', function ($app) {\n return new APIGeneratorCommand();\n });\n\n $this->app->singleton('Number7even.scaffold', function ($app) {\n return new ScaffoldGeneratorCommand();\n });\n\n $this->app->singleton('Number7even.publish.layout', function ($app) {\n return new LayoutPublishCommand();\n });\n\n $this->app->singleton('Number7even.publish.templates', function ($app) {\n return new PublishTemplateCommand();\n });\n\n $this->app->singleton('Number7even.api_scaffold', function ($app) {\n return new APIScaffoldGeneratorCommand();\n });\n\n $this->app->singleton('Number7even.migration', function ($app) {\n return new MigrationGeneratorCommand();\n });\n\n $this->app->singleton('Number7even.model', function ($app) {\n return new ModelGeneratorCommand();\n });\n\n $this->app->singleton('Number7even.repository', function ($app) {\n return new RepositoryGeneratorCommand();\n });\n\n $this->app->singleton('Number7even.api.controller', function ($app) {\n return new APIControllerGeneratorCommand();\n });\n\n $this->app->singleton('Number7even.api.requests', function ($app) {\n return new APIRequestsGeneratorCommand();\n });\n\n $this->app->singleton('Number7even.api.tests', function ($app) {\n return new TestsGeneratorCommand();\n });\n\n $this->app->singleton('Number7even.scaffold.controller', function ($app) {\n return new ControllerGeneratorCommand();\n });\n\n $this->app->singleton('Number7even.scaffold.requests', function ($app) {\n return new RequestsGeneratorCommand();\n });\n\n $this->app->singleton('Number7even.scaffold.views', function ($app) {\n return new ViewsGeneratorCommand();\n });\n\n $this->app->singleton('Number7even.rollback', function ($app) {\n return new RollbackGeneratorCommand();\n });\n\n $this->app->singleton('Number7even.vuejs', function ($app) {\n return new VueJsGeneratorCommand();\n });\n $this->app->singleton('Number7even.publish.vuejs', function ($app) {\n return new VueJsLayoutPublishCommand();\n });\n\n $this->commands([\n 'Number7even.publish',\n 'Number7even.api',\n 'Number7even.scaffold',\n 'Number7even.api_scaffold',\n 'Number7even.publish.layout',\n 'Number7even.publish.templates',\n 'Number7even.migration',\n 'Number7even.model',\n 'Number7even.repository',\n 'Number7even.api.controller',\n 'Number7even.api.requests',\n 'Number7even.api.tests',\n 'Number7even.scaffold.controller',\n 'Number7even.scaffold.requests',\n 'Number7even.scaffold.views',\n 'Number7even.rollback',\n 'Number7even.vuejs',\n 'Number7even.publish.vuejs',\n ]);\n }", "public function register()\n {\n $this->mergeConfigFrom(__DIR__ . '/../config/transformer.php', 'transformer');\n\n $this->checkForCollectionExtensions();\n $this->registerTransformer();\n $this->registerRequestTransformMacro();\n }", "public function generate() {\n $this->generator->setDocBlock($this->describer->getGenerator());\n\n //does a _construct method exists?\n //if it does we always want this to be the first method\n if (isset($this->methods['__construct'])) {\n $this->generator->addMethodFromGenerator($this->methods['__construct']->getGenerator());\n // unset($this->methods['__construct']);\n }\n\n foreach ($this->properties as $name => $obj) {\n $this->generator->addPropertyFromGenerator($obj->getGenerator());\n }\n\n foreach ($this->methods as $name => $obj) {\n if ($name == '__construct') {\n continue;\n }\n $this->generator->addMethodFromGenerator($obj->getGenerator());\n }\n\n return $this->generator->generate();\n }", "public function register()\n\t{\n $cache = new \\Way\\Generators\\Cache($this->app['files']);\n $resource_generator = new \\Way\\Generators\\Generators\\ResourceGenerator($this->app['files']);\n $view_generator = new \\Tresyz\\HellesManager\\Generators\\ViewGenerator($this->app['files'], $cache);\n\n $this->app['admin.add.user'] = $this->app->share(function() {\n return new Commands\\AddUser();\n });\n $this->app['admin.install'] = $this->app->share(function() {\n return new Commands\\Install();\n });\n $this->app['admin.remove.user'] = $this->app->share(function() {\n return new Commands\\RemoveUser();\n });\n $this->app['admin.scaffold'] = $this->app->share(function() use($resource_generator, $cache) {\n \n return new Commands\\Scaffold($resource_generator, $cache);\n });\n\n $this->app['admin.generate.view'] = $this->app->share(function() use($view_generator) {\n return new Commands\\ViewGenerator($view_generator);\n });\n \n $this->commands('admin.install');\n $this->commands('admin.add.user');\n $this->commands('admin.remove.user');\n $this->commands('admin.scaffold');\n $this->commands('admin.generate.view');\n\t}", "public function register() {\n\n\t\t\tDomainToolConfig::setMaker([$this->app, 'make']);\n\t\t\tDomainToolConfig::setProfileLoader($this->app->make('Atrauzzi\\DomainToolLaravel\\ProfileLoader'));\n\n\t\t}", "public function register()\n {\n $this->app->singleton(FakerGenerator::class, function () {\n return FakerFactory::create('zh_cn');\n });\n }", "public function register()\n {\n $this->app->extend('command.model.make', function() {\n return resolve( ModelMake::class );\n });\n\n $this->app->extend('command.resource.make', function() {\n return resolve( ResourceMake::class );\n });\n\n $this->app->extend('command.controller.make', function() {\n return resolve( ControllerMake::class );\n });\n }", "public function register(): void\n {\n $this->commands([\n Builder::class,\n Generator::class\n ]);\n }", "public function register()\n {\n // FIXME in the fiture, fideloper fixed this, see https://github.com/fideloper/TrustedProxy\n\n // Override Laravels UrlGenerator with my own\n // Original UrlGenerator class is found in\n // vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php\n // And the original service is registered in\n // vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php\n // I simply created a new Mrcore/Mrcore/UrlGenerator.php class and copied\n // the register closure below from Illuminate/Routing/RoutingServiceProvider.php\n // I only overwrite one function, the getRootUrl() ffunction.\n // This is responsible for determining if the original request is http or https\n // But because I usually run laravel behind a loadbalancer, all requests are seen\n // internally as http. So I have to force https if defined in my config\n // ->share means url is a singleton, same as bindShared\n\n #$this->app['url'] = $this->app->share(function ($app) {\n $this->app->singleton('url', function ($app) {\n // The URL generator needs the route collection that exists on the router.\n // Keep in mind this is an object, so we're passing by references here\n // and all the registered routes will be available to the generator.\n $routes = $app['router']->getRoutes();\n\n return new UrlGenerator($routes, $app->rebinding('request', function ($app, $request) {\n $app['url']->setRequest($request);\n }));\n });\n }", "protected function registerCreator()\n {\n $this->app->singleton('eav.entity.migration.creator', function ($app) {\n return new EntityMigrationCreator($app['files']);\n });\n\n $this->app->singleton('eav.attribute.migration.creator', function ($app) {\n return new AttributeMigrationCreator($app['files']);\n });\n\n $this->app->singleton('eav.entity.attribute.map.creator', function ($app) {\n return new EntityAttributeMapCreator($app['files']);\n });\n }", "public function beforeGenerate(Generator $generator): void;", "public function addGenerator(){\n\t\tif($this->version == Feed::ATOM){\n\t\t\t$this->setChannelElement('atom:generator', 'FeedWriter', array('uri' => 'https://github.com/mibe/FeedWriter'));\n\t\t}\n\t\telse if($this->version == Feed::RSS2){\n\t\t\t$this->setChannelElement('generator', 'FeedWriter');\n\t\t}\n\t\telse{\n\t\t\tdie('The generator element is not supported in RSS1 feeds.');\n\t\t}\n\n\t\treturn $this;\n\t}", "public function register()\n {\n // Bind the PDF Generator to the container.\n $this->app->bind(PdfGenerator::class, function () {\n $guzzle = new Client(['base_uri' => config('pdf.url')]);\n $pdfGeneratorSdk = new PdfGeneratorSdk($guzzle);\n return new PdfGenerator($pdfGeneratorSdk);\n });\n }", "public function register()\n {\n// dump($this->getCommands());\n foreach ($this->getCommands() as $command) {\n $this->commands($command);\n\n }\n\n// dump('DwGeneratorServiceProvider');\n\n// $this->commands($this->commands);\n }", "public function register()\n {\n if ($this->app->environment() === 'local') {\n $this->commands(['b3nl\\MWBModel\\Console\\Commands\\MakeMWBModel']);\n\n $this->app->register('Laracasts\\Generators\\GeneratorsServiceProvider');\n }\n }", "abstract protected function transformer();", "public function register()\n {\n $path = realpath(__DIR__ . '/../config/config.php');\n $this->publishes([$path => config_path('transformer.php')], 'config');\n $this->mergeConfigFrom($path, 'transformer');\n\n // Expose the 'transform' function\n require realpath(__DIR__ . '/functions.php');\n }", "abstract public function getTransformer();", "abstract public function getTransformer();", "public function register()\n\t{\n\t\t$this->registerSeedGenerator();\n\t\t$this->registerMigrationGenerator();\n\t\t$this->registerPivotMigrationGenerator();\n\t}", "public function transformer()\n {\n return app(\n Contracts\\MovieTransformer::class\n );\n }", "public function register()\n {\n $this->app->extend('command.model.make', function ($command, $app) {\n return new ModelMakeCommand($app['files']);\n });\n }", "public function register()\n {\n $this->commands(BreadGenerator::class);\n }", "private function registerSeedGenerator()\n\t{\n\t\t$this->app->singleton('command.codedungeon.seed', function ($app) {\n\t\t\treturn $app['CodeDungeon\\Addons\\Commands\\SeedMakeCommand'];\n\t\t});\n\n\t\t$this->commands('command.codedungeon.seed');\n\t}", "public function register()\n {\n #esto se supone que se llama binding contextual\n #pero por alguna razon me dice que la interfaz (PurchaseBill) no se puede instanciar\n #antes de que diga cualquier cosa, yo se que una interfaz no se instancia, el problema es que si\n #ahi se supone que va una interfaz porque jode por instancias\n #$this->app->when('SeedController@pdf')\n # ->needs(PurchaseBill::class)\n # ->give(function(){\n # return new GeneratePdf();\n # });\n $this->app->bind(PurchaseBill::class, function ($app, $parameters){\n if($parameters['type'] == 'pdf'){\n return new GeneratePdf(); \n }else{\n return new GenerateExcel();\n }\n });\n\n }", "public function register()\n\t{\n\t\t$this->app->bind('AgencyTransformer', function()\n\t\t{\n\t\t\treturn new AgencyTransformer;\n\t\t});\n\n\t\t$this->app->bind('CategoryTransformer', function()\n\t\t{\n\t\t\treturn new CategoryTransformer;\n\t\t});\n\n\t\t$this->app->bind('OfficeTransformer', function()\n\t\t{\n\t\t\treturn new OfficeTransformer;\n\t\t});\n\n\t\t$this->app->bind('PersonTransformer', function()\n\t\t{\n\t\t\treturn new PersonTransformer;\n\t\t});\n\n\t\t$this->app->bind('ProtestTransformer', function()\n\t\t{\n\t\t\treturn new ProtestTransformer;\n\t\t});\n\n\t\t$this->app->bind('ProjectTransformer', function()\n\t\t{\n\t\t\treturn new ProjectTransformer;\n\t\t});\n\n\t\t$this->app->bind('VendorTransformer', function()\n\t\t{\n\t\t\treturn new VendorTransformer;\n\t\t});\n\t}", "public function register()\n {\n /*\n |--------------------------------------------------------------------------\n | Register the Commands\n |--------------------------------------------------------------------------\n */\n $this->commands([\n \\Coredigital\\Scaffold\\Console\\ScaffoldGenerator::class\n ]);\n }", "public function getTransformer();", "public function register()\n {\n $this->publishes($this->assetsPath(), $this->packageName);\n\n $this->app->register('Laracasts\\Generators\\GeneratorsServiceProvider');\n\n $this->commands(\n 'Pelletiermaxime\\LaravelScaffoldAdmin\\Commands\\ScaffoldControllerCommand',\n 'Pelletiermaxime\\LaravelScaffoldAdmin\\Commands\\ScaffoldMigration',\n 'Pelletiermaxime\\LaravelScaffoldAdmin\\Commands\\ScaffoldModel',\n 'Pelletiermaxime\\LaravelScaffoldAdmin\\Commands\\ScaffoldView',\n 'Pelletiermaxime\\LaravelScaffoldAdmin\\Commands\\ScaffoldGenerateCommand'\n );\n }", "public function register()\n {\n\t\tif ($this->app->environment() == 'local') {\n\t $this->app->register('Iber\\Generator\\ModelGeneratorProvider');\n\t }\n }", "public function register()\n {\n $this->app->bind('PDFGenerator', function() {\n return new PDFGenerator();\n });\n }", "public function generator() {}", "public function register()\n {\n //\n if ($this->app->environment() == 'local') {\n $this->app->register('Laracasts\\Generators\\GeneratorsServiceProvider');\n }\n }", "public function register() {\n\t\tif (!is_dir(BASE_PATH . '/lang/json')) {\n\t\t\tmkdir(BASE_PATH . '/lang/json', 0777, true);\n\t\t}\n\n\t\t$this->registerLoader();\n\t\t$this->registerTranslator();\n\t}", "public function register()\n {\n $this->app->singleton('leeduc.jsonapibuilder', function ($app) {\n return new \\Leeduc\\JsonApiBuilder\\JsonApiBuilder\\Generate($app->request, $app->view);\n });\n }", "public function register()\n {\n $this->loadViewsFrom(__DIR__ . '/resources/stubs', 'CrudGenerator');\n }", "public function scaffoldTransformFiles()\n {\n\n $transformerClassName = $this->className.'Transformer';\n\n $filePath = $this->resourcePath.'/Http/Transformers/'.$transformerClassName.'.php';\n\n $this->files->put($filePath, $this->buildClass($transformerClassName, 'transformer'));\n }", "public function register()\n {\n // merge config\n $configPath = __DIR__ . '/config/config.php';\n $this->mergeConfigFrom($configPath, 'generators');\n\n // register all the artisan commands\n $this->registerCommand(PublishCommand::class, 'publish');\n\n $this->registerCommand(ModelCommand::class, 'model');\n $this->registerCommand(ViewCommand::class, 'view');\n $this->registerCommand(ControllerCommand::class, 'controller');\n\n $this->registerCommand(RequestCommand::class, 'request');\n $this->registerCommand(MiddlewareCommand::class, 'middleware');\n\n $this->registerCommand(SeederCommand::class, 'seeder');\n $this->registerCommand(MigrationCommand::class, 'migration');\n $this->registerCommand(MigrationPivotCommand::class, 'migrate.pivot');\n\n $this->registerCommand(NotificationCommand::class, 'notification');\n\n $this->registerCommand(EventCommand::class, 'event');\n $this->registerCommand(ListenerCommand::class, 'listener');\n $this->registerCommand(EventGenerateCommand::class, 'event.generate');\n\n $this->registerCommand(TraitCommand::class, 'trait');\n $this->registerCommand(ContractCommand::class, 'contract');\n $this->registerCommand(RepositoryCommand::class, 'repository');\n\n $this->registerCommand(LivewireCommand::class, 'livewire');\n $this->registerCommand(ComponentCommand::class, 'component');\n\n $this->registerCommand(TestCommand::class, 'test');\n $this->registerCommand(FactoryCommand::class, 'factory');\n\n $this->registerCommand(JobCommand::class, 'job');\n $this->registerCommand(ConsoleCommand::class, 'console');\n\n $this->registerCommand(ExceptionCommand::class, 'exception');\n\n $this->registerCommand(ResourceCommand::class, 'resource');\n\n $this->registerCommand(FileCommand::class, 'file');\n }", "public function register()\n {\n if ($this->app->environment() == 'local') {\n $this->app->register('Laracasts\\Generators\\GeneratorsServiceProvider');\n }\n }", "public function register()\n {\n if ($this->app->environment() == 'local') {\n $this->app->register('Laracasts\\Generators\\GeneratorsServiceProvider');\n }\n }", "public function register()\n {\n if ($this->app->environment() == 'local') {\n $this->app->register('Laracasts\\Generators\\GeneratorsServiceProvider');\n }\n }", "public function register()\n {\n if ($this->app->environment() == 'local') {\n $this->app->register('Laracasts\\Generators\\GeneratorsServiceProvider');\n }\n }", "protected function getMaker_GeneratorService()\n {\n include_once \\dirname(__DIR__, 4).'/vendor/symfony/maker-bundle/src/Generator.php';\n include_once \\dirname(__DIR__, 4).'/vendor/symfony/maker-bundle/src/Util/PhpCompatUtil.php';\n\n $a = ($this->privates['maker.file_manager'] ?? $this->getMaker_FileManagerService());\n\n return $this->privates['maker.generator'] = new \\Symfony\\Bundle\\MakerBundle\\Generator($a, 'App', new \\Symfony\\Bundle\\MakerBundle\\Util\\PhpCompatUtil($a));\n }", "public function register()\n {\n $this->app->when([MarkdownParser::class, MarkdownWithFrontMatterParser::class])\n ->needs(CommonMarkConverter::class)\n ->give(function () {\n $environment = Environment::createCommonMarkEnvironment();\n $environment->addDocumentProcessor(new ExternalLinkProcessor());\n $environment->addBlockRenderer(FencedCode::class, new FencedCodeRenderer(['html', 'php', 'js']));\n $environment->addBlockRenderer(IndentedCode::class, new IndentedCodeRenderer(['html', 'php', 'js']));\n return new CommonMarkConverter(['safe' => true], $environment);\n });\n }", "public function register()\n {\n if ($this->app->environment() == 'local') {\n $this->app->register('Laracasts\\Generators\\GeneratorsServiceProvider');\n }\n }", "public function configureTemplates(Generator $generator): void;", "protected function transformer()\n {\n return new SupplierTransformer;\n }", "public static function register() {}", "public function register()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n MakeAction::class,\n MakeTask::class\n ]);\n }\n }", "public function generator(): Generator;", "public function register() {\n\t\t$this->register_yoast_plugins();\n\t\t$this->register_yoast_plugins_status();\n\t}", "public function assemble()\n {\n // based on parameters passed. This allows the user to write\n // generators in JSON only if needed. JSON is parsed sequentially\n // and each key will call a public method on generate.\n }", "public function register()\n {\n $this->commands([\n CreateTexemus::class,\n ]);\n }", "public function register()\n {\n // register the migration creator (used in artisan commands)\n $this->registerCreator();\n\n // register artisan commands\n $this->registerCommands();\n\n }", "protected function createResourceTransformer()\n {\n return new ResourceTransformer(\n new PropertyResolver(),\n new PropertySetter(),\n new JsonApiRequestResolver(),\n new QueryAdapter(),\n new ResourceFactory(\n JsonApiResource::class,\n JsonApiResourceCollection::class\n )\n );\n }", "public static function add_generator_tag(){\n if( is_admin() )\n add_action('wp_head', 'wp_generator');\n }", "public function register()\n {\n //\n $url = $this->app['url'];\n $this->app->singleton('url', function () use ($url) {\n return new CustomUrlGenerator($url);\n });\n }", "public function register()\r\n {\r\n $this->app->singleton('laravel_generator_service', function () {\r\n return new LaravelGeneratorService();\r\n });\r\n }", "public function register(): void\n {\n $this->migrationStrategyService = $this->app->get('package_loader.migration.strategy');\n\n // register Repository, Migrator and Creator if strategy provide it\n $this->registerRepository();\n $this->registerMigrator();\n $this->registerCreator();\n\n // load Command form strategy\n $this->commands = $this->loadCommands();\n\n // register all commands\n $this->registerCommands();\n }", "private function getGenerator(): Generator\n {\n return ($this->generator)($this->callable, $this->arguments);\n }", "public function register()\n {\n $this->package('ed-fruty/custom-model-builder', 'ed-fruty/custom-model-builder', __DIR__);\n }", "public function register()\n {\n $this->registerRepositoryGenerator();\n }", "protected function registerCreator()\n {\n $this->app->singleton('migration.creator', function ($app) {\n return new MigrationCreator($app['files']);\n });\n }", "public function register()\n {\n // Register HTTP Client\n $this->app->singleton(IFTTTMakerHTTPClientContract::class, function ($app) {\n return new GuzzleIFTTTMakerHTTPClient(config('ifttt-maker'));\n });\n\n // Register Manager\n $this->app->singleton(IFTTTMaker::FACADE_ACCESSOR, function ($app) {\n return $app->make(IFTTTMakerManager::class);\n });\n\n // Require helpers\n require __DIR__ . '/../../helpers/ifttt-maker.php';\n }", "public function register()\n {\n $this->app->singleton(FakerGenerator::class, function ($app) {\n $faker = FakerFactory::create($app['config']->get('app.faker_locale', 'en_US'));\n ProviderCollectionHelper::addAllProvidersTo($faker);\n $faker->addProvider(new LoremFlickrFakerProvider($faker));\n return $faker;\n });\n\n $this->app->singleton('Utils', function ($app) {\n return new Utils($app);\n });\n\n $this->app->singleton('XMLResource', function ($app) {\n return new XMLResource($app);\n });\n }", "public function register ()\n\t{\n\t\t$this->registerRepositoryGeneratorCommand();\n\t\t$this->publishes([\n\t\t\t__DIR__ . '/../config/generator.php' => config_path('generator.php'),\n\t\t]);\n\n\t}", "public function generate()\n {\n $this->generateNamesDescription();\n $this->generateGroups();\n $this->generateFromGeneric();\n }", "public function register(Subscriber $subscriber) : Emitter;", "protected function registerCreator()\n {\n $this->app->singleton('entity.creator', function ($app){\n\n return new Creator($app['files']);\n });\n }", "public function register()\n {\n $this->app[Factory::class]->setAdapter(function ($app) {\n return new Fractal(new Manager(), 'include', ',');\n });\n }", "public function register()\n\t{\t\t\t\t\n\t\t$this->registerProviders();\n\t\t$this->registerFacades();\n\t\t$this->registerGenerators();\n\t}", "private function addMetadataGenerators(): void\n {\n if ($this->isAddedMetadataGenerators) {\n return;\n }\n $classLocator = $this->getEntityClassLocator();\n\n $reader = $this->getMetadataReader();\n\n // register embeddable entities\n $this->conveyor[Conveyor::STAGE_INDEX][] = new Embeddings($classLocator, $reader);\n // register annotated entities\n $this->conveyor[Conveyor::STAGE_INDEX][] = new Entities($classLocator, $reader, $this->tableNaming);\n // register STI/JTI\n $this->conveyor[Conveyor::STAGE_INDEX][] = new TableInheritance($reader);\n // add @Table(columns) declarations\n $this->conveyor[Conveyor::STAGE_INDEX][] = new MergeColumns($reader);\n // add @Table(indexes) declarations\n $this->conveyor[Conveyor::STAGE_RENDER][] = new MergeIndexes($reader);\n\n $this->isAddedMetadataGenerators = true;\n }", "public function openGenerator(): GeneratorInterface;", "public function register(){}", "public function register(){}" ]
[ "0.69366807", "0.67495316", "0.6512565", "0.6241904", "0.6166724", "0.59154683", "0.58828175", "0.5803688", "0.5774416", "0.57526994", "0.5750764", "0.57246727", "0.57215774", "0.5654068", "0.56005615", "0.55955946", "0.55874133", "0.55758053", "0.5516125", "0.5496861", "0.5462199", "0.54484886", "0.5413138", "0.540861", "0.53902155", "0.53851974", "0.53841865", "0.53739", "0.53611565", "0.5357572", "0.5300988", "0.5297346", "0.52896166", "0.52824825", "0.52599525", "0.5239946", "0.52345705", "0.52336323", "0.5231563", "0.51870686", "0.517184", "0.5168797", "0.5156245", "0.5156245", "0.51431805", "0.5137015", "0.51340634", "0.5108026", "0.51032466", "0.5088645", "0.5080941", "0.5080844", "0.50774056", "0.50607926", "0.50578225", "0.5046154", "0.50361603", "0.50083995", "0.49970368", "0.49968532", "0.49879137", "0.49867845", "0.49805218", "0.49786982", "0.49786982", "0.49786982", "0.49786982", "0.49785724", "0.49774882", "0.49724692", "0.49639273", "0.49618116", "0.49610502", "0.49596775", "0.4954955", "0.49438936", "0.49436262", "0.49418005", "0.49292144", "0.4922275", "0.49079013", "0.49055937", "0.49029145", "0.48983967", "0.48937553", "0.48928478", "0.4891741", "0.48860496", "0.48804405", "0.48800337", "0.48768485", "0.48729095", "0.48707137", "0.48703694", "0.48696384", "0.48675543", "0.48641926", "0.4856378", "0.4853963", "0.4853963" ]
0.8209028
0
get the CPM rate based on a given weight (slot opportunities, video impressions, visit etc )
получить CPM-ставку на основе заданного веса (слотов, видео-импрессий, посещений и т.д.)
public function getCpmRate($weight);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getWeight();", "function getWeight();", "public function getWeight();", "public function getWeight();", "public function getWeight();", "public function getWeight();", "public function getWeight();", "private function calcWeight(){\n\t\t$this->capabilities['weight']=0;\n\t\tforeach($this->items as $item){\n\t\t\tif($item!==null){\n\t\t\t\t$this->capabilities['weight']+=$item->weight;\n\t\t\t}\n\t\t}\n\t}", "function getPrice($dest, $weight);", "public function getTotalWeight();", "public function getTotalWeight();", "public function total_weight();", "private function getFeeByWeight()\n {\n return $this->weight * $this->coefficients['weight'];\n }", "function getWeight(){return $this->weight;}", "public function calculatePriceRate( $rate, $weight )\n\t{\n\t\t$costs = ( float )$rate->base_price;\n\t\tif( ( float ) $rate->weight_step_size )\n\t\t\t$steps = ( $weight - ( float )$rate->weight_start ) / ( float )$rate->weight_step_size;\n\t\telse\n\t\t\t$steps = 0;\n\t\t\n\t\tif( ( ( float )$weight != ( float )$rate->weight_start ) && $steps < 1 ) // at least one step is done\n\t\t\t$steps = 1; \n\t\telse // we can advance only by full step\n\t\t{\n\t\t\tif( ( int )$steps != ( float )$steps )\n\t\t\t\t$steps = ( int )$steps + 1; // we always go for the upper step\n\t\t}\n\t\t$costs += $steps * ( float )$rate->price_step;\n\t\treturn $costs;\n\t}", "public function weight()\n {\n $basic_weight = app('App\\Weight\\Player\\BasicWeight', [$this->player_position->player])->weight();\n\n return $basic_weight + $this->positionSpecificWeight();\n }", "public function GetWeight() {\n\t\treturn 2;\n\t}", "public function getWeight()\n {\n return $this->weight;\n }", "public function get_weight($context = 'view')\n {\n }", "public function get_weight($context = 'view')\n {\n }", "public function getRate();", "public function getRate();", "function getDeliveryCost(array $shippingCosts, int $weight): int\n{\n $cost = 0;\n\n foreach ($shippingCosts as $key => $value) {\n if ($weight <= $key) {\n break;\n }\n $cost = $value;\n }\n\n return $cost;\n}", "public function getWeight()\n {\n return $this->weight;\n }", "public function getWeight()\n {\n return $this->weight;\n }", "public function getWeight()\n {\n return $this->weight;\n }", "public function getWeight()\n {\n return $this->weight;\n }", "public function cost() {\n\t\treturn $this->meta( 'wprm_cost', '' );\n\t}", "public function getWeight(): float\n {\n return $this->weight;\n }", "public function getWeight(): float\n {\n return $this->weight;\n }", "public function getWeight()\n {\n return $this->_fields['Weight']['FieldValue'];\n }", "public function weight();", "public function weight();", "public function weight(): int;", "public function get_current_weight()\n\t\t{\n\t\t$total_weight = 0.0;\n\t\tforeach ($this->character_items() as $inv_item)\n\t\t\t{\n\t\t\tif ($inv_item->quantity > 1)\n\t\t\t\t{\n\t\t\t\t$total_weight += $inv_item->item()->weight * $inv_item->quantity;\n\t\t\t\t}\n\t\t\telse\n\t\t\t\t{\n\t\t\t\t$total_weight += $inv_item->item()->weight;\n\t\t\t\t}\n\t\t\t}\n\n\t\tCache::put($this->characters_id . '_weight', $total_weight);\n\n\t\treturn $total_weight;\n\t\t}", "public function getWeight() {\n return $this->weight;\n }", "public function getWeight()\n\t{\n\t\treturn $this->weight;\n\t}", "public function getWeight()\r\n {\r\n return $this->weight . ' g';\r\n }", "public function getSummaryWeight(): float;", "function calcValues(){\n /**\n * ------WEIGHTS SCALE-------\n * --Defensive Rank per cat-- * --Players avg for cat-- = weight\n * \n * (1)-(-3.2) * pAvg = Players new value = weight +- pAvg\n * (2)-(-3.0)\n * (3)-(-2.8)\n * .\n * .\n * (15)-(-0.2)\n * (16)-(+0.2)\n * .\n * .\n * (30)-(+2.8)\n * (31)-(+3.0)\n * (32)-(+3.2)\n */\n \n $this->players\n \n }", "public function weight()\n\t{\n\t\treturn $this->weight;\n\t}", "public function getWeight()\n {\n\n return $this->weight;\n }", "public function getWeight()\n\t\t{\n\t\t\treturn $this->weight;\n\t\t}", "protected function weight(): float\n {\n return array_sum(array_map(function ($item) {\n return $item['weight'] * $item['quantity'];\n }, $this->items));\n }", "function wc_get_weight($weight, $to_unit, $from_unit = '')\n {\n }", "function totalweight(){\n\t\treturn $this->units * $this->weightPerUnit;\n\t}", "public function getVoteWeight();", "function getWeight()\n {\n return $this->weight;\n }", "public function getWeight(): int\n\t{\n\t\treturn (int) \\round($this->productWeight * 1000);\n\t}", "public function getRate(): float;", "public function weight()\n\t{\n\t\tif (is_numeric($this->product()->weight()))\n\t\t{\n \t\t\treturn $this->product()->weight($this);\n\t\t}\n\t\t\n\t\t$weight = 0;\n\t\t\n\t\tforeach ($this->sub_items() as $item)\n\t\t{\n\t\t\t$weight += $item->weight() * $item->quantity();\n\t\t}\n\t\t\n\t\treturn $weight;\n\t}", "public function getWeightUnit();", "public function calculateTheWeight($Activweight,$ActivId,$wigh){\n $allWeights=$this->findAllByMajoractivityId($ActivId);\n $total=0;\n foreach($allWeights as $weighta):\n $total=$total+$weighta['Subactivity']['weight'];\n endforeach;\n if(($total+$wigh)<=$Activweight) return true;\n else return false;\n }", "function getTotalWeight()\n\t \t{\t$total = 0 ;\n\t \t\tif (count($this->items) > 0) \n\t \t\t\t{\t \t\t \t\n\t\t\t \t\tfor ($p=0; $p<count($this->items); $p++) \n\t \t\t \t\t{\n\t \t\t \t\t\t$total = $total + $this->items[$p];\n\t \t\t \t\t}\n\t \t\t \t}\n\t \t\t return $total;\n\t \t}", "function getSubtotal($clientId, $destId, $sendby, $weight){\n\t\t\n\t\t$maxWeight = $this->getMaxWeight($clientId, $destId, $sendby);\n\t\t\n\t\t$maxWeightRate = explode('-', $maxWeight);\n\t\t\n\t\t// Check if the input weight is greater than \n\t\t// weight from DB\n\t\tif($maxWeightRate[0] < $weight){\n\t\t\t\t\t\t\n\t\t\t$remainingWeight = $weight - $maxWeightRate[0];\n\t\t\t\n\t\t\t// Get Branch Destination\n\t\t\t$getBranchDest=$this->ExecuteQuery(\"SELECT Destination_Id FROM tbl_branchs WHERE Branch_Id=\".$_SESSION['buser']);\n\t\t\t// Get Branch State\n\t\t\t$getBranchState = $this->ExecuteQuery(\"SELECT State_Id FROM tbl_destinations WHERE Destination_Id=\".$getBranchDest[1]['Destination_Id']);\t\t\n\t\t\t// Get User Input Destination State \n\t\t\t// To Compare with the Branch State\n\t\t\t$getInputState=$this->ExecuteQuery(\"SELECT State_Id FROM tbl_destinations WHERE Destination_Id=\".$destId);\n\t\t\t\n\t\t\t// check if the input destination id is \n\t\t\t// coming under the \"within state\n\t\t\tif($getBranchState[1]['State_Id'] == $getInputState[1]['State_Id']){\n\t\t\t\t\n\t\t\t\t// check if the input destination id is \n\t\t\t\t// coming under the \"within city\n\t\t\t\tif($getBranchDest[1]['Destination_Id'] == $destId){\n\t\t\t\t\t$res=$this->ExecuteQuery(\"SELECT Additional_Weight, Additional_Rate FROM tbl_rates WHERE Rate_Id=(SELECT Rate_Id FROM tbl_rates WHERE Client_Id=\".$clientId.\" AND Zone_Id=1 AND Send_By=\".$sendby.\")\");\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$res=$this->ExecuteQuery(\"SELECT Additional_Weight, Additional_Rate FROM tbl_rates WHERE Rate_Id=(SELECT Rate_Id FROM tbl_rates WHERE Client_Id=\".$clientId.\" AND Zone_Id=2 AND Send_By=\".$sendby.\")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$res=$this->ExecuteQuery(\"SELECT Additional_Weight, Additional_Rate FROM tbl_rates WHERE Rate_Id=(SELECT Rate_Id FROM tbl_rates WHERE Client_Id=\".$clientId.\" AND Zone_Id=(SELECT Zone_Id FROM tbl_states WHERE State_Id=(SELECT State_Id FROM tbl_destinations WHERE Destination_Id=\".$destId.\")) AND Send_By=\".$sendby.\")\");\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\n\t\t\tif($remainingWeight < $res[1]['Additional_Weight']){\n\t\t\t\t$toatlAdditionalAmt = $res[1]['Additional_Rate'];\n\t\t\t\t$totalAmt = $maxWeightRate[1] + $toatlAdditionalAmt;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\n\t\t\t\t$totalAdditionalWeight = $remainingWeight / $res[1]['Additional_Weight'];\n\t\t\t\t$totalWeight = ceil($totalAdditionalWeight);\n\t\t\t\t//$totalAdditionalWeight = ceil($remainingWeight);\t\t\t\t\n\t\t\t\t$toatlAdditionalAmt = $res[1]['Additional_Rate'] * $totalWeight;\t\t\t\n\t\t\t\t$totalAmt = $maxWeightRate[1] + $toatlAdditionalAmt;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\techo sprintf(\"%0.2f\",$totalAmt);\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\t\n\t\t\t// Get Branch Destination\n\t\t\t$getBranchDest=$this->ExecuteQuery(\"SELECT Destination_Id FROM tbl_branchs WHERE Branch_Id=\".$_SESSION['buser']);\n\t\t\t// Get Branch State\n\t\t\t$getBranchState = $this->ExecuteQuery(\"SELECT State_Id FROM tbl_destinations WHERE Destination_Id=\".$getBranchDest[1]['Destination_Id']);\t\t\n\t\t\t// Get User Input Destination State \n\t\t\t// To Compare with the Branch State\n\t\t\t$getInputState=$this->ExecuteQuery(\"SELECT State_Id FROM tbl_destinations WHERE Destination_Id=\".$destId);\n\t\t\t\n\t\t\t// check if the input destination id is \n\t\t\t// coming under the \"within state\n\t\t\tif($getBranchState[1]['State_Id'] == $getInputState[1]['State_Id']){\n\t\t\t\t\n\t\t\t\t// check if the input destination id is \n\t\t\t\t// coming under the \"within city\n\t\t\t\tif($getBranchDest[1]['Destination_Id'] == $destId){\n\t\t\t\t\t$res=$this->ExecuteQuery(\"SELECT Amount FROM tbl_weight_rate_relation WHERE Weight_From <= \".$weight.\" AND Weight_To >= \".$weight.\" AND Rate_Id=(SELECT Rate_Id FROM tbl_rates WHERE Client_Id=\".$clientId.\" AND Zone_Id=1 AND Send_By=\".$sendby.\")\");\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$res=$this->ExecuteQuery(\"SELECT Amount FROM tbl_weight_rate_relation WHERE Weight_From <= \".$weight.\" AND Weight_To >= \".$weight.\" AND Rate_Id=(SELECT Rate_Id FROM tbl_rates WHERE Client_Id=\".$clientId.\" AND Zone_Id=2 AND Send_By=\".$sendby.\")\");\n\t\t\t\t}\n\t\t\t}//eof if condition\n\t\t\telse{\n\t\t\t\t$res=$this->ExecuteQuery(\"SELECT Amount FROM tbl_weight_rate_relation WHERE Weight_From <= \".$weight.\" AND Weight_To >= \".$weight.\" AND Rate_Id=(SELECT Rate_Id FROM tbl_rates WHERE Client_Id=\".$clientId.\" AND Zone_Id=(SELECT Zone_Id FROM tbl_states WHERE State_Id=(SELECT State_Id FROM tbl_destinations WHERE Destination_Id=\".$destId.\")) AND Send_By=\".$sendby.\")\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif(count($res)!=0){\n\t\t\t\techo $res[1]['Amount'];\n\t\t\t}\n\t\t\telse{\n\t\t\t\techo 0;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "public function positionSpecificWeight()\n {\n return array_reduce($this->getWeightClasses(), function ($carry, $class) {\n $carry += app(\"App\\Weight\\Player\\\\{$this->player_position->position}\\\\$class\", [$this->player_position])->weight();\n\n return $carry;\n });\n }", "public function setTotalWeight($weight);", "protected function createWeightDriver()\n {\n return $this->weight();\n }", "public function getWeight($place='all')\r\n {\r\n $weight = 0;\r\n\r\n if ($place == 'all' || $place == 'equipment')\r\n {\r\n foreach ($this->getEquipment() as $item)\r\n {\r\n $weight += intval($item->weight) * intval($item->amount);\r\n }\r\n }\r\n\r\n if ($place == 'all' || $place == 'inventory')\r\n {\r\n foreach ($this->getInventory() as $item)\r\n {\r\n $weight += intval($item->weight) * intval($item->amount);\r\n }\r\n }\r\n\r\n return $weight;\r\n }", "public function getWeight()\n {\n return $this->getTypeInstance(true)->getWeight($this);\n }", "public function weight()\n {\n return $this->buildUnit('weight', Measures\\Weight::class);\n }", "public function getCost()\r\n {\r\n if ($this->cost < 0) {\r\n return $this->cost / 11 * 10; // add GST\r\n } else {\r\n return $this->cost;\r\n }\r\n }", "public function weight($weight) : self\n {\n // detect decimal vs big integer for vote weight.\n if (abs($weight) > 0 && abs($weight) <= 1) {\n $realWeight = $weight * 10000;\n } else {\n $realWeight = $weight;\n }\n\n return $this->setParameter('weight', $realWeight);\n }", "function getWeightGoals()\n {\n return $this->weightGoals;\n }", "public function getCasePrice()\n {\n if($location = $this->itemLocation){\n $po_items = $this->getPurchaseOrderItems()->lastActual($location->on_hand)->all();\n $quantity=0;\n $prices=0;\n foreach ($po_items as $po_item) {\n if($location->on_hand > $quantity+$po_item->quantity){\n $quantity+=$po_item->quantity;\n $prices+=$po_item->quantity*$po_item->act_cost;\n }else{\n $remain = $location->on_hand - $quantity;\n $quantity+=$remain;\n $prices+=$remain*$po_item->act_cost;\n }\n }\n if($quantity!=0)\n return $prices/$quantity;\n }\n }", "public function weight() {\n return 0;\n }", "public function getWeight( $index );", "function reg_hire_cal($van_weight){\n\tif($van_weight <= 3500){$reg_hire_fee = 4600;}\n\telse if($van_weight <= 7500){$reg_hire_fee = 13800;}\n\telse if($van_weight <= 12500){$reg_hire_fee = 17250;}\n\telse if($van_weight > 12500){$reg_hire_fee = 23000;}\n\telse{$reg_hire_fee = \"\";}\n\t\n\treturn $reg_hire_fee;\n}", "function ait_cal($van_weight){\n\tif($van_weight <= 1500){$ait_fee = 3000;}\n\telse if($van_weight <= 5000){$ait_fee = 7500;}\n\telse if($van_weight > 5000){$ait_fee = 12500;}\n\telse{$ait_fee = \"\";}\n\t\n\treturn $ait_fee;\n}", "function totalWeight()\n {\n return $this->units * $this->weightPerUnit;\n }", "public function setWeight($weight);", "public function setWeight($weight);", "public function get_current_weight_comp()\n {\n $sql = \"SELECT sum(weigh_in_weight) as current_weight\n FROM weighins\n WHERE weigh_in_week='\".$this->current_week.\"';\";\n $result = $this->process_query($sql);\n if($result)\n {\n $row = mysqli_fetch_assoc($result);\n\n return $this->current_weight_comp = $row['current_weight'];\n\n }\n }", "public function calculateCost($cartWeight,$country)\n {\n $cartWeight = $this->roundUp($cartWeight);\n $shippingCost = $this->calculateShippingCost($country,$cartWeight);\n $deliveryCost = $this->calculateDeliveryCost($shippingCost);\n return $deliveryCost;\n }", "public function getWeightFlow()\n {\n $alg = new AlgorithmWeight($this->createGraph());\n return $alg->getWeightFlow();\n }", "public function weight($weight)\n {\n return $this->setProperty('weight', $weight);\n }", "public function getWeight()\n {\n return $this->attributes->mustHave('weight')->asInteger();\n }", "private static function calChargeWeight($actualWeight, $boxHeight, $boxWidth, $boxLenght, $dimensionUnitId, $weightUnitId)\n {\n $chargeWeight = 0;\n $weightBox = 0;\n $factorDimension = 1;\n $factorWeight = 1;\n $dimensionUnitData = UnitService::getUnitDemensionById($dimensionUnitId);\n $weightUnitData = UnitService::getUnitWeightById($weightUnitId);\n\n // Quy doi neu la Met\n if (!empty($dimensionUnitData)) {\n $factorDimension = $dimensionUnitData->Ratio;\n }\n\n // Quy doi neu la Kg\n if (!empty($weightUnitData)) {\n $factorWeight = $weightUnitData->Ratio;\n }\n\n // Khoi luong hop\n $weightBox = round(($boxHeight * $boxWidth * $boxLenght * $factorDimension) / 5, 0);\n\n // Khoi luong thuc\n $actualWeight = $actualWeight * $factorWeight;\n\n if ($weightBox > $actualWeight) {\n $chargeWeight = $weightBox;\n } else {\n $chargeWeight = $actualWeight;\n }\n\n if ($chargeWeight) {\n $chargeWeight = 1.1 * $chargeWeight;\n if ($chargeWeight % 500 != 0) {\n $chargeWeight = (int)($chargeWeight / 500);\n $chargeWeight = (1 + $chargeWeight) * 500;\n }\n }\n\n return $chargeWeight;\n }", "function get_weight($pass){\n $weight = 0;\n $capital_letter = preg_match_all('/[A-Z]/', $pass);\n $small_letter = preg_match_all('/[a-z]/', $pass);\n $numeric = preg_match_all('/[0-9]/', $pass);\n $speicial_char = preg_match_all('/[!@#$%^&*()]/', $pass);\n\n // return $small_letter;\n $valid_size = false;\n $weights = $this->glob['weights'];\n $configs = $this->glob['configs'];\n $messages = $this->glob['messages'];\n // checking if capital letter here & validation size proper or not\n if ($capital_letter && ($valid_size = $this->check_size($configs['CAPITAL_LETTER'], $capital_letter))) {\n $weight += $weights['CAPITAL_LETTER'];\n } \n \n // checking if small letter here & validation size proper or not\n \n if ($small_letter) {\n $weight += $weights['SMALL_LETTER'];\n // return Gweights;\n } \n \n\n // checking if numeric value here & validation size proper or not\n if ($numeric && ($valid_size = $this->check_size($configs ['NUMERIC'], $numeric))) {\n $weight += $weights['NUMERIC'];\n } \n\n // checking if special letter here & validation size proper or not\n if ($speicial_char && ($valid_size = $this->check_size($configs['SPECIAL_CHAR'], $speicial_char))) {\n $weight += $weights['SPECIAL_CHAR'];\n } \n\n return $weight; // returing weight after calculate\n\n }", "public static function choosePersonality($weight=NULL) \n\t{\n\t\t$local = false;\n\t\tif (!isset($_POST['weight']) || !is_numeric($_POST['weight'])) \n\t\t{\n\t\t\tif (!$weight) {\n\t\t\t\tdie();\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$_POST['weight'] = $weight;\n\t\t\t\t$local = true;\n\t\t\t}\n\t\t}\n\n\t\t// Debug mode : generate virtual lag\n\t\t// sleep(2);\n\t\t\n\t\t// Fetch player answer / question\n\t\t$weight \t\t= intval($_POST['weight']);\n\t\t$appreciation \t= new WPVQAppreciation();\n\t\t$appreciation\t= $appreciation->load($weight);\n\n\t\t$result = array(\n\t\t\t'label' \t=> $appreciation->getLabel(), // string\n\t\t\t'content' \t=> do_shortcode(htmlspecialchars_decode(stripslashes($appreciation->getContent()))), // can be '' or HTML\n\t\t);\n\n\t\tif ($local) {\n\t\t\treturn json_encode($result);\n\t\t} else {\n\t\t\tprint json_encode($result); die();\n\t\t}\n\t}", "public function getPackageWeightLb($request)\n {\n $weight = 0;\n $defaultWeightUnit = $this->scopeConfig->getValue('catalog/measure_units/weight');\n $weightUnit = $this->scopeConfig->getValue('carriers/canpar/default_weight_unit');\n\n foreach ($request->getAllItems() as $item) {\n $qty = ($item->getQty() * 1);\n $product = $this->productLoader->create()->load($item->getProductId());\n $weight += $this->chUnitHelper->getConvertedWeight(($qty * $product->getWeight()), $defaultWeightUnit, strtolower($weightUnit));\n }\n return $weight;\n }", "public function getWeightCondition()\n {\n $weight = 0;\n\n foreach ($this->getItemsCondition() as $item) {\n $weight += $item->getWeight();\n }\n\n return $weight;\n }", "public function getProductWeight()\n\t{\n\t\treturn $this->product_weight;\n\t}", "public function calculate_bmi($weight, $height) {\n // splits height var value\n $splitted = str_split($height);\n\n // check if it has been splitted in 3 values\n if (count($splitted) == 3) {\n // put all 3 values inside height var in a format of 1.11\n $height = \"{$splitted[0]}.{$splitted[1]}{$splitted[2]}\";\n // return the formula of bmi calculator\n return $weight / ($height * $height);\n }\n }", "function bmi($weight, $height){\n if($height == 0)\n return \"Height cannot be 0\";\n \n #conversion factors\n $weight = $weight * 0.45;\n $height = $height * 0.025;\n \n #calculates bmi\n $bmi = $weight/($height*$height);\n \n #checks status\n $status = \"\";\n if($bmi <=25 || $bmi >=19)\n $status = \"healthy\";\n else \n $status = \"unhealthy\";\n \n #returns array\n return array(\"w\"=>$weight, \"h\"=>$height, \"bmi\"=>$bmi, \"status\"=>$status);\n }", "function getCost($origin, $destination, $weight, $courier = null) {\n $response = CJSON::decode($this->rest->post('api/cost', [\n 'origin' => $origin,\n 'destination' => $destination,\n 'weight' => $weight,\n 'courier' => $courier,\n ]));\n return isset($response['rajaongkir']['results']) ? $response['rajaongkir']['results'] : null;\n }", "public function getTotalWeight()\n {\n return $this->_fields['TotalWeight']['FieldValue'];\n }", "private function changeRate() {\n //Will be zero after the concert date\n if ($this->sellIn <= 0) {\n return -$this->quality;\n }\n\n //Increases in even higher hate 5 days before\n if ($this->sellIn <= 5) {\n return 3;\n }\n\n //Increases in a higher rate 10 days before\n if ($this->sellIn <= 10) {\n return 2;\n }\n\n //Increases in normal rate way longer\n if ($this->sellIn > 10) {\n return 1;\n }\n }", "public function getRate(): string;", "function fn_sdek_check_weight($weight, $symbol_grams)\n{\n if (empty($weight) || $weight == 0) {\n $weight = (100 / $symbol_grams);\n }\n\n return $weight;\n}", "public function getRateValue(): float;", "function calcualteBMI($weight, $height){\n $message = \"\";\n $heightMeter = $height/100;\n $bmi = $weight/($heightMeter * $heightMeter);\n if($bmi < 18.5){\n $message = \"Underweight\";\n }elseif($bmi >= 18.5 && $bmi <= 24.9){\n $message = \"Normal weight\";\n }elseif($bmi >= 25 && $bmi <= 29.9){\n $message = \"Overweight\";\n }else {\n $message = \"Obesity\";\n }\n\n return $message;\n }", "public function calculateProductShippingFeeBasedOnWeight(){\n\t\t$flat_rate = __FLAT_RATE__;\n\t\t$total_prices_of_products = $this->getTotalPricesOfProducts();\n\t\t$charged_over_weight = $this->chargeOverWeightForEachProduct($flat_rate);\n\t\t\n\t\t// Secion A Condition #1 : If at least one product weight more than 1KG, despite above conditions, \n\t\t// 10% of \"Flat Rate\" amount will be charged per additional KG per product.\n\t\tif($charged_over_weight > 0)\n\t\t\treturn ($flat_rate + $charged_over_weight);\n\t\t\n\t\t// Section A Condition #2 : If the Cart value (total value of products) > $100, the shipping fee is free.\n\t\tif($total_prices_of_products > 100)\n\t\t\treturn 0;\n\t\t// Section A Condition : If Condition #1 & #2 is invalid, shipping fee is Flat Rate = $5.\n\t\treturn $flat_rate;\n\t}", "public function getCost()\n {\n return $this->beverage->getCost() + 2;\n }", "public function cost(Lesson $lesson)\n {\n return $lesson->getDuration() * 10;\n }", "protected function _getCorrectWeight($weight)\r\n {\r\n $minWeight = $this->getConfigData('min_package_weight');\r\n\r\n if($weight < $minWeight){\r\n $weight = $minWeight;\r\n }\r\n\r\n //rounds a number to one significant figure\r\n $weight = ceil($weight*10) / 10;\r\n\r\n return $weight;\r\n }", "public function calculateShipping($parcel)\n {\n $rate = 1.78;\n\n // calculate the courier_list\n $rate = $this->getShippingRateForCountry($parcel->destinationCountry);\n // calculate the cost\n $cost = $rate * $parcel->weight;\n return $cost;\n }", "public function getClassWeight()\n {\n // if(!Config::FLAG_WEIGHT_CLASSES) return 0;\n\n $weight = 0;\n\n // Look for a special classname\n $class = $this->getAttribute('class');\n if (trim($class)) {\n if (preg_match($this->regexps['negative'], $class)) {\n $weight -= 25;\n }\n\n if (preg_match($this->regexps['positive'], $class)) {\n $weight += 25;\n }\n }\n\n // Look for a special ID\n $id = $this->getAttribute('class');\n if (trim($id)) {\n if (preg_match($this->regexps['negative'], $id)) {\n $weight -= 25;\n }\n\n if (preg_match($this->regexps['positive'], $id)) {\n $weight += 25;\n }\n }\n\n return $weight;\n }", "public function getCommissionRateBySeller()\n\t{\n\t\treturn Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT `commision` FROM `'._DB_PREFIX_.'marketplace_commision`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE customer_id = '.(int)$this->customer_id);\n\t}", "public function bpm() {\n\t\treturn $this->Activity->hrAvg();\n\t}" ]
[ "0.68054897", "0.68054897", "0.66291976", "0.66291976", "0.66291976", "0.66291976", "0.66291976", "0.64252865", "0.6367888", "0.6319499", "0.6319499", "0.6311364", "0.6210783", "0.61546206", "0.6113652", "0.6091359", "0.6053426", "0.6052567", "0.60433406", "0.6042105", "0.60379326", "0.60379326", "0.6027375", "0.60247433", "0.60247433", "0.60247433", "0.60247433", "0.6021477", "0.6010222", "0.6010222", "0.6001795", "0.5991515", "0.5991515", "0.5982963", "0.59660196", "0.5965701", "0.59571487", "0.594462", "0.59319186", "0.59308386", "0.5925517", "0.5921183", "0.5907208", "0.5907098", "0.5886764", "0.58824754", "0.5881933", "0.58577377", "0.58398783", "0.5830365", "0.58016413", "0.5790738", "0.575899", "0.5741748", "0.56786174", "0.56583524", "0.5658157", "0.56503564", "0.564762", "0.56388885", "0.56235725", "0.5613675", "0.5612177", "0.5611292", "0.5607542", "0.56042933", "0.5593125", "0.55725867", "0.5548452", "0.5548173", "0.5543147", "0.5543147", "0.5511063", "0.54854786", "0.5482669", "0.547547", "0.54749125", "0.54695433", "0.5446069", "0.54449314", "0.543299", "0.54329276", "0.5429619", "0.54222924", "0.54221755", "0.54185444", "0.5410456", "0.5396867", "0.53960615", "0.53890073", "0.5368874", "0.5368391", "0.53576374", "0.5350793", "0.5347755", "0.5345572", "0.5340101", "0.5339954", "0.5334065", "0.53300214" ]
0.8478493
0
Get the required redirect method (either GET or POST).
Получите необходимый метод перенаправления (GET или POST).
public function getRedirectMethod(): string { return 'GET'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRedirectMethod() {\n return 'GET';\n }", "public function getRedirectMethod()\n {\n return 'GET';\n }", "public function getRedirectMethod()\n {\n return 'GET';\n }", "public function getRedirectMethod()\n {\n return 'GET';\n }", "public function getRedirectMethod()\n {\n return 'GET';\n }", "public function getRedirectMethod()\n {\n return 'GET';\n }", "public function getRedirectMethod()\n {\n return 'POST';\n }", "function getRedirectMethod()\n {\n if (!empty($this->response->redirect_method)) {\n return $this->response->redirect_method;\n }\n\n return \"\";\n }", "abstract public function getRedirectMethod();", "public function getRedirectMethod()\n {\n // TODO: Implement getRedirectMethod() method.\n }", "public function getRedirectMethod()\n {\n return null;\n }", "public function getMethod()\n {\n return $_SERVER['REQUEST_METHOD'] ?? self::GET;\n }", "public function getMethod() {\n return $this->serverVars['REQUEST_METHOD'] ?? 'GET';\n }", "public function getRedirectType();", "public static function method() {\n $method = static::server('REQUEST_METHOD', 'GET');\n\n return ($method !== 'GET' ? static::get('POST', '_method', 'POST') : 'GET');\n }", "private static function method(): string\n {\n return $_SERVER['REQUEST_METHOD'] ?? 'GET';\n }", "private function getRequestMethod() {\n $requestMethod = strtolower($_SERVER['REQUEST_METHOD']);\n if($requestMethod == 'post' && isset($_POST['_method'])) {\n $postMethod = strtolower($_POST['_method']);\n return ($postMethod == 'put' || $postMethod == 'delete') ? $_POST['_method'] : 'GET';\n } elseif($requestMethod == 'post') {\n return 'POST';\n } else {\n return 'GET';\n // return $_SERVER['REQUEST_METHOD'];\n }\n }", "public function getMethod()\n {\n return $this->server->get('REQUEST_METHOD', 'GET');\n }", "public function getMethod()\n {\n return $this->server->get('REQUEST_METHOD', 'GET');\n }", "public static function getMethod() {\r\n self::$method = $_SERVER[\"REQUEST_METHOD\"]; //Esta linea obtiene el tipo de metodo de envio (GET, POST, PUT, REQUEST)\r\n return self::$method;\r\n }", "public static function requestMethod()\n {\n return isset($_SERVER['REQUEST_METHOD']) ? strtolower($_SERVER['REQUEST_METHOD']) : 'get';\n }", "protected function determineMethod()\n\t{\n\t\t$method = 'GET';\n\n\t\tif(isset($this->server['REQUEST_METHOD']))\n\t\t{\n\t\t\t$method = strtoupper($this->server['REQUEST_METHOD']);\n\t\t}\n\n\t\tif($method === 'POST')\n\t\t{\n\t\t\tif(isset($this->post['REQUEST_METHOD_OVERRIDE']))\n\t\t\t{\n\t\t\t\t$method = $this->post['REQUEST_METHOD_OVERRIDE'];\n\t\t\t}\n\t\t\telseif(isset($this->server['HTTP_X_HTTP_METHOD_OVERRIDE']))\n\t\t\t{\n\t\t\t\t$method = $this->server['HTTP_X_HTTP_METHOD_OVERRIDE'];\n\t\t\t}\n\t\t}\n\n\t\treturn strtoupper($method);\n\t}", "public function getMethod(): string { return $_SERVER['REQUEST_METHOD']; }", "private function getMethod() {\n\t\t\treturn $_SERVER['REQUEST_METHOD'];\n\t\t}", "public static function method()\n\t{\n\t\treturn (static::spoofed()) ? $_POST['REQUEST_METHOD'] : $_SERVER['REQUEST_METHOD'];\n\t}", "private function getRequestMethod()\r\n {\r\n return $_SERVER['REQUEST_METHOD'];\r\n }", "public static function getMethod()\n {\n return $_SERVER['REQUEST_METHOD'];\n }", "public function method() {\n return $this->get('REQUEST_METHOD');\n }", "public static function method()\n\t{\n\t\treturn (static::spoofed()) ? $_POST[Request::spoofer] : $_SERVER['REQUEST_METHOD'];\n\t}", "public function getMethod()\r\n {\r\n if (isset($_POST[$this->methodParam])) {\r\n return strtoupper($_POST[$this->methodParam]);\r\n }\r\n\r\n if (isset($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'])) {\r\n return strtoupper($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']);\r\n }\r\n\r\n if (isset($_SERVER['REQUEST_METHOD'])) {\r\n return strtoupper($_SERVER['REQUEST_METHOD']);\r\n }\r\n\r\n return 'GET';\r\n }", "public static function getHttpMethod() {\n $back = false;\n\n if (isset($_SERVER['REQUEST_METHOD']))\n $back = $_SERVER['REQUEST_METHOD'];\n\n return $back;\n }", "public function method(){\n\t\treturn $_SERVER['REQUEST_METHOD'];\n\t}", "public function getMethod() {\n\t\t\treturn $this->input->server('REQUEST_METHOD');\n\t}", "public function getMethod()\n {\n if (isset($_POST[$this->methodParam])) {\n return strtoupper($_POST[$this->methodParam]);\n }\n\n if (isset($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'])) {\n return strtoupper($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']);\n }\n\n if (isset($_SERVER['REQUEST_METHOD'])) {\n return strtoupper($_SERVER['REQUEST_METHOD']);\n }\n\n return 'GET';\n }", "public function getRequestType()\n\t{\n\t\tif(isset($_POST['_method']))\n\t\t\treturn strtoupper($_POST['_method']);\n\t\telseif(isset($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']))\n\t\t\treturn strtoupper($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']);\n\n\t\treturn strtoupper(isset($_SERVER['REQUEST_METHOD'])?$_SERVER['REQUEST_METHOD']:'GET');\n\t}", "public function getHTTPMethod();", "public static function getMethod()\n {\n return $_SERVER['REQUEST_METHOD'];\n }", "public function getMethod() : string {\n if (isset($_POST[$this->methodParam])) {\n return strtoupper($_POST[$this->methodParam]);\n }\n\n if (isset($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'])) {\n return strtoupper($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']);\n }\n\n if (isset($_SERVER['REQUEST_METHOD'])) {\n return strtoupper($_SERVER['REQUEST_METHOD']);\n }\n\n return 'GET';\n }", "public function getRequestMethod()\n {\n if (isset($this->serverParameters['REQUEST_METHOD'])) {\n return $this->serverParameters['REQUEST_METHOD'];\n }\n return 'GET';\n }", "public function getRequestMethod(){\n return $_SERVER['REQUEST_METHOD'];\n }", "function getRequestMethod() {\n\t\tPKPRequest::_checkThis();\n\n\t\t$requestMethod = (isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : '');\n\t\treturn $requestMethod;\n\t}", "public function getRequestMethod() {\n\t\treturn (isset($this->SERVER['REQUEST_METHOD'])) ? $this->SERVER['REQUEST_METHOD'] : NULL;\n\t}", "public function getMethod()\n {\n return !empty($this->method) ? $this->method : 'GET';\n }", "public function getMethod() {\n\n return $this->_SERVER['REQUEST_METHOD'];\n\n }", "public function getMethod()\n\t{\n\t\t$method = $this->getServer('REQUEST_METHOD');\n\t\tif ($this->_isRestAccess == true) {\n\t\t\t$m = null;\n\t\t\tif ($method == 'POST' && isset($_POST['_method'])) {\n\t\t\t\t$m = strtoupper($_POST['_method']);\n\t\t\t} else if ($method == 'GET' && isset($_GET['_method'])) {\n\t\t\t\t$m = strtoupper($_GET['_method']);\n\t\t\t}\n\t\t\tif ($m == 'PUT' || $m == 'DELETE' || $m == 'POST' || $m == 'GET') {\n\t\t\t\t$method = $m;\n\t\t\t}\n\t\t}\n\t\treturn $method;\n\t}", "function requestMethod() {\n\t\treturn $this->server ['REQUEST_METHOD'];\n\t}", "function getMethod() {\n $method = $_SERVER['REQUEST_METHOD'];\n return $method;\n }", "public function getMethod()\n {\n return $_SERVER['REQUEST_METHOD'];\n }", "public function getMethod()\n {\n return $_SERVER['REQUEST_METHOD'];\n }", "public function getMethod()\n {\n if (isset($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'])) {\n return strtoupper($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']);\n } else {\n return isset($_SERVER['REQUEST_METHOD']) ? strtoupper($_SERVER['REQUEST_METHOD']) : 'GET';\n }\n }", "static public function getRequestMethod()\n {\n $request_method = $_SERVER['REQUEST_METHOD'];\n return $request_method;\n }", "public function getMethod()\n {\n return $this->getServerVariable('REQUEST_METHOD');\n }", "function method() {\n return strtolower($this->server['REQUEST_METHOD']);\n }", "public static function method_get() {\n\t\t$method = 'GET';\n\t\t$method_check = $method;\n\t\tif (php_sapi_name()=='cli') {\n\t\t\tif (isset($_SERVER['argv'])&&count($_SERVER['argv'])>1) {\n\t\t\t\t$method_check = $_SERVER['argv'][1];\n\t\t\t}\n\t\t} else {\n\t\t\tif (isset($_SERVER['REQUEST_METHOD'])) {\n\t\t\t\t$method_check = $_SERVER['REQUEST_METHOD'];\n\t\t\t}\n\t\t}\n\t\tswitch (strtoupper($method_check)) {\n\t\t\tcase 'GET': $method = 'GET'; break;\n\t\t\tcase 'HEAD': $method = 'HEAD'; break;\n\t\t\tcase 'POST': $method = 'POST'; break;\n\t\t\tcase 'PUT': $method = 'PUT'; break;\n\t\t\tcase 'DELETE': $method = 'DELETE'; break;\n\t\t\tcase 'CONNECT': $method = 'CONNECT'; break;\n\t\t\tcase 'OPTIONS': $method = 'OPTIONS'; break;\n\t\t\tcase 'TRACE': $method = 'TRACE'; break;\n\t\t\tcase 'PATH': $method = 'PATH'; break;\n\t\t\tdefault: $method = 'GET'; break;\n\t\t}\n\t\treturn $method;\n\t}", "public function getHTTPVerb();", "public function getRequestMethod()\r\n\t\t{\r\n\t\t\treturn $_SERVER['REQUEST_METHOD'];\r\n\t\t}", "public function getMethod(){\n return strtolower($_SERVER['REQUEST_METHOD']);\n }", "public function get_http_method() {\n return $this->http_method;\n }", "static public function getHttpVerb() {\n return $_SERVER['REQUEST_METHOD'];\n }", "private function getRequestMethod() {\n return $this->requestMethod;\n }", "public static function getRealMethod(): string\n {\n return strtoupper(server('REQUEST_METHOD', 'GET'));\n }", "public static function getRealMethod(): string\n {\n return strtoupper(server('REQUEST_METHOD', 'GET'));\n }", "public function getMethod()\n {\n if ($this->content !== null) {\n return 'POST';\n } else {\n return 'GET';\n }\n }", "public function getMethod()\n {\n if (isset($_SERVER['HTTP_X-Http-Method-Override'])) {\n return strtoupper($_SERVER['HTTP_X-Http-Method-Override']);\n }\n if (isset($_SERVER['REQUEST_METHOD'])) {\n return strtoupper($_SERVER['REQUEST_METHOD']);\n }\n return 'GET';\n }", "public function getMethod()\n {\n if ($this->method === null) {\n return 'GET';\n }\n\n return $this->method;\n }", "public static function requestMethod ()\n {\n self::$method = $_SERVER[ 'REQUEST_METHOD' ];\n return self::$method;\n }", "public function getMethod()\n {\n return $this->server('REQUEST_METHOD');\n }", "public function getReqMethod()\n {\n $method = @$_SERVER['REQUEST_METHOD'];\n\n if (!empty($method)) {\n return $method;\n }\n\n return self::SLW_NOOP;\n }", "public function getMethod() {\n return $this->cenv['REQUEST_METHOD'];\n }", "public function getRequestType()\n\t{\n\t\tif (isset($_REQUEST['_method']))\n\t\t{\n\t\t\treturn strtoupper($_REQUEST['_method']);\n\t\t}\n\n\t\treturn strtoupper(isset($_SERVER['REQUEST_METHOD'])?$_SERVER['REQUEST_METHOD']:'GET');\n\t}", "private function getRequestMethod()\n {\n // Take the method as found in $_SERVER\n $method = $_SERVER['REQUEST_METHOD'];\n\n // If it's a HEAD request override it to being GET and prevent any output, as per HTTP Specification\n // @url http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.4\n if ($_SERVER['REQUEST_METHOD'] == 'HEAD') {\n ob_start();\n $method = 'GET';\n }\n\n // If it's a POST request, check for a method override header\n elseif ($_SERVER['REQUEST_METHOD'] == 'POST') {\n $headers = $this->getRequestHeaders();\n if (isset($headers['X-HTTP-Method-Override']) && in_array($headers['X-HTTP-Method-Override'], ['PUT', 'DELETE', 'PATCH'])) {\n $method = $headers['X-HTTP-Method-Override'];\n }\n }\n\n return $method;\n }", "public function getMethod()\n {\n return $this->getServer('REQUEST_METHOD');\n }", "public static function getRequestMethod()\n\t{\n\t\treturn strtoupper((isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : ''));\n\t}", "public function getMethod()\n {\n if (isset($this->method)) {\n $this->realMethod = $this->method;\n }\n\n if (isset($this->method) && ($this->method == 'GET' || $this->method == 'POST')) {\n return $this->method;\n }\n\n return $this->getFieldDefaultValue('method');\n }", "protected function method() {\n\t\treturn strtolower( $_SERVER['REQUEST_METHOD'] );\n\t}", "public function getRequestMethod()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n\n if ($_SERVER['REQUEST_METHOD'] === 'HEAD') {\n ob_start();\n $method = 'GET';\n }\n elseif ($_SERVER['REQUEST_METHOD'] === 'POST') {\n $headers = $this->getRequestHeaders();\n if (isset($headers['X-HTTP-Method-Override']) && in_array($headers['X-HTTP-Method-Override'], ['PUT', 'DELETE', 'PATCH'])) {\n $method = $headers['X-HTTP-Method-Override'];\n }\n }\n\n return $method;\n }", "public function getRequestMethodFromServer()\n {\n return static::getServerParameter('REQUEST_METHOD');\n }", "public static function getRequestMethod()\n {\n $whitelist = ['PUT', 'DELETE', 'HEAD', 'PATCH', 'OPTIONS'];\n\n $_method = null;\n $requestMethod = (isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : null);\n\n // method overrides.\n if (isset($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'])) {\n $_method = strtoupper( $_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'] );\n } elseif (isset($_POST['_method'])) {\n $_method = strtoupper( $_POST['_method'] );\n } elseif (isset($_GET['_method'])) {\n $_method = strtoupper( $_GET['_method'] );\n }\n\n if (isset($_method) && in_array($_method, $whitelist)) {\n $requestMethod = $_method;\n }\n\n return $requestMethod;\n }", "public function getMethod() {\n $method = $_SERVER['REQUEST_METHOD'];\n return $method;\n }", "protected function getMethod()\n {\n return strtolower($_SERVER['REQUEST_METHOD']);\n }", "protected function getMethod() {\n\t\treturn $this->request->getMethod();\n\t}", "public function getMethod()\n {\n if (null === $this->method) {\n $this->method = strtoupper((string) $this->server->get('REQUEST_METHOD', 'GET'));\n\n if ('POST' === $this->method) {\n $method = $this->request->get('_method', $this->query->get('_method', 'POST'));\n $method = $this->headers->get('X-Http-Method-Override', $method);\n $this->method = strtoupper((string) $method);\n }\n }\n\n return $this->method;\n }", "public function getMethod()\n {\n $method = strtolower($_SERVER['REQUEST_METHOD']);\n\n return $method;\n }", "public function getRequestMethod() {\n return @$this->attributes['request_method'];\n }", "private function getMethod()\n\t{\n\t\t// if is not set show login page \n\t\tif (isset($this->request->url_parts[1])) {\n\t\t\t$method = $this->request->url_parts[1];\n\t\t\tif (!method_exists($this->controller, $method)) {\n\t\t\t\t$this->show404();\n\t\t\t}else if(!in_array($method, $this->allowed_routes)){\n\t\t\t\t$this->show404();\n\t\t\t}else{\n\t\t\t\t// unset($this->request->url_parts[1]);\n\t\t\t\t$this->method = $method;\n\t\t\t}\n\t\t}else{\n\t\t\t$this->method = 'login';\n\t\t}\n\t}", "protected function _detect_method()\n {\n $method = NULL;\n $method = $this->input->post('_method');\n if ($method === NULL)\n {\n $method = $this->input->server('HTTP_X_HTTP_METHOD_OVERRIDE');\n }\n $method = strtolower($method);\n if (empty($method))\n {\n // Get the request method as a lowercase string\n $method = $this->input->method();\n }\n echo $method;\n // return strtolower($method);\n }", "public function getRedirect();", "public function method() {\n return strtolower( $_SERVER['REQUEST_METHOD'] );\n }", "public function getHttpMethod();", "public function getHttpMethod();", "public static function method() {\n static $method;\n if (empty($method)) {\n $method = strtolower($_SERVER['REQUEST_METHOD']);\n }\n return $method;\n }", "public function getMethod() {\n\t\treturn strtoupper($this->getServer('REQUEST_METHOD'));\n\t}", "public function filterMethod()\n {\n if (in_array($_SERVER['REQUEST_METHOD'], $this->config['valid_http_methods'])) {\n return $_SERVER['REQUEST_METHOD'];\n } else {\n return null;//@TODO: return response with 500 code or throw exception;\n }\n }", "public function getMethod()\r\n {\r\n if (isset($_SERVER['REQUEST_METHOD'])) {\r\n return $_SERVER['REQUEST_METHOD'];\r\n }\r\n return false;\r\n }", "public static function getMethod () {\n\n\t\tif (self::$_method === null) {\n\t\t\tself::$_method = isset($_SERVER['REQUEST_METHOD']) ? strtolower($_SERVER['REQUEST_METHOD']) : 'get';\n\t\t}\n\n\t\treturn self::$_method;\n\n\t}", "public function getRequestMethod()\n {\n return $this->requestMethod;\n }", "public function getMethod()\n {\n return strtolower($this->raw_request['REQUEST_METHOD']);\n }", "public function requestMethod()\n {\n return $this->method;\n }", "public function getRequestMethod() : string;" ]
[ "0.84927976", "0.8450335", "0.8450335", "0.8450335", "0.8450335", "0.8450335", "0.8193764", "0.81121767", "0.8033387", "0.78909194", "0.77658033", "0.7496929", "0.7398098", "0.73610157", "0.73467857", "0.7340262", "0.7204068", "0.7168043", "0.7168043", "0.71492773", "0.71120733", "0.70884645", "0.70567906", "0.7029054", "0.70144075", "0.7003088", "0.6988507", "0.69737625", "0.6973572", "0.6971026", "0.69666564", "0.6958141", "0.69553405", "0.6949867", "0.69420993", "0.69416386", "0.6936269", "0.6935189", "0.6934339", "0.6931502", "0.6918387", "0.69149107", "0.69114816", "0.68882257", "0.68854666", "0.6881176", "0.6877489", "0.6868381", "0.6868381", "0.6857906", "0.68399227", "0.6838765", "0.68336827", "0.6814994", "0.6814117", "0.68016005", "0.67927945", "0.6776937", "0.67762995", "0.6774431", "0.6747402", "0.6747402", "0.67453825", "0.67441463", "0.6741528", "0.6738428", "0.6737693", "0.67371553", "0.67343384", "0.6733976", "0.67311096", "0.6722167", "0.6713025", "0.67079127", "0.6702542", "0.66980845", "0.66911364", "0.6689995", "0.6689831", "0.668556", "0.66824085", "0.66791165", "0.66651356", "0.6659275", "0.6657955", "0.6657233", "0.66514534", "0.6640685", "0.66364545", "0.66364545", "0.66364425", "0.66095513", "0.65988225", "0.65983593", "0.6595841", "0.65846187", "0.65730363", "0.6572982", "0.6564613" ]
0.8590477
0
Sorts the internal list of extensions by priority.
Сортирует внутренний список расширений по приоритету.
private function getExtensions() { if (null === $this->sorted) { krsort($this->extensions); $this->sorted = !empty($this->extensions) ? call_user_func_array('array_merge', $this->extensions) : array(); } return $this->sorted; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function order_by_priority() {\n\t\t$order = array();\n\t\tforeach ( $this->controls as $key => $control_object ) {\n\t\t\t$order[ $key ] = $control_object->priority;\n\t\t}\n\t\tarray_multisort( $order, SORT_ASC, $this->controls );\n\t}", "public function getExtensions()\n {\n if (null === $this->sorted) {\n ksort($this->extensions);\n $this->sorted = [];\n\n if (!empty($this->extensions)) {\n $this->sorted = call_user_func_array('array_merge', $this->extensions);\n }\n }\n\n return $this->sorted;\n }", "function sortExtension($extList,$rootPath = '') {\n\t$res = $extList;\n\t$Max = count($res);\n\tfor($i = 0;$i<$Max-1;$i++) {\n\t\t$min = $i;\n\t\tfor($j = $i+1;$j<$Max;$j++)\n\t\t\tif(sort_function($res[$j],$res[$min],$rootPath)<0)\n\t\t\t\t$min = $j;\n\t\tif($min != $i) {\n\t\t\t$x = $res[$i];\n\t\t\t$res[$i] = $res[$min];\n\t\t\t$res[$min] = $x;\n\t\t}\n\t}\n\treturn $res;\n}", "function getExtensionsSorted($rootPath = '') {\n\t$extlist=getExtensionsByDB($rootPath);\n\t$set_of_ext = array();\n\tforeach($extlist as $name => $path) {\n\t\t$set_of_ext[] = new Extension($name,$path);\n\t}\n\t$set_of_ext = sortExtension($set_of_ext,\"\");\n\t$exts = array();\n\tforeach($set_of_ext as $ext)\n\t\t$exts[$ext->Name]=$extlist[$ext->Name];\n\treturn $exts;\n}", "protected function sortPackages()\n {\n $sortPriority = $this->sortPriority;\n $getPriorityValue = function (Entry $object) use ($sortPriority) {\n $result = 100;\n if (isset($sortPriority[$object->getPackageName()])) {\n $result = $sortPriority[$object->getPackageName()];\n } elseif ($object->getDeployStrategy() instanceof Copy || $object->getDeployStrategy() instanceof Move) {\n $result = 101;\n }\n return $result;\n };\n usort(\n $this->packages,\n function ($a, $b) use ($getPriorityValue) {\n /** @var Entry $a */\n /** @var Entry $b */\n $aVal = $getPriorityValue($a);\n $bVal = $getPriorityValue($b);\n if ($aVal == $bVal) {\n return 0;\n }\n return ($aVal > $bVal) ? -1 : 1;\n }\n );\n }", "private function sort()\n {\n if (!isset($this->sort)) {\n return;\n }\n\n uasort($this->_files, function($a, $b) {\n if ($this->sort == self::SORT_BROWSE) {\n return\n strnatcmp($a['type'], $b['type']) * 2 +\n strnatcmp($a['path'], $b['path']);\n } elseif ($this->order == self::ORDER_ASC) {\n return strnatcmp($a[$this->sort], $b[$this->sort]);\n } else {\n return strnatcmp($b[$this->sort], $a[$this->sort]);\n }\n });\n }", "function getSortPriority() : int ;", "protected function sortPipeline() : void\n {\n ksort($this->priorityList);\n $this->pipelineList = [];\n\n foreach ($this->priorityList as $middlewareList) {\n $this->pipelineList = array_merge($this->pipelineList, $middlewareList);\n }\n }", "function sort()\n\t{\n\t\tif(is_array($this->dirs) && in_array($this->sort_by, array('name', 'mod'))) {\n\t\t\tusort($this->dirs, \"Simplex::cmp_\".$this->sort_by);\n\t\t\tif($this->sort_as == \"desc\")\n\t\t\t\t$this->dirs = array_reverse($this->dirs);\n\t\t} else {\n\t\t\tusort($this->dirs, \"Simplex::cmp_name\");\n\t\t}\n\n\t\t// Here we filter the comparison functions supported by our file object\n\t\tif(is_array($this->files) && in_array($this->sort_by, array('name', 'size', 'mod'))) {\n\t\t\tusort($this->files, \"Simplex::cmp_\".$this->sort_by);\n\t\t\tif($this->sort_as == \"desc\")\n\t\t\t\t$this->files = array_reverse($this->files);\n\t\t} else {\n\t\t\tusort($this->files, \"Simplex::cmp_name\");\n\t\t}\n\t}", "public function sort() {\n\t\tusort( $this->items, array( 'AtomizerItem', 'compare' ) );\n\t}", "protected function sortActivePackagesByDependencies() {}", "protected function sort_by_priority( $a, $b ) {\n\t\tif ( floatval( $a['priority'] ) === floatval( $b['priority'] ) ) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn ( floatval( $a['priority'] ) < floatval( $b['priority'] ) ) ? -1 : 1;\n\t}", "function learn_press_sort_list_by_priority_callback( $a, $b ) {\n\t$a_priority = null;\n\t$b_priority = null;\n\n\tif ( is_array( $a ) && array_key_exists( 'priority', $a ) ) {\n\t\t$a_priority = $a['priority'];\n\t} elseif ( is_object( $a ) ) {\n\t\tif ( is_callable( array( $a, 'get_priority' ) ) ) {\n\t\t\t$a_priority = $a->get_priority();\n\t\t} elseif ( property_exists( $a, 'priority' ) ) {\n\t\t\t$a_priority = $a->priority;\n\t\t}\n\t}\n\n\tif ( is_array( $b ) && array_key_exists( 'priority', $b ) ) {\n\t\t$b_priority = $b['priority'];\n\t} elseif ( is_object( $b ) ) {\n\t\tif ( is_callable( array( $b, 'get_priority' ) ) ) {\n\t\t\t$b_priority = $b->get_priority();\n\t\t} elseif ( property_exists( $b, 'priority' ) ) {\n\t\t\t$b_priority = $b->priority;\n\t\t}\n\t}\n\n\tif ( $a_priority === $b_priority ) {\n\t\treturn 0;\n\t}\n\n\treturn ( $a_priority < $b_priority ) ? - 1 : 1;\n}", "public function asort() {}", "public function sortingPriority($key);", "function custom_sort($a,$b) \n\t\t{\n\t\t\tswitch($_GET['s'])\n\t\t\t{\n\t\t\t\tcase 1:\n\t\t\t\t\treturn $a[0]>$b[0];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\treturn $a[0]<$b[0];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\t\n\t\t\t\t\t$a[0] = pathinfo($a[0], PATHINFO_EXTENSION);\n\t\t\t\t\t$b[0] = pathinfo($b[0], PATHINFO_EXTENSION);\n\t\t\t\t\t\n\t\t\t\t\treturn $a[0]>$b[0];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\t$a[0] = pathinfo($a[0], PATHINFO_EXTENSION);\n\t\t\t\t\t$b[0] = pathinfo($b[0], PATHINFO_EXTENSION);\n\t\t\t\t\t\n\t\t\t\t\treturn $a[0]<$b[0];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\treturn $a[2]>$b[2];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\treturn $a[2]<$b[2];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\t\treturn $a[3]>$b[3];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 8:\n\t\t\t\t\treturn $a[3]<$b[3];\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\treturn $a[0]>$b[0];\n\t\t\t}\n\t\t}", "protected function sort_by_priority( $a, $b ) {\r\t if ( ! isset( $a['priority'] ) || ! isset( $b['priority'] ) || $a['priority'] === $b['priority'] ) {\r\t return 0;\r\t }\r\t return ( $a['priority'] < $b['priority'] ) ? -1 : 1;\r\t}", "protected function _sort() \n {\n\t\t// if no comparator is passed sort the internal array \n\t\t// by its keys, else use the comparator\n\t\tif ($this->_comparator == null) {\n\t\t\treturn ksort($this->_items);\n\t\t} else {\n\t\t\treturn TechDivision_Collections_CollectionUtils::sort(\n\t\t\t $this,\n\t\t\t $this->_comparator\n\t\t );\n\t\t} \n }", "function sort_function($ext1,$ext2,$rootPath = '') {\n\t$dep1 = $ext1->isDepencies($ext2->Name,$rootPath);\n\t$dep2 = $ext2->isDepencies($ext1->Name,$rootPath);\n\tif($ext1->Name == 'applis')$res = +1;\n\telse if($ext2->Name == 'applis')$res = -1;\n\telse if($dep1 && !$dep2)$res = +1;\n\telse if($dep2 && !$dep1)$res = -1;\n\telse $res = 0;\n\treturn $res;\n}", "private function sort_by_priority( $item1, $item2 ) {\n\t\tif ( $item1['priority'] === $item2['priority'] ) {\n\t\t\treturn $item1['order'] < $item2['order'] ? -1 : 1;\n\t\t}\n\n\t\treturn $item1['priority'] < $item2['priority'] ? -1 : 1;\n\t}", "protected function _cmp_priority($a, $b)\n {\n }", "protected function _sort() {}", "private function sortCollection()\n {\n uasort($this->collection, function (AvailableTokenInterface $a, AvailableTokenInterface $b) {\n if ($a->getLoaLevel() === $b->getLoaLevel()) {\n return strcmp($a->getType(), $b->getType());\n }\n return $a->getLoaLevel() > $b->getLoaLevel() ? 1 : -1;\n });\n }", "function SortDirs()\n\t{\n\t\tfunction custom_sort($a,$b) \n\t\t{\n\t\t\tswitch($_GET['s'])\n\t\t\t{\n\t\t\t\tcase 1:\n\t\t\t\t\treturn $a[0]>$b[0];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\treturn $a[0]<$b[0];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\t\n\t\t\t\t\t$a[0] = pathinfo($a[0], PATHINFO_EXTENSION);\n\t\t\t\t\t$b[0] = pathinfo($b[0], PATHINFO_EXTENSION);\n\t\t\t\t\t\n\t\t\t\t\treturn $a[0]>$b[0];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\t$a[0] = pathinfo($a[0], PATHINFO_EXTENSION);\n\t\t\t\t\t$b[0] = pathinfo($b[0], PATHINFO_EXTENSION);\n\t\t\t\t\t\n\t\t\t\t\treturn $a[0]<$b[0];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\treturn $a[2]>$b[2];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\treturn $a[2]<$b[2];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\t\treturn $a[3]>$b[3];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 8:\n\t\t\t\t\treturn $a[3]<$b[3];\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\treturn $a[0]>$b[0];\n\t\t\t}\n\t\t}\n\t\tusort($GLOBALS['dirfiles'], \"custom_sort\");\n\t}", "protected function _sort()\n {\n if ($this->_orderUpdated) {\n $newOrder = array();\n $index = 0;\n \n foreach ($this->_pages as $hash => $page) {\n $pos = $page->getPosition();\n if ($pos === null) {\n $newOrder[$hash] = $index;\n $index++;\n } else {\n $newOrder[$hash] = $pos;\n }\n }\n\n asort($newOrder);\n $this->_order = $newOrder;\n $this->_orderUpdated = false;\n }\n }", "private static function getOrderModules(): array{\n $modules = array_values(self::$modules);\n uasort($modules, function (Module $a, Module $b){\n $a = $a->getPriority();\n $b = $b->getPriority();\n if ($a == $b) {\n return 0;\n }\n return ($a < $b) ? -1 : 1;\n });\n return $modules;\n }", "public function sort() {\n usort($this->records, function($a, $b) {\n return $a->sortorder - $b->sortorder; \n });\n }", "public static function get_sort_options() {\n\n\t\t/* Comment sorting */\n\t\t$sorting = array(\n\t\t\t'date-desc' => __( 'Newest First', 'listify' ),\n\t\t\t'date-asc' => __( 'Oldest First', 'listify' ),\n\t\t\t'helpful-desc' => __( 'Help Count (Max-Min)', 'listify' ),\n\t\t\t'helpful-asc' => __( 'Help Count (Min-Max)', 'listify' ),\n\t\t);\n\n\t\t/* If rating enabled, add rating sort option */\n\t\tif ( listify_has_integration( 'wp-job-manager-reviews' ) || get_theme_mod( 'listing-ratings', true ) ) {\n\t\t\t$sorting['rating-desc'] = __( 'Rating (High-Low)', 'listify' );\n\t\t\t$sorting['rating-asc'] = __( 'Rating (Low-High)', 'listify' );\n\t\t}\n\n\t\treturn $sorting;\n\t}", "protected function sortByPriority($handlers = [])\n {\n static::usort($handlers, function ($a, $b) {\n return $b['priority'] - $a['priority'];\n });\n\n return $handlers;\n }", "public function sort();", "public function sort();", "function sortIT($itList)\n{\n\t$reptab = array();\n\n\tforeach($itList as $elem)\n\t{\n\t\t$separated = explode('-', pathinfo(withoutTag($elem), PATHINFO_FILENAME));\n\n\t\t$key;\n\n\t\tif ($separated[0]==='IT')\n\t\t{\n\t\t\t$key = $separated[1];\n\t\t}\n\t\telseif (isset($separated[1]) AND $separated[1]==='IT')\n\t\t{\n\t\t\t$key = $separated[2];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//it's a special/generic IT\n\t\t\t$key = 'GENERIC';\n\t\t}\n\n\t\tif (in_array($key, GENERIC))\n\t\t{\n\t\t\t$key = 'GENERIC';\n\t\t}\n\n\t\t$reptab[$key][] = $elem;\n\t\t\n\t}\n\n\tksort($reptab);\n\n\treturn $reptab;\n}", "protected function sortListeners($eventName)\n\t{\n\t\t$this->sorted[$eventName] = [];\n\t\n\t\t// If listeners exist for the given event, we will sort them by the priority\n\t\t// so that we can call them in the correct order. We will cache off these\n\t\t// sorted event listeners so we do not have to re-sort on every events.\n\t\tif (isset($this->listeners[$eventName])) {\n\t\t\tkrsort($this->listeners[$eventName]);\n\t\n\t\t\t$this->sorted[$eventName] = call_user_func_array(\n\t\t\t\t\t'array_merge', $this->listeners[$eventName]\n\t\t\t);\n\t\t}\n\t}", "function sortItemsDir($items) {\n foreach ($items as $key => $item) {\n foreach (listExtensions() as $value) {\n if(strpos($item, $value) !== false) {\n unset($items[$key]);\n array_push($items, $item);\n }\n }\n }\n return $items;\n}", "protected function sortStorageBackends() {\n $sorted = [];\n krsort($this->storage_backends);\n\n foreach ($this->storage_backends as $storage_backends) {\n $sorted = array_merge($sorted, $storage_backends);\n }\n return $sorted;\n }", "private function sort_pages() {\n\n $keys = array_keys($this->pages);\n $num_pages = count($keys);\n\n for ($i = 0; $i < ($num_pages - 1); ++$i) {\n\n $swap_rank = array_key_exists('menu_order', $this->pages[$keys[$i]]) ?\n $this->pages[$keys[$i]]['menu_order'] :\n 999;\n\n $swap_to = $i;\n\n for ($j = ($i + 1); $j < $num_pages; $j++) {\n\n $test_rank = array_key_exists('menu_order', $this->pages[$keys[$j]]) ?\n $this->pages[$keys[$j]]['menu_order'] :\n 999;\n\n if ($test_rank < $swap_rank) { // ranked higher then swap\n\n $swap_to = $j;\n $swap_rank = $test_rank;\n\n }\n\n }\n\n if ($swap_to !== $i) { // move this page if found a higher ranked page\n\n $tmp = $keys[$i];\n $keys[$i] = $keys[$swap_to];\n $keys[$swap_to] = $tmp;\n\n }\n\n }\n\n $this->ordered_page_keys = $keys;\n\n }", "private function sortEventHandlerByPriority($a, $b)\n {\n if ($a->priority == $b->priority) {\n return 0;\n }\n return $a->priority > $b->priority ? -1 : 1;\n }", "private function sort(array &$definitions) {\n usort($definitions, [$this, 'comparator']);\n }", "static public function sortByPriority( $array ) {\n /*\n static $sortFunc;\n\n if ( !$sortFunc ) {\n $sortFunc = create_function('$a,$b', '\n if ( $a[\"priority\"] == $b[\"priority\"] )\n return 0;\n return ( $a[\"priority\"] < $b[\"priority\"] );\n ');\n }\n */\n \n $sortFunc = function($a, $b, $p = 'priority'){\n return $a[$p] == $b[$p] ? 0 : $a[$p] < $b[$p];\n };\n\n usort( $array, $sortFunc );\n\n return $array;\n }", "public function asort()\n{\n\tasort($this->registry);\n}", "function sort() { }", "protected function _sort_listeners($eventName)\n {\n $this->sorted[$eventName] = [];\n // If listeners exist for the given event, we will sort them by the priority\n // so that we can call them in the correct order. We will cache off these\n // sorted event listeners so we do not have to re-sort on every events.\n if (isset($this->listeners[$eventName])) {\n krsort($this->listeners[$eventName]);\n $this->sorted[$eventName] = call_user_func_array('array_merge', $this->listeners[$eventName]);\n }\n }", "public function sortImportChain()\r\n {\r\n // Sort keys\r\n ksort($this->importTypes);\r\n // Create empty array\r\n $array = array();\r\n // Loop through importTypes\r\n foreach ($this->importTypes as $name => $importType) {\r\n $array[$name] = $importType;\r\n }\r\n // Set importTypes property with consecutive keys\r\n $this->importTypes = $array;\r\n }", "private function sortMailOrder()\n {\n rsort($this->emails);\n\n }", "public function sort()\n {\n if ($this->sortedPackages === null) {\n $this->sortedPackages = [];\n reset($this->unsortedPackages);\n while (!empty($this->unsortedPackages)) {\n $resolved = $this->sortPackage(key($this->unsortedPackages));\n if ($resolved) {\n reset($this->unsortedPackages);\n } else {\n next($this->unsortedPackages);\n }\n }\n }\n\n return $this->sortedPackages;\n }", "public function doSort();", "public function sort(): void\n {\n if (!empty($this->groups)) {\n $this->injectGroups('', $this->routes, $this->defaultIndex);\n }\n\n $this->sorted || $this->sorted = \\usort($this->routes, static function (array $a, array $b): int {\n $ap = $a['prefix'] ?? null;\n $bp = $b['prefix'] ?? null;\n\n return !($ap && $ap === $a['path']) <=> !($bp && $bp === $b['path']) ?: \\strnatcmp($a['path'], $b['path']);\n });\n }", "function wp_list_sort($list, $orderby = array(), $order = 'ASC', $preserve_keys = \\false)\n{\n}", "function custom_sort($a, $b)\n{\n return $a[1] < $b[1];\n}", "function groups_sort() {\n\tglobal $g, $config;\n\n\tfunction groupscmp($a, $b) {\n\t\treturn strcmp($a['name'], $b['name']);\n\t}\n\n\tusort($config['system']['group'], \"groupscmp\");\n}", "abstract static public function sortAsc($a, $b);", "public static function comparePriority(Addon $a, Addon $b) {\n if ($a->getPriority() > $b->getPriority()) {\n return -1;\n } elseif ($a->getPriority() < $b->getPriority()) {\n return 1;\n } else {\n return 0;\n }\n }", "public function sort() {\n $this->order = array_diff_key($this->data, $this->dependency);\n $data = array_diff_key($this->data, $this->order);\n foreach($data as $i=>$v){\n if(!$this->processSort($i)) return false;\n }\n return $this->order;\n }", "public function natcasesort()\n{\n\treturn natcasesort($this->registry);\n}", "public function natsort()\n{\n\treturn natsort($this->registry);\n}", "protected function sort()\n {\n ksort($this->authstack);\n }", "protected function sortOptions() {\n return [\n 'ASC' => $this->t('Unflagged first'),\n 'DESC' => $this->t('Flagged first'),\n ];\n }", "function wf_sort_shipping_methods($available_shipping_methods, $package)\n{\n$sort_order\t= array(\n'BE_Table_Rate_Shipping' => array(),\n'click-and-pick_shipping_method' => array(),\n'local_pickup'\t\t=>\tarray(),\n'legacy_flat_rate'\t=>\tarray(),\t\t\n);\n\n// unsetting all methods that needs to be sorted\nforeach($available_shipping_methods as $carrier_id => $carrier){\n$carrier_name\t=\tcurrent(explode(\":\",$carrier_id));\nif(array_key_exists($carrier_name,$sort_order)){\n $sort_order[$carrier_name][$carrier_id]\t=\t\t$available_shipping_methods[$carrier_id];\n unset($available_shipping_methods[$carrier_id]);\n}\n}\n\n// adding methods again according to sort order array\nforeach($sort_order as $carriers){\n$available_shipping_methods\t=\tarray_merge($available_shipping_methods,$carriers);\n}\nreturn $available_shipping_methods;\n}", "function _sort_filelist(&$files, $callback, $reverse) {\n // sort subtrees\n for ($i = 0; $i < count($files); $i++) {\n if ($files[$i]['children'] !== false) {\n $children = $files[$i]['children'];\n $this->_sort_filelist($children, $callback, $reverse);\n $files[$i]['children'] = $children;\n }\n }\n\n // sort current tree\n usort($files, $callback);\n if ($reverse) {\n $files = array_reverse($files);\n }\n }", "function b_pico_list_allowed_order() {\n\treturn [\n\t\t'o.weight',\n\t\t'o.weight DESC',\n\t\t'o.created_time',\n\t\t'o.created_time DESC',\n\t\t'o.modified_time',\n\t\t'o.modified_time DESC',\n\t\t'o.viewed',\n\t\t'o.viewed DESC',\n\t\t'o.votes_sum',\n\t\t'o.votes_sum DESC',\n\t\t'o.votes_count',\n\t\t'o.votes_count DESC',\n\t\t'o.weight,o.created_time',\n\t\t'o.weight,o.created_time DESC',\n\t\t'o.weight,o.content_id',\n\t\t'o.weight,o.content_id DESC',\n\t];\n}", "public function sort_by() {\n\t\t\t$option = 'sortby_categories';\n\n\t\t\tif ( $this->is_wpml_active() ) {\n\t\t\t\t$option .= '_' . ICL_LANGUAGE_CODE;\n\t\t\t}\n\n\t\t\t$sortby = ( isset( $this->lwp_options[ $option ] ) && ! empty( $this->lwp_options[ $option ] ) ? $this->lwp_options[ $option ] : \"\" );\n\t\t\t$return = array();\n\n\t\t\t$special_sort = array( \"title\", \"date\" );\n\n\t\t\tif ( ! empty( $sortby ) ) {\n\t\t\t\tunset( $sortby['enabled']['placebo'] );\n\n\t\t\t\tforeach ( $sortby['enabled'] as $key => $label ) {\n\t\t\t\t\tif ( $key != \"random\" ) {\n\t\t\t\t\t\tif ( in_array( $key, $special_sort ) ) {\n\t\t\t\t\t\t\t$category['compare_value'] = \"=\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$category = $this->get_single_listing_category( $key );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$return[ $key ] = ( isset( $category['compare_value'] ) && $category['compare_value'] != \"=\" ? \"meta_value_num\" : \"meta_value\" );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$return[ $key ] = \"random\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $return;\n\t\t}", "protected function prepareProcessors()\n {\n usort($this->processors, function (ProcessorInterface $one, ProcessorInterface $two) {\n if ($one->getPriority() == $two->getPriority()) {\n return 0;\n }\n\n return $one->getPriority() < $two->getPriority() ? 1 : -1;\n });\n }", "function attribSort()\n {\n usort($this->m_attribIndexList,array(\"atknode\",\"attrib_cmp\"));\n }", "public function sort() {\n ksort($this->headers);\n }", "function getPriority() ;", "function getPriority() ;", "function getPriority() ;", "function getPriority() ;", "function getPriority() ;", "function getPriority() ;", "function getPriority() ;", "protected function getExtensions()\n {\n return array(new PreloadedExtension(array(\n $this->type->getName() => $this->type,\n ), array()));\n }", "function sortArray2(&$arr,$att,$order) {\r\n\tglobal $compare_att;\r\n\tglobal $compare_order;\r\n\t$compare_att=$att;\r\n\t$compare_order=$order;\r\n\tuasort($arr,'sortArray2_compare_att');\r\n}", "protected function getSortedDefinitions() {\n // Sort the plugins first by category, then by label.\n $definitions = $this->getDefinitions();\n uasort($definitions, function ($a, $b) {\n if ($a['category'] != $b['category']) {\n return strnatcasecmp($a['category'], $b['category']);\n }\n return strnatcasecmp($a['label'], $b['label']);\n });\n\n return $definitions;\n }", "public function sort($data);", "private function sortTrips() {\r\n\t\tif($this->tryb!='szlaki') {\r\n\t\t\tkrsort($this->trips);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tforeach ($this->trips as $trip) {\r\n\t\t\t\t$desc[] = $trip['desc'];\r\n\t\t\t}\r\n\t\t\tarray_multisort($this->trips, SORT_ASC, $desc);\r\n\t\t}\r\n\t}", "public static function getDefaultSorting();", "function getSort(&$temp)\n{ \n\tglobal $type;\n\t\n\tswitch ($type)\n\t{\n\t\tcase 'desc':\n\t\t\trsort($temp);\n\t\t\tbreak;\n\t\t\t\n\t\tcase 'asc':\n\t\t\tsort($temp);\n\t\t\tbreak;\n\t}\n\t\n\tforeach ($temp as &$t)\n\t{\n\t\tif(is_array($t['children']))\n\t\t{\n\t\t\tgetSort($t['children']);\n\t\t}\n\t}\n}", "public function sort()\n {\n // Sort this collection\n uasort($this->branches, array($this, 'sorter'));\n\n // Iterate nested collections and sort them\n foreach ($this->branches as $branch) {\n $branch->sort();\n }\n }", "public static function cmp_uasort($a, $b) {\n if($a->ui_order==$b->ui_order) { return 0; }\n return ($a->ui_order < $b->ui_order) ? -1 : 1;\n }", "public function sortButtonsByPriority($items = [])\n {\n uasort($items, function($a, $b) {\n\t\t\treturn $a['priority'] <=> $b['priority'];\n });\n\n return $items;\n }", "protected function _sortSmilies()\n\t{\n\t\t$emoticons = array();\n\t\t\n\t\tif ( ! count( $this->_sortedSmilies ) )\n\t\t{\n\t\t\t/* Sort them! */\n\t\t\t$this->_sortedSmilies = $this->cache->getCache('emoticons');\n\t\t\t\n\t\t\tusort( $this->_sortedSmilies, array( $this, '_thisUsort' ) );\n\t\t}\t\n\t}", "function sortDesc(array $frequencyList)\n{\n arsort($frequencyList);\n return $frequencyList;\n}", "public static function sortFieldsByPriority($fields) {\n $fields = static::sortFieldsByKey($fields, 'priority');\n return $fields;\n }", "public function sort ($f) {\r\n\t\t#C:\\HaxeToolkit\\haxe\\std/php/_std/Array.hx:181: characters 3-15\r\n\t\tusort($this->arr, $f);\r\n\t}", "protected function sortDefinitions(array &$definitions) {\n uasort($definitions, function ($a, $b) {\n return $a['weight'] - $b['weight'];\n });\n }", "public abstract function gdoSortObjects();", "function orderedByPriority() {\n \treturn str_starts_with($this->getOrderBy(), 'priority');\n }", "function arr_sort() {\n\t\tif($this->order !== '') {\n\t\t\tif($this->order == 'ASC') $sort_order = SORT_ASC;\n\t\t\tif($this->order == 'DESC') $sort_order = SORT_DESC;\n\t\t} else {\n\t\t\t$sort_order = SORT_ASC;\n\t\t}\n\t\t$column = array();\n\t\tforeach($this->body as $val) {\n\t\t\t$column[] = $val[$this->sort];\n\t\t}\n\t\tarray_multisort($column, $sort_order, $this->body);\n\t}", "function sort_wordpress_versions(array $versions)\r\n{\r\n rsort($versions);\r\n $sorted_versions = array();\r\n\r\n foreach ($versions as $version)\r\n {\r\n $index = $version[0];\r\n $sorted_versions[$index][] = $version;\r\n }\r\n \r\n return $sorted_versions;\r\n}", "private function sortItemsDesc(): void\n {\n usort($this->items, function ($item1, $item2) {\n return ($item1->getValue() > $item2->getValue()) ? -1 :\n (($item1->getValue() < $item2->getValue()) ? 1 : 0);\n });\n }", "function getPresetsOrderedByPriority() ;", "function snax_buddypress_activity_filter_sort( $a, $b ) {\n\t$a = $a['labels']['name'];\n\t$b = $b['labels']['name'];\n\tif ( $a === $b ) {\n\t\treturn 0;\n\t}\n\treturn ($a < $b) ? -1 : 1;\n}", "public function sortItems(callable $cmp) {\n uksort($this->items, $cmp);\n }", "public function sort(FieldDescriptorInterface $fieldDescriptor, $order = self::SORTORDER_ASC);", "function object_sort_get_sort_options(array $params = array()) {\n\n\t$fields = array();\n\n\t$plugin = elgg_get_plugin_from_id('object_sort');\n\t$settings = $plugin->getAllSettings();\n\tforeach ($settings as $k => $val) {\n\t\tif (!$val) {\n\t\t\tcontinue;\n\t\t}\n\t\tlist($sort, $option) = explode('::', $k);\n\t\tif ($sort && in_array(strtolower($option), array('asc', 'desc'))) {\n\t\t\t$fields[] = $k;\n\t\t}\n\t}\n\n\t$fields = elgg_trigger_plugin_hook('sort_fields', 'object', $params, $fields);\n\n\t$subtypes = elgg_extract('subtype', $params);\n\tif (!$subtypes) {\n\t\t$subtypes = elgg_extract('subtypes', $params);\n\t}\n\tif (!empty($subtypes)) {\n\t\t$subtypes = (array) $subtypes;\n\t\t$subtype = $subtypes[0];\n\t\t$fields = elgg_trigger_plugin_hook('sort_fields', \"object:$subtype\", $params, $fields);\n\t}\n\treturn $fields;\n}", "public function getSort();", "public function sortByKeys()\r\n {\r\n $valesForSorting = [];\r\n foreach ($this->nestedArr as $key => $value) {\r\n $valesForSorting[$key] = $this->findSortingFields($value);\r\n }\r\n\r\n foreach($this->sortingKeys as $sortingKey){\r\n $a = array_column($valesForSorting, $sortingKey);\r\n array_multisort(\r\n $a,\r\n SORT_ASC,\r\n SORT_NATURAL,\r\n $this->nestedArr,\r\n $valesForSorting\r\n );\r\n }\r\n }", "function uasort(&$array, $cmp_function)\n{\n}", "protected static function sortExternalsByGroup(array &$items) {\n $sorted = array(\n '**' => array(),\n 'ie' => array(),\n 'lt' => array(),\n 'gt' => array(),\n 'eq' => array(),\n );\n foreach ($items as $href => $item) {\n if (preg_match(self::$resource_iecc_regex, $href, $m)) {\n # no version\n if (empty($m[2])) {\n $sorted['ie'][$href] = $item;\n } else {\n $version = strtr($m[2], '_', '.');\n # ranged version\n if (!empty($m[1])) {\n $x = $m[1][0].'t';\n if (!isset($sorted[$x][$version])) {\n $sorted[$x][$version] = array($x.'e' => array(), $x => array());\n }\n $sorted[$x][$version][$m[1]][$href] = $item;\n # exact version\n } else {\n $sorted['eq'][$version][$href] = $item;\n }\n }\n } else {\n $sorted['**'][$href] = $item;\n }\n }\n # perform numerical sorting\n krsort($sorted['lt']);\n ksort($sorted['gt']);\n ksort($sorted['eq']);\n # return in original array\n $items = $sorted;\n }" ]
[ "0.6981212", "0.6939079", "0.6872336", "0.6657447", "0.663623", "0.6560952", "0.6463408", "0.6367969", "0.6239618", "0.62269473", "0.6085602", "0.60710806", "0.60700893", "0.60618895", "0.60615915", "0.6011283", "0.5975866", "0.59430426", "0.5921686", "0.58800167", "0.5863609", "0.5849332", "0.5728625", "0.5722861", "0.5716653", "0.5691414", "0.5688826", "0.5686536", "0.5680265", "0.5673767", "0.5673767", "0.56720555", "0.56541383", "0.5648705", "0.5639846", "0.5638887", "0.5623105", "0.56218195", "0.5610025", "0.5591296", "0.5588121", "0.5569421", "0.55672616", "0.554527", "0.5492946", "0.5470198", "0.54684716", "0.54634094", "0.54349524", "0.54288393", "0.541517", "0.54128796", "0.5411396", "0.5410739", "0.5403016", "0.53628635", "0.5348597", "0.5333759", "0.5331419", "0.53252035", "0.5321877", "0.5316044", "0.5300127", "0.5292498", "0.5290247", "0.5290247", "0.5290202", "0.52884036", "0.52884036", "0.52884036", "0.52884036", "0.5269376", "0.5268367", "0.526544", "0.52652377", "0.5258065", "0.5251462", "0.52493876", "0.5246072", "0.52423626", "0.52336943", "0.5228154", "0.5227064", "0.5223486", "0.5222897", "0.5206353", "0.5203962", "0.5189242", "0.5184696", "0.51805717", "0.5179879", "0.51779443", "0.5173622", "0.51711786", "0.5169151", "0.5167803", "0.5164261", "0.51632124", "0.51596606", "0.515437" ]
0.72620374
0
Checkes if include VAT in prices is enabled, if so, apply new filters
Проверяет, включена ли налог на добавленную стоимость в цены, если да, применяет новые фильтры
function it_exchange_easy_eu_value_added_taxes_addon_include_vat_filters() { if ( !is_admin() ) { it_exchange_easy_eu_value_added_taxes_setup_session(); } $settings = it_exchange_get_option( 'addon_easy_eu_value_added_taxes', true ); if ( empty( $settings['price-hide-vat'] ) ) { add_filter( 'it_exchange_api_theme_product_base_price', 'it_exchange_easy_eu_value_added_taxes_addon_api_theme_product_base_price', 10, 2 ); } add_filter( 'it_exchange_api_theme_cart_item_sub_total', 'it_exchange_easy_eu_value_added_taxes_addon_api_theme_cart_item_with_vat', 10, 2 ); add_filter( 'it_exchange_api_theme_cart_item_price', 'it_exchange_easy_eu_value_added_taxes_addon_api_theme_cart_item_with_vat', 10, 2 ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function get_filtered_price()\n {\n }", "public function addOptionFilters()\n {\n // Don't change, needs to check for false as could return prio 0 which would evaluate to false\n if (has_filter('option_' . $this->option_name, [$this, 'getOption']) === false) {\n add_filter('option_' . $this->option_name, [$this, 'getOption']);\n }\n if (has_filter('site_option_' . $this->option_name, [$this, 'getOption']) === false) {\n add_filter('site_option_' . $this->option_name, [$this, 'getOption']);\n }\n }", "protected function prepareFilter()\n\t{\n\t\t$prices = $this->data['CATALOG_PRICES'];\n\n\t\t$this->filter = array(\n\t\t\t\"ID\" => empty($this->productIdsMap) ? -1 : array_values($this->productIdsMap),\n\t\t\t\"IBLOCK_LID\" => $this->getSiteId(),\n\t\t\t\"IBLOCK_ACTIVE\" => \"Y\",\n\t\t\t\"ACTIVE_DATE\" => \"Y\",\n\t\t\t\"ACTIVE\" => \"Y\",\n\t\t\t\"CHECK_PERMISSIONS\" => \"Y\",\n\t\t\t\"MIN_PERMISSION\" => \"R\",\n\t\t\t\"IBLOCK_ID\" => array_keys($this->arParams['SHOW_PRODUCTS'])\n\t\t);\n\n\t\tif ($this->arParams['HIDE_NOT_AVAILABLE'] == 'Y')\n\t\t\t$this->filter['CATALOG_AVAILABLE'] = 'Y';\n\n\t\tforeach ($prices as $value)\n\t\t{\n\t\t\tif (!$value['CAN_VIEW'] && !$value['CAN_BUY'])\n\t\t\t\tcontinue;\n\t\t\t$this->filter[\"CATALOG_SHOP_QUANTITY_\" . $value[\"ID\"]] = $this->arParams[\"SHOW_PRICE_COUNT\"];\n\t\t}\n\t}", "function cardealer_cars_filter_methods(){\n global $car_dealer_options;\n\t$cars_filter_with = \"\";\n\tif(isset($car_dealer_options['cars-filter-with']))\n\t{\n\t\t$cars_filter_with = $car_dealer_options['cars-filter-with'];\n\t}\n return $cars_filter_with;\n}", "function &correctPrice( $calcVAT )\r\n {\r\n $product =& $this->product();\r\n\r\n $price = $this->Price;\r\n\r\n $vatType =& $product->vatType();\r\n\r\n if ( $calcVAT == true )\r\n {\r\n if ( $product->excludedVAT() )\r\n {\r\n $vatType =& $product->vatType();\r\n $vat = 0;\r\n\r\n if ( $vatType )\r\n {\r\n $vat =& $vatType->value();\r\n }\r\n\r\n $price = ( $price * $vat / 100 ) + $price;\r\n }\r\n }\r\n else\r\n {\r\n if ( $product->includesVAT() )\r\n {\r\n $vatType =& $product->vatType();\r\n $vat = 0;\r\n\r\n if ( $vatType )\r\n {\r\n $vat =& $vatType->value();\r\n }\r\n\r\n $price = $price - ( $price / ( 100 + $vat ) ) * $vat;\r\n\r\n }\r\n }\r\n return $price;\r\n }", "protected function filter_products_with_price($item)\n {\n }", "public function isEnabledCondition(){\r\n return Mage::getStoreConfig('vendors/pricecomparison2/enable_condition');\r\n }", "public function testPriceSwapFilter()\n {\n $isSuccessful = false;\n $this->_setHotelData();\n //Check if hotel data exists\n if(count($this->_hotelData) > 0) {\n //Check if first city data has more than zero city records\n $firstCityHotelsData = current($this->_hotelData);\n if(count($firstCityHotelsData) > 0) {\n $firstHotelData = current($firstCityHotelsData);\n $price = $firstHotelData->price;\n $filters['priceRange'] = \"$\" . ($price + 100) . \":\" . \"$\" . ($price - 10);\n $filteredData = $this->_getFilteredData($filters);\n foreach ($filteredData as $hotelRecord) {\n if (($price - 10) <= $hotelRecord->price && $hotelRecord->price <= ($price + 100)) {\n $isSuccessful = true;\n break;\n }\n }\n }\n }\n $this->assertTrue($isSuccessful);\n }", "public function apply()\r\n {\r\n $filterValue = $this->getRequest()->getParam($this->getRequestVar());\r\n if (!$filterValue) {\r\n return $this;\r\n }\r\n $this->calculateRanges();\r\n if (!$this->calculateRanges()){\r\n $this->_items = array($this->_createItem('', 0, 0)); \r\n }\r\n\r\n //validate filter\r\n $filterParams = explode(',', $filterValue);\r\n $filter = $this->_validateFilter($filterParams[0]);\r\n if (!$filter) {\r\n return $this;\r\n }\r\n\r\n list($from, $to) = $filter;\r\n\r\n if ($from < 0.01 && $to < 0.01) {\r\n return $this;\r\n }\r\n \r\n \r\n\r\n /*\r\n * Workaround for defect related to decreasing price for layered navgiation\r\n * \r\n * Check for not empty for prices like \"4000-\" \r\n */\r\n $isSlider = Mage::getStoreConfig('amshopby/general/price_type') == Amasty_Shopby_Model_Catalog_Layer_Filter_Price::DT_SLIDER;\r\n $fromTo = Mage::getStoreConfig('amshopby/general/price_from_to');\r\n if (!empty($to) && ($isSlider || $fromTo)) {\r\n $to = $to + Mage_Catalog_Model_Resource_Layer_Filter_Price::MIN_POSSIBLE_PRICE;\r\n }\r\n\r\n /*\r\n * Workaround for JS\r\n */\r\n if ($to == 0) {\r\n $to = '';\r\n }\r\n\r\n $this->setInterval(array($from, $to));\r\n\r\n $priorFilters = array();\r\n for ($i = 1; $i < count($filterParams); ++$i) {\r\n $priorFilter = $this->_validateFilter($filterParams[$i]);\r\n if ($priorFilter) {\r\n $priorFilters[] = $priorFilter;\r\n } else {\r\n //not valid data\r\n $priorFilters = array();\r\n break;\r\n }\r\n }\r\n if ($priorFilters) {\r\n $this->setPriorIntervals($priorFilters);\r\n }\r\n\r\n \r\n $this->_applyPriceRange();\r\n \r\n return $this;\r\n }", "protected function loadWithPriceFilterWithPriceSorting() {}", "protected function loadWithPriceFilterWithPriceSorting() {}", "private function shouldShowPrices()\n {\n if (!$this->company['docs_show_values_on_orders_docs'] && (int)$this->document['document_type_id'] === 28) {\n $this->showPrice = false;\n }\n\n if (!$this->company['docs_show_values_on_service_sheets'] && (int)$this->document['document_type_id'] === 30) {\n $this->showPrice = false;\n }\n\n if (!$this->company['docs_show_values_on_movement_docs'] && (int)$this->document['document_type_id'] === 6) {\n $this->showPrice = false;\n }\n\n if (!$this->company['docs_show_values_on_return_docs'] && in_array($this->document['document_type_id'], [32, 16, 31])) {\n $this->showPrice = false;\n }\n }", "protected function setFilter() {\n parent::setFilter();\n if(isset($this->filters['stock_status'])) {\n if($this->filters['stock_status'] == 'not_in_stock') {\n $this->filters['not_in_stock'] = TRUE;\n } else if ($this->filters['stock_status'] == 'in_stock') {\n $this->filters['not_in_stock'] = FALSE;\n }\n unset($this->filters['stock_status']);\n }\n }", "public function display_prices_including_tax()\n {\n }", "function lp_filter_pricing_plans() {\n\n\t$catId = '';\n\t$planUsage = '';\n\t$catTaxArray = array();\n\t$catTax2Array = array();\n\n\tif(isset($_POST['planUsage'])){\n\t\t$planUsage = stripslashes( $_POST['planUsage']);\n\t}\n\n\tif(isset($_POST['cat_id'])){\n\t\t$catId = stripslashes( $_POST['cat_id']);\n\t\tif(!empty($catId)){\n\t\t\t$catTaxArray = array(\n\t\t\t\t\t'key' => 'lp_selected_cats',\n\t\t\t\t\t'value' => $catId,\n\t\t\t\t\t'compare' => 'LIKE',\n\t\t\t\t);\n\t\t}\n\t}\n\n\n\t$durationType = stripslashes( $_POST['duration_type']);\n\t$relationParm = 'AND';\n\tif( empty($durationType) && empty($catTaxArray) ){\n\t\t$relationParm = 'OR';\n\t}\n\n\n\t$pricing_style_views = $_POST['currentStyle'];\n\t$returnData = null;\n\t\t/* code goes here */\n\t\t$output = null;\n\t\t$args = null;\n\t\t$args = array(\n\t\t\t'post_type' => 'price_plan',\n\t\t\t'posts_per_page' => -1,\n\t\t\t'post_status' => 'publish',\n\t\t\t'meta_query'=>array(\n\t\t\t'relation' => $relationParm,\n\t\t\t\t$catTaxArray,\n\t\t\t\tarray(\n\t\t\t\t\t'key' => 'plan_duration_type',\n\t\t\t\t\t'value' => $durationType,\n\t\t\t\t\t'compare' => 'LIKE',\n\t\t\t\t),\n\t\t\t\t$catTax2Array,\n\n\t\t\t),\n\t\t);\n\n\t\t$cat_Plan_Query = null;\n\t\t$output = null;\n\t\t$gridNumber = 0;\n\t\t$cat_Plan_Query = new WP_Query($args);\n\t\t$count = $cat_Plan_Query->found_posts;\n\t\t$GLOBALS['plans_count'] = $count;\n\t\tif($cat_Plan_Query->have_posts()){\n\t\t\twhile ( $cat_Plan_Query->have_posts() ) {\n\t\t\t\t\t$cat_Plan_Query->the_post();\n\t\t\t\t\t$showplan = true;\n\t\t\t\t\t$planfor = get_post_meta(get_the_ID(), 'plan_usge_for', true);\n\t\t\t\t\tif(isset($_POST['cat_id'])){\n\t\t\t\t\t\tif(!empty($_POST['cat_id'])){\n\t\t\t\t\t\t\tif(!empty($planUsage)){\n\t\t\t\t\t\t\t\tif($planUsage!=$planfor){\n\t\t\t\t\t\t\t\t\t$showplan = false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tif(!empty($planfor)){\n\t\t\t\t\t\t\t\tif($planUsage!=$planfor){\n\t\t\t\t\t\t\t\t\t$showplan = false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(!empty($showplan)){\n\t\t\t\t\t\tob_start();\n\t\t\t\t\t\tinclude( dirname(__FILE__) . '/templates/vertical-view-1.php');\n\t\t\t\t\t\t$output .= ob_get_contents();\n\t\t\t\t\t\tob_end_clean();\n\t\t\t\t\t\tob_flush();\n\t\t\t\t\t}\n\n\t\t\t}//END WHILE\n\t\t\twp_reset_postdata();\n\t\t\tif(!empty($output)){\n\t\t\t\t$returnData = array('response'=>'success', 'plans'=>$output);\n\t\t\t}else{\n\t\t\t\t$returnData = array('response'=>'success', 'plans'=> esc_html__('Sorry! There is no plan associated with the category', 'listingpro'));\n\t\t\t}\n\t\t}else{\n\t\t\t$returnData = array('response'=>'success', 'plans'=> esc_html__('Sorry! There is no plan associated with the category', 'listingpro'));\n\t\t}\n\n\texit(json_encode($returnData ));\n\t//wp_send_json_success( $returnData );\n}", "public function testPricesIncludeVat()\n {\n $total = new Total();\n\n $total\n ->addLineItem(new LineItem(780, 19, true, 1))\n ->addLineItem(new LineItem(2500, 7, true, 1))\n ;\n\n $this->assertEquals(3280, $total->getPrice()->getGrossAmount(), \"\", DELTA);\n $this->assertEquals(2992, $total->getPrice()->getNetAmount(), \"\", DELTA);\n $this->assertEquals(288, $total->getPrice()->getVatAmount(), \"\", DELTA);\n $this->assertEquals($total->getPrice()->getGrossAmount(), $total->getPrice()->getNetAmount() + $total->getPrice()->getVatAmount(), \"\", DELTA);\n }", "function extendPrices($prices, $_options = false) {\n\n\t\t$currency = false;\n\n\t\tif($_options !== false) {\n\t\t\tforeach($_options as $_option => $_value) {\n\t\t\t\tswitch($_option) {\n\n\t\t\t\t\tcase \"currency\" : $currency = $_value; break;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif($currency) {\n\n\t\t\tforeach($prices as $index => $price) {\n\t\t\t\tif($currency == $prices[$index][\"currency\"]) {\n\t\t\t\t\t$prices[$index][\"price_with_vat\"] = $price[\"price\"] * (1 + ($price[\"vatrate\"]/100));\n\t\t\t\t\t$prices[$index][\"vat_of_price\"] = $price[\"price\"] * ($price[\"vatrate\"]/100);\n\n\t\t\t\t\treturn $prices[$index];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\n\t\t\tforeach($prices as $index => $price) {\n\t\t\t\tif(!$currency || $currency == $prices[$index][\"currency\"]) {\n\t\t\t\t\t$prices[$index][\"price_with_vat\"] = $price[\"price\"]* (1 + ($price[\"vatrate\"]/100));\n\t\t\t\t\t$prices[$index][\"vat_of_price\"] = $price[\"price\"] * ($price[\"vatrate\"]/100);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $prices;\n\n\t}", "function addPriceFilter($db) { \n \n $min = \"SELECT min(product_price) FROM syst_products WHERE product_status = '1'\";\n $max = \"SELECT max(product_price) FROM syst_products WHERE product_status = '1'\";\n\n $statement = $db->prepare($min);\n $statement->execute();\n $range_min = $statement->fetch()[0];\n\n $statement = $db->prepare($max);\n $statement->execute();\n $range_max = $statement->fetch()[0];\n\n echo \"\n <div class=\\\"list-group\\\">\n <h3>Price</h3>\n <input type=\\\"hidden\\\" id=\\\"hidden_minimum_price\\\" value=\\\"\" . $range_min . \"\\\" />\n <input type=\\\"hidden\\\" id=\\\"hidden_maximum_price\\\" value=\\\"\" . $range_max . \"\\\" />\n <p id=\\\"price_show\\\">\" . $range_min . \" - \" . $range_max . \"</p>\n <div id=\\\"price_range\\\"></div>\n </div>\n \";\n }", "function wc_prices_include_tax()\n {\n }", "function gnj_check_active_price_filter( $min_price, $max_price ) {\n return isset( $_GET['min_price'] ) && $_GET['min_price'] == $min_price && isset( $_GET['max_price'] ) && $_GET['max_price'] == $max_price;\n}", "protected function loadWithPriceFilterWithoutPriceSorting() {}", "protected function loadWithPriceFilterWithoutPriceSorting() {}", "protected function preAddFilterConditions()\n {\n }", "public function testExactPriceFilter()\n {\n $isSuccessful = false;\n $this->_setHotelData();\n //Check if hotel data exists\n if(count($this->_hotelData) > 0) {\n //Check if first city data has more than zero city records\n $firstCityHotelsData = current($this->_hotelData);\n if(count($firstCityHotelsData) > 0) {\n $firstHotelData = current($firstCityHotelsData);\n $filters['priceRange'] = $firstHotelData->price;\n $filteredData = $this->_getFilteredData($filters);\n foreach ($filteredData as $hotelRecord) {\n if ($hotelRecord->price == $filters['priceRange']) {\n $isSuccessful = true;\n break;\n }\n }\n }\n }\n $this->assertTrue($isSuccessful);\n }", "protected function _getPriceFilter()\r\n {\r\n return $this->getChild('_price_filter');\r\n }", "protected function optionsAffectPrice() {\n $options = $this->getItem()->getProduct()->getOptions();\n\n foreach ($options as $option) {\n if ($option->hasPrice() && ((float) $option->getPrice() > 0)) {\n return true;\n }\n }\n\n return false;\n }", "function gnj_get_filter_args( $args = array() ) {\n $default_args = array( 'check_price_filter' => true );\n $args = wp_parse_args( $args, $default_args );\n extract( $args );\n\n $filter_value = array();\n $regexs = array( '/^filter_[a-zA-Z0-9]/', '/^query_type_[a-zA-Z0-9]/', '/product_tag/', '/product_cat/', '/source_id/', '/source_tax/' );\n\n if ( ! empty( $_GET ) ) {\n foreach ( $regexs as $regex ) {\n foreach ( $_GET as $query_var => $value ) {\n if ( preg_match( $regex, $query_var ) ) {\n $filter_value[$query_var] = $value;\n }\n }\n }\n }\n\n if ( $check_price_filter ) {\n // WooCommerce Price Filter\n if ( isset( $_GET['min_price'] ) ) {\n $filter_value['min_price'] = $_GET['min_price'];\n }\n\n if ( isset( $_GET['max_price'] ) ) {\n $filter_value['max_price'] = $_GET['max_price'];\n }\n }\n\n // WooCommerce In Stock/On Sale filters\n if ( isset( $_GET['instock_filter'] ) ) {\n $filter_value['instock_filter'] = $_GET['instock_filter'];\n }\n\n if ( isset( $_GET['onsale_filter'] ) ) {\n $filter_value['onsale_filter'] = $_GET['onsale_filter'];\n }\n\n if ( isset( $_GET['orderby'] ) ) {\n $filter_value['orderby'] = $_GET['orderby'];\n }\n\n if ( isset( $_GET['product_tag'] ) ) {\n $filter_value['product_tag'] = urlencode( $_GET['product_tag'] );\n }\n\n elseif( is_product_tag() && $queried_object ){\n $filter_value['product_tag'] = $queried_object->slug;\n }\n\n if (isset($_GET['product_cat'])) {\n $filter_value['product_cat'] = urlencode( $_GET['product_cat'] );\n }\n\n elseif( is_product_category() && $queried_object ){\n $filter_value['product_cat'] = $queried_object->slug;\n }\n\n if ( isset( $_GET['source_id'] ) && isset( $_GET['source_tax'] ) ) {\n $filter_value['source_id'] = $_GET['source_id'];\n $filter_value['source_tax'] = $_GET['source_tax'];\n }\n\n elseif( ! is_shop() && is_product_taxonomy() && $queried_object && ! isset( $filter_value['source_id'] ) && ! isset( $filter_value['source_tax'] )){\n $filter_value['source_id'] = $queried_object->term_id;\n $filter_value['source_tax'] = $queried_object->taxonomy;\n }\n\n return apply_filters( 'gnj_get_filter_args', $filter_value );\n}", "public function has_variable_prices() {\n\n\t\t$option = give_get_meta( $this->ID, '_give_price_option', true );\n\t\t$ret = 0;\n\n\t\tif ( $option === 'multi' ) {\n\t\t\t$ret = 1;\n\t\t}\n\n\t\t/**\n\t\t * Filter: Override whether the donation form has variables prices.\n\t\t *\n\t\t * @param bool $ret Does donation form have variable prices?\n\t\t * @param int|string $ID The ID of the donation form.\n\t\t */\n\t\treturn (bool) apply_filters( 'give_has_variable_prices', $ret, $this->ID );\n\n\t}", "public function applyAdditionalFilterParams(): void\n {\n\n }", "function cardealer_get_car_filtered_price() {\n\tglobal $wpdb;\n\n // Current site prefix\n $tbprefix = $wpdb->prefix;\n $sql = \"SELECT \";\n $sql .= \" min( FLOOR( price_meta.meta_value ) ) as min_price,\";\n $sql .= \" max( CEILING( price_meta.meta_value ) ) as max_price\";\n $sql .= \" FROM \".$tbprefix.\"posts\";\n $sql .= \" LEFT JOIN \".$tbprefix.\"postmeta as price_meta ON \".$tbprefix.\"posts.ID = price_meta.post_id\";\n $sql .= \" INNER JOIN \".$tbprefix.\"postmeta ON (\".$tbprefix.\"posts.ID = \".$tbprefix.\"postmeta.post_id )\"; \t\n $sql .= \" WHERE \".$tbprefix.\"posts.post_type IN ('cars')\";\n $sql .= \" AND \".$tbprefix.\"posts.post_status = 'publish'\";\n $sql .= \" AND price_meta.meta_key IN ('sale_price','regular_price')\";\n\treturn $wpdb->get_row( $sql );\n\n}", "public function get_variation_prices($for_display = \\false)\n {\n }", "public function on_init() {\n\t\tif ( WC_Dynamic_Pricing_Compatibility::is_wc_version_gte_2_1() ) {\n\t\t\tadd_filter( 'woocommerce_cart_item_price', array(&$this, 'on_display_cart_item_price_html'), 10, 3 );\n\t\t} else {\n\t\t\tadd_filter( 'woocommerce_cart_item_price_html', array(&$this, 'on_display_cart_item_price_html'), 10, 3 );\n\t\t}\n\t}", "function tjn_woocommerce_get_price_html( $price, $instance ) { \n // make filter magic happen here... \n return '<span itemProp=\"price\">'.$price.'</span>';\n}", "public function countries_using_vat()\n {\n }", "function setFilterSettings(array $filter)\n{\n global $powerTrailModuleSwitchOn;\n\n // reset all min-score options\n tpl_set_var(\"min_sel1\", \"\");\n tpl_set_var(\"min_sel2\", \"\");\n tpl_set_var(\"min_sel3\", \"\");\n tpl_set_var(\"min_sel4\", \"\");\n tpl_set_var(\"min_sel5\", \"\");\n tpl_set_var(\"max_sel1\", \"\");\n tpl_set_var(\"max_sel2\", \"\");\n tpl_set_var(\"max_sel3\", \"\");\n tpl_set_var(\"max_sel4\", \"\");\n tpl_set_var(\"max_sel5\", \"\");\n\n // go through filter values\n foreach ($filter as $key => $value) {\n $value = intval($value);\n if ($key == \"min_score\" || $key == \"max_score\") {\n if ($key == \"min_score\") {\n $minmax = \"min\";\n } else {\n $minmax = \"max\";\n }\n\n tpl_set_var($minmax . \"_sel\" . intval(GeoCacheCommons::ScoreAsRatingNum($value)), 'selected=\"selected\"');\n tpl_set_var($key, $value);\n continue;\n }\n\n if (! ($key == \"h_avail\" || $key == \"h_temp_unavail\" ||\n $key == \"be_ftf\" || $key == \"powertrail_only\" ||\n $key == \"map_type\" || $key == \"h_noscore\")) {\n // workaround for reversed values\n $value = 1 - $value;\n }\n\n if ($value) {\n $chk = ' checked=\"checked\"';\n } else {\n $chk = \"\";\n }\n\n tpl_set_var($key . \"_checked\", $chk);\n\n if ($key == 'map_type') {\n tpl_set_var('map_type', $value);\n } else {\n tpl_set_var($key, $value ? \"true\" : \"\");\n }\n }\n\n // hide powerTrails filter if powerTrails are disabled in config\n if ($powerTrailModuleSwitchOn) {\n tpl_set_var(\"powerTrails_display\", \"\");\n } else {\n tpl_set_var(\"powerTrails_display\", \"display:none\");\n }\n}", "public function areOtherPricesEnabled(){\n return $this->otherPricesEnabled;\n }", "public function applyFrontendPriceLimitations()\n {\n $this->_productLimitationFilters['use_price_index'] = true;\n if (!isset($this->_productLimitationFilters['customer_group_id'])) {\n $customerGroupId = Mage::getSingleton('customer/session')->getCustomerGroupId();\n $this->_productLimitationFilters['customer_group_id'] = $customerGroupId;\n }\n if (!isset($this->_productLimitationFilters['website_id'])) {\n $websiteId = Mage::app()->getStore($this->getStoreId())->getWebsiteId();\n $this->_productLimitationFilters['website_id'] = $websiteId;\n }\n $this->_applyProductLimitations();\n return $this;\n }", "public function is_vat_exempt()\n {\n }", "function item_prices_init(){\r\n\r\n\t\treturn TRUE;\r\n\t}", "public function shopPriceFilterProducts(Request $request, $vendorId)\n{\n if (!isset($request->second)){\n $products = Product::with('sub_categories','ratings')\n ->where('vendor_id',$vendorId)\n ->where('status',1)\n ->where('price','>=',(int)$request->first)->orderBy('name')->get();\n }else{\n $products = Product::with('sub_categories','ratings')\n ->where('vendor_id',$vendorId)\n ->where('status',1)\n ->where('price','>=',(int)$request->first)\n ->where('price','<=',(int)$request->second)->orderBy('name')->get();\n }\n return response()->json($products,200);\n}", "public function collectRates(Mage_Shipping_Model_Rate_Request $request)\n {\n // skip if not enabled\n\tif(!$this->isActive()){\n\t\treturn false;\n\t}\n\n\t$quote\t=\t$this->getQuote();\n\t$cart\t=\t$this->getCart();\n\n\t$method = Mage::getModel('shipping/rate_result_method');\n\t$method_name = '';\n\n\t/* Calcula o PESO CUBADO, que é a multiplicação das medidas de cada volume com sua quantidade e a densidade estabelecida como padrão por todas as transportadoras brasileiras.\n\t\tSe o PESO CUBADO for maior que o PESO REAL, o peso cubado é enviado para o web service calcular o frete. Caso contrário, o peso real é enviado.\n\t\tEsta é a diferença entre, por exemplo, carregar 10 kg de chumbo e 10 kg de pena. O espaço necessário para carregar o primeiro volume é muito menor que o requerido pelo segundo. */\n\t// Verifica se os campos \"comprimento\", \"largura\" e \"altura\" existem //\n\t$atributo_comprimento_existe = ($attribute = Mage::getModel('eav/entity_attribute')->loadByCode('catalog_product', 'length')) && ($attribute->getId());\n\t$atributo_largura_existe = ($attribute = Mage::getModel('eav/entity_attribute')->loadByCode('catalog_product', 'width')) && ($attribute->getId());\n\t$atributo_altura_existe = ($attribute = Mage::getModel('eav/entity_attribute')->loadByCode('catalog_product', 'height')) && ($attribute->getId());\n\n\t$peso_cubado_habilita = $atributo_comprimento_existe && $atributo_largura_existe && $atributo_altura_existe;\n\t// ================================================================= //\n\n\tif ($peso_cubado_habilita) {\n\t\t// Verifica a unidade de medida a ser utilizada //\n\t\tswitch ($this->getConfigData('measure_type')) {\n\t\t\tcase 'mm': $unidade_medida = 0.001; break;\n\t\t\tcase 'cm': $unidade_medida = 0.01; break;\n\t\t\tcase 'dm': $unidade_medida = 0.1; break;\n\t\t\tcase 'm':\n\t\t\tdefault: $unidade_medida = 1; break;\n\t\t}\n\t\t// ============================================ //\n\n\t\t// Verifica a densidade a ser utilizada, de acordo com o modal. Rodoviário = 300 Aéreo = 167 //\n\t\t$densidade = $this->getConfigData('modal_type') == 'R' ? 300 : 167;\n\n\t\t$peso_cubado = $peso_real = $peso_total = 0.00;\n\n\t\t// Calcula o peso cubado de cada item da sacola //\n\t\tforeach (Mage::getSingleton('checkout/session')->getQuote()->getAllItems() as $item) {\n\t\t\t// Carrega os dados do produto //\n\t\t\t$product = Mage::getSingleton('catalog/product')->load($item->getProduct()->getId());\n\n\t\t\t// Calcula a multiplicação do comprimento com a largura e com a altura, depois arredonda com duas casas decimais, pois uma precisão maior afeta negativamente o valor do frete //\n\t\t\t$peso_cubado_volume = (float)number_format((float)number_format($product->getData('length') * $unidade_medida, 3, '.', '') *\n\t\t\t\t\t\t\t\t\t\t\t\t\t (float)number_format($product->getData('width') * $unidade_medida, 3, '.', '') *\n\t\t\t\t\t\t\t\t\t\t\t\t\t (float)number_format($product->getData('height') * $unidade_medida, 3, '.', ''), 2, '.', '');\n\t\t\t// =========================================================================================================================================================================== //\n\n\t\t\tif ($peso_cubado_habilita && $peso_cubado_volume > 0.00) {\n\t\t\t\t// Multiplica o valor acima com a densidade, obtendo o peso cubado do volume //\n\t\t\t\t$peso_cubado_volume = (float)number_format($peso_cubado_volume * $densidade, 3, '.', '');\n\n\t\t\t\t// Multiplica o peso cubado do volume com a quantidade, obtendo o peso cubado total do item //\n\t\t\t\t$peso_cubado += (float)number_format($peso_cubado_volume * $item->getQty(), 3, '.', '');\n\t\t\t} else {\n\t\t\t\t// Desabilita o peso cubado //\n\t\t\t\t$peso_cubado = 0.00;\n\t\t\t\t$peso_cubado_habilita = false;\n\t\t\t\t// ======================== //\n\t\t\t}\n\n\t\t\t// Multiplica o peso real do produto com a quantidade, obtendo o peso real do item //\n\t\t\t$peso_real += (float)number_format($item->getWeight() * $item->getQty(), 3, '.', '');\n\t\t}\n\t\t// ============================================ //\n\n\t\t// Se o peso cubado é maior que o real, pega o cubado para enviar ao web service, caso contrário, pega o real //\n\t\t$Weight = $peso_cubado_habilita && $peso_cubado > $peso_real ? $peso_cubado : $peso_real;\n\t} else {\n\t\t// Pega o peso total dos itens //\n\t\t$Weight = $request->getPackageWeight();\n\t}\n\t// ================================================================================================================================================================================ //\n\n\t// Se a configuração do peso for em gramas, transforma o peso total para quilos //\n if ($this->getConfigData('weight_type') == 2) $Weight /= 1000;\n\n\t$PackageValue = number_format($request->getPackageValue(), 2, '.', '');\n\n\t// Verifica o CNPJ do destinatário //\n\tswitch($this->getConfigData('use_default')){\n\t\tcase 0:\n\t\t\t$cnpjdes = $quote->getData(\"customer_taxvat\");\n\t\t\tbreak;\n\n\t\tcase 1:\n\t\t\t$cnpjdes = $this->getConfigData('cnpj');\n\t\t\tbreak;\n\n\t\tcase 2:\n\t\t\t$cnpjdes = $this->getConfigData('cnpj_default');\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\t$cnpjdes = $quote->getData(\"customer_taxvat\");\n\t\t\tbreak;\n\t}\n\t// =============================== //\n\n\t// Constroi os parâmetros da chamada ao web service //\n\t$this->params = array(\"cnpj\" => preg_replace( '/[^0-9]/', '', $this->getConfigData('cnpj') ),\n\t\t\t\t\t\t \"emporigem\" => 2,\n\t\t\t\t\t\t \"ceporigem\" => preg_replace( '/[^0-9]/', '', Mage::getStoreConfig('shipping/origin/postcode', $this->getStore())),\n\t\t\t\t\t\t \"cepdestino\" => preg_replace( '/[^0-9]/', '', $request->getDestPostcode() ),\n\t\t\t\t\t\t \"cnpjrem\" => preg_replace( '/[^0-9]/', '', $this->getConfigData('cnpj') ),\n\t\t\t\t\t\t \"cnpjdes\" => preg_replace( '/[^0-9]/', '', $cnpjdes),\n\t\t\t\t\t\t \"tipofrete\" => $this->getConfigData('shipping_type'),\n\t\t\t\t\t\t \"peso\" => $Weight,\n\t\t\t\t\t\t \"valornf\" => $PackageValue,\n\t\t\t\t\t\t \"volume\" => $cart->getItemsCount(),\n\t\t\t\t\t\t \"modal\" => $this->getConfigData('modal_type'));\n\t// ================================================ //\n\n\t// Chama o web service //\n\t$calFrete = $this->getConfigData('access_type') == 1 ? $this->CalculaFrete() : simplexml_load_file($this->_url_base_web . implode(',', $this->params));\n\n\t// Inicializa o resultado da função //\n $this->_result = Mage::getModel('shipping/rate_result');\n\n\t// Cria o log da chamada deste método //\n\tif($this->getConfigData('debug')){\n\t\t//Mage::log($request->getData(), null, 'request.log');\n\t\t//Mage::log($quote->getData(), null, 'quote.log');\n\t\tMage::log(\"--------ENVIADO--------------------\", null, 'braspress.log');\n\t\tMage::log($this->params, null, 'braspress.log');\n\t\tMage::log(\"-----------------------------------\", null, 'braspress.log');\n\t\tMage::log(\"--------RESPOSTA-------------------\", null, 'braspress.log');\n\t\tMage::log($calFrete, null, 'braspress.log');\n\t\tMage::log(\"-----------------------------------\", null, 'braspress.log');\n\n\t\t//Mage::log($quote->getData(),null,'teste1.log'); // order data\n\t\t//Mage::log(Mage::helper('checkout')->getQuote()->getShippingAddress()->getData(),null,'teste2.log'); // shipping data\n\t\t//Mage::log(Mage::helper('tax'), null, 'tax.log');\t\n\t}\n\t// ================================== //\n \n if($calFrete->MSGERRO != \"OK\"){\n $this->_throwError('specificerrmsg', $calFrete->MSGERRO, __LINE__); \n }else{\n if($calFrete->TOTALFRETE > (float) 0 ){\n $method->setCarrier($this->_code);\n $method->setCarrierTitle($this->getConfigData('title'));\n \n // record method information\n $method->setMethod($this->_code);\n\n\t\t\tMage::log($calFrete->PRAZO, null, 'braspress_test.log');\n\t\t\t\n\t\t\tif($this->getConfigData('delivery_time')){\n\t\t\t\t$prazo = $calFrete->PRAZO;\n\t\t\t\tswitch($prazo){\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\t$prazomsg = ' entrega imediata';\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\t$prazomsg = ' prazo de 1 dia';\n\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$prazomsg = ' prazo de '.$prazo.' dias';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$method_name .= $this->getConfigData('method_name').$prazomsg;\n\t\t\t}else{\n\t\t\t\t$method_name .= $this->getConfigData('method_name');\n\t\t\t}\n\n $method->setMethodTitle($method_name);\n\n\t\t\t// Verifica se deve ser calculada uma porcentagem sobre o valor da compra para ser usada como valor do frete //\n\t\t\t$min_carrier_valid = $this->getConfigData('min_carrier_active') == 1 &&\n\t\t\t\t\t\t\t\t ($min_carrier_value = (float)preg_replace(array('|[^\\d\\.,]|', '|\\.|', '|,|'), array('', '', '.'), $this->getConfigData('min_carrier_value'))) && $min_carrier_value > 0.00 &&\n\t\t\t\t\t\t\t\t ($min_carrier_max_order_value = (float)preg_replace(array('|[^\\d\\.,]|', '|\\.|', '|,|'), array('', '', '.'), $this->getConfigData('min_carrier_max_order_value'))) && $min_carrier_max_order_value > 0.00 &&\n\t\t\t\t\t\t\t\t $PackageValue <= $min_carrier_max_order_value;\n\n\t\t\t$percentage_over_order_value = $this->getConfigData('percentage_over_order_value') == 1 &&\n\t\t\t\t\t\t\t\t\t\t ($percentage = (float)preg_replace(array('|[^\\d\\.,]|', '|\\.|', '|,|'), array('', '', '.'), $this->getConfigData('percentage'))) &&\n\t\t\t\t\t\t\t\t\t\t ($percentage > 0 && $percentage < 100);\n\n\t\t\tif ($min_carrier_valid) {\n\t\t\t\t$price = (float)number_format($min_carrier_value, 2, '.', '');\n\t\t\t} elseif ($percentage_over_order_value) {\n\t\t\t\t$price = (float)number_format($PackageValue * $percentage / 100, 2, '.', '');\n\t\t\t} else {\n\t\t\t\t// Formata o valor do frete para float, caso contrário, não grava os centavos //\n\t\t\t\t$price = (float)preg_replace(array('|[^\\d\\.,]|', '|\\.|', '|,|'), array('', '', '.'), $calFrete->TOTALFRETE);\n\t\t\t}\n\t\t\t// ========================================================================================================= //\n\n\t\t\t$method->setPrice($price);\n\n // add this rate to the result\n $this->_result->append($method);\n }\n }\n \n return $this->_result;\n //return Zend_Debug::Dump($calFrete->SUBTOTAL);\n\n }", "public function applyFilter();", "public function addVendorFilter($vendorIds=array()){\r\n $this->_vendorIds = $vendorIds;\r\n $select = $this->getSelect();\r\n\r\n $resource = Mage::getSingleton('core/resource');\r\n $select->joinLeft(array('cp'=> $this->getTable('catalog/product')),'main_table.product_id=cp.entity_id',array())\r\n ->joinLeft(array('cpv'=>$resource->getTableName('catalog_product_entity_varchar')),'cp.entity_id = cpv.entity_id AND cpv.attribute_id=962',array('vendor_id'=> 'cpv.value'))\r\n ->joinLeft(array('v'=> $resource->getTableName('sm_vendor')),'cpv.value = v.vendor_id',array('vendor_name'=>'v.vendor_name'))\r\n ;\r\n if(!empty($vendorIds)){\r\n $select->where('cpv.value=?',array($vendorIds));\r\n }\r\n\r\n\r\n// if(!empty($vendorIds)){\r\n// $select->group('main_table.vendor_id')->where('main_table.vendor_id=?',array($vendorIds));\r\n// }\r\n\r\n return $this;\r\n }", "function CheckFilter() {}", "public static function collectsEuVat()\n {\n if (config('spark.collects_eu_vat')) {\n return config('spark.collects_eu_vat');\n }\n\n return static::enabled('eu-vat-collection');\n }", "public function update_filters() {\n\n\t\tif ( 'plugin' == $this->_inclusion && $this->is_auto_update() ) {\n\n\t\t\t// Plugin update hooks\n\t\t\t// Automatically plugin update check\n\t\t\tadd_filter( 'site_transient_update_plugins', array( &$this, 'site_transient_update_plugins' ) );\n\n\t\t\t// plugin api info screen\n\t\t\tadd_filter( 'plugins_api', array( &$this, 'plugins_api' ), - 100, 3 );\n\n\t\t}\n\t}", "public function filter()\n {\n if (!$_POST) {\n\n header('Location: /product/all');\n die();\n }\n\n $productModel = new ProductModel();\n\n $filterData = $productModel->getFilterData();\n\n $this->data['filterData'] = $filterData;\n\n if ($_POST['price-from'] == 0) {\n\n Session::delete('from');\n\n } else {\n\n Session::set('from', $_POST['price-from']);\n }\n\n if ($_POST['price-to'] == $filterData['value'][1]) {\n\n Session::delete('to');\n\n } else {\n\n Session::set('to', $_POST['price-to']);\n }\n\n if (!isset($_POST['vendor'])) {\n\n $_POST['vendor'] = $filterData['vendors'];\n\n Session::delete('vendorChecked');\n\n } else {\n\n Session::set('vendorChecked', serialize($_POST['vendor']));\n }\n\n if (!isset($_POST['type'])) {\n\n $_POST['type'] = $filterData['types'];\n\n Session::delete('typeChecked');\n\n } else {\n\n Session::set('typeChecked', serialize($_POST['type']));\n }\n\n $products = $productModel->getProductsByFilter($_POST);\n\n $this->data['products'] = $products;\n\n $this->render('filter');\n }", "function add_filters()\n {\n }", "public static function getPriceTypeFilter()\n {\n return Prices::getPriceTypesForRegion();\n }", "public static function add_filters()\n {\n }", "public static function add_filters()\n {\n }", "function zen_get_products_display_price($products_id) {\n global $db, $currencies;\n\n $free_tag = \"\";\n $call_tag = \"\";\n\n// 0 = normal shopping\n// 1 = Login to shop\n// 2 = Can browse but no prices\n // verify display of prices\n switch (true) {\n case (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == ''):\n // customer must be logged in to browse\n return '';\n break;\n case (CUSTOMERS_APPROVAL == '2' and $_SESSION['customer_id'] == ''):\n // customer may browse but no prices\n return TEXT_LOGIN_FOR_PRICE_PRICE;\n break;\n case (CUSTOMERS_APPROVAL == '3' and TEXT_LOGIN_FOR_PRICE_PRICE_SHOWROOM != ''):\n // customer may browse but no prices\n return TEXT_LOGIN_FOR_PRICE_PRICE_SHOWROOM;\n break;\n case ((CUSTOMERS_APPROVAL_AUTHORIZATION != '0' and CUSTOMERS_APPROVAL_AUTHORIZATION != '3') and $_SESSION['customer_id'] == ''):\n // customer must be logged in to browse\n return TEXT_AUTHORIZATION_PENDING_PRICE;\n break;\n case ((CUSTOMERS_APPROVAL_AUTHORIZATION != '0' and CUSTOMERS_APPROVAL_AUTHORIZATION != '3') and $_SESSION['customers_authorization'] > '0'):\n // customer must be logged in to browse\n return TEXT_AUTHORIZATION_PENDING_PRICE;\n break;\n default:\n // proceed normally\n break;\n }\n\n// show case only\n if (STORE_STATUS != '0') {\n if (STORE_STATUS == '1') {\n return '';\n }\n }\n\n // $new_fields = ', product_is_free, product_is_call, product_is_showroom_only';\n $product_check = $db->Execute(\"select products_tax_class_id, products_price, products_priced_by_attribute, product_is_free, product_is_call, products_type from \" . TABLE_PRODUCTS . \" where products_id = '\" . (int)$products_id . \"'\" . \" limit 1\");\n\n // no prices on Document General\n if ($product_check->fields['products_type'] == 3) {\n return '';\n }\n\n $show_display_price = '';\n $display_normal_price = zen_get_products_base_price($products_id);\n $display_special_price = zen_get_products_special_price($products_id, true);\n $display_sale_price = zen_get_products_special_price($products_id, false);\n\n $show_sale_discount = '';\n if (SHOW_SALE_DISCOUNT_STATUS == '1' and ($display_special_price != 0 or $display_sale_price != 0)) {\n if ($display_sale_price) {\n if (SHOW_SALE_DISCOUNT == 1) {\n if ($display_normal_price != 0) {\n $show_discount_amount = number_format(100 - (($display_sale_price / $display_normal_price) * 100),SHOW_SALE_DISCOUNT_DECIMALS);\n } else {\n $show_discount_amount = '';\n }\n $show_sale_discount = '<span class=\"productPriceDiscount\">' . $show_discount_amount . PRODUCT_PRICE_DISCOUNT_PERCENTAGE . '</span>';\n\n } else {\n $show_sale_discount = '<span class=\"productPriceDiscount\">' . $currencies->display_price(($display_normal_price - $display_sale_price), zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . PRODUCT_PRICE_DISCOUNT_AMOUNT . '</span>';\n }\n } else {\n if (SHOW_SALE_DISCOUNT == 1) {\n $show_sale_discount = '<span class=\"productPriceDiscount\">' . number_format(100 - (($display_special_price / $display_normal_price) * 100),SHOW_SALE_DISCOUNT_DECIMALS) . PRODUCT_PRICE_DISCOUNT_PERCENTAGE . '</span>';\n } else {\n $show_sale_discount = '<span class=\"productPriceDiscount\">' . $currencies->display_price(($display_normal_price - $display_special_price), zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . PRODUCT_PRICE_DISCOUNT_AMOUNT . '</span>';\n }\n }\n }\n\n if ($display_special_price) {\n $show_normal_price = '<span class=\"normalprice\">' . $currencies->display_price($display_normal_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . ' </span>';\n if ($display_sale_price && $display_sale_price != $display_special_price) {\n $show_special_price = '<span class=\"productSpecialPriceSale\">' . $currencies->display_price($display_special_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . '</span>';\n if ($product_check->fields['product_is_free'] == '1') {\n $show_sale_price = '<span class=\"productSalePrice\">' . PRODUCT_PRICE_SALE . '<s>' . $currencies->display_price($display_sale_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . '</s>' . '</span>';\n } else {\n $show_sale_price = '<span class=\"productSalePrice\">' . PRODUCT_PRICE_SALE . $currencies->display_price($display_sale_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . '</span>';\n }\n } else {\n if ($product_check->fields['product_is_free'] == '1') {\n $show_special_price = '<span class=\"productSpecialPrice\">' . '<s>' . $currencies->display_price($display_special_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . '</s>' . '</span>';\n } else {\n $show_special_price = '<span class=\"productSpecialPrice\">' . $currencies->display_price($display_special_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . '</span>';\n }\n $show_sale_price = '';\n }\n } else {\n if ($display_sale_price) {\n $show_normal_price = '<span class=\"normalprice\">' . $currencies->display_price($display_normal_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . ' </span>';\n $show_special_price = '';\n $show_sale_price = '<span class=\"productSalePrice\">' . PRODUCT_PRICE_SALE . $currencies->display_price($display_sale_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . '</span>';\n } else {\n if ($product_check->fields['product_is_free'] == '1') {\n $show_normal_price = '<s>' . $currencies->display_price($display_normal_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . '</s>';\n } else {\n $show_normal_price = '<div class=\"single_price\">' . $currencies->display_price($display_normal_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . '</div>';\n }\n $show_special_price = '';\n $show_sale_price = '';\n }\n }\n\n if ($display_normal_price == 0) {\n // don't show the $0.00\n $final_display_price = $show_special_price . $show_sale_price . $show_sale_discount;\n } else {\n $final_display_price = $show_normal_price . $show_special_price . $show_sale_price . $show_sale_discount;\n }\n\n // If Free, Show it\n if ($product_check->fields['product_is_free'] == '1') {\n if (OTHER_IMAGE_PRICE_IS_FREE_ON=='0') {\n $free_tag = '<br />' . PRODUCTS_PRICE_IS_FREE_TEXT;\n } else {\n $free_tag = '<br />' . zen_image(DIR_WS_TEMPLATE_IMAGES . OTHER_IMAGE_PRICE_IS_FREE, PRODUCTS_PRICE_IS_FREE_TEXT);\n }\n }\n\n // If Call for Price, Show it\n if ($product_check->fields['product_is_call']) {\n if (PRODUCTS_PRICE_IS_CALL_IMAGE_ON=='0') {\n $call_tag = '<br />' . PRODUCTS_PRICE_IS_CALL_FOR_PRICE_TEXT;\n } else {\n $call_tag = '<br />' . zen_image(DIR_WS_TEMPLATE_IMAGES . OTHER_IMAGE_CALL_FOR_PRICE, PRODUCTS_PRICE_IS_CALL_FOR_PRICE_TEXT);\n }\n }\n\n return $final_display_price . $free_tag . $call_tag;\n }", "public function productSearchPriceDataProvider(): array\n {\n return [\n [\n 'price_filter' => 'from: \"0.01\" to: \"9.99\"',\n 'sort' => 'price: ASC',\n 'items' => [\n [\n 'name' => 'Product with price 0.01',\n 'price' => [\n 'minimalPrice' => [\n 'amount' => [\n 'value' => 0.01,\n ],\n ],\n ],\n ],\n [\n 'name' => 'Product with price 5',\n 'price' => [\n 'minimalPrice' => [\n 'amount' => [\n 'value' => 5,\n ],\n ],\n ],\n ],\n [\n 'name' => 'Product with price 9.99',\n 'price' => [\n 'minimalPrice' => [\n 'amount' => [\n 'value' => 9.99,\n ],\n ],\n ],\n ],\n ],\n ],\n [\n 'price_filter' => 'from: \"5.01\" to: \"10\"',\n 'sort' => 'price: DESC',\n 'items' => [\n [\n 'name' => 'Product with price 10',\n 'price' => [\n 'minimalPrice' => [\n 'amount' => [\n 'value' => 10,\n ],\n ],\n ],\n ],\n [\n 'name' => 'Product with price 9.99',\n 'price' => [\n 'minimalPrice' => [\n 'amount' => [\n 'value' => 9.99,\n ],\n ],\n ],\n ],\n ],\n ],\n [\n 'price_filter' => 'from: \"5\"',\n 'sort' => 'price: DESC',\n 'items' => [\n [\n 'name' => 'Product with price 10',\n 'price' => [\n 'minimalPrice' => [\n 'amount' => [\n 'value' => 10,\n ],\n ],\n ],\n ],\n [\n 'name' => 'Product with price 9.99',\n 'price' => [\n 'minimalPrice' => [\n 'amount' => [\n 'value' => 9.99,\n ],\n ],\n ],\n ],\n [\n 'name' => 'Product with price 5',\n 'price' => [\n 'minimalPrice' => [\n 'amount' => [\n 'value' => 5,\n ],\n ],\n ],\n ],\n ],\n ],\n ];\n }", "private function addCommonFilters()\n {\n // Setting proper shop\n $this->getSearchAdapter()->addFilter('id_shop', [(int) $this->context->shop->id]);\n\n // Visibility of a product must be in catalog or both (search & catalog)\n $this->addFilter('visibility', ['both', 'catalog']);\n\n // User must belong to one of the groups that can access the product\n // (Actually it's categories that define access to a product, user must have access to at least\n // one category the product is assigned to.)\n if (Group::isFeatureActive()) {\n $groups = FrontController::getCurrentCustomerGroups();\n $this->addFilter('id_group', empty($groups) ? [Group::getCurrent()->id] : $groups);\n }\n }", "public function get_is_vat_exempt()\n {\n }", "protected function is_using_sitewide_stock_threshold_only()\n {\n }", "public function offerPriceFilter(Request $request)\n {\n if (!isset($request->second)){\n $products = Product::with('sub_categories','ratings')\n ->where('offer_product','=',1)\n ->where('status',1)->where('previous_price','>=',(int)$request->first)->orderBy('name')->get();\n }else{\n $products = Product::with('sub_categories','ratings')\n ->where('offer_product','=',1)\n ->where('previous_price','>=',(int)$request->first)\n ->where('status',1) ->where('previous_price','<=',(int)$request->second)->orderBy('name')->get();\n }\n return response()->json($products,200);\n }", "function acf_enable_filters($filters = array())\n{\n}", "public function price_check()\n {\n /* BENCHMARK */ $this->benchmark->mark('func_price_check_start');\n\n $cart=$this->cart->contents();\n\n $changes_made=0;\n\n if (count($cart)>0)\n {\n // get all the variations that are bagged\n $where_in=array();\n $sales=array();\n foreach($cart as $c)\n {\n if ($c['id']!='postage' &&\n $c['id']!='voucher')\n {\n $where_in[]=$c['id'];\n }\n }\n if (count($where_in)>0)\n {\n $query=$this->db->select('*')->from('nvar')->where_in('nvar_id',$where_in);\n $res=$query->get();\n $sales=$res->result_array();\n }\n\n // now convert these into an array keyed with the nvar_id containing the sales values\n foreach ($sales as $s)\n {\n $sale_key[$s['nvar_id']]['start']=$s['sale_start'];\n $sale_key[$s['nvar_id']]['end']=$s['sale_end'];\n $sale_key[$s['nvar_id']]['sale']=$s['sale_price'];\n $sale_key[$s['nvar_id']]['price']=$s['price'];\n }\n\n $now=date('Y-m-d',time());\n\n foreach ($cart as $c)\n {\n if ($c['id']!='postage' &&\n $c['id']!='voucher')\n {\n // check sale dates and get price\n if ($sale_key[$c['id']]['start']<=$now &&\n $sale_key[$c['id']]['end']>=$now)\n {\n // on sale\n $new_price=$sale_key[$c['id']]['sale'];\n }\n else\n {\n // not on sale\n $new_price=$sale_key[$c['id']]['price'];\n }\n\n // check for difference between prices\n if ($new_price!=$c['price'])\n {\n $changes_made=1;\n\n // initialise the new row with the same values as $c but a new price\n $new_row=$c;\n $new_row['price']=$new_price;\n\n // get ready to remove the old row\n $remove_row=array('rowid'=>$c['rowid'],'qty'=>0);\n\n // remove then add\n $this->cart->update($remove_row);\n $this->cart->insert($new_row);\n }\n\n }\n }\n }\n\n return $changes_made;\n\n /* BENCHMARK */ $this->benchmark->mark('func_price_check_end');\n }", "private function addSearchFilters($selectedFilters)\n {\n foreach ($selectedFilters as $key => $filterValues) {\n if (!count($filterValues)) {\n continue;\n }\n\n switch ($key) {\n case 'id_feature':\n $operationsFilter = [];\n foreach ($filterValues as $featureId => $filterValue) {\n $this->getSearchAdapter()->addOperationsFilter(\n 'with_features_' . $featureId,\n [[['id_feature_value', $filterValue]]]\n );\n }\n break;\n\n case 'id_attribute_group':\n $operationsFilter = [];\n foreach ($filterValues as $attributeId => $filterValue) {\n $this->getSearchAdapter()->addOperationsFilter(\n 'with_attributes_' . $attributeId,\n [[['id_attribute', $filterValue]]]\n );\n }\n break;\n\n case 'category':\n $this->addFilter('id_category', $filterValues);\n break;\n\n case 'availability':\n /*\n * $filterValues options can have following values:\n * 0 - Not available - 0 or less quantity and disabled backorders\n * 1 - Available - Positive quantity or enabled backorders\n * 2 - In stock - Positive quantity\n */\n\n // If all three values are checked, we show everything\n if (count($filterValues) == 3) {\n break;\n }\n\n // If stock management is deactivated, we show everything\n if (!$this->psStockManagement) {\n break;\n }\n\n $operationsFilter = [];\n\n // Simple cases with 1 option selected\n if (count($filterValues) == 1) {\n // Not available\n if ($filterValues[0] == Availability::NOT_AVAILABLE) {\n $operationsFilter[] = [\n ['quantity', [0], '<='],\n ['out_of_stock', $this->psOrderOutOfStock ? [0] : [0, 2], '='],\n ];\n // Available\n } elseif ($filterValues[0] == Availability::AVAILABLE) {\n $operationsFilter[] = [\n ['out_of_stock', $this->psOrderOutOfStock ? [1, 2] : [1], '='],\n ];\n $operationsFilter[] = [\n ['quantity', [0], '>'],\n ];\n // In stock\n } elseif ($filterValues[0] == Availability::IN_STOCK) {\n $operationsFilter[] = [\n ['quantity', [0], '>'],\n ];\n }\n // Cases with 2 options selected\n } elseif (count($filterValues) == 2) {\n // Not available and available, we show everything\n if (in_array(Availability::NOT_AVAILABLE, $filterValues) && in_array(Availability::AVAILABLE, $filterValues)) {\n break;\n // Not available or in stock\n } elseif (in_array(Availability::NOT_AVAILABLE, $filterValues) && in_array(Availability::IN_STOCK, $filterValues)) {\n $operationsFilter[] = [\n ['quantity', [0], '<='],\n ['out_of_stock', $this->psOrderOutOfStock ? [0] : [0, 2], '='],\n ];\n $operationsFilter[] = [\n ['quantity', [0], '>'],\n ];\n // Available or in stock\n } elseif (in_array(Availability::AVAILABLE, $filterValues) && in_array(Availability::IN_STOCK, $filterValues)) {\n $operationsFilter[] = [\n ['out_of_stock', $this->psOrderOutOfStock ? [1, 2] : [1], '='],\n ];\n $operationsFilter[] = [\n ['quantity', [0], '>'],\n ];\n }\n }\n\n $this->getSearchAdapter()->addOperationsFilter(\n self::STOCK_MANAGEMENT_FILTER,\n $operationsFilter\n );\n break;\n\n case 'manufacturer':\n $this->addFilter('id_manufacturer', $filterValues);\n break;\n\n case 'condition':\n if (count($selectedFilters['condition']) == 3) {\n break;\n }\n $this->addFilter('condition', $filterValues);\n break;\n\n case 'weight':\n if (!empty($selectedFilters['weight'][0]) || !empty($selectedFilters['weight'][1])) {\n $this->getSearchAdapter()->addFilter(\n 'weight',\n [(float) $selectedFilters['weight'][0]],\n '>='\n );\n $this->getSearchAdapter()->addFilter(\n 'weight',\n [(float) $selectedFilters['weight'][1]],\n '<='\n );\n }\n break;\n\n case 'price':\n if (isset($selectedFilters['price'])\n && (\n $selectedFilters['price'][0] !== '' || $selectedFilters['price'][1] !== ''\n )\n ) {\n $this->addPriceFilter(\n (float) $selectedFilters['price'][0],\n (float) $selectedFilters['price'][1]\n );\n }\n break;\n }\n }\n }", "private function addPriceFilter($minPrice, $maxPrice)\n {\n $this->getSearchAdapter()->addFilter('price_min', [$maxPrice], '<=');\n $this->getSearchAdapter()->addFilter('price_max', [$minPrice], '>=');\n }", "public function testPriceRangeFilter()\n {\n $isSuccessful = false;\n $this->_setHotelData();\n //Check if hotel data exists\n if(count($this->_hotelData) > 0) {\n //Check if first city data has more than zero city records\n $firstCityHotelsData = current($this->_hotelData);\n if(count($firstCityHotelsData) > 0) {\n $firstHotelData = current($firstCityHotelsData);\n $price = $firstHotelData->price;\n $filters['priceRange'] = \"$\" . ($price - 10) . \":\" . \"$\" . ($price + 100);\n $filteredData = $this->_getFilteredData($filters);\n foreach ($filteredData as $hotelRecord) {\n if (($price - 10) <= $hotelRecord->price && $hotelRecord->price <= ($price + 100)) {\n $isSuccessful = true;\n break;\n }\n }\n }\n }\n $this->assertTrue($isSuccessful);\n }", "public function searchFilter(Request $request)\n {\n // $paginator = $advancedSearch->get(12);\n \n // $searchCreiteria = $advancedSearch->getSearchCriteria();\n //$title = $advancedSearch->getMainTitle();\n\t//\t //dd($products) ;\n /* \n\n\t\t*/$where = array() ;\n\t\t if(isset($request->price_max) ){\n array_push($where , ['price' , '<' , $request->price_max ]) ;\n } \n\t\tif(isset($request->section_id) ){\n array_push($where , ['section_id' , '=' , $request->section_id ]) ;\n }\n\t\tif(isset($request->sub_section_id) ){\n array_push($where , ['sub_section_id' , '=' , $request->sub_section_id ]) ;\n }\n\t\tif(isset($request->sub_sub_section_id) ){\n array_push($where , ['sub_sub_section_id' , '=' , $request->sub_sub_section_id ]) ;\n }\n\t\tif(isset($request->price_min) ){\n array_push($where , ['price' , '>' , $request->price_min ]) ;\n } //dd($where) ;\n\t\t//$products = Product::where($where)->where('active' , 'yes')->get() ;; dd($products) ;\n\t\t if(isset($request->order) ){\n\t\t\t switch ($request->order)\n {\n\n case 'old':\n\t\t\tarray_push($where , ['created_at' , '>' , $request->price_max ]) ;\n $products = Product::where($where)->orderBY('created_at' , 'desc')->where('active' , 'yes')->take(20)->get() ;;\n\t\t\t\n break;\n\n case 'new':\n $products = Product::where($where)->orderBY('created_at' , 'asc')->where('active' , 'yes')->take(20)->get() ;;\n\t\t\t\n break;\n case 'low_price':\n $products = Product::where($where)->orderBY('created_at' , 'asc')->where('active' , 'yes')->take(20)->get() ;;\n\t\t\t\n break;\n\n case 'height_price':\n $products = Product::where($where)->orderBY('price' , 'desc')->where('active' , 'yes')->take(20)->get() ;;\n\t\t\t\n break; \n default:\n\t\t\t$products = Product::where($where)->where('active' , 'yes')->take(20)->get() ;;\n\t\t\t break ;\n // $this->builder->orderBy(DB::raw('`products`.`created_at`'), 'DESC');\n break;\n }\n \n }\n\t\t// dd($products) ;\n\t\t//$products = Product::where($where)->where('active' , 'yes')->get() ;;\n\t\treturn view('filter_search' , ['products' => $products ]) ;\n }", "public function add_compatibility() {\r\n\r\n\t\tadd_filter( 'wc_epo_convert_to_currency', array( $this, 'wc_epo_convert_to_currency' ), 10, 3 );\r\n\r\n\t\tadd_filter( 'wc_epo_product_price', array( $this, 'wc_epo_product_price' ), 10, 3 );\r\n\r\n\t\tadd_filter( 'wc_epo_product_price_correction', array( $this, 'wc_epo_product_price_correction' ), 10, 2 );\r\n\t\tadd_filter( 'wc_epo_option_price_correction', array( $this, 'wc_epo_option_price_correction' ), 10, 3 );\r\n\r\n\t\tadd_filter( 'woocs_fixed_raw_woocommerce_price', array( $this, 'woocs_fixed_raw_woocommerce_price' ), 10, 3 );\r\n\r\n\t\tadd_filter( 'wc_epo_get_current_currency_price', array( $this, 'wc_epo_get_current_currency_price' ), 10, 7 );\r\n\t\tadd_filter( 'wc_epo_remove_current_currency_price', array( $this, 'wc_epo_remove_current_currency_price' ), 10, 8 );\r\n\r\n\t\tadd_filter( 'wc_epo_get_currency_price', array( $this, 'tm_wc_epo_get_currency_price' ), 10, 8 );\r\n\t\tadd_filter( 'woocommerce_tm_epo_price_add_on_cart', array( $this, 'tm_epo_price_add_on_cart' ), 10, 2 );\r\n\r\n\t\tadd_filter( 'woocommerce_tm_epo_price_per_currency_diff', array( $this, 'tm_epo_price_per_currency_diff' ), 10, 2 );\r\n\r\n\t\tadd_filter( 'wc_epo_get_price_html', array( $this, 'wc_epo_get_price_html' ), 10, 2 );\r\n\r\n\t\t/** Aelia only **/\r\n\t\tadd_filter( 'wc_epo_cart_set_price', array( $this, 'wc_epo_cart_set_price' ), 10, 2 );\r\n\r\n\t\tadd_filter( 'wc_epo_cs_convert', array( $this, 'wc_epo_cs_convert' ), 10, 3 );\r\n\r\n\t\tadd_action( 'wc_epo_currency_actions', array( $this, 'wc_epo_currency_actions' ), 10, 3 );\r\n\r\n\t\tadd_filter( 'wc_epo_script_args', array( $this, 'wc_epo_script_args' ), 10, 1 );\r\n\r\n\t}", "public function priceFilter(Request $request)\n{\n if (!isset($request->second)){\n $products = Product::with('sub_categories','ratings')\n ->where('status',1)->where('price','>=',(int)$request->first)->orderBy('name')->get();\n }else{\n $products = Product::with('sub_categories','ratings')\n ->where('price','>=',(int)$request->first)\n ->where('status',1) ->where('price','<=',(int)$request->second)->orderBy('name')->get();\n }\n return response()->json($products,200);\n}", "public function wpcd_cloud_provider_table_filtering() {\n\n\t\tglobal $typenow, $pagenow;\n\n\t\t$post_type = 'wpcd_cloud_provider';\n\n\t\tif ( is_admin() && 'edit.php' === $pagenow && $typenow === $post_type ) {\n\n\t\t\t// Provider Type.\n\t\t\t$provider_type = $this->generate_provider_meta_dropdown( $post_type, 'wpcd_cloud_provider_type', __( 'Provider Type', 'wpcd' ) );\n\t\t\techo $provider_type;\n\n\t\t\t// Active.\n\t\t\t$cloud_options = array(\n\t\t\t\t'active' => __( 'Active', 'wpcd' ),\n\t\t\t\t'inactive' => __( 'Inactive', 'wpcd' ),\n\t\t\t);\n\t\t\t$cloud_active = WPCD_WORDPRESS_APP()->generate_meta_dropdown( 'wpcd_cloud_provider_inactive', __( 'Provider Status', 'wpcd' ), $cloud_options );\n\t\t\techo $cloud_active;\n\n\t\t}\n\t}", "protected function set_hooks() {\n\t\tadd_filter('woocommerce_dynamic_pricing_get_rule_amount', array($this, 'woocommerce_dynamic_pricing_get_rule_amount'), 20, 4);\n\t\tadd_filter('wc_dynamic_pricing_load_modules', array($this, 'wc_dynamic_pricing_load_modules'), 20);\n\t}", "function filters()\n {\n }", "public function applyFilters() {\r\n $title_length = 30;\r\n $number_of_likes = 10;\r\n $total_sales = 200;\r\n $min_canadian_dollar_price = 25;\r\n $min_euro_price = 20;\r\n $filter['title_length'] = $title_length;\r\n $filter['number_of_likes'] = $number_of_likes;\r\n $filter['total_sales'] = $total_sales;\r\n $filter['min_canadian_dollar_price'] = $min_canadian_dollar_price;\r\n $filter['min_euro_price'] = $min_euro_price;\r\n\r\n return $filter;\r\n }", "public function filter() {\n\n //* 1.) format logical operator\n $patterns = ['/gte/', '/gt/', '/lte/', '/lt/'];\n $replacements = ['>=', '>', '<=', '<'];\n \n $queryStr = json_encode($this->queryString);\n $queryStr = preg_replace($patterns, $replacements, $queryStr);\n $queryStr = json_decode($queryStr);\n\n //* 2.) filtering based on condition\n\n // ! For apartment\n if ($this->modelType === 'apartment') {\n\n // * firstly we just get visible and available apartment (active, available)\n $this->query = $this->query->where('visible', 1)->where('status', 'còn phòng');\n\n // * only accept one in district / geo point\n if (property_exists($queryStr, 'district') \n && property_exists($queryStr, 'latitude')\n && property_exists($queryStr, 'longitude')) {\n throw new HttpResponseException(response()->json([\n 'status' => 'fail',\n 'message' => 'Thông tin về quận/huyện và tọa độ không thể xuất hiện cùng một lúc'\n ], 400));\n }\n\n // * filters for many cases \n $basicFields = ['rent', 'area', 'rating'];\n\n\n // * case 1: is there districts list\n if (property_exists($queryStr, 'district')) {\n $districts = explode(',', $queryStr->district);\n // join with address table\n $this->query->join('addresses', 'apartments.address', '=', 'addresses.id');\n $this->query = $this->query->whereIn('district', $districts);\n $this->query = $this->query->select('apartments.*'); \n } \n\n // * case 2: is there a geo points\n else if (property_exists($queryStr, 'latitude') && property_exists($queryStr, 'longitude')) {\n $latitude = (double) $queryStr->latitude;\n $longitude = (double) $queryStr->longitude;\n $radius = (int) property_exists($queryStr, 'radius') ? $queryStr->radius : 15;\n \n $this->query = $this->query->whereRaw(\"\n ST_Distance_Sphere (\n point(longitude, latitude),\n point(?,?)\n ) * 0.001 < ?\n \", [$longitude, $latitude, $radius]);\n }\n\n // * handle apartment facilities query\n if (property_exists($queryStr, 'facilities')) {\n $facilities = explode(',', $queryStr->facilities);\n foreach ($facilities as $k => $fac)\n $this->query = $this->query->where('facilities', 'like', '%'.json_encode($fac, JSON_UNESCAPED_UNICODE).'%');\n }\n\n\n \n }// ! For comments\n else if ($this->modelType === 'comment') {\n // *? not required now\n }\n\n\n // * remaining fields\n foreach ($queryStr as $field => $value)\n //* handle others\n if (in_array($field, $basicFields)) {\n if (gettype($value) === 'object') {\n $this->query = $this->query->where(function($query) use($field, $value) {\n foreach ($value as $operator => $val)\n $query = $query->where($field, $operator, $val);\n });\n }\n else {\n $this->query = $this->query->where($field, $value);\n }\n }\n \n return $this;\n }", "public function addHasOptionsFilter()\n {\n $adapter = $this->getConnection();\n $orWhere = implode(' OR ', array(\n $adapter->quoteInto('(main_table.frontend_input = ? AND ao.option_id > 0)', 'select'),\n $adapter->quoteInto('(main_table.frontend_input <> ?)', 'select'),\n '(main_table.is_user_defined = 0)'\n ));\n\n $this->getSelect()\n ->joinLeft(\n array('ao' => $this->getTable('eav/attribute_option')),\n 'ao.attribute_id = main_table.attribute_id',\n 'option_id')\n ->group('main_table.attribute_id')\n ->where($orWhere);\n\n $this->_useAnalyticFunction = true;\n\n return $this;\n }", "public function render_products_stock_status_filter()\n {\n }", "public function get_all_price_hooks()\n {\n return array(\n array(\n 'name' => 'woocommerce_product_get_price',\n 'callback' => array($this, 'maybe_change_product_price'),\n 'accepted_args' => 2,\n 'wc_version' => '>=3.0',\n ),\n array(\n 'name' => 'woocommerce_product_get_sale_price',\n 'callback' => array($this, 'maybe_change_product_price'),\n 'accepted_args' => 2,\n 'wc_version' => '>=3.0',\n ),\n array(\n 'name' => 'woocommerce_product_get_regular_price',\n 'callback' => array($this, 'maybe_change_product_price'),\n 'accepted_args' => 2,\n 'wc_version' => '>=3.0',\n ),\n array(\n 'name' => 'woocommerce_get_price',\n 'callback' => array($this, 'maybe_change_product_price'),\n 'accepted_args' => 2,\n 'wc_version' => '<3.0',\n ),\n array(\n 'name' => 'woocommerce_get_sale_price',\n 'callback' => array($this, 'maybe_change_product_price'),\n 'accepted_args' => 2,\n 'wc_version' => '<3.0',\n ),\n array(\n 'name' => 'woocommerce_get_regular_price',\n 'callback' => array($this, 'maybe_change_product_price'),\n 'accepted_args' => 2,\n 'wc_version' => '<3.0',\n ),\n array(\n 'name' => 'woocommerce_product_variation_get_price',\n 'callback' => array($this, 'maybe_change_product_price'),\n 'accepted_args' => 2,\n 'wc_version' => '>=3.0',\n ),\n array(\n 'name' => 'woocommerce_product_variation_get_sale_price',\n 'callback' => array($this, 'maybe_change_product_price'),\n 'accepted_args' => 2,\n 'wc_version' => '>=3.0',\n ),\n array(\n 'name' => 'woocommerce_product_variation_get_regular_price',\n 'callback' => array($this, 'maybe_change_product_price'),\n 'accepted_args' => 2,\n 'wc_version' => '>=3.0',\n ),\n array(\n 'name' => 'woocommerce_variation_prices_price',\n 'callback' => array($this, 'maybe_change_variation_price'),\n 'accepted_args' => 3,\n ),\n array(\n 'name' => 'woocommerce_variation_prices_regular_price',\n 'callback' => array($this, 'maybe_change_variation_price'),\n 'accepted_args' => 3,\n ),\n array(\n 'name' => 'woocommerce_variation_prices_sale_price',\n 'callback' => array($this, 'maybe_change_variation_price'),\n 'accepted_args' => 3,\n ),\n );\n }", "function calculate_vat($price, $vat) {\n $calculated_price = ( $price * $vat ) + $price;\n return $calculated_price;\n }", "public function requestFilters()\n\t{\n\t\t$this->services->Common->ajaxCheck();\n\t\t$this->timber->filter->issueDetect();\n\t\t$this->timber->filter->configLibs();\n\t}", "public function requestFilters()\n\t{\n\t\t$this->services->Common->ajaxCheck();\n\t\t$this->timber->filter->issueDetect();\n\t\t$this->timber->filter->configLibs();\n\t}", "public function compute_VAT($type, $sub_type, $price)\n {\n if ($type == \"VAT\") {\n $VAT = 0.05;\n if ($sub_type == \"Inclusive\") {\n $recievable = $price;\n $sales = $price - $VAT;\n $vatpay = $VAT;\n } elseif ($sub_type == \"Exclusive\") {\n $recievable = $price + $VAT;\n $sales = $price;\n $vatpay = $VAT;\n }\n }\n // elseif($type==\"WHT\"){\n\n // }\n // elseif(){\n\n // }\n\n }", "public function collectRates(Mage_Shipping_Model_Rate_Request $request)\n {\n if (!Mage::getStoreConfig('carriers/'.$this->_code.'/active')) {\n return false;\n }\n\n $result = Mage::getModel('shipping/rate_result');\n\n $method = Mage::getModel('shipping/rate_result_method');\n $method->setCarrier($this->_code);\n $method->setCarrierTitle(Mage::getStoreConfig('carriers/'.$this->_code.'/title'));\n\n /* Computation */\n //Mage::getSingleton('core/session', array('name'=>'frontend'));\n //$session = Mage::getSingleton('checkout/session');\n //$cart_items = $session->getQuote()->getAllVisibleItems();\n //$region = Mage::getSingleton('checkout/session')->getQuote()->getShippingAddress()->getData('region');\n //$totals = Mage::getSingleton('checkout/session')->getQuote()->getTotals();\n $visible_items = $this->getAllVisibleItems($request);\n //$package_value = $request->getPackageValue();\n $package_value = $request->getPackageValueWithDiscount();\n $region = strtolower($request->getDestRegionCode()); //use if onepage checkout\n $region_id = strtolower($request->getDestRegionId()); //use if onestep checkout\n $brands = explode(\"\\n\", strtoupper($this->getConfigData('diaperbrands')));\n $bulkyfee = (float) $this->getConfigData('bulkyfee');\n $total_bulk_fee = 0.00;\n $flatrate = (float)$this->getConfigData('flatrate');\n $mm_min = (float)$this->getConfigData('mm_min');\n $mm_fee = (float)$this->getConfigData('mm_fee');\n $pr_min = (float)$this->getConfigData('pr_min');\n $pr_fee = (float)$this->getConfigData('pr_fee');\n $shippingFee = 0.00;\n $is_bulky = false;\n\n\t //force region value\n\t if($region == '') $region = $region_id;\n\n foreach ($visible_items as $item) {\n $product = Mage::getModel('catalog/product')->load($item->getProduct_id());\n $product_brand = strtoupper($product->getResource()->getAttribute('brand')->getFrontend()->getValue($product));\n $bulkyAttr = $product->getResource()->getAttribute('is_bulky'); //is_bulky product attribute required.;\n\n if ($bulkyAttr) {\n $is_bulky = strtolower($bulkyAttr->getFrontend()->getValue($product));\n }\n\n if (in_array($product_brand, $brands) || $is_bulky == 'yes') {\n $total_bulk_fee += $bulkyfee * $item->getQty();\n }\n }\n\n if ($region) {\n if ($region == 'metro manila') {\n if ($package_value < $mm_min) {\n $shippingFee += $mm_fee;\n }\n } else {\n if ($package_value < $pr_min) {\n $shippingFee += $pr_fee;\n }\n }\n } else {\n if ($package_value < $mm_min)\n $shippingFee += $flatrate;\n }\n\n $shippingFee += $total_bulk_fee;\n //if free shipping\n if ($request->getFreeShipping() === true) {\n $shippingFee = 0;\n }\n\n /* Use method name */\n $method->setMethod($this->_code);\n $method->setMethodTitle(Mage::getStoreConfig('carriers/'.$this->_code.'/name'));\n $method->setCost($shippingFee);\n $method->setPrice($shippingFee);\n $result->append($method);\n\n return $result;\n }", "public function add_all_price_hooks()\n {\n foreach ($this->get_all_price_hooks() as $hook_data) {\n if (!isset($hook_data['wc_version']) || ($hook_data['wc_version'] === '>=3.0' && RightPress_Helper::wc_version_gte('3.0')) || ($hook_data['wc_version'] === '<3.0' && !RightPress_Helper::wc_version_gte('3.0'))) {\n $this->add_price_hook($hook_data);\n }\n }\n }", "private function applyFilters()\n {\n $this->filterDistinct();\n $this->filterMetaJoin();\n $this->filterSearch();\n }", "public static function applyVAT($id)\n {\n $company = Company::findOne(['owner_id' => $id]);\n if (is_null($company)) {\n $companyUser = CompanyUser::findOne(['user_id' => $id]);\n $company = is_null($companyUser) ? null : $companyUser->company;\n }\n\n if (is_null($company)) {\n return false;\n }\n\n $userCompanyCountryCode = $company->city->country_code;\n $country = self::findOne(['code' => strtoupper($userCompanyCountryCode)]);\n\n if ($country->isEUCountry()) {\n if ($country->isLithuanianCountry()) {\n return $country->vat_rate;\n } else {\n if (empty($company->vat_code)) {\n return $country->vat_rate;\n } else {\n return false;\n }\n }\n } else {\n return false;\n }\n }", "public function has_filters()\n {\n }", "public function filters();", "public function filterDataProviderforCurrencies() {\n return [ \n ['Code', 'USD'], \n ['Code', 'TJS'],\n ['Status', 1],\n ['Status', 0], \n ];\n }", "protected function getPrices()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t$now = explode('£', $this->services->getCrawler()->filter('#ctl00_ContentMainPage_ctlSeparateProduct_lblProductPrice')->text());\r\n\t\t\t$now = str_replace(',', '', end($now));\r\n\r\n\t\t\t// designer items show an RRP price instead, so get that\r\n\t\t\tif ($now == 0) {\r\n\t\t\t\t$now = explode('£', $this->services->getCrawler()->filter('.product_rrp > span')->text());\r\n\t\t\t\t$now = str_replace(',', '', end($now));\r\n\t\t\t}\r\n\r\n\t\t\t$this->product->setNow($now);\r\n\t\t\t$this->product->setWas(0);\r\n\t\t\t$this->product->setSale(null);\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tcatch (\\Exception $e) \r\n\t\t{\r\n\t\t\t// Asos annoyingly has underwear displaying as sets, so we need to handle them differently AGAIN\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\t$now = explode('£', $this->services->getCrawler()->filter('#ctl00_ContentMainPage_ctlSeparate1_lblProductPrice')->text());\r\n\t\t\t\t$now = str_replace(',', '', end($now));\r\n\r\n\t\t\t\t$this->product->setNow($now);\r\n\t\t\t\t$this->product->setWas(0);\r\n\t\t\t\t$this->product->setSale(null);\r\n\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tcatch (\\Exception $e) \r\n\t\t\t{\r\n\t\t\t\t// if we couldn't get a price at all then there's a problem - log it an move on\r\n\t\t\t\t$this->services->getLogger()->error('Parsing product prices failed for '.$this->url.': '.$e->getMessage());\r\n\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function saveAdvancedFilters() {\n\t\t$db = PearDatabase::getInstance();\n\n\t\t$reportId = $this->getId();\n\t\t$advancedFilter = $this->get('advancedFilter');\n\t\tif(!empty($advancedFilter)) {\n\n\t\t\t$db->pquery('DELETE FROM vtiger_relcriteria WHERE queryid = ?', array($reportId));\n\t\t\t$db->pquery('DELETE FROM vtiger_relcriteria_grouping WHERE queryid = ?', array($reportId));\n\n\t\t\tforeach($advancedFilter as $groupIndex => $groupInfo) {\n\t\t\t\tif(empty($groupInfo)) continue;\n\n\t\t\t\t$groupColumns = $groupInfo['columns'];\n\t\t\t\t$groupCondition = $groupInfo['condition'];\n\n\t\t\t\tforeach($groupColumns as $columnIndex => $columnCondition) {\n\t\t\t\t\tif(empty($columnCondition)) continue;\n\n\t\t\t\t\t$advFilterColumn = $columnCondition[\"columnname\"];\n\t\t\t\t\t$advFilterComparator = $columnCondition[\"comparator\"];\n\t\t\t\t\t$advFilterValue = $columnCondition[\"value\"];\n\t\t\t\t\t$advFilterColumnCondition = $columnCondition[\"column_condition\"];\n\n\t\t\t\t\t$columnInfo = explode(\":\",$advFilterColumn);\n\t\t\t\t\t$moduleFieldLabel = $columnInfo[2];\n\n\t\t\t\t\tlist($module, $fieldLabel) = explode('_', $moduleFieldLabel, 2);\n\t\t\t\t\t$fieldInfo = getFieldByReportLabel($module, $fieldLabel);\n\t\t\t\t\t$fieldType = null;\n\t\t\t\t\tif(!empty($fieldInfo)) {\n\t\t\t\t\t\t$field = WebserviceField::fromArray($db, $fieldInfo);\n\t\t\t\t\t\t$fieldType = $field->getFieldDataType();\n\t\t\t\t\t}\n\n\t\t\t\t\tif($fieldType == 'currency') {\n\t\t\t\t\t\tif($field->getUIType() == '72') {\n\t\t\t\t\t\t\t// Some of the currency fields like Unit Price, Totoal , Sub-total - doesn't need currency conversion during save\n\t\t\t\t\t\t\t$advFilterValue = Vtiger_Currency_UIType::convertToDBFormat($advFilterValue, null, true);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$advFilterValue = Vtiger_Currency_UIType::convertToDBFormat($advFilterValue);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$specialDateConditions = Vtiger_Functions::getSpecialDateTimeCondtions();\n\t\t\t\t\t$tempVal = explode(\",\",$advFilterValue);\n\t\t\t\t\tif(($columnInfo[4] == 'D' || ($columnInfo[4] == 'T' && $columnInfo[1] != 'time_start' && $columnInfo[1] != 'time_end') ||\n\t\t\t\t\t\t\t\t\t($columnInfo[4] == 'DT')) && ($columnInfo[4] != '' && $advFilterValue != '' ) && !in_array($advFilterComparator, $specialDateConditions)) {\n\t\t\t\t\t\t$val = Array();\n\t\t\t\t\t\tfor($i=0; $i<count($tempVal); $i++) {\n\t\t\t\t\t\t\tif(trim($tempVal[$i]) != '') {\n\t\t\t\t\t\t\t\t$date = new DateTimeField(trim($tempVal[$i]));\n\t\t\t\t\t\t\t\tif($columnInfo[4] == 'D') {\n\t\t\t\t\t\t\t\t\t$val[$i] = DateTimeField::convertToDBFormat(trim($tempVal[$i]));\n\t\t\t\t\t\t\t\t} elseif($columnInfo[4] == 'DT') {\n\t\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t\t\t * While generating query to retrieve report, for date time fields we are only taking\n\t\t\t\t\t\t\t\t\t * date field and appending '00:00:00' for correct results depending on time zone.\n\t\t\t\t\t\t\t\t\t * If you save the time also here by converting to db format, while showing in edit\n\t\t\t\t\t\t\t\t\t * view it was changing the date selected.\n\t\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\t\t$values = explode(' ', $tempVal[$i]);\n\t\t\t\t\t\t\t\t\t$date = new DateTimeField($values[0]);\n\t\t\t\t\t\t\t\t\t$val[$i] = $date->getDBInsertDateValue();\n\t\t\t\t\t\t\t\t} elseif($fieldType == 'time') {\n\t\t\t\t\t\t\t\t\t$val[$i] = Vtiger_Time_UIType::getTimeValueWithSeconds($tempVal[$i]);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$val[$i] = $date->getDBInsertTimeValue();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$advFilterValue = implode(\",\", $val);\n\t\t\t\t\t}\n\n\t\t\t\t\t$db->pquery('INSERT INTO vtiger_relcriteria (queryid, columnindex, columnname, comparator, value,\n\t\t\t\t\t\tgroupid, column_condition) VALUES (?,?,?,?,?,?,?)', array($reportId, $columnIndex, $advFilterColumn,\n\t\t\t\t\t\t\t$advFilterComparator, $advFilterValue, $groupIndex, $advFilterColumnCondition));\n\n\t\t\t\t\t// Update the condition expression for the group to which the condition column belongs\n\t\t\t\t\t$groupConditionExpression = '';\n\t\t\t\t\tif(!empty($advancedFilter[$groupIndex][\"conditionexpression\"])) {\n\t\t\t\t\t\t$groupConditionExpression = $advancedFilter[$groupIndex][\"conditionexpression\"];\n\t\t\t\t\t}\n\t\t\t\t\t$groupConditionExpression = $groupConditionExpression .' '. $columnIndex .' '. $advFilterColumnCondition;\n\t\t\t\t\t$advancedFilter[$groupIndex][\"conditionexpression\"] = $groupConditionExpression;\n\t\t\t\t}\n\n\t\t\t\t$groupConditionExpression = $advancedFilter[$groupIndex][\"conditionexpression\"];\n\t\t\t\tif(empty($groupConditionExpression)) continue; // Case when the group doesn't have any column criteria\n\n\t\t\t\t$db->pquery(\"INSERT INTO vtiger_relcriteria_grouping(groupid, queryid, group_condition, condition_expression) VALUES (?,?,?,?)\",\n\t\t\t\t\t\tarray($groupIndex, $reportId, $groupCondition, $groupConditionExpression));\n\t\t\t}\n\t\t}\n\t}", "public function canFilterOptions() : bool;", "public function addActiveFilter()\n {\n return $this\n ->addFieldToFilter('main_table.is_active', \\Magefan\\Blog\\Model\\Tag::STATUS_ENABLED);\n }", "function checkPrice();", "public function price_filter_post_clauses($args, $wp_query)\n {\n }", "public function getPriceFilter()\n {\n if (!$this->_priceFilter) {\n if ($this->getBaseCurrency() && $this->getCurrentCurrency()) {\n $this->_priceFilter = $this->getCurrentCurrency()->getFilter();\n $this->_priceFilter->setRate($this->getBaseCurrency()->getRate($this->getCurrentCurrency()));\n }\n } elseif ($this->getDefaultCurrency()) {\n $this->_priceFilter = $this->getDefaultCurrency()->getFilter();\n } else {\n $this->_priceFilter = new Varien_Filter_Sprintf('%s', 2);\n }\n return $this->_priceFilter;\n }", "public function isStockFilterEnabled()\n {\n $active = $this->getSelectedAttributeCodes();\n $showOutOfStockProducts = $this->inventoryConfiguration->isShowOutOfStock();\n return array_search(AdditionalFilters::FILTER_STOCK_STATUS, $active) !== false && $showOutOfStockProducts;\n }", "function we_tag_shopVat($attribs,$content) {\n \n\tglobal $we_editmode;\n\t\n\t$name = WE_SHOP_VAT_FIELD_NAME;\n\t\n\trequire_once(WE_SHOP_MODULE_DIR . 'weShopVats.class.php');\n\t\n\t\n\t\n\t$type = we_getTagAttribute('type', $attribs, 'select');\n\t$id = we_getTagAttribute('id', $attribs);\n\t\n\t\n\tif ($id) {\n\t\t\n\t\t$shopVat = weShopVats::getShopVATById($id);\n\t\tif ($shopVat) {\n\t\t\treturn $shopVat->vat;\n\t\t}\n\t\t\n\t} else {\n\t\n\t\n\t\t// in webEdition - EditMode\n\t\t$allVats = weShopVats::getAllShopVATs();\n\t\t$values = array();\n\t\t\n\t\t$standardVal = '';\n\t\t\n\t\tforeach ($allVats as $id => $shopVat) {\n\t\t\t$values[$id] = $shopVat->vat . ' - ' . $shopVat->text;\n\t\t\tif ($shopVat->standard) {\n\t\t\t\t\n\t\t\t\t$standardId = $id;\n\t\t\t\t$standardVal = $shopVat->vat;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$attribs['name'] = WE_SHOP_VAT_FIELD_NAME;\n\t\t$val = htmlspecialchars(isset($GLOBALS[\"we_doc\"]->elements[$name][\"dat\"]) ? $GLOBALS[\"we_doc\"]->getElement($name) : $standardId);\n\t\t\n\t\t// use a defined name for this...\n\t\tif ($we_editmode) {\n\t\t\t\n\t\t\tswitch ($type) {\n\t\t\t\tdefault:\n\t\t\t\t\t$fieldname = 'we_'.$GLOBALS[\"we_doc\"]->Name.'_txt['.$name.']';\n\t\t\t\t\treturn $GLOBALS[\"we_doc\"]->htmlSelect($fieldname, $values, 1, $val);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\treturn ( isset($allVats[$val]) ? $allVats[$val]->vat : $standardVal );\n\t\t}\n\t}\n}", "public function compare(VES_VendorsQuote_Model_Quote_Item $item){\r\n $buyRequest = json_decode($this->getBuyRequest(),true);\r\n $itemBuyRequest = json_decode($item->getBuyRequest(),true);\r\n /*check custom options*/\r\n if(isset($buyRequest['options']) && isset($itemBuyRequest['options'])){\r\n $options = $itemBuyRequest['options'];\r\n if(!$options || !is_array($options)) return false;\r\n \r\n foreach($options as $key=>$value){\r\n if(!isset($buyRequest['options'][$key]) || $buyRequest['options'][$key] != $value) return false;\r\n }\r\n \r\n foreach($buyRequest['options'] as $key=>$value){\r\n if(!isset($options[$key]) || $options[$key] != $value) return false;\r\n }\r\n }elseif(isset($buyRequest['options']) || $itemBuyRequest['options']) return false;\r\n \r\n /*Check configurable options*/\r\n if (isset($buyRequest['super_attribute']) && ($data = $buyRequest['super_attribute'])) {\r\n if(!isset($itemBuyRequest['super_attribute'])) return false;\r\n \r\n $newItemData = $itemBuyRequest['super_attribute'];\r\n foreach ($data as $attributeId => $attributeValue) {\r\n if(!isset($newItemData[$attributeId]) || ($newItemData[$attributeId] != $attributeValue)) return false;\r\n }\r\n \r\n foreach ($newItemData as $attributeId => $attributeValue) {\r\n if(!isset($data[$attributeId]) || ($data[$attributeId] != $attributeValue)) return false;\r\n }\r\n }\r\n /*Check bundle options*/\r\n \r\n if(isset($buyRequest['bundle_option']) || isset($itemBuyRequest['bundle_option'])){\r\n if(!is_array($buyRequest['bundle_option']) || !is_array($itemBuyRequest['bundle_option'])) return false;\r\n $bundleOption = $itemBuyRequest['bundle_option'];\r\n foreach($buyRequest['bundle_option'] as $key=>$value){\r\n if(!isset($bundleOption[$key]) || $bundleOption[$key] != $value) return false;\r\n }\r\n \r\n foreach($bundleOption as $key=>$value){\r\n if(!isset($buyRequest['bundle_option'][$key]) || $buyRequest['bundle_option'][$key] != $value) return false;\r\n }\r\n }\r\n \r\n if(isset($buyRequest['bundle_option_qty']) || $itemBuyRequest['bundle_option_qty']){\r\n if(!is_array($buyRequest['bundle_option_qty']) || !is_array($itemBuyRequest['bundle_option_qty'])) return false;\r\n $bundleOption = $itemBuyRequest['bundle_option_qty'];\r\n foreach($buyRequest['bundle_option_qty'] as $key=>$value){\r\n if(!isset($bundleOption[$key]) || $bundleOption[$key] != $value) return false;\r\n }\r\n \r\n foreach($bundleOption as $key=>$value){\r\n if(!isset($buyRequest['bundle_option_qty'][$key]) || $buyRequest['bundle_option_qty'][$key] != $value) return false;\r\n }\r\n }\r\n return true;\r\n }", "public function priceVaries()\n {\n return $this->price->amount() !== $this->product->price->amount();\n }", "private function UpdateItemPricing() {\n $config = DB::table('Config')->first();\n //Calculate refine rate\n $refineRate = $config->RefineRate / 100.00;\n //Calculate the current time\n $time = Carbon::now();\n \n //Get the price of the basic minerals\n $tritaniumPrice = MineralPrice::where(['ItemId' => 34])->whereDate('Time', '>', $pastTime)->avg('Price');\n $pyeritePrice = MineralPrice::where(['ItemId' => 35])->whereDate('Time', '>', $pastTime)->avg('Price');\n $mexallonPrice = MineralPrice::where(['ItemId' => 36])->whereDate('Time', '>', $pastTime)->avg('Price');\n $isogenPrice = MineralPrice::where(['ItemId' => 37])->whereDate('Time', '>', $pastTime)->avg('Price');\n $nocxiumPrice = MineralPrice::where(['ItemId' => 38])->whereDate('Time', '>', $pastTime)->avg('Price');\n $zydrinePrice = MineralPrice::where(['ItemId' => 39])->whereDate('Time', '>', $pastTime)->avg('Price');\n $megacytePrice = MineralPrice::where(['ItemId' => 40])->whereDate('Time', '>', $pastTime)->avg('Price');\n $morphitePrice = MineralPrice::where(['ItemId' => 11399])->whereDate('Time', '>', $pastTime)->avg('Price');\n $heliumIsotopesPrice = MineralPrice::where(['ItemId' => 16274])->whereDate('Time', '>', $pastTime)->avg('Price');\n $nitrogenIsotopesPrice = MineralPrice::where(['ItemId' => 17888])->whereDate('Time', '>', $pastTime)->avg('Price');\n $oxygenIsotopesPrice = MineralPrice::where(['ItemId' => 17887])->whereDate('Time', '>', $pastTime)->avg('Price');\n $hydrogenIsotopesPrice = MineralPrice::where(['ItemId' => 17889])->whereDate('Time', '>', $pastTime)->avg('Price');\n $liquidOzonePrice = MineralPrice::where(['ItemId' => 16273])->whereDate('Time', '>', $pastTime)->avg('Price');\n $heavyWaterPrice = MineralPrice::where(['ItemId' => 16272])->whereDate('Time', '>', $pastTime)->avg('Price');\n $strontiumClathratesPrice = MineralPrice::where(['ItemId' => 16275])->whereDate('Time', '>', $pastTime)->avg('Price');\n //Get the price of the moongoo\n $atmosphericGasesPrice = MineralPrice::where(['ItemId' => 16634])->whereDate('Time', '>', $pastTime)->avg('Price');\n $evaporiteDepositsPirce = MineralPrice::where(['ItemId' => 16635])->whereDate('Time', '>', $pastTime)->avg('Price');\n $hydrocarbonsPrice = MineralPrice::where(['ItemId' => 16633])->whereDate('Time', '>', $pastTime)->avg('Price');\n $silicatesPrice = MineralPrice::where(['ItemId' => 16636])->whereDate('Time', '>', $pastTime)->avg('Price');\n $cobaltPrice = MineralPrice::where(['ItemId' => 16640])->whereDate('Time', '>', $pastTime)->avg('Price');\n $scandiumPrice = MineralPrice::where(['ItemId' => 16639])->whereDate('Time', '>', $pastTime)->avg('Price');\n $titaniumPrice = MineralPrice::where(['ItemId' => 16638])->whereDate('Time', '>', $pastTime)->avg('Price');\n $tungstenPrice = MineralPrice::where(['ItemId' => 16637])->whereDate('Time', '>', $pastTime)->avg('Price');\n $cadmiumPrice = MineralPrice::where(['ItemId' => 16643])->whereDate('Time', '>', $pastTime)->avg('Price');\n $platinumPrice = MineralPrice::where(['ItemId' => 16644])->whereDate('Time', '>', $pastTime)->avg('Price');\n $vanadiumPrice = MineralPrice::where(['ItemId' => 16642])->whereDate('Time', '>', $pastTime)->avg('Price');\n $chromiumPrice = MineralPrice::where(['ItemId' => 16641])->whereDate('Time', '>', $pastTime)->avg('Price');\n $technetiumPrice = MineralPrice::where(['ItemId' => 16649])->whereDate('Time', '>', $pastTime)->avg('Price');\n $hafniumPrice = MineralPrice::where(['ItemId' => 16648])->whereDate('Time', '>', $pastTime)->avg('Price');\n $caesiumPrice = MineralPrice::where(['ItemId' => 16647])->whereDate('Time', '>', $pastTime)->avg('Price');\n $mercuryPrice = MineralPrice::where(['ItemId' => 16646])->whereDate('Time', '>', $pastTime)->avg('Price');\n $dysprosiumPrice = MineralPrice::where(['ItemId' => 16650])->whereDate('Time', '>', $pastTime)->avg('Price');\n $neodymiumPrice = MineralPrice::where(['ItemId' => 16651])->whereDate('Time', '>', $pastTime)->avg('Price');\n $promethiumPrice = MineralPrice::where(['ItemId' => 16652])->whereDate('Time', '>', $pastTime)->avg('Price');\n $thuliumPrice = MineralPrice::where(['ItemId' => 16653])->whereDate('Time', '>', $pastTime)->avg('Price');\n \n \n //Get the item compositions\n $items = DB::select('SELECT Name,ItemId FROM ItemComposition');\n //Go through each of the items and update the price\n foreach($items as $item) {\n //Get the item composition\n $composition = ItemComposition::where('ItemId', $item->ItemId)->first();\n \n //Calculate the Batch Price\n $batchPrice = ( ($composition->Tritanium * $tritaniumPrice) +\n ($composition->Pyerite * $pyeritePrice) +\n ($composition->Mexallon * $mexallonPrice) +\n ($composition->Isogen * $isogenPrice) +\n ($composition->Nocxium * $nocxiumPrice) +\n ($composition->Zydrine * $zydrinePrice) +\n ($composition->Megacyte * $megacytePrice) + \n ($composition->Morphite * $morphitePrice) +\n ($composition->HeavyWater * $heavyWaterPrice) +\n ($composition->LiquidOzone * $liquidOzonePrice) +\n ($composition->NitrogenIsotopes * $nitrogenIsotopesPrice) +\n ($composition->HeliumIsotopes * $heliumIsotopesPrice) + \n ($composition->HydrogenIsotopes * $hydrogenIsotopesPrice) +\n ($composition->OxygenIsotopes * $oxygenIsotopesPrice) +\n ($composition->StrontiumClathrates * $strontiumClathratesPrice) +\n ($composition->AtmosphericGases * $atmosphericGasesPrice) +\n ($composition->EvaporiteDeposits * $evaporiteDepositsPirce) +\n ($composition->Hydrocarbons * $hydrocarbonsPrice) +\n ($composition->Silicates * $silicatesPrice) +\n ($composition->Cobalt * $cobaltPrice) +\n ($composition->Scandium * $scandiumPrice) +\n ($composition->Titanium * $titaniumPrice) +\n ($composition->Tungsten * $tungstenPrice) +\n ($composition->Cadmium * $cadmiumPrice) +\n ($composition->Platinum * $platinumPrice) +\n ($composition->Vanadium * $vanadiumPrice) +\n ($composition->Chromium * $chromiumPrice)+\n ($composition->Technetium * $technetiumPrice) +\n ($composition->Hafnium * $hafniumPrice) +\n ($composition->Caesium * $caesiumPrice) +\n ($composition->Mercury * $mercuryPrice) +\n ($composition->Dysprosium * $dysprosiumPrice) +\n ($composition->Neodymium * $neodymiumPrice) + \n ($composition->Promethium * $promethiumPrice) +\n ($composition->Thulium * $thuliumPrice));\n \n //Calculate the batch price with the refine rate included\n //Batch Price is base price for everything\n $batchPrice = $batchPrice * $refineRate;\n \n //Calculate the unit price\n $price = $batchPrice / $composition->BatchSize;\n \n //Calculate the m3 price\n $m3Price = $price / $composition->m3Size; \n \n //Insert the prices into the Prices table\n $ore = new OrePrice;\n $ore->Name = $composition->Name;\n $ore->ItemId = $composition->ItemId;\n $ore->BatchPrice = $batchPrice;\n $ore->UnitPrice = $price;\n $ore->m3Price = $m3Price;\n $ore->Time = $time;\n $ore->save();\n }\n }", "function kolab_lead_filter_form() {\n $session = isset($_SESSION['kolab_lead_overview_filter']) ? $_SESSION['kolab_lead_overview_filter'] : array();\n $filters = kolab_lead_filters();\n\n $i = 0;\n $form['filters'] = array(\n '#type' => 'fieldset',\n '#title' => t('Show only items where'),\n '#theme' => 'exposed_filters__lead',\n );\n foreach ($session as $filter) {\n list($type, $value) = $filter;\n \n $value = $filters[$type]['options'][$value];\n \n $t_args = array('%property' => $filters[$type]['title'], '%value' => $value);\n if ($i++) {\n $form['filters']['current'][] = array('#markup' => t('and where %property is %value', $t_args));\n }\n else {\n $form['filters']['current'][] = array('#markup' => t('where %property is %value', $t_args));\n }\n if (in_array($type, array('type', 'language'))) {\n // Remove the option if it is already being filtered on.\n unset($filters[$type]);\n }\n }\n\n $form['filters']['status'] = array(\n '#type' => 'container',\n '#attributes' => array('class' => array('clearfix')),\n '#prefix' => ($i ? '<div class=\"additional-filters\">' . t('and where') . '</div>' : ''),\n );\n $form['filters']['status']['filters'] = array(\n '#type' => 'container',\n '#attributes' => array('class' => array('filters')),\n );\n foreach ($filters as $key => $filter) {\n $form['filters']['status']['filters'][$key] = array(\n '#type' => 'select',\n '#options' => $filter['options'],\n '#title' => $filter['title'],\n '#default_value' => '[any]',\n );\n }\n\n $form['filters']['status']['actions'] = array(\n '#type' => 'actions',\n '#attributes' => array('class' => array('container-inline')),\n );\n $form['filters']['status']['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => count($session) ? t('Refine') : t('Filter'),\n );\n if (count($session)) {\n $form['filters']['status']['actions']['undo'] = array('#type' => 'submit', '#value' => t('Undo'));\n $form['filters']['status']['actions']['reset'] = array('#type' => 'submit', '#value' => t('Reset'));\n }\n\n drupal_add_js('misc/form.js');\n\n return $form;\n}", "public function testApplyWithCustomCurrencyRate()\n {\n /** @var $request \\Magento\\TestFramework\\Request */\n $request = $this->objectManager->get(\\Magento\\TestFramework\\Request::class);\n\n $request->setParam('price', '10-20');\n $this->model->setCurrencyRate(10);\n\n $this->model->apply($request);\n\n $filters = $this->model->getLayer()->getState()->getFilters();\n $this->assertArrayHasKey(0, $filters);\n $this->assertEquals(\n '<span class=\"price\">$100.00</span> - <span class=\"price\">$199.99</span>',\n (string)$filters[0]->getLabel()\n );\n }", "public function buildPrices();", "public static function add_calculation_price_filter() {\n\n\t\t// Only hook when cart contains a subscription\n\t\tif ( ! self::cart_contains_subscription() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure all totals are calculated to prevent incorrect totals being displayed before visitng the cart/checkout page (for example, in the cart widget)\n\t\tif ( ! is_checkout() && ! is_cart() && ! defined( 'WOOCOMMERCE_CHECKOUT' ) && ! defined( 'WOOCOMMERCE_CART' ) ) {\n\t\t\tdefine( 'WOOCOMMERCE_CART', true );\n\t\t}\n\n\t\t// Set which price should be used for calculation\n\t\tadd_filter( 'woocommerce_get_price', __CLASS__ . '::set_subscription_prices_for_calculation', 100, 2 );\n\t}" ]
[ "0.658953", "0.6211161", "0.6113735", "0.59274846", "0.5918987", "0.5878515", "0.5840988", "0.583597", "0.5830887", "0.57488215", "0.57488215", "0.57427186", "0.57194716", "0.5677716", "0.5660922", "0.5645439", "0.55992883", "0.5590954", "0.5530527", "0.5527363", "0.5512078", "0.5512078", "0.5475363", "0.54734474", "0.5473118", "0.5469442", "0.5463071", "0.5455091", "0.5447788", "0.54285216", "0.54219913", "0.5402515", "0.53861725", "0.5361621", "0.5355873", "0.5349284", "0.5332327", "0.53187084", "0.53125787", "0.5303264", "0.5280249", "0.52769244", "0.52731377", "0.5268427", "0.526013", "0.525426", "0.5248912", "0.5241068", "0.52383065", "0.5228608", "0.522856", "0.5206464", "0.52022856", "0.52005917", "0.5197956", "0.51960146", "0.51939994", "0.5193098", "0.5192179", "0.5171081", "0.5169769", "0.5165728", "0.5164735", "0.51497626", "0.5145607", "0.51436716", "0.51278704", "0.511617", "0.51148933", "0.5103579", "0.5103085", "0.5090985", "0.50900126", "0.5086759", "0.5077588", "0.5077588", "0.50750643", "0.5074208", "0.50695723", "0.50597477", "0.50548905", "0.5053037", "0.5048919", "0.50443876", "0.5037898", "0.50368214", "0.5033304", "0.5032389", "0.5032042", "0.50230527", "0.50198764", "0.5018752", "0.50151104", "0.50059444", "0.50057346", "0.5004155", "0.49988857", "0.49963662", "0.49940127", "0.49923077" ]
0.7237127
0
Set VAT manager to checkout mode on the invoice page.
Установите менеджера НДС в режим оформления заказа на странице счета.
function it_exchange_easy_eu_vat_set_checkout_mode_on_invoice_page() { $product_id = it_exchange_get_the_product_id(); if ( it_exchange_get_product_type( $product_id ) !== 'invoices-product-type' ) { return; } echo '<script> var ITExchangeEasyValueAddedTaxesCheckoutPage = true;</script>'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function checkout(): void\n {\n $this->loadTemplate('Catalog/Layout/Templates/Checkout.html.twig');\n\n $this->addJS('Checkout.js');\n $this->addJS('EnhancedEcommerce.js');\n\n $this->header->setPageTitle(ucfirst(Language::lbl('Checkout')));\n\n $this->breadcrumb->addElement(\n ucfirst(Language::lbl('Checkout')),\n Navigation::getUrlForBlock('Catalog', 'Cart') .'/'. Language::lbl('Checkout')\n );\n }", "public function checkout_form_billing()\n {\n }", "public function setVelocityPaymentMethod() {\n\n global $nzshpcrt_gateways, $num, $gateway_checkout_form_fields, $wpdb, $wpsc_cart;\n\n $gatewayNames = get_option('payment_gateway_names');\n\n if (!$this->paymentMethods)\n return;\n\n $num++;\n\n $nzshpcrt_gateways[$num] = array(\n 'name' => 'wpevelocity_cc',\n 'is_exclusive' => true,\n 'payment_type' => 'velocity_credit_card',\n 'supported_currencies' => array('currency_list' => array('USD')),\n 'payment_gateway' => 'nabvelocity',\n 'internalname' => 'wpevelocity_cc',\n 'display_name' => 'Credit Card Via Velocity'\n );\n add_option($nzshpcrt_gateways[$num]['internalname'] . \"_code\", \"cc\");\n\n update_option('payment_gateway_names', $gatewayNames);\n }", "private function initializePagSeguro()\n {\n $paymentModel = Mage::getSingleton('UOL_PagSeguro_Model_PaymentMethod');\n if ($paymentModel->getOneStepCheckoutIsEnabled()) {\n $this->setPagSeguroBeforeSaveJsSkinUrl($this->getSkinUrl('uol/pagseguro/js/pagseguro-onestepcheckout-before-save.js'));\n } else {\n $this->setPagSeguroBeforeSaveJsSkinUrl($this->getSkinUrl('uol/pagseguro/js/pagseguro-before-save.js'));\n }\n // if customer is loged, get his document info (taxvat)\n if (Mage::getSingleton('customer/session')->isLoggedIn()) {\n $customer = Mage::getSingleton('customer/session')->getCustomer();\n $this->setBoletoDocument($customer->getData()['taxvat']);\n }\n // set boleto session\n $this->setBoletoSession($paymentModel->getSession());\n // set template\n $this->setTemplate('uol/pagseguro/form/boleto.phtml');\n }", "public function checkout_cart_configure(Varien_Event_Observer $observer){\r\n\t /*Do nothing if the extension is disabled*/\r\n\t if(!Mage::helper('vendors')->moduleEnabled()) return;\r\n\t \r\n\t\t/*Return if it's not advanced mode*/\r\n\t\tif(Mage::helper('vendors')->getMode() != VES_Vendors_Model_Vendor::MODE_ADVANCED) return;\r\n\t\t\r\n\t\t$vendorQuoteSession = Mage::getSingleton('vendorscheckout/session');\r\n\t\t$action = $observer->getControllerAction();\r\n\t\t\r\n\t\t// Extract item and product to configure\r\n $id = (int) $action->getRequest()->getParam('id');\r\n $quoteItem = null;\r\n \r\n\t\tforeach($vendorQuoteSession->getQuotes() as $quote){\r\n\t\t\tif(!$quote->getVendorId()) continue;\r\n\t\t\t\r\n\t\t\t$quoteItem = $quote->getItemById($id);\r\n\t\t\tif($quoteItem) break;\r\n\t\t}\r\n\t\t\r\n if (!$quoteItem) return;\r\n\r\n try {\r\n $params = new Varien_Object();\r\n $params->setCategoryId(false);\r\n $params->setConfigureMode(true);\r\n $params->setBuyRequest($quoteItem->getBuyRequest());\r\n\r\n Mage::helper('catalog/product_view')->prepareAndRender($quoteItem->getProduct()->getId(), $action, $params);\r\n } catch (Exception $e) {\r\n return;\r\n }\r\n $action->setFlag('', Mage_Core_Controller_Varien_Action::FLAG_NO_DISPATCH,true);\r\n\t}", "public static function checkout_action()\n {\n }", "public function setInitiateOsc()\n {\n if (Mage::getConfig()->getModuleConfig('Idev_OneStepCheckout')->is('active', 'true')) {\n if (Mage::helper('onestepcheckout')->isRewriteCheckoutLinksEnabled()) {\n $this->setInitiateCheckout();\n }\n }\n return $this;\n }", "public function temporarilyDisableCCVCheck()\n {\n $paymentGateway = Mage::helper(\"fontis_masterpass/config\")->getPaymentGateway();\n\n if (empty($paymentGateway)) {\n Mage::throwException(\"Unable to place the order.\");\n }\n\n Mage::app()->getStore()->setConfig(\"payment/$paymentGateway/useccv\", \"0\");\n }", "function set_is_vat_exempt( $is_vat_exempt ) {\n\t\t$_SESSION['customer']['is_vat_exempt'] = $is_vat_exempt;\n\t}", "public function setInitiateCheckout()\n {\n $quote = Mage::getSingleton('checkout/session')->getQuote();\n $numItems = $quote->getAllVisibleItems();\n\n $itemSkus = array();\n foreach ($numItems as $item) {\n $itemSkus[] = htmlspecialchars($item->getSku());\n }\n\n $initiateCheckoutData = array();\n $initiateCheckoutData['value'] = number_format($quote->getSubtotal(), 2);\n $initiateCheckoutData['num_items'] = count($numItems);\n $initiateCheckoutData['currency'] = Mage::app()->getStore()->getCurrentCurrencyCode();\n $initiateCheckoutData['content_type'] = 'product';\n $initiateCheckoutData['content_ids'] = $itemSkus;\n\n Mage::getSingleton('core/session')->setData('fb_initiatecheckout', $initiateCheckoutData);\n return $this;\n }", "public function enableTestMode()\n {\n $this->testMode = TRUE;\n $this->gatewayUrl = 'https://www.sandbox.paypal.com/cgi-bin/webscr';\n }", "public function checkout()\n {\n // authenticate user\n m_authenticate_and_redirect(\"login?nextPage=cart/checkout\");\n $this -> data['title'] = \"Checkout\";\n if(isset($_SESSION['cart']))\n $this -> data['cart'] = $this -> model -> getCartData($_SESSION['cart']);\n\n $this -> loadView(\"checkout\", $this -> data);\n\n }", "public function goToCheckout()\n {\n $I = $this;\n $I->see('Checkout');\n $I->click('Checkout');\n }", "function checkout() {\n\n\t}", "public function checkout_onepage_index(Varien_Event_Observer $observer){\r\n\t /*Do nothing if the extension is disabled*/\r\n\t if(!Mage::helper('vendors')->moduleEnabled()) return;\r\n\t \r\n\t \r\n\t\t/*Return if it's not advanced mode*/\r\n\t\tif(Mage::helper('vendors')->getMode() != VES_Vendors_Model_Vendor::MODE_ADVANCED) return;\r\n\r\n\t\t$action \t\t\t= $observer->getControllerAction();\r\n\t\t$vendorId \t\t\t= $action->getRequest()->getParam('vendor');\r\n\t\t$checkoutSession \t= Mage::getSingleton('checkout/session');\r\n\t\t\r\n\t\t/*If current quote is vendor quote just get the checkout session quote*/\r\n\t\tif(!$vendorId) {\r\n\t\t\t$quote = $checkoutSession->getQuote();\r\n\t\t\tif($parentQuoteId = $quote->getParentQuote()){\r\n\t\t\t\t$parentQuote = Mage::getModel('sales/quote')->load($parentQuoteId);\r\n\t\t\t\t$checkoutSession->replaceQuote($parentQuote);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t$vendor \t= Mage::getModel('vendors/vendor')->load($vendorId);\r\n\t\t/* If vendor is not exist redirect to noRoute */\r\n\t\tif(!$vendor->getId()){\r\n\t\t\tMage::getSingleton('checkout/session')->addError('You are not allowed to access this page.');\r\n\t\t\t$action->setFlag('', 'no-dispatch', true);\r\n\t\t\t$action->setRedirectWithCookieCheck('checkout/cart');\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t/*Replace the current quote by vendor quote*/\r\n\t\t$vendorQuote = Mage::getSingleton('vendorscheckout/session')->getQuote($vendorId);\t\t\r\n\t\tif(!$vendorQuote->getParentQuote()){\r\n\t\t\t$vendorQuote->setParentQuote($checkoutSession->getQuote()->getId())->save();\r\n\t\t}\r\n\t\t$checkoutSession->replaceQuote($vendorQuote);\r\n\t}", "public function setUp()\n {\n parent::setUp();\n $this->router->getShopgateOrder()->setPaymentMethod(ShopgateCartBase::SUE);\n }", "public function test() {\n\t\tif ($this->connectionMode == \"nvp\") {\n\t\t\tprint(\"Using NVP<br />\");\n\t\t\t\n\t\t\t// PAYMENTREQUEST_0_AMT must have the format (x)x.00, MUST HAVE .00 \n\t\t\t\n\t\t\t$params = array(\"PAYMENTREQUEST_0_AMT\"=>\"4.00\",\n\t\t\t\t\"PAYMENTREQUEST_0_CURRENCYCODE\"=>\"GBP\", \n\t\t\t\t\"RETURNURL\"=>\"http://localhost/SVN/101cms/cms/lib/empaypal/?p=return\",\n\t\t\t\t\"CANCELURL\"=>\"http://localhost/SVN/101cms/cms/lib/empaypal/?p=cancel\", \n\t\t\t\t\"PAYMENTREQUEST_0_PAYMENTACTION\"=>\"Sale\");\n\t\t\t\n\t\t\t$result = $this->sendRequest(\"SetExpressCheckout\", $params);\n\t\t\t\n\t\t\tif ($result['success']) {\n\t\t\t\tprint_r($result['response']);\n\t\t\t} else {\n\t\t\t\tprint($result['error']);\n\t\t\t}\n\t\t\t\n\t\t\tif ($result['response']['ACK'] == \"Success\") {\n\t\t\t\t$token = $result['response']['TOKEN'];\n\t\t\t\t\n\t\t\t\theader(\"Location: \" . $this->url . \"&token=\" . $token);\n\t\t\t\texit;\n\t\t\t} else {\n\t\t\t\texit;\n\t\t\t}\n\t\t\t\n\t\t} else if ($this->connectionMode == \"soap\") {\n\t\t\tprint(\"Using SOAP<br />\");\n\t\t\t\n\t\t\t$params = array(\"PAYMENTREQUEST_0_AMT\"=>4.00,\n\t\t\t\t\"PAYMENTREQUEST_0_CURRENCYCODE\"=>\"GBP\", \n\t\t\t\t\"RETURNURL\"=>\"http://localhost/SVN/101cms/cms/lib/empaypal/?p=return\",\n\t\t\t\t\"CANCELURL\"=>\"http://localhost/SVN/101cms/cms/lib/empaypal/?p=cancel\", \n\t\t\t\t\"PAYMENTREQUEST_0_PAYMENTACTION\"=>\"Sale\");\n\t\t\t\n\t\t\t$result = $this->sendRequest(\"SetExpressCheckout\", $params);\n\t\t\t\n\t\t\tif ($result['success']) {\n\t\t\t\tprint_r($result['response']);\n\t\t\t} else {\n\t\t\t\tprint($result['error']);\n\t\t\t}\n\t\t\t\n\t\t\tif ($result['response']['ACK'] == \"Success\") {\n\t\t\t\t$token = $result['response']['TOKEN'];\n\t\t\t\t\n\t\t\t\theader(\"Location: \" . $this->url . \"&token=\" . $token);\n\t\t\t\texit;\n\t\t\t} else {\n\t\t\t\texit;\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "public function checkoutOnepageSaveBilling()\n {\n /**\n * @var $checkout Mage_Sales_Model_Quote\n */\n $checkout = Mage::getSingleton('checkout/session')->getQuote();\n $bilAddress = $checkout->getBillingAddress()->format('text');\n if ($bilAddress) {\n Mage::getModel('core/session')->setCustomerEditAddressData(\n new Varien_Object(array(\n 'value' => preg_replace( \"/\\r|\\n/\", \" \", $bilAddress ),\n 'content_name' => 'customer edit billing info',\n ))\n );\n }\n }", "private function _initCheckout()\n {\n $quote = $this->_getQuote();\n if (!$quote->hasItems() || $quote->getHasError()) {\n $this->getResponse()->setHeader('HTTP/1.1','403 Forbidden');\n Mage::throwException(Mage::helper('paypal')->__('Unable to initialize Express Checkout.'));\n }\n $this->_checkout = Mage::getSingleton($this->_checkoutType, array(\n 'config' => $this->_config,\n 'quote' => $quote,\n ));\n }", "public function set_is_vat_exempt($is_vat_exempt)\n {\n }", "public function checkout(){\n\t\t\n\t\t$this->load->view('user/pages/checkout');\n\t\t\n\t}", "public function set_gateway() {\n\t\tglobal $gateway_environment;\n\t\t$environment = $gateway_environment;\n\n\t\t$this->gateway_version = urlencode( '109.0' );\n\n\t\t$this->API_UserName = urlencode( pmpro_getOption( \"ppauto_apiusername\" ) );\n\t\t$this->API_Password = urlencode( pmpro_getOption( \"ppauto_apipassword\" ) );\n\t\t$this->API_Signature = urlencode( pmpro_getOption( \"ppauto_apisignature\" ) );\n\n\t\t$this->gateway_url = \"https://api-3t.paypal.com/nvp\";\n\n\t\tif ( \"sandbox\" === $environment || \"beta-sandbox\" === $environment ) {\n\t\t\t$this->gateway_url = \"https://api-3t.$environment.paypal.com/nvp\";\n\t\t}\n\n\t}", "private static function _create_checkout_page() {\n\t\t\tglobal $psts;\n\t\t\t$psts->create_checkout_page();\n\t\t}", "public function frontcheckout()\n {\n return view('frontend.checkout');\n }", "function wpdev_bk_payment_activate_system_ipay88() {\n global $wpdb;\n \n add_bk_option( 'booking_ipay88_payment_button_title' , __('Pay via' ,'booking') .' iPay88');\n add_bk_option( 'booking_ipay88_is_active' , 'Off');\n add_bk_option( 'booking_ipay88_merchant_code', '' );\n add_bk_option( 'booking_ipay88_merchant_key', '' );\n add_bk_option( 'booking_ipay88_curency' , 'MYR' );\n add_bk_option( 'booking_ipay88_subject', sprintf(__('Payment for booking %s on these day(s): %s' ,'booking'),'[bookingname]','[dates]'));\n add_bk_option( 'booking_ipay88_is_description_show', 'Off' );\n add_bk_option( 'booking_ipay88_is_auto_approve_cancell_booking', 'Off' );\n add_bk_option( 'booking_ipay88_return_url', '/successful' );\n add_bk_option( 'booking_ipay88_cancel_return_url', '/failed' );\n\n }", "public function invoice($method) {\n\t\tif (!class_exists('CurrencyDisplay')) {\n\t\t\trequire(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'currencydisplay.php');\n\t\t}\n\t\t$this->code = \"klarna_invoice\";\n\t\t// If module isn't enabled, don't do anything.\n\t\tif ($this->enabled == false) {\n\t\t\treturn NULL;\n\t\t}\n\t\tif (!isset($this->klarna) || !($this->klarna instanceof Klarna_virtuemart)) {\n\t\t\treturn NULL;\n\t\t}\n\n\t\t$invoice_fee = KlarnaHandler::getInvoiceFeeInclTax($method, $this->country_code_3);\n\t\t$this->payment_link = \"https://online.klarna.com/villkor.yaws?eid=\" . $this->eid . \"&charge=\" . $invoice_fee;\n\n\t\t$kCheckout = new KlarnaVm2API($this->country, $this->lang, 'invoice', 0, KlarnaFlags::CHECKOUT_PAGE, $this->klarna, NULL, VMKLARNAPLUGINWEBROOT);\n\t\t$kCheckout->addSetupValue('eid', $this->eid);\n\t\t$kCheckout->addSetupValue('sum', $invoice_fee);\n\t\t$kCheckout->setInvoiceFee($invoice_fee);\n\t\t$kCheckout->addSetupValue('payment_id', 'virtuemart_paymentmethod_id');\n\t\tif (strtolower($this->country) == 'de') {\n\t\t\t$vendor_id = 1;\n\t\t\t$link = JRoute::_('index.php?option=com_virtuemart&view=vendor&layout=tos&virtuemart_vendor_id=' . $vendor_id);\n\t\t\t$kCheckout->addSetupValue('agb_link', $link);\n\t\t}\n\n\t\t//$lang = KlarnaHandler::getLanguageForCountry($method, $this->country);\n\t\t$symbol = KlarnaHandler::getCurrencySymbolForCountry($method, $this->country);\n\n\t\t$currency = CurrencyDisplay::getInstance();\n\t\t$display_fee = $currency->priceDisplay($invoice_fee);\n\n\t\t//$title = str_replace('(+XX)', '(+' . $sFee . ')', $kCheckout->fetchFromLanguagePack('INVOICE_TITLE', $lang, JPATH_VMKLARNAPLUGIN ));\n\t\t$title = JText::sprintf('VMPAYMENT_KLARNA_INVOICE_TITLE_NO_PRICE', $display_fee);\n\n\t\tif (KlarnaHandler::getKlarnaError($klarnaError, $klarnaOption)) {\n\t\t\t$kCheckout->addSetupValue('red_baloon_content', $klarnaError);\n\t\t\t$kCheckout->addSetupValue('red_baloon_paymentBox', 'klarna_box_' . $klarnaOption);\n\t\t\tKlarnaHandler::clearKlarnaError();\n\t\t}\n\n\t\t// Something went wrong, refill what we can.\n\t\t$session = JFactory::getSession();\n\t\t$sessionKlarna = $session->get('Klarna', 0, 'vm');\n\n\t\tif (!empty($sessionKlarna)) {\n\t\t\t$sessionKlarnaData = unserialize($sessionKlarna);\n\t\t\t$klarnaData = $sessionKlarnaData->KLARNA_DATA;\n\t\t\t$this->setPreviouslyFilledIn($klarnaData);\n\t\t}\n\n\t\t$aParams = $this->getParams();\n\t\t$aValues = $this->getValues();\n\n\t\treturn array(\n\t\t\t'id' => 'klarna_invoice',\n\t\t\t'module' => $title,\n\t\t\t'fields' => $kCheckout->retrieveLayout($aParams, $aValues),\n\t\t\t'pClasses' => NULL\n\t\t);\n\t}", "public function actionExpressCheckoutFromDetailsPage()\n {\n }", "public function index() {\n if ((!$this->cart->hasProducts() && empty($this->session->data['vouchers'])) || (!$this->cart->hasStock() && !$this->config->get('config_stock_checkout'))) {\n $this->response->redirect($this->url->link('common/home', '', true));\n }\n\n $this->load->language('checkout/checkout');\n\n\t\t$this->document->setTitle($this->language->get('heading_title'));\n\t\t$this->document->setRobots('noindex,follow');\n\n // * загрузка контроллеров\n $data['checkout__cart'] = $this->load->controller('checkout/checkout__cart');\n $data['checkout__customer'] = $this->load->controller('checkout/checkout__customer');\n $data['checkout__shipping'] = $this->load->controller('checkout/checkout__shipping');\n $data['checkout__payment'] = $this->load->controller('checkout/checkout__payment');\n $data['checkout__total'] = $this->load->controller('checkout/checkout__total');\n\n\n\n\t\t$data['text_checkout_option'] = sprintf($this->language->get('text_checkout_option'), 1);\n\t\t$data['text_checkout_account'] = sprintf($this->language->get('text_checkout_account'), 2);\n\t\t$data['text_checkout_payment_address'] = sprintf($this->language->get('text_checkout_payment_address'), 2);\n\t\t$data['text_checkout_shipping_address'] = sprintf($this->language->get('text_checkout_shipping_address'), 3);\n\t\t$data['text_checkout_shipping_method'] = sprintf($this->language->get('text_checkout_shipping_method'), 4);\n\n\t\tif ($this->cart->hasShipping()) {\n\t\t\t$data['text_checkout_payment_method'] = sprintf($this->language->get('text_checkout_payment_method'), 5);\n\t\t\t$data['text_checkout_confirm'] = sprintf($this->language->get('text_checkout_confirm'), 6);\n\t\t} else {\n\t\t\t$data['text_checkout_payment_method'] = sprintf($this->language->get('text_checkout_payment_method'), 3);\n\t\t\t$data['text_checkout_confirm'] = sprintf($this->language->get('text_checkout_confirm'), 4);\n\t\t}\n\n\t\tif (isset($this->session->data['error'])) {\n\t\t\t$data['error_warning'] = $this->session->data['error'];\n\t\t\tunset($this->session->data['error']);\n\t\t} else {\n\t\t\t$data['error_warning'] = '';\n\t\t}\n\n\n\n\t\tif (isset($this->session->data['account'])) {\n\t\t\t$data['account'] = $this->session->data['account'];\n\t\t} else {\n\t\t\t$data['account'] = '';\n\t\t}\n\n\t\t$data['shipping_required'] = $this->cart->hasShipping();\n\n\t\t$data['column_left'] = $this->load->controller('common/column_left');\n\t\t$data['column_right'] = $this->load->controller('common/column_right');\n\t\t$data['content_top'] = $this->load->controller('common/content_top');\n\t\t$data['content_bottom'] = $this->load->controller('common/content_bottom');\n\t\t$data['footer'] = $this->load->controller('common/footer');\n\t\t$data['header'] = $this->load->controller('common/header');\n\n\t\t$this->response->setOutput($this->load->view('checkout/checkout', $data));\n\t}", "public function checkout()\n\t{\n\t\t\n\t\t$this->user_order->checkout();\n\t\t$this->load->view('User_view_order');\n\t}", "function checkout_init( $checkout ) {\r\n \r\n\t\t$session = PPWC()->session->get( 'paypal_mx', array() );\r\n\r\n\t\t// Make sure the selected payment method is ppexpress_mx.\r\n\t\tif ( ! is_array( $session )\r\n\t\t\t|| ! isset( $session['start_from'] )\r\n\t\t) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t$token = isset( $_GET['token'] ) ? $_GET['token'] : $session['get_express_token']; // @codingStandardsIgnoreLine\r\n\r\n\t\t$checkout_details = $this->get_checkout( $token );\r\n\t\tif ( false !== $checkout_details ) {\r\n\t\t\t$billing_details = $this->get_mapped_billing_address( $checkout_details );\r\n\t\t\tforeach ( $billing_details as $key => $value ) {\r\n\t\t\t\tif ( 'phone' === $key && empty( $value ) && isset( $_POST['billing_phone'] ) ) { // @codingStandardsIgnoreLine\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t$_POST[ 'billing_' . $key ] = $value;\r\n\t\t\t\t$_POST[ 'shipping_' . $key ] = $value;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function checkout(){\n\t\t\t$domain = $_SERVER['SERVER_NAME'];\n\n\t\t\tif($_SERVER['HTTP_REFERER'] == \"http://\".$domain.'/demodulich1/cart'){\n\t\t\t\t//if($_SERVER['HTTP_REFERER'] == \"http://\".$domain.'/cart'){\n\t\t\t\t$this->data['temp'] = \"site/order/checkout\";\n\t\t\t\t$this->load->view('site/layout', $this->data);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tredirect(base_url());\n\t\t\t}\n\t\t\t\n\t\t}", "public function paymentAction()\n {\n try {\n\t\t /* $this->getResponse()->setHeader(\"Content-Type\", \"text/html; charset=ISO-8859-1\",true); */\n $session = $this->_getCheckout();\n\t\t\t\n \t\t$order = Mage::getModel('sales/order');\n\t\t\t$order->loadByIncrementId($session->getLastRealOrderId());\n\t\t\tif (!$order->getId()) {\n\t\t\t\tMage::throwException('No order for processing found');\n\t\t\t}\n\t\t\t\n\t\t\t$billing = $order ->getBillingAddress();\n\t\t\t$vatid = $billing->getVatId();\n\t\t\t\n\t\t\tif($this -> _validaCPF($vatid) || $this -> _validaCNPJ($vatid))\n\t\t\t{\n\t\t\t\t// $session->addError(Mage::helper('pagbrasil')->__('The CPF OR CNPJ is valid!'));\n\t\t\t\t// Mage::throwException(Mage::helper('pagbrasil')->__('The CPF OR CNPJ is valid!'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t Mage::getModel('sales/quote')->load($session->getQuoteId())->setIsActive(true)->save(); \n\t\t\t $session->addError(Mage::helper('pagbrasil')->__('The CPF or CNPJ is not valid!'));\n\t\t\t\t//parent::_redirect('checkout/cart');\n\t\t\t\tparent::_redirect('customer/address/');\n\t\t\t\t// exit();\n\t\t\t\tMage::throwException(Mage::helper('pagbrasil')->__('The CPF or CNPJ is not valid!'));\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif($order->getState() != \"pending_payment\")\n\t\t\t{\n\t\t\t\tparent::_redirect('checkout/cart');\n\t\t\t\t//die();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$order->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT, Mage_Sales_Model_Order::STATE_PENDING_PAYMENT,\n\t\t\t\t\tMage::helper('pagbrasil')->__('The customer was redirected to PagBrasil.')\n\t\t\t\t);\n\t\t\t\t$order->save();\n\n\t\t\t\t$session->setPagbrasilQuoteId($session->getQuoteId());\n\t\t\t\t$session->setPagbrasilRealOrderId($session->getLastRealOrderId());\n\t\t\t\t$session->getQuote()->setIsActive(true)->save();\n\t\t\t\t//$session->getQuote()->setIsActive(false)->save();\n\t\t\t\t//$session->clear();\n\n\t\t\t\t$this->loadLayout();\n\t\t\t\t$this->renderLayout();\n\t\t\t}\n } catch (Exception $e){\n Mage::logException($e);\n parent::_redirect('checkout/cart');\n }\n }", "public function checkoutAction()\n {\n\n }", "protected function setPaymentMethod()\n {\n $payment = $this->quote->getPayment();\n $payment->setMethod(Paypal::PAYMENT_METHOD_CODE);\n $this->quote->setPayment($payment);\n }", "public function checkout()\n {\n return view('checkout.payment');\n }", "public function checkout()\n {\n return view('orders.checkout');\n }", "function checkout() {\n $this->load->library('google_checkout/gcheckout');\n \n //setup the variables for google checkout (of course you don't have to do iot this way but this is pulling values from a config file)\n $merchant_id = $this->config->item('checkout_merchant_id');\n $merchant_key = $this->config->item('checkout_merchant_key');\n $server_type = $this->config->item('checkout_server_type');\n $currency = $this->config->item('checkout_currency');\n $edit_url = $this->config->item('checkout_edit_url');\n $shop_url = $this->config->item('checkout_shop_url');\n \n //initialize the checkout\n $this->gcheckout->init($merchant_id, $merchant_key, $server_type);\n \n //set the trackback urls\n $this->gcheckout->set_cart_urls($edit_url, $shop_url);\n \n //sample items\n $items = Array();\n $items[] = Array('title' => 'Item 1',\n 'description' => 'This is a test',\n 'price' => 19.95,\n );\n $items[] = Array('title' => 'Item 2',\n 'description' => 'This is another test',\n 'price' => 29.99,\n );\n \n //add the items to the google cart\n foreach ($items as $item) {\n \t$this->gcheckout->add_item($item['title'], $item['description'], 1, $item['price']);\n }\n \n \n //$this->gcheckout->do_checkout();\n $this->gcheckout->output_xml();\n }", "public function set_invoice_model($value)\n\t{\n\t\t$this->config_file = $value; \n\t}", "public function do_checkout( $order_id, $payer_id, $token, $custom = false, $invoice = false ) {\r\n\t\t$details = $this->_get_details_from_order( $order_id );\r\n $session = PPWC()->session->get( 'paypal_mx', array() );\r\n\t\t$notify_url = str_replace( 'https:', 'http:', add_query_arg( 'wc-api', 'wc_gateway_ipn_paypal_latam', home_url( '/' ) ) );\r\n\t\t$order_total = new BasicAmountType();\r\n\t\t$order_total->currencyID = get_woocommerce_currency(); // @codingStandardsIgnoreLine\r\n\t\t$order_total->value = $details['order_total'];\r\n\t\t$payment = new PaymentDetailsType();\r\n\t\t$payment->ButtonSource = 'WooSPBLatam_Cart';\r\n\t\t$payment->OrderTotal = $order_total; // @codingStandardsIgnoreLine\r\n\t\t$payment->NotifyURL = $notify_url; // @codingStandardsIgnoreLine\r\n if ( 'checkout' !== $session['start_from'] && isset( $details['shipping_address'] ) ) {\r\n $address = new AddressType();\r\n $address->Name = $details['shipping_address']['name']; // @codingStandardsIgnoreLine\r\n $address->Street1 = $details['shipping_address']['address1']; // @codingStandardsIgnoreLine\r\n $address->Street2 = $details['shipping_address']['address2']; // @codingStandardsIgnoreLine\r\n $address->CityName = $details['shipping_address']['city']; // @codingStandardsIgnoreLine\r\n $address->StateOrProvince = $details['shipping_address']['state']; // @codingStandardsIgnoreLine\r\n $address->Country = $details['shipping_address']['country']; // @codingStandardsIgnoreLine\r\n $address->PostalCode = $details['shipping_address']['zip']; // @codingStandardsIgnoreLine\r\n $address->Phone = $details['shipping_address']['phone']; // @codingStandardsIgnoreLine\r\n $payment->ShipToAddress = $address; // @codingStandardsIgnoreLine\r\n }\r\n\t\tif ( false !== $custom ) {\r\n\t\t\t$payment->Custom = $custom; // @codingStandardsIgnoreLine\r\n\t\t}\r\n\t\tif ( false !== $invoice ) {\r\n\t\t\t$payment->InvoiceID = $invoice; // @codingStandardsIgnoreLine\r\n\t\t}\r\n\t\t$request_type = new DoExpressCheckoutPaymentRequestDetailsType();\r\n\t\t$request_type->ButtonSource = 'WooSPBLatam_Cart';\r\n\t\t$request_type->PayerID = $payer_id; // @codingStandardsIgnoreLine\r\n\t\t$request_type->Token = $token; // @codingStandardsIgnoreLine\r\n\t\t$request_type->PaymentAction = $this->get_option( 'paymentaction' ); // @codingStandardsIgnoreLine\r\n\t\t$request_type->PaymentDetails[0] = $payment; // @codingStandardsIgnoreLine\r\n\t\t$request_details = new DoExpressCheckoutPaymentRequestType();\r\n\t\t$request_details->DoExpressCheckoutPaymentRequestDetails = $request_type; // @codingStandardsIgnoreLine\r\n\t\t$request = new DoExpressCheckoutPaymentReq();\r\n\t\t$request->DoExpressCheckoutPaymentRequest = $request_details; // @codingStandardsIgnoreLine\r\n\t\t$pp_service = WC_PayPal_Interface_Latam::get_static_interface_service();\r\n\t\ttry {\r\n\t\t\t/* wrap API method calls on the service object with a try catch */\r\n\t\t\t$response = $pp_service->DoExpressCheckoutPayment( $request );\r\n\t\t\tif ( in_array( $response->Ack, array( 'Success', 'SuccessWithWarning' ), true ) ) { // @codingStandardsIgnoreLine\r\n\t\t\t\tWC_Paypal_Logger::obj()->debug( 'Result on do_checkout', array( $response ) );\r\n\t\t\t\tWC_Paypal_Logger::obj()->debug( 'DATA for do_checkout', array( $request ) );\r\n\t\t\t\treturn $response;\r\n\t\t\t} else {\r\n\t\t\t\tthrow new Exception( print_r( $response, true ) ); // @codingStandardsIgnoreLine\r\n\t\t\t}\r\n\t\t} catch ( Exception $e ) {\r\n\t\t\tWC_Paypal_Logger::obj()->warning( 'Error on do_checkout: ' . $e->getMessage() );\r\n\t\t\tWC_Paypal_Logger::obj()->warning( 'DATA for do_checkout: ', array( $request ) );\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public static function checkout()\n {\n }", "public function buyProductWithManualCheckout()\n {\n $I = $this;\n $I->addProductToCart();\n $I->goToCheckout();\n $checkoutPage = new CheckoutPage($I);\n $checkoutPage->fillCheckout();\n $checkoutPage->selectPaymentMethod('Manual Checkout');\n $checkoutPage->proceedToPayment();\n $I->checkOrderConfirmed();\n }", "public function changePaymentMode()\n\t{\n\t\tif($this->request->is('ajax'))\n\t\t{\n\t\t\tif($this->request->is('get'))\n\t\t\t{\n\t\t\t\t$query_data = $this->request->query;\n\t\t\t\t$patient_id = $query_data['id-patient'];\n\n\n\t\t\t\tswitch ($query_data['type']) \n\t\t\t\t{\n\t\t\t\t\tcase 'insurance':\n\t\t\t\t\t\t\t$actual_date = new \\DateTime();\n\t\t\t\t\t\t\t$now = $actual_date->format('Y-m-d');\n\t\t\t\t\t\t\t$this->loadModel('PatientInsurances');\n\t\t\t\t\t\t\t$insurances = $this->PatientInsurances->find()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ->contain(['PatientInsurers'])\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ->where(['patient_id'=>$patient_id])\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ->andWhere(function($exp,$q){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\treturn $exp->isNull('deleted');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t })\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ->andWhere(['PatientInsurances.state'=>1,'PatientInsurances.expired_insurance_date > '=>$now]);\n\n\n\t\t\t\t\t\t\tif($insurances)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->set(compact('insurances'));\n\t\t\t\t\t\t\t\t$this->render('change_payment_mode_insurance');\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\techo 'down';\n\t\t\t\t\t\t\t\texit();\n\t\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'cash':\n\t\t\t\t\t\t $this->render('change_payment_mode_cash');\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'cb':\n\t\t\t\t\t\t $this->render('change_payment_mode_cb');\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t}\n\n\t\t\tif($this->request->is('post'))\n\t\t\t{\n\t\t\t\t$data = $this->request->data;\n\t\t\t\t$this->loadModel('Visits');\n\t\t\t\t$this->loadModel('VisitStates');\n\t\t\t\t$visit = $this->Visits->get($data['id-bill'],['contain'=>['VisitSpecialities','VisitInterventionDoctors.Doctors.People','VisitStates']]);\n\t\t\t\t$data['state_visit'] = 'change_payment_mode_booking';\n\t\t\t\t$visit->visit_states[0]->state_end = new \\DateTime('NOW');\n\t\t\t\t//setting a new state\n\n //change the state from reservation to consultation\n $data_state=[\n \t'state_begin'=> new \\DateTime('NOW'),\n 'visit_level_id' => 1,\n 'visit_kind_transport_id' =>1,\n 'visit_authorized' => true,\n 'visit_state_type_id' => 1\n ];\n $visit_state = $this->VisitStates->newEntity($data_state);\n\n array_push($visit->visit_states,$visit_state);\n\n\t\t\t\t$data['manager_operator_id'] = $this->Auth->user('id');\n\n\t\t\t\tswitch($data['type'])\n\t\t\t\t{\n\t\t\t\t\tcase 'insurance':\n\t\t\t\t\t\t$data['kind_solvment']='insurance';\n\t\t\t\t\t\t$visit->perc_insurance = $data['perc_insurance_change_mode'];\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'cash':\n\t\t\t\t\t\t$data['kind_solvment']='cash';\n\t\t\t\t\t\t$visit->montant = $data['amount_cash_booking_mode'];\n\t\t\t\t\tbreak;\n\n\n\t\t\t\t\tcase 'cb':\n\t\t\t\t\t\t$data['kind_solvment']='cb';\n\t\t\t\t\t\t$visit->bank_reference = $data['bank_reference_change_mode'];\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t$visit = $this->Visits->patchEntity($visit,$data,['associated'=>'VisitInvoices.VisitInvoicePayments.VisitInvoicePaymentSchedules','VisitStates']);\n\t\t\t\t$visit->dirty('visit_invoices',true);\n\t\t\t\t$visit->dirty('visit_invoices.visit_invoice_payments',true);\n\t\t\t\t$visit->dirty('visit_states',true);\n\n\t\t\t\tif($this->Visits->save($visit))\n\t\t\t\t{\n\t\t\t\t\t$this->loadModel('VisitInterventionDoctors');\n\t\t\t\t\t\t\t$visit_intervention_doctor = $this->VisitInterventionDoctors->get($visit->visit_intervention_doctors[0]->id);\n\t\t\t\t\t\t\t$visit_intervention_doctor->visit_invoice_id = $visit->visit_invoices[0]->id;\n\n\t\t\t\t\t\t\tif($this->VisitInterventionDoctors->save($visit_intervention_doctor))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->loadModel('Institutions');\n\t\t\t\t\t\t\t\t$this->loadModel('Patients');\n\t\t\t\t\t\t\t\t$institution = $this->Institutions->find()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->contain(['InstitutionAdresses','CountryTownships.CountryCities'])\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->where(['Institutions.id'=>$this->Auth->user('institution_id')])->first();\n\t\t\t\t\t\t\t\t$patient = $this->Patients->find()->contain('People')->where(['Patients.id'=>$data['id-patient']])->first();\n\t\t\t\t\t\t\t\t$operator = $this->Auth->user();\n\t\t\t\t\t\t\t\t$visit->search_doctor = $visit->visit_intervention_doctors[0]->doctor->person->lastname.' '.$visit->visit_intervention_doctors[0]->doctor->person->firstname;\n\t\t\t\t\t\t\t\t$visit->search_speciality=$visit->visit_speciality->libelle;\n\t\t\t\t\t\t\t\t$visit->visit_type_id = 1;\n\t\t\t\t\t\t\t\t$visit->visit_invoice_payment_way_id=$visit->visit_invoices[0]->visit_invoice_payment_way_id;\n\t\t\t\t\t\t\t\t$this->set(compact('visit','institution','patient','operator'));\t\t\t\t\t\n\t\t\t\t\t\t\t\t$this->render('add_visit');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\techo 'ko';\n\t\t\t\t\t\t\t\texit();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo 'ko';\n\t\t\t\t\texit();\n\t\t\t\t}\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\t}", "public function payInvoice(Request $request)\n {\n $cmd = Input::get('cmd');\n if ($request->gateway == '') {\n return redirect('user/invoices/view/' . $cmd)->with([\n 'message' => language_data('Payment gateway required'),\n 'message_important' => true\n ]);\n }\n\n $gateway = Input::get('gateway');\n $gat_info = PaymentGateways::where('settings', $gateway)->first();\n $invoice_items = InvoiceItems::where('inv_id', $cmd)->get();\n $invoice = Invoices::find($cmd);\n\n if ($gateway == 'paypal') {\n $config = [\n 'mode' => 'sandbox', // Can only be 'sandbox' Or 'live'. If empty or invalid, 'live' will be used.\n 'sandbox' => [\n 'username' => $gat_info->value, // Api Username\n 'password' => $gat_info->password, // Api Password\n 'secret' => $gat_info->extra_value, // This refers to api signature\n ],\n 'payment_action' => 'Sale', // Can Only Be 'Sale', 'Authorization', 'Order'\n 'notify_url' => '', // Change this accordingly for your application.\n 'locale' => app_config('Country'), // Change this accordingly for your application.\n 'currency' => app_config('Currency'), // Change this accordingly for your application.\n ];\n\n $provider = new ExpressCheckout();\n\n $provider->setApiCredentials($config);\n $options = [\n 'BRANDNAME' => app_config('AppName'),\n 'LOGOIMG' => asset(app_config('AppLogo')),\n ];\n $provider->addOptions($options);\n\n $data = [];\n $data['items'] = [];\n foreach ($invoice_items as $i) {\n array_push($data['items'], [\n 'name' => $i->item,\n 'price' => $i->total,\n 'qty' => 1\n ]);\n }\n\n $data['invoice_id'] = $cmd;\n $data['invoice_description'] = \"Order #{$data['invoice_id']} Invoice\";\n $data['return_url'] = url('/user/invoice/success/' . $cmd);\n $data['cancel_url'] = url('/user/invoice/cancel/' . $cmd);\n\n $total = 0;\n foreach ($data['items'] as $item) {\n $total += $item['price'] * $item['qty'];\n }\n\n $data['total'] = $total;\n\n $response = $provider->setExpressCheckout($data);\n\n return redirect($response['paypal_link']);\n\n }\n\n if ($gateway == 'payu') {\n\n $signature = \"$gat_info->extra_value~$gat_info->value~invoiceId$invoice->id~$invoice->total~\" . app_config('Currency');\n $signature = md5($signature);\n\n $order = array(\n 'merchantId' => $gat_info->value,\n 'ApiKey' => $gat_info->extra_value,\n 'referenceCode' => 'invoiceId' . $invoice->id,\n 'description' => 'Invoice No#' . $invoice->id,\n 'amount' => $invoice->total,\n 'tax' => '0',\n 'taxReturnBase' => '0',\n 'currency' => app_config('Currency'),\n 'buyerEmail' => Auth::guard('client')->user()->email,\n 'test' => '0',\n 'signature' => $signature,\n 'confirmationUrl' => url('/user/invoice/success/' . $cmd),\n 'responseUrl' => url('/user/invoice/cancel/' . $cmd),\n );\n ?>\n\n <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n <html>\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n <title>Please wait while you're redirected</title>\n <style type=\"text/css\">\n #redirect {\n background: #f1f1f1;\n font-family: Helvetica, Arial, sans-serif\n }\n\n #redirect-container {\n width: 410px;\n margin: 130px auto 0;\n background: #fff;\n border: 1px solid #b5b5b5;\n -moz-border-radius: 5px;\n -webkit-border-radius: 5px;\n border-radius: 5px;\n text-align: center\n }\n\n #redirect-container h1 {\n font-size: 22px;\n color: #5f5f5f;\n font-weight: normal;\n margin: 22px 0 26px 0;\n padding: 0\n }\n\n #redirect-container p {\n font-size: 13px;\n color: #454545;\n margin: 0 0 12px 0;\n padding: 0\n }\n\n #redirect-container img {\n margin: 0 0 35px 0;\n padding: 0\n }\n\n .ajaxLoader {\n margin: 80px 153px\n }\n </style>\n <script type=\"text/javascript\">\n function timedText() {\n setTimeout('msg1()', 2000);\n setTimeout('msg2()', 4000);\n setTimeout('document.MetaRefreshForm.submit()', 4000);\n }\n function msg1() {\n document.getElementById('redirect-message').firstChild.nodeValue = \"Preparing Data...\";\n }\n function msg2() {\n document.getElementById('redirect-message').firstChild.nodeValue = \"Redirecting...\";\n }\n </script>\n </head>\n <?php echo \"<body onLoad=\\\"document.forms['gw'].submit();\\\">\\n\"; ?>\n <div id=\"redirect-container\">\n <h1>Please wait while you&rsquo;re redirected</h1>\n <p class=\"redirect-message\" id=\"redirect-message\">Loading Data...</p>\n <script type=\"text/javascript\">timedText()</script>\n </div>\n <form method=\"post\" action=\"https://gateway.payulatam.com/ppp-web-gateway\" name=\"gw\">\n <?php\n foreach ($order as $name => $value) {\n echo \"<input type=\\\"hidden\\\" name=\\\"$name\\\" value=\\\"$value\\\"/>\\n\";\n }\n ?>\n </form>\n </body>\n </html>\n <?php\n }\n\n if ($gateway == 'stripe') {\n\n $stripe_amount = $invoice->total * 100;\n return view('client.stripe', compact('gat_info', 'stripe_amount', 'cmd'));\n\n }\n\n if ($gateway == 'slydepay') {\n\n require_once(app_path('libraray/vendor/autoload.php'));\n\n $slydepay = new Slydepay($gat_info->value, $gat_info->extra_value);\n $orderItems = new OrderItems([\n new OrderItem($invoice->id, \"Invoice NO# $invoice->id\", $invoice->total, 1)\n ]);\n $shippingCost = 0;\n $tax = 0;\n $order_id = _raid(5);\n\n $order = Order::createWithId($orderItems, $order_id, $shippingCost, $tax, $invoice->id);\n\n try {\n $response = $slydepay->processPaymentOrder($order);\n return redirect($response->redirectUrl());\n } catch (ProcessPaymentException $e) {\n return redirect('user/invoices/view/' . $invoice->id)->with([\n 'message' => $e->getMessage(),\n 'message_important' => true\n ]);\n }\n }\n\n if ($gateway == 'manualpayment') {\n $details = $gat_info->value;\n\n return view('client.bank-details', compact('details'));\n }\n }", "function setExpressCheckout( &$order ) {\n\t\tif ( WP_DEBUG ) {\n\t\t\terror_log( \"In setExpressCheckout, using request #: {$this->requestNo}\" );\n\t\t}\n\n\t\tglobal $pmpro_currency;\n\t\tglobal $pmpro_pages;\n\n\t\t$options = apply_filters( \"pmpro_payment_options\", array( 'gateway' ) );\n\n\t\tif ( empty( $order->code ) ) {\n\t\t\t$order->code = $order->getRandomCode();\n\t\t}\n\n\t\t//clean up a couple values\n\t\t$order->payment_type = \"PayPal Express\";\n\t\t$order->CardType = \"\";\n\t\t$order->cardtype = \"\";\n\n\t\t//taxes on initial amount\n\t\t$initial_payment = $order->InitialPayment;\n\t\t$initial_payment_tax = $order->getTaxForPrice( $initial_payment );\n\t\t$initial_payment = round( (float) $initial_payment + (float) $initial_payment_tax, 2 );\n\n\t\t//taxes on the amount\n\t\t$amount = $order->PaymentAmount;\n\t\t$amount_tax = $order->getTaxForPrice( $amount );\n\t\t$amount = round( (float) $amount + (float) $amount_tax, 2 );\n\n\t\t//paypal profile stuff\n\t\t$nvpStr = \"&PAYMENTREQUEST_{$this->requestNo}_AMT={$initial_payment}\";\n\t\t$nvpStr .= \"&PAYMENTREQUEST_{$this->requestNo}_CURRENCYCODE={$pmpro_currency}\";\n\n\t\tif ( ! empty( $order->ProfileStartDate ) && strtotime( $order->ProfileStartDate, current_time( \"timestamp\" ) ) > 0 ) {\n\t\t\t$nvpStr .= \"&PROFILESTARTDATE={$order->ProfileStartDate}\";\n\t\t}\n\n\t\tif ( ! empty( $order->BillingFrequency ) ) {\n\t\t\t$nvpStr .= \"&BILLINGPERIOD={$order->BillingPeriod}\";\n\t\t\t$nvpStr .= \"&BILLINGFREQUENCY={$order->BillingFrequency}\";\n\t\t\t$nvpStr .= \"&AUTOBILLAMT=AddToNextBilling\";\n\t\t\t$nvpStr .= \"&L_BILLINGTYPE{$this->requestNo}=RecurringPayments\";\n\t\t}\n\n\t\t$descr = substr( $order->membership_level->name . \" at \" . get_bloginfo( \"name\" ), 0, 127 );\n\t\t$descr = apply_filters( 'pmpro_paypal_level_description', $descr, $order->membership_level->name, $order, get_bloginfo( \"name\" ) );\n\t\t$descr = urlencode( $descr );\n\n\t\t$nvpStr .= \"&PAYMENTREQUEST_{$this->requestNo}_DESC={$descr}\";\n\n\t\t// Build the link for PayPal to use when sending IPN messages\n\t\t$this->set_ipn_link();\n\t\t$ipnLink = urlencode( $this->ipn_notifylink );\n\n\t\t$nvpStr .= \"&PAYMENTREQUEST_{$this->requestNo}_NOTIFYURL={$ipnLink}\";\n\t\t$nvpStr .= \"&NOSHIPPING=1\";\n\n\t\t// configure the description to use for the billing agreement\n\t\t$a_text = substr( $order->membership_level->name . \" at \" . get_bloginfo( \"name\" ), 0, 127 );\n\t\t$a_text = apply_filters( 'pmpro_paypal_billing_agreement_text', $a_text, $order, get_bloginfo( \"name\" ) );\n\t\t$a_text = urlencode( $a_text );\n\n\t\t$nvpStr .= \"&L_BILLINGAGREEMENTDESCRIPTION{$this->requestNo}={$a_text}\";\n\t\t$nvpStr .= \"&L_PAYMENTTYPE0=Any\";\n\n\t\t//if billing cycles are defined\n\t\tif ( ! empty( $order->TotalBillingCycles ) ) {\n\t\t\t$nvpStr .= \"&TOTALBILLINGCYCLES={$order->TotalBillingCycles}\";\n\t\t}\n\n\t\t//if a trial period is defined\n\t\tif ( ! empty( $order->TrialBillingPeriod ) ) {\n\n\t\t\t$trial_amount = $order->TrialAmount;\n\t\t\t$trial_tax = $order->getTaxForPrice( $trial_amount );\n\t\t\t$trial_amount = round( (float) $trial_amount + (float) $trial_tax, 2 );\n\n\t\t\t$nvpStr .= \"&TRIALBILLINGPERIOD={$order->TrialBillingPeriod}\";\n\t\t\t$nvpStr .= \"&TRIALBILLINGFREQUENCY={$order->TrialBillingFrequency}\";\n\t\t\t$nvpStr .= \"&TRIALAMT={$trial_amount}\";\n\t\t}\n\n\t\tif ( ! empty( $order->TrialBillingCycles ) ) {\n\t\t\t$nvpStr .= \"&TRIALTOTALBILLINGCYCLES={$order->TrialBillingCycles}\";\n\t\t}\n\n\t\t// set the correct return page/action after finishing on PayPal\n\t\t$confirmation_page = pmpro_getOption( 'confirm_page_id' );\n\n\t\tif ( - 1 == $confirmation_page && $pmpro_pages['checkout'] != $confirmation_page ) {\n\n\t\t\tif ( WP_DEBUG ) {\n\t\t\t\terror_log( \"Using custom page ({$confirmation_page}) as the confirmation page\" );\n\t\t\t}\n\n\t\t\t$return_url = get_permalink( $confirmation_page );\n\n\t\t} else {\n\n\t\t\tif ( WP_DEBUG ) {\n\t\t\t\terror_log( \"Using default checkout page as the confirmation page\" );\n\t\t\t}\n\n\t\t\t$return_url = get_permalink( $pmpro_pages['checkout'] );\n\t\t}\n\n\t\t// required arguments for the return link\n\t\t$r_args = array(\n\t\t\t'review' => $order->code,\n\t\t\t'gateway' => 'paypalexpress_auto',\n\t\t\t'level' => $order->membership_id,\n\t\t);\n\n\n\t\tif ( ! empty( $order->discount_code ) ) {\n\n\t\t\t$r_args[\"discount_code\"] = $order->discount_code;\n\t\t}\n\n\t\t$r_args = apply_filters( 'pmpro_paypal_auto_return_url_parameters', $r_args, $order, $return_url );\n\t\t$return_link = urlencode( add_query_arg( $r_args, $return_url ) );\n\n\t\t$nvpStr .= \"&RETURNURL={$return_link}\";\n\n\t\t$additional_parameters = apply_filters( \"pmpro_paypal_auto_other_parameters\", array() );\n\n\t\tif ( ! empty( $additional_parameters ) ) {\n\n\t\t\tforeach ( $additional_parameters as $key => $value ) {\n\t\t\t\t$nvpStr .= \"&\" . urlencode( $key ) . \"=\" . urlencode( $value );\n\t\t\t}\n\t\t}\n\n\t\t// add page to land on if order is cancelled on PayPal\n\t\t$cancel_page = pmpro_getOption( 'user_cancelled_id' );\n\n\t\t$cancel_args = array(\n\n\t\t\t'gateway' => 'paypalexpress_auto',\n\t\t\t'cancelling' => true,\n\t\t);\n\n\t\tif ( (!empty($cancel_page) && -1 != $cancel_page) && $pmpro_pages['levels'] != $cancel_page ) {\n\t\t\tif ( WP_DEBUG ) {\n\t\t\t\terror_log( \"Using custom page ({$cancel_page}) as the cancellation page\" );\n\t\t\t}\n\n\t\t\t$cancel_url = get_permalink( $cancel_page );\n\n\t\t} else {\n\t\t\tif ( WP_DEBUG ) {\n\t\t\t\terror_log( \"Using the levels page as the cancellation page\" );\n\t\t\t}\n\n\t\t\t$cancel_url = pmpro_url( \"levels\" );\n\t\t}\n\n\t\t$cancel_url = urlencode( add_query_arg( $cancel_args, $cancel_url ) );\n\n\t\t$nvpStr .= \"&CANCELURL={$cancel_url}\";\n\n\t\t$account_optional = apply_filters( 'pmpro_paypal_account_optional', true );\n\n\t\tif ( true == $account_optional ) {\n\n\t\t\t$nvpStr .= \"&SOLUTIONTYPE=Sole\";\n\t\t\t$nvpStr .= \"&LANDINGPAGE=Billing\";\n\t\t}\n\n\t\t$nvpStr = apply_filters( \"pmpro_set_express_checkout_nvpstr\", $nvpStr, $order );\n\n\t\t// Increment the request counter\n\t\t$this->requestNo ++;\n\n\t\t$this->httpParsedResponseAr = $this->PPHttpPost( 'SetExpressCheckout', $nvpStr );\n\n\t\tif ( \"SUCCESS\" === strtoupper( $this->httpParsedResponseAr[\"ACK\"] ) ||\n\t\t \"SUCCESSWITHWARNING\" === strtoupper( $this->httpParsedResponseAr[\"ACK\"] )\n\t\t) {\n\n\t\t\tif ( WP_DEBUG ) {\n\t\t\t\terror_log( \"Setting order status to 'token'\" );\n\t\t\t}\n\n\t\t\t$order->status = \"token\";\n\t\t\t$order->paypal_token = urldecode( $this->httpParsedResponseAr['TOKEN'] );\n\n\t\t\t//update order\n\t\t\t$order->saveOrder();\n\n\t\t\t//redirect to paypal\n\t\t\t$pp_options = array(\n\t\t\t\t'cmd' => '_express-checkout'\n\t\t\t);\n\n\t\t\tif ( ! empty( $this->httpParsedResponseAr[\"TOKEN\"] ) ) {\n\t\t\t\t$pp_options['token'] = $this->httpParsedResponseAr['TOKEN'];\n\t\t\t}\n\n\t\t\tif ( 0 == pmpro_getOption( 'paypal_show_confirmation' ) ) {\n\t\t\t\t$pp_options['useraction'] = 'commit';\n\t\t\t}\n\n\t\t\t$paypal_url = \"https://www.paypal.com/webscr?\";\n\n\t\t\t$environment = pmpro_getOption( \"gateway_environment\" );\n\n\t\t\tif ( \"sandbox\" === $environment || \"beta-sandbox\" === $environment ) {\n\n\t\t\t\t$paypal_url = \"https://www.sandbox.paypal.com/webscr?\";\n\t\t\t}\n\n\t\t\tforeach ( $pp_options as $param => $val ) {\n\n\t\t\t\t$cmds[] = \"{$param}={$val}\";\n\t\t\t}\n\n\t\t\t$paypal_params = implode( '&', $cmds );\n\n\t\t\t$paypal_url .= $paypal_params;\n\n/*\n\t\t\tif ( WP_DEBUG ) {\n\t\t\t\terror_log( \"Sending user to PayPal: {$paypal_url}\" );\n\t\t\t}\n*/\n\t\t\twp_redirect( $paypal_url );\n\t\t\texit;\n\n\t\t\t//exit('SetExpressCheckout Completed Successfully: '.print_r($this->httpParsedResponseAr, true));\n\n\t\t} else {\n\t\t\tif ( WP_DEBUG ) {\n\t\t\t\terror_log( \"Setting order status to 'error'\" );\n\t\t\t}\n\n\t\t\t$order->status = \"error\";\n\t\t\t$order->errorcode = $this->httpParsedResponseAr['L_ERRORCODE0'];\n\t\t\t$order->error = urldecode( $this->httpParsedResponseAr['L_LONGMESSAGE0'] );\n\t\t\t$order->shorterror = urldecode( $this->httpParsedResponseAr['L_SHORTMESSAGE0'] );\n\n\t\t\tif ( WP_DEBUG ) {\n\t\t\t\terror_log( \"Updating the order notes with the PayPal error message\" );\n\t\t\t}\n\n\t\t\t$order->notes = $order->notes . \" (SetExpressCheckout [{$order->errorcode}]): {$order->shorterror} - {$order->error})\";\n\t\t\t$order->saveOrder();\n\n\t\t\treturn false;\n\t\t\t//exit('SetExpressCheckout failed: ' . print_r($httpParsedResponseAr, true));\n\t\t}\n\n\t\t//write session?\n\n\t\t//redirect to PayPal\n\t}", "public function isOnetimeCheckout(){\r\n\t\treturn Mage::getStoreConfig('vendors/checkout/onetime_checkout');\r\n\t}", "public function beforeSetLayout(ViewBlock $view)\n {\n // Only proceed with Ingenico orders\n if ($view->getOrder()->getPayment()->getMethodInstance()->getCode() === ConfigProvider::CODE) {\n $this->addRefreshOrderButon($view);\n // Only proceed with suspected fraud orders\n if ($view->getOrder()->getStatus() === Order::STATUS_FRAUD) {\n $this->updateApproveFraudPaymentButton($view);\n }\n }\n }", "public function payment_gateways_setting()\n {\n }", "public function get_checkout_payment_url($on_checkout = \\false)\n {\n }", "public function setCustomer()\n {\n $customer_webshop_id = $this->raw_data['customer_id'];\n\n $this->customer = Customer::where('webshop_id', $customer_webshop_id )->first();\n\n if ($this->customer) $this->checkAddresses();\n\n else $this->importCustomer();\n\n abi_r($this->invoicing_address_id);\n abi_r($this->shipping_address_id);\n }", "function change_default_checkout_country() {\r\n return 'GB'; // country code\r\n}", "public static function checkout(){\n\t\treturn OpalMembership()->checkout()->checkout_form();\n\t}", "public function setCheckout($setcheckoutrequest, $apiKey)\n {\n try {\n $serviceEndpoint = $this->_getEndpoint(ApiEndpoints::ENDPOINT_CHECKOUT);\n $serviceUrl = \"{$serviceEndpoint}/checkout\";\n $jsonData = json_encode($setcheckoutrequest);\n $checkoutResponseJson = $this->_callRestService(\n $serviceUrl,\n $jsonData,\n Base::POST,\n $apiKey\n );\n $checkoutResponseArray = json_decode($checkoutResponseJson, true);\n $checkoutResponse = $this->_bamboraHelper->getCheckoutApiModel(\n CheckoutApiModels::RESPONSE_CHECKOUT\n );\n $checkoutResponse->meta = $this->_mapMeta($checkoutResponseArray);\n $checkoutResponse->token = $checkoutResponseArray['token'];\n $checkoutResponse->url = $checkoutResponseArray['url'];\n\n return $checkoutResponse;\n } catch (\\Exception $ex) {\n $this->_bamboraLogger->addCheckoutError(\"-1\", $ex->getMessage());\n return null;\n }\n }", "private function redirectToCheckout()\n {\n $orderProcess = Configuration::get('PS_ORDER_PROCESS_TYPE') ? 'order-opc' : 'order';\n Tools::redirect($this->context->link->getPageLink($orderProcess, true));\n }", "public function checkout() {\n if (!$this->template = $this->application->getTemplate()) {\n return $this->app->error->raiseError(500, JText::_('No template selected'));\n }\n \n $this->app->document->addScript('assets:js/formhandler.js');\n\n $step = $this->app->request->get('step','string', 'customer');\n\n $layout = 'checkout';\n $this->params = $this->application->getParams('site');\n\n // Initialize the Cash Register\n $CR = $this->app->cashregister->start();\n \n // Import Transfer Data\n if ($step != 'receipt') {\n $CR->import();\n }\n \n //Setup Page Variables\n $page = $CR->page;\n\n // $customer = $this->app->request->get('customer','array');\n // $CR->order->billing = $this->app->data->create($customer['billing']);\n // $CR->order->shipping = $this->app->data->create($customer['shipping']);\n \n switch($step) {\n case 'customer':\n $page->title = 'Customer Information';\n $page->subtitle = 'Please enter your information below.';\n $page->id = $step;\n $page->inProgress = array($step);\n $page->addButton('print', '', 'Print', false)->addButton('back','', 'Back', false)->addButton('proceed', 'payment', 'Proceed');\n break;\n case 'payment':\n $page->title = 'Payment Information';\n $page->subtitle = 'Please enter your payment information below.';\n $page->id = $step;\n $page->complete = array('customer');\n $page->inProgress = array($step);\n $page->addButton('print', '', '', false)->addButton('back', 'customer', 'Back')->addButton('proceed', 'confirm', 'Proceed');\n break;\n case 'confirm':\n $page->title = 'Order Confirmation';\n $page->subtitle = '<span class=\"uk-text-danger\">Please make sure that your order is correct.</span>';\n $page->id = $step;\n $page->complete = array('customer','payment');\n $page->inProgress = array($step);\n $page->addButton('print','','',false)->addButton('back', 'payment', 'Back')->addButton('proceed', 'processPayment', 'Pay Now');\n break;\n case 'receipt':\n $page->title = 'Order Receipt';\n $page->subtitle = 'Thank you for your purchase.';\n $page->id = $step;\n $page->complete = array('customer','payment', 'confirm');\n $page->inProgress = array($step);\n $page->addButton('print','Print Receipt')->addButton('back','', 'Back', false)->addButton('proceed','home','Return to Home Page');\n $this->app->document->addStyleSheet('assets:css/receipt.css');\n\n break;\n case 'home':\n \n JControllerLegacy::setRedirect('/');\n JControllerLegacy::Redirect();\n break;\n default:\n $page->title = 'Customer Information';\n $page->subtitle = 'Please enter your information below.';\n $page->id = 'customer';\n $page->inProgress = array('customer');\n $page->addButton('print', '', 'Print', false)->addButton('back','', 'Back', false)->addButton('proceed', 'payment', 'Proceed');\n }\n\n $this->CashRegister = $CR;\n\n // display view\n $this->getView()->addTemplatePath($this->template->getPath())->setLayout($layout)->display();\n\n }", "public function show(Checkout $checkout)\n {\n //\n }", "public function show(Checkout $checkout)\n {\n //\n }", "public function show(Checkout $checkout)\n {\n //\n }", "public function enableVirtualMode() { $this->virtualMode = TRUE; }", "public function actionPaymentcheckout()\n {\n if(empty($_REQUEST) || @$_REQUEST['amount']<1000)\n {\n return $this->redirect(['/']);\n }\n $params = $_REQUEST;\n\n #add GST 18% to amount\n $gst_amount = (Yii::$app->params['GST']/100)*$params['amount'];\n $params['amount'] = $params['amount']+$gst_amount;\n\n unset($params['_csrf']);\n $params['merchant_id'] = Yii::$app->params['ccavenue_merchant_id'];\n \\app\\components\\Ccavenue::form($params, 'auto', Yii::$app->params['PAYMENT_TYPE'], 'websites');\n }", "public function show_checkout()\n\t{\n\t \n\t $cart['item'] = Items::getcartData();\n\t $cart_count = Items::getcartCount();\n\t $mobile['item'] = Items::getcartData();\n\t $sid = 1;\n\t $setting['setting'] = Settings::editGeneral($sid);\n\t $additional['setting'] = Settings::editAdditional();\n\t if($cart_count != 0)\n\t {\n\t\t $last_order = Items::lastorderData();\n\t\t $item_user_id = $last_order->item_user_id;\n\t\t $count_mode = Settings::checkuserSubscription($item_user_id);\n\t\t $vendor_details = Members::singlevendorData($item_user_id);\n\t\t if($additional['setting']->subscription_mode == 0)\n\t\t {\n\t\t\t$get_payment = explode(',', $setting['setting']->payment_option);\n\t\t }\n\t\t else\n\t\t {\n\t\t\t if($count_mode == 1)\n\t\t\t {\n\t\t\t\t$get_payment = explode(',', $vendor_details->user_payment_option);\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t$get_payment = explode(',', $setting['setting']->payment_option);\n\t\t\t }\n\t\t }\n\t }\n\t else\n\t {\n\t $get_payment = explode(',', $setting['setting']->payment_option);\n\t }\n\t $data = array('cart' => $cart, 'cart_count' => $cart_count, 'get_payment' => $get_payment, 'mobile' => $mobile);\n\t \n\t return view('checkout')->with($data);\n\t \n\t\n\t}", "function setTaxCalculationMethod($priceFromNet) {\n \t \n \t \t$this->pricefromnet = $priceFromNet;\n \t \tforeach ($this->basket_items as $one_item) {\n \t\t\t$one_item->setTaxCalculationMethod($this->pricefromnet);\n \t\t}\n \t }", "public function AuthorizeCheckout(Request $request)\n {\n// API LOGIN ID\n// 6J9W7nvZtm8\n// TRANSACTION KEY\n// 284zmBQz6y5KF57f\n// KEY\n// Simon\n// Simon\n //$merchantAuthentication->setName('2E3z6KruR');\n\t\t//$merchantAuthentication->setTransactionKey('48Cy6rk4H82xD6b9');\n //production\n\t\t//$merchantAuthentication->setName('3qe3N33vB3');\n\t\t//$merchantAuthentication->setTransactionKey('6pu9mhm9Q573N8HR');\n // Common setup for API credentials\n $mode=config('services.authorize.mode');\n $merchantAuthentication = new AnetAPI\\MerchantAuthenticationType();\n $refId = 'ref'.time();\n $merchantAuthentication->setName(config('services.authorize.login'));\n $merchantAuthentication->setTransactionKey(config('services.authorize.key'));\n $transactionRequestType = new AnetAPI\\TransactionRequestType();\n $transactionRequestType->setTransactionType(\"priorAuthCaptureTransaction\");\n $transactionRequestType->setRefTransId($request->ID);\n $Transrequest = new AnetAPI\\CreateTransactionRequest();\n $Transrequest->setMerchantAuthentication($merchantAuthentication);\n $Transrequest->setRefId( $refId);\n $Transrequest->setTransactionRequest($transactionRequestType);\n $controller = new AnetController\\CreateTransactionController($Transrequest);\n if ($mode=='SANDBOX') {\n $response = $controller->executeWithApiResponse(\\net\\authorize\\api\\constants\\ANetEnvironment::SANDBOX);\n }\n if ($mode=='PRODUCTION') {\n $response = $controller->executeWithApiResponse(\\net\\authorize\\api\\constants\\ANetEnvironment::PRODUCTION);\n }\n \n if ($response != null)\n {\n\n $tresponse = $response->getTransactionResponse();\n if (($tresponse != null) && ($tresponse->getResponseCode()==\"1\") || ($tresponse->getResponseCode()==\"4\"))\n {\n $order = $this->addToOrdersTables($request, null,$tresponse->getTransId());\n \n Mail::send(new OrderPlaced($order));\n Mail::send(new OrderRecived($order));\n // decrease the quantities of all the products in the cart\n //$this->decreaseQuantities();\n Cart::instance('default')->destroy();\n session()->forget('coupon');\n return view('thankyou')->with([\n 'success_message' => 'Thank you! Your payment has been successfully accepted!',\n 'successID' => $order->id,\n ]);\n }\n else\n {\n\n $error =$tresponse->getErrors();\n return back()->withErrors('An error occurred: '.$error[0]->getErrorText());\n\n\n }\n }\n else\n {\n echo \"Charge Credit Card Null response returned\";\n }\n\n\n\n\n //return back()->withErrors('An error occurred with the message: '.$result->message);\n}", "public function getOPCheckoutUrl(){\n \tif (Mage::helper('wsu_opc')->isEnable()){\n \treturn $this->_getUrl('onepage', array('_secure'=>true));\n \t}else{\n \t\treturn parent::getOPCheckoutUrl();\n \t}\n }", "public function woocommerce_checkout_payment() {\n\t\tif ( $this->instant_checkout === 'yes' ) {\n\t\t\twc_get_template(\n\t\t\t\t'checkout/payex/payment.php',\n\t\t\t\tarray(\n\t\t\t\t\t//'checkout' => WC()->checkout()\n\t\t\t\t),\n\t\t\t\t'',\n\t\t\t\tdirname( __FILE__ ) . '/../templates/'\n\t\t\t);\n\t\t}\n\t}", "function woocommerce_button_proceed_to_checkout()\n {\n }", "function is_checkout()\n {\n }", "public function getCheckoutUrl(){\r\n\t\treturn Mage::getUrl('checkout',array('_secure' => true));\r\n\t}", "function set_payment_confirmed()\n\t{\n\t\t$this->_cart_contents['payment']['confirmed'] = true;\n\t\t// save cart - no recalculation necessary\n\t\t$this->_save_cart(false);\n\t}", "public function __construct()\n\t\t\t{\n\t\t\t\tglobal $woocommerce;\n\n\t\t\t\t$this->id = 'vtcpay';\n\t\t\t\t$this->has_fields = false;\n\t\t\t\t$this->method_title = __('VTCPAY', 'woocommerce');\n\t\t\t\t$this->liveurl = 'https://vtcpay.vn/bank-gateway/checkout.html';\n\t\t\t\t$this->testurl = 'http://alpha1.vtcpay.vn/portalgateway/checkout.html';\n\n\t\t\t\t//load the setting\n\t\t\t\t$this->init_form_fields();\n\t\t\t\t$this->init_settings();\n\n\t\t\t\t//Define user set variables\n\t\t\t\t$this->title = $this->get_option('title');\n\t\t\t\t$this->description = $this->get_option('description');\n\t\t\t\t$this->receiver_acc = $this->get_option('receiver_acc');\n\t\t\t\t$this->merchant_id = $this->get_option('merchant_id');\n\t\t\t\t$this->secure_pass = $this->get_option('secure_pass');\n\t\t\t\t$this->testmode = $this->get_option('testmode');\n\t\t\t\t$this->Curency_id=$this->get_option('Curency_id');\n\t\t\t\t$this->language=$this->get_option('language');\n\t\t\n\t\t\n\t\t\t\t$this->form_submission_method = false;\n\n\t\t\t\t//Action\n\t\t\t\tadd_action('valid-vtcpay-standard-ipn-request', array($this, 'successful_request'));\n\t\t\t\tadd_action('woocommerce_receipt_vtcpay', array($this, 'receipt_page'));\n\t\t\t\tadd_action('woocommerce_update_options_payment_gateways_' . $this->id, array($this, 'process_admin_options'));\n\t\t\t\tadd_action('woocommerce_api_wc_gateway_vtcpay', array($this, 'callback'));\n\t\t\t\tif (!$this->is_valid_for_use()) $this->enabled = false;\n\t\t\t\t\n\n\t\t\t}", "public function paypal_express_button() {\n\t\t\t?>\n <button type=\"button\" id=\"paydock-paypal-express\">\n <img src=\"https://www.paypalobjects.com/webstatic/en_US/i/btn/png/blue-pill-paypal-26px.png\"\n align=\"left\"\n style=\"margin-right:7px;\">\n </button>\n\n <script>\n var paydock_paypal = new paydock.CheckoutButton('#paydock-paypal-express', '<?php echo $this->public_key; ?>', '<?php echo $this->paypal_express_gateway_id ?>');\n paydock_paypal.onFinishInsert('input[name=\"payment_source\"]', 'payment_source_token');\n\n <?php if ( 'sandbox' == $this->mode ) : ?>\n paydock_paypal.setEnv('sandbox');\n <?php else : ?>\n paydock_paypal.setEnv('production');\n <?php endif; ?>\n\n\t\t\t\t<?php\n\t\t\t\t$items = WC()->cart->get_cart();\n\t\t\t\t$virtual_counter = 0;\n\t\t\t\t$physical_counter = 0;\n\n\t\t\t\tforeach ( $items as $item ) {\n\t\t\t\t\t$product = wc_get_product( $item['product_id'] );\n\n\t\t\t\t\tif ( $product->is_virtual() || $product->is_downloadable() ) {\n\t\t\t\t\t\t$virtual_counter ++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$physical_counter ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( $virtual_counter >= $physical_counter ) {\n\t\t\t\t?>\n var paypal_meta = {\n \"hide_shipping_address\": \"true\"\n };\n\n paydock_paypal.setMeta(paypal_meta);\n\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t\t?>\n\n paydock_paypal.on('click', function () {\n jQuery('#paydock-tab3').trigger('click');\n });\n\n paydock_paypal.on('finish', function (data) {\n jQuery('input[name=\"paydock_gateway\"]').val('paypal_express');\n jQuery('#place_order').submit();\n });\n </script>\n\t\t\t<?php\n\t\t}", "public function setexpress($isDebug = false)\n\t\t{\n\t\t /*\t\n $nvpStr =\t'&PAYMENTACTION='.urlencode($this->type).'&CURRENCYCODE='.urlencode($this->currency).'&RETURNURL='.urlencode($this->returnUrl).'&CANCELURL='.urlencode($this->cancelUrl).\n\t\t\t\t\t\t'&AMT='.urlencode($this->priceTotalAmount).'&ALLOWNOTE=1&NAME='.urlencode($this->fullname).''.\n\t\t\t\t\t\t'&HDRIMG='.urlencode($this->logoUrl). $this->nvpStrItems. \n\t\t\t\t\t\t'&ITEMAMT='.urlencode($this->priceTotalItem).'&TAXAMT='.urlencode($this->priceTax).'&SHIPPINGAMT='.urlencode($this->priceShipping).'&INVNUM=' . urlencode($this->invoiceNum);\n\t\t*/\n $nvpStr =\t'&PAYMENTACTION='.urlencode($this->type).'&RETURNURL='.urlencode($this->returnUrl).'&CANCELURL='.urlencode($this->cancelUrl).\n\t\t\t\t\t\t'&AMT='.urlencode($this->priceTotalAmount).'&ALLOWNOTE=1&NAME='.urlencode($this->fullname).''.\n\t\t\t\t\t\t'&HDRIMG='.urlencode($this->logoUrl). $this->nvpStrItems. \n\t\t\t\t\t\t'&ITEMAMT='.urlencode($this->priceTotalItem).'&TAXAMT='.urlencode($this->priceTax).'&SHIPPINGAMT='.urlencode($this->priceShipping).'&INVNUM=' . urlencode($this->invoiceNum);\n //exit(print_r($nvpStr,true));\n\t\t\tif($isDebug)\n\t\t\t{\n\t\t\t\tdie($nvpStr);\t\n\t\t\t}\n\n\t\t\t// Execute the API operation; see the PPHttpPost function above.\n\t\t\t$this->httpResponseArray = $this->Paypal_PPHttpPost('SetExpressCheckout', '53.0', $nvpStr); \n\t\t\t\n\t\t\tif(substr_count($this->httpResponseArray[\"ACK\"], 'Success') > 0)\n\t\t\t{\n\t\t\t\treturn true;\t\t\t\t\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\treturn false;\n \n\t\n }\n\t\t\t\n \n\t\t}", "public function doExpressCheckoutPayment()\n {\n }", "public function checkoutForm()\n\t{\n\t\t$this->log->logAPICall(\"PaymentIdeal3Advanced checkoutForm()\", '');\n\t\t\n\t\t$this->import('Isotope');\n\n\t\t// Check the session still contains products\n\t\tif (!count($this->Isotope->Cart->getProducts()))\n\t\t{\n\t\t\t$this->Template = new FrontendTemplate('mod_message');\n\t\t\t$this->Template->type = 'empty';\n\t\t\t$this->Template->message = $GLOBALS['TL_LANG']['MSC']['noItemsInCart'];\n\t\t\treturn;\n\t\t}\n\n\t\t// Setting order information.\n\t\t$objOrder = $this->Database->prepare(\"SELECT id, order_id, grandTotal FROM tl_iso_orders WHERE cart_id=?\")->execute($this->Isotope->Cart->id);\n\t\t$orderDescription = htmlspecialchars($this->ideal_order_description ? $this->ideal_order_description : $GLOBALS['TL_LANG']['tl_iso_payment_modules']['ideal_order_description'][2]);\n\t\t$orderAmount = round($this->Isotope->Cart->grandTotal, 2);\n\n\t\t// Order amount of 0 euro is not possible\n\t\tif ($orderAmount == 0.00)\n\t\t{\n\t\t\tglobal $objPage;\n\t\t\t$this->redirect($this->generateFrontendUrl($objPage->row(), '/step/failed'. ($GLOBALS['TL_LANG']['ERR']['orderAmount0'] ? '/reason/'.$GLOBALS['TL_LANG']['ERR']['orderAmount0'] : '')));\n\t\t}\n\n\t\t$entranceCode = sha1($objOrder->id . '-' . date('YmdHis'));\n\t\t$returnUrl = $this->configuration->getMerchantReturnURL() . '?uid=' . $objOrder->uniqid;\n\n\t\t// Escape [ and ] for ING Bank if they are in the returnUrl\n\t\t// $returnUrl = str_replace(array('[', ']'), array('%5B', '%5D'), $returnUrl);\n\t\t// TODO: remove forbidden characters from strings\n\t\tlist($transactionId, $transactionUrl) = $this->transactionRequest(substr($returnUrl, 0, 512)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t, $objOrder->id\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t, substr($orderDescription, 0, 32)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t, $orderAmount\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t, $_SESSION['CHECKOUT_DATA']['payment']['idealIssuer']\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t, $entranceCode\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t// Save order information\n\t\t$this->Database->execute(\"UPDATE tl_iso_orders SET status='\".$this->new_order_status.\"', ideal_transaction_id='\" . $transactionId . \"', ideal_entrance_code='\" . $entranceCode . \"' WHERE id=\" . $objOrder->id);\n\n\t\t$this->log->logAPIReturn(\"PaymentIdeal3Advanced checkoutForm(). Redirection to iDEAL.\", $transactionUrl);\n\n\t\t// Customer will be redirected to issuer website to pay\n\t\t$this->redirect($transactionUrl);\n\t\t\n\t\t// If something went wrong then have the customer click the link\n\t\treturn '<h1>' . $GLOBALS['TL_LANG']['ISO']['pay_with_ideal_after_error'][0] . '</h1><p>' . $GLOBALS['TL_LANG']['ISO']['pay_with_ideal_after_error'][1] . ' <a href=\"' . htmlentities($transactionUrl()) . '\">' . $GLOBALS['TL_LANG']['ISO']['pay_with_ideal_after_error'][2] . '</a></p>';\t\t\n\t}", "public function before_checkout_process() {\n // this only works if guest checkout is disabled,\n $guest_checkout = get_option( 'woocommerce_enable_guest_checkout' );\n if ( !is_user_logged_in() && $guest_checkout === 'no' ) {\n $page_id = wc_get_page_id( 'myaccount' );\n wp_redirect( home_url() . '?page_id=' . $page_id );\n exit;\n } else {\n return;\n }\n }", "function setShowPropietary($show = true){ $this->mShowProp\t= $show; }", "public function servingNova()\n {\n LaravelNova::resources([\n Nova\\Currency::class,\n Nova\\DefaultCurrency::class,\n ]);\n\n Gate::policy(Models\\NovaCurrency::class, Policies\\Currency::class);\n\n if($currency = Nova\\DefaultCurrency::option('currency')) {\n \\Config::set('nova.currency', $currency);\n }\n \n }", "public function salesQuoteItemSetPaybyfinanceEnable($observer)\n {\n $quoteItem = $observer->getQuoteItem();\n $product = $observer->getProduct();\n $quoteItem->setPaybyfinanceEnable($product->getPaybyfinanceEnable());\n }", "function SetExpressCheckout($DataArray)\n\t{\t\n\t\t$SECFieldsNVP = '&METHOD=SetExpressCheckout';\n\t\t$SurveyChoicesNVP = '';\n\t\t$PaymentsNVP = '';\n\t\t$ShippingOptionsNVP = '';\n\t\t$BillingAgreementsNVP = '';\n\t\t\n\t\t// SetExpressCheckout Request Fields\n\t\t$SECFields = isset($DataArray['SECFields']) ? $DataArray['SECFields'] : array();\n\t\tforeach($SECFields as $SECFieldsVar => $SECFieldsVal)\n\t\t{\n\t\t\tif(strtoupper($SECFieldsVar) != 'SKIPDETAILS')\n\t\t\t{\n\t\t\t\t$SECFieldsNVP .= $SECFieldsVal != '' ? '&' . strtoupper($SECFieldsVar) . '=' . urlencode($SECFieldsVal) : '';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$SkipDetails = $SECFieldsVal ? true : false;\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Check to see if the REDIRECTURL should include user-action\n\t\tif(isset($SkipDetails) && $SkipDetails)\n\t\t{\n\t\t\t$SkipDetailsOption = 'useraction=commit';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$SkipDetailsOption = 'useraction=continue';\n\t\t}\n\t\t\n\t\t// Survey Choices\n\t\t$SurveyChoices = isset($DataArray['SurveyChoices']) ? $DataArray['SurveyChoices'] : array();\n\t\tif($SECFields['surveyquestion'] != '')\n\t\t{\n\t\t\t$n = 0;\n\t\t\tforeach($SurveyChoices as $SurveyChoice)\n\t\t\t{\n\t\t\t\t$SurveyChoicesNVP .= $SurveyChoice != '' ? '&' . 'L_SURVEYCHOICE' . $n . '=' . urlencode($SurveyChoice) : '';\n\t\t\t\t$n++;\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Payment Details Type Fields\n\t\t$Payments = isset($DataArray['Payments']) ? $DataArray['Payments'] : array();\n\t\t$n = 0;\n\t\tforeach($Payments as $PaymentsVar => $PaymentsVal)\n\t\t{\n\t\t\t$CurrentPayment = $Payments[$PaymentsVar];\n\t\t\tforeach($CurrentPayment as $CurrentPaymentVar => $CurrentPaymentVal)\n\t\t\t{\n\t\t\t\tif(strtoupper($CurrentPaymentVar) != 'ORDER_ITEMS')\n\t\t\t\t{\n\t\t\t\t\t$PaymentsNVP .= $CurrentPaymentVal != '' ? '&PAYMENTREQUEST_' . $n . '_' . strtoupper($CurrentPaymentVar) . '=' . urlencode($CurrentPaymentVal) : '';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$PaymentOrderItems = $CurrentPayment['order_items'];\n\t\t\t\t\t$n_item = 0;\n\t\t\t\t\tforeach($PaymentOrderItems as $OrderItemsVar => $OrderItemsVal)\n\t\t\t\t\t{\n\t\t\t\t\t\t$CurrentItem = $PaymentOrderItems[$OrderItemsVar];\n\t\t\t\t\t\tforeach($CurrentItem as $CurrentItemVar => $CurrentItemVal)\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t$PaymentsNVP .= $CurrentItemVal != '' ? '&L_PAYMENTREQUEST_' . $n . '_' . strtoupper($CurrentItemVar) . $n_item . '=' . urlencode($CurrentItemVal) : '';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$n_item++;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t$n++;\n\t\t}\n\t\t\n\t\t// Billing Agreements\n\t\t$BillingAgreements = isset($DataArray['BillingAgreements']) ? $DataArray['BillingAgreements'] : array();\n\t\t$n = 0;\n\t\tforeach($BillingAgreements as $BillingAgreementVar => $BillingAgreementVal)\n\t\t{\n\t\t\t$CurrentItem = $BillingAgreements[$BillingAgreementVar];\n\t\t\tforeach($CurrentItem as $CurrentItemVar => $CurrentItemVal)\n\t\t\t{\n\t\t\t\t$BillingAgreementsNVP .= $CurrentItemVal != '' ? '&' . strtoupper($CurrentItemVar) . $n . '=' . urlencode($CurrentItemVal) : '';\n\t\t\t}\n\t\t\t$n++;\t\n\t\t}\n\t\t\t\n\t\t// Shipping Options Fields\n\t\t$ShippingOptions = isset($DataArray['ShippingOptions']) ? $DataArray['ShippingOptions'] : array();\n\t\t$n = 0;\n\t\tforeach($ShippingOptions as $ShippingOptionsVar => $ShippingOptionsVal)\n\t\t{\n\t\t\t$CurrentOption = $ShippingOptions[$ShippingOptionsVar];\n\t\t\tforeach($CurrentOption as $CurrentOptionVar => $CurrentOptionVal)\n\t\t\t{\n\t\t\t\t$ShippingOptionsNVP .= $CurrentOptionVal != '' ? '&' . strtoupper($CurrentOptionVar) . $n . '=' . urlencode($CurrentOptionVal) : '';\n\t\t\t}\n\t\t\t$n++;\t\n\t\t}\n\t\t\n\t\t$NVPRequest = $this->NVPCredentials . $SECFieldsNVP . $SurveyChoicesNVP . $ShippingOptionsNVP . $BillingAgreementsNVP . $PaymentsNVP;\n\t\t$NVPResponse = $this->CURLRequest($NVPRequest);\n\t\t$NVPRequestArray = $this->NVPToArray($NVPRequest);\n\t\t$NVPResponseArray = $this->NVPToArray($NVPResponse);\n\t\t\n\t\t$Errors = $this->GetErrors($NVPResponseArray);\n\t\t\n\t\tif(isset($NVPResponseArray['TOKEN']) && $NVPResponseArray['TOKEN'] != '')\n\t\t{\n\t\t\tif($this->Sandbox)\n\t\t\t{\n\t\t\t\t$NVPResponseArray['REDIRECTURLDIGITALGOODS'] = 'https://www.sandbox.paypal.com/incontext?'.$SkipDetailsOption.'&token='.$NVPResponseArray['TOKEN'];\n\t\t\t\t$NVPResponseArray['REDIRECTURL'] = 'https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&' . $SkipDetailsOption . '&token=' . $NVPResponseArray['TOKEN'];\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$NVPResponseArray['REDIRECTURLDIGITALGOODS'] = 'https://www.paypal.com/incontext?'.$SkipDetailsOption.'&token='.$NVPResponseArray['TOKEN'];\n\t\t\t\t$NVPResponseArray['REDIRECTURL'] = 'https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&' . $SkipDetailsOption . '&token=' . $NVPResponseArray['TOKEN'];\n\t\t\t}\n\t\t}\n\t\t\n\t\t$NVPResponseArray['ERRORS'] = $Errors;\n\t\t$NVPResponseArray['REQUESTDATA'] = $NVPRequestArray;\n\t\t$NVPResponseArray['RAWREQUEST'] = $NVPRequest;\n\t\t$NVPResponseArray['RAWRESPONSE'] = $NVPResponse;\n\t\t\t\t\n\t\treturn $NVPResponseArray;\n\t\n\t}", "public function process_checkout()\n {\n }", "function autorizePayment() {\n\t\tself::setState(GopayHelper::AUTHORIZED);\n\t\t\n\t}", "public function checkout(){\n $session = $this->request->session();\n $shop = $session->read('Shop');\n if(!$shop['Order']['total']) {\n return $this->redirect('/');\n }\n // loading model User\n $this->loadModel('User');\n // loading information about logged in user\n $query = $this->User->find('all')\n ->where(['User.idUser = ' => $this->Auth->user('idUser')]);\n $this->set('user',$query);\n $this->set(compact('shop'));\n $order_type = 'Creditcard';\n // saving information in session, what order type is Credit card\n $session->write('Shop.Order.'.'order_type', $order_type);\n }", "public function url()\n {\n return '/checkout/';\n }", "function woocommerce_checkout_payment()\n {\n }", "public function setCheckoutViewPermission($permission);", "public function edit(Checkout $checkout)\n {\n //\n }", "public function edit(Checkout $checkout)\n {\n //\n }", "function set()\n {\n try {\n $this->load->factory('mode/Mode_Factory');\n\n $this->mode->set_mode(Mode_Engine::MODE_STANDALONE);\n redirect('/accounts');\n } catch (Exception $e) {\n $this->page->view_exception($e);\n return;\n }\n }", "function editAddressCheckout(){\n\n\t\t$view = $this->getView('user', 'html');\n\n\t\t$view->setLayout('edit_address');\n\n\t\t$ftask ='savecheckoutuser';\n\t\t$view->assignRef('fTask', $ftask);\n\n\t\t// Display it all\n\t\t$view->display();\n\t}", "public function __construct()\n\t\t{\n\t\t\t// Setup the required variables for the MyVirtualMerchant checkout module\n\t\t\t$this->_languagePrefix = \"MyVirtualMerchant\";\n\t\t\t$this->_id = \"checkout_myvirtualmerchant\";\n\t\t\t$this->_image = \"vm_logo.jpg\";\n\t\t\tparent::__construct();\n\t\t\t$this->_cardsSupported = array ('VISA','AMEX','MC', 'DISCOVER');\n\t\t\t$this->_currenciesSupported = array(\"GBP\",\"EUR\",\"USD\",\"AUD\",\"JPY\",\"CAD\");\n\n\t\t\t$this->requiresSSL = true;\n\t\t\t$this->_liveTransactionURL = 'https://www.myvirtualmerchant.com';\n\t\t\t$this->_testTransactionURL = 'https://www.myvirtualmerchant.com';\n\t\t\t$this->_liveTransactionURI = '/VirtualMerchant/process.do';\n\t\t\t$this->_testTransactionURI = '/VirtualMerchant/process.do';\n\t\t\t$this->_curlSupported = true;\n\t\t\t$this->_fsocksSupported = true;\n\t\t\t$this->cardCodeRequired = true;\n\t\t}", "public function paymentAction() {\n /**\n * if not logged in\n */\n if (! Mage::getSingleton ( 'customer/session' )->isLoggedIn ()) {\n /**\n * Redirect to login page.\n */\n $this->_redirectUrl ( Mage::helper ( 'customer' )->getLoginUrl () );\n }\n /**\n * unset BankCountryCode to session\n */\n if (Mage::getSingleton ( 'customer/session' )->getBankCountryCode ()) {\n Mage::getSingleton ( 'customer/session' )->unsBankCountryCode ();\n }\n /**\n * Unset bank currency code to session.\n */\n if (Mage::getSingleton ( 'customer/session' )->getBankCurrencyCode ()) {\n Mage::getSingleton ( 'customer/session' )->unsBankCurrencyCode ();\n }\n /**\n * Rendering laod and render layout\n */\n $this->loadLayout ();\n $this->_initLayoutMessages ( 'catalog/session' );\n /**\n * if not logged in\n */\n if (! Mage::getSingleton ( 'customer/session' )->isLoggedIn ()) {\n /**\n * Set login redirect url.\n */\n $this->_redirectUrl ( Mage::helper ( 'customer' )->getLoginUrl () );\n } else {\n /**\n * Set page title.\n */\n $this->getLayout ()->getBlock ( 'head' )->setTitle ( $this->__ ( 'Payout Preference' ) );\n }\n $this->renderLayout ();\n }", "public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)\n {\n\n $installer = $setup;\n $installer->startSetup();\n\n $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);\n\n $used_in_forms[] = \"adminhtml_customer\";\n $used_in_forms[] = \"checkout_register\";\n $used_in_forms[] = \"customer_account_create\";\n $used_in_forms[] = \"customer_account_edit\";\n $used_in_forms[] = \"adminhtml_checkout\";\n\n // free_delivery\n $customerSetup->removeAttribute(\\Magento\\Customer\\Model\\Customer::ENTITY, \"free_delivery_kong\");\n $customerSetup->addAttribute(\\Magento\\Customer\\Model\\Customer::ENTITY, \"free_delivery_kong\", array(\n \"type\" => \"varchar\",\n \"backend\" => \"\",\n \"label\" => \"Free Delivery Status: Yes = 1, No = 0\",\n \"input\" => \"text\",\n \"source\" => \"\",\n \"visible\" => true,\n \"required\" => false,\n \"default\" => \"0\",\n \"frontend\" => \"\",\n \"unique\" => false,\n \"note\" => \"\"\n\n ));\n\n $free_delivery = $customerSetup->getEavConfig()->getAttribute(\\Magento\\Customer\\Model\\Customer::ENTITY, 'free_delivery_kong');\n $free_delivery->setData(\"used_in_forms\", $used_in_forms)\n ->setData(\"is_used_for_customer_segment\", true)\n ->setData(\"is_system\", 0)\n ->setData(\"is_user_defined\", 1)\n ->setData(\"is_visible\", 1)\n ->setData(\"sort_order\", 100);\n\n $free_delivery->save();\n\n\n // Website Url\n $customerSetup->removeAttribute(\\Magento\\Customer\\Model\\Customer::ENTITY, \"website_url\");\n $customerSetup->addAttribute(\\Magento\\Customer\\Model\\Customer::ENTITY, \"website_url\", array(\n \"type\" => \"varchar\",\n \"backend\" => \"\",\n \"label\" => \"Website Url\",\n \"input\" => \"text\",\n \"source\" => \"\",\n \"visible\" => true,\n \"required\" => false,\n \"default\" => \"\",\n \"frontend\" => \"\",\n \"unique\" => false,\n \"note\" => \"\"\n\n ));\n\n $website_url = $customerSetup->getEavConfig()->getAttribute(\\Magento\\Customer\\Model\\Customer::ENTITY, 'website_url');\n $website_url->setData(\"used_in_forms\", $used_in_forms)\n ->setData(\"is_used_for_customer_segment\", true)\n ->setData(\"is_system\", 0)\n ->setData(\"is_user_defined\", 1)\n ->setData(\"is_visible\", 1)\n ->setData(\"sort_order\", 110);\n\n $website_url->save();\n\n // Seller Permit\n $customerSetup->removeAttribute(\\Magento\\Customer\\Model\\Customer::ENTITY, \"seller_permit\");\n $customerSetup->addAttribute(\\Magento\\Customer\\Model\\Customer::ENTITY, \"seller_permit\", array(\n \"type\" => \"varchar\",\n \"backend\" => \"\",\n \"label\" => \"Seller Permit\",\n \"input\" => \"text\",\n \"source\" => \"\",\n \"visible\" => true,\n \"required\" => false,\n \"default\" => \"\",\n \"frontend\" => \"\",\n \"unique\" => false,\n \"note\" => \"\"\n\n ));\n\n $seller_permit = $customerSetup->getEavConfig()->getAttribute(\\Magento\\Customer\\Model\\Customer::ENTITY, 'seller_permit');\n $seller_permit->setData(\"used_in_forms\", $used_in_forms)\n ->setData(\"is_used_for_customer_segment\", true)\n ->setData(\"is_system\", 0)\n ->setData(\"is_user_defined\", 1)\n ->setData(\"is_visible\", 1)\n ->setData(\"sort_order\", 120);\n\n $seller_permit->save();\n\n\n // Optional Message\n $customerSetup->removeAttribute(\\Magento\\Customer\\Model\\Customer::ENTITY, \"optional_message\");\n $customerSetup->addAttribute(\\Magento\\Customer\\Model\\Customer::ENTITY, \"optional_message\", array(\n \"type\" => \"varchar\",\n \"backend\" => \"\",\n \"label\" => \"Optional Message\",\n \"input\" => \"text\",\n \"source\" => \"\",\n \"visible\" => true,\n \"required\" => false,\n \"default\" => \"\",\n \"frontend\" => \"\",\n \"unique\" => false,\n \"note\" => \"\"\n\n ));\n\n $optional_message = $customerSetup->getEavConfig()->getAttribute(\\Magento\\Customer\\Model\\Customer::ENTITY, 'optional_message');\n $optional_message->setData(\"used_in_forms\", $used_in_forms)\n ->setData(\"is_used_for_customer_segment\", true)\n ->setData(\"is_system\", 0)\n ->setData(\"is_user_defined\", 1)\n ->setData(\"is_visible\", 1)\n ->setData(\"sort_order\", 120);\n\n $optional_message->save();\n\n $installer->endSetup();\n }", "public function getCheckout() {\n return view('front.checkout');\n }", "public function onStoreCheckout(PageEvent $event)\n\t{\n\t}", "public static function checkout_url() {\n\t\treturn ( self::$_cache['environment'] == 'sandbox' ) ? 'https://www.sandbox.paypal.com/incontext?token=' : 'https://www.paypal.com/incontext?token=';\n\t}", "public function declineAction()\n {\n try {\n $this->_getCheckout()->setQuoteId($this->_getCheckout()->getOPSQuoteId());\n } catch (Exception $e) {\n Mage::logException($e);\n }\n\n $this->getPaymentHelper()->refillCart($this->_getOrder());\n\n $message = Mage::helper('ops')->__(\n 'Your payment information was declined. Please select another payment method.'\n );\n Mage::getSingleton('core/session')->addNotice($message);\n $redirect = 'checkout/onepage';\n $this->redirectOpsRequest($redirect);\n }", "public function checkout_cart_updateItemOptions(Varien_Event_Observer $observer){\r\n\t /*Do nothing if the extension is disabled*/\r\n\t if(!Mage::helper('vendors')->moduleEnabled()) return;\r\n\t \r\n\t \r\n\t\t/*Return if it's not advanced mode*/\r\n\t\tif(Mage::helper('vendors')->getMode() != VES_Vendors_Model_Vendor::MODE_ADVANCED) return;\r\n\t\t\r\n\t\t$vendorQuoteSession = Mage::getSingleton('vendorscheckout/session');\r\n\t\t$checkoutSession \t= Mage::getSingleton('checkout/session');\r\n\t\t$action = $observer->getControllerAction();\r\n\t\t\r\n\t\t\r\n $id = (int) $action->getRequest()->getParam('id');\r\n $params = $action->getRequest()->getParams();\r\n\r\n if (!isset($params['options'])) {\r\n $params['options'] = array();\r\n }\r\n try {\r\n if (isset($params['qty'])) {\r\n $filter = new Zend_Filter_LocalizedToNormalized(\r\n array('locale' => Mage::app()->getLocale()->getLocaleCode())\r\n );\r\n $params['qty'] = $filter->filter($params['qty']);\r\n }\r\n\r\n $quoteItem = null;\r\n \t$vendorQuote = null;\r\n\t\t\tforeach($vendorQuoteSession->getQuotes() as $quote){\r\n\t\t\t\tif(!$quote->getVendorId()) continue;\r\n\t\t\t\t\r\n\t\t\t\t$quoteItem = $quote->getItemById($id);\r\n\t\t\t\t$vendorQuote = $quote;\r\n\t\t\t\tif($quoteItem) break;\r\n\t\t\t}\r\n\t\t\t/*Return if the quote item í not exist on vendor quotes.*/\r\n\t if (!$quoteItem) return;\r\n\t $cart \t= Mage::getModel('vendorscheckout/cart')->setData('quote',$vendorQuote);\r\n $item \t= $cart->updateItem($id, new Varien_Object($params));\r\n if (is_string($item)) {\r\n Mage::throwException($item);\r\n }\r\n if ($item->getHasError()) {\r\n Mage::throwException($item->getMessage());\r\n }\r\n\r\n $related = $action->getRequest()->getParam('related_product');\r\n if (!empty($related)) {\r\n $cart->addProductsByIds(explode(',', $related));\r\n }\r\n\r\n $cart->save();\r\n\r\n\r\n Mage::dispatchEvent('checkout_cart_update_item_complete',\r\n array('item' => $item, 'request' => $action->getRequest(), 'response' => $action->getResponse())\r\n );\r\n if (!$checkoutSession->getNoCartRedirect(true)) {\r\n if (!$cart->getQuote()->getHasError()) {\r\n $message = $action->__('%s was updated in your shopping cart.', Mage::helper('core')->escapeHtml($item->getProduct()->getName()));\r\n $checkoutSession->addSuccess($message);\r\n }\r\n $action->setRedirectWithCookieCheck('checkout/cart');\r\n }\r\n } catch (Mage_Core_Exception $e) {\r\n if ($checkoutSession->getUseNotice(true)) {\r\n $checkoutSession->addNotice($e->getMessage());\r\n } else {\r\n $messages = array_unique(explode(\"\\n\", $e->getMessage()));\r\n foreach ($messages as $message) {\r\n $checkoutSession->addError($message);\r\n }\r\n }\r\n\r\n $url = $checkoutSession->getRedirectUrl(true);\r\n if ($url) {\r\n $action->getResponse()->setRedirect($url);\r\n } else {\r\n $action->getResponse()->setRedirect(Mage::helper('checkout/cart')->getCartUrl());\r\n }\r\n } catch (Exception $e) {\r\n $checkoutSession->addException($e, $action->__('Cannot update the item.'));\r\n Mage::logException($e);\r\n $action->setRedirectWithCookieCheck('checkout/cart');\r\n }\r\n $action->setRedirectWithCookieCheck('checkout/cart');\r\n \r\n $action->setFlag('', Mage_Core_Controller_Varien_Action::FLAG_NO_DISPATCH,true);\r\n\t}", "public function install() {\n $this->load->model('payment/iyzico_checkout_form');\n $this->model_payment_iyzico_checkout_form->install();\n }", "function init_gateway_class()\n\t{\n\n\n\t\tclass WC_Gateway_VTCPay extends WC_Payment_Gateway\n\t\t{\n\t\t\tvar $notify_url;\n\n\t\t\t/**\n\t\t\t * Constructor for the gateway.\n\t\t\t *\n\t\t\t * @access public\n\t\t\t * @return \\WC_Gateway_VTCPay\n\t\t\t */\n\t\t\tpublic function __construct()\n\t\t\t{\n\t\t\t\tglobal $woocommerce;\n\n\t\t\t\t$this->id = 'vtcpay';\n\t\t\t\t$this->has_fields = false;\n\t\t\t\t$this->method_title = __('VTCPAY', 'woocommerce');\n\t\t\t\t$this->liveurl = 'https://vtcpay.vn/bank-gateway/checkout.html';\n\t\t\t\t$this->testurl = 'http://alpha1.vtcpay.vn/portalgateway/checkout.html';\n\n\t\t\t\t//load the setting\n\t\t\t\t$this->init_form_fields();\n\t\t\t\t$this->init_settings();\n\n\t\t\t\t//Define user set variables\n\t\t\t\t$this->title = $this->get_option('title');\n\t\t\t\t$this->description = $this->get_option('description');\n\t\t\t\t$this->receiver_acc = $this->get_option('receiver_acc');\n\t\t\t\t$this->merchant_id = $this->get_option('merchant_id');\n\t\t\t\t$this->secure_pass = $this->get_option('secure_pass');\n\t\t\t\t$this->testmode = $this->get_option('testmode');\n\t\t\t\t$this->Curency_id=$this->get_option('Curency_id');\n\t\t\t\t$this->language=$this->get_option('language');\n\t\t\n\t\t\n\t\t\t\t$this->form_submission_method = false;\n\n\t\t\t\t//Action\n\t\t\t\tadd_action('valid-vtcpay-standard-ipn-request', array($this, 'successful_request'));\n\t\t\t\tadd_action('woocommerce_receipt_vtcpay', array($this, 'receipt_page'));\n\t\t\t\tadd_action('woocommerce_update_options_payment_gateways_' . $this->id, array($this, 'process_admin_options'));\n\t\t\t\tadd_action('woocommerce_api_wc_gateway_vtcpay', array($this, 'callback'));\n\t\t\t\tif (!$this->is_valid_for_use()) $this->enabled = false;\n\t\t\t\t\n\n\t\t\t}\n\n\n\t\t\tfunction is_valid_for_use()\n\t\t\t{\n\t\t\t\tif (!in_array(get_woocommerce_currency(), apply_filters('woocommerce_vtcpay_supported_currencies', array('VND', 'VNĐ', 'USD'))))\n\t\t\t\t\treturn false;\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tpublic function admin_options()\n\t\t\t{\n\t\t\t\t?>\n\t\t\t\t<h3><?php _e('Thanh toán VTCPay', 'woocommerce'); ?></h3>\n\t\t\t\t<strong><?php _e('VTCPay giá trị thanh toán đích thực.', 'woocommerce'); ?></strong>\n\t\t\t\t<?php if ($this->is_valid_for_use()) : ?>\n\n\t\t\t\t<table class=\"form-table\">\n\t\t\t\t\t<?php\n\t\t\t\t\t// Generate the HTML For the settings form.\n\t\t\t\t\t$this->generate_settings_html();\n\t\t\t\t\t?>\n\t\t\t\t</table><!--/.form-table-->\n\n\t\t\t<?php else : ?>\n\t\t\t\t<div class=\"inline error\"><p>\n\t\t\t\t\t\t<strong><?php _e('Gateway Disabled', 'woocommerce'); ?></strong>: <?php _e('Phương thức thanh toán vtcpay không hỗ trợ loại tiền tệ trên gian hàng của bạn.', 'woocommerce'); ?>\n\t\t\t\t\t</p></div>\n\t\t\t<?php\n\t\t\tendif;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Initialise Gateway Settings Form Fields\n\t\t\t *\n\t\t\t * @access public\n\t\t\t * @return void\n\t\t\t */\n\t\t\tfunction init_form_fields()\n\t\t\t{\n\n\t\t\t\t$this->form_fields = array(\n\t\t\t\t\t'enabled' => array(\n\t\t\t\t\t\t'title' => __('Sử dụng phương thức', 'woocommerce'),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'label' => __('Đồng ý', 'woocommerce'),\n\t\t\t\t\t\t'default' => 'yes'\n\t\t\t\t\t),\n\t\t\t\t\t'title' => array(\n\t\t\t\t\t\t'title' => __('Tiêu đề', 'woocommerce'),\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'description' => __('Tiêu đề của phương thức thanh toán bạn muốn hiển thị cho người dùng.', 'woocommerce'),\n\t\t\t\t\t\t'default' => __('VTCPay', 'woocommerce'),\n\t\t\t\t\t\t'desc_tip' => true,\n\t\t\t\t\t),\n\t\t\t\t\t'description' => array(\n\t\t\t\t\t\t'title' => __('Mô tả phương thức thanh toán', 'woocommerce'),\n\t\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t\t'description' => __('Mô tả của phương thức thanh toán bạn muốn hiển thị cho người dùng.', 'woocommerce'),\n\t\t\t\t\t\t'default' => __('Thanh toán với VTCPay. Đảm bảo an toàn tuyệt đối cho mọi giao dịch', 'woocommerce')\n\t\t\t\t\t),\n\t\t\t\t\t'language' => array(\n\t\t\t\t\t\t'title' => __('Ngôn ngữ (language) vi or en', 'woocommerce'),\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'description' => 'Ngôn ngữ (language)',\n\t\t\t\t\t\t'default' => 'vi',\n\t\t\t\t\t\t'desc_tip' => true,\n\t\t\t\t\t),\n\t\t\t\t\t'account_config' => array(\n\t\t\t\t\t\t'title' => __('Cấu hình tài khoản', 'woocommerce'),\n\t\t\t\t\t\t'type' => 'title',\n\t\t\t\t\t\t'description' => '',\n\t\t\t\t\t),\n\t\t\t\t\t'receiver_acc' => array(\n\t\t\t\t\t\t'title' => __('Số điện thoại đăng kí với VTC', 'woocommerce'),\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'description' => __('Số điện thoại đăng kí với VTC', 'woocommerce'),\n\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t'desc_tip' => true,\n\t\t\t\t\t\t\n\t\t\t\t\t),\n\t\t\t\t\t'merchant_id' => array(\n\t\t\t\t\t\t'title' => __('website id', 'woocommerce'),\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'description' => __('“Mã website” được VTCPay cấp khi bạn đăng ký tích hợp website.', 'woocommerce'),\n\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t'desc_tip' => true,\n\t\t\t\t\t\t\n\t\t\t\t\t),\n\t\t\t\t\t'secure_pass' => array(\n\t\t\t\t\t\t'title' => __('Mã bảo mật', 'woocommerce'),\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'description' => __('Mã bảo mật khi bạn đăng ký tích hợp website.', 'woocommerce'),\n\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t'desc_tip' => true,\n\t\t\t\t\t\t\n\t\t\t\t\t),\n\t\t\t\t\t'testmode' => array(\n\t\t\t\t\t\t'title' => __('Testmode', 'woocommerce'),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'label' => __('Sử dụng VTCPay kiểm thử', 'woocommerce'),\n\t\t\t\t\t\t'default' => 'yes',\n\t\t\t\t\t\t'description' => 'VTCPay kiểm thử được sử đụng kiểm tra phương thức thanh toán.',\n\t\t\t\t\t),\n\t\t\t\t);\n\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Process the payment and return the result\n\t\t\t *\n\t\t\t * @access public\n\t\t\t * @param int $order_id\n\t\t\t * @return array\n\t\t\t */\n\t\t\tfunction process_payment($order_id)\n\t\t\t{\n\t\t\t\t$order = new WC_Order($order_id);\n\t\t\t\tif (!$this->form_submission_method) {\n\t\t\t\t\t$vtcpay_args = $this->get_vtcpay_args($order);\n\t\t\t\t\tif ($this->testmode == 'yes'):\n\t\t\t\t\t\t$vtcpay_server = $this->testurl; else :\n\t\t\t\t\t\t$vtcpay_server = $this->liveurl;\n\t\t\t\t\tendif;\n\t\t\t\t\t$vtcpay_url = $this->createRequestUrl($vtcpay_args, $vtcpay_server);\n\t\t\t\t\treturn array(\n\t\t\t\t\t\t'result' => 'success',\n\t\t\t\t\t\t'redirect' => $vtcpay_url\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\treturn array(\n\t\t\t\t\t\t'result' => 'success',\n\t\t\t\t\t\t'redirect' => add_query_arg('order', $order->id, add_query_arg('key', $order->order_key, get_permalink(woocommerce_get_page_id('pay'))))\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\tfunction get_vtcpay_args($order)\n\t\t\t{\n\t\t\t\tglobal $woocommerce;\n\t\t\t\t$order_id = $order->id;\n\t\t\t\t$vtcpay_args = array(\n\t\t\t\t\t'website_id' => strval($this->merchant_id),\n\t\t\t\t\t'reference_number' => strval($order_id),\n\t\t\t\t\t'receiver_account' => strval($this->receiver_acc),\n\t\t\t\t\t'url_return' => strtolower(get_bloginfo('wpurl') . \"/?wc-api=WC_Gateway_VTCPay\"),\n\t\t\t\t\t'bill_to_phone' => strval($order->billing_phone),\n\t\t\t\t\t'payment_type' => '',\n\t\t\t\t\t'language' => strval($this->language),\n\t\t\t\t);\n\n\t\t\t\t$vtcpay_args['amount'] = $order->order_total;\n\t\t\t\tif(get_woocommerce_currency()==='VND'||get_woocommerce_currency()==='VNĐ')\n\t\t\t\t{\n\t\t\t\t\t$vtcpay_args['currency'] = 'VND';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$vtcpay_args['currency'] = 'USD';\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t\treturn $vtcpay_args;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Điều hướng tác vụ xử lý cập nhật đơn hàng sau thanh toán hoặc nhận BPN từ VTCPay\n\t\t\t */\n\t\t\tfunction callback()\n\t\t\t{\n\t\t\t\t$url=get_bloginfo('wpurl');\n\t\t\t\tif (isset($_GET['status']) && !empty($_GET['status'])) {\n\t\t\t\t\t\n\t\t\t\t$amount = @$_GET['amount'];\n\t\t\t\t$message = @$_GET['message'];\n\t\t\t\t$payment_type = @$_GET['payment_type'];\n\t\t\t\t$order_code = @$_GET['reference_number'];\n\t\t\t\t$status = @$_GET['status'];\n\t\t\t\t$trans_ref_no = @$_GET['trans_ref_no'];\n\t\t\t\t$website_id = @$_GET['website_id'];\n\t\t\t\t$sign = @$_GET['signature'];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$data=@$_POST['data'];\n\t\t\t\t\t$str_id = explode(\"|\", $data);\n\t\t\t\t\t$amount = $str_id[0];\n\t\t\t\t\t$message = $str_id[1];\n\t\t\t\t\t$payment_type = $str_id[2];\n\t\t\t\t\t$order_code = $str_id[3];\n\t\t\t\t\t$status = $str_id[4];\n\t\t\t\t\t$trans_ref_no = $str_id[5];\n\t\t\t\t\t$website_id = $str_id[6];\n\t\t\t\t\t$sign = @$_POST['signature'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$order = new WC_Order($order_code);\n\t\t\t\t$check = $this->verifyPaymentUrlLive($amount,$message,$payment_type,$order_code,$status,$trans_ref_no,$website_id,$sign);\n\t\tif($check=='false')\n\t\t{\n\t\t$comment_status = 'Thực hiện thanh toán không thành công với đơn hàng'.$order_code.'Sai chữ kí' ;\n\t\t\t\t\t$comment_status=$comment_status.'<br/><a href = \"'.$url.'\">Quay lại</a>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($status==1)\n\t\t\t\t{\n\t\t\t\t\t $comment_status = ' Thực hiện thanh toán thành công với đơn hàng ' . $order_code . '. Giao dịch hoàn thành.';\n\t\t\t\t\t \n\t\t\t\t\t $order->add_order_note(__($comment_status, 'woocommerce'));\n\t\t\t\t\t $order->payment_complete();\n\t\t\t\t\t $comment_status=$comment_status.'<br/><a href = \"'.$url.'\">Quay lại</a>';\n\t\t\t\t\t $order_status = 'complete';\n\t\t\t\t}\n\t\t\t\telse if ($status==7)\n\t\t\t\t{\n\t\t\t\t $comment_status = ' Thực hiện thanh toán thành công với đơn hàng ' . $order_code;\n\t\t\t\t $order->update_status('on-hold', sprintf(__('Payment pending: %s', 'woocommerce'), $comment_status));\n\t\t\t\t $order_status = 'pending';\n\t\t\t\t $comment_status=$comment_status.'<br/><a href = \"'.$url.'\">Quay lại</a>';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$comment_status = 'Thực hiện thanh toán không thành công với đơn hàng'.$order_code ;\n\t\t\t\t\t$comment_status=$comment_status.'<br/><a href = \"'.$url.'\">Quay lại</a>';\n\t\t\t\t}\n}\n\t\t\t\t\n\t\t\t\t\techo $comment_status;\n\t\t\t\t\texit();\n\t\t\t}\n\t\t\t\n\t\t\tfunction verifyPaymentUrlLive($amount,$message,$payment_type,$order_code,$status,$trans_ref_no,$website_id,$sign)\n\t\t\t{\n\t\t\t\t\n\t\t\t\t// My plaintext\n\t\t\t\t$secret_key = $this->secure_pass;\n\t\t\t\t$plaintext = $amount.\"|\".$message.\"|\".$payment_type.\"|\".$order_code.\"|\".$status.\"|\".$trans_ref_no.\"|\".$website_id .\"|\". $secret_key;\n\t\t\t\t//print $plaintext;\n\t\t\t\t// Mã hóa sign\n\t\t\t\t$verify_secure_code = '';\n\t\t\t\t$verify_secure_code = strtoupper(hash('sha256', $plaintext));;\n\t\t\t\t// Xác thực chữ ký của ch? web v?i ch? ký tr? v? t? VTC Pay\n\t\t\t\tif ($verify_secure_code === $sign) \t\treturn strval($status);\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tprivate function createRequestUrl($data, $vtcpay_server)\n\t\t\t{\n\t\t\t\t$params = $data;\n\t\t\t\t$security=$this->secure_pass;\n\t\t\t\t//$plaintext = $params['website_id'] . \"-\" . $params['payment_method'] . \"-\" . $params['order_code'] . \"-\" . $params['amount'] . \"-\" . $params['receiver_acc'] . \"-\" . \"-\".$security.\"-\".$params['urlreturn'];\n\t\t\t\t\n\t\t\t\t$plaintext =$params['amount'].\"|\".$params['bill_to_phone'].\"|\".$params['currency'].\"|\".$params['language'].\"|\".$params['payment_type'].\"|\". $params['receiver_account'].\"|\".$params['reference_number'].\"|\".$params['url_return'].\"|\".$params['website_id'].\"|\".$security;\n\t\t\t\t\n\t\t\t\t//echo $plaintext;\n\t\t\t\t\n\t\t\t\t$params['signature']=strtoupper(hash('sha256', $plaintext));\n\t\t\t\t\n\t\t\t\t$params['url_return']=urlencode($params['url_return']);\n\t\t\t\t\n\t\t\t\t$redirect_url = $vtcpay_server;\n\t\t\t\tif (strpos($redirect_url, '?') === false) {\n\t\t\t\t\t$redirect_url .= '?';\n\t\t\t\t} else if (substr($redirect_url, strlen($redirect_url) - 1, 1) != '?' && strpos($redirect_url, '&') === false) {\n\t\t\t\t\t$redirect_url .= '&';\n\t\t\t\t}\n\n\t\t\t\t// Tạo đoạn url chứa tham số\n\t\t\t\t$url_params = '';\n\t\t\t\tforeach ($params as $key => $value) {\n\t\t\t\t\tif ($url_params == '')\n\t\t\t\t\t\t$url_params .= $key . '=' . ($value);\n\t\t\t\t\telse\n\t\t\t\t\t\t$url_params .= '&' . $key . '=' . ($value);\n\t\t\t\t}\n\t\t\t\treturn $redirect_url . $url_params;\n\t\t\t\t//return $plaintext;\n\t\t\t}\n\n\t\t}\n\n\t\tclass WC_VTCPay extends WC_Gateway_VTCPay\n\t\t{\n\t\t\tpublic function __construct()\n\t\t\t{\n\t\t\t\t_deprecated_function('WC_VTCPay', '1.4', 'WC_Gateway_VTCPay');\n\t\t\t\tparent::__construct();\n\t\t\t}\n\t\t}\n\n\t\t//Defining class gateway\n\t\tfunction add_gateway_class( $methods ) {\n\t\t\t$methods[] = 'WC_Gateway_VTCPay';\n\t\t\treturn $methods;\n\t\t}\n\n\t\tadd_filter( 'woocommerce_payment_gateways', 'add_gateway_class' );\n\t}", "protected function _construct() {\n $this->_checkoutSession = Mage::getSingleton('checkout/session');\n $this->_planetPayOptions = Mage::getStoreConfig('payment/planet_pay');\n $this->_planetTestMode = $this->_planetPayOptions['test_mode'];\n\n $autoloader = new Planet_Pay_Model_Autoloader();\n $autoloader->init();\n\n $this->planet = new \\PlanetLib\\Planet();\n if ($this->_planetTestMode) {\n $this->planet->setUrl($this->_planetPayOptions['payment_request_url_test']);\n } else {\n $this->planet->setUrl($this->_planetPayOptions['payment_request_url_live']);\n }\n\n $onePage = Mage::getSingleton('checkout/type_onepage');\n $this->paymentMethod = $onePage->getCheckout()->getPlanetPaymentMethod();\n }", "public function sales_order_invoice_pay($observer) {\n $invoice = $observer->getEvent()->getInvoice();\n\n if ($order = $invoice->getOrder()) {\n try {\n Mage::helper('mytunes/download')->activateDownloadsforOrder($order);\n } catch(Exception $e) {\n Mage::logException($e);\n }\n }\n return $this;\n }" ]
[ "0.56353706", "0.5550309", "0.54990697", "0.54852116", "0.54444563", "0.54285634", "0.540707", "0.5376346", "0.5317107", "0.53072274", "0.5300959", "0.5286888", "0.5272276", "0.5207836", "0.5203443", "0.51994735", "0.5171761", "0.5170597", "0.5157373", "0.51244116", "0.5104932", "0.5100891", "0.5092381", "0.50671846", "0.5056975", "0.5049764", "0.5043674", "0.504327", "0.5026139", "0.50235516", "0.50200605", "0.50133467", "0.4980563", "0.49721405", "0.4944377", "0.49442944", "0.49387574", "0.4921995", "0.49172324", "0.49140504", "0.4911596", "0.4910931", "0.49106407", "0.49091452", "0.49030092", "0.4887915", "0.4887305", "0.4881761", "0.4866998", "0.48596543", "0.48560727", "0.48556313", "0.4855369", "0.48473242", "0.48330578", "0.48330578", "0.48330578", "0.48270637", "0.4824713", "0.4823527", "0.48228425", "0.48221427", "0.48160255", "0.48082307", "0.48027498", "0.48008797", "0.47937644", "0.47877225", "0.47848275", "0.47837222", "0.47832564", "0.47762546", "0.4775942", "0.4772447", "0.4759986", "0.47518033", "0.4749825", "0.47486466", "0.47468704", "0.4745519", "0.47384158", "0.47328565", "0.47311553", "0.47248146", "0.47222355", "0.47222355", "0.47211105", "0.4720453", "0.47116253", "0.47049314", "0.4697605", "0.46966934", "0.46799585", "0.46772197", "0.4667059", "0.46652603", "0.46551895", "0.46417126", "0.46396023", "0.46372238" ]
0.7604964
0
Adds Easy EU Value Added Taxes Template Path to iThemes Exchange Template paths
Добавляет шаблон Easy EU Value Added Taxes в пути шаблонов iThemes Exchange
function it_exchange_easy_eu_value_added_taxes_addon_template_path( $possible_template_paths, $template_names ) { $possible_template_paths[] = dirname( __FILE__ ) . '/templates/'; return $possible_template_paths; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_template_path( $template_path ){\n return BLOCK_LAB_ADDON_PLUGIN_PATH;\n }", "function it_exchange_easy_eu_value_added_taxes_addon_taxes_register_templates( $template_paths, $template_names ) {\n\t// Bail if not looking for one of our templates\n\t$add_path = false;\n\t$templates = array(\n\t\t'content-cart/elements/easy-eu-value-added-taxes.php',\n\t\t'content-checkout/elements/easy-eu-value-added-taxes.php',\n\t\t'content-confirmation/elements/easy-eu-value-added-taxes.php',\n\t\t'content-confirmation/elements/easy-eu-value-added-taxes-vat-summary.php',\n\t\t'super-widget-checkout/loops/easy-eu-value-added-taxes.php',\n\t);\n\tforeach( $templates as $template ) {\n\t\tif ( in_array( $template, (array) $template_names ) )\n\t\t\t$add_path = true;\n\t}\n\tif ( ! $add_path )\n\t\treturn $template_paths;\n\n\t$template_paths[] = dirname( __FILE__ ) . '/templates';\n\treturn $template_paths;\n}", "function setTemplatePath($value);", "function it_exchange_addon_variants_register_templates( $template_paths, $template_names ) { \n\t// Bail if not looking for one of our templates\n\t$add_path = false;\n\t$templates = array(\n\t\t'content-product/elements/exchange-variants.php',\n\t\t'content-product/elements/select-variant.php',\n\t\t'content-product/elements/radio-variant.php',\n\t\t'content-product/elements/image-variant.php',\n\t\t'content-product/elements/color-variant.php',\n\t); \n\tforeach( $templates as $template ) { \n\t\tif ( in_array( $template, (array) $template_names ) ) \n\t\t\t$add_path = true;\n\t} \n\tif ( ! $add_path )\n\t\treturn $template_paths;\n\n\t$template_paths[] = dirname( __FILE__ ) . '/templates';\n\treturn $template_paths;\n}", "public function onTwigTemplatePaths()\n {\n \n $user_path = $this->grav['locator']->findResource('user://');\n $templates_dir = '/data/templates';\n $templates_path = $user_path . $templates_dir;\n\n // If the location for custom templates does not exist create it\n if (!file_exists($templates_path)) {\n mkdir($templates_path, 0775, true);\n }\n\n // Get the priority\n $priority = $this->config->get('plugins.custom-templates.priority', 100);\n\n // Add local templates folder to the Twig templates search path\n if (!is_numeric($priority) && strtolower($priority) == 'top') {\n array_unshift($this->grav['twig']->twig_paths, $templates_path);\n }\n else {\n $this->grav['twig']->twig_paths[] = $templates_path;\n }\n\n }", "function addTemplatePath($path)\n\t{\n\t\t$this->_addPath('template', $path);\n\t}", "function pmprore_add_to_templates($templates) {\r\n\r\n $re_emails = apply_filters('pmpro_upcoming_recurring_payment_reminder', array(\r\n 7 => 'membership_recurring'\r\n ));\r\n\r\n $site = get_option('blogname');\r\n\r\n foreach( $re_emails as $days => $templ ) {\r\n\r\n $templates[\"{$templ}\"] = array(\r\n 'subject' => __(\"Happening soon: The recurring payment for your membership at {$site}\", \"pmprore\"),\r\n 'description' => __(\"Membership level recurring payment message for {$site}\", \"pmprore\"),\r\n 'body' => file_get_contents( plugin_dir_path(__FILE__) . \"emails/{$templ}.html\" ),\r\n );\r\n }\r\n\r\n return $templates;\r\n}", "function it_exchange_easy_eu_value_added_taxes_addon_vat_number_manager_backbone_template() {\n\t$tax_session = it_exchange_get_session_data( 'addon_easy_eu_value_added_taxes' );\n\t?>\n\t<div id=\"it-exchange-easy-eu-value-added-taxes-vat-manager-wrapper\" class=\"it-exchange-hidden\"></div>\n\t<script type=\"text/template\" id=\"tmpl-it-exchange-easy-eu-value-added-taxes-vat-manager-container\">\n\t\t<span class=\"it-exchange-euvat-close-vat-manager\"><a href=\"\">&times;</a></span>\n\t\t<div id=\"it-exchange-easy-eu-value-added-taxes-vat-manager\">\n\t\t\t<div id=\"it-exchange-easy-eu-value-added-taxes-vat-manager-title-area\">\n\t\t\t\t<h3 class=\"it-exchange-euvat-tax-emeption-title\">\n\t\t\t\t\t<?php _e( 'VAT Manager', 'LION' ); ?>\n\t\t\t\t</h3>\n\t\t\t</div>\n\n\t\t\t<div id=\"it-exchange-easy-eu-value-added-taxes-vat-manager-content-area\">\n\t\t\t\t<div id=\"it-exchange-easy-eu-value-added-taxes-vat-manager-error-area\"></div>\n\t\t\t\t<form id=\"it-exchange-add-on-easy-eu-value-added-taxes-add-edit-vat\" name=\"it-exchange-add-on-easy-eu-value-added-taxes-add-edit-vat\" action=\"POST\">\n\t\t\t\t<?php\n\t\t\t\tif ( !empty( $tax_session['vat_country'] ) ) {\n\t\t\t\t\t$vat_country = $tax_session['vat_country'];\n\t\t\t\t} else {\n\t\t\t\t\t$vat_country = '';\n\t\t\t\t}\n\n\t\t\t\tif ( !empty( $tax_session['vat_number'] ) ) {\n\t\t\t\t\t$vat_number = $tax_session['vat_number'];\n\t\t\t\t} else {\n\t\t\t\t\t$vat_number = '';\n\t\t\t\t}\n\n\t\t\t\t$output = '<select id=\"it-exchange-euvat-eu-vat-country\" name=\"eu-vat-country\">';\n\t\t\t\t$memberstates = it_exchange_get_data_set( 'eu-member-states' );\n\t\t\t\tforeach( $memberstates as $abbr => $name ) {\n\t\t\t\t\t$output .= '<option value=\"' . $abbr . '\" ' . selected( $abbr, $vat_country, false ) . '>' . $name . '</option>';\n\t\t\t\t}\n\t\t\t\t$output .= '</select><br />';\n\n\t\t\t\t$output .= '<input type=\"text\" id=\"it-exchange-euvat-eu-vat-number\" name=\"eu-vat-number\" value=\"' . $vat_number . '\" />';\n\n\t\t\t\techo $output;\n\t\t\t\t?>\n\n\t\t\t\t<div class=\"field it-exchange-add-vat-submit\">\n\t\t\t\t\t<input type=\"submit\" value=\"<?php _e( 'Verify and Save VAT Number', 'LION' ); ?>\" class=\"button button-large it-exchange-euvat-save-vat-button\" id=\"save\" name=\"save\">\n\t\t\t\t\t<input type=\"submit\" value=\"Cancel\" class=\"button button-large it-exchange-euvat-cancel-vat-button\" id=\"cancel\" name=\"cancel\">\n\t\t\t\t\t<input type=\"submit\" value=\"Remove\" class=\"button button-large it-exchange-euvat-remove-vat-button\" id=\"remove\" name=\"remove\">\n\t\t\t\t\t<?php wp_nonce_field( 'it-exchange-easy-eu-value-added-taxes-add-edit-vat-number', 'it-exchange-easy-eu-value-added-taxes-add-edit-vat-number-nonce' ); ?>\n\t\t\t\t</div>\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t</div>\n\t</script>\n\t<?php\n}", "function custom_field_file_path( $paths ){\r\n $paths[] = plugin_dir_path(__FILE__) . '/includes/Templates/';\r\n return $paths;\r\n }", "public function onTwigAdminTemplatePaths()\n {\n $this->grav['twig']->twig_paths[] = __DIR__ . '/admin/templates';\n }", "public function onTwigTemplatePaths() {\n $this->grav['twig']->twig_paths[] = __DIR__ . '/templates';\n }", "protected function setTemplatePaths()\n {\n if (!isset($this->paths['templateBaseDir'])) {\n $templateSet = (string) $this->localCXML->templateSet;\n\n if(mb_strpos($templateSet, '<?') !== true) {\n $templateSet = trim($this->page->capture($templateSet));\n }\n\n //Set the base template dir\n if (defined('CONDOR_LOCAL_TEMPLATES_DIR') && is_dir(CONDOR_LOCAL_TEMPLATES_DIR . $templateSet)) {\n $this->paths['templateBaseDir'] = CONDOR_LOCAL_TEMPLATES_DIR . $templateSet . '/';\n $this->paths['templateBaseHREF'] = CONDOR_LOCAL_TEMPLATES_HREF . $templateSet;\n } elseif (is_dir(CONDOR_TEMPLATES_DIR . $templateSet)) {\n $this->paths['templateBaseDir'] = CONDOR_TEMPLATES_DIR . $templateSet . '/';\n $this->paths['templateBaseHREF'] = CONDOR_TEMPLATES_HREF . $templateSet;\n } else {\n trigger_error('Template Set not found. Template Set:' . $templateSet, E_USER_ERROR);\n }\n }\n\n $this->page->templateBaseDir = $this->paths['templateBaseDir'];\n define('TEMPLATE_BASE_DIR', $this->paths['templateBaseDir']); //For symmetry with SITE_BASE_DIR, intended for use inside cxml and module config\n\n $this->page->setVar('templateBaseHREF', $this->paths['templateBaseHREF']);\n $this->page->setVar('templateBaseHREFNoEdge', $this->paths['templateBaseHREF']);\n\n if ($this->useEdgecast == true) {\n $this->page->setVar('templateBaseHREF', $this->toEdgecastHREF($this->paths['templateBaseHREF']));\n }\n\n //Set up the admin templates directory\n $this->paths['adminTemplateBaseDir'] = CONDOR_TEMPLATES_DIR . (string) $this->localCXML->adminTemplateSet . '/';\n $this->paths['adminTemplateBaseHREF'] = CONDOR_TEMPLATES_HREF . (string) $this->localCXML->adminTemplateSet ;\n\n $this->page->adminTemplateBaseDir = $this->paths['adminTemplateBaseDir'];\n $this->page->setVar('adminTemplateBaseHREF', $this->paths['adminTemplateBaseHREF'] );\n }", "function defaultTemplate() {\n\t\t$l = $this->api->locate('addons',__NAMESPACE__,'location');\n\t\t$addon_location = $this->api->locate('addons',__NAMESPACE__);\n\t\t$this->api->pathfinder->addLocation($addon_location,array(\n\t\t\t'js'=>'templates/js',\n\t\t\t'css'=>'templates/css',\n 'template'=>'templates',\n\t\t))->setParent($l);\n\n return parent::defaultTemplate();\n }", "public function onTwigTemplatePaths()\n {\n $this->grav['twig']->twig_paths[] = __DIR__ . '/templates';\n }", "public function onTwigTemplatePaths()\n {\n $this->grav['twig']->twig_paths[] = __DIR__ . '/templates';\n }", "public function onTwigTemplatePaths()\n {\n $this->grav['twig']->twig_paths[] = __DIR__ . '/templates';\n }", "public function onTwigTemplatePaths()\n {\n $this->grav['twig']->twig_paths[] = __DIR__ . '/templates';\n }", "public function onTwigTemplatePaths()\n {\n $this->grav['twig']->twig_paths[] = __DIR__ . '/templates';\n }", "public function onTwigTemplatePaths()\n {\n $this->grav['twig']->twig_paths[] = __DIR__ . '/templates';\n }", "public function onTwigTemplatePaths()\n {\n $this->grav['twig']->twig_paths[] = __DIR__ . '/templates';\n }", "public function onTwigTemplatePaths()\n {\n $this->grav['twig']->twig_paths[] = __DIR__ . '/templates';\n }", "public function onTwigTemplatePaths()\n {\n $this->grav['twig']->twig_paths[] = __DIR__ . '/templates';\n }", "public function onTwigTemplatePaths()\n {\n $this->grav['twig']->twig_paths[] = __DIR__ . '/templates';\n }", "public function onTwigTemplatePaths()\n {\n $twig = $this->grav['twig'];\n $twig->twig_paths[] = __DIR__ . '/templates';\n }", "public function onTwigTemplatePaths()\n {\n $twig = $this->grav['twig'];\n $twig->twig_paths[] = __DIR__ . '/templates';\n }", "private function setTemplateFolderPath(){\n $this->TemplateFolderPath = dirname(__DIR__) . DIRECTORY_SEPARATOR . \"frontend\" . DIRECTORY_SEPARATOR . \"templates\" . DIRECTORY_SEPARATOR;\n }", "function micro_add_template_path( string $path )\n{\n global $app;\n return $app->addTemplatePath( $path );\n}", "public function onTwigTemplatePaths()\n {\n $this->grav['twig']->twig_paths[] = __DIR__.'/templates';\n }", "public function template_path() {\n return apply_filters( 'store_api_template_path', 'store-api/' );\n }", "abstract public function getTemplatePath();", "public function template_path(){\n\t\treturn apply_filters( 'wcic_template_path', '/' );\n\t}", "function addTemplate()\n\t{\t\t\n\t\t$this->m_bkTemplate->bk_addTemplate();\n\t}", "function getTemplatePath();", "function custom_templates( $templates ) {\n $templates[] = array (\n 'id' => 'custom',\n 'name' => 'Custom Locations Template',\n 'path' => get_stylesheet_directory() . '/' . 'wpsl-templates/custom.php',\n );\n\n return $templates;\n}", "function simple_newsletter_theme($existing, $type, $theme, $path) {\n $path = drupal_get_path('module', 'simple_newsletter') . '/templates/';\n return array(\n 'simple_newsletter_header' => array(\n 'variables' => array(\n 'nl_node' => NULL,\n 'utm_header_image' => NULL,\n ),\n 'path' => $path,\n 'template' => 'simple_newsletter_header',\n ),\n 'simple_newsletter_footer' => array(\n 'path' => $path,\n 'template' => 'simple_newsletter_footer',\n ),\n 'simple_newsletter_daily_a' => array(\n 'variables' => array(\n 'node' => NULL,\n ),\n 'path' => $path,\n 'template' => 'simple_newsletter_daily_a',\n ),\n 'simple_newsletter_daily_card_a' => array(\n 'variables' => array(\n 'nl_node' => NULL,\n 'node' => NULL,\n 'index' => -1,\n ),\n 'path' => $path,\n 'template' => 'simple_newsletter_daily_card_a',\n ),\n 'simple_newsletter_daily_ymal_a' => array(\n 'variables' => array(\n 'nl_node' => NULL,\n 'node' => NULL,\n 'index' => -1,\n ),\n 'path' => $path,\n 'template' => 'simple_newsletter_daily_ymal_a',\n ),\n 'simple_newsletter_daily_b' => array(\n 'variables' => array(\n 'node' => NULL,\n ),\n 'path' => $path,\n 'template' => 'simple_newsletter_daily_b',\n ),\n 'simple_newsletter_daily_card_b' => array(\n 'variables' => array(\n 'nl_node' => NULL,\n 'node' => NULL,\n 'index' => -1,\n ),\n 'path' => $path,\n 'template' => 'simple_newsletter_daily_card_b',\n ),\n 'simple_newsletter_daily_plain_text' => array(\n 'variables' => array(\n 'node' => NULL,\n ),\n 'path' => $path,\n 'template' => 'simple_newsletter_daily_plain_text',\n ),\n 'simple_newsletter_dedicated' => array(\n 'variables' => array(\n 'nl_node' => NULL,\n 'node' => NULL,\n 'index' => -1,\n ),\n 'path' => $path,\n 'template' => 'simple_newsletter_dedicated',\n ),\n );\n}", "function sduconnect_addRealURLConf() {\n\t\t$template = array(\n\t\t\t'view' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'GETvar' => 'view',\n\t\t\t\t\t'value' => 'product',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'GETvar' => 'product_id',\n\t\t\t\t\t'cond' => array(\n\t\t\t\t\t\t'prevValueInList' => 'product',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'breadcrum' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'GETvar' => 'breadcrum',\n\t\t\t\t\t'default' => '',\n\t\t\t\t),\n\t\t\t),\n\t\t\t'meta' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'GETvar' => 'meta_data_value_id',\n\t\t\t\t),\n\t\t\t),\n\t\t\t'proxy' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'GETvar' => 'proxy',\n\t\t\t\t),\n\t\t\t),\n\t\t\t'productmod_keywords' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'GETvar' => 'productmod_keywords',\n\t\t\t\t),\n\t\t\t),\n\t\t\t'lokettype' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'GETvar' => 'lokettype',\n\t\t\t\t\t'valueMap' => array(\n\t\t\t\t\t\t'xml' => 3,\n\t\t\t\t\t\t'e-loket-1.0' => 1,\n\t\t\t\t\t\t'e-loket-2.0' => 6,\n\t\t\t\t\t\t'e-Loket_3.0' => 7,\n\t\t\t\t\t\t'e-balie' => 2,\n\t\t\t\t\t\t'subsidie' => 4,\n\t\t\t\t\t\t'list-a-z' => 5,\n\t\t\t\t\t\t'xml-overzicht' => 99,\n\t\t\t\t\t),\n\t\t\t\t\t// if map above did not trigger, pass value as is\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t\tforeach (array_keys($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']) as $domain) {\n\t\t\tif (!is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'][$domain]['postVarSets'])) {\n\t\t\t\t$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'][$domain]['postVarSets'] = array('_DEFAULT' => array());\n\t\t\t}\n\t\t\t$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'][$domain]['postVarSets']['_DEFAULT'] += $template;\n\t\t}\n\t}", "public function template_path()\n {\n return apply_filters('CW_TEMPLATE_PATH', 'codeswholesale-woocommerce/');\n }", "function fn_addon_template_overrides($resource_name, &$view)\n{\n static $init = array();\n\n //$o_name = 'template_overrides_' . AREA;\n $template_dir = rtrim($view->getTemplateDir(0), '/').'/';\n\n $cache_prefix = 'template_overrides';\n $cache_key = md5(rtrim($template_dir, '/'));\n\n if (!isset($init[$cache_key])) {\n Registry::registerCache(array($cache_prefix, $cache_key), array('addons'), Registry::cacheLevel('static'));\n\n if (!Registry::isExist($cache_key)) {\n $template_overrides = array();\n list($area, $area_type) = $view->getArea();\n\n foreach (Registry::get('addons') as $addon_name => $_settings) {\n if ($_settings['status'] == 'A') {\n $tpls = $view->theme->getDirContents(array(\n 'dir' => \"{$area_type}/templates/addons/{$addon_name}/overrides/\",\n 'get_dirs' => false,\n 'get_files' => true,\n 'recursive' => true,\n ), Themes::STR_MERGE, Themes::PATH_ABSOLUTE, Themes::USE_BASE);\n\n foreach ($tpls as $file_name => $file_info) {\n $tpl_hash = md5($file_name);\n if (empty($template_overrides[$tpl_hash])) {\n $template_overrides[$tpl_hash] = $file_info[Themes::PATH_ABSOLUTE];\n }\n }\n }\n }\n\n if (empty($template_overrides)) {\n $template_overrides['plug'] = true;\n }\n\n Registry::set($cache_key, $template_overrides);\n }\n\n $init[$cache_key] = true;\n }\n\n return Registry::ifGet($cache_key . '.' . md5($resource_name), $resource_name);\n}", "function add_paylater_endpoint() {\n add_rewrite_endpoint( 'paylater', EP_ROOT | EP_PAGES );\n}", "public static function template_paths() {\n\t\tif( ! isset( self::$template_paths ) ) {\n\t\t\tif( class_exists( 'SiteConfig' ) && ( $config = SiteConfig::current_site_config() ) && $config->Theme ) {\n\t\t\t\t$theme = $config->Theme;\n\t\t\t}\n\t\t\telseif( SSViewer::current_custom_theme() ) {\n\t\t\t\t$theme = SSViewer::current_custom_theme();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif( Config::inst()->get( 'SSViewer', 'theme' ) ) {\n\t\t\t\t\t$theme = Config::inst()->get( 'SSViewer', 'theme' );\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$theme = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif( $theme ) {\n\t\t\t\tif( file_exists( THEMES_PATH . '/' . $theme . '/templates/email' ) ) {\n\t\t\t\t\tself::$template_paths[ ] = THEMES_DIR . '/' . $theme . '/templates/email';\n\t\t\t\t}\n\n\t\t\t\tif( file_exists( THEMES_PATH . '/' . $theme . '/templates/Email' ) ) {\n\t\t\t\t\tself::$template_paths[ ] = THEMES_DIR . '/' . $theme . '/templates/Email';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$project = project();\n\t\t\tif( file_exists( '../' . $project . '/templates/email' ) ) {\n\t\t\t\tself::$template_paths[ ] = $project . '/templates/email';\n\t\t\t}\n\n\t\t\tif( file_exists( '../' . $project . '/templates/Email' ) ) {\n\t\t\t\tself::$template_paths[ ] = $project . '/templates/Email';\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif( is_string( self::$template_paths ) ) {\n\t\t\t\tself::$template_paths = array( self::$template_paths );\n\t\t\t}\n\t\t}\n\n\t\treturn self::$template_paths;\n\t}", "public function set_default_tpls() {\n\n static $i = 0;\n $i++;\n if ($i > 1) { return; }\n\n parent::set_default_tpls();\n\n $cfg = $this->cfg;\n\n // Adjust paths and template dir for modules\n $tplSearchPaths = array( $cfg->paths->coderoot . 'views/web/tpl' );\n $moduleName = $this->getRequest()->getModuleName();\n if ($moduleName != 'default') {\n $orig_basehref = $cfg->paths->basehref;\n\t $ver = $cfg->version;\n $basehref = $orig_basehref . $moduleName.'/';\n\n $cfg->paths->basehref = $basehref;\n $this->view->basehref = $basehref;\n #$this->view->appBasehref = $this->ns->appBasehref;\n $this->view->formbase = $orig_basehref.$cfg->version.'/mobws/';\n\n $this->view->csspath = $orig_basehref .$ver .'/m/'. $moduleName . '/css';\n array_unshift($tplSearchPaths, $cfg->paths->coderoot . 'modules/'.$moduleName.'/views/web/tpl' );\n }\n\t\t\n\t\tif($this->ns->logged_in){\n\t\t\t$this->view->logged_in=1;\n\t\t}else{\n\t\t\t$this->view->logged_in=0;\n\t\t}\n\t\t#var_dump($this->ns->logged_in);\n /*\n\t * add smarty plugin to search for templates under module\n\t * directories first, then use the global template\n\t *\n\t */\n /*\n $engine = $this->view->getEngine();\n $engine->compile_id = $moduleName; // identifier for compiler files. differentiates all the compiled files with same names\n\tvar_dump($tplSearchPaths);\n $plugin = new Atlasp_SmartyMultipathPlugin($tplSearchPaths);\n $engine->registerResource('mpath', array(\n array($plugin, 'smarty_resource_mpath_source'),\n array($plugin, 'smarty_resource_mpath_timestamp'),\n array($plugin, 'smarty_resource_mpath_secure'),\n array($plugin, 'smarty_resource_mpath_trusted')\n )\n );\n $engine->default_resource_type = 'mpath';\n */\n }", "public function template_path() {\n\t\t\treturn apply_filters( 'www_template_path', 'wolf-woocommerce-wishlist/' );\n\t\t}", "function getTemplateLocation() ;", "public function getTemplatePath();", "public function getTemplatePath(): string;", "public function getTemplatePath(): string\n {\n return '@Core/components/toggle.html';\n }", "function it_exchange_easy_eu_value_added_taxes_add_taxes_row_to_receipt() {\n\n\tif ( empty( $GLOBALS['it_exchange']['transaction'] ) ) {\n\t\treturn;\n\t}\n\n\t$transaction = $GLOBALS['it_exchange']['transaction'];\n\n\t$tax_items = get_post_meta( $transaction->ID, '_it_exchange_easy_eu_value_added_taxes', true );\n\t$vat_moss_tax_items = get_post_meta( $transaction->ID, '_it_exchange_easy_eu_value_added_vat_moss_taxes', true );\n\t$memberstates = it_exchange_get_data_set( 'eu-member-states' );\n\t?>\n\n\t<?php if ( ! empty( $tax_items ) ) : ?>\n\t\t<?php foreach ( $tax_items as $tax ) : ?>\n\t\t\t<?php if ( empty( $tax['total'] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$tax_total = it_exchange_format_price( $tax['total'] );\n\t\t\t$tax_type = sprintf( __( '%s %s (%s%%)', 'LION' ), ( empty( $tax['country'] ) ? '' : $memberstates[$tax['country']] ), $tax['tax-rate']['label'], $tax['tax-rate']['rate'] );\n\t\t\t?>\n\t\t\t<tr>\n\t\t\t\t<td></td>\n\t\t\t\t<td align=\"right\" style=\"padding: 10px; \">\n\t\t\t\t\t<strong><?php echo $tax_type; ?></strong>\n\t\t\t\t</td>\n\t\t\t\t<td align=\"right\" style=\"padding: 10px 0 10px 10px; \">\n\t\t\t\t\t<?php echo $tax_total; ?>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t<?php endforeach; ?>\n\t<?php endif; ?>\n\n\t<?php if ( ! empty( $vat_moss_tax_items ) ) : ?>\n\t\t<?php foreach ( $vat_moss_tax_items as $tax ) : ?>\n\t\t\t<?php if ( empty( $tax['total'] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$tax_total = it_exchange_format_price( $tax['total'] );\n\t\t\t$tax_type = sprintf( __( '%s %s (%s%%)', 'LION' ), ( empty( $tax['country'] ) ? '' : $memberstates[$tax['country']] ), $tax['tax-rate']['label'], $tax['tax-rate']['rate'] );\n\t\t\t?>\n\t\t\t<tr>\n\t\t\t\t<td></td>\n\t\t\t\t<td align=\"right\" style=\"padding: 10px; \">\n\t\t\t\t\t<strong><?php echo $tax_type; ?></strong>\n\t\t\t\t</td>\n\t\t\t\t<td align=\"right\" style=\"padding: 10px 0 10px 10px; \">\n\t\t\t\t\t<?php echo $tax_total; ?>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t<?php endforeach; ?>\n\t<?php endif; ?>\n<?php\n\n}", "function it_exchange_easy_eu_value_added_taxes_addon_add_taxes_to_template_totals_elements( $elements ) {\n\t// Locate the discounts key in elements array (if it exists)\n\t$index = array_search( 'totals-savings', $elements );\n\tif ( false === $index )\n\t\t$index = -1;\n\n\t// Bump index by 1 to show tax after discounts\n\tif ( -1 != $index )\n\t\t$index++;\n\n\tarray_splice( $elements, $index, 0, 'easy-eu-value-added-taxes' );\n\treturn $elements;\n}", "public function template_path()\n {\n }", "public function getTemplatePath(): string\n {\n return '@Core/components/panel.html';\n }", "public function getBackendTemplatePath()\n {\n return $this->getPath() . 'templates/';\n }", "public function setViewConfigurationFilesFromTypoScriptConfiguration() { \n \t// Sets the template root path with the default\n \t$this->templateRootPath = $this->defaultTemplateRootPath; \t\n \t$this->getController()->getPageTypoScriptConfigurationManager()->setViewConfigurationFilesFromPageTypoScriptConfiguration();\n \t$this->getController()->getExtensionConfigurationManager()->setViewConfigurationFilesFromTypoScriptConfiguration();\n \t$this->getController()->getLibraryConfigurationManager()->setViewConfigurationFilesFromTypoScriptConfiguration(); \n }", "function it_exchange_easy_eu_value_added_taxes_addon_admin_wp_enqueue_styles() {\n\tglobal $post, $hook_suffix;\n\n\tif ( isset( $_REQUEST['post_type'] ) ) {\n\t\t$post_type = $_REQUEST['post_type'];\n\t} else {\n\t\tif ( isset( $_REQUEST['post'] ) ) {\n\t\t\t$post_id = (int) $_REQUEST['post'];\n\t\t} else if ( isset( $_REQUEST['post_ID'] ) ) {\n\t\t\t$post_id = (int) $_REQUEST['post_ID'];\n\t\t} else {\n\t\t\t$post_id = 0;\n\t\t}\n\n\t\tif ( $post_id )\n\t\t\t$post = get_post( $post_id );\n\n\t\tif ( isset( $post ) && !empty( $post ) )\n\t\t\t$post_type = $post->post_type;\n\t}\n\n\t// Easy US Sales Taxes settings page\n\tif ( ( isset( $post_type ) && ( 'it_exchange_prod' === $post_type || 'it_exchange_tran' === $post_type ) )\n\t\t|| ( !empty( $_GET['add-on-settings'] ) && 'exchange_page_it-exchange-addons' === $hook_suffix && 'easy-eu-value-added-taxes' === $_GET['add-on-settings'] ) ) {\n\n\t\twp_enqueue_style( 'it-exchange-easy-eu-value-added-taxes-addon-admin-style', ITUtility::get_url_from_file( dirname( __FILE__ ) ) . '/styles/admin.css' );\n\n\t}\n\n}", "public function setTemplatesPath($path);", "public function setTemplatePath( $value ) {\n\t\t$this->templatePath = $value;\n\t}", "public function getThemeTemplatePath();", "public function getTemplatePath(): string\n {\n return '@Core/components/accordion.html';\n }", "function tbe_add_fpw_widget_template( $templates ){\n\n // Add \"image-on-left\" custom template to templates array\n $templates['image-at-left'] = __( 'Image at left', 'the-basics-of-everything' );\n\n // Add \"image-on-left\" custom template to templates array\n $templates['image-at-right'] = __( 'Image at Right', 'the-basics-of-everything' );\n\n // Add \"image-at-center\" custom template to templates array\n $templates['image-at-center'] = __( 'Image at center', 'the-basics-of-everything' );\n\n // Add \"image-full-width\" custom template to templates array\n $templates['image-full-width'] = __( 'Image full width', 'the-basics-of-everything' );\n\n // Return modified templates array\n\treturn $templates;\n}", "protected function templateItemPath() {\n $prefix = \"form_item\";\n $d = \"__\";\n $names = [];\n if ($this->template) {\n $names[] = $prefix.$d.$this->type.$d.$this->template;\n if ($this->type != $this->inputType())\n $names[] = $prefix.$d.$this->inputType().$d.$this->template;\n $names[] = $prefix.$d.$this->template;\n }\n $names[] = $prefix.$d.$this->type;\n $names[] = $prefix;\n foreach ($names as $name) {\n $path = DOC_ROOT.\"/extend/template/form/\".$name.\".php\";\n if (file_exists($path))\n return $path;\n }\n foreach ($names as $name) {\n $path = DOC_ROOT.\"/core/template/form/\".$name.\".php\";\n if (file_exists($path))\n return $path;\n }\n return null;\n }", "function fa_template_path( $template ){\t\n\t$file = 'template-' . $template . '.php'; \n\treturn fa_view_path($file);\t\n}", "function it_exchange_variants_addon_register_template_loop( $elements ) {\n\t// Splice our template in after base price if it is first\n\tif ( 'base-price' == $elements[0] )\n\t\t$index = 1;\n\telse\n\t\t$index = 0;\n\n\t$index = apply_filters( 'it_exchange_get_content_product_product_info_loop_elements_variants_index', $index );\n\tarray_splice( $elements, $index, 0, 'exchange-variants' );\t\n\n\treturn $elements;\n}", "public function setTemplatePath(string $path): void;", "public function setTemplate( $path );", "function woo_overwrite_tempalte($located, $template_name, $args, $template_path, $default_path){\n\t\tglobal $woo_auction;\n\t\t$wootemplate_path = $woo_auction->template_path();\n\t\tswitch($template_name){\n\t\t\tcase 'max-bidder.php':\n\t\t\t\t$located = $wootemplate_path.'/single-product/max-bidder.php';\n\t\t\tbreak;\n\t\t\tcase 'list-bids.php':\n\t\t\t\t$located = $wootemplate_path.'/single-product/list-bids.php';\n\t\t\tbreak;\n\t\t\tcase 'auction-timeleft.php':\n\t\t\t\t$located = $wootemplate_path.'/single-product/auction-timeleft.php';\n\t\t\tbreak;\n\t\t\tcase 'single-product/add-to-cart/auction.php':\n\t\t\t\t$located = $wootemplate_path.'/single-product/add-to-cart/auction.php';\n\t\t\tbreak;\n\t\t}\n\t\treturn $located;\n\t}", "private function add_installerTS()\n {\n $table = 'sys_template';\n $record = null;\n $int_maxUid = $this->get_maxUid($table);\n $int_maxUid = $int_maxUid + 1;\n\n $record['uid'] = $int_maxUid;\n $record['pid'] = $this->int_pageUid;\n $record['title'] = 'page_quickshopinstaller_' . sprintf('%03d', $int_maxUid);\n $record['root'] = '1';\n $record['clear'] = '3';\n $record['include_static_file'] = 'EXT:css_styled_content/static/';\n $record['config'] = '\nconfig {\n baseURL = ' . t3lib_div::getIndpEnv('TYPO3_REQUEST_HOST') . '/\n language = ' . $this->str_llStatic . '\n htmlTag_langKey = ' . $this->str_llStatic . '\n metaCharset = UTF-8\n tx_realurl_enable = 0\n no_cache = 1\n}\npage = PAGE\npage {\n typeNum = 0\n 10 = COA\n 10 {\n 10 = TEXT\n 10 {\n value (\n <style type=\"text/css\">\n body {\n background-image:url(typo3conf/ext/quickshop_installer/res/images/background.gif);\n background-repeat:no-repeat;\n background-position:center center;\n background-attachment:fixed;\n }\n </style>\n)\n }\n 20 < styles.content.get\n }\n}\n';\n //var_dump(__METHOD__ . ' (' . __LINE__ . '): ' . $GLOBALS['TYPO3_DB']->INSERTquery($table,$record,$no_quote_fields=FALSE));\n //exit;\n $GLOBALS['TYPO3_DB']->exec_INSERTquery( $table, $record );\n }", "protected function setLocalTemplates()\n {\n if(isset($this->localCXML->templatePath))\n {\n $templatePath = (string) $this->localCXML->templatePath;\n define('CONDOR_LOCAL_TEMPLATES_DIR', SITE_BASE_DIR . $templatePath);\n define('CONDOR_LOCAL_TEMPLATES_HREF', SITE_BASE_HREF . $templatePath);\n } \n }", "public function apply_template()\n {\n if (!$this->login) {\n return;\n }\n\n $args = [\n 'points' => WC_Points_Rewards_Manager::get_users_points(get_current_user_id()),\n 'sliders' => [\n $this->render_slider($this->point_500_cat), $this->render_slider($this->point_1000_cat), $this->render_slider($this->point_up1000_cat),\n ],\n ];\n new_point_template_cart_rewards($args);\n }", "function learn_press_add_endpoints() {\n\t$settings = LP()->settings();\n\n\tif ( $endpoints = $settings->get_checkout_endpoints() ) {\n\t\tforeach ( $endpoints as $endpoint => $value ) {\n\t\t\tLP()->query_vars[ $endpoint ] = $value;\n\t\t\tadd_rewrite_endpoint( $value, EP_PAGES );\n\t\t}\n\t}\n\n\tif ( $endpoints = $settings->get_profile_endpoints() ) {\n\t\tforeach ( $endpoints as $endpoint => $value ) {\n\t\t\tLP()->query_vars[ $endpoint ] = $value;\n\t\t\tadd_rewrite_endpoint( $value, EP_PAGES );\n\t\t}\n\t}\n\n\tif ( $endpoints = LP()->settings->get( 'quiz_endpoints' ) ) {\n\t\tforeach ( $endpoints as $endpoint => $value ) {\n\t\t\t$endpoint = preg_replace( '!_!', '-', $endpoint );\n\t\t\tLP()->query_vars[ $endpoint ] = $value;\n\t\t\tadd_rewrite_endpoint(\n\t\t\t\t$value, /*EP_ROOT | */\n\t\t\t\tEP_PAGES\n\t\t\t);\n\t\t}\n\t}\n}", "public static function getTemplatePath();", "private function registerTemplates()\n {\n add_filter('theme_page_templates', [$this, 'getTemplatesForAdmin'], 99);\n }", "public function addTemplatePath($file) {\n if (is_dir($file)) {\n $paths[] = $file;\n }\n return $paths;\n }", "public static function getTplPath()\n\t{\n\t\tglobal $core;\n\t\t\n\t\t$pathes = array(\n\t\t\tdirname(__FILE__) . '/../..' .\n\t\t\t$core->blog->settings->themes_url . '/' .\n\t\t\t$core->blog->settings->theme . '/iphone/tpl/'\n\t\t);\n\t\t\n\t\treturn $pathes;\n\t}", "private function add_to_twig_context(): void\n {\n add_filter(\n 'timber/context',\n function ($context) {\n\n $context['sites'] = WP::getAllPublicSitesButCurrent();\n \n if (true === get_theme_mod('cdelk_use_hash') && class_exists('cdk_hashed_model')) {\n $context['kiyoh'] = (new cdk_hashed_model())->get();\n } elseif (class_exists('cdk_model')) {\n $context['kiyoh'] = (new cdk_model())->get();\n }\n \n $context['secure_payment'] = static::get_cached_payment_icons();\n \n if (\n function_exists('wc') &&\n !is_admin() &&\n wc()->cart\n ) {\n $context['wc_cart_count'] = wc()->cart->get_cart_contents_count();\n }\n \n if (get_theme_mod('large_layout')) {\n $context['stramien_large'] = get_theme_mod('large_layout');\n } else {\n $context['stramien_large'] = false;\n }\n \n return $context;\n }\n );\n }", "public function testUpdateEmailTemplateCustomFields()\n {\n }", "function it_exchange_easy_eu_value_added_taxes_load_public_scripts( $current_view ) {\n\n\tif ( it_exchange_is_page( 'checkout' ) || it_exchange_is_page( 'confirmation' ) || it_exchange_in_superwidget() ) {\n\n\t\t$url_base = ITUtility::get_url_from_file( dirname( __FILE__ ) );\n\t\twp_enqueue_style( 'ite-easy-eu-value-added-taxes-addon', $url_base . '/styles/taxes.css' );\n\n\t\tif ( it_exchange_is_page( 'checkout' ) )\n\t\t\twp_enqueue_script( 'ite-vat-addon-checkout-page-var', $url_base . '/js/checkout-page.js' );\n\n\t\t$deps = array( 'jquery', 'wp-backbone', 'underscore' );\n\t\twp_enqueue_script( 'ite-vat-addon-vat-number-views', $url_base . '/js/views/vat-number-views.js', $deps );\n\t\t$deps[] = 'ite-vat-addon-vat-number-views';\n\t\twp_enqueue_script( 'ite-vat-addon-vat-number-manager', $url_base . '/js/vat-number-manager.js', $deps );\n\n\t\twp_enqueue_style( 'ite-vat-addon-vat-number-manager', $url_base . '/styles/vat-number-manager.css' );\n\n\t\tadd_action( 'wp_footer', 'it_exchange_easy_eu_value_added_taxes_addon_vat_number_manager_backbone_template' );\n\n\t}\n\n}", "public function getTemplatePath()\n {\n return _PS_MODULE_DIR_.$this->module->name.'/views/templates/front/';\n }", "function custom_templates( $templates ) {\n $templates[] = array (\n 'id' => 'custom',\n 'name' => 'Custom template',\n 'path' => get_stylesheet_directory() . '/' . 'wpsl-templates/custom.php',\n );\n\n return $templates;\n}", "function setTemplatePath($path)\n\t{\n\t\tif(!$path) return;\n\n\t\tif((strlen($path) >= 1 && substr_compare($path, '/', 0, 1) !== 0) && (strlen($path) >= 2 && substr_compare($path, './', 0, 2) !== 0))\n\t\t{\n\t\t\t$path = './' . $path;\n\t\t}\n\n\t\tif(substr_compare($path, '/', -1) !== 0)\n\t\t{\n\t\t\t$path .= '/';\n\t\t}\n\t\t$this->template_path = $path;\n\t}", "public function addPathway(){\n\t\t\n\t\t$app = JFactory::getApplication();\n\t\t$pathway = $app->getPathway();\n\t\t\t\t\n\t\t$viewOptions = AskHelper::getActiveViewOptions( TRUE );\n\n\t\t//00. Generic\n\t\t$pathway->addItem( JText::_(\"QUESTIONS\") , JRoute::_(\"index.php?option=com_ask&view=questions\") );\n \t\n\t\t//01. Category\n \tif ($viewOptions->catid) {\n \t\t$pathway->addItem( JText::_(\"CATEGORIES\") );\n \t\t$pathway->addItem(AskHelper::getCategoryName($viewOptions->catid) , JRoute::_(\"index.php?option=com_ask&view=questions&catid=\" . $viewOptions->catid) );\n \t}\n\t\t\n \t//02. Tag\n \tif ($viewOptions->tag){\n \t\t$pathway->addItem( JText::_(\"TAGS\") );\n \t\t$pathway->addItem( $viewOptions->tag , JRoute::_(\"index.php?option=com_ask&view=questions&tag=\" . $viewOptions->tag ) ); \n \t}\n \t\n //03. Filter\n if ($viewOptions->filter){\n \t$pathway->addItem( JText::_(\"FILTER_\" .$viewOptions->filter ) );\n }\n \t\n\t}", "public function addEmailTemplatesToPrestashop()\n {\n $orderManager = new OrderManager();\n $emailTemplates = [$orderManager::EMAIL_TEMPLATE_PARTIALLY_CAPTURED,\n $orderManager::EMAIL_TEMPLATE_PARTIALLY_REFUNDED];\n foreach ($emailTemplates as $emailTemplate) {\n $this->defineEmailTemplatePathPerLanguage($emailTemplate);\n }\n\n return true;\n }", "function mp_stacks_templates_add_church_plant_theme_bundle_church_plant_jane_doe( $installed_templates ){\n\n\t \t\t$installed_templates['mp_stacks_church_plant_theme_bundle_church_plant_jane_doe_array'] = array(\n\t \t\t\t'template_slug' => 'church_plant_theme_bundle_church_plant_jane_doe',\n\t \t\t\t'template_title' => __( 'Jane Doe', 'church_plant_theme_bundle' ),\n\t \t\t\t'template_description' => __('The \"Jane Doe\" stack template included in the Church Plant Theme Bundle', 'church_plant_theme_bundle' ),\n\t \t\t\t'template_tags' => 'church',\n\t \t\t\t'template_preview_img' => '',\n\t \t\t\t'template_demo_url' => 'https://demo.mintplugins.com/church-plant/stack/church-plant-theme-bundle-church-plant-jane-doe',\n\t \t\t);\n\n\t \t\treturn $installed_templates;\n\n\t \t}", "public function getFrontendTemplatePath()\n {\n return $this->getPath() . 'templates/';\n }", "protected function getTemplatePathAndFilename() {}", "function initBETemplates() {\n\t\t// We need to create our own template setup if we are in the BE\n\t\t// and we aren't currently creating a DirectMail page.\n\t\tif ((TYPO3_MODE == 'BE') && !is_object($GLOBALS['TSFE'])) {\n\t\t\t$template = t3lib_div::makeInstance('t3lib_TStemplate');\n\t\t\t// do not log time-performance information\n\t\t\t$template->tt_track = 0;\n\t\t\t$template->init();\n\t\t\t// Get the root line\n\t\t\t$sys_page = t3lib_div::makeInstance('t3lib_pageSelect');\n\t\t\t// the selected page in the BE is found\n\t\t\t// exactly as in t3lib_SCbase::init()\n\t\t\t$rootline = $sys_page->getRootLine(intval(t3lib_div::_GP('id')));\n\t\t\t// This generates the constants/config + hierarchy info for the template.\n\t\t\t$template->runThroughTemplates($rootline, 0);\n\t\t\t$template->generateConfig();\n\t\t\t$conf = $template->setup['plugin.']['tx_'.$this->extKey.'.'];\n\t\t\t$GLOBALS['TSFE']->tmpl = $template;\n\t\t\t$GLOBALS['TSFE']->tmpl->getFileName_backPath = PATH_site;\n\t\t\t\n\t\t\t// change dir to the base-folder (docroot) otherwise the\n\t\t\t// whole filefunctions don't work because all the path are relative!!!!!\n\t\t\t// For an example - look at: class.t3lib_tstemplate.getFileName($filename)\n\t\t\tchdir(PATH_site);\n\t\t\t\n\t\t\treturn $conf;\n\t\t} else {\n\t\t\t// On the front end, we can use the provided template setup.\n\t\t\t//$this->conf = $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_'.$this->extKey.'.'];\n\t\t\t$conf = $GLOBALS['TSFE']->tmpl;\n\t\t}\n\t\t\n\t\treturn $conf;\n\t}", "protected function registerTwigPaths()\n {\n return [];\n }", "function avia_include_shortcode_template($paths) {\n\t\t$template_url = get_stylesheet_directory();\n\t\tarray_unshift($paths, $template_url.'/shortcodes/');\n\n\t\treturn $paths;\n\t}", "public function rewrite_templates() {\n if ( 'true' == get_query_var( 'wepos' ) ) {\n //check if user is logged in otherwise redirect to login page\n if ( ! is_user_logged_in() ) {\n wp_redirect( get_permalink( get_option( 'woocommerce_myaccount_page_id' ) ) );\n exit();\n }\n\n include_once WCPOS_PATH . '/templates/wepos.php';\n exit;\n }\n }", "function mp_stacks_templates_add_growing_church_theme_bundle_growing_church_footer( $installed_templates ){\n\n\t \t\t$installed_templates['mp_stacks_growing_church_theme_bundle_growing_church_footer_array'] = array(\n\t \t\t\t'template_slug' => 'growing_church_theme_bundle_growing_church_footer',\n\t \t\t\t'template_title' => __( 'Footer', 'growing_church_theme_bundle' ),\n\t \t\t\t'template_description' => __('The \"Footer\" stack template included in the Growing Church Theme Bundle', 'growing_church_theme_bundle' ),\n\t \t\t\t'template_tags' => 'church',\n\t \t\t\t'template_preview_img' => '',\n\t \t\t\t'template_demo_url' => 'https://demo.mintplugins.com/growing-church-theme-bundle/stack/growing-church-theme-bundle-growing-church-footer',\n\t \t\t);\n\n\t \t\treturn $installed_templates;\n\n\t \t}", "function cs_cf7_add_templates( $templates ) {\n\t// User templates.\n\t$user_templates = array(\n\t\tarray(\n\t\t\t'name' => __( 'Demo Default', 'custom-template-cf7-email-add-on' ),\n\t\t\t'slug' => 'demo-default',\n\t\t\t'preview_image' => plugin_dir_url( __FILE__ ) . 'assets/images/user-preview.jpg',\n\t\t),\n\t);\n\t$templates['user_templates'] = array_merge( $user_templates, $templates['user_templates'] );\n\n\t// Admin templates.\n\t$admin_templates = array(\n\t\tarray(\n\t\t\t'name' => __( 'Demo Default', 'custom-template-cf7-email-add-on' ),\n\t\t\t'slug' => 'demo-default',\n\t\t\t'preview_image' => plugin_dir_url( __FILE__ ) . 'assets/images/admin-preview.jpg',\n\t\t),\n\t);\n\t$templates['admin_templates'] = array_merge( $admin_templates, $templates['admin_templates'] );\n\treturn $templates;\n}", "function tif_template_path($template_name) {\n return \"tif-modules/templates/$template_name/$template_name.php\";\n}", "abstract public function getSettingsTemplate();", "function UTMAPI_override_specific_url_template($template){\n $temp = explode(\"/\",$_SERVER['REQUEST_URI']);\n $tempLen = count($temp) -1;\n $currentUrl = $temp[$tempLen];\n $exploded_url = explode (\"?\",$currentUrl);\n\n if ($exploded_url[0] == \"api\")\n {\n $template = UTMAPI_PLUGIN_PATH.'template/utmapi.php';\n }\n return $template;\n\n }", "function wp_cb_template_option() {\r\n\trequire_once(dirname(__FILE__).DIRECTORY_SEPARATOR.'template-file.php');\r\n}", "function set_acf_json_save_point( $path ) {\n $path = get_template_directory() . '/include/acf-field-groups';\n return $path;\n}", "public function testUpdateEntitlementTemplate()\n {\n }", "public static function getEmailTemplatePath();", "public static function addPathway(){\n\t\t\n\t\t$app = JFactory::getApplication();\n\t\t$pathway = $app->getPathway();\n\t\t\t\t\n\t\t$viewOptions = QuestionsHelper::getActiveViewOptions( TRUE );\n\n\t\t//00. Generic\n\t\t$pathway->addItem( JText::_(\"COM_QUESTIONS_QUESTIONS\") , JRoute::_(\"index.php?option=com_questions&view=questions\") );\n \t\n\t\t//01. Category\n \tif ($viewOptions->catid) {\n \t\t$pathway->addItem( JText::_(\"COM_QUESTIONS_CATEGORIES\") );\n \t\t$pathway->addItem(QuestionsHelper::getCategoryName($viewOptions->catid) , JRoute::_(\"index.php?option=com_questions&view=questions&catid=\" . $viewOptions->catid) );\n \t}\n\t\t\n \t//02. Tag\n \tif ($viewOptions->tag){\n \t\t$pathway->addItem( JText::_(\"COM_QUESTIONS_TAGS\") );\n \t\t$pathway->addItem( $viewOptions->tag , JRoute::_(\"index.php?option=com_questions&view=questions&tag=\" . $viewOptions->tag ) ); \n \t}\n \t\n //03. Filter\n if ($viewOptions->filter){\n \t$pathway->addItem( JText::_(\"COM_QUESTIONS_FILTER_\" .$viewOptions->filter ) );\n }\n \t\n\t}", "function add_twigs_dir( $views ) {\n\n return array_merge( $views, array(\n\n TOOLBOXDOCS_DIR . 'twig_templates',\n\n )\n\t\t);\n}", "public function getTemplatePath(): string\n\t{\n\t\treturn \"Widget/{$this->type}.tpl\";\n\t}", "protected function getTemplatePath()\n {\n\treturn $this->getPathByOptionOrConfig('templatePath', 'view_template_path');\n }" ]
[ "0.6398852", "0.6339138", "0.59186447", "0.57543653", "0.56959623", "0.56298125", "0.56126344", "0.56085634", "0.5590169", "0.55812776", "0.55460495", "0.55350494", "0.55259895", "0.55192155", "0.55192155", "0.55192155", "0.55192155", "0.55192155", "0.55192155", "0.55192155", "0.55192155", "0.5514804", "0.5514804", "0.5507186", "0.5507186", "0.55062467", "0.5486858", "0.5457924", "0.5447581", "0.5444475", "0.5438852", "0.541682", "0.54159635", "0.5387219", "0.53650194", "0.53609926", "0.53510314", "0.5285304", "0.52418536", "0.51858073", "0.5182279", "0.51800096", "0.51783484", "0.51569045", "0.5147215", "0.5138665", "0.5120862", "0.51201814", "0.5118586", "0.5118459", "0.51072246", "0.5106905", "0.5100659", "0.5098245", "0.5095228", "0.50939864", "0.50927025", "0.5087529", "0.50701624", "0.50651866", "0.5061904", "0.5061481", "0.50597227", "0.5050905", "0.5045216", "0.5038901", "0.5019849", "0.4997345", "0.4996866", "0.49927506", "0.4989584", "0.49852303", "0.49797937", "0.4961818", "0.49495345", "0.49450114", "0.49434015", "0.49377254", "0.49348935", "0.4934261", "0.4933596", "0.49325404", "0.49306348", "0.4929888", "0.49289092", "0.4928535", "0.4922376", "0.49212545", "0.49208996", "0.491933", "0.49126542", "0.49097037", "0.49045587", "0.4901799", "0.48995772", "0.48972213", "0.48908934", "0.48890117", "0.48818672", "0.48772144" ]
0.70249945
0
Backbone template for primary EU VAT Number Manager screen. Invoked by wp.template() and WordPress add_action( 'wp_footer', 'it_exchange_easy_eu_value_added_taxes_addon_vat_number_manager_backbone_template' );
Шаблон основного экрана менеджера основного номера НДС ЕС. Вызывается функцией wp.template() и WordPress add_action( 'wp_footer', 'it_exchange_easy_eu_value_added_taxes_addon_vat_number_manager_backbone_template' );
function it_exchange_easy_eu_value_added_taxes_addon_vat_number_manager_backbone_template() { $tax_session = it_exchange_get_session_data( 'addon_easy_eu_value_added_taxes' ); ?> <div id="it-exchange-easy-eu-value-added-taxes-vat-manager-wrapper" class="it-exchange-hidden"></div> <script type="text/template" id="tmpl-it-exchange-easy-eu-value-added-taxes-vat-manager-container"> <span class="it-exchange-euvat-close-vat-manager"><a href="">&times;</a></span> <div id="it-exchange-easy-eu-value-added-taxes-vat-manager"> <div id="it-exchange-easy-eu-value-added-taxes-vat-manager-title-area"> <h3 class="it-exchange-euvat-tax-emeption-title"> <?php _e( 'VAT Manager', 'LION' ); ?> </h3> </div> <div id="it-exchange-easy-eu-value-added-taxes-vat-manager-content-area"> <div id="it-exchange-easy-eu-value-added-taxes-vat-manager-error-area"></div> <form id="it-exchange-add-on-easy-eu-value-added-taxes-add-edit-vat" name="it-exchange-add-on-easy-eu-value-added-taxes-add-edit-vat" action="POST"> <?php if ( !empty( $tax_session['vat_country'] ) ) { $vat_country = $tax_session['vat_country']; } else { $vat_country = ''; } if ( !empty( $tax_session['vat_number'] ) ) { $vat_number = $tax_session['vat_number']; } else { $vat_number = ''; } $output = '<select id="it-exchange-euvat-eu-vat-country" name="eu-vat-country">'; $memberstates = it_exchange_get_data_set( 'eu-member-states' ); foreach( $memberstates as $abbr => $name ) { $output .= '<option value="' . $abbr . '" ' . selected( $abbr, $vat_country, false ) . '>' . $name . '</option>'; } $output .= '</select><br />'; $output .= '<input type="text" id="it-exchange-euvat-eu-vat-number" name="eu-vat-number" value="' . $vat_number . '" />'; echo $output; ?> <div class="field it-exchange-add-vat-submit"> <input type="submit" value="<?php _e( 'Verify and Save VAT Number', 'LION' ); ?>" class="button button-large it-exchange-euvat-save-vat-button" id="save" name="save"> <input type="submit" value="Cancel" class="button button-large it-exchange-euvat-cancel-vat-button" id="cancel" name="cancel"> <input type="submit" value="Remove" class="button button-large it-exchange-euvat-remove-vat-button" id="remove" name="remove"> <?php wp_nonce_field( 'it-exchange-easy-eu-value-added-taxes-add-edit-vat-number', 'it-exchange-easy-eu-value-added-taxes-add-edit-vat-number-nonce' ); ?> </div> </form> </div> </div> </script> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function it_exchange_easy_eu_value_added_taxes_load_public_scripts( $current_view ) {\n\n\tif ( it_exchange_is_page( 'checkout' ) || it_exchange_is_page( 'confirmation' ) || it_exchange_in_superwidget() ) {\n\n\t\t$url_base = ITUtility::get_url_from_file( dirname( __FILE__ ) );\n\t\twp_enqueue_style( 'ite-easy-eu-value-added-taxes-addon', $url_base . '/styles/taxes.css' );\n\n\t\tif ( it_exchange_is_page( 'checkout' ) )\n\t\t\twp_enqueue_script( 'ite-vat-addon-checkout-page-var', $url_base . '/js/checkout-page.js' );\n\n\t\t$deps = array( 'jquery', 'wp-backbone', 'underscore' );\n\t\twp_enqueue_script( 'ite-vat-addon-vat-number-views', $url_base . '/js/views/vat-number-views.js', $deps );\n\t\t$deps[] = 'ite-vat-addon-vat-number-views';\n\t\twp_enqueue_script( 'ite-vat-addon-vat-number-manager', $url_base . '/js/vat-number-manager.js', $deps );\n\n\t\twp_enqueue_style( 'ite-vat-addon-vat-number-manager', $url_base . '/styles/vat-number-manager.css' );\n\n\t\tadd_action( 'wp_footer', 'it_exchange_easy_eu_value_added_taxes_addon_vat_number_manager_backbone_template' );\n\n\t}\n\n}", "protected function content_template() {\r\n\t\t?>\r\n\r\n <div class=\"zakra-upsell-wrapper\">\r\n <ul class=\"upsell-features\">\r\n <h3 class=\"upsell-heading\"><?php esc_html_e( 'More Awesome Features', 'zakra' ); ?></h3>\r\n <li class=\"upsell-feature\"><span\r\n class=\"dashicons dashicons-yes\"></span><?php esc_html_e( 'Advanced Header Options', 'zakra' ); ?>\r\n </li>\r\n <li class=\"upsell-feature\"><span\r\n class=\"dashicons dashicons-yes\"></span><?php esc_html_e( 'Flexible Menu Designs', 'zakra' ); ?>\r\n </li>\r\n <li class=\"upsell-feature\"><span\r\n class=\"dashicons dashicons-yes\"></span><?php esc_html_e( 'Grid, Masonry, Thumbnail Blog', 'zakra' ); ?>\r\n </li>\r\n <li class=\"upsell-feature\"><span\r\n class=\"dashicons dashicons-yes\"></span><?php esc_html_e( '10+ Footer Layouts', 'zakra' ); ?>\r\n </li>\r\n <li class=\"upsell-feature\"><span\r\n class=\"dashicons dashicons-yes\"></span><?php esc_html_e( '100+ Customizer Options', 'zakra' ); ?>\r\n </li>\r\n <li class=\"upsell-feature\"><span\r\n class=\"dashicons dashicons-yes\"></span><?php esc_html_e( '30+ Page Settings', 'zakra' ); ?>\r\n </li>\r\n </ul>\r\n\r\n <div class=\"launch-offer\">\r\n\t\t\t\t<?php\r\n\t\t\t\tprintf(\r\n\t\t\t\t /* translators: 1: Discount Percent. 2. Coupon Code Text 3. Coupon Code */\r\n\t\t\t\t\tesc_html__( '%1$s discount available for Zakra free user with %2$s %3$s', 'zakra' ),\r\n\t\t\t\t\t'15%',\r\n\t\t\t\t\t'<strong>' . esc_html__( 'coupon code: ', 'zakra' ) . '</strong>',\r\n\t\t\t\t\t'<span class=\"coupon-code\">save15</span>'\r\n\t\t\t\t);\r\n\t\t\t\t?>\r\n </div>\r\n </div> <!-- /.zakra-upsell-wrapper -->\r\n\r\n <a class=\"upsell-cta\" target=\"_blank\"\r\n href=\"<?php echo esc_url( 'https://zakratheme.com/pricing/?utm_source=zakra-customizer&utm_medium=view-pro-link&utm_campaign=zakra-pricing' ); ?>\"><?php esc_html_e( 'View Pricing', 'zakra' ); ?></a>\r\n\r\n\t\t<?php\r\n\t}", "private function initialize_view()\n {\n $plugins = new NE_PluginCollection(\"gateways\", $this->user);\n $thereAreBillingPlugins = false;\n while ($tplugin = $plugins->getNext()) {\n //we have to make sure it isn't grabbing from logged in Admin\n if ( $tplugin->getVariable(\"In Signup\") || (($this->user->getPaymentType() == $tplugin->getInternalName()) && $this->user->getPaymentType() != \"0\" && !$this->user->IsAdmin()) ) {\n $thereAreBillingPlugins = true;\n }\n }\n if(!$thereAreBillingPlugins) {\n CE_Lib::redirectPage('index.php?fuse=home&view=main', $this->user->lang('There are no Payment Processors configured!'));\n }\n\n include_once 'modules/admin/models/PackageType.php';\n\n $aogateway = new ActiveOrderGateway($this->user);\n\n\t\t// Override the cart\n if(@$_GET['cleanCart']) {\n $aogateway->destroyTempItem(true);\n $aogateway->destroyCart();\n $aogateway->destroyCurrency();\n $aogateway->destroyInvoiceInformation();\n CE_Lib::redirectPage('order.php');\n }\n\n \t$ret_view = array();\n $ret_view['step'] = $this->getParam('step',FILTER_SANITIZE_STRING,\"0\");\n\n //we need to pull the style here based on what the group is\n $ret_view['productgroup'] = $this->getParam('productGroup',FILTER_SANITIZE_NUMBER_INT,0);\n $ret_view['product'] = $this->getParam('product',FILTER_SANITIZE_NUMBER_INT,0);\n $ret_view['bundled'] = $this->getParam('bundled',FILTER_SANITIZE_NUMBER_INT,0);\n\n // if we have 0 bundled products, then we need to force bundled to be 0, so we don't allow the domain to be ordered without the hosting package.\n if ( count($this->session->bundledProducts) == 0 ) {\n $ret_view['bundled'] = 0;\n }\n\n\t\t$ret_view['paymentterm'] = $this->getParam('paymentterm',FILTER_SANITIZE_NUMBER_INT,1);\n $ret_view['tempInformation'] = array();\n //CE_Lib::debug($ret_view['tempItem']);\n\n //if productgroup 0 then just get first one that is available on signup and set that as the selected one\n //if productgroup 0 but product is set grap the productgroup so we don't need to pass both ids\n //lets get the productgroup if we were passed a product without the productgroup\n if( $ret_view['product'] > 0 && $ret_view['productgroup'] == 0 ){\n $tPackage = new Package($ret_view['product']);\n if ($tPackage->planname == \"\") {\n \tCE_Lib::addErrorMessage($this->user->lang(\"The selected product does not exist\"));\n \tCE_Lib::redirectPage(\"order.php?step=1\");\n }\n\n $ret_view['productgroup'] = $tPackage->planid;\n\n } else if ( $ret_view['product'] > 0) {\n \t$tPackage = new Package($ret_view['product']);\n \tif ($tPackage->planname == \"\") {\n \t\tCE_Lib::addErrorMessage($this->user->lang(\"The selected product does not exist\"));\n \tCE_Lib::redirectPage(\"order.php?step=1\");\n }\n }\n\n\t\t$ret_view['summary'] = $aogateway->getCartSummary();\n $packageType = new PackageType($ret_view['productgroup']);\n $ret_view['packageType'] = $packageType->getType();\n\n\t\treturn $ret_view;\n }", "function commerce_oz_views_default_views() {\n $views = array();\n$view = new view();\n$view->name = 'commweb_refund_transactions';\n$view->description = '';\n$view->tag = 'Commerce Oz';\n$view->base_table = 'commerce_payment_transaction';\n$view->human_name = 'Commerce Oz Refund Transactions';\n$view->core = 7;\n$view->api_version = '3.0';\n$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */\n\n/* Display: Master */\n$handler = $view->new_display('default', 'Master', 'default');\n$handler->display->display_options['title'] = 'CommWeb Refund Transactions';\n$handler->display->display_options['use_ajax'] = TRUE;\n$handler->display->display_options['use_more_always'] = FALSE;\n$handler->display->display_options['access']['type'] = 'perm';\n$handler->display->display_options['access']['perm'] = 'administer commerce_oz';\n$handler->display->display_options['cache']['type'] = 'none';\n$handler->display->display_options['query']['type'] = 'views_query';\n$handler->display->display_options['exposed_form']['type'] = 'better_exposed_filters';\n$handler->display->display_options['exposed_form']['options']['autosubmit'] = TRUE;\n$handler->display->display_options['exposed_form']['options']['bef'] = array(\n 'general' => array(\n 'allow_secondary' => 1,\n 'secondary_label' => 'Advanced options',\n ),\n 'order_id' => array(\n 'more_options' => array(\n 'is_secondary' => 1,\n 'bef_filter_description' => '',\n 'tokens' => array(\n 'available' => array(\n 0 => 'global_types',\n ),\n ),\n ),\n ),\n 'transaction_id' => array(\n 'more_options' => array(\n 'is_secondary' => 1,\n 'bef_filter_description' => '',\n 'tokens' => array(\n 'available' => array(\n 0 => 'global_types',\n ),\n ),\n ),\n ),\n 'remote_id' => array(\n 'more_options' => array(\n 'is_secondary' => 1,\n 'bef_filter_description' => '',\n 'tokens' => array(\n 'available' => array(\n 0 => 'global_types',\n ),\n ),\n ),\n ),\n);\n$handler->display->display_options['pager']['type'] = 'full';\n$handler->display->display_options['pager']['options']['items_per_page'] = '20';\n$handler->display->display_options['pager']['options']['offset'] = '0';\n$handler->display->display_options['pager']['options']['id'] = '0';\n$handler->display->display_options['pager']['options']['quantity'] = '9';\n$handler->display->display_options['pager']['options']['expose']['items_per_page'] = TRUE;\n$handler->display->display_options['pager']['options']['expose']['items_per_page_options_all'] = TRUE;\n$handler->display->display_options['style_plugin'] = 'table';\n$handler->display->display_options['style_options']['columns'] = array(\n 'views_bulk_operations' => 'views_bulk_operations',\n 'status' => 'status',\n 'transaction_id' => 'transaction_id',\n 'operations' => 'operations',\n 'amount' => 'amount',\n 'remote_id' => 'remote_id',\n 'remote_status' => 'remote_status',\n 'changed' => 'changed',\n 'message' => 'message',\n 'order_id' => 'order_id',\n 'payment_method' => 'payment_method',\n 'uid' => 'uid',\n 'name' => 'name',\n);\n$handler->display->display_options['style_options']['default'] = 'transaction_id';\n$handler->display->display_options['style_options']['info'] = array(\n 'views_bulk_operations' => array(\n 'align' => '',\n 'separator' => '',\n 'empty_column' => 0,\n ),\n 'status' => array(\n 'sortable' => 0,\n 'default_sort_order' => 'asc',\n 'align' => '',\n 'separator' => '',\n 'empty_column' => 0,\n ),\n 'transaction_id' => array(\n 'sortable' => 1,\n 'default_sort_order' => 'desc',\n 'align' => '',\n 'separator' => '',\n 'empty_column' => 0,\n ),\n 'operations' => array(\n 'align' => '',\n 'separator' => '',\n 'empty_column' => 0,\n ),\n 'amount' => array(\n 'sortable' => 0,\n 'default_sort_order' => 'asc',\n 'align' => '',\n 'separator' => '',\n 'empty_column' => 0,\n ),\n 'remote_id' => array(\n 'sortable' => 0,\n 'default_sort_order' => 'asc',\n 'align' => '',\n 'separator' => '',\n 'empty_column' => 0,\n ),\n 'remote_status' => array(\n 'sortable' => 0,\n 'default_sort_order' => 'asc',\n 'align' => '',\n 'separator' => '',\n 'empty_column' => 0,\n ),\n 'changed' => array(\n 'sortable' => 0,\n 'default_sort_order' => 'asc',\n 'align' => '',\n 'separator' => '',\n 'empty_column' => 0,\n ),\n 'message' => array(\n 'sortable' => 0,\n 'default_sort_order' => 'asc',\n 'align' => '',\n 'separator' => '',\n 'empty_column' => 0,\n ),\n 'order_id' => array(\n 'sortable' => 0,\n 'default_sort_order' => 'asc',\n 'align' => '',\n 'separator' => '',\n 'empty_column' => 0,\n ),\n 'payment_method' => array(\n 'sortable' => 0,\n 'default_sort_order' => 'asc',\n 'align' => '',\n 'separator' => '',\n 'empty_column' => 0,\n ),\n 'uid' => array(\n 'sortable' => 0,\n 'default_sort_order' => 'asc',\n 'align' => '',\n 'separator' => '',\n 'empty_column' => 0,\n ),\n 'name' => array(\n 'sortable' => 0,\n 'default_sort_order' => 'asc',\n 'align' => '',\n 'separator' => '',\n 'empty_column' => 0,\n ),\n);\n$handler->display->display_options['style_options']['override'] = FALSE;\n$handler->display->display_options['style_options']['sticky'] = TRUE;\n/* Header: Global: Unfiltered text */\n$handler->display->display_options['header']['area_text_custom']['id'] = 'area_text_custom';\n$handler->display->display_options['header']['area_text_custom']['table'] = 'views';\n$handler->display->display_options['header']['area_text_custom']['field'] = 'area_text_custom';\n$handler->display->display_options['header']['area_text_custom']['label'] = 'CommBank Logo';\n$handler->display->display_options['header']['area_text_custom']['empty'] = TRUE;\n$handler->display->display_options['header']['area_text_custom']['content'] = '<img src=/sites/all/modules/commerce_commweb/image/cba_logo.gif border=0 /><br />\n';\n/* Header: Global: Result summary */\n$handler->display->display_options['header']['result']['id'] = 'result';\n$handler->display->display_options['header']['result']['table'] = 'views';\n$handler->display->display_options['header']['result']['field'] = 'result';\n$handler->display->display_options['header']['result']['empty'] = TRUE;\n$handler->display->display_options['header']['result']['content'] = 'Displaying @start - @end of @total Refund Transactions';\n/* Relationship: Commerce Order: Owner */\n$handler->display->display_options['relationships']['uid']['id'] = 'uid';\n$handler->display->display_options['relationships']['uid']['table'] = 'commerce_order';\n$handler->display->display_options['relationships']['uid']['field'] = 'uid';\n$handler->display->display_options['relationships']['uid']['label'] = 'Owner';\n/* Field: Bulk operations: Commerce Payment Transaction */\n$handler->display->display_options['fields']['views_bulk_operations']['id'] = 'views_bulk_operations';\n$handler->display->display_options['fields']['views_bulk_operations']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['fields']['views_bulk_operations']['field'] = 'views_bulk_operations';\n$handler->display->display_options['fields']['views_bulk_operations']['vbo']['entity_load_capacity'] = '10';\n$handler->display->display_options['fields']['views_bulk_operations']['vbo']['operations'] = array(\n 'action::views_bulk_operations_delete_item' => array(\n 'selected' => 0,\n 'use_queue' => 0,\n 'skip_confirmation' => 0,\n 'override_label' => 0,\n 'label' => '',\n ),\n 'action::commerce_commweb_delete_order_transaction_action' => array(\n 'selected' => 0,\n 'use_queue' => 0,\n 'skip_confirmation' => 0,\n 'override_label' => 0,\n 'label' => '',\n ),\n 'action::system_message_action' => array(\n 'selected' => 0,\n 'use_queue' => 0,\n 'skip_confirmation' => 0,\n 'override_label' => 0,\n 'label' => '',\n ),\n 'action::views_bulk_operations_script_action' => array(\n 'selected' => 0,\n 'use_queue' => 0,\n 'skip_confirmation' => 0,\n 'override_label' => 0,\n 'label' => '',\n ),\n 'action::views_bulk_operations_modify_action' => array(\n 'selected' => 0,\n 'use_queue' => 0,\n 'skip_confirmation' => 0,\n 'override_label' => 0,\n 'label' => '',\n 'settings' => array(\n 'show_all_tokens' => 1,\n 'display_values' => array(\n '_all_' => '_all_',\n ),\n ),\n ),\n 'action::views_bulk_operations_argument_selector_action' => array(\n 'selected' => 0,\n 'skip_confirmation' => 0,\n 'override_label' => 0,\n 'label' => '',\n 'settings' => array(\n 'url' => '',\n ),\n ),\n 'action::twitter_actions_set_status_action' => array(\n 'selected' => 0,\n 'use_queue' => 0,\n 'skip_confirmation' => 0,\n 'override_label' => 0,\n 'label' => '',\n ),\n 'action::system_goto_action' => array(\n 'selected' => 0,\n 'use_queue' => 0,\n 'skip_confirmation' => 0,\n 'override_label' => 0,\n 'label' => '',\n ),\n 'action::commerce_oz_refund_transaction_action' => array(\n 'selected' => 1,\n 'use_queue' => 0,\n 'skip_confirmation' => 0,\n 'override_label' => 0,\n 'label' => '',\n ),\n 'action::system_send_email_action' => array(\n 'selected' => 0,\n 'use_queue' => 0,\n 'skip_confirmation' => 0,\n 'override_label' => 0,\n 'label' => '',\n ),\n);\n$handler->display->display_options['fields']['views_bulk_operations']['vbo']['enable_select_all_pages'] = 1;\n$handler->display->display_options['fields']['views_bulk_operations']['vbo']['display_type'] = '1';\n$handler->display->display_options['fields']['views_bulk_operations']['vbo']['display_result'] = 1;\n$handler->display->display_options['fields']['views_bulk_operations']['vbo']['merge_single_action'] = 1;\n$handler->display->display_options['fields']['views_bulk_operations']['vbo']['force_single'] = 0;\n/* Field: Commerce Payment Transaction: Status */\n$handler->display->display_options['fields']['status']['id'] = 'status';\n$handler->display->display_options['fields']['status']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['fields']['status']['field'] = 'status';\n/* Field: Commerce Payment Transaction: Transaction ID */\n$handler->display->display_options['fields']['transaction_id']['id'] = 'transaction_id';\n$handler->display->display_options['fields']['transaction_id']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['fields']['transaction_id']['field'] = 'transaction_id';\n$handler->display->display_options['fields']['transaction_id']['label'] = 'ID';\n$handler->display->display_options['fields']['transaction_id']['separator'] = '';\n/* Field: Commerce Payment Transaction: Operations links */\n$handler->display->display_options['fields']['operations']['id'] = 'operations';\n$handler->display->display_options['fields']['operations']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['fields']['operations']['field'] = 'operations';\n$handler->display->display_options['fields']['operations']['label'] = 'Action';\n/* Field: Commerce Payment Transaction: Amount */\n$handler->display->display_options['fields']['amount']['id'] = 'amount';\n$handler->display->display_options['fields']['amount']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['fields']['amount']['field'] = 'amount';\n/* Field: Commerce Payment Transaction: Remote ID */\n$handler->display->display_options['fields']['remote_id']['id'] = 'remote_id';\n$handler->display->display_options['fields']['remote_id']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['fields']['remote_id']['field'] = 'remote_id';\n/* Field: Commerce Payment Transaction: Remote status */\n$handler->display->display_options['fields']['remote_status']['id'] = 'remote_status';\n$handler->display->display_options['fields']['remote_status']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['fields']['remote_status']['field'] = 'remote_status';\n/* Field: Commerce Payment Transaction: Changed date */\n$handler->display->display_options['fields']['changed']['id'] = 'changed';\n$handler->display->display_options['fields']['changed']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['fields']['changed']['field'] = 'changed';\n$handler->display->display_options['fields']['changed']['label'] = 'Changed';\n$handler->display->display_options['fields']['changed']['date_format'] = 'short';\n/* Field: Commerce Payment Transaction: Message */\n$handler->display->display_options['fields']['message']['id'] = 'message';\n$handler->display->display_options['fields']['message']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['fields']['message']['field'] = 'message';\n/* Field: Commerce Payment Transaction: Order ID */\n$handler->display->display_options['fields']['order_id']['id'] = 'order_id';\n$handler->display->display_options['fields']['order_id']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['fields']['order_id']['field'] = 'order_id';\n$handler->display->display_options['fields']['order_id']['label'] = 'Order';\n$handler->display->display_options['fields']['order_id']['link_to_order'] = 'admin';\n/* Field: Commerce Payment Transaction: Payment method */\n$handler->display->display_options['fields']['payment_method']['id'] = 'payment_method';\n$handler->display->display_options['fields']['payment_method']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['fields']['payment_method']['field'] = 'payment_method';\n$handler->display->display_options['fields']['payment_method']['label'] = 'Method';\n$handler->display->display_options['fields']['payment_method']['exclude'] = TRUE;\n/* Field: Commerce Order: Uid */\n$handler->display->display_options['fields']['uid']['id'] = 'uid';\n$handler->display->display_options['fields']['uid']['table'] = 'commerce_order';\n$handler->display->display_options['fields']['uid']['field'] = 'uid';\n/* Field: User: Name */\n$handler->display->display_options['fields']['name']['id'] = 'name';\n$handler->display->display_options['fields']['name']['table'] = 'users';\n$handler->display->display_options['fields']['name']['field'] = 'name';\n$handler->display->display_options['fields']['name']['relationship'] = 'uid';\n/* Sort criterion: Commerce Payment Transaction: Transaction ID */\n$handler->display->display_options['sorts']['transaction_id']['id'] = 'transaction_id';\n$handler->display->display_options['sorts']['transaction_id']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['sorts']['transaction_id']['field'] = 'transaction_id';\n$handler->display->display_options['sorts']['transaction_id']['order'] = 'DESC';\n$handler->display->display_options['sorts']['transaction_id']['expose']['label'] = 'ID';\n/* Filter criterion: Commerce Payment Transaction: Payment method */\n$handler->display->display_options['filters']['payment_method']['id'] = 'payment_method';\n$handler->display->display_options['filters']['payment_method']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['filters']['payment_method']['field'] = 'payment_method';\n$handler->display->display_options['filters']['payment_method']['value'] = array(\n 'commerce_commweb' => 'commerce_commweb',\n);\n/* Filter criterion: Commerce Payment Transaction: Status */\n$handler->display->display_options['filters']['status']['id'] = 'status';\n$handler->display->display_options['filters']['status']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['filters']['status']['field'] = 'status';\n$handler->display->display_options['filters']['status']['value'] = array(\n 'success' => 'success',\n);\n$handler->display->display_options['filters']['status']['expose']['operator_id'] = 'status_op';\n$handler->display->display_options['filters']['status']['expose']['label'] = 'Status';\n$handler->display->display_options['filters']['status']['expose']['operator'] = 'status_op';\n$handler->display->display_options['filters']['status']['expose']['identifier'] = 'status';\n$handler->display->display_options['filters']['status']['expose']['remember'] = TRUE;\n$handler->display->display_options['filters']['status']['expose']['remember_roles'] = array(\n 2 => 0,\n 3 => '3',\n 1 => 0,\n);\n$handler->display->display_options['filters']['status']['expose']['reduce'] = TRUE;\n$handler->display->display_options['filters']['status']['group_info']['label'] = 'Status';\n$handler->display->display_options['filters']['status']['group_info']['identifier'] = 'status';\n$handler->display->display_options['filters']['status']['group_info']['optional'] = FALSE;\n$handler->display->display_options['filters']['status']['group_info']['widget'] = 'radios';\n$handler->display->display_options['filters']['status']['group_info']['group_items'] = array(\n 1 => array(\n 'title' => 'Success',\n 'operator' => 'in',\n 'value' => array(\n 'success' => 'success',\n 'all' => 0,\n 'pending' => 0,\n 'failure' => 0,\n ),\n ),\n 2 => array(\n 'title' => 'Failure',\n 'operator' => 'in',\n 'value' => array(\n 'failure' => 'failure',\n 'all' => 0,\n 'pending' => 0,\n 'success' => 0,\n ),\n ),\n);\n/* Filter criterion: Commerce Payment Transaction: Order ID */\n$handler->display->display_options['filters']['order_id']['id'] = 'order_id';\n$handler->display->display_options['filters']['order_id']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['filters']['order_id']['field'] = 'order_id';\n$handler->display->display_options['filters']['order_id']['exposed'] = TRUE;\n$handler->display->display_options['filters']['order_id']['expose']['operator_id'] = 'order_id_op';\n$handler->display->display_options['filters']['order_id']['expose']['label'] = 'Order ID';\n$handler->display->display_options['filters']['order_id']['expose']['operator'] = 'order_id_op';\n$handler->display->display_options['filters']['order_id']['expose']['identifier'] = 'order_id';\n$handler->display->display_options['filters']['order_id']['expose']['remember'] = TRUE;\n$handler->display->display_options['filters']['order_id']['expose']['remember_roles'] = array(\n 2 => 0,\n 3 => '3',\n 1 => 0,\n);\n/* Filter criterion: Commerce Payment Transaction: Transaction ID */\n$handler->display->display_options['filters']['transaction_id']['id'] = 'transaction_id';\n$handler->display->display_options['filters']['transaction_id']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['filters']['transaction_id']['field'] = 'transaction_id';\n$handler->display->display_options['filters']['transaction_id']['exposed'] = TRUE;\n$handler->display->display_options['filters']['transaction_id']['expose']['operator_id'] = 'transaction_id_op';\n$handler->display->display_options['filters']['transaction_id']['expose']['label'] = 'Transaction ID';\n$handler->display->display_options['filters']['transaction_id']['expose']['operator'] = 'transaction_id_op';\n$handler->display->display_options['filters']['transaction_id']['expose']['identifier'] = 'transaction_id';\n$handler->display->display_options['filters']['transaction_id']['expose']['remember_roles'] = array(\n 2 => '2',\n 1 => 0,\n 3 => 0,\n);\n/* Filter criterion: Commerce Payment Transaction: Remote ID */\n$handler->display->display_options['filters']['remote_id']['id'] = 'remote_id';\n$handler->display->display_options['filters']['remote_id']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['filters']['remote_id']['field'] = 'remote_id';\n$handler->display->display_options['filters']['remote_id']['exposed'] = TRUE;\n$handler->display->display_options['filters']['remote_id']['expose']['operator_id'] = 'remote_id_op';\n$handler->display->display_options['filters']['remote_id']['expose']['label'] = 'Remote ID';\n$handler->display->display_options['filters']['remote_id']['expose']['operator'] = 'remote_id_op';\n$handler->display->display_options['filters']['remote_id']['expose']['identifier'] = 'remote_id';\n$handler->display->display_options['filters']['remote_id']['expose']['remember_roles'] = array(\n 2 => '2',\n 1 => 0,\n 3 => 0,\n);\n/* Filter criterion: Commerce Payment Transaction: Message */\n$handler->display->display_options['filters']['message']['id'] = 'message';\n$handler->display->display_options['filters']['message']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['filters']['message']['field'] = 'message';\n$handler->display->display_options['filters']['message']['operator'] = 'not';\n$handler->display->display_options['filters']['message']['value'] = 'Refund';\n\n/* Display: Available Page */\n$handler = $view->new_display('page', 'Available Page', 'page');\n$handler->display->display_options['defaults']['hide_admin_links'] = FALSE;\n$handler->display->display_options['defaults']['header'] = FALSE;\n/* Header: Global: Unfiltered text */\n$handler->display->display_options['header']['area_text_custom']['id'] = 'area_text_custom';\n$handler->display->display_options['header']['area_text_custom']['table'] = 'views';\n$handler->display->display_options['header']['area_text_custom']['field'] = 'area_text_custom';\n$handler->display->display_options['header']['area_text_custom']['label'] = 'Commerce Oz Logo';\n$handler->display->display_options['header']['area_text_custom']['empty'] = TRUE;\n$handler->display->display_options['header']['area_text_custom']['content'] = '<img src=/sites/all/modules/commerce_oz/image/commerce_oz_70.png border=0 /><br />\n';\n/* Header: Global: Result summary */\n$handler->display->display_options['header']['result']['id'] = 'result';\n$handler->display->display_options['header']['result']['table'] = 'views';\n$handler->display->display_options['header']['result']['field'] = 'result';\n$handler->display->display_options['header']['result']['content'] = 'Displaying @start - @end of @total Transactions that can be Refunded';\n$handler->display->display_options['defaults']['fields'] = FALSE;\n/* Field: Bulk operations: Commerce Payment Transaction */\n$handler->display->display_options['fields']['views_bulk_operations']['id'] = 'views_bulk_operations';\n$handler->display->display_options['fields']['views_bulk_operations']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['fields']['views_bulk_operations']['field'] = 'views_bulk_operations';\n$handler->display->display_options['fields']['views_bulk_operations']['vbo']['entity_load_capacity'] = '10';\n$handler->display->display_options['fields']['views_bulk_operations']['vbo']['operations'] = array(\n 'action::views_bulk_operations_delete_item' => array(\n 'selected' => 0,\n 'use_queue' => 0,\n 'skip_confirmation' => 0,\n 'override_label' => 0,\n 'label' => '',\n ),\n 'action::commerce_commweb_delete_order_transaction_action' => array(\n 'selected' => 0,\n 'use_queue' => 0,\n 'skip_confirmation' => 0,\n 'override_label' => 0,\n 'label' => '',\n ),\n 'action::system_message_action' => array(\n 'selected' => 0,\n 'use_queue' => 0,\n 'skip_confirmation' => 0,\n 'override_label' => 0,\n 'label' => '',\n ),\n 'action::views_bulk_operations_script_action' => array(\n 'selected' => 0,\n 'use_queue' => 0,\n 'skip_confirmation' => 0,\n 'override_label' => 0,\n 'label' => '',\n ),\n 'action::views_bulk_operations_modify_action' => array(\n 'selected' => 0,\n 'use_queue' => 0,\n 'skip_confirmation' => 0,\n 'override_label' => 0,\n 'label' => '',\n 'settings' => array(\n 'show_all_tokens' => 1,\n 'display_values' => array(\n '_all_' => '_all_',\n ),\n ),\n ),\n 'action::views_bulk_operations_argument_selector_action' => array(\n 'selected' => 0,\n 'skip_confirmation' => 0,\n 'override_label' => 0,\n 'label' => '',\n 'settings' => array(\n 'url' => '',\n ),\n ),\n 'action::twitter_actions_set_status_action' => array(\n 'selected' => 0,\n 'use_queue' => 0,\n 'skip_confirmation' => 0,\n 'override_label' => 0,\n 'label' => '',\n ),\n 'action::system_goto_action' => array(\n 'selected' => 0,\n 'use_queue' => 0,\n 'skip_confirmation' => 0,\n 'override_label' => 0,\n 'label' => '',\n ),\n 'action::commerce_oz_refund_transaction_action' => array(\n 'selected' => 1,\n 'use_queue' => 0,\n 'skip_confirmation' => 0,\n 'override_label' => 0,\n 'label' => '',\n ),\n 'action::system_send_email_action' => array(\n 'selected' => 0,\n 'use_queue' => 0,\n 'skip_confirmation' => 0,\n 'override_label' => 0,\n 'label' => '',\n ),\n);\n$handler->display->display_options['fields']['views_bulk_operations']['vbo']['enable_select_all_pages'] = 1;\n$handler->display->display_options['fields']['views_bulk_operations']['vbo']['display_type'] = '1';\n$handler->display->display_options['fields']['views_bulk_operations']['vbo']['display_result'] = 1;\n$handler->display->display_options['fields']['views_bulk_operations']['vbo']['merge_single_action'] = 1;\n$handler->display->display_options['fields']['views_bulk_operations']['vbo']['force_single'] = 0;\n/* Field: Commerce Payment Transaction: Status */\n$handler->display->display_options['fields']['status']['id'] = 'status';\n$handler->display->display_options['fields']['status']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['fields']['status']['field'] = 'status';\n/* Field: Commerce Payment Transaction: Transaction ID */\n$handler->display->display_options['fields']['transaction_id']['id'] = 'transaction_id';\n$handler->display->display_options['fields']['transaction_id']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['fields']['transaction_id']['field'] = 'transaction_id';\n$handler->display->display_options['fields']['transaction_id']['label'] = 'ID';\n$handler->display->display_options['fields']['transaction_id']['separator'] = '';\n/* Field: Commerce Payment Transaction: Operations links */\n$handler->display->display_options['fields']['operations']['id'] = 'operations';\n$handler->display->display_options['fields']['operations']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['fields']['operations']['field'] = 'operations';\n$handler->display->display_options['fields']['operations']['label'] = 'Action';\n/* Field: Commerce Payment Transaction: Amount */\n$handler->display->display_options['fields']['amount']['id'] = 'amount';\n$handler->display->display_options['fields']['amount']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['fields']['amount']['field'] = 'amount';\n/* Field: Commerce Payment Transaction: Remote ID */\n$handler->display->display_options['fields']['remote_id']['id'] = 'remote_id';\n$handler->display->display_options['fields']['remote_id']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['fields']['remote_id']['field'] = 'remote_id';\n/* Field: Commerce Payment Transaction: Remote status */\n$handler->display->display_options['fields']['remote_status']['id'] = 'remote_status';\n$handler->display->display_options['fields']['remote_status']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['fields']['remote_status']['field'] = 'remote_status';\n/* Field: Commerce Payment Transaction: Changed date */\n$handler->display->display_options['fields']['changed']['id'] = 'changed';\n$handler->display->display_options['fields']['changed']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['fields']['changed']['field'] = 'changed';\n$handler->display->display_options['fields']['changed']['label'] = 'Changed';\n$handler->display->display_options['fields']['changed']['date_format'] = 'short';\n/* Field: Commerce Payment Transaction: Message */\n$handler->display->display_options['fields']['message']['id'] = 'message';\n$handler->display->display_options['fields']['message']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['fields']['message']['field'] = 'message';\n/* Field: Commerce Payment Transaction: Order ID */\n$handler->display->display_options['fields']['order_id']['id'] = 'order_id';\n$handler->display->display_options['fields']['order_id']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['fields']['order_id']['field'] = 'order_id';\n$handler->display->display_options['fields']['order_id']['label'] = 'Order';\n$handler->display->display_options['fields']['order_id']['link_to_order'] = 'admin';\n/* Field: Commerce Payment Transaction: Payment method */\n$handler->display->display_options['fields']['payment_method']['id'] = 'payment_method';\n$handler->display->display_options['fields']['payment_method']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['fields']['payment_method']['field'] = 'payment_method';\n$handler->display->display_options['fields']['payment_method']['label'] = 'Method';\n$handler->display->display_options['fields']['payment_method']['exclude'] = TRUE;\n/* Field: Commerce Order: Uid */\n$handler->display->display_options['fields']['uid']['id'] = 'uid';\n$handler->display->display_options['fields']['uid']['table'] = 'commerce_order';\n$handler->display->display_options['fields']['uid']['field'] = 'uid';\n/* Field: User: Name */\n$handler->display->display_options['fields']['name']['id'] = 'name';\n$handler->display->display_options['fields']['name']['table'] = 'users';\n$handler->display->display_options['fields']['name']['field'] = 'name';\n$handler->display->display_options['fields']['name']['relationship'] = 'uid';\n$handler->display->display_options['path'] = 'admin/commerce/orders/commweb-refund-transactions-view';\n$handler->display->display_options['menu']['title'] = 'Transactions';\n$handler->display->display_options['menu']['weight'] = '0';\n$handler->display->display_options['menu']['name'] = 'devel';\n$handler->display->display_options['menu']['context'] = 0;\n$handler->display->display_options['tab_options']['weight'] = '0';\n\n/* Display: Refunded Page */\n$handler = $view->new_display('page', 'Refunded Page', 'page_1');\n$handler->display->display_options['defaults']['title'] = FALSE;\n$handler->display->display_options['title'] = 'CommWeb Refunded Transactions';\n$handler->display->display_options['defaults']['hide_admin_links'] = FALSE;\n$handler->display->display_options['defaults']['fields'] = FALSE;\n/* Field: Bulk operations: Commerce Payment Transaction */\n$handler->display->display_options['fields']['views_bulk_operations']['id'] = 'views_bulk_operations';\n$handler->display->display_options['fields']['views_bulk_operations']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['fields']['views_bulk_operations']['field'] = 'views_bulk_operations';\n$handler->display->display_options['fields']['views_bulk_operations']['label'] = '';\n$handler->display->display_options['fields']['views_bulk_operations']['exclude'] = TRUE;\n$handler->display->display_options['fields']['views_bulk_operations']['element_label_colon'] = FALSE;\n$handler->display->display_options['fields']['views_bulk_operations']['vbo']['entity_load_capacity'] = '10';\n$handler->display->display_options['fields']['views_bulk_operations']['vbo']['operations'] = array(\n 'action::views_bulk_operations_delete_item' => array(\n 'selected' => 0,\n 'use_queue' => 0,\n 'skip_confirmation' => 0,\n 'override_label' => 0,\n 'label' => '',\n ),\n 'action::commerce_commweb_delete_order_transaction_action' => array(\n 'selected' => 0,\n 'use_queue' => 0,\n 'skip_confirmation' => 0,\n 'override_label' => 0,\n 'label' => '',\n ),\n 'action::system_message_action' => array(\n 'selected' => 0,\n 'use_queue' => 0,\n 'skip_confirmation' => 0,\n 'override_label' => 0,\n 'label' => '',\n ),\n 'action::views_bulk_operations_script_action' => array(\n 'selected' => 0,\n 'use_queue' => 0,\n 'skip_confirmation' => 0,\n 'override_label' => 0,\n 'label' => '',\n ),\n 'action::views_bulk_operations_modify_action' => array(\n 'selected' => 0,\n 'use_queue' => 0,\n 'skip_confirmation' => 0,\n 'override_label' => 0,\n 'label' => '',\n 'settings' => array(\n 'show_all_tokens' => 1,\n 'display_values' => array(\n '_all_' => '_all_',\n ),\n ),\n ),\n 'action::views_bulk_operations_argument_selector_action' => array(\n 'selected' => 0,\n 'skip_confirmation' => 0,\n 'override_label' => 0,\n 'label' => '',\n 'settings' => array(\n 'url' => '',\n ),\n ),\n 'action::twitter_actions_set_status_action' => array(\n 'selected' => 0,\n 'use_queue' => 0,\n 'skip_confirmation' => 0,\n 'override_label' => 0,\n 'label' => '',\n ),\n 'action::system_goto_action' => array(\n 'selected' => 0,\n 'use_queue' => 0,\n 'skip_confirmation' => 0,\n 'override_label' => 0,\n 'label' => '',\n ),\n 'action::commerce_commweb_refund_transaction_action' => array(\n 'selected' => 0,\n 'use_queue' => 0,\n 'skip_confirmation' => 0,\n 'override_label' => 0,\n 'label' => '',\n ),\n 'action::system_send_email_action' => array(\n 'selected' => 0,\n 'use_queue' => 0,\n 'skip_confirmation' => 0,\n 'override_label' => 0,\n 'label' => '',\n ),\n);\n$handler->display->display_options['fields']['views_bulk_operations']['vbo']['enable_select_all_pages'] = 1;\n$handler->display->display_options['fields']['views_bulk_operations']['vbo']['display_type'] = '1';\n$handler->display->display_options['fields']['views_bulk_operations']['vbo']['display_result'] = 1;\n$handler->display->display_options['fields']['views_bulk_operations']['vbo']['merge_single_action'] = 1;\n$handler->display->display_options['fields']['views_bulk_operations']['vbo']['force_single'] = 0;\n/* Field: Commerce Payment Transaction: Status */\n$handler->display->display_options['fields']['status']['id'] = 'status';\n$handler->display->display_options['fields']['status']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['fields']['status']['field'] = 'status';\n/* Field: Commerce Payment Transaction: Transaction ID */\n$handler->display->display_options['fields']['transaction_id']['id'] = 'transaction_id';\n$handler->display->display_options['fields']['transaction_id']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['fields']['transaction_id']['field'] = 'transaction_id';\n$handler->display->display_options['fields']['transaction_id']['label'] = 'ID';\n$handler->display->display_options['fields']['transaction_id']['separator'] = '';\n/* Field: Commerce Payment Transaction: Operations links */\n$handler->display->display_options['fields']['operations']['id'] = 'operations';\n$handler->display->display_options['fields']['operations']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['fields']['operations']['field'] = 'operations';\n$handler->display->display_options['fields']['operations']['label'] = 'Action';\n/* Field: Commerce Payment Transaction: Amount */\n$handler->display->display_options['fields']['amount']['id'] = 'amount';\n$handler->display->display_options['fields']['amount']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['fields']['amount']['field'] = 'amount';\n/* Field: Commerce Payment Transaction: Remote ID */\n$handler->display->display_options['fields']['remote_id']['id'] = 'remote_id';\n$handler->display->display_options['fields']['remote_id']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['fields']['remote_id']['field'] = 'remote_id';\n/* Field: Commerce Payment Transaction: Remote status */\n$handler->display->display_options['fields']['remote_status']['id'] = 'remote_status';\n$handler->display->display_options['fields']['remote_status']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['fields']['remote_status']['field'] = 'remote_status';\n/* Field: Commerce Payment Transaction: Changed date */\n$handler->display->display_options['fields']['changed']['id'] = 'changed';\n$handler->display->display_options['fields']['changed']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['fields']['changed']['field'] = 'changed';\n$handler->display->display_options['fields']['changed']['label'] = 'Changed';\n$handler->display->display_options['fields']['changed']['date_format'] = 'short';\n/* Field: Commerce Payment Transaction: Message */\n$handler->display->display_options['fields']['message']['id'] = 'message';\n$handler->display->display_options['fields']['message']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['fields']['message']['field'] = 'message';\n/* Field: Commerce Payment Transaction: Order ID */\n$handler->display->display_options['fields']['order_id']['id'] = 'order_id';\n$handler->display->display_options['fields']['order_id']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['fields']['order_id']['field'] = 'order_id';\n$handler->display->display_options['fields']['order_id']['label'] = 'Order';\n$handler->display->display_options['fields']['order_id']['link_to_order'] = 'admin';\n/* Field: Commerce Payment Transaction: Payment method */\n$handler->display->display_options['fields']['payment_method']['id'] = 'payment_method';\n$handler->display->display_options['fields']['payment_method']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['fields']['payment_method']['field'] = 'payment_method';\n$handler->display->display_options['fields']['payment_method']['label'] = 'Method';\n$handler->display->display_options['fields']['payment_method']['exclude'] = TRUE;\n/* Field: Commerce Order: Uid */\n$handler->display->display_options['fields']['uid']['id'] = 'uid';\n$handler->display->display_options['fields']['uid']['table'] = 'commerce_order';\n$handler->display->display_options['fields']['uid']['field'] = 'uid';\n/* Field: User: Name */\n$handler->display->display_options['fields']['name']['id'] = 'name';\n$handler->display->display_options['fields']['name']['table'] = 'users';\n$handler->display->display_options['fields']['name']['field'] = 'name';\n$handler->display->display_options['fields']['name']['relationship'] = 'uid';\n$handler->display->display_options['defaults']['filter_groups'] = FALSE;\n$handler->display->display_options['defaults']['filters'] = FALSE;\n/* Filter criterion: Commerce Payment Transaction: Payment method */\n$handler->display->display_options['filters']['payment_method']['id'] = 'payment_method';\n$handler->display->display_options['filters']['payment_method']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['filters']['payment_method']['field'] = 'payment_method';\n$handler->display->display_options['filters']['payment_method']['value'] = array(\n 'commerce_commweb' => 'commerce_commweb',\n);\n/* Filter criterion: Commerce Payment Transaction: Status */\n$handler->display->display_options['filters']['status']['id'] = 'status';\n$handler->display->display_options['filters']['status']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['filters']['status']['field'] = 'status';\n$handler->display->display_options['filters']['status']['value'] = array(\n 'success' => 'success',\n);\n$handler->display->display_options['filters']['status']['expose']['operator_id'] = 'status_op';\n$handler->display->display_options['filters']['status']['expose']['label'] = 'Status';\n$handler->display->display_options['filters']['status']['expose']['operator'] = 'status_op';\n$handler->display->display_options['filters']['status']['expose']['identifier'] = 'status';\n$handler->display->display_options['filters']['status']['expose']['remember'] = TRUE;\n$handler->display->display_options['filters']['status']['expose']['remember_roles'] = array(\n 2 => 0,\n 3 => '3',\n 1 => 0,\n);\n$handler->display->display_options['filters']['status']['expose']['reduce'] = TRUE;\n$handler->display->display_options['filters']['status']['group_info']['label'] = 'Status';\n$handler->display->display_options['filters']['status']['group_info']['identifier'] = 'status';\n$handler->display->display_options['filters']['status']['group_info']['optional'] = FALSE;\n$handler->display->display_options['filters']['status']['group_info']['widget'] = 'radios';\n$handler->display->display_options['filters']['status']['group_info']['group_items'] = array(\n 1 => array(\n 'title' => 'Success',\n 'operator' => 'in',\n 'value' => array(\n 'success' => 'success',\n 'all' => 0,\n 'pending' => 0,\n 'failure' => 0,\n ),\n ),\n 2 => array(\n 'title' => 'Failure',\n 'operator' => 'in',\n 'value' => array(\n 'failure' => 'failure',\n 'all' => 0,\n 'pending' => 0,\n 'success' => 0,\n ),\n ),\n);\n/* Filter criterion: Commerce Payment Transaction: Order ID */\n$handler->display->display_options['filters']['order_id']['id'] = 'order_id';\n$handler->display->display_options['filters']['order_id']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['filters']['order_id']['field'] = 'order_id';\n$handler->display->display_options['filters']['order_id']['exposed'] = TRUE;\n$handler->display->display_options['filters']['order_id']['expose']['operator_id'] = 'order_id_op';\n$handler->display->display_options['filters']['order_id']['expose']['label'] = 'Order ID';\n$handler->display->display_options['filters']['order_id']['expose']['operator'] = 'order_id_op';\n$handler->display->display_options['filters']['order_id']['expose']['identifier'] = 'order_id';\n$handler->display->display_options['filters']['order_id']['expose']['remember'] = TRUE;\n$handler->display->display_options['filters']['order_id']['expose']['remember_roles'] = array(\n 2 => 0,\n 3 => '3',\n 1 => 0,\n);\n/* Filter criterion: Commerce Payment Transaction: Transaction ID */\n$handler->display->display_options['filters']['transaction_id']['id'] = 'transaction_id';\n$handler->display->display_options['filters']['transaction_id']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['filters']['transaction_id']['field'] = 'transaction_id';\n$handler->display->display_options['filters']['transaction_id']['exposed'] = TRUE;\n$handler->display->display_options['filters']['transaction_id']['expose']['operator_id'] = 'transaction_id_op';\n$handler->display->display_options['filters']['transaction_id']['expose']['label'] = 'Transaction ID';\n$handler->display->display_options['filters']['transaction_id']['expose']['operator'] = 'transaction_id_op';\n$handler->display->display_options['filters']['transaction_id']['expose']['identifier'] = 'transaction_id';\n$handler->display->display_options['filters']['transaction_id']['expose']['remember_roles'] = array(\n 2 => '2',\n 1 => 0,\n 3 => 0,\n);\n/* Filter criterion: Commerce Payment Transaction: Remote ID */\n$handler->display->display_options['filters']['remote_id']['id'] = 'remote_id';\n$handler->display->display_options['filters']['remote_id']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['filters']['remote_id']['field'] = 'remote_id';\n$handler->display->display_options['filters']['remote_id']['exposed'] = TRUE;\n$handler->display->display_options['filters']['remote_id']['expose']['operator_id'] = 'remote_id_op';\n$handler->display->display_options['filters']['remote_id']['expose']['label'] = 'Remote ID';\n$handler->display->display_options['filters']['remote_id']['expose']['operator'] = 'remote_id_op';\n$handler->display->display_options['filters']['remote_id']['expose']['identifier'] = 'remote_id';\n$handler->display->display_options['filters']['remote_id']['expose']['remember_roles'] = array(\n 2 => '2',\n 1 => 0,\n 3 => 0,\n);\n/* Filter criterion: Commerce Payment Transaction: Message */\n$handler->display->display_options['filters']['message']['id'] = 'message';\n$handler->display->display_options['filters']['message']['table'] = 'commerce_payment_transaction';\n$handler->display->display_options['filters']['message']['field'] = 'message';\n$handler->display->display_options['filters']['message']['operator'] = 'starts';\n$handler->display->display_options['filters']['message']['value'] = 'Refund';\n$handler->display->display_options['path'] = 'admin/commerce/orders/commweb-refund-transactions-view/refunded';\n$handler->display->display_options['menu']['title'] = 'Refunded';\n$handler->display->display_options['menu']['weight'] = '0';\n$handler->display->display_options['menu']['context'] = 0;\n\n $views[$view->name] = $view;\n\n return $views;\n}", "public function order_preview_template()\n {\n }", "public function render()\n {\n return view('adminhub::livewire.components.settings.taxes.tax-zones.create')\n ->layout('adminhub::layouts.base');\n }", "function urlaubsantrag_admin_main() \r\n{\r\n return urlaubsantrag_admin_view ();\r\n}", "private function Backbone(){\n\t\t\n\t \tif(isset($this->_opts) && key_exists(\"bb\",$this->_opts)){\n\t \t\t// var_dump($this->_opts[\"bb\"][\"view\"]);\n\t\t\t\n\t\t\tforeach ($this->_opts[\"bb\"][\"view\"] as $key => $value) {\n\t\t\t\tif(is_array($value)){\n\t\t\t\t\t$widgets[] = array(\"name\" => $key, \"file\" => $key);\n\t\t\t\t}else{\n\t\t\t\t\t$widgets[] = array(\"name\" => $value, \"file\" => $key);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$base = JS;\n\t\t$widgets = json_encode($widgets);\n\t\tif($this->view != \"web\"){$path=\"../\";}else{$path=\"\";}\n\t\t\n\t\t// <script src=\\\"\".$path.\"js/require.js\\\"></script>\n\t\t// <script>\n\t\t// define('global', {\n\t\t\t// widgets: $widgets,\n\t\t\t// baseUrl: '$base',\n\t\t\t// init: function(){\n\t\t\t// }\n\t\t// });\n\t\t// require.config({\n\t\t\t// paths: {\t\t\n\t\t \t// react: 'vendor/react',\n \t \t// JSXTransformer: 'vendor/jsx-traformer'\n\t\t\t// },\n\t\t\t// baseUrl: '$base',\n\t\t // urlArgs: 'v=' + (new Date()).getTime()\n\t\t// });\n\t\t// var config = require(['common']);\n\t\t// require(config, ['main']);\n\t\t// </script> \n\t\t\n\t\t$html = \"\n\t\t<script data-main=\\\"\".$path.\"js/main\\\" src=\\\"\".$path.\"js/require.js\\\"></script>\n\t\t<script>\n\t\tdefine('global', {\n\t\t\twidgets: $widgets,\n\t\t\tbaseUrl: '$base',\n\t\t urlArgs: 'v=' + (new Date()).getTime(),\n\t\t\tinit: function(){\n\t\t\t}\n\t\t});\n\t\t</script>\n\t\t\";\n\t\treturn $html;\n\t\t\n\t }", "private function viewBuilderAdmin($item) {\n $entity = $item->getEntity();\n $js_settings = $this->jsSettings($entity, VrView::displayTypeAdmin);\n $widget = array();\n $widget['vr_view_widget'] = array(\n '#type' => 'container',\n '#attributes' => [\n 'class' => [ 'vr-view-widget', ],\n ],\n 'vr_view_title' => array(\n '#markup' => '<h2 class=\"vrview-title\" id=\"vrview-title\"></h2>',\n ),\n 'vr_view_image' => array(\n '#markup' => '<div id=\"vrview_wrapper\"><div id=\"vrview_y\"></div><div id=\"vrview_x\"></div><div id=\"vrview\"></div></div>',\n ),\n 'vr_view_description' => array(\n '#markup' => '<p class=\"vrview-description\" id=\"vrview-description\"></p>',\n ),\n 'vr_view_image_position' => array(\n '#markup' => '<div class=\"vrview-position position\">\n <div class=\"position-title\">Yaw: <span class=\"position-yaw value\" id=\"yaw-value\">0</span></div> \n <div class=\"position-title\">Pitch: <span class=\"position-pitch value\" id=\"pitch-value\">0</span></div>\n </div>',\n ),\n 'vr_view_default_yaw' => array(\n '#markup' => '<div class=\"vrview-default-yaw default-yaw\">\n <div class=\"default-yaw-title\">Default yaw: <span class=\"default-yaw-value\" id=\"default-yaw-value\">0</span></div>\n </div>',\n ),\n 'vr_view_admin_actions' => array (\n '#type' => 'fieldset',\n '#title' => 'admin actions',\n '#description' =>\n '<div id=\"admin-actions-links-placeholder\" class=\"region region-secondary-menu\">'\n .Link::fromTextAndUrl(t('Add new Vr view using current pitch and yaw'), Url::fromUri(\"internal:/vr_view/add/{$entity->id->value}/0/0\", [ 'attributes' => ['id' => 'dynamic-button-add-new', 'class' => ['button-action', 'btn', 'button', 'dynamic-args'] ]]))->toString()\n .Link::fromTextAndUrl(t('Add existing Vr view using current pitch and yaw'), Url::fromUri(\"internal:/vr_hotspot/add/{$entity->id->value}/0/0\", [ 'attributes' => ['id' => 'dynamic-button-add-existing', 'class' => ['button-action', 'btn', 'button', 'dynamic-args'] ]]))->toString()\n .'</div>'\n .'<div id=\"hotspots-link-placeholder\">'.$this->hotspotsLinks($entity).'</div>'\n //.t('Add new or edit existing hotspots, using current pitch and yaw.').'<br />'\n .'<div id=\"default-yaw-link-placeholder\">'\n .Link::fromTextAndUrl(t('Make current yaw to be default'), Url::fromUri(\"internal:/vr_view/default_yaw/{$entity->id->value}/0\", [ 'attributes' => ['id' => 'dynamic-button-default-yaw', 'class' => ['button-action', 'btn', 'button', 'dynamic-args'] ]]))->toString()\n .'</div>',\n ),\n 'yaw-value-submit' => array(\n '#type' => 'hidden',\n '#default_value' => 0,\n '#name' => 'yaw-value-submit',\n ),\n 'pitch-value-submit' => array(\n '#type' => 'hidden',\n '#default_value' => 0,\n '#name' => 'pitch-value-submit',\n ),\n '#attached' => array(\n 'library' => array( 'vr_view/vr_library', 'core/drupal.dialog.ajax' ),\n 'drupalSettings' => array( 'vr_view' => $js_settings ),\n ),\n '#allowed_tags' => array('div', 'span', 'input', 'a'),\n );\n return $widget;\n }", "public static function add_manager_info_tmpl() {\n\t\t?>\n\t\t<script type=\"text/template\" id=\"tmpl-aura-modal-content-manager-info\">\n\t\t\t<div class=\"aura-manager-info\">\n\t\t\t\t<p class=\"aura-manager-info__sub-title\">Tours can be scheduled just about any day</p>\n\t\t\t\t<p class=\"aura-manager-info__description\">Call and speak to our manager</p>\n\n\t\t\t\t<# if (data.image_url) { #>\n\t\t\t\t\t<div class=\"aura-manager-info__image\">\n\t\t\t\t\t\t<img src=\"{{data.image_url}}\" alt=\"{{data.name}}\">\n\t\t\t\t\t</div><!-- .aura-manager-info__image -->\n\t\t\t\t<# } #>\n\n\t\t\t\t<# if (data.name) { #>\n\t\t\t\t\t<div class=\"aura-manager-info__name\">{{data.name}}</div>\n\t\t\t\t<# } #>\n\n\t\t\t\t<# if (data.property_title && data.property_location) { #>\n\t\t\t\t\t<div class=\"aura-manager-info__designation\">Manager,</div>\n\t\t\t\t\t<div class=\"aura-manager-info__address\">{{data.property_title}} <span class=\"aura-manager-info__location\">{{data.property_location}}</span></div>\n\t\t\t\t<# } #>\n\n\t\t\t\t<# if(data.phone_number) { #>\n\t\t\t\t\t<a class=\"aura-manager-info__phone-number\" href=\"tel:{{data.phone_number}}\">{{data.phone_number}}</a>\n\t\t\t\t<# } #>\n\t\t\t</div><!-- .aura-manager-info -->\n\t\t</script>\n\t\t<?php\n\t}", "function npv_views_data() {\r\n // table's fields, sort criteria, etc. so it's easy to tell where they came\r\n // from.\r\n $data['npv_vereine']['table']['group'] = t('NPV Vereine');\r\n\r\n // Define this as a base table.\r\n $data['npv_vereine']['table']['base'] = array(\r\n 'field' => 'idvereine',\r\n 'title' => t('NPV - Vereine'),\r\n 'help' => t(\"Alle Vereine des NPV.\"),\r\n 'weight' => -10,\r\n );\r\n\r\n // Next, describe each of the individual fields in this table to Views. For\r\n // each field, you may define what field, sort, argument, and/or filter\r\n // handlers it supports. This will determine where in the Views interface you\r\n // may use the field.\r\n\r\n // idvereine.\r\n $data['npv_vereine']['idvereine'] = array(\r\n 'title' => t('Interne ID des Vereins'),\r\n 'help' => t('Interne ID des Vereins'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field_numeric',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_numeric',\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n 'argument' => array(\r\n 'handler' => 'views_handler_argument_string',\r\n ),\r\n );\r\n\r\n // name.\r\n $data['npv_vereine']['name'] = array(\r\n 'title' => t('Name'),\r\n 'help' => t('Der Name des Vereins.'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_string',\r\n ),\r\n 'argument' => array(\r\n 'handler' => 'views_handler_argument_string',\r\n ),\r\n );\r\n\r\n // ort.\r\n $data['npv_vereine']['ort'] = array(\r\n 'title' => t('Ort'),\r\n 'help' => t('Der Ort des Vereins.'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_string',\r\n ),\r\n 'argument' => array(\r\n 'handler' => 'views_handler_argument_string',\r\n ),\r\n );\r\n\r\n // lizenznr.\r\n $data['npv_vereine']['lizenznr'] = array(\r\n 'title' => t('Lizenz-Nummer'),\r\n 'help' => t('Die Lizenz-Nummer des Vereins.'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_string',\r\n ),\r\n 'argument' => array(\r\n 'handler' => 'views_handler_argument_string',\r\n ),\r\n );\r\n\r\n // website.\r\n $data['npv_vereine']['website'] = array(\r\n 'title' => t('Website'),\r\n 'help' => t('Die Website des Vereins.'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_string',\r\n ),\r\n 'argument' => array(\r\n 'handler' => 'views_handler_argument_string',\r\n ),\r\n );\r\n\r\n // anschrift.\r\n $data['npv_vereine']['anschrift'] = array(\r\n 'title' => t('Anschrift'),\r\n 'help' => t('Die Anschrift des Vereins.'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_string',\r\n ),\r\n 'argument' => array(\r\n 'handler' => 'views_handler_argument_string',\r\n ),\r\n );\r\n\r\n // telefon.\r\n $data['npv_vereine']['telefon'] = array(\r\n 'title' => t('Telefon'),\r\n 'help' => t('Die Telefon-Nummer des Vereins.'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_string',\r\n ),\r\n 'argument' => array(\r\n 'handler' => 'views_handler_argument_string',\r\n ),\r\n );\r\n\r\n\r\n // boulodrome.\r\n $data['npv_vereine']['boulodrome'] = array(\r\n 'title' => t('Boulodrôme'),\r\n 'help' => t('Das Boulodrôme des Vereins.'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_string',\r\n ),\r\n 'argument' => array(\r\n 'handler' => 'views_handler_argument_string',\r\n ),\r\n );\r\n //Länge\r\n $data['npv_vereine']['latitude'] = array(\r\n 'title' => t('Latitude'),\r\n 'help' => t('Latitude.'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field_numeric',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_numeric',\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n );\r\n //Breite\r\n $data['npv_vereine']['longitude'] = array(\r\n 'title' => t('Longitude'),\r\n 'help' => t('Longitude.'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field_numeric',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_numeric',\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n );\r\n $data['npv_vereine']['table']['group'] = t('NPV Vereine');\r\n\r\n // Define this as a base table.\r\n $data['npv_vereine']['table']['base'] = array(\r\n 'field' => 'idvereine',\r\n 'title' => t('NPV - Vereine'),\r\n 'help' => t(\"Alle Vereine des NPV.\"),\r\n 'weight' => -10,\r\n );\r\n\r\n // Next, describe each of the individual fields in this table to Views. For\r\n // each field, you may define what field, sort, argument, and/or filter\r\n // handlers it supports. This will determine where in the Views interface you\r\n // may use the field.\r\n\r\n // idvereine.\r\n $data['npv_vereine']['idvereine'] = array(\r\n 'title' => t('Interne ID des Vereins'),\r\n 'help' => t('Interne ID des Vereins'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field_numeric',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_numeric',\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n 'argument' => array(\r\n 'handler' => 'views_handler_argument_string',\r\n ),\r\n );\r\n\r\n // name.\r\n $data['npv_vereine']['name'] = array(\r\n 'title' => t('Name'),\r\n 'help' => t('Der Name des Vereins.'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_string',\r\n ),\r\n 'argument' => array(\r\n 'handler' => 'views_handler_argument_string',\r\n ),\r\n );\r\n\r\n // ort.\r\n $data['npv_vereine']['ort'] = array(\r\n 'title' => t('Ort'),\r\n 'help' => t('Der Ort des Vereins.'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_string',\r\n ),\r\n 'argument' => array(\r\n 'handler' => 'views_handler_argument_string',\r\n ),\r\n );\r\n\r\n // lizenznr.\r\n $data['npv_vereine']['lizenznr'] = array(\r\n 'title' => t('Lizenz-Nummer'),\r\n 'help' => t('Die Lizenz-Nummer des Vereins.'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_string',\r\n ),\r\n 'argument' => array(\r\n 'handler' => 'views_handler_argument_string',\r\n ),\r\n );\r\n\r\n // website.\r\n $data['npv_vereine']['website'] = array(\r\n 'title' => t('Website'),\r\n 'help' => t('Die Website des Vereins.'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_string',\r\n ),\r\n 'argument' => array(\r\n 'handler' => 'views_handler_argument_string',\r\n ),\r\n );\r\n\r\n // anschrift.\r\n $data['npv_vereine']['anschrift'] = array(\r\n 'title' => t('Anschrift'),\r\n 'help' => t('Die Anschrift des Vereins.'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_string',\r\n ),\r\n 'argument' => array(\r\n 'handler' => 'views_handler_argument_string',\r\n ),\r\n );\r\n\r\n // telefon.\r\n $data['npv_vereine']['telefon'] = array(\r\n 'title' => t('Telefon'),\r\n 'help' => t('Die Telefon-Nummer des Vereins.'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_string',\r\n ),\r\n 'argument' => array(\r\n 'handler' => 'views_handler_argument_string',\r\n ),\r\n );\r\n\r\n\r\n // boulodrome.\r\n $data['npv_vereine']['boulodrome'] = array(\r\n 'title' => t('Boulodrôme'),\r\n 'help' => t('Das Boulodrôme des Vereins.'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_string',\r\n ),\r\n 'argument' => array(\r\n 'handler' => 'views_handler_argument_string',\r\n ),\r\n );\r\n //Länge\r\n $data['npv_vereine']['latitude'] = array(\r\n 'title' => t('Latitude'),\r\n 'help' => t('Latitude.'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field_numeric',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_numeric',\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n );\r\n //gelöscht\r\n $data['npv_vereine']['del_yn'] = array(\r\n 'title' => t('gelöscht'),\r\n 'help' => t('gelöscht.'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field_numeric',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_numeric',\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n );\r\n \r\n $data['npv_vereine']['table']['join'] = array(\r\n // Index this array by the table name to which this table refers.\r\n // 'left_field' is the primary key in the referenced table.\r\n // 'field' is the foreign key in this table.\r\n 'npv_vereine_hist' => array(\r\n 'left_field' => 'idvereine',\r\n 'field' => 'idvereine',\r\n ),\r\n );\r\n // Example plain text field.\r\n /*\r\n $data['npv_vereine']['plain_text_field'] = array(\r\n 'title' => t('Plain text field'),\r\n 'help' => t('Just a plain text field.'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_string',\r\n ),\r\n 'argument' => array(\r\n 'handler' => 'views_handler_argument_string',\r\n ),\r\n );\r\n */\r\n\r\n // Example numeric text field.\r\n /*\r\n $data['example_table']['numeric_field'] = array(\r\n 'title' => t('Numeric field'),\r\n 'help' => t('Just a numeric field.'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field_numeric',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_numeric',\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n );\r\n */\r\n\r\n // Example boolean field.\r\n /*\r\n $data['example_table']['boolean_field'] = array(\r\n 'title' => t('Boolean field'),\r\n 'help' => t('Just an on/off field.'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field_boolean',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_boolean_operator',\r\n 'label' => t('Published'),\r\n 'type' => 'yes-no',\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n );\r\n */\r\n\r\n // Example timestamp field.\r\n /*\r\n $data['example_table']['timestamp_field'] = array(\r\n 'title' => t('Timestamp field'),\r\n 'help' => t('Just a timestamp field.'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field_date',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort_date',\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_date',\r\n ),\r\n );\r\n */\r\n\r\n /* Definition für Historientabelle der Vereine */\r\n $data['npv_vereine_hist']['table']['group'] = t('NPV Vereinshistorie');\r\n\r\n // Define this as a base table.\r\n $data['npv_vereine_hist']['table']['base'] = array(\r\n 'field' => 'idvereine',\r\n 'title' => t('Historie der NPV - Vereine'),\r\n 'help' => t(\"Historie der Vereine des NPV.\"),\r\n 'weight' => -10,\r\n );\r\n\r\n // Next, describe each of the individual fields in this table to Views. For\r\n // each field, you may define what field, sort, argument, and/or filter\r\n // handlers it supports. This will determine where in the Views interface you\r\n // may use the field.\r\n\r\n // idvereine.\r\n $data['npv_vereine_hist']['hid'] = array(\r\n 'title' => t('ID Nummer des Historieneintrags'),\r\n 'help' => t('ID Nummer des Historieneintrags'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field_numeric',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_numeric',\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n 'argument' => array(\r\n 'handler' => 'views_handler_argument_string',\r\n ),\r\n );\r\n \r\n // idvereine.\r\n $data['npv_vereine_hist']['idvereine'] = array(\r\n 'title' => t('Interne ID des Vereins'),\r\n 'help' => t('Interne ID des Vereins'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field_numeric',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_numeric',\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n 'argument' => array(\r\n 'handler' => 'views_handler_argument_string',\r\n ),\r\n );\r\n\r\n // name.\r\n $data['npv_vereine_hist']['name'] = array(\r\n 'title' => t('Name'),\r\n 'help' => t('Der Name des Vereins.'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_string',\r\n ),\r\n 'argument' => array(\r\n 'handler' => 'views_handler_argument_string',\r\n ),\r\n );\r\n\r\n // ort.\r\n $data['npv_vereine_hist']['ort'] = array(\r\n 'title' => t('Ort'),\r\n 'help' => t('Der Ort des Vereins.'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_string',\r\n ),\r\n 'argument' => array(\r\n 'handler' => 'views_handler_argument_string',\r\n ),\r\n );\r\n\r\n // lizenznr.\r\n $data['npv_vereine_hist']['lizenznr'] = array(\r\n 'title' => t('Lizenz-Nummer'),\r\n 'help' => t('Die Lizenz-Nummer des Vereins.'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_string',\r\n ),\r\n 'argument' => array(\r\n 'handler' => 'views_handler_argument_string',\r\n ),\r\n );\r\n\r\n // website.\r\n $data['npv_vereine_hist']['website'] = array(\r\n 'title' => t('Website'),\r\n 'help' => t('Die Website des Vereins.'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_string',\r\n ),\r\n 'argument' => array(\r\n 'handler' => 'views_handler_argument_string',\r\n ),\r\n );\r\n\r\n // anschrift.\r\n $data['npv_vereine_hist']['anschrift'] = array(\r\n 'title' => t('Anschrift'),\r\n 'help' => t('Die Anschrift des Vereins.'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_string',\r\n ),\r\n 'argument' => array(\r\n 'handler' => 'views_handler_argument_string',\r\n ),\r\n );\r\n\r\n // telefon.\r\n $data['npv_vereine_hist']['telefon'] = array(\r\n 'title' => t('Telefon'),\r\n 'help' => t('Die Telefon-Nummer des Vereins.'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_string',\r\n ),\r\n 'argument' => array(\r\n 'handler' => 'views_handler_argument_string',\r\n ),\r\n );\r\n\r\n\r\n // boulodrome.\r\n $data['npv_vereine_hist']['boulodrome'] = array(\r\n 'title' => t('Boulodrôme'),\r\n 'help' => t('Das Boulodrôme des Vereins.'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_string',\r\n ),\r\n 'argument' => array(\r\n 'handler' => 'views_handler_argument_string',\r\n ),\r\n );\r\n //Länge\r\n $data['npv_vereine_hist']['latitude'] = array(\r\n 'title' => t('Latitude'),\r\n 'help' => t('Latitude.'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field_numeric',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_numeric',\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n );\r\n //Breite\r\n $data['npv_vereine_hist']['longitude'] = array(\r\n 'title' => t('Longitude'),\r\n 'help' => t('Longitude.'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field_numeric',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_numeric',\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n );\r\n //gelöscht\r\n $data['npv_vereine_hist']['del_yn'] = array(\r\n 'title' => t('gelöscht'),\r\n 'help' => t('gelöscht.'),\r\n 'field' => array(\r\n 'handler' => 'views_handler_field_numeric',\r\n 'click sortable' => TRUE,\r\n ),\r\n 'filter' => array(\r\n 'handler' => 'views_handler_filter_numeric',\r\n ),\r\n 'sort' => array(\r\n 'handler' => 'views_handler_sort',\r\n ),\r\n );\r\n \r\n return $data;\r\n }", "function it_exchange_easy_eu_value_added_taxes_after_payment_details_vat_details( $transaction ) {\n $tax_items = get_post_meta( $transaction->ID, '_it_exchange_easy_eu_value_added_taxes', true );\n $vat_moss_tax_items = get_post_meta( $transaction->ID, '_it_exchange_easy_eu_value_added_vat_moss_taxes', true );\n $customer_country = get_post_meta( $transaction->ID, '_it_exchange_easy_eu_value_added_taxes_customer_vat_country', true );\n $customer_vat = get_post_meta( $transaction->ID, '_it_exchange_easy_eu_value_added_taxes_customer_vat_number', true );\n\t$memberstates = it_exchange_get_data_set( 'eu-member-states' );\n\t$result = '';\n\n\tif ( !empty( $tax_items ) ) {\n\t\t$result .= '<h3>VAT Summary</h3>';\n\t\tif ( !empty( $customer_vat ) )\n\t\t\t$result .= '<p>' . sprintf( __( 'Customer VAT Number: %s-%s', 'LION' ), $customer_country, $customer_vat ) . '</p>';\n\n\t\t$result .= '<div class=\"it-exchange-vat-summary-table\">';\n\t\t$result .= '<div class=\"it-exchange-vat-summary-table-row vat-summary-heading-row\">';\n\n\t\t$result .= '<div class=\"vat-label-heading it-exchange-vat-summary-table-column\">';\n\t\t$result .= '<div class=\"it-exchange-vat-summary-table-column-inner\">' . __( 'VAT Type', 'LION' ) . '</div>';\n\t\t$result .= '</div>';\n\n\t\t$result .= '<div class=\"vat-label-heading it-exchange-vat-summary-table-column\">';\n\t\t$result .= '<div class=\"it-exchange-vat-summary-table-column-inner\">' . __( 'Net Taxable Amount', 'LION' ) . '</div>';\n\t\t$result .= '</div>';\n\n\t\t$result .= '<div class=\"vat-label-heading it-exchange-vat-summary-table-column\">';\n\t\t$result .= '<div class=\"it-exchange-vat-summary-table-column-inner\">' . __( 'VAT', 'LION' ) . '</div>';\n\t\t$result .= '</div>';\n\n\t\t$result .= '</div>';\n\n\t\tif ( !empty( $tax_items ) ) {\n\t\t\tforeach( $tax_items as $tax ) {\n\t\t\t\t$net = empty( $tax['taxable_amount'] ) ? 0 : $tax['taxable_amount'];\n\t\t\t\t$taxed = empty( $tax['total'] ) ? 0 : $tax['total'];\n\n\t\t\t\tif ( empty( $taxed ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$result .= '<div class=\"it-exchange-vat-summary-table-row\">';\n\n\t\t\t\t$result .= '<div class=\"vat-label it-exchange-vat-summary-table-column\">';\n\t\t\t\t$result .= '<div class=\"it-exchange-vat-summary-table-column-inner\">';\n\t\t\t\t$result .= sprintf( __( '%s %s (%s%%)', 'LION' ), $memberstates[$tax['country']], $tax['tax-rate']['label'], $tax['tax-rate']['rate'] );\n\t\t\t\t$result .= '</div>';\n\t\t\t\t$result .= '</div>';\n\n\t\t\t\t$result .= '<div class=\"vat-net-taxable-amount it-exchange-vat-summary-table-column\">';\n\t\t\t\t$result .= '<div class=\"it-exchange-vat-summary-table-column-inner\">';\n\t\t\t\t$result .= it_exchange_format_price( $net );;\n\t\t\t\t$result .= '</div>';\n\t\t\t\t$result .= '</div>';\n\n\t\t\t\t$result .= '<div class=\"vat-amount-taxed it-exchange-vat-summary-table-column\">';\n\t\t\t\t$result .= '<div class=\"it-exchange-vat-summary-table-column-inner\">';\n\t\t\t\t$result .= it_exchange_format_price( $taxed );\n\t\t\t\t$result .= '</div>';\n\t\t\t\t$result .= '</div>';\n\n\t\t\t\t$result .= '</div>';\n\t\t\t}\n\t\t}\n\n\t\tif ( !empty( $vat_moss_tax_items ) ) {\n\t\t\tforeach ( $vat_moss_tax_items as $tax ) {\n\t\t\t\t$net = empty( $tax['taxable_amount'] ) ? 0 : $tax['taxable_amount'];\n\t\t\t\t$taxed = empty( $tax['total'] ) ? 0 : $tax['total'];\n\n\t\t\t\tif ( empty( $taxed ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$result .= '<div class=\"it-exchange-vat-summary-table-row\">';\n\n\t\t\t\t$result .= '<div class=\"vat-moss-label it-exchange-vat-summary-table-column\">';\n\t\t\t\t$result .= '<div class=\"it-exchange-vat-summary-table-column-inner\">';\n\t\t\t\t$result .= sprintf( __( '%s %s (%s%%)', 'LION' ), $memberstates[$tax['country']], $tax['tax-rate']['label'], $tax['tax-rate']['rate'] );\n\t\t\t\t$result .= '</div>';\n\t\t\t\t$result .= '</div>';\n\n\t\t\t\t$result .= '<div class=\"vat-moss-net-taxable-amount it-exchange-vat-summary-table-column\">';\n\t\t\t\t$result .= '<div class=\"it-exchange-vat-summary-table-column-inner\">';\n\t\t\t\t$result .= it_exchange_format_price( $net );\n\t\t\t\t$result .= '</div>';\n\t\t\t\t$result .= '</div>';\n\n\t\t\t\t$result .= '<div class=\"vat-moss-amount-taxed it-exchange-vat-summary-table-column\">';\n\t\t\t\t$result .= '<div class=\"it-exchange-vat-summary-table-column-inner\">';\n\t\t\t\t$result .= it_exchange_format_price( $taxed );\n\t\t\t\t$result .= '</div>';\n\t\t\t\t$result .= '</div>';\n\n\t\t\t\t$result .= '</div>';\n\t\t\t}\n\t\t}\n\n\t\t$result .= '</div>';\n\n\t\t?>\n\t\t<div class=\"clearfix spacing-wrapper\">\n\t\t\t<div class=\"transaction-vat-taxes left\">\n\t\t\t\t<?php echo $result; ?>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}\n}", "protected function _construct()\n {\n parent::_construct();\n // app/design/frontend/base/default/template/...\n $this->setTemplate('fris/pay/form/braintreevzero.phtml');\n }", "function render() \n {\t\t\t\t\t\t \n\t\t\t$model = new CalculatorModelsOrder();\n\t\t\t\n\t\t\t$model->Calculate(1);\n\t\t\tif($model->IsInnerPriceViewer()){\n\t\t\t\t$model->Calculate(0);\n\t\t\t}\n\t\t\t\n\t\t\t$model->MakeOrder();\n\t\t\t\n\t\t\t$cities = CalculatorModelsCity::GetCities();\n\t\t\t\n\t\t\t$terminals = array(\n\t\t\t\t'from' => CalculatorModelsTerminal::GetTerminalsByCity($model->city_from),\n\t\t\t\t'to' => CalculatorModelsTerminal::GetTerminalsByCity($model->city_to)\n\t\t\t);\n\t\t\t\t\t\t\n\t\t\t$this->model = $model;\n\t\t\t$this->cities = $cities;\n\t\t\t$this->terminals =$terminals;\n\t\t\t\n\t\t\treturn parent::render();\n }", "public function getVatNumber()\n {\n return $this->vatNumber;\n }", "public function getVatNumber()\n {\n return $this->vatNumber;\n }", "function bk_edit_quantity()\n\t{\n\t\t$this->m_bkTemplate->bk_editTemplateComponentsQuantity();\t\t\n\t}", "function hook_uc_invoice_templates() {\n return array('admin', 'customer');\n}", "public function initContent() {\r\n\t\tparent::initContent();\r\n\r\n if ((int)$this->step == 2) {\r\n Hook::exec('displayBeforeCarrier');\r\n $this->setTemplate(_PS_THEME_DIR_.'order-carrier.tpl');\r\n }\r\n\t\r\n\r\n\t}", "public function register_page() { ?>\n\n <div class=\"wrap bulk-up\">\n <h2><?php _e( 'Bulk Up', 'bulk-up' ); ?></h2>\n <p class=\"menu\">\n <a href=\"<?php echo $this->url; ?>\" class=\"add-new-h2 <?php echo ( ! $this->view ? 'active' : '' ); ?>\">\n <?php _e( 'Bulk Update', 'bulk-up' ); ?>\n </a>\n <a href=\"<?php echo $this->url . '&view=options'; ?>\" class=\"add-new-h2 <?php echo ( $this->view === 'options' ? 'active' : '' ); ?>\">\n <?php _e( 'Plugin Options' ); ?>\n </a>\n </p>\n\n <div class=\"bulk-up view-content\">\n <?php\n if ( $this->view === 'options' ) {\n $this->options->load_view();\n } else {\n $this->updater->load_view();\n }\n ?>\n </div>\n </div>\n\n <?php }", "function view(){\n global $DOPBSP;\n \n $DOPBSP->views->backend_settings->template();\n }", "function template_mainview()\r\n{\r\n\tglobal $scripturl, $txt, $context, $modSettings, $subcats_linktree, $user_info, $boardurl;\r\n\r\n\tif(!$user_info['is_guest']){\r\n\t\tabonelikritmi();\r\n\t}else{\r\n\t\tziyaretci();\r\n\t}\r\n}", "function default_template_checkout ()\r\n{\r\n$template = '\n<script>\n$(function () {\n\nglobal_spinner = $(\"#spinner\");\r\n\n{if $phone_mask != \"\"}\n $(\"#phone\").mask(\"{$phone_mask}\");\n{/if} \n\n //$(\"#contentform :input:text:visible:enabled:first\").trigger(\"focus\");\n\n $(\"form#contentform :input\").on(\"change\",function() {\n $(\"input[id=\\'\" + this.id + \"\\']\").addClass(\"modified\");\n $(\"radio[id=\\'\" + this.id + \"\\']\").addClass(\"modified\");\n $(\"select[id=\\'\" + this.id + \"\\']\").addClass(\"modified\");\n $(\"checkbox[id=\\'\" + this.id + \"\\']\").addClass(\"modified\");\n $(\"textarea[id=\\'\" + this.id + \"\\']\").addClass(\"modified\");\n });\n\n $(\\'.form-anti-bot, .form-anti-bot-2\\').hide(); // hide inputs from users\r\n var answer = $(\\'.form-anti-bot input#anti-bot-a\\').val(); // get answer\r\n $(\\'.form-anti-bot input#anti-bot-q\\').val( answer ); // set answer into other input\r\n\t\r\n if ( $(\\'form#contentform input#anti-bot-q\\').length == 0 ) {\r\n\t var current_date = new Date();\r\n\t var current_year = current_date.getFullYear();\r\n\t $(\\'form#contentform\\').append(\\'<input type=\"hidden\" name=\"anti-bot-q\" id=\"anti-bot-q\" value=\"\\'+current_year+\\'\" />\\'); // add whole input with answer via javascript to form\r\n }\r\n\n{if {$display_shipping_methods_block} == \"1\"}\n$(\"label.shipping-method\").on(\"click\",function(){\n$(\"label.shipping-method\").parent().removeClass(\"selected\");\n$(this).parent().addClass(\"selected\");\n});\n{/if}\n\n{if {$display_payment_methods_block} == \"1\"}\n$(\"label.payment-method\").on(\"click\",function(){\n$(\"label.payment-method\").parent().removeClass(\"selected\");\n$(this).parent().addClass(\"selected\");\n});\n{/if}\n\t\n // validate form\n $(\"#contentform\").validate({\n rules: {\n bill_name: {\n required: true,\n minlength: 2 \n },\n {if {$display_email_field} == \"1\"}email: {\n required: true,\n minlength: 6,\n email: true \n },{/if} \n phone: {\n required: true,\n minlength: 10,\n }\n },\n messages: {\n bill_name: {\n required: \"{lang}Required field{/lang}\",\n minlength: \"{lang}Required field{/lang}. {lang}Min length{/lang}: 2\"\n },\n {if {$display_email_field} == \"1\"}email: {\n required: \"{lang}Required field{/lang}\",\n minlength: \"{lang}Required field{/lang}. {lang}Min length{/lang}: 6\"\n },{/if} \n phone: {\n required: \"{lang}Required field{/lang}\",\n minlength: \"{lang}Required field{/lang}. {lang}Min length{/lang}: 10\"\n }\n }\n });\n\n\t{if {$display_shipping_info_block} == \"1\"}\n\t$(hidePay);\t\t\n\t\tfunction hidePay()\t{\n\t\tif ($(\"#diff_shipping\").is(\":checked\") == \"1\")\n\t\t\t{\n\t\t$(\"#diff_shipping\").attr(\"checked\", true);\n\t\t}\n\t\telse\n\t\t{\n\t\t$(\"#diff_shipping\").attr(\"checked\", false);\n\t\t$(\"#ship_information\").css(\"display\",\"none\");\n\t\t}\n\t\t\n\t\n\t\t$(\"#diff_shipping\").on(\"click\",function(){\n\t// If checked\n\t if ($(\"#diff_shipping\").is(\":checked\"))\n\t\t\t{\n\t //show the hidden div\n\t $(\"#ship_information\").show(\"fast\");\n\t }\n\t\t\telse\n\t\t\t{\n\t\t\t$(\"#ship_information\").hide();\n\t\t\t}\n\t\t});\n\t\t;}\n\t{/if}\n\n\t{if {$display_country_field} == \"1\"}\n $(\"#bill_country\").on(\"change\",function () {\n $(\"#bill_state_div\").load(\"{base_path}/countries/billing_regions/\" + $(this).val());\n $(\"#bill_country\").trigger(\"focus\");\n });\n $(\"#ship_country\").on(\"change\",function () {\n $(\"#ship_state_div\").load(\"{base_path}/countries/shipping_regions/\" + $(this).val());\n $(\"#ship_country\").trigger(\"focus\");\n });\n\t{/if} \n\t{if {$display_state_field} == \"1\"}\n $(\"#bill_state\").on(\"change\",function(){ \r\n var http_send = \"{base_path}/orders/save_data/\";\r\n var form_data = $(\"#contentform\").serialize();\r\n $.ajax({\r\n type: \"POST\",\r\n url: http_send,\r\n data: form_data,\r\n async: true,\r\n success: function (data, textStatus) {\r\n global_spinner.fadeOut(\"fast\");\n $(\"#checkout\").html(data);\n },\n beforeSend: function () {\n global_spinner.fadeIn(\"fast\");\r\n },\r\n complete: function () {\r\n $(\"#bill_state\").trigger(\"focus\");\n } \r\n }); \r\n return false;\r\n });\r\n\t{/if} \n\n\t{if {$display_city_field} == \"1\"}\n $(\"#bill_city\").on(\"change\",function(){ \r\n var http_send = \"{base_path}/orders/save_data/\";\r\n var form_data = $(\"#contentform\").serialize();\r\n $.ajax({\r\n type: \"POST\",\r\n url: http_send,\r\n data: form_data,\r\n async: true,\r\n success: function (data, textStatus) {\n global_spinner.fadeOut(\"fast\");\n $(\"#checkout\").html(data);\n },\r\n beforeSend: function () {\n global_spinner.fadeIn(\"fast\");\r\n },\r\n complete: function () {\r\n $(\"#bill_city\").trigger(\"focus\");\n } \r\n }); \r\n return false;\r\n });\r\n\t{/if} \n\n\t{if {$display_state_field} == \"1\"}\n\n\t $(\"#bill_state\").select2({\r\n\t theme: \"bootstrap\"\r\n\t }); \n\n\t $(\"#ship_state\").select2({\r\n\t theme: \"bootstrap\"\r\n\t }); \r\n\n\t{/if} \n\t\n\t{if {$display_country_field} == \"1\"}\n\n\t $(\"#bill_country\").select2({\r\n\t theme: \"bootstrap\"\r\n\t }); \n\t \n\t\n\t $(\"#ship_country\").select2({\r\n\t theme: \"bootstrap\"\r\n\t }); \r\n\n\t{/if} \n\n });\n</script>\n<div id=\"checkout\">\n<form action=\"{$checkout_form_action}\" method=\"post\" id=\"contentform\" class=\"form-horizontal\">\n <div id=\"bill_information\">\n <div>\n <h3>{lang}Billing Information{/lang}</h3>\n </div>\n\t<div class=\"form-group\">\n\t\t<label class=\"col-sm-3 control-label\" for=\"bill_name\">{lang}Name{/lang}:</label>\n\t\t<div class=\"col-sm-9\">\n\t\t\t<input type=\"text\" class=\"form-control\" name=\"bill_name\" id=\"bill_name\" value=\"{if $customer.AddressBook.ship_name}{$customer.AddressBook.ship_name}{else}{$order.bill_name}{/if}\"/>\n\t\t</div>\n\t</div>\n\t{if {$display_address_field} == \"1\"}\n\t<div class=\"form-group\">\n\t\t<label class=\"col-sm-3 control-label\" for=\"bill_line_1\">{lang}Address Line 1{/lang}:</label>\n\t\t<div class=\"col-sm-9\">\n\t\t\t<input type=\"text\" class=\"form-control\" name=\"bill_line_1\" id=\"bill_line_1\" value=\"{if $customer.AddressBook.ship_line_1}{$customer.AddressBook.ship_line_1}{else}{$order.bill_line_1}{/if}\" />\n\t\t</div>\n\t</div>\n\t{/if}\n\t{if {$display_address_1_field} == \"1\"}\n\t<div class=\"form-group\">\n\t\t<label class=\"col-sm-3 control-label\" for=\"bill_line_2\">{lang}Address Line 2{/lang}:</label>\n\t\t<div class=\"col-sm-9\">\n\t\t\t<input type=\"text\" class=\"form-control\" name=\"bill_line_2\" id=\"bill_line_2\" value=\"{if $customer.AddressBook.ship_line_2}{$customer.AddressBook.ship_line_2}{else}{$order.bill_line_2}{/if}\" />\n\t\t</div>\n\t</div>\n\t{/if}\n\t{if {$display_city_field} == \"1\"}\n\t<div class=\"form-group\">\n\t\t<label class=\"col-sm-3 control-label\" for=\"bill_city\">{lang}City{/lang}:</label>\n\t\t<div class=\"col-sm-9\">\n\t\t\t<input type=\"text\" class=\"form-control\" name=\"bill_city\" id=\"bill_city\" value=\"{if $customer.AddressBook.ship_city}{$customer.AddressBook.ship_city}{else}{$order.bill_city}{/if}\" />\n\t\t</div>\n\t</div> \n\t{/if}\n\t{if {$display_postcode_field} == \"1\"}\n\t<div class=\"form-group\">\n\t\t<label class=\"col-sm-3 control-label\" for=\"bill_zip\">{lang}Zipcode{/lang}:</label>\n\t\t<div class=\"col-sm-9\">\n\t\t\t<input type=\"text\" class=\"form-control\" name=\"bill_zip\" id=\"bill_zip\" value=\"{if $customer.AddressBook.ship_zip}{$customer.AddressBook.ship_zip}{else}{$order.bill_zip}{/if}\" />\n\t\t</div>\n\t</div> \n\t{/if}\n\t{if {$display_country_field} == \"1\"}\n\t<div class=\"form-group\">\n\t\t<label class=\"col-sm-3 control-label\" for=\"bill_country\">{lang}Country{/lang}:</label>\n\t\t<div class=\"col-sm-9\">\n\t\t\t<select name=\"bill_country\" class=\"form-control\" id=\"bill_country\">{if $customer.AddressBook.bill_country}{country_list selected={$customer.AddressBook.bill_country}}{else}{country_list}{/if}</select>\n\t\t</div>\n\t</div>\n\t{/if}\n\t{if {$display_state_field} == \"1\"}\n\t<div class=\"form-group\">\n\t<div id=\"bill_state_div\">\n\t\t<label class=\"col-sm-3 control-label\" for=\"bill_state\">{lang}State{/lang}:</label>\n\t\t<div class=\"col-sm-9\">\n\t\t\t<select name=\"bill_state\" class=\"form-control\" id=\"bill_state\">{if $customer.AddressBook.bill_state}{state_list country={$customer.AddressBook.bill_country} selected={$customer.AddressBook.bill_state}}{else}{state_list selected={$smarty.post.bill_state}}{/if}</select>\n\t\t</div>\n\t</div>\n\t</div>\n\t{/if}\n </div> \n\n {if {$display_shipping_info_block} == \"1\"}\n <div id=\"diff_ship\">\n <div class=\"form-group\">\n <div class=\"col-sm-offset-2 col-sm-10\">\n <div class=\"checkbox\">\n <label>\n <input type=\"checkbox\" name=\"diff_shipping\" id=\"diff_shipping\" /> {lang}My delivery and billing addresses are not the same.{/lang}\n </label>\n </div>\n </div>\n </div>\n </div>\n {/if}\n\n {if {$display_shipping_info_block} == \"1\"}\n <div id=\"ship_information\">\n <div>\n <h3>{lang}Shipping Information{/lang}</h3>\n </div>\n\t<div class=\"form-group\">\n\t\t<label class=\"col-sm-3 control-label\" for=\"ship_name\">{lang}Name{/lang}:</label>\n\t\t<div class=\"col-sm-9\">\n\t\t\t<input type=\"text\" class=\"form-control\" name=\"ship_name\" id=\"ship_name\" value=\"{$order.ship_name}\" />\n\t\t</div>\n\t</div>\n\t{if {$display_address_field} == \"1\"}\n\t<div class=\"form-group\">\n\t\t<label class=\"col-sm-3 control-label\" for=\"ship_line_1\">{lang}Address Line 1{/lang}:</label>\n\t\t<div class=\"col-sm-9\">\n\t\t\t<input type=\"text\" class=\"form-control\" name=\"ship_line_1\" id=\"ship_line_1\" value=\"{$order.ship_line_1}\" />\n\t\t</div>\n\t</div>\n\t{/if}\n\t{if {$display_address_1_field} == \"1\"}\n\t<div class=\"form-group\">\n\t\t<label class=\"col-sm-3 control-label\" for=\"ship_line_2\">{lang}Address Line 2{/lang}:</label>\n\t\t<div class=\"col-sm-9\">\n\t\t\t<input type=\"text\" class=\"form-control\" name=\"ship_line_2\" id=\"ship_line_2\" value=\"{$order.ship_line_2}\" />\n\t\t</div>\n\t</div>\n\t{/if}\n\t{if {$display_city_field} == \"1\"}\n\t<div class=\"form-group\">\n\t\t<label class=\"col-sm-3 control-label\" for=\"ship_city\">{lang}City{/lang}:</label>\n\t\t<div class=\"col-sm-9\">\n\t\t\t<input type=\"text\" class=\"form-control\" name=\"ship_city\" id=\"ship_city\" value=\"{$order.ship_city}\" />\n\t\t</div>\n\t</div> \n\t{/if}\n\t{if {$display_postcode_field} == \"1\"}\n\t<div class=\"form-group\">\n\t\t<label class=\"col-sm-3 control-label\" for=\"ship_zip\">{lang}Zipcode{/lang}:</label>\n\t\t<div class=\"col-sm-9\">\n\t\t\t<input type=\"text\" class=\"form-control\" name=\"ship_zip\" id=\"ship_zip\" value=\"{$order.ship_zip}\" />\n\t\t</div>\n\t</div> \n\t{/if}\n\t{if {$display_country_field} == \"1\"}\n\t<div class=\"form-group\">\n\t\t<label class=\"col-sm-3 control-label\" for=\"ship_country\">{lang}Country{/lang}:</label>\n\t\t<div class=\"col-sm-9\">\n\t\t\t<select name=\"ship_country\" class=\"form-control\" id=\"ship_country\">{country_list}</select>\n\t\t</div>\n\t</div>\n\t{/if}\n\t{if {$display_state_field} == \"1\"}\n\t<div class=\"form-group\">\n\t<div id=\"ship_state_div\">\n\t\t<label class=\"col-sm-3 control-label\" for=\"ship_state\">{lang}State{/lang}:</label>\n\t\t<div class=\"col-sm-9\">\n\t\t\t<select name=\"ship_state\" class=\"form-control\" id=\"ship_state\">{state_list}</select>\n\t\t</div>\n\t</div>\n\t</div>\n\t{/if}\n </div>\n {/if}\n <div id=\"contact_information\">\n <div>\n <h3>{lang}Contact Information{/lang}</h3>\n </div>\n\t{if {$display_email_field} == \"1\"}\n\t<div class=\"form-group\">\n\t\t<label class=\"col-sm-3 control-label\" for=\"email\">{lang}E-mail{/lang}:</label>\n\t\t<div class=\"col-sm-9\">\n\t\t\t<input type=\"text\" class=\"form-control\" name=\"email\" id=\"email\" value=\"{if $customer.Customer.email}{$customer.Customer.email}{else}{$order.email}{/if}\" />\n\t\t</div>\n\t</div>\n\t{/if}\n\t<div class=\"form-group\">\n\t\t<label class=\"col-sm-3 control-label\" for=\"phone\">{lang}Phone{/lang}:</label>\n\t\t<div class=\"col-sm-9\">\n\t\t\t<input type=\"text\" class=\"form-control\" name=\"phone\" id=\"phone\" value=\"{if $customer.AddressBook.phone}{$customer.AddressBook.phone}{else}{$order.phone}{/if}\" />\n\t\t</div>\n\t</div>\n\t{if {$display_comments_field} == \"1\"}\n\t<div class=\"form-group\">\n\t\t<label class=\"col-sm-3 control-label\" for=\"comment\">{lang}Order Comments{/lang}:</label>\n\t\t<div class=\"col-sm-9\">\n\t\t\t<textarea class=\"form-control\" name=\"comment\" id=\"comment\" cols=\"30\" rows=\"5\">{$order_comment}</textarea>\n\t\t</div>\n\t</div>\n\t{/if}\n </div>\n {module alias=\"coupons\" action=\"checkout_box\"}\n {if {$display_shipping_methods_block} == \"1\"}\n <div id=\"shipping_method\">\n <div>\n <h3>{lang}Shipping Method{/lang}</h3>\n </div> \n <div class=\"clearfix\">\n\t<ul class=\"shipping-methods\">\r\n {foreach from=$ship_methods item=ship_method}\n\t\t<li class=\"item col-sm-6 col-md-4{if $ship_method.id == $order.shipping_method_id} selected{/if}\">\r\n <label class=\"shipping-method\">\n <span class=\"title\">\n <input type=\"radio\" name=\"shipping_method_id\" value=\"{$ship_method.id}\" id=\"ship_{$ship_method.id}\" \n {if $ship_method.id == $order.shipping_method_id}\n checked=\"checked\"\n {/if}\n />\n\t\t<span class=\"name\">{lang}{$ship_method.name}{/lang}</span>\n\t\t</span>\n\t\t<span class=\"image text-center\">\r\n\t\t\t\t{if $ship_method.icon}<img src=\"{base_path}/img/icons/shipping/{$ship_method.icon}\" alt=\"{$ship_method.name}\" title=\"{$ship_method.name}\" /> {/if}\n\t\t</span>\r\n\t\t{if $ship_method.cost_plain > 0}<span class=\"description\">{$ship_method.cost}</span>{/if}\r\n\t\t{if $ship_method.description}<span class=\"description\">{$ship_method.description}</span>{/if}\r\n\t\t</label>\t\r\n\t\t</li>\r\n {/foreach}\n\t</ul>\n\t</div>\r\n </div>\n {/if}\n\n {if {$display_payment_methods_block} == \"1\"}\n <div id=\"payment_method\">\n <div>\n <h3>{lang}Payment Method{/lang}</h3>\n </div> \n\n <div class=\"clearfix\">\n\t<ul class=\"payment-methods\">\r\n {foreach from=$payment_methods item=payment_method}\n\t\t<li class=\"item col-sm-6 col-md-4{if $payment_method.id == $order.payment_method_id} selected{/if}\">\r\n <label class=\"payment-method\">\n <span class=\"title\">\n <input type=\"radio\" name=\"payment_method_id\" value=\"{$payment_method.id}\" id=\"payment_{$payment_method.id}\" \n {if $payment_method.id == $order.payment_method_id}\n checked=\"checked\"\n {/if} \n />\n\t\t<span class=\"name\">{lang}{$payment_method.name}{/lang}</span>\n\t\t</span>\n\t\t<span class=\"image text-center\">\r\n\t\t\t\t{if $payment_method.icon}<img class=\"text-center\" src=\"{base_path}/img/icons/payment/{$payment_method.icon}\" alt=\"{$payment_method.name}\" title=\"{$payment_method.name}\" /> {/if}\n\t\t</span>\r\n\t\t{if $payment_method.description}<span class=\"description\">{$payment_method.description}</span>{/if}\r\n\t\t</label>\t\r\n\t\t</li>\r\n {/foreach}\n\t</ul>\r </div>\n <div class=\"form-anti-bot\" style=\"clear:both;\">\r\n <strong>Current <span style=\"display:none;\">month</span> <span style=\"display:inline;\">ye@r</span> <span style=\"display:none;\">day</span></strong> <span class=\"required\">*</span>\r\n <input type=\"hidden\" name=\"anti-bot-a\" id=\"anti-bot-a\" value=\"{$smarty.now|date_format:\"%Y\"}\" />\r\n <input type=\"text\" name=\"anti-bot-q\" id=\"anti-bot-q\" size=\"30\" value=\"19\" />\r\n </div>\r\n <div class=\"form-anti-bot-2\" style=\"display:none;\">\r\n <strong>Leave this field empty</strong> <span class=\"required\">*</span>\r\n <input type=\"text\" name=\"anti-bot-e-email-url\" id=\"anti-bot-e-email-url\" size=\"30\" value=\"\"/>\r\n </div>\r\n\t \n </div>\n {/if}\n\t<div class=\"form-group\">\n\t\t<div class=\"col-sm-offset-2 col-sm-10\">\n\t\t\t\t\t{lang}By clicking button you are agree to our policy.{/lang} <a href=\"{base_path}/page/conditions-of-use.html\" target=\"_blank\">{lang}Terms & Conditions.{/lang}</a>\n\t\t</div>\n\t</div>\n\t<div class=\"form-group\">\n\t <div class=\"col-sm-offset-3 col-sm-9\">\n\t <button class=\"btn btn-warning\" type=\"submit\" value=\"{lang}Continue{/lang}\"><i class=\"fa fa-check\"></i> {lang}Continue{/lang}</button>\n\t </div>\n\t</div>\n</form>\n</div>\n\n<div id=\"spinner\">\r\n\t<img src=\"{base_path}/img/ajax-loader.gif\" alt=\"\" width=\"31\" height=\"31\" />\r\n</div>\n';\t\t\r\n\r\nreturn $template;\r\n}", "public function __construct()\r\n {\r\n \t// Call the Model constructor latest_product\r\n parent::__construct();\r\n\r\n $this->view_pre = 'account/';\r\n\r\n $this->add_script(array(\"account.css\"));\r\n $this->layput_data['inner_banner'] = '';//$this->model_inner_banner->find_by_pk_active(7);\r\n }", "protected function content_template() {\n ?>\n <#\n print( settings.products );\n #>\n <?php\n }", "protected function _content_template() {\n ?>\n\n <section id=\"services\">\n <div class=\"container\">\n \n <div class=\"row\"> \n\n <h2>{{{ settings.title }}}</h2>\n <h3>{{{ settings.sub_title }}}</h3>\n \n <# if ( settings.list.length ) { #>\n <# _.each( settings.list, function( item ) { #>\n\n <div class=\"col-lg-6\">\n <div class=\"box wow fadeInRight\" data-wow-delay=\"0.2s\">\n <div class=\"icon\">\n <i class=\"{{ item.list_icon }}\"></i>\n </div>\n <h4 class=\"title\">\n <a href=\"\">{{{ item.title }}}</a>\n </h4>\n <p class=\"description\">{{{ item.text }}}</p>\n </div>\n </div>\n\n <# }); #>\n <# } #>\n\n </div>\n\n </div>\n </section><!-- #services -->\n \n <?php\n }", "public function render()\n {\n return view('adminhub::livewire.pages.settings.taxes.tax-zones.create')\n ->layout('adminhub::layouts.settings', [\n 'title' => __('adminhub::settings.taxes.tax-zones.create_title'),\n 'menu' => 'settings',\n ]);\n }", "function __construct()\r\n\t\t{\r\n\t\t// Must be in all minicomponents. Minicomponents with templates that can contain editable text should run $this->template_touch() else just return\r\n\t\t$MiniComponents =jomres_getSingleton('mcHandler');\r\n\t\tif ($MiniComponents->template_touch)\r\n\t\t\t{\r\n\t\t\t$this->template_touchable=true; return;\r\n\t\t\t}\r\n\t\t$defaultProperty=getDefaultProperty();\r\n\t\t$contract_uid=jomresGetParam( $_REQUEST, 'contract_uid', 0 );\r\n\t\t$cancelText=jr_gettext('_JOMRES_COM_A_CANCEL','_JOMRES_COM_A_CANCEL',FALSE);\r\n\t\t$deleteText=jr_gettext('_JOMRES_COM_MR_ROOM_DELETE','_JOMRES_COM_MR_ROOM_DELETE',FALSE);\r\n\t\t$newText= jr_gettext('_JOMRES_COM_MR_NEWTARIFF','_JOMRES_COM_MR_NEWTARIFF',FALSE);\r\n\r\n\t\t$jrtbar =jomres_getSingleton('jomres_toolbar');\r\n\t\t$jrtb = $jrtbar->startTable();\r\n\t\t\r\n\t\t$jrtb .= $jrtbar->toolbarItem('cancel',jomresURL(JOMRES_SITEPAGE_URL.\"&task=list_black_bookings\"),$cancelText);\r\n\t\t$jrtb .= $jrtbar->toolbarItem('new',jomresURL(JOMRES_SITEPAGE_URL.\"&task=new_black_booking\"),$newText );\r\n\t\t\r\n\t\t$jrtb .= $jrtbar->toolbarItem('delete',jomresURL(JOMRES_SITEPAGE_URL.\"&task=delete_black_booking&contract_uid=$contract_uid\"),$deleteText);\r\n\t\t$jrtb .= $jrtbar->endTable();\r\n\t\t$output['JOMRESTOOLBAR']=$jrtb;\r\n\r\n\t\t$output['PAGETITLE']=jr_gettext('_JOMRES_FRONT_BLACKBOOKING','_JOMRES_FRONT_BLACKBOOKING');\r\n\t\t$output['ROOM_NUMBER']=jr_gettext('_JOMRES_COM_MR_VRCT_ROOM_HEADER_NUMBER','_JOMRES_COM_MR_VRCT_ROOM_HEADER_NUMBER');\r\n\t\t$output['ROOM_NAME']=jr_gettext('_JOMRES_COM_MR_EB_ROOM_NAME','_JOMRES_COM_MR_EB_ROOM_NAME');\r\n\t\t$output['CONTRACTID']=$contract_uid;\r\n\r\n\t\tif ($contract_uid != 0)\r\n\t\t\t{\r\n\t\t\t$query=\"SELECT arrival,departure,special_reqs FROM #__jomres_contracts WHERE contract_uid = '\".(int)$contract_uid.\"'\";\r\n\t\t\t$bbList=doSelectSql($query);\r\n\t\t\tforeach ($bbList as $bb)\r\n\t\t\t\t{\r\n\t\t\t\t$output['BBSTART']=outputDate($bb->arrival);\r\n\t\t\t\t$output['BBENDS']=outputDate($bb->departure);\r\n\t\t\t\t$output['REASON']=$bb->special_reqs;\r\n\t\t\t\t}\r\n\t\t\t$output['BBDATE']=jr_gettext('_JOMRES_FRONT_MR_MENU_ADMIN_BLACKBOOKINGS_BBSTARTS','_JOMRES_FRONT_MR_MENU_ADMIN_BLACKBOOKINGS_BBSTARTS');\r\n\t\t\t$output['BBDATEENDS']=jr_gettext('_JOMRES_FRONT_MR_MENU_ADMIN_BLACKBOOKINGS_BBSERVICERESUMES','_JOMRES_FRONT_MR_MENU_ADMIN_BLACKBOOKINGS_BBSERVICERESUMES');\r\n\t\t\t$output['INFO']=jr_gettext('_JOMRES_FRONT_MR_MENU_ADMIN_BLACKBOOKINGS_ROOMSSUBJECT','_JOMRES_FRONT_MR_MENU_ADMIN_BLACKBOOKINGS_ROOMSSUBJECT');\r\n\t\t\t$output['_JOMRES_COM_MR_EB_ROOM_NUMBER']=jr_gettext('_JOMRES_COM_MR_EB_ROOM_NUMBER','_JOMRES_COM_MR_EB_ROOM_NUMBER');\r\n\t\t\t$output['_JOMRES_COM_MR_EB_ROOM_NAME']=jr_gettext('_JOMRES_COM_MR_EB_ROOM_NAME','_JOMRES_COM_MR_EB_ROOM_NAME');\r\n\t\t\t\r\n\t\t\t$query=\"SELECT DISTINCT room_uid FROM #__jomres_room_bookings WHERE contract_uid = '\".(int)$contract_uid.\"'\";\r\n\t\t\t$bbBookingData = doSelectSql($query);\r\n\t\t\tforeach($bbBookingData as $bbBooking)\r\n\t\t\t\t{\r\n\t\t\t\t$query=\"SELECT room_number,room_name FROM #__jomres_rooms WHERE room_uid = '\".(int)$bbBooking->room_uid.\"'\";\r\n\t\t\t\t$bbRoomData = doSelectSql($query);\r\n\t\t\t\tif (!empty($bbRoomData))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t$roomNumberArray=array();\r\n\t\t\t\t\tforeach ($bbRoomData as $roomnumber)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t$bkngs['ROOMNO']=($roomnumber->room_number);\r\n\t\t\t\t\t\t$bkngs['ROOMNAME']=($roomnumber->room_name);\r\n\t\t\t\t\t\t$bookingsrows[]=$bkngs;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t$pageoutput[]=$output;\r\n\t\t\t$tmpl = new patTemplate();\r\n\t\t\t$tmpl->setRoot( JOMRES_TEMPLATEPATH_BACKEND );\r\n\t\t\t$tmpl->readTemplatesFromInput( 'view_black_booking.html' );\r\n\t\t\t$tmpl->addRows( 'pageoutput', $pageoutput );\r\n\t\t\t$tmpl->addRows( 'bookingsrows', $bookingsrows );\r\n\t\t\t$tmpl->displayParsedTemplate();\r\n\t\t\t}\r\n\t\telse\r\n\t\t\t{\r\n\t\t\techo \"Error: Uid for black booking not found\";\r\n\t\t\t}\r\n\t\t}", "public function generate()\n\t{\n\t\tif (TL_MODE == 'BE')\n\t\t{\n\t\t\t$objTemplate = new \\FrontendTemplate('be_fhcounter');\n\n\t\t\t$objTemplate->wildcard = '### FH-COUNTER AUSGABEMODUL ###';\n\t\t\t$objTemplate->title = $this->name;\n\t\t\t$objTemplate->id = $this->id;\n\n\t\t\treturn $objTemplate->parse();\n\t\t}\n\n\t\treturn parent::generate(); // Weitermachen mit dem Modul\n\t}", "public function handlebar_templates() {\n\t\t?>\n\t\t\t\n\t\t\t<script id=\"searchitem-template-generic\" type=\"text/x-handlebars-template\">\n\t\t\t\t<?php printf($this->item_template(), '{{type}}', '{{url}}', get_icon('alignleft'), '{{{title}}}', '{{type_label}}', 'Uppdaterad {{modified}}' ); ?>\n\t\t\t</script>\n\t\t\t\n\t\t\t<script id=\"searchitem-template-posts\" type=\"text/x-handlebars-template\">\n\t\t\t\t<?php printf($this->item_template(), '{{type}}', '{{url}}', get_icon('alignleft'), '{{{title}}}', '{{type_label}}', 'Uppdaterad {{modified}}' ); ?>\n\t\t\t</script>\n\n\t\t\t<script id=\"searchitem-template-attachments\" type=\"text/x-handlebars-template\">\n\t\t\t\t<?php printf($this->item_template(), '{{type}}', '{{url}}', get_icon('alignleft'), '{{{title}}}', '{{file_type}}', 'Uppdaterad {{modified}}' ); ?>\n\t\t\t</script>\n\n\t\t\t<script id=\"searchitem-template-contacts\" type=\"text/x-handlebars-template\">\n\t\t\t\t<?php printf($this->item_template(), '{{type}}', '{{url}}', '{{{thumbnail}}}', '{{{title}}}', '{{type_label}}', 'Uppdaterad {{modified}}' ); ?>\n\t\t\t</script>\n\t\t<?php\n\t}", "function generate_carat_management_pg()\n\t{\n\t\tglobal $wpdb;\n\t\t$defaultCarat_select_options = \"\"; // hold the default carats from db\n\t\t$customCarat_select_options = \"\"; // holds the current custom carats that are in the db\n\n\t\t$nonce = wp_create_nonce(\"new_carat_nonce\");\n\t\t$link_ajaxSaveCarats = admin_url(\"admin-ajax.php?action=save_new_carat&nonce=\".$nonce);\n\t\t$link_ajaxSaveCaratOrder = admin_url(\"admin-ajax.php?action=save_carat_order&nonce=\".$nonce);\n\t\t$link_ajaxDeleteCustomCarat = admin_url(\"admin-ajax.php?action=delete_custom_carat&nonce=\".$nonce);\n\t\t$link_ajaxEditCustomCarat = admin_url(\"admin-ajax.php?action=edit_custom_carat&nonce=\".$nonce);\n\n\t\t$defaultCarat_sql = \"SELECT * FROM wp_fits_progmng_carats WHERE carat_role = 'default' ORDER BY carat_order\";\n\t\t$getDefaultCarats = $wpdb->get_results($defaultCarat_sql);\n\n\t\tif($getDefaultCarats != NULL)\n\t\t{\n\t\t\tforeach ($getDefaultCarats AS $theDefaultCaratItem)\n\t\t\t{\n\t\t\t\t$defaultCarat_list_items .= \"<li class=\\\"ui-state-default default-draggable\\\" data-default_id=\\\"\".$theDefaultCaratItem->carat_id.\"\\\" data-default_position=\\\"\".$theDefaultCaratItem->carat_order.\"\\\"><span class=\\\"ui-icon ui-icon-arrowthick-2-n-s\\\"></span>\".$theDefaultCaratItem->carat_title.\"</li>\";\n\t\t\t}\n\t\t}\n\n\t\t$customCarat_sql = \"SELECT * FROM wp_fits_progmng_carats WHERE carat_role = 'custom' ORDER BY carat_order\";\n\t\t$getCustomCarats = $wpdb->get_results($customCarat_sql);\n\n\t\tif($getCustomCarats != NULL)\n\t\t{\n\t\t\tif(!empty($getCustomCarats))\n\t\t\t{\n\t\t\t\tforeach ($getCustomCarats AS $theCustomCaratItem)\n\t\t\t\t{\n\t\t\t\t\t$customCarat_list_items .= \"<li class=\\\"ui-state-default custom-draggable\\\" data-custom_id=\\\"\".$theCustomCaratItem->carat_id.\"\\\" data-custom_position=\\\"\".$theCustomCaratItem->carat_order.\"\\\"><span class=\\\"ui-icon ui-icon-arrowthick-2-n-s\\\"></span>\".$theCustomCaratItem->carat_title.\"<span class=\\\"ui-icon ui-icon-trash carat-delete customCaratDelete_btn\\\" style=\\\"cursor: pointer;\\\"></span> <span class=\\\"ui-icon ui-icon-pencil carat-edit customCaratEdit_btn\\\" style=\\\"cursor: pointer;\\\"></span></li>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$customCarat_list_items = \"<li>There are no custom carats yet.</li>\";\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$customCarat_list_items = \"<li>There are no custom carats.</li>\";\n\t\t}\n\n\t\t?>\n\t\t\t<div class=\"wrap\">\n\t\t\t\t<div id=\"carat_form_container\">\n\t\t\t\t\t<form id=\"manageProgramCarats\" name=\"manageProgramCarats\" action=\"\" method=\"post\">\n\t\t\t\t\t\t<table style=\"width: 100%; border-collapse: collapse;\">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td style=\"width: 50%; padding: 10px; vertical-align: top;\">\n\t\t\t\t\t\t\t\t\t<label for=\"defaultCarat_select\">Default Carats</label><br />\n\t\t\t\t\t\t\t\t\t<span id=\"defaultCarat_message\"></span>\n\t\t\t\t\t\t\t\t\t<ul class=\"defaultCarat_sortable\">\n\t\t\t\t\t\t\t\t\t\t<?php //print $defaultCarat_list_items; ?>\n\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t<div id=\"default_carat_message\"></div>\n\t\t\t\t\t\t\t\t\t<!-- <a href=\"<?php //echo $link_ajaxSaveCaratOrder; ?>\" id=\"save_carat_settings\" name=\"save_carat_settings\" class=\"button button-primary button-large\" data-nonce=\"<?php echo $nonce; ?>\" type=\"submit\">Save Default Carat Order</a> -->\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td style=\"width: 50%; padding: 10px; vertical-align: top;\">\n\t\t\t\t\t\t\t\t\t<label for=\"customCarat_select\">Custom Carats</label><br />\n\t\t\t\t\t\t\t\t\t<span id=\"customCarat_message\"></span>\n\t\t\t\t\t\t\t\t\t<ul class=\"customCarat_sortable\">\n\t\t\t\t\t\t\t\t\t\t<?php print $customCarat_list_items; ?>\n\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t<div id=\"custom_carat_message\"></div>\n\t\t\t\t\t\t\t\t\t<a href=\"<?php echo $link_ajaxSaveCaratOrder; ?>\" id=\"save_custom_carat_order\" name=\"save_custom_carat_order\" class=\"button button-primary button-large\" data-nonce=\"<?php echo $nonce; ?>\" type=\"submit\">Save Custom Carat Order</a>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td colspan=\"2\">\n\t\t\t\t\t\t\t\t\t&nbsp;\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t</form>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td colspan=\"2\">\n\t\t\t\t\t\t\t\t\t<!-- add/edit form -->\n\t\t\t\t\t\t\t\t\t<div style=\"border: 1px solid #d3d3d3; margin-top: 15px; padding: 10px;\">\n\t\t\t\t\t\t\t\t\t\t<h3>Add / Modify Carat Info</h3>\n\t\t\t\t\t\t\t\t\t\t<p>To add a new custom carat (not already in the list above), begin filling in this form and click the 'Save' button. To modify an existing custom carat, click the carat title in the list above (right), make your changes, and click the 'Save' button.</p>\n\t\t\t\t\t\t\t\t\t\t<form id=\"customCaratMgmt\" name=\"customCaratMgmt\" action=\"\" method=\"post\">\n\t\t\t\t\t\t\t\t\t\t\t<table style=\"border-collapse: collapse; width: 98%;\">\n\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td style=\"width: 60%;\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<label for=\"modify_carat_title\">Carat Title</label><br />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" style=\"width: 98%;\" id=\"modify_carat_title\" name=\"modify_carat_title\" value=\"\" placeholder=\"Carat Title\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td style=\"width: 40%;\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<label for=\"modify_carat_position\">Carat Order</label><br />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<select id=\"modify_carat_position\" name=\"modify_carat_position\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"\">Default Position</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"1\">1</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"2\">2</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"3\">3</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"4\">4</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"5\">5</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"6\">6</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"7\">7</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"8\">8</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"9\">9</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"10\">10</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"11\">11</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"12\">12</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"13\">13</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"14\">14</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"15\">15</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td colspan=\"2\" style=\"padding-top: 15px;\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" id=\"modify_carat_id\" name=\"modify_carat_id\" value=\"add\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" id=\"modify_carat_role\" name=\"modify_carat_role\" value=\"custom\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<button id=\"modify_carat_btn\" name=\"modify_carat_btn\" class=\"button button-primary button-large\" data-nonce=\"<?php echo $nonce; ?>\" type=\"button\">Add New</button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t\t<hr />\n\t\t\t\t<div id=\"data_list\"></div>\n\t\t\t</div>\n\t\t\t<script>\n\t\t\t\tjQuery(function()\n\t\t\t\t{\n\t\t\t\t\tjQuery(\".defaultCarat_sortable\").sortable();\n\t\t\t\t\tjQuery(\".defaultCarat_sortable\").disableSelection();\n\t\t\t\t\tjQuery(\".customCarat_sortable\").sortable();\n\t\t\t\t\tjQuery(\".customCarat_sortable\").disableSelection();\n\t\t\t\t});\n\t\t\t</script>\n\t\t<?php\n\n\t}", "public function apply_template()\n {\n if (!$this->login) {\n return;\n }\n\n $args = [\n 'points' => WC_Points_Rewards_Manager::get_users_points(get_current_user_id()),\n 'sliders' => [\n $this->render_slider($this->point_500_cat), $this->render_slider($this->point_1000_cat), $this->render_slider($this->point_up1000_cat),\n ],\n ];\n new_point_template_cart_rewards($args);\n }", "function it_exchange_variants_addon_register_template_loop( $elements ) {\n\t// Splice our template in after base price if it is first\n\tif ( 'base-price' == $elements[0] )\n\t\t$index = 1;\n\telse\n\t\t$index = 0;\n\n\t$index = apply_filters( 'it_exchange_get_content_product_product_info_loop_elements_variants_index', $index );\n\tarray_splice( $elements, $index, 0, 'exchange-variants' );\t\n\n\treturn $elements;\n}", "public function getMainTemplate()\n {\n $this->selectComPropFromDb();\n\n $this->getVarForTemplateLines();\n\n // select country in basket form\n if ($this->userData->country == 2) {\n $this->templates->set_tpl('{$countryChecked2}', 'checked');\n } else {\n $this->templates->set_tpl('{$countryChecked1}', 'checked');\n }\n\n // set var to templates\n $this->templates->set_tpl('{$basketFullLines}', $this->fullLines);\n $this->templates->set_tpl('{$commodityTotalCount}', $this->totalQuantity);\n $this->templates->set_tpl('{$totalSumm}', $this->totalSum);\n $this->templates->set_tpl('{$basketUserName}',\n (isset($_SESSION[\"basket_user_realname\"]) && $_SESSION[\"basket_user_realname\"]\n != \"\") ? $_SESSION[\"basket_user_realname\"] : (isset($this->userData->name)\n ? $this->userData->name.\" \".$this->userData->realName : \"\"));\n $this->templates->set_tpl('{$basketUserTel}',\n (isset($_SESSION[\"basket_user_phone\"]) && $_SESSION[\"basket_user_phone\"]\n != \"\") ? $_SESSION[\"basket_user_phone\"] : $this->userData->phone);\n $this->templates->set_tpl('{$basketUserEmail}',\n (isset($_SESSION[\"basket_user_email\"]) && $_SESSION[\"basket_user_email\"]\n != \"\") ? $_SESSION[\"basket_user_email\"] : $this->userData->email);\n $this->templates->set_tpl('{$basketUserCity}',\n (isset($_SESSION[\"basket_user_city\"]) && $_SESSION[\"basket_user_city\"]\n != \"\") ? $_SESSION[\"basket_user_city\"] : $this->userData->city);\n $this->templates->set_tpl('{$basketUserDelivery}',\n $this->userData->delivery);\n $this->templates->set_tpl('{$basketUserWarehouse}',\n (isset($this->userData->warehouse)) ? $this->userData->warehouse : '');\n $this->templates->set_tpl('{$basketUserAddress}',\n (isset($this->userData->address)) ? $this->userData->address : '');\n $this->templates->set_tpl('{$basketUserComments}',\n $_SESSION[\"user_comments\"]);\n\n // DiscountGift150\n $discGift = new DiscountGift($this->templates, $this->curVal,\n $this->userData->discountGift);\n $discGift->getTemplateForBasketFull();\n // end DiscountGift150\n\n $this->templates->set_tpl('{$idsForGTM}',\n substr($this->idsForGTM, 0, -2));\n $this->templates->set_tpl('{$info}',\n $this->templates->get_tpl('main.info'));\n return $panel = $this->templates->get_tpl('basket.full');\n }", "function kleo_woo_orders_screen() {\n\t\tadd_action( 'bp_template_content', 'kleo_woo_orders_screen_content' );\n\t\tbp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );\n\t}", "function cr_donate_money_buy_money_buy_buttons_content_type_render($subtype, $conf) {\n $block = new stdClass;\n $block->content = array(\n '#theme' => 'cr_donate_money_buy_buttons',\n '#amounts' => $conf['amount'],\n '#attached' => array(\n 'js' => array(drupal_get_path('module', 'cr_donate_money_buy') . '/cr_donate_money_buy.js'),\n ),\n );\n return $block;\n}", "function it_exchange_easy_eu_value_added_taxes_addon_include_vat_filters() {\n\tif ( !is_admin() ) {\n\t\tit_exchange_easy_eu_value_added_taxes_setup_session();\n\t}\n\n\t$settings = it_exchange_get_option( 'addon_easy_eu_value_added_taxes', true );\n\n\tif ( empty( $settings['price-hide-vat'] ) ) {\n\t\tadd_filter( 'it_exchange_api_theme_product_base_price', 'it_exchange_easy_eu_value_added_taxes_addon_api_theme_product_base_price', 10, 2 );\n\t}\n\n\tadd_filter( 'it_exchange_api_theme_cart_item_sub_total', 'it_exchange_easy_eu_value_added_taxes_addon_api_theme_cart_item_with_vat', 10, 2 );\n\tadd_filter( 'it_exchange_api_theme_cart_item_price', 'it_exchange_easy_eu_value_added_taxes_addon_api_theme_cart_item_with_vat', 10, 2 );\n}", "public function js_template() {\n\t\t?>\n\t\t<script id=\"js-builderius-setting-<?php echo $this->setting_key; ?>-tmpl\" type=\"text/template\">\n\t\t\t<div class=\"uni-modal-row uni-clear\">\n\t\t\t\t<?php echo $this->generate_field_label_html(); ?>\n\t\t\t\t<div class=\"uni-modal-row-second uni-modal-row-slug-wrap\">\n\t\t\t\t\t<div class=\"uni-fcell uni-slug-name\">\n\t\t\t\t\t\t<?php echo '{' . UniCpo()->get_var_slug(); ?>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"uni-scell uni-clear\">\n\t\t\t\t\t\t<div id=\"js-cpo-field-slug-wrapper\">\n\t\t\t\t\t\t\t<?php echo $this->generate_text_html(); ?>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<?php echo '}'; ?>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</script>\n\t\t<?php\n\t}", "function create_vc_ser_section_price_item() {\n vc_map([\n \"category\" => \"SER SHORTCODES\",\n \"name\" => \"Ser price item\",\n \"base\" => \"ser-price-item\",\n \"description\" => \"item para contenedor de precios\",\n \"show_settings_on_create\" => true,\n \"icon\" => \"icon-wpb-slideshow\",\n \"params\" => array(\n\n // Campo para el tamaño del texto\n array(\n \"heading\" => __('Precio mes', 'ser-baccu'),\n \"type\" => 'textfield',\n \"param_name\" => 'month',\n \"description\" => __('Valor en pesos colombianos','ser_baccu'),\n \"value\" => 3000,\n \"admin_label\" => true\n ),\n array(\n \"heading\" => __('Precio año', 'ser_baccu'),\n \"type\" => 'textfield',\n \"param_name\" => 'year',\n \"description\" => __('Valor en pesos colombianos', 'ser_baccu'),\n \"value\" => 20000,\n \"admin_label\" => true\n ),\n array(\n \"heading\" => __('Caracteristicas del paquete', 'ser-baccu'),\n \"type\" => 'textarea_html',\n \"param_name\" => 'content',\n \"description\" => __('Colocar elementos de lista' , 'ser-baccu'),\n \"value\" => '',\n \"admin_label\" => true\n ),\n array(\n \"heading\" => __('link den compra', 'ser-baccu'),\n \"type\" => 'vc_link',\n \"param_name\" => 'buy-link',\n \"description\" => __('Colocar elementos de lista'. 'ser-baccu'),\n \"value\" => '',\n \"admin_label\" => true\n ),\n array(\n \"heading\" => __('Titulo del plan', 'ser-baccu'),\n \"type\" => 'textfield',\n \"param_name\" => 'titulo',\n \"description\" => __('Colocar elementos de lista', 'ser-baccu'),\n \"value\" => '',\n \"admin_label\" => true\n ),\n array(\n \"heading\" => __('descripcion', 'ser-baccu'),\n \"type\" => 'textfield',\n \"param_name\" => 'descripcion',\n \"description\" => __('Colocar una descripción corta hacia quienes ba destinado el paquete', 'ser-baccu'),\n \"value\" => '',\n \"admin_label\" => true\n )\n\n\n )\n ]); \n }", "public function ShowBaseView(){\n echo System::getTemplate(\"gb_main\");\n }", "function add_new_pricingtable() {\n\t\t\tif(function_exists('vc_map')) {\n\t\t\t\t/*\n\t\t\t\t\tParent element\n\t\t\t\t*/\n\t\t\t\tvc_map( array(\n\t\t\t\t\t \"name\"\t\t\t\t\t\t=>\t__(\"Pricing Table\", \"hgrextender\"),\n\t\t\t\t\t \"base\"\t\t\t\t\t\t=>\t\"hgr_new_pricing_table\",\n\t\t\t\t\t \"class\"\t\t\t\t\t\t=>\t\"\",\n\t\t\t\t\t \"icon\"\t\t\t\t\t\t=>\t\"hgr_pricing_tables\",\n\t\t\t\t\t \"category\"\t\t\t\t\t=>\t__(\"HighGrade Extender\", \"hgrextender\"),\n\t\t\t\t\t \"description\"\t\t\t\t=>\t__(\"Pricing Table\", \"hgrextender\"),\n\t\t\t\t\t \"content_element\"\t\t\t=>\ttrue,\n\t\t\t\t\t \"show_settings_on_create\"\t=>\ttrue,\n\t\t\t\t\t \"params\"\t\t\t\t\t\t=>\tarray(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t\t=>\t\"colorpicker\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t\t=>\t__(\"Pricing table header text color:\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t\t=>\t\"pt_header_text_color\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t\t=>\t\"#7e7e7e\",\n\t\t\t\t\t\t\t\t\"dependency\"\t\t=>\tarray(\n\t\t\t\t\t\t\t\t\t\"not_empty\"\t\t=>\ttrue\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"save_always\" \t\t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t\t=>\t\"colorpicker\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t\t=>\t__(\"Pricing table body text color:\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t\t=>\t\"pt_body_text_color\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t\t=>\t\"#7e7e7e\",\n\t\t\t\t\t\t\t\t\"dependency\"\t\t=>\tarray(\n\t\t\t\t\t\t\t\t\t\"not_empty\"\t\t=>\ttrue\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"save_always\" \t\t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t\t=>\t\"textfield\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t\t=>\t__(\"Extra class\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t\t=>\t\"extra_class\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"save_always\" \t\t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t\t=>\t\"heading\",\n\t\t\t\t\t\t\t\t\"sub_heading\"\t\t=>\t\"This is a global setting page for the whole \\\"Pricing Tables\\\" block. Add some \\\"Tables\\\" in the container row to make it complete.\",\n\t\t\t\t\t\t\t\t\"param_name\"\t\t=>\t\"notification\",\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"textfield\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Package name\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"package_name\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"dropdown\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Recommended package\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"recommended_package\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\tarray(\n\t\t\t\t\t\t\t\t\t__( 'No', 'hgrextender' )\t=> 'false',\n\t\t\t\t\t\t\t\t\t__( 'Yes', 'hgrextender' )\t=> 'true',\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"textfield\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Package short text\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"package_short_text\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"textfield\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Package price\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"package_price\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"dropdown\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Cost is per:\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"cost_is_per\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\tarray(\n\t\t\t\t\t\t\t\t\t__( 'Day', 'hgrextender' )\t\t=> 'day',\n\t\t\t\t\t\t\t\t\t__( 'Week', 'hgrextender' )\t\t=> 'week',\n\t\t\t\t\t\t\t\t\t__( 'Month', 'hgrextender' )\t=> 'mo',\n\t\t\t\t\t\t\t\t\t__( 'Year', 'hgrextender' )\t\t=> 'year',\n\t\t\t\t\t\t\t\t\t__( 'Custom', 'hgrextender' )\t=> 'custom',\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"textfield\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Custom cost per:\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"custom_per_cost\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"item\",\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"Set cost per item, package etc.\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"dependency\"\t=>\tarray(\n\t\t\t\t\t\t\t\t\t\"element\"\t=>\t\"cost_is_per\",\n\t\t\t\t\t\t\t\t\t\"value\"\t\t=>\tarray( \"custom\" ),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"dropdown\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Currency:\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"pt_currency\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\tarray(\n\t\t\t\t\t\t\t\t\t__( 'Dollar', 'hgrextender' )\t=> '$',\n\t\t\t\t\t\t\t\t\t__( 'Euro', 'hgrextender' )\t\t=> '&euro;',\n\t\t\t\t\t\t\t\t\t__( 'Custom', 'hgrextender' )\t=> 'custom',\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"textfield\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Custom currency\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"custom_currency\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"dependency\"\t=>\tarray(\n\t\t\t\t\t\t\t\t\t\"element\"\t=>\t\"pt_currency\",\n\t\t\t\t\t\t\t\t\t\"value\"\t\t=>\tarray( \"custom\" ),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"colorpicker\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Price color\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"price_color\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"#fff\",\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"If empty, white will be used\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"colorpicker\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Header background color\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"header_color\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"#dff0d8\",\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"If empty, a default color will be used\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"colorpicker\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Header background second color\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"header_sec_color\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"#eef4ea\",\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"If empty, a default color will be used\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"colorpicker\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Second background color\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"body_bg_color\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"This is background color for price area. If empty, white will be used\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"colorpicker\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Package content background color\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"package_bg_color\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"This is background color for package content area. If empty, white will be used\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"textarea_html\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Table body content\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"content\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"Add a unordered list (ul) with package elements\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"textfield\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Buy button text\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"buy_btn_text\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"Buy Now! or Start Now! or whatever you want... \", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"textfield\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Button action URL\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"btn_url\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"dropdown\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Buy button position\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"buy_btn_position\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\tarray(\n\t\t\t\t\t\t\t\t\t__( 'In header', 'hgrextender' )\t=> 'header',\n\t\t\t\t\t\t\t\t\t__( 'In footer', 'hgrextender' )\t=> 'footer',\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"colorpicker\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Buy button color\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"buy_btn_color\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"If empty, a transparent backgroung button will be rendered.\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"colorpicker\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Buy button border color\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"buy_btn_border_color\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"If empty, no border will be rendered\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"number\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Button border thickness\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"buy_btn_border_width\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"min\"\t\t\t=>\t1,\n\t\t\t\t\t\t\t\t\"max\"\t\t\t=>\t10,\n\t\t\t\t\t\t\t\t\"suffix\"\t\t=>\t\"px\",\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"Thickness of the border (1-10).\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"number\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Button roundness\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"buy_btn_border_roundness\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t'',\n\t\t\t\t\t\t\t\t\"min\"\t\t\t=>\t1,\n\t\t\t\t\t\t\t\t\"max\"\t\t\t=>\t6,\n\t\t\t\t\t\t\t\t\"suffix\"\t\t=>\t\"px\",\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"Button corners roundness (1-6).\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"dependency\"\t=>\tarray(\n\t\t\t\t\t\t\t\t\t\"element\"\t\t=>\t\"buy_btn_border_width\",\n\t\t\t\t\t\t\t\t\t\"not_empty\"\t=>\ttrue\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"dropdown\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Button size\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"buy_btn_size\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\tarray(\n\t\t\t\t\t\t\t\t\t__( 'Default', 'hgrextender' )\t\t=> 'default-size',\n\t\t\t\t\t\t\t\t\t__( 'Large', 'hgrextender' )\t\t=> 'btn-lg',\n\t\t\t\t\t\t\t\t\t__( 'Small', 'hgrextender' )\t\t=> 'btn-sm',\n\t\t\t\t\t\t\t\t\t__( 'Extra small', 'hgrextender' )\t=> 'btn-xs',\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"textfield\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Table side margins (left & right)\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"table_margins\",\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"Add a margin to left and right of the table, in pixles\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"textfield\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Table border thickness\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"table_border_thickness\",\n\t\t\t\t\t\t\t\t\"description\"\t=>\t__(\"Add a border the table, in pixles\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"colorpicker\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Table border color\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"table_border_color\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"dependency\"\t=>\tarray(\n\t\t\t\t\t\t\t\t\t\"element\"\t=>\t\"table_border_thickness\",\n\t\t\t\t\t\t\t\t\t\"not_empty\"\t=>\ttrue\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"textfield\",\n\t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"heading\"\t\t=>\t__(\"Table extra class\", \"hgrextender\"),\n\t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"table_extra_class\",\n\t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"\",\n\t\t\t\t\t\t\t\t\"save_always\" \t=>\ttrue,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'type' => 'css_editor',\n\t\t\t\t\t\t\t\t'heading' => __( 'Css', 'hgrextender' ),\n\t\t\t\t\t\t\t\t'param_name' => 'css',\n\t\t\t\t\t\t\t\t'group' => __( 'Design options', 'hgrextender' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t\t\"js_view\" => 'VcColumnView'\n\t\t\t\t\t));\n\t\t\t\t\n\t\t\t\n\t\t\t}\n\t\t}", "function common(){\n \n $this->View->set_render_path(\"#base\"); \n\n //set the default template varialbes\n \n $this->Template->init(); \n \n /*\n * We'll allow the plugin generated template directory override any \n * content template defined in the ViewController methods to avoid\n * including default theme templates where plugin templates are actually\n * intended\n */\n \n add_action(\"WXP.DomRoute.after\", array($this, 'plugin_template_override'));\n }", "public function available_items_template()\n {\n }", "public function render()\n {\n return <<<'blade'\n <div data-controller=\"invoice\">\n <button data-action=\"click->invoice#addMoreCharge\"> Add more charge </button>\n </div>\n blade;\n }", "function lawzone_amount_and_wishlist(){\n \twc_get_template( 'single-product/amount-wishlist.php' );\n }", "function initVoucher()\n{\n date_default_timezone_set('America/Sao_Paulo');\n add_action('wp_head', 'voucher_wp_js');\n add_action('wp_head', 'voucher_wp_css');\n add_action('admin_head', 'voucher_admin_js');\n add_action('admin_head', 'voucher_admin_css');\n add_action('admin_menu', 'add_menu_admin');\n add_action( 'wp_enqueue_scripts', 'add_ajax_script' );\n}", "public function initContent()\n\t{\n\t\tparent::initContent();\n\n\t\t$has_address = $this->context->customer->getAddresses($this->context->language->id);\n\t\t$this->context->smarty->assign(array(\n\t\t\t'has_customer_an_address' => empty($has_address),\n\t\t\t'voucherAllowed' => (int)CartRule::isFeatureActive(),\n\t\t\t'returnAllowed' => (int)Configuration::get('PS_ORDER_RETURN')\n\t\t));\n\t\t$this->context->smarty->assign('HOOK_CUSTOMER_ACCOUNT', Hook::exec('displayCustomerAccount'));\n\t\t\n\t\t$customer_id = $this->context->customer->id;\n\t\t// get the number of messages for the customers\n\t\tIf (isset($customer_id)){\n\t\t\t// get the up customer - website field\n\t\t\t$sql = 'SELECT website from `'._DB_PREFIX_.'customer` c Where c.id_customer = '.$customer_id;\n\t\t\t$c_website = Db::getInstance()->getValue($sql);\n\t\t\t\n\t\t\tIf (isset($c_website)){\n\t\t\t\t$sql = 'SELECT count(*) FROM up.message m WHERE m.to_user_ik = '.$c_website.' and m.read is null';\n\t\t\t\t$m_number_messages = Db::getInstance()->getValue($sql,false);\n\t\t \t$this->context->smarty->assign(\"m_number_messages\", $m_number_messages);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$obj_marketplace_seller = new SellerInfoDetail();\n\t\tif (isset($customer_id)){\n\t\t\t$already_request = $obj_marketplace_seller->getMarketPlaceSellerIdByCustomerId($customer_id);\n\t\t}\n\t\telse{\n\t\t\t$already_request = null;\n\t\t}\n\t\tif ($already_request) {\n\t\t\t$is_seller = $already_request['is_seller'];\n\t\t\t\n\n\t\t\tif ($is_seller == 1)\n\t\t\t{\n\t\n\t\t\t\t//get the # of orders for the seller\n\t\t\t\t$sql = 'SELECT count(*) AS total from `'._DB_PREFIX_.'marketplace_shop_product` msp\n\t\t\t\tjoin `'._DB_PREFIX_.'order_detail` ordd on (ordd.`product_id`=msp.`id_product`)\n\t\t\t\tjoin `'._DB_PREFIX_.'orders` ord on (ordd.`id_order`=ord.`id_order`)\n\t\t\t\tjoin `'._DB_PREFIX_.'marketplace_seller_product` msep on (msep.`id` = msp.`marketplace_seller_id_product`)\n\t\t\t\tjoin `'._DB_PREFIX_.'marketplace_customer` mkc on (mkc.`marketplace_seller_id` = msep.`id_seller`)\n\t\t\t\tjoin `'._DB_PREFIX_.'customer` cus on (mkc.`id_customer`=cus.`id_customer`)\n\t\t\t\tjoin `'._DB_PREFIX_.'order_state_lang` ords on (ord.`current_state`=ords.`id_order_state`)\n\t\t\t\twhere ords.id_lang=1 and cus.`id_customer`= '.$customer_id.' and ord.current_state in (2)';\n\t\t\t\n\t\t\t\t$m_number_orders = Db::getInstance()->getValue($sql);\t\t\t\n\t\t\t\t\t\n\t \t$this->context->smarty->assign(\"m_number_orders\", $m_number_orders);\n\t\t\t}\n\t\t}\n\n\t\t$this->setTemplate(_PS_THEME_DIR_.'my-account.tpl');\n\t}", "public function render() {\n\n // HTML output goes here\n\n $nonce = wp_create_nonce( \"redux_{$this->parent->args['opt_name']}_gt3_registrator\" );\n\n if ( ! is_array( $this->value ) && isset( $this->field['options'] ) ) {\n $this->value = $this->field['options'];\n }\n\n\n $option_value = $this->value;\n if (!is_array($option_value)) {\n $option_value = array(\n 'puchase_code' => $option_value,\n );\n }\n $purchase_code = $this->value;\n\n $gt3_registration_status = get_option( 'gt3_registration_status');\n $side_row = '';\n /*$registration_returns = array();\n if ($gt3_registration_status != 'active' && !empty($purchase_code)) {\n $registration_returns = gt3_registration($purchase_code);\n $registration_returns = json_decode($registration_returns,true);\n if ($registration_returns['respond'] == 'Product is activated!') {\n update_option( 'gt3_registration_status' , 'active');\n if (!empty($registration_returns['supported_until'])) {\n update_option( 'gt3_registration_supported_until' , $registration_returns['supported_until']);\n }\n }\n }else{\n update_option( 'gt3_registration_status' , '');\n update_option( 'gt3_registration_supported_until' , '');\n }*/\n\n echo '<div class=\"gt3_register_container'.($gt3_registration_status == 'active' ? ' gt3_register_active' : '').'\" data-nonce=\"' . $nonce . '\">';\n echo '<input type=\"text\" id=\"' . esc_attr($this->field['id']) . '_purchase_code\" name=\"'.($this->parent->args['opt_name']).'[' . esc_attr($this->field['id']) . '][puchase_code]\" value=\"'.$option_value['puchase_code'].'\" class=\"regular-text \"'\n .($gt3_registration_status == 'active' ? ' readonly=\"readonly\"' : '')\n . esc_attr($this->field['class'])\n . '>';\n echo '<div class=\"gt3_register__buttons\">';\n echo '<a href=\"javascript:void(0);\" class=\"gt3_register__submit\">'.__( 'Activate', 'wizecore' ).'</a>';\n echo '<a href=\"javascript:void(0);\" class=\"gt3_register__deregister\">'.__( 'Deactivate', 'wizecore' ).'</a>';\n echo '<a href=\"javascript:void(0);\" class=\"gt3_activation_refresh\" title=\"'.__( 'Refresh Activation', 'wizecore' ).'\"><i class=\"fa fa-refresh\" aria-hidden=\"true\"></i></a>';\n echo \"</div>\";\n\n\n if ($gt3_registration_status != 'active') {\n echo '<div class=\"gt3_info_container\">'.__( 'To unlock all theme features and get auto-updates, please activate the theme. Enter your purchase code and click \"Activate\". Don\\'t know where the purchase code is? ', 'wizecore' ).'<a href=\"https://help.market.envato.com/hc/en-us/articles/202822600-Where-Is-My-Purchase-Code-\" target=\"_blank\">'.__( 'Click here.', 'wizecore').'</a>'.'</div>';\n }\n\n\n if ($gt3_registration_status == 'active') {\n\n if (get_option( 'gt3_account_attached' ) == 'true') {\n echo \"<div class='gt3_support_container gt3_info_container'>\";\n echo '<div><strong>'.esc_html( 'The purchase code is linked to your GT3themes account', 'gt3_themes_core' ).' </strong></div>';\n echo \"<a class='button button-primary' href='http://accounts.gt3themes.com' style='color: #71c341;background: #ffffff;border-color: #ffffff;box-shadow: none;text-shadow: none;color: #d54e21;font-weight: 600;margin-top: 5px;'>\". esc_html( \"Go to Your Account\", \"gt3_themes_core\" ) .\" </a>\";\n echo \"</div>\";\n }else{\n echo '<div class=\"gt3_info_container gt3_info_container--no_icon gt3_account_submit_container\">';\n echo \"<div class='gt3_register__popup_sepparator'><span>\".__( 'Next Step', 'wizecore' ).\"</span></div>\";\n echo '<strong style=\"font-size: 1.4em;color: #121212;\">'.__( 'It\\'s time to protect your purchase code.', 'wizecore' ).'</strong>';\n echo '<p class=\"gt3_register__key\"><i class=\"fa fa-key\" aria-hidden=\"true\"></i> <span class=\"key\" style=\"text-decoration: underline;\">'.$option_value['puchase_code'].'</span></p>';\n echo \"<p>\".__( 'Enter your email address to bind the purchase code. We will create a customer account for you by using your email address.', 'wizecore' ).\"</p>\";\n echo \"<div>\".__( 'After that, you will be able to:', 'wizecore' ).\"</div>\";\n echo \"<ul>\n <li>\".__( 'View where your purchase code is used.', 'wizecore' ).\"</li>\n <li>\".__( 'Manage all your purchase codes.', 'wizecore' ).\"</li>\n <li>\".__( 'Check for product and support status.', 'wizecore' ).\"</li>\n </ul>\";\n $admin_email = empty($option_value['email_account']) ? get_bloginfo('admin_email') : $option_value['email_account'];\n echo '<input type=\"email\" id=\"' . esc_attr($this->field['id']) . '_account_email\" name=\"'.($this->parent->args['opt_name']).'[' . esc_attr($this->field['id']) . '][email_account]\" value=\"'.$admin_email.'\" class=\"regular-text gt3_account '.esc_attr($this->field['class']) .'\">';\n $newsletter_value = '';\n echo '<a href=\"javascript:void(0);\" class=\"gt3_account_submit\">'.__( 'Protect & Create Account', 'wizecore' ).'</a>';\n echo \"</div>\";\n }\n\n\n if (get_option('sdfgdsfgdfg') != 'Product is activated!') {\n update_option( 'gt3_registration_status', '');\n }\n if (function_exists('gt3_get_support_time_left')) {\n $support_time_left = gt3_get_support_time_left();\n if (!empty($support_time_left['time_to_left'])) {\n $gt3_tmeme_id = get_option( 'gt3_tmeme_id' );\n if (!empty($gt3_tmeme_id)) {\n $theme_link = 'https://themeforest.net/checkout/from_item/'.(int)$gt3_tmeme_id.'?license=regular&size=source&support=renew_6month';\n }else{\n $theme_link = 'https://themeforest.net/user/gt3themes/portfolio?ref=gt3themes';\n }\n echo \"<div class='\".(!empty($support_time_left['expired']) && $support_time_left['expired'] == true ? '' : 'gt3_support_container').\" gt3_info_container'>\";\n if (!empty($support_time_left['expired']) && $support_time_left['expired'] == true) {\n printf( 'Your support package for this theme was expired <strong>%1$s</strong> ago', $support_time_left['time_to_left']);\n }else{\n printf( 'You have <strong>%1$s</strong> of available support', $support_time_left['time_to_left']);\n }\n echo '<div><a class=\"button button-primary\" href=\"'. $theme_link .'\" style=\"color: #71c341;background: #ffffff;border-color: #ffffff;box-shadow: none;text-shadow: none;color: #d54e21;font-weight: 600;margin-top: 5px;\">'. esc_html( \"Update Support Package\", \"gt3_themes_core\" ) .' <i class=\"fa fa-angle-right\" aria-hidden=\"true\"></i></a></div>';\n echo \"</div>\";\n }\n }\n }\n\n\n echo \"<div class='gt3_register__popup'>\";\n echo \"<div class='gt3_register__popup_container'>\";\n echo \"<div class='gt3_register__popup_close'><i class='fa fa-times' aria-hidden='true'></i></div>\";\n echo '<div class=\"gt3_info_container gt3_info_container--no_icon gt3_account_submit_container\">';\n echo \"<div class='gt3_register__popup_sepparator'><span>\".__( 'Next Step', 'wizecore' ).\"</span></div>\";\n echo '<strong style=\"font-size: 1.4em;color: #121212;\">'.__( 'It\\'s time to protect your purchase code.', 'wizecore' ).'</strong>';\n echo '<p class=\"gt3_register__key\"><i class=\"fa fa-key\" aria-hidden=\"true\"></i> <span class=\"key\" style=\"text-decoration: underline;\">'.$option_value['puchase_code'].'</span></p>';\n echo \"<p>\".__( 'Enter your email address to bind the purchase code. We will create a customer account for you by using your email address.', 'wizecore' ).\"</p>\";\n echo \"<div>\".__( 'After that, you will be able to:', 'wizecore' ).\"</div>\";\n echo \"<ul>\n <li>\".__( 'View where your purchase code is used.', 'wizecore' ).\"</li>\n <li>\".__( 'Manage all your purchase codes.', 'wizecore' ).\"</li>\n <li>\".__( 'Check for product and support status.', 'wizecore' ).\"</li>\n </ul>\";\n $admin_email = empty($option_value['email_account']) ? get_bloginfo('admin_email') : $option_value['email_account'];\n echo '<input type=\"email\" id=\"' . esc_attr($this->field['id']) . '_account_email\" name=\"'.($this->parent->args['opt_name']).'[' . esc_attr($this->field['id']) . '][email_account]\" value=\"'.$admin_email.'\" class=\"regular-text gt3_account '.esc_attr($this->field['class']) .'\">';\n $newsletter_value = '';\n echo '<a href=\"javascript:void(0);\" class=\"gt3_account_submit\">'.__( 'Protect & Create Account', 'wizecore' ).'</a>';\n echo \"</div>\";\n echo \"</div>\";\n echo '<div class=\"gt3_info_container gt3_info_container--no_icon gt3_account_submit_success_container\">';\n echo '<strong style=\"font-size: 1.4em;color: #121212;\">'.__( 'Hey!', 'wizecore' ).'</strong>';\n echo \"<p>\".__( 'Your account has been successfully created and its details were sent your e-mail address ', 'wizecore' ).\"<strong class='gt3_account_emai_holder'></strong></p>\";\n echo \"<p>\".__( 'You can log into your account at', 'wizecore' ).' <a href=\"http://accounts.gt3themes.com\">http://accounts.gt3themes.com</a> '.__( 'to manage your purchase code(s) and get dedicated support.', 'wizecore' ).\"</p>\";\n echo \"<p>\".__( \"If you haven't received your account details, please contact us at\", 'wizecore' ).' <a href=\"mailto:help@gt3themes.com\">help@gt3themes.com</a> '.__( \"and our support team will assist you.\", 'wizecore' ).\"</p>\";\n echo \"<p><strong>\".__( \"Thank you for choosing our product.\", 'wizecore' ).\"</strong></p>\";\n echo \"<div class='gt3_account_submit_success_button'>\".__( \"Close\", 'wizecore' ).\"</div>\";\n echo \"</div>\";\n echo \"</div>\";\n\n\n echo \"</div>\"; //end gt3_register_container\n\n\n\n\n }", "public function aic_render()\n {\n if (!get_option('aic_block_count')) {\n update_option('aic_block_count', 0);\n }\n\n\n wp_localize_script($this->plugin_slug, 'aic_block_count', array('ajax_url' => admin_url('admin-ajax.php')));\n\n $cssCode = wp_remote_get(plugin_dir_url(__FILE__) . 'css/aic-admin.css');\n $jsCode = wp_remote_get(plugin_dir_url(__FILE__) . 'js/aic-admin.js');\n echo '<style>'.$cssCode['body'].'</style>';\n echo '<script> var aic_block_count = {ajax_url: \"'.admin_url('admin-ajax.php').'\"}; '.$jsCode['body'].'</script>';\n\n\n // Generate the settings fields\n $field_args = [\n [\n 'label' => 'aic_ad_title',\n 'slug' => 'aic_ad_title',\n 'type' => 'text'\n ],\n [\n 'label' => 'aic_ad_code',\n 'slug' => 'aic_ad_code',\n 'type' => 'textarea'\n ]\n ];\n\n // Model\n $settings = $this->settings;\n\n // Controller\n $fields = $this->aic_custom_settings_fields($field_args, $settings);\n $settings_group = $this->settings_group;\n $heading = Info::get_plugin_title();\n $submit_text = esc_attr__('Submit', 'ads-in-content');\n\n // View\n require_once plugin_dir_path(dirname(__FILE__)) . 'admin/partials/view.php';\n }", "function import_template()\n\t{\n\t\t $this->products_model->import_template();\n\t}", "function commerce_purchase_order_views_default_views() {\n $views = array();\n\n // Purchase Order admin list at admin/commerce/purchase_orders.\n $view = new view();\n $view->name = 'commerce_purchase_orders';\n $view->description = 'Display a list of purchase orders for the store admin.';\n $view->tag = 'default';\n $view->base_table = 'commerce_payment_transaction';\n $view->human_name = 'Purchase orders';\n $view->core = 7;\n $view->api_version = '3.0';\n $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */\n\n /* Display: Master */\n $handler = $view->new_display('default', 'Master', 'default');\n $handler->display->display_options['title'] = 'Purchase orders';\n $handler->display->display_options['use_more_always'] = FALSE;\n $handler->display->display_options['access']['type'] = 'perm';\n $handler->display->display_options['access']['perm'] = 'view payments';\n $handler->display->display_options['cache']['type'] = 'none';\n $handler->display->display_options['query']['type'] = 'views_query';\n $handler->display->display_options['exposed_form']['type'] = 'basic';\n $handler->display->display_options['pager']['type'] = 'full';\n $handler->display->display_options['pager']['options']['items_per_page'] = '25';\n $handler->display->display_options['style_plugin'] = 'table';\n $handler->display->display_options['style_options']['columns'] = array(\n 'po_number' => 'po_number',\n 'created' => 'created',\n 'order_id' => 'order_id',\n 'name' => 'name',\n 'amount' => 'amount',\n 'status' => 'status',\n 'operations' => 'operations',\n );\n $handler->display->display_options['style_options']['default'] = 'created';\n $handler->display->display_options['style_options']['info'] = array(\n 'po_number' => array(\n 'sortable' => 1,\n 'default_sort_order' => 'asc',\n 'align' => '',\n 'separator' => '',\n 'empty_column' => 0,\n ),\n 'created' => array(\n 'sortable' => 1,\n 'default_sort_order' => 'desc',\n 'align' => '',\n 'separator' => '',\n 'empty_column' => 0,\n ),\n 'order_id' => array(\n 'sortable' => 1,\n 'default_sort_order' => 'asc',\n 'align' => '',\n 'separator' => '',\n 'empty_column' => 0,\n ),\n 'name' => array(\n 'sortable' => 1,\n 'default_sort_order' => 'asc',\n 'align' => '',\n 'separator' => '',\n 'empty_column' => 0,\n ),\n 'amount' => array(\n 'sortable' => 1,\n 'default_sort_order' => 'asc',\n 'align' => '',\n 'separator' => '',\n 'empty_column' => 0,\n ),\n 'status' => array(\n 'sortable' => 1,\n 'default_sort_order' => 'asc',\n 'align' => '',\n 'separator' => '',\n 'empty_column' => 0,\n ),\n 'operations' => array(\n 'align' => '',\n 'separator' => '',\n 'empty_column' => 0,\n ),\n );\n /* No results behavior: Global: Unfiltered text */\n $handler->display->display_options['empty']['area_text_custom']['id'] = 'area_text_custom';\n $handler->display->display_options['empty']['area_text_custom']['table'] = 'views';\n $handler->display->display_options['empty']['area_text_custom']['field'] = 'area_text_custom';\n $handler->display->display_options['empty']['area_text_custom']['label'] = 'Empty text';\n $handler->display->display_options['empty']['area_text_custom']['empty'] = TRUE;\n $handler->display->display_options['empty']['area_text_custom']['content'] = 'There are no purchase orders to display.';\n /* Relationship: Commerce Order: Owner */\n $handler->display->display_options['relationships']['uid']['id'] = 'uid';\n $handler->display->display_options['relationships']['uid']['table'] = 'commerce_order';\n $handler->display->display_options['relationships']['uid']['field'] = 'uid';\n /* Field: Purchase order: PO number */\n $handler->display->display_options['fields']['po_number']['id'] = 'po_number';\n $handler->display->display_options['fields']['po_number']['table'] = 'commerce_purchase_order';\n $handler->display->display_options['fields']['po_number']['field'] = 'po_number';\n /* Field: Commerce Payment Transaction: Created date */\n $handler->display->display_options['fields']['created']['id'] = 'created';\n $handler->display->display_options['fields']['created']['table'] = 'commerce_payment_transaction';\n $handler->display->display_options['fields']['created']['field'] = 'created';\n $handler->display->display_options['fields']['created']['label'] = 'Created';\n $handler->display->display_options['fields']['created']['date_format'] = 'short';\n $handler->display->display_options['fields']['created']['second_date_format'] = 'search_api_facetapi_YEAR';\n $handler->display->display_options['fields']['created']['format_date_sql'] = 0;\n /* Field: Commerce Order: Order ID */\n $handler->display->display_options['fields']['order_id']['id'] = 'order_id';\n $handler->display->display_options['fields']['order_id']['table'] = 'commerce_order';\n $handler->display->display_options['fields']['order_id']['field'] = 'order_id';\n $handler->display->display_options['fields']['order_id']['link_to_order'] = 'admin';\n /* Field: User: Name */\n $handler->display->display_options['fields']['name']['id'] = 'name';\n $handler->display->display_options['fields']['name']['table'] = 'users';\n $handler->display->display_options['fields']['name']['field'] = 'name';\n $handler->display->display_options['fields']['name']['relationship'] = 'uid';\n /* Field: Commerce Payment Transaction: Amount */\n $handler->display->display_options['fields']['amount']['id'] = 'amount';\n $handler->display->display_options['fields']['amount']['table'] = 'commerce_payment_transaction';\n $handler->display->display_options['fields']['amount']['field'] = 'amount';\n /* Field: Commerce Payment Transaction: Status */\n $handler->display->display_options['fields']['status']['id'] = 'status';\n $handler->display->display_options['fields']['status']['table'] = 'commerce_payment_transaction';\n $handler->display->display_options['fields']['status']['field'] = 'status';\n $handler->display->display_options['fields']['status']['display_style'] = 'title';\n /* Field: Commerce Payment Transaction: Operations links */\n $handler->display->display_options['fields']['operations']['id'] = 'operations';\n $handler->display->display_options['fields']['operations']['table'] = 'commerce_payment_transaction';\n $handler->display->display_options['fields']['operations']['field'] = 'operations';\n /* Filter criterion: Commerce Payment Transaction: Payment method */\n $handler->display->display_options['filters']['payment_method']['id'] = 'payment_method';\n $handler->display->display_options['filters']['payment_method']['table'] = 'commerce_payment_transaction';\n $handler->display->display_options['filters']['payment_method']['field'] = 'payment_method';\n $handler->display->display_options['filters']['payment_method']['value'] = array(\n 'commerce_purchase_order' => 'commerce_purchase_order',\n );\n\n /* Display: Admin page */\n $handler = $view->new_display('page', 'Admin page', 'admin_page');\n $handler->display->display_options['path'] = 'admin/commerce/purchase-orders/list';\n $handler->display->display_options['defaults']['hide_admin_links'] = FALSE;\n $handler->display->display_options['menu']['type'] = 'default tab';\n $handler->display->display_options['menu']['title'] = 'Purchase orders';\n $handler->display->display_options['menu']['weight'] = '0';\n $handler->display->display_options['tab_options']['type'] = 'normal';\n $handler->display->display_options['tab_options']['title'] = 'Purchase orders';\n $handler->display->display_options['tab_options']['weight'] = '0';\n $handler->display->display_options['tab_options']['name'] = 'management';\n\n $translatables['commerce_purchase_orders'] = array(\n t('Master'),\n t('Purchase orders'),\n t('more'),\n t('Apply'),\n t('Reset'),\n t('Sort by'),\n t('Asc'),\n t('Desc'),\n t('Items per page'),\n t('- All -'),\n t('Offset'),\n t('« first'),\n t('‹ previous'),\n t('next ›'),\n t('last »'),\n t('Empty text'),\n t('There are no purchase orders to display.'),\n t('Order owner'),\n t('PO number'),\n t('Created'),\n t('Order ID'),\n t('Name'),\n t('Amount'),\n t('Status'),\n t('Operations links'),\n t('List'),\n );\n $views[$view->name] = $view;\n\n return $views;\n}", "public function mainVariableProcess()\n {\n $templateText = $this->getTheTemplateBodyWithItems();\n \n //auto insert totals\n $total_creditmemo = Mage::getModel('pdfinvoiceplus/entity_totalsRender_creditmemo');\n $total_creditmemo->setSource($this->getTheCreditmemo())\n ->setHtml($templateText)->setTemplateId($this->createTemplate()->getId());\n $templateText = $total_creditmemo->renderHtml();\n \n $theVariableProcessor = Mage::helper('pdfinvoiceplus')->setTheTemplateLayout($templateText);\n return $theVariableProcessor;\n }", "function it_exchange_easy_eu_value_added_taxes_display_vat_summary_on_invoice() {\n\n\tif ( ! function_exists( 'it_exchange_invoice_addon_get_invoice_transaction_id' ) ) {\n\t\treturn;\n\t}\n\n\t$txn_id = it_exchange_invoice_addon_get_invoice_transaction_id( $GLOBALS['it_exchange']['product']->ID );\n\n\tif ( ! $txn_id ) {\n\n\t\techo '<div class=\"it-exchange-vat-invoice-summary\">';\n\t\techo '<style type=\"text/css\">#it-exchange-add-edit-vat-number {vertical-align: top;margin-top: 0;margin-left: 0;display: block;}'\n\t\t . '.it-exchange-vat-invoice-summary .it-exchange-cart-totals-amount .it-exchange-table-column-inner { padding: 0;}</style>';\n\n\t\tit_exchange( 'eu-value-added-taxes', 'taxes', array(\n\t\t\t'before_label' => '<span class=\"label\">',\n\t\t\t'after_label' => '</span>'\n\t\t) );\n\t\techo '</div>';\n\t} else {\n\n\t\t$GLOBALS['it_exchange']['transaction'] = it_exchange_get_transaction( $txn_id );\n\n\t\techo '<div class=\"it-exchange-vat-invoice-summary\">';\n\t\tit_exchange( 'eu-value-added-taxes', 'vat-summary', array(\n\t\t\t'label_tag_open' => '<span class=\"label\">',\n\t\t\t'label_tag_close' => '</span>'\n\t\t) );\n\t\techo '</div>';\n\t}\n}", "public function render(){\n\t\t$prefix = su_cmpt();\n\t\t\n\t\t$url = (isset($this->addon->settings->url) && $this->addon->settings->url) ? $this->addon->settings->url : '#';\n\t\t$color = (isset($this->addon->settings->color) && $this->addon->settings->color) ? $this->addon->settings->color : '#FFFFFF';\n\t\t$background = (isset($this->addon->settings->background) && $this->addon->settings->background) ? $this->addon->settings->background : '#2D89EF';\n\t\t$size = (isset($this->addon->settings->size) && $this->addon->settings->size) ? $this->addon->settings->size : '3';\n\t\t$radius = (isset($this->addon->settings->radius) && $this->addon->settings->radius) ? $this->addon->settings->radius : '3px';\n\t\t$icon = (isset($this->addon->settings->icon) && $this->addon->settings->icon) ? trim(str_replace('fa-', '', 'icon:'.$this->addon->settings->icon)) : '';\n\t\t$icon_color = (isset($this->addon->settings->icon_color) && $this->addon->settings->icon_color) ? $this->addon->settings->icon_color : '#FFFFFF';\n\t\t$content = (isset($this->addon->settings->content) && $this->addon->settings->content) ? $this->addon->settings->content.'[/'.$prefix.'button]' : '';\n\t\t\n\t\t$wide = ( $this->addon->settings->wide == 1 ) ? 'yes' : 'no';\n\t\t$center = ( $this->addon->settings->center == 1 ) ? 'yes' : 'no';\n\t\t\n\t\t$class = (isset($this->addon->settings->class) && $this->addon->settings->class) ? $this->addon->settings->class : '';\n\t\t$style = (isset($this->addon->settings->style) && $this->addon->settings->style) ? $this->addon->settings->style : '';\n\t\t$target = (isset($this->addon->settings->target) && $this->addon->settings->target) ? $this->addon->settings->target : '';\n\t\t$background_hover = (isset($this->addon->settings->background_hover) && $this->addon->settings->background_hover) ? $this->addon->settings->background_hover : '';\n\t\t$desc = (isset($this->addon->settings->desc) && $this->addon->settings->desc) ? $this->addon->settings->desc : '';\n\t\t$onclick = (isset($this->addon->settings->onclick) && $this->addon->settings->onclick) ? $this->addon->settings->onclick : '';\n\t\t$padding = (isset($this->addon->settings->padding) && $this->addon->settings->padding) ? $this->addon->settings->padding : '';\n\t\t$margin = (isset($this->addon->settings->margin) && $this->addon->settings->margin) ? $this->addon->settings->margin : '';\n\n\t\t// Output\n\t\t$output = '<div class=\"bdt-addon bdt-addon-button ' . $class .'\">';\n\t\t$output .= su_do_shortcode('['.$prefix.'button style=\"'.$style.'\" url=\"'.$url.'\" target=\"'.$target.'\" color=\"'.$color.'\" background=\"'.$background.'\" background_hover=\"'.$background_hover.'\" size=\"'.$size.'\" wide=\"'.$wide.'\" center=\"'.$center.'\" radius=\"'.$radius.'\" icon=\"'.$icon.'\" icon_color=\"'.$icon_color.'\" desc=\"'.$desc.'\" onclick=\"'.$onclick.'\" padding=\"'.$padding.'\" margin=\"'.$margin.'\"]'.$content);\n\t\t$output .= '</div>';\n\n\t\treturn $output;\n\t}", "function payment_view_payments() {\n $view = new view();\n $view->name = 'payments';\n $view->description = 'List all payments made using Payment module.';\n $view->tag = 'payment';\n $view->base_table = 'payment';\n $view->human_name = 'Payments';\n $view->core = 7;\n $view->api_version = '3.0';\n $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */\n\n /* Display: Master */\n $handler = $view->new_display('default', 'Master', 'default');\n $handler->display->display_options['title'] = 'Payments';\n $handler->display->display_options['use_more_always'] = FALSE;\n $handler->display->display_options['group_by'] = TRUE;\n $handler->display->display_options['access']['type'] = 'perm';\n $handler->display->display_options['access']['perm'] = 'payment.payment.view.own';\n $handler->display->display_options['cache']['type'] = 'none';\n $handler->display->display_options['query']['type'] = 'views_query';\n $handler->display->display_options['query']['options']['query_comment'] = FALSE;\n $handler->display->display_options['exposed_form']['type'] = 'basic';\n $handler->display->display_options['pager']['type'] = 'full';\n $handler->display->display_options['pager']['options']['items_per_page'] = '50';\n $handler->display->display_options['pager']['options']['offset'] = '0';\n $handler->display->display_options['pager']['options']['id'] = '0';\n $handler->display->display_options['style_plugin'] = 'table';\n $handler->display->display_options['style_options']['columns'] = array(\n 'created' => 'created',\n 'title' => 'title',\n 'currency_code' => 'currency_code',\n 'amount_total' => 'amount_total',\n 'title_specific' => 'title_specific',\n 'operations' => 'operations',\n );\n $handler->display->display_options['style_options']['default'] = 'created';\n $handler->display->display_options['style_options']['info'] = array(\n 'created' => array(\n 'sortable' => 1,\n 'default_sort_order' => 'desc',\n 'align' => '',\n 'separator' => '',\n 'empty_column' => 0,\n ),\n 'title' => array(\n 'align' => '',\n 'separator' => '',\n 'empty_column' => 0,\n ),\n 'currency_code' => array(\n 'sortable' => 0,\n 'default_sort_order' => 'asc',\n 'align' => '',\n 'separator' => '',\n 'empty_column' => 0,\n ),\n 'amount_total' => array(\n 'sortable' => 1,\n 'default_sort_order' => 'asc',\n 'align' => '',\n 'separator' => '',\n 'empty_column' => 0,\n ),\n 'title_specific' => array(\n 'sortable' => 0,\n 'default_sort_order' => 'asc',\n 'align' => '',\n 'separator' => '',\n 'empty_column' => 0,\n ),\n 'operations' => array(\n 'align' => '',\n 'separator' => '',\n 'empty_column' => 0,\n ),\n );\n $handler->display->display_options['style_options']['empty_table'] = TRUE;\n /* No results behavior: Global: Text area */\n $handler->display->display_options['empty']['area']['id'] = 'area';\n $handler->display->display_options['empty']['area']['table'] = 'views';\n $handler->display->display_options['empty']['area']['field'] = 'area';\n $handler->display->display_options['empty']['area']['content'] = 'There are no payments yet.';\n $handler->display->display_options['empty']['area']['format'] = 'filtered_html';\n /* Relationship: Payment: Payment method */\n $handler->display->display_options['relationships']['pmid']['id'] = 'pmid';\n $handler->display->display_options['relationships']['pmid']['table'] = 'payment';\n $handler->display->display_options['relationships']['pmid']['field'] = 'pmid';\n /* Relationship: Payment: Line items */\n $handler->display->display_options['relationships']['pid_line_item']['id'] = 'pid_line_item';\n $handler->display->display_options['relationships']['pid_line_item']['table'] = 'payment';\n $handler->display->display_options['relationships']['pid_line_item']['field'] = 'pid_line_item';\n /* Relationship: Payment: Last status item */\n $handler->display->display_options['relationships']['psiid_last']['id'] = 'psiid_last';\n $handler->display->display_options['relationships']['psiid_last']['table'] = 'payment';\n $handler->display->display_options['relationships']['psiid_last']['field'] = 'psiid_last';\n $handler->display->display_options['relationships']['psiid_last']['required'] = TRUE;\n /* Relationship: Payment: User */\n $handler->display->display_options['relationships']['uid']['id'] = 'uid';\n $handler->display->display_options['relationships']['uid']['table'] = 'payment';\n $handler->display->display_options['relationships']['uid']['field'] = 'uid';\n /* Field: Payment status item: Creation date and time */\n $handler->display->display_options['fields']['created']['id'] = 'created';\n $handler->display->display_options['fields']['created']['table'] = 'payment_status_item';\n $handler->display->display_options['fields']['created']['field'] = 'created';\n $handler->display->display_options['fields']['created']['relationship'] = 'psiid_last';\n $handler->display->display_options['fields']['created']['label'] = 'Last update';\n $handler->display->display_options['fields']['created']['date_format'] = 'long';\n /* Field: Payment status item: Status title */\n $handler->display->display_options['fields']['title']['id'] = 'title';\n $handler->display->display_options['fields']['title']['table'] = 'payment_status_item';\n $handler->display->display_options['fields']['title']['field'] = 'title';\n $handler->display->display_options['fields']['title']['relationship'] = 'psiid_last';\n $handler->display->display_options['fields']['title']['label'] = 'Status';\n /* Field: Payment: Currency code */\n $handler->display->display_options['fields']['currency_code']['id'] = 'currency_code';\n $handler->display->display_options['fields']['currency_code']['table'] = 'payment';\n $handler->display->display_options['fields']['currency_code']['field'] = 'currency_code';\n $handler->display->display_options['fields']['currency_code']['label'] = '';\n $handler->display->display_options['fields']['currency_code']['exclude'] = TRUE;\n $handler->display->display_options['fields']['currency_code']['element_label_colon'] = FALSE;\n $handler->display->display_options['fields']['currency_code']['hide_alter_empty'] = FALSE;\n /* Field: Broken/missing handler */\n $handler->display->display_options['fields']['amount']['id'] = 'amount';\n $handler->display->display_options['fields']['amount']['table'] = 'payment';\n $handler->display->display_options['fields']['amount']['field'] = 'amount';\n $handler->display->display_options['fields']['amount']['alter']['alter_text'] = TRUE;\n $handler->display->display_options['fields']['amount']['alter']['text'] = '[currency_code] [amount]';\n $handler->display->display_options['fields']['amount']['hide_alter_empty'] = FALSE;\n /* Field: Payment method: Title (specific) */\n $handler->display->display_options['fields']['title_specific']['id'] = 'title_specific';\n $handler->display->display_options['fields']['title_specific']['table'] = 'payment_method';\n $handler->display->display_options['fields']['title_specific']['field'] = 'title_specific';\n $handler->display->display_options['fields']['title_specific']['relationship'] = 'pmid';\n $handler->display->display_options['fields']['title_specific']['label'] = 'Payment method';\n $handler->display->display_options['fields']['title_specific']['hide_alter_empty'] = FALSE;\n /* Field: Payment method: Title (generic) */\n $handler->display->display_options['fields']['title_generic']['id'] = 'title_generic';\n $handler->display->display_options['fields']['title_generic']['table'] = 'payment_method';\n $handler->display->display_options['fields']['title_generic']['field'] = 'title_generic';\n $handler->display->display_options['fields']['title_generic']['relationship'] = 'pmid';\n /* Field: Payment: Operations */\n $handler->display->display_options['fields']['operations']['id'] = 'operations';\n $handler->display->display_options['fields']['operations']['table'] = 'payment';\n $handler->display->display_options['fields']['operations']['field'] = 'operations';\n /* Sort criterion: Payment status item: Creation date and time */\n $handler->display->display_options['sorts']['created']['id'] = 'created';\n $handler->display->display_options['sorts']['created']['table'] = 'payment_status_item';\n $handler->display->display_options['sorts']['created']['field'] = 'created';\n $handler->display->display_options['sorts']['created']['relationship'] = 'psiid_last';\n $handler->display->display_options['sorts']['created']['order'] = 'DESC';\n\n /* Display: Administration page */\n $handler = $view->new_display('page', 'Administration page', 'administration_page');\n $handler->display->display_options['defaults']['hide_admin_links'] = FALSE;\n $handler->display->display_options['defaults']['access'] = FALSE;\n $handler->display->display_options['access']['type'] = 'perm';\n $handler->display->display_options['access']['perm'] = 'payment.payment.view.any';\n $handler->display->display_options['defaults']['fields'] = FALSE;\n /* Field: Payment status item: Creation date and time */\n $handler->display->display_options['fields']['created']['id'] = 'created';\n $handler->display->display_options['fields']['created']['table'] = 'payment_status_item';\n $handler->display->display_options['fields']['created']['field'] = 'created';\n $handler->display->display_options['fields']['created']['relationship'] = 'psiid_last';\n $handler->display->display_options['fields']['created']['label'] = 'Last update';\n $handler->display->display_options['fields']['created']['date_format'] = 'long';\n /* Field: Payment status item: Status title */\n $handler->display->display_options['fields']['title']['id'] = 'title';\n $handler->display->display_options['fields']['title']['table'] = 'payment_status_item';\n $handler->display->display_options['fields']['title']['field'] = 'title';\n $handler->display->display_options['fields']['title']['relationship'] = 'psiid_last';\n $handler->display->display_options['fields']['title']['label'] = 'Status';\n /* Field: Payment: Currency code */\n $handler->display->display_options['fields']['currency_code']['id'] = 'currency_code';\n $handler->display->display_options['fields']['currency_code']['table'] = 'payment';\n $handler->display->display_options['fields']['currency_code']['field'] = 'currency_code';\n $handler->display->display_options['fields']['currency_code']['label'] = '';\n $handler->display->display_options['fields']['currency_code']['exclude'] = TRUE;\n $handler->display->display_options['fields']['currency_code']['element_label_colon'] = FALSE;\n $handler->display->display_options['fields']['currency_code']['hide_alter_empty'] = FALSE;\n /* Field: SUM(Payment line item: Total amount) */\n $handler->display->display_options['fields']['amount_total']['id'] = 'amount_total';\n $handler->display->display_options['fields']['amount_total']['table'] = 'payment_line_item';\n $handler->display->display_options['fields']['amount_total']['field'] = 'amount_total';\n $handler->display->display_options['fields']['amount_total']['relationship'] = 'pid_line_item';\n $handler->display->display_options['fields']['amount_total']['group_type'] = 'sum';\n $handler->display->display_options['fields']['amount_total']['label'] = 'Amount';\n /* Field: Payment method: Title (specific) */\n $handler->display->display_options['fields']['title_specific']['id'] = 'title_specific';\n $handler->display->display_options['fields']['title_specific']['table'] = 'payment_method';\n $handler->display->display_options['fields']['title_specific']['field'] = 'title_specific';\n $handler->display->display_options['fields']['title_specific']['relationship'] = 'pmid';\n $handler->display->display_options['fields']['title_specific']['label'] = 'Payment method';\n $handler->display->display_options['fields']['title_specific']['empty'] = 'Unavailable';\n $handler->display->display_options['fields']['title_specific']['hide_alter_empty'] = FALSE;\n /* Field: User: Name */\n $handler->display->display_options['fields']['name']['id'] = 'name';\n $handler->display->display_options['fields']['name']['table'] = 'users';\n $handler->display->display_options['fields']['name']['field'] = 'name';\n $handler->display->display_options['fields']['name']['relationship'] = 'uid';\n $handler->display->display_options['fields']['name']['label'] = 'User';\n /* Field: Payment: Operations */\n $handler->display->display_options['fields']['operations']['id'] = 'operations';\n $handler->display->display_options['fields']['operations']['table'] = 'payment';\n $handler->display->display_options['fields']['operations']['field'] = 'operations';\n $handler->display->display_options['defaults']['filter_groups'] = FALSE;\n $handler->display->display_options['defaults']['filters'] = FALSE;\n /* Filter criterion: Payment status item: Creation date and time */\n $handler->display->display_options['filters']['created']['id'] = 'created';\n $handler->display->display_options['filters']['created']['table'] = 'payment_status_item';\n $handler->display->display_options['filters']['created']['field'] = 'created';\n $handler->display->display_options['filters']['created']['relationship'] = 'psiid_last';\n $handler->display->display_options['filters']['created']['operator'] = 'between';\n $handler->display->display_options['filters']['created']['group'] = 1;\n $handler->display->display_options['filters']['created']['exposed'] = TRUE;\n $handler->display->display_options['filters']['created']['expose']['operator_id'] = 'created_op';\n $handler->display->display_options['filters']['created']['expose']['label'] = 'Last updated between';\n $handler->display->display_options['filters']['created']['expose']['operator'] = 'created_op';\n $handler->display->display_options['filters']['created']['expose']['identifier'] = 'updated';\n $handler->display->display_options['filters']['created']['expose']['remember'] = TRUE;\n /* Filter criterion: Payment status item: Status code */\n $handler->display->display_options['filters']['status']['id'] = 'status';\n $handler->display->display_options['filters']['status']['table'] = 'payment_status_item';\n $handler->display->display_options['filters']['status']['field'] = 'status';\n $handler->display->display_options['filters']['status']['relationship'] = 'psiid_last';\n $handler->display->display_options['filters']['status']['group'] = 1;\n $handler->display->display_options['filters']['status']['exposed'] = TRUE;\n $handler->display->display_options['filters']['status']['expose']['operator_id'] = 'status_op';\n $handler->display->display_options['filters']['status']['expose']['label'] = 'Current status';\n $handler->display->display_options['filters']['status']['expose']['operator'] = 'status_op';\n $handler->display->display_options['filters']['status']['expose']['identifier'] = 'status';\n $handler->display->display_options['filters']['status']['expose']['remember'] = TRUE;\n $handler->display->display_options['filters']['status']['expose']['multiple'] = TRUE;\n /* Filter criterion: Payment line item: Total amount */\n $handler->display->display_options['filters']['amount_total_1']['id'] = 'amount_total_1';\n $handler->display->display_options['filters']['amount_total_1']['table'] = 'payment_line_item';\n $handler->display->display_options['filters']['amount_total_1']['field'] = 'amount_total';\n $handler->display->display_options['filters']['amount_total_1']['relationship'] = 'pid_line_item';\n $handler->display->display_options['filters']['amount_total_1']['operator'] = 'between';\n $handler->display->display_options['filters']['amount_total_1']['group'] = 1;\n $handler->display->display_options['filters']['amount_total_1']['exposed'] = TRUE;\n $handler->display->display_options['filters']['amount_total_1']['expose']['operator_id'] = 'amount_total_1_op';\n $handler->display->display_options['filters']['amount_total_1']['expose']['label'] = 'Total amount between';\n $handler->display->display_options['filters']['amount_total_1']['expose']['operator'] = 'amount_total_1_op';\n $handler->display->display_options['filters']['amount_total_1']['expose']['identifier'] = 'amount_total_1';\n $handler->display->display_options['filters']['amount_total_1']['expose']['remember_roles'] = array(\n 2 => '2',\n 1 => 0,\n 3 => 0,\n );\n /* Filter criterion: Payment method: Title (specific) */\n $handler->display->display_options['filters']['title_specific']['id'] = 'title_specific';\n $handler->display->display_options['filters']['title_specific']['table'] = 'payment_method';\n $handler->display->display_options['filters']['title_specific']['field'] = 'title_specific';\n $handler->display->display_options['filters']['title_specific']['relationship'] = 'pmid';\n $handler->display->display_options['filters']['title_specific']['group'] = 1;\n $handler->display->display_options['filters']['title_specific']['exposed'] = TRUE;\n $handler->display->display_options['filters']['title_specific']['expose']['operator_id'] = 'title_specific_op';\n $handler->display->display_options['filters']['title_specific']['expose']['label'] = 'Payment method';\n $handler->display->display_options['filters']['title_specific']['expose']['operator'] = 'title_specific_op';\n $handler->display->display_options['filters']['title_specific']['expose']['identifier'] = 'payment_method';\n $handler->display->display_options['filters']['title_specific']['expose']['remember'] = TRUE;\n $handler->display->display_options['filters']['title_specific']['expose']['multiple'] = TRUE;\n /* Filter criterion: User: Name */\n $handler->display->display_options['filters']['uid']['id'] = 'uid';\n $handler->display->display_options['filters']['uid']['table'] = 'users';\n $handler->display->display_options['filters']['uid']['field'] = 'uid';\n $handler->display->display_options['filters']['uid']['relationship'] = 'uid';\n $handler->display->display_options['filters']['uid']['value'] = '';\n $handler->display->display_options['filters']['uid']['exposed'] = TRUE;\n $handler->display->display_options['filters']['uid']['expose']['operator_id'] = 'uid_op';\n $handler->display->display_options['filters']['uid']['expose']['label'] = 'User';\n $handler->display->display_options['filters']['uid']['expose']['operator'] = 'uid_op';\n $handler->display->display_options['filters']['uid']['expose']['identifier'] = 'uid';\n $handler->display->display_options['filters']['uid']['expose']['remember_roles'] = array(\n 2 => '2',\n 1 => 0,\n 3 => 0,\n );\n $handler->display->display_options['path'] = 'admin/content/payment';\n $handler->display->display_options['menu']['type'] = 'tab';\n $handler->display->display_options['menu']['title'] = 'Payments';\n $handler->display->display_options['menu']['weight'] = '0';\n $handler->display->display_options['menu']['name'] = 'management';\n $handler->display->display_options['menu']['context'] = 0;\n\n /* Display: User's own payments */\n $handler = $view->new_display('page', 'User\\'s own payments', 'user_page');\n $handler->display->display_options['defaults']['hide_admin_links'] = FALSE;\n $handler->display->display_options['defaults']['access'] = FALSE;\n $handler->display->display_options['access']['type'] = 'perm';\n $handler->display->display_options['access']['perm'] = 'payment.payment.view.own';\n $handler->display->display_options['defaults']['fields'] = FALSE;\n /* Field: Payment status item: Creation date and time */\n $handler->display->display_options['fields']['created']['id'] = 'created';\n $handler->display->display_options['fields']['created']['table'] = 'payment_status_item';\n $handler->display->display_options['fields']['created']['field'] = 'created';\n $handler->display->display_options['fields']['created']['relationship'] = 'psiid_last';\n $handler->display->display_options['fields']['created']['label'] = 'Last update';\n $handler->display->display_options['fields']['created']['date_format'] = 'long';\n /* Field: Payment status item: Status title */\n $handler->display->display_options['fields']['title']['id'] = 'title';\n $handler->display->display_options['fields']['title']['table'] = 'payment_status_item';\n $handler->display->display_options['fields']['title']['field'] = 'title';\n $handler->display->display_options['fields']['title']['relationship'] = 'psiid_last';\n $handler->display->display_options['fields']['title']['label'] = 'Status';\n /* Field: Payment: Currency code */\n $handler->display->display_options['fields']['currency_code']['id'] = 'currency_code';\n $handler->display->display_options['fields']['currency_code']['table'] = 'payment';\n $handler->display->display_options['fields']['currency_code']['field'] = 'currency_code';\n $handler->display->display_options['fields']['currency_code']['label'] = '';\n $handler->display->display_options['fields']['currency_code']['exclude'] = TRUE;\n $handler->display->display_options['fields']['currency_code']['element_label_colon'] = FALSE;\n $handler->display->display_options['fields']['currency_code']['hide_alter_empty'] = FALSE;\n /* Field: SUM(Payment line item: Total amount) */\n $handler->display->display_options['fields']['amount_total']['id'] = 'amount_total';\n $handler->display->display_options['fields']['amount_total']['table'] = 'payment_line_item';\n $handler->display->display_options['fields']['amount_total']['field'] = 'amount_total';\n $handler->display->display_options['fields']['amount_total']['relationship'] = 'pid_line_item';\n $handler->display->display_options['fields']['amount_total']['group_type'] = 'sum';\n $handler->display->display_options['fields']['amount_total']['label'] = 'Amount';\n /* Field: Payment method: Title (generic) */\n $handler->display->display_options['fields']['title_generic']['id'] = 'title_generic';\n $handler->display->display_options['fields']['title_generic']['table'] = 'payment_method';\n $handler->display->display_options['fields']['title_generic']['field'] = 'title_generic';\n $handler->display->display_options['fields']['title_generic']['relationship'] = 'pmid';\n $handler->display->display_options['fields']['title_generic']['label'] = 'Payment method';\n $handler->display->display_options['fields']['title_generic']['empty'] = 'Unavailable';\n /* Field: Payment: Operations */\n $handler->display->display_options['fields']['operations']['id'] = 'operations';\n $handler->display->display_options['fields']['operations']['table'] = 'payment';\n $handler->display->display_options['fields']['operations']['field'] = 'operations';\n $handler->display->display_options['defaults']['arguments'] = FALSE;\n /* Contextual filter: Payment: User ID */\n $handler->display->display_options['arguments']['uid']['id'] = 'uid';\n $handler->display->display_options['arguments']['uid']['table'] = 'payment';\n $handler->display->display_options['arguments']['uid']['field'] = 'uid';\n $handler->display->display_options['arguments']['uid']['default_action'] = 'not found';\n $handler->display->display_options['arguments']['uid']['default_argument_type'] = 'fixed';\n $handler->display->display_options['arguments']['uid']['summary']['number_of_records'] = '0';\n $handler->display->display_options['arguments']['uid']['summary']['format'] = 'default_summary';\n $handler->display->display_options['arguments']['uid']['summary_options']['items_per_page'] = '25';\n $handler->display->display_options['path'] = 'user/%/payment';\n $handler->display->display_options['menu']['type'] = 'tab';\n $handler->display->display_options['menu']['title'] = 'Payments';\n $handler->display->display_options['menu']['weight'] = '0';\n $handler->display->display_options['menu']['name'] = 'user-menu';\n $translatables['payments'] = array(\n t('Master'),\n t('Payments'),\n t('more'),\n t('Apply'),\n t('Reset'),\n t('Sort by'),\n t('Asc'),\n t('Desc'),\n t('Items per page'),\n t('- All -'),\n t('Offset'),\n t('« first'),\n t('‹ previous'),\n t('next ›'),\n t('last »'),\n t('There are no payments yet.'),\n t('Payment method'),\n t('Line items'),\n t('Last status item'),\n t('User'),\n t('Last update'),\n t('Status'),\n t('Broken handler payment.amount'),\n t('Title (generic)'),\n t('Operations'),\n t('Administration page'),\n t('Amount'),\n t('.'),\n t(','),\n t('Unavailable'),\n t('Last updated between'),\n t('Current status'),\n t('Total amount between'),\n t('User\\'s own payments'),\n t('All'),\n );\n\n // If Currency 1 is enabled, prefix the amount with the currency code. If\n // Currency 2 is enabled, the amount Views field handler takes care of amount\n // formatting.\n $version = payment_currency_version();\n foreach (array('administration_page', 'user_page') as $display_name) {\n if ($version == 1) {\n $view->display[$display_name]->display_options['fields']['amount_total'] += array(\n 'alter' => array(),\n );\n $view->display[$display_name]->display_options['fields']['amount_total']['alter'] += array(\n 'alter_text' => TRUE,\n 'text' => '[currency_code] [amount_total]',\n );\n $translatables['payments'][] = t('[currency_code] [amount]');\n }\n elseif ($version == 2) {\n $view->display[$display_name]->display_options['fields']['amount_total']['currency_code_field'] = 'payment_currency_code';\n }\n }\n\n return $view;\n}", "protected function generateView()\n {\n $this->getViewData();\n $this->generatePageHeader('GenoChoice&trade; - Ihr GenoChoice&trade; Fortschritt');\n $this->generateNavigationBarUser(4);\n $this->generatePageTitle();\n $this->generatePageDescription();\n\n $this->generateCurrentUser(false);\n $this->generateGenoChoiceProgress();\n\n $this->generatePageFooter(\"phase4.js\");\n }", "function default_template_xsell()\n{\n $template = '\n<h3>{lang}Also purchased{/lang}</h3>\n<div class=\"row shop-products\">\n <ul class=\"thumbnails\">\n {foreach from=$content_list item=node}\n {if $node.active == 1}\n <li class=\"item col-sm-6 col-md-4{if $node.is_new == 1} new{/if}{if $node.is_featured == 1} featured{/if}\">\n <div class=\"thumbnail text-center\">\n {if $node.discount > 0}<div class=\"description\"><span class=\"discount\">-{$node.discount|round}%</span></div>{/if}\n <a href=\"{$node.url}\" class=\"image\"><img src=\"{$node.image}\" alt=\"{$node.name}\"{if {$node.image_width} > 0} width=\"{$node.image_width}\"{/if}{if {$node.image_height} > 0} height=\"{$node.image_height}\"{/if} />\n {if $node.price}<span class=\"frame-overlay\"></span><span class=\"price\">{$node.price}</span>{/if}\n {product_label label_id={$node.label_id}}\n </a>\n <div class=\"inner notop nobottom text-left\">\n <h4 class=\"title\"><a href=\"{$node.url}\">{$node.name}</a></h4>\n {if $node.reviews > 0}<div class=\"description\"><span class=\"rating\">{$node.star_rating}</span> <span class=\"reviews\">{lang}Feedback{/lang}: {$node.reviews}</span></div>{/if}\n {if $node.old_price}<div class=\"description\">{lang}List Price{/lang}: <span class=\"old-price\"><del>{$node.old_price}</del></span></div>{/if}\n {if $node.price_save}<div class=\"description\">{lang}You Save{/lang}: <span class=\"save\">{$node.price_save} ({$node.price_save_percent|round}%)</span></div>{/if}\n <div class=\"description\">{$node.short_description|strip_tags|truncate:30:\"...\":true}</div>\n <div class=\"description\">{attribute_list product_id=$node.id}</div>\n </div>\n </div>\n {product_form product_id={$node.id}}\n <div class=\"inner darken notop\">\n <button class=\"btn btn-default btn-add-to-cart\" type=\"submit\" value=\"{lang}Buy{/lang}\"><i class=\"fa fa-shopping-cart\"></i> {lang}Buy{/lang}</button>\n </div>\n {/product_form}\n </li>\n {/if}\n {/foreach}\n </ul>\n</div>\n';\n return $template;\n}", "public function toHtml($_version = 'dashboard')\n\t{\n\t\t$replace = $this->preToHtml($_version);\n\t\tif (!is_array($replace)) {\n\t\t\treturn $replace;\n\t\t}\n\t\t$version = jeedom::versionAlias($_version);\n\n\t\t// Design parameters related to selected display (mobile vs desktop and w/ vs w/o logo)\n\t\t$template = $this->getConfiguration('templatewidget');\n\t\t$PicSize = 60;\n\t\tif($template == 'default') {\n\t\t\t$replace['#TemplateWidth#'] = 400;\n\t\t\t$replace['#opacity#'] = 100;\n\t\t\t$replace['#TextMargin#'] = 80;\n\t\t\t$replace['#logowidth#'] = 60;\n\t\t} elseif($template == '0logo') {\n\t\t\t$replace['#TemplateWidth#'] = 180;\n\t\t\t$replace['#opacity#'] = 0;\n\t\t\t$replace['#TextMargin#'] = 10;\n\t\t\t$replace['#logowidth#'] = 0;\n\t\t}else{\n\t\t\treturn parent::toHtml($_version);\n\t\t}\n\t\tif ($_version != 'dashboard') {\n\t\t\t$PicSize = $PicSize/2;\n\t\t\t$replace['#TextMargin#'] = $replace['#TextMargin#']/2;\n\t\t\t$replace['#logowidth#'] = $replace['#logowidth#']/2;\n\t\t}\n\n\t\t// Fuel station template\n\t\t$GazStation_html = '';\n\t\t$GazStation_template = getTemplate('core', $version, 'gazstation.template', 'prixcarburants');\n\t\t$GazStation_Qtty = 0;\n\n\t\t$EmptyStation = 0;\n\t\tfor ($i = 1; $i <= 20; $i++) {\n\t\t\tif (is_object($this->getCmd(null, 'TopAdresse_' . $i))) {\n\t\t\t\t$arr['prix']='';\n\t\t\t $arr['logo']='';\n\t\t\t $arr['maj']='';\n\t\t\t\t$TopAdresse = $this->getCmd(null, 'TopAdresse_' . $i);\n\t\t\t\t$replace['#TopMarque#'] = is_object($TopAdresse) ? explode(\",\", $TopAdresse->execCmd())[0] : '';\n\t\t\t\t$replace['#TopVille#'] = is_object($TopAdresse) ? explode(\",\", $TopAdresse->execCmd())[1] : '';\n\t\t\t\tif($replace['#TopMarque#'] == __('Plus de station disponible dans le rayon sélectionné', __FILE__)) $EmptyStation++;\n\n\t\t\t\t$FullAdress = $this->getCmd(null, 'TopAdresseCompl_' . $i);\n\t\t\t\t$replace['#FullAdress#'] = is_object($FullAdress) ? $FullAdress->execCmd() : '';\n\n\t\t\t\t$PrixStation = $this->getCmd(null, 'TopPrix_' . $i);\n\t\t\t\tif(is_object($PrixStation)) {\n\t\t\t\t\t$replace['#TopPrix#'] = $PrixStation->execCmd() != '' ? '<a style=\"font-weight: bold;\">'.$PrixStation->execCmd().'</a> €/l' : '';\n\t\t\t\t} else {\n\t\t\t\t\t$replace['#TopPrix#'] = '';\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t\t$MajStation = $this->getCmd(null, 'TopMaJ_' . $i);\n\t\t\t\tif(is_object($MajStation)) {\n\t\t\t\t\t$replace['#TopMaJ#'] = $MajStation->execCmd() != '' ? __('le ', __FILE__) . $MajStation->execCmd() : '';\n\t\t\t\t} else {\n\t\t\t\t\t$replace['#TopMaJ#'] = '';\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t\tif ($template == \"default\") {\n\t\t\t\t\t$LogoStation = $this->getCmd(null, 'TopLogo_' . $i);\n\t\t\t\t\t$replace['#LogoStation#'] = is_object($LogoStation) ? '<img src=\"'.$LogoStation->execCmd().'\" style=\"max-width: '.$PicSize.'px; max-height: '.$PicSize.'px;\">' : '';\n\t\t\t\t} else {\n\t\t\t\t\t$replace['#LogoStation#'] = ' ';\n\t\t\t\t}\n\n\t\t\t\tif($EmptyStation <= 1) {\n\t\t\t\t\t$GazStation_html .= template_replace($replace, $GazStation_template);\n\t\t\t\t\t$GazStation_Qtty++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$replace['#GazStation#'] = $GazStation_html;\n\t\t$replace['#TemplateHeight#'] = 80 * $GazStation_Qtty;\n\n\t\t$replace['#PrixCarburants#'] = $this->getName();\n\n\t\t$refresh = $this->getCmd(null, 'refresh');\n\t\t$replace['#refresh#'] = is_object($refresh) ? $refresh->getId() : '';\n\n\t\treturn $this->postToHtml($_version, template_replace($replace, getTemplate('core', $version, 'prixcarburants.template', 'prixcarburants')));\n\t}", "function it_exchange_easy_eu_vat_set_checkout_mode_on_invoice_page() {\n\n\t$product_id = it_exchange_get_the_product_id();\n\n\tif ( it_exchange_get_product_type( $product_id ) !== 'invoices-product-type' ) {\n\t\treturn;\n\t}\n\n\techo '<script> var ITExchangeEasyValueAddedTaxesCheckoutPage = true;</script>';\n}", "public function load_view() {\n\n // Load the theme\n md_include_component_file(MIDRUB_BASE_PAYMENTS . 'themes/default/main.php');\n \n }", "protected function render()\n {\n $aSettings = $this->get_settings_for_display();\n ?>\n <section class=\"pricing-section gray-bg4 pt-75 pb-45\">\n <div class=\"container\">\n <div class=\"row justify-content-center\">\n <div class=\"col-lg-8 text-center\">\n <div class=\"section-title\">\n <h2><?php echo esc_attr($aSettings['title']); ?></h2>\n <p><?php echo esc_attr($aSettings['sub-title-line1']); ?> <br><?php echo esc_attr($aSettings['sub-title-line2']); ?></p>\n </div>\n </div>\n </div>\n <div class=\"row \">\n\n <!-- Pricing Block -->\n <?php foreach ($aSettings['pricings'] as $aPricings) : ?>\n <div class=\"<?php echo esc_attr($aPricings['col']); ?> wow customFadeInLeft animated\" style=\"visibility: visible; animation-name: customFadeInLeft;\">\n <div class=\"pricing-block\">\n <div class=\"inner-box\">\n <h5><?php echo esc_attr($aPricings['name']); ?></h5>\n <h4 class=\"price\"><?php echo esc_attr($aPricings['price']); ?></h4>\n <h5 class=\"time-limit\"><?php echo esc_attr($aPricings['time-limit']); ?></h5>\n <ul class=\"featureds\">\n <?php echo ($aPricings['featureds']); ?>\n </ul>\n <div class=\"btn-box\">\n <a href=\"<?php echo esc_attr($aPricings['btn-box-href']); ?>\" class=\"theme-btn\"><?php echo esc_attr($aPricings['btn-box']); ?></a>\n </div>\n <div class=\"hover\"></div>\n </div>\n \n </div>\n </div> \n <?php endforeach; ?>\n </div>\n </div>\n </section>\n <?php\n }", "public function generate() {\r\n if (TL_MODE == 'BE') {\r\n $objTemplate = new BackendTemplate('be_wildcard');\r\n\r\n $objTemplate->wildcard = '### ACQUISTO WARENKORB ###';\r\n $objTemplate->title = $this->headline;\r\n $objTemplate->id = $this->id;\r\n $objTemplate->link = $this->name;\r\n $objTemplate->href = 'contao/main.php?do=themes&amp;table=tl_module&amp;act=edit&amp;id=' . $this->id;\r\n\r\n return $objTemplate->parse();\r\n }\r\n\r\n $this->import('FrontendUser', 'Member');\r\n $this->Import('acquistoShopBasket', 'Basket');\r\n $this->Import('acquistoShopPayment', 'Payment');\r\n $this->Import('acquistoShopProdukt', 'Produkt');\r\n $this->Import('acquistoShopGutschein', 'Gutschein');\r\n $this->Import('acquistoShop', 'Shop');\r\n\r\n switch(strtolower($GLOBALS['TL_CONFIG']['versandberechnung'])) {\r\n case \"gewicht\":\r\n $this->strVersandberechnung = \"gewicht\";\r\n $this->floatBerechnung = $this->Basket->getWeight();\r\n break;;\r\n default:\r\n $this->strVersandberechnung = \"preis\";\r\n $this->floatBerechnung = $this->Basket->getCosts();\r\n break;;\r\n }\r\n\r\n return parent::generate();\r\n }", "protected function _construct() {\n parent::_construct();\n $this->setTemplate('mpay24/info/acceptpayment.phtml');\n }", "function addTemplate()\n\t{\t\t\n\t\t$this->m_bkTemplate->bk_addTemplate();\n\t}", "function showvendor_message_onview(){\n\t\tif(wac_is_vendor()){\n\t\t\techo wac_get_template('single-product/add-to-cart/auction-vendor.php');\n\t\t}\n\t}", "function wp_experts_vc_after_init(){\r\n \r\n require_once ( get_template_directory() . '/vc_params/vc_rows.php' );\r\n require_once( get_template_directory() . '/vc_params/vc_column.php' );\r\n require_once( get_template_directory() . '/vc_params/vc_pie.php' );\r\n require_once( get_template_directory() . '/vc_params/vc_tta_section.php' );\r\n require_once( get_template_directory() . '/inc/fontlibs/glyphicons.php' );\r\n \r\n vc_remove_element( \"vc_button\" );\r\n vc_remove_element( \"vc_button2\" );\r\n vc_remove_element( \"vc_cta_button\" );\r\n vc_remove_element( \"vc_cta_button2\" );\r\n vc_remove_element( \"vc_cta\" );\r\n vc_remove_element( \"cms_fancybox\" );\r\n vc_remove_element( \"cms_counter\" );\r\n}", "function register_vc_add_on(){\r\n\r\n vc_map( array(\r\n \"name\" => $this->name,\r\n \"base\" => $this->id,\r\n \"icon\" => $this->icon,\r\n \"description\" => $this->description,\r\n \"weight\" => 1,\r\n\r\n \"wrapper_height\"=> 'full',\r\n\r\n \"category\" => __( 'BetterMag Addons', 'better-studio' ),\r\n \"params\" => array(\r\n array(\r\n \"type\" => 'textfield',\r\n \"admin_label\" => true,\r\n \"heading\" => __( 'Section Title', 'better-studio' ),\r\n \"param_name\" => 'title',\r\n \"value\" => $this->defaults['title'],\r\n ),\r\n array(\r\n \"type\" => 'bf_switchery',\r\n \"heading\" => __( 'Show Title?', 'better-studio'),\r\n \"param_name\" => 'show_title',\r\n \"value\" => $this->defaults['show_title'],\r\n ),\r\n array(\r\n \"type\" => 'textfield',\r\n \"admin_label\" => true,\r\n \"heading\" => __( 'Dribbble ID', 'better-studio' ),\r\n \"param_name\" => 'user_id',\r\n \"value\" => $this->defaults['user_id'],\r\n ),\r\n array(\r\n \"type\" => 'textfield',\r\n \"admin_label\" => true,\r\n \"heading\" => __( 'Access Token', 'better-studio' ),\r\n \"param_name\" => 'access_token',\r\n \"value\" => $this->defaults['access_token'],\r\n ),\r\n array(\r\n \"type\" => 'textfield',\r\n \"admin_label\" => true,\r\n \"heading\" => __( 'Number of Shots', 'better-studio' ),\r\n \"param_name\" => 'photo_count',\r\n \"value\" => $this->defaults['photo_count'],\r\n ),\r\n array(\r\n 'heading' => __( 'Columns', 'better-studio' ),\r\n 'type' => 'bf_select',\r\n \"admin_label\" => false,\r\n 'options' => array(\r\n 2 => __( '2 column', 'better-studio' ),\r\n 3 => __( '3 column', 'better-studio' ),\r\n ),\r\n \"value\" => $this->defaults['column'],\r\n \"param_name\" => 'column',\r\n ),\r\n array(\r\n 'heading' => __( 'Show More Shots Link:', 'better-studio' ),\r\n 'type' => 'bf_select',\r\n \"admin_label\" => true,\r\n 'options' => array(\r\n 'show' => __( 'Show', 'better-studio' ),\r\n 'hide' => __( 'Hide', 'better-studio' ),\r\n ),\r\n \"value\" => $this->defaults['more'],\r\n \"param_name\" => 'more',\r\n )\r\n )\r\n ) );\r\n\r\n }", "private function addMainTemplate() {\n\t\t$this->_registry->getObject('template')->addTemplateBit('main', 'main.tpl.html');\n\t\t$this->_registry->getObject('template')->getPage()->addTag('main_content', $this->_model->getContent());\n\t}", "public function page() {\n $this->loadAssets();\n\n $Currency = new LaterPayModelCurrency();\n $LaterPayModelCategory = new LaterPayModelCategory();\n $Categories = $LaterPayModelCategory->getCategoriesPrices();\n $Currencies = $Currency->getCurrencies();\n\n $this->assign('Categories', $Categories);\n $this->assign('Currencies', $Currencies);\n $this->assign('currency', get_option('laterpay_currency'));\n $this->assign('plugin_is_in_live_mode', get_option('laterpay_plugin_is_in_live_mode') == 1);\n $this->assign('global_default_price', ViewHelper::formatNumber((float)get_option('laterpay_global_price'), 2));\n\n $this->render('pluginBackendPricingTab');\n }", "function eb_new_retirement_calculator_view(){\n\t\tob_start();\n\t\tinclude_once( EB_CALC_DIR_PATH . '/views/retirement_future_calculator_view.php' );\n\t\treturn ob_get_clean();\n\t}", "function html() {\n\t\t\n\t\t// load view\n\t\tacf_get_view($this->view, $this->data);\n\t\t\n\t}", "function bonuin_invoices_menu_initiate() {\r\n add_menu_page(\r\n 'Package Invoices',\r\n 'Package Invoices',\r\n 'manage_options',\r\n 'bonuin_package_invoices',\r\n 'bonuin_invoice_view' , get_template_directory_uri().'/assets/img/bonuin_admin_icon.png' , 5 );\r\n}", "public function content_template() {\n\t\t?>\n\n\t\t<label>\n\t\t\t<# if ( data.label ) { #>\n\t\t\t\t<span class=\"customize-control-title\">{{ data.label }}</span>\n\t\t\t\t<# } #>\n\n\t\t\t\t\t<# if ( data.description ) { #>\n\t\t\t\t\t\t<span class=\"description customize-control-description\">{{ data.description }}</span>\n\t\t\t\t\t\t<# } #>\n\n\t\t\t\t\t\t\t<# if( data.edit_link ){ #>\n\t\t\t\t\t\t\t\t<# _.each(data.edit_link, function(v, k) { #>\n\t\t\t\t\t\t\t\t\t<!-- wp-playlist-caption class is added to not add customize changeset to this link -->\n\t\t\t\t\t\t\t\t\t<a href=\"{{{v}}}\" class=\"wp-playlist-caption\"><div id=\"{{k}}-editor-button\" class=\"button button-primary\">\n\t\t\t\t\t\t\t\t\t\t\t<# if( k === 'elementor') {#>\n\t\t\t\t\t\t\t\t\t\t\t\t<i class=\"eicon-elementor\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t\t\t\t\t\t\t\tEdit with {{k}}\n\t\t\t\t\t\t\t\t\t\t</div></a>\n\t\t\t\t\t\t\t\t\t<# }) #>\n\t\t\t\t\t\t\t\t\t\t<# } #>\n\n\t\t</label>\n\t\t<?php\n\t}", "public function page_init() {\r\n register_setting(\r\n 'freelancer_option_group', // Option group\r\n 'freelancer_option_name', // Option name\r\n array($this, 'sanitize') // Sanitize\r\n );\r\n\r\n add_settings_section(\r\n 'setting_section_id', // ID\r\n 'Price for user post and vote on site', // Title\r\n array($this, 'print_section_info'), // Callback\r\n 'freelancer-setting-admin' // Page\r\n );\r\n\r\n add_settings_field(\r\n 'price_per_post', // ID\r\n 'Price per post', // Title \r\n array($this, 'price_per_post_callback'), // Callback\r\n 'freelancer-setting-admin', // Page\r\n 'setting_section_id' // Section \r\n );\r\n\r\n add_settings_field(\r\n 'price_per_vote', 'Price per vote', array($this, 'price_per_vote_callback'), 'freelancer-setting-admin', 'setting_section_id'\r\n );\r\n\r\n add_settings_section(\r\n 'setting_section_id_2', // ID\r\n 'Price of Package', // Title\r\n array($this, 'print_package_info'), // Callback\r\n 'freelancer-setting-admin' // Page\r\n );\r\n\r\n add_settings_field(\r\n 'price_of_package_a', 'Price of Package A', array($this, 'price_of_package_a_callback'), 'freelancer-setting-admin', 'setting_section_id_2'\r\n );\r\n\r\n add_settings_field(\r\n 'price_of_package_b', 'Price of Package B', array($this, 'price_of_package_b_callback'), 'freelancer-setting-admin', 'setting_section_id_2'\r\n );\r\n\r\n add_settings_field(\r\n 'price_of_package_c', 'Price of Package C', array($this, 'price_of_package_c_callback'), 'freelancer-setting-admin', 'setting_section_id_2'\r\n );\r\n }", "function pmp_modal_underscore_template() { ?>\n<script type=\"text/template\" id=\"pmp-modal-tmpl\">\n\t<div class=\"pmp-modal-header\">\n\t\t<div class=\"pmp-modal-close\"><span class=\"close\">&#10005;</span></div>\n\t</div>\n\t<div class=\"pmp-modal-content\"><% if (content) { %><%= content %><% } %></div>\n\t<div class=\"pmp-modal-actions\">\n\t\t<span class=\"spinner\"></span>\n\t\t<% _.each(actions, function(v, k) { %>\n\t\t\t<a href=\"#\" class=\"<%= k %> button button-primary\"><%= k %></a>\n\t\t<% }); %>\n\t</div>\n</script><?php\n}", "public function initContent()\n {\n parent::initContent();\n\n $orders = $this->getTemplateVarOrders();\n\n foreach ($orders as $order) {\n MootaOverrideUtil::addUniqueCode($order);\n }\n\n $this->context->smarty->assign(array('orders' => $orders));\n\n $this->setTemplate('customer/history');\n }", "private function add_custom_templates() {\n\t\t$views = new View();\n\t\t$views->custom_templates();\n\t}", "protected function content_template() {\n\t\t?>\n\t\t<#\n\t\tview.addInlineEditingAttributes( 'target', 'none' );\n\t\t#>\n\t\t<?php\n\t\tif ( \\Elementor\\Plugin::$instance->editor->is_edit_mode() ) { ?>\n\t\t\t<div style=\"<?php echo self::CSS; ?>\">\n\t\t\t\t<?php _e( 'Elementor Widget Connector for Ajax Load More', 'alm-elementor' ); ?>\n\t\t\t\t<br/>\n\t\t\t\t<span style=\"opacity: 0.75; font-weight: 400;\">';\n\t\t\t\t<?php _e('Preview or launch the live URL to view Ajax Load More content.', 'alm-elementor' ); ?>\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t<?php }\n\t}", "public function output_widget_control_templates()\n {\n }", "function setupTemplate() {\n\t\tparent::setupTemplate();\n\t\tAppLocale::requireComponents(LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_APPLICATION_COMMON, LOCALE_COMPONENT_PKP_GRID);\n\t}", "function viewotwpickup(){\n $del = new DeliveryModel();\n return $del->viewotwpickup();\n }", "function register_vc_add_on(){\r\n\r\n vc_map( array(\r\n \"name\" => $this->name,\r\n \"base\" => $this->id,\r\n \"icon\" => $this->icon,\r\n \"description\" => $this->description,\r\n \"weight\" => 1,\r\n\r\n \"wrapper_height\"=> 'full',\r\n\r\n \"category\" => __( 'BetterMag Addons', 'better-studio' ),\r\n \"params\" => array(\r\n\r\n array(\r\n \"type\" => 'textfield',\r\n \"admin_label\" => true,\r\n \"heading\" => __( 'Section Title', 'better-studio' ),\r\n \"param_name\" => 'title',\r\n \"value\" => $this->defaults['title'],\r\n ),\r\n array(\r\n \"type\" => 'bf_switchery',\r\n \"heading\" => __( 'Show Title?', 'better-studio'),\r\n \"param_name\" => 'show_title',\r\n \"value\" => $this->defaults['show_title'],\r\n ),\r\n array(\r\n \"type\" => 'bf_image_radio',\r\n \"heading\" => __( 'Style', 'better-studio' ),\r\n \"param_name\" => 'style',\r\n 'section_class' => 'style-floated-left',\r\n \"admin_label\" => true,\r\n \"options\" => array(\r\n 'style-1' => array(\r\n 'label' => __( 'Style 1', 'better-studio' ),\r\n 'img' => BETTER_MAG_URI . 'includes/admin-assets/images/widget-twitter-style-1.png',\r\n ),\r\n 'style-2' => array(\r\n 'label' => __( 'Style 2', 'better-studio' ),\r\n 'img' => BETTER_MAG_URI . 'includes/admin-assets/images/widget-twitter-style-2.png',\r\n ),\r\n 'style-3' => array(\r\n 'label' => __( 'Style 3', 'better-studio' ),\r\n 'img' => BETTER_MAG_URI . 'includes/admin-assets/images/widget-twitter-style-3.png',\r\n ),\r\n 'style-4' => array(\r\n 'label' => __( 'Style 4', 'better-studio' ),\r\n 'img' => BETTER_MAG_URI . 'includes/admin-assets/images/widget-twitter-style-4.png',\r\n ),\r\n ),\r\n \"value\" => $this->defaults['style'],\r\n ),\r\n array(\r\n 'heading' => __( 'Instructions', 'better-studio' ),\r\n 'param_name' => 'help',\r\n 'type' => 'bf_info',\r\n 'value' => __('\r\n<p>You need to authenticate yourself to Twitter with creating an app for get access information to retrieve your tweets and display them on your page.</p><ol>\r\n <li>Go to <a href=\"http://goo.gl/tyCR5W\" target=\"_blank\">https://apps.twitter.com/app/new</a> and log in, if necessary</li>\r\n <li>Enter your Application Name, Description and your website address. You can leave the callback URL empty.</li>\r\n <li>Submit the form by clicking the Create your Twitter Application</li>\r\n <li>Go to the \"Keys and Access Token\" tab and copy the consumer key (API key) and consumer secret</li>\r\n <li>Paste them in the following input boxes</li>\r\n <li>Click on the \"Create my access token\" in bottom of page for creating access token and copy them</li>\r\n <li>Paste them in the following input boxes</li>\r\n </ol>\r\n ', 'better-studio' ),\r\n 'state' => 'open',\r\n 'info-type' => 'help',\r\n 'section_class' => 'widefat',\r\n ),\r\n array(\r\n \"type\" => 'textfield',\r\n \"admin_label\" => true,\r\n \"heading\" => __( 'Username', 'better-studio' ),\r\n \"param_name\" => 'username',\r\n \"value\" => $this->defaults['username'],\r\n ),\r\n array(\r\n \"type\" => 'textfield',\r\n \"admin_label\" => false,\r\n \"heading\" => __( 'Consumer Key', 'better-studio' ),\r\n \"param_name\" => 'consumer_key',\r\n \"value\" => $this->defaults['consumer_key'],\r\n ),\r\n array(\r\n \"type\" => 'textfield',\r\n \"admin_label\" => false,\r\n \"heading\" => __( 'Consumer Secret', 'better-studio' ),\r\n \"param_name\" => 'consumer_secret',\r\n \"value\" => $this->defaults['consumer_secret'],\r\n ),\r\n array(\r\n \"type\" => 'textfield',\r\n \"admin_label\" => false,\r\n \"heading\" => __( 'Access Secret', 'better-studio' ),\r\n \"param_name\" => 'access_secret',\r\n \"value\" => $this->defaults['access_secret'],\r\n ),\r\n array(\r\n \"type\" => 'textfield',\r\n \"admin_label\" => false,\r\n \"heading\" => __( 'Access Token', 'better-studio' ),\r\n \"param_name\" => 'access_token',\r\n \"value\" => $this->defaults['access_token'],\r\n ),\r\n array(\r\n \"type\" => 'textfield',\r\n \"admin_label\" => true,\r\n \"heading\" => __( 'Number of Tweets', 'better-studio' ),\r\n \"param_name\" => 'tweets_count',\r\n \"value\" => $this->defaults['tweets_count'],\r\n ),\r\n array(\r\n \"type\" => 'bf_switchery',\r\n \"admin_label\" => true,\r\n \"heading\" => __( 'Open Tweet Links in New Page', 'better-studio' ),\r\n \"param_name\" => 'link_new_page',\r\n \"value\" => $this->defaults['link_new_page'],\r\n ),\r\n )\r\n ) );\r\n\r\n }", "private function renderTemplateInHook($template)\n {\n $id_lang = $this->context->language->id;\n\n $id_product = (int)Tools::getValue('id_product');\n //$product = new Product($id_product, false, $this->context->language->id);\n //$id_product = Tools::getValue('price');\n $price = Product::getPriceStatic(Tools::getValue('id_product'), true, null, 2);\n $priceWithouthDiscount = Product::getPriceStatic(Tools::getValue('id_product'), true, null, 2);\n $product = new Product($id_product, false, $this->context->language->id);\n /* Como obtener los taxes */\n $taxes = Tax::getTaxes();\n /* Como obtener el grupo de taxes*/\n $groupTaxes = TaxRulesGroup::getTaxRulesGroupsForOptions();\n /*Así extraigo el grupo de taxes */\n $product->id_tax_rules_group;\n /*Lo que paso a retrieveById está mal...\n Sin embargo esta función me devuelve toda la información alrededor de una regla de impuesto\n Array ( \n [id_tax_rule] => 1 \n [id_tax_rules_group] => 1 \n [id_country] => 3 \n [id_state] => 0 \n [zipcode_from] => 0 \n [zipcode_to] => 0 \n [id_tax] => 1 \n [behavior] => 0 \n [description] => )\n \n */\n $retrieve = TaxRule::retrieveById($product->id_tax_rules_group);\n /*Si le paso el id de un producto, me devuelte el tipo impositivo que aplica sobre el*/\n $getTaxes = Tax::getProductTaxRate(Tools::getValue('id_product'));\n \n \n\n $elements = [];\n $elements[1]['type_link'] = \"\";\n $elements[1]['link'] = \"\";\n $elements[1]['icon'] = \"\";\n //$elements[1]['title'] = \"HOLA MUNDO, el precio es: \" . $product->price;\n //$elements[1]['title'] = \"HOLA MUNDO, el precio es: \" . print_r($product);\n //$elements[1]['title'] = \"HOLA MUNDO, el precio es: <pre>\" . print_r($taxes) . \"</pre>\";\n //$elements[1]['title'] = \"HOLA MUNDO, el precio es: <pre>\" . print_r($groupTaxes) . \"</pre>\";\n $elements[1]['title'] = \"HOLA MUNDO, el precio es: \" . $price;\n //$elements[1]['title'] = \"HOLA MUNDO, el precio es: \" . $product->id_tax_rules_group;\n //$elements[1]['title'] = \"HOLA MUNDO, el precio es: \" . print_r($retrieve);\n //$elements[1]['title'] = \"HOLA MUNDO, el precio es: \" . print_r($getTaxes);\n $elements[1]['description'] = \"HOLA A TODO EL MUNDO\";\n\n \n\n $precio = $product->price;\n $precioConTax = $this->calculatePriceWithTax($precio, $getTaxes);\n $obtainDiscountAbsolute = $this->obtainDiscount($price, $precioConTax);\n\n $unArray[\"has_discount\"] = true;\n $unArray[\"regular_price\"] = $priceWithouthDiscount;\n $this->context->smarty->assign([\n 'precioConTax' => $precioConTax,\n 'product' => $product,\n 'taxRule' => $getTaxes,\n 'precio' => $priceWithouthDiscount,\n 'productHasDiscount' => $unArray[\"has_discount\"], \n 'productShowPrice' => true, \n //'productRegularPrice' => $unArray[\"regular_price\"],\n 'productRegularPrice' => $precioConTax,\n 'productPrice' => $price,\n 'productDiscountType' => 'percentage',\n 'productDiscountPercentageAbsolute' => $obtainDiscountAbsolute,\n 'blocks' => $elements,\n 'iconColor' => \"\",\n 'textColor' => '#00ff00',\n // constants\n 'LINK_TYPE_NONE' => ReassuranceActivity::TYPE_LINK_NONE,\n 'LINK_TYPE_CMS' => ReassuranceActivity::TYPE_LINK_CMS_PAGE,\n 'LINK_TYPE_URL' => ReassuranceActivity::TYPE_LINK_URL,\n ]);\n\n return $this->context->smarty->display(dirname(__FILE__). '/views/templates/hook/' . $template);\n }", "public function main()\n {\n $typo3VersionArray = VersionNumberUtility::convertVersionStringToArray(VersionNumberUtility::getCurrentTypo3Version());\n $this->typo3VersionMain = $typo3VersionArray['version_main'];\n\n if ($this->typo3VersionMain > 6) {\n $this->iconFactory = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Core\\\\Imaging\\\\IconFactory');\n }\n\n if ($this->pObj->id) {\n $result = $this->createModuleContentForPage();\n } else {\n $result = '<p>' . $GLOBALS['LANG']->getLL('no_page_id') . '</p>';\n }\n\n return $result;\n }", "function freightratemaster(){\n \t\n \n\t$this->view->render(\"master/freightratemaster\",true);\n\t\n}", "function display($tpl = null) {\n\n //TODO get plugins running\n//\t\t$dispatcher\t= JDispatcher::getInstance();\n//\t\t$limitstart\t= JRequest::getVar('limitstart', 0, '', 'int');\n \n $show_prices = VmConfig::get('show_prices', 1);\n if ($show_prices == '1') {\n if (!class_exists('calculationHelper'))\n require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'calculationh.php');\n }\n $this->assignRef('show_prices', $show_prices);\n\n $document = JFactory::getDocument();\n\n /* add javascript for price and cart */\n vmJsApi::jPrice();\n\n $mainframe = JFactory::getApplication();\n $pathway = $mainframe->getPathway();\n $task = JRequest::getCmd('task');\n\n /* Set the helper path */\n $this->addHelperPath(JPATH_VM_ADMINISTRATOR . DS . 'helpers');\n\n //Load helpers\n $this->loadHelper('image');\n\n//\t\t$product = $this->get('product');\t//Why it is sensefull to use this construction? Imho it makes it just harder\n $product_model = VmModel::getModel('product');\n $this->assignRef('product_model', $product_model);\n $virtuemart_product_idArray = JRequest::getInt('virtuemart_product_id', 0);\n if (is_array($virtuemart_product_idArray)) {\n $virtuemart_product_id = $virtuemart_product_idArray[0];\n } else {\n $virtuemart_product_id = $virtuemart_product_idArray;\n }\n\n //Get Product config\n $product_config_model = VmModel::getModel('Product_Config');\n $product_config = $product_config_model->getProductConfig();\n $this->assignRef('product_config', $product_config);\n\n $quantityArray = JRequest::getVar('quantity', array()); //is sanitized then\n JArrayHelper::toInteger($quantityArray);\n\n $quantity = 1;\n if (!empty($quantityArray[0])) {\n $quantity = $quantityArray[0];\n }\n $this->hit($virtuemart_product_id);\n $product = $product_model->getProduct($virtuemart_product_id, TRUE, TRUE, TRUE, $quantity);\n $last_category_id = shopFunctionsF::getLastVisitedCategoryId();\n if (empty($product->slug)) {\n\n //Todo this should be redesigned to fit better for SEO\n $mainframe->enqueueMessage(JText::_('COM_VIRTUEMART_PRODUCT_NOT_FOUND'));\n\n $categoryLink = '';\n if (!$last_category_id) {\n $last_category_id = JRequest::getInt('virtuemart_category_id', false);\n }\n if ($last_category_id) {\n $categoryLink = '&virtuemart_category_id=' . $last_category_id;\n }\n\n $mainframe->redirect(JRoute::_('index.php?option=com_virtuemart&view=category' . $categoryLink . '&error=404'));\n\n return;\n }\n\n if (!empty($product->customfields)) {\n foreach ($product->customfields as $k => $custom) {\n if (!empty($custom->layout_pos)) {\n $product->customfieldsSorted[$custom->layout_pos][] = $custom;\n unset($product->customfields[$k]);\n }\n }\n $product->customfieldsSorted['normal'] = $product->customfields;\n unset($product->customfields);\n }\n\n $color_list = array();\n $size_list = array();\n\n if ($product->customfieldsCart) {\n foreach ($product->customfieldsCart as $key => $value) {\n if ($value->options) {\n if ($value->custom_title == 'Color') {\n foreach ($value->options as $color) {\n if ($color->custom_value) {\n $color_list[$color->virtuemart_customfield_id]['custom_value'] = $color->custom_value;\n $color_list[$color->virtuemart_customfield_id]['custom_price'] = $color->custom_price;\n }\n }\n } else if ($value->custom_title == 'Size') {\n foreach ($value->options as $size) {\n if ($size->custom_value) {\n $size_list[$size->virtuemart_customfield_id]['custom_value'] = $size->custom_value;\n $size_list[$size->virtuemart_customfield_id]['custom_price'] = $size->custom_price;\n }\n }\n }\n }\n }\n }\n\n $size_color_list = array();\n\n if ($color_list || $size_list) {\n if ($color_list && $size_list) {\n foreach ($color_list as $color_id => $color_info) {\n foreach ($size_list as $size_id => $size_info) {\n $index = $color_id . '-' . $size_id;\n $size_color_list[$index]['custom_value'] = $size_info['custom_value'] . '/' . $color_info['custom_value'];\n $size_color_list[$index]['custom_price'] = $color_info['custom_price'] + $size_info['custom_price'];\n }\n }\n } else if ($color_list) {\n $size_color_list = $color_list;\n } else {\n $size_color_list = $size_list;\n }\n }\n $this->assignRef('size_color_list', $size_color_list);\n $this->assignRef('size_list', $size_list);\n\n $product->event = new stdClass();\n $product->event->afterDisplayTitle = '';\n $product->event->beforeDisplayContent = '';\n $product->event->afterDisplayContent = '';\n if (VmConfig::get('enable_content_plugin', 0)) {\n // add content plugin //\n $dispatcher = & JDispatcher::getInstance();\n JPluginHelper::importPlugin('content');\n $product->text = $product->product_desc;\n $product->feedback = \"{rsform 1}\";\n jimport('joomla.html.parameter');\n $params = new JParameter('');\n\n $session = & JFactory::getSession();\n $session->set('product_name', $product->product_name);\n $session->set('product_id', $product->id);\n\n if (JVM_VERSION === 2) {\n $results = $dispatcher->trigger('onContentPrepare', array('com_virtuemart.productdetails', &$product, &$params, 0));\n // More events for 3rd party content plugins\n // This do not disturb actual plugins, because we don't modify $product->text\n $res = $dispatcher->trigger('onContentAfterTitle', array('com_virtuemart.productdetails', &$product, &$params, 0));\n $product->event->afterDisplayTitle = trim(implode(\"\\n\", $res));\n\n $res = $dispatcher->trigger('onContentBeforeDisplay', array('com_virtuemart.productdetails', &$product, &$params, 0));\n $product->event->beforeDisplayContent = trim(implode(\"\\n\", $res));\n\n $res = $dispatcher->trigger('onContentAfterDisplay', array('com_virtuemart.productdetails', &$product, &$params, 0));\n $product->event->afterDisplayContent = trim(implode(\"\\n\", $res));\n } else {\n $results = $dispatcher->trigger('onPrepareContent', array(& $product, & $params, 0));\n }\n $product->product_desc = $product->text;\n }\n\n $product_model->addImages($product);\n $this->assignRef('product', $product);\n\n if (isset($product->min_order_level) && (int) $product->min_order_level > 0) {\n $min_order_level = $product->min_order_level;\n } else {\n $min_order_level = 1;\n }\n $this->assignRef('min_order_level', $min_order_level);\n if (isset($product->step_order_level) && (int) $product->step_order_level > 0) {\n $step_order_level = $product->step_order_level;\n } else {\n $step_order_level = 1;\n }\n $this->assignRef('step_order_level', $step_order_level);\n // Load the neighbours\n $product->neighbours = $product_model->getNeighborProducts($product);\n\n // Load the category\n $category_model = VmModel::getModel('category');\n\n shopFunctionsF::setLastVisitedCategoryId($product->virtuemart_category_id);\n\n if ($category_model) {\n\n $category = $category_model->getCategory($product->virtuemart_category_id);\n\n $category_model->addImages($category, 1);\n $this->assignRef('category', $category);\n //Seems we dont need this anylonger, destroyed the breadcrumb\n if ($category->parents) {\n foreach ($category->parents as $c) {\n if (is_object($c) and isset($c->category_name)) {\n if($category->parents[0]->show_in_menu == 1 && $category_model->hasChildren($c->virtuemart_category_id)){\n $pathway->addItem(strip_tags($c->category_name), JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id=' \n . $category->parents[0]->virtuemart_category_id.'#' . JFilterOutput::stringURLSafe($c->category_name)));\n }else{\n $pathway->addItem(strip_tags($c->category_name), JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id='\n .$c->virtuemart_category_id));\n } \n } else {\n vmdebug('Error, parent category has no name, breadcrumb maybe broken, category', $c);\n }\n }\n }\n\n $vendorId = 1;\n $category->children = $category_model->getChildCategoryList($vendorId, $product->virtuemart_category_id);\n $category_model->addImages($category->children, 1);\n }\n\n if (!empty($tpl)) {\n $format = $tpl;\n } else {\n $format = JRequest::getWord('format', 'html');\n }\n if ($format == 'html') {\n // Set Canonic link\n $document->addHeadLink(JRoute::_($product->canonical, true, -1), 'canonical', 'rel', '');\n }\n\n $uri = JURI::getInstance();\n //$pathway->addItem(JText::_('COM_VIRTUEMART_PRODUCT_DETAILS'), $uri->toString(array('path', 'query', 'fragment')));\n $pathway->addItem(strip_tags($product->product_name));\n // Set the titles\n // $document->setTitle should be after the additem pathway\n if ($product->customtitle) {\n $document->setTitle(strip_tags($product->customtitle));\n } else {\n $document->setTitle(strip_tags(($category->category_name ? ($category->category_name . ' : ') : '') . $product->product_name));\n }\n $ratingModel = VmModel::getModel('ratings');\n $allowReview = $ratingModel->allowReview($product->virtuemart_product_id);\n $this->assignRef('allowReview', $allowReview);\n\n $showReview = $ratingModel->showReview($product->virtuemart_product_id);\n $this->assignRef('showReview', $showReview);\n\n if ($showReview) {\n\n $review = $ratingModel->getReviewByProduct($product->virtuemart_product_id);\n $this->assignRef('review', $review);\n\n //get order by\n $review_order = JRequest::getInt('review_order', 0);\n\n $rating_reviews = $ratingModel->getReviews($product->virtuemart_product_id, $review_order);\n $this->assignRef('rating_reviews', $rating_reviews);\n $this->assignRef('review_order', $review_order);\n\n //cacular for average reviews\n $average_reviews = array();\n if ($rating_reviews) {\n $rating_review_count = 0;\n\n foreach ($rating_reviews as $value) {\n if ($value->published) {\n $average_reviews[$value->vote][] = $value->vote;\n $rating_review_count++;\n }\n }\n\n for ($i = 0; $i <= 5; $i++) {\n if (isset($average_reviews[$i])) {\n $count = count($average_reviews[$i]);\n $average_reviews[$i]['count'] = $count;\n $average_reviews[$i]['percent'] = ($count / $rating_review_count) * 70;\n }\n }\n }\n\n $this->assignRef('average_reviews', $average_reviews);\n }\n\n //Load Alert\n $user = JFactory::getUser();\n $model = VmModel::getModel('product_alert');\n $alert = $model->getAlert($user->id, $product->virtuemart_product_id);\n// print_r($user->id);die();\n $mail = $model->getAllAlertByUser($user->id);\n $this->assignRef('alert_list', $mail);\n $this->assignRef('alert', $alert);\n\n $showRating = $ratingModel->showRating($product->virtuemart_product_id);\n $this->assignRef('showRating', $showRating);\n\n if ($showRating) {\n $vote = $ratingModel->getVoteByProduct($product->virtuemart_product_id);\n $this->assignRef('vote', $vote);\n\n $rating = $ratingModel->getRatingByProduct($product->virtuemart_product_id);\n $this->assignRef('rating', $rating);\n }\n\n $allowRating = $ratingModel->allowRating($product->virtuemart_product_id);\n $this->assignRef('allowRating', $allowRating);\n\n //get top compare\n $topCompareModel = VmModel::getModel('top_compare');\n $top_compare_list = $topCompareModel->getTopCompare($product->virtuemart_product_id, 10);\n\n if ($top_compare_list) {\n foreach ($top_compare_list as $key => $value) {\n if ($value->product_id == $product->virtuemart_product_id) {\n $product_compare_id = $value->product_compare_id;\n } else {\n $product_compare_id = $value->product_id;\n }\n\n $product_conpare_data = $product_model->getProduct($product_compare_id, TRUE, TRUE, TRUE, 1);\n $product_model->addImages($product_conpare_data);\n $top_compare_list[$key]->data = $product_conpare_data;\n }\n }\n\n $this->assignRef('top_compare_list', $top_compare_list);\n\n // Check for editing access\n // @todo build edit page\n if (!class_exists('Permissions'))\n require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'permissions.php');\n //if (Permissions::getInstance()->check(\"admin,storeadmin\")) {\n $perm = Permissions::getInstance();\n $admin = $perm->check(\"admin\");\n if (!$admin)\n vmdebug('No admin');\n\n $storeadmin = $perm->check(\"admin,storeadmin\");\n if (!$storeadmin)\n vmdebug('No $storeadmin');\n\n $superVendor = $perm->isSuperVendor();\n if (!$superVendor)\n vmdebug('No $superVendor');\n\n if ($admin or ($perm->isSuperVendor() == $product->virtuemart_vendor_id and $storeadmin)) {\n $edit_link = JURI::root() . 'index.php?option=com_virtuemart&tmpl=component&view=product&task=edit&virtuemart_product_id=' . $product->virtuemart_product_id;\n $edit_link = $this->linkIcon($edit_link, 'COM_VIRTUEMART_PRODUCT_FORM_EDIT_PRODUCT', 'edit', false, false);\n } else {\n $edit_link = \"\";\n }\n $this->assignRef('edit_link', $edit_link);\n\n // todo: atm same form for \"call for price\" and \"ask a question\". Title of the form should be different\n $askquestion_url = JRoute::_('index.php?option=com_virtuemart&view=productdetails&task=askquestion&virtuemart_product_id=' . $product->virtuemart_product_id . '&virtuemart_category_id=' . $product->virtuemart_category_id . '&tmpl=component');\n $this->assignRef('askquestion_url', $askquestion_url);\n\n // Load the user details\n $user = JFactory::getUser();\n $this->assignRef('user', $user);\n\n //get wishlist list\n $wishlist_list = array();\n\n if ($user->guest) {\n $wishlist_list = $_SESSION['wishlist'];\n } else {\n $wishlistModel = VmModel::getModel('wishlist');\n $wishlist_list = $wishlistModel->getProductIdByUser((int) $user->id);\n }\n\n $this->assignRef('wishlist_list', $wishlist_list);\n\n // More reviews link\n// $uri = JURI::getInstance();\n// $uri->setVar('showall', 0);\n// $uristring = $uri->toString();\n// $this->assignRef('more_reviews', $uristring);\n\n if ($product->metadesc) {\n $document->setDescription($product->metadesc);\n }\n if ($product->metakey) {\n $document->setMetaData('keywords', $product->metakey);\n }\n\n if ($product->metarobot) {\n $document->setMetaData('robots', $product->metarobot);\n }\n\n if ($mainframe->getCfg('MetaTitle') == '1') {\n $document->setMetaData('title', $product->product_name); //Maybe better product_name\n }\n if ($mainframe->getCfg('MetaAuthor') == '1') {\n $document->setMetaData('author', $product->metaauthor);\n }\n\n $label_model = VmModel::getModel('label');\n $label = $label_model->getLabelId($product->label_id);\n $this->assignRef('label', $label);\n\n $showBasePrice = Permissions::getInstance()->check('admin'); //todo add config settings\n $this->assignRef('showBasePrice', $showBasePrice);\n\n $productDisplayShipments = array();\n $productDisplayPayments = array();\n\n if (!class_exists('vmPSPlugin'))\n require(JPATH_VM_PLUGINS . DS . 'vmpsplugin.php');\n JPluginHelper::importPlugin('vmshipment');\n JPluginHelper::importPlugin('vmpayment');\n $dispatcher = JDispatcher::getInstance();\n $returnValues = $dispatcher->trigger('plgVmOnProductDisplayShipment', array($product, &$productDisplayShipments));\n $returnValues = $dispatcher->trigger('plgVmOnProductDisplayPayment', array($product, &$productDisplayPayments));\n\n $this->assignRef('productDisplayPayments', $productDisplayPayments);\n $this->assignRef('productDisplayShipments', $productDisplayShipments);\n\n if (empty($category->category_template)) {\n $category->category_template = VmConfig::get('categorytemplate');\n }\n\n shopFunctionsF::setVmTemplate($this, $category->category_template, $product->product_template, $category->category_product_layout, $product->layout);\n\n shopFunctionsF::addProductToRecent($virtuemart_product_id);\n\n $currency = CurrencyDisplay::getInstance();\n $this->assignRef('currency', $currency);\n\n if (JRequest::getCmd('layout', 'default') == 'notify')\n $this->setLayout('notify'); //Added by Seyi Awofadeju to catch notify layout\n\n\n\n\n\n \n// $adf = $this->hit($product->virtuemart_category_id);\n parent::display($tpl);\n }", "public function _display_hook() {\n\t\tadd_action( 'bp_template_content', array( &$this, 'display' ) );\n\t\tbp_core_load_template( apply_filters( 'bp_core_template_plugin', $this->template_file ) );\n\t}", "public function render()\n {\n parent::render();\n\n $oxConfig = $this->getConfig();\n\n $oxTiramizooConfig = oxTiramizooConfig::getInstance();\n\n $this->_aViewData['oPaymentsList'] = $this->getPaymentsList();\n\n $sCurrentAdminShop = $oxConfig->getShopId();\n\n $aShopConfVars = $oxTiramizooConfig->getTiramizooConfVars();\n \n $this->_aViewData['confstrs'] = $aShopConfVars['confstrs'];\n $this->_aViewData['confarrs'] = $aShopConfVars['confarrs'];\n $this->_aViewData['confaarrs'] = $aShopConfVars['confaarrs'];\n $this->_aViewData['confselects'] = $aShopConfVars['confselects'];\n $this->_aViewData['confbools'] = $aShopConfVars['confbools'];\n $this->_aViewData['confints'] = $aShopConfVars['confints'];\n\n $this->_aViewData['version'] = oxTiramizoo_setup::VERSION;\n\n\n $oRetailLocationList = oxnew('oxTiramizoo_RetailLocationList');\n $oRetailLocationList->loadAll();\n\n $this->_aViewData['aRetailLocations'] = $oRetailLocationList;\n\n return 'oxTiramizoo_settings.tpl';\n }", "public function ARPintegrateWithVC() {\n\t\tif ( function_exists( 'vc_map' ) ) {\n\t\t\tvc_map(array(\n\t\t\t\t'name' => __('ARPrice', ARP_PT_TXTDOMAIN ),\n\t\t\t\t'description' => __('Ultimate Wordpress Pricing Table Plugin', ARP_PT_TXTDOMAIN ),\n\t\t\t\t'base' => 'ARPrice',\n\t\t\t\t'category' => __( 'Content', ARP_PT_TXTDOMAIN ),\t\n\t\t\t\t'class' => '',\n\t\t\t\t'controls' => 'full',\n\t\t\t\t'admin_enqueue_css' => array(PRICINGTABLE_URL.'/core/vc/arprice_vc.css'),\n\t\t\t\t'icon' =>'arprice_vc_icon',\n\t\t\t\t'params' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\"type\" => \"ARPrice_Shortode\",\n\t\t\t\t\t\t'heading' => __('Ultimate Wordpress Pricing Table Plugin', ARP_PT_TXTDOMAIN),\n\t\t\t\t\t\t'param_name' => 'id',\n\t\t\t\t\t\t'value' => true,\n\t\t\t\t\t\t'description' => __('&nbsp;', ARP_PT_TXTDOMAIN ),\n\t\t\t\t\t\t'admin_label' => true\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t) );\n\t\t}\n }", "public function __construct()\n {\n // ie. foo_bar/adminhtml_baz\n $this->_blockGroup = 'ispshop_tributos';\n $this->_controller = 'adminhtml_update';\n $this->_headerText = $this->__('Atualizar Controle de Substituição Tributária');\n \n parent::__construct();\n \n $this->removeButton('back');\n $this->removeButton('save');\n $this->removeButton('reset');\n \n \n $this->_addButton('process', array(\n 'label' => Mage::helper('core')->__('Atualizar'),\n 'class' => 'save',\n 'onclick' => 'editForm.submit();'\n ), 1);\n }", "public function render()\n {\n parent::render();\n\n /** @var string $soxId */\n $soxId = $this->getEditObjectId();\n $this->_aViewData[\"oxid\"] = $soxId;\n \n // get the inventory information\n $oModel = oxNew(\"asign_yellowcube_model\");\n $this->_aViewData[\"aInventory\"] = $oModel->getInventoryData($soxId);\n \n return \"asign_yellowcube_main.tpl\";\n }", "public function render_control_template_scripts()\n {\n }", "public function render_control_template_scripts()\n {\n }", "public function render_control_template_scripts()\n {\n }", "public function render_control_template_scripts()\n {\n }", "public function render_control_template_scripts()\n {\n }", "protected function render() {\n\t\t$settings = $this->get_settings_for_display();\n\t\t$post_type = get_post_type(); \n\t\t\t\n\t\techo DTWCBE_Cart_Elementor::_render( $this->get_name(), $settings );\n\t\t\t\n\t}", "public function views()\n {\n $this->global['pageTitle'] = 'Incoming Transaction - '.APP_NAME;\n $this->global['pageMenu'] = 'Incoming Transaction';\n $this->global['contentHeader'] = 'Incoming Transaction';\n $this->global['contentTitle'] = 'Incoming Transaction';\n $this->global ['role'] = $this->role;\n $this->global ['name'] = $this->name;\n \n $data['list_coverage'] = $this->get_list_warehouse(\"array\");\n \n $this->loadViews('front/incoming-trans/lists', $this->global, $data);\n }", "public function main() {\n $matches = array();\n preg_match('@^\\.\\.\\\\\\commands\\\\\\(.*)\\\\\\view\\\\\\(.*)\\.html@i', $this->name, $matches);\n\n echo \"$this->name<---------\";\n $viewFile = file_get_contents($this->name);\n preg_match_all('@<.* id\\s*=\\s*[\"|\\']{{ALViewElement_(.*)}}[\"|\\'].*>@i', $viewFile, $viewMatches);\n\n $template = file_get_contents(\"generateViews/ViewTemplate\");\n\n $vars = array();\n $vars[\"command_name\"] = ucfirst($matches[1]);\n if($vars[\"command_name\"] == \"Common\") {\n $vars[\"command_name\"] = \"common\";\n }\n $vars[\"class_name\"] = ucfirst($matches[2]);\n $vars[\"view_file_name\"] = $matches[2];\n $template = $this->replaceTokens($vars, $template);\n\n $propertiesPiece = \"\";\n $constructPiece = \"\";\n $viewElementsArrayPiece = \"\";\n $cnt = 1;\n\n echo \"-->\";print_r($viewMatches);\n foreach($viewMatches[1] as $viewElement) {\n $dom = new DOMDocument();\n $dom->loadHTML($viewFile);\n echo \"DOM HTML:\";\n\n $veVars[\"property_name\"] = $viewElement;\n $constructTemplate = file_get_contents(\"generateViews/ConstructViewElementsTemplate\");\n\n // constructor\n $vars = array();\n $vars[\"property_name\"] = $viewElement;\n\n $propertiesTemplate = file_get_contents(\"generateViews/PropertiesTemplate\");\n $propertiesPiece .= $this->replaceTokens($vars, $propertiesTemplate);\n\n $constructPiece .= $this->replaceTokens($veVars, $constructTemplate);\n\n // view elements array\n $vars = array();\n $vars[\"property_name\"] = $viewElement;\n $vars[\"comma\"] = count($viewMatches[1]) === $cnt ? \"\" : \",\";\n\n $viewElementsArrayTemplate = file_get_contents(\"generateViews/ViewElementsArrayTemplate\");\n $viewElementsArrayPiece .= $this->replaceTokens($vars, $viewElementsArrayTemplate);\n\n ++$cnt;\n }\n $template = $this->replaceToken(\"view_element_declarations\", $propertiesPiece, $template);\n $template = $this->replaceToken(\"constructor\", $constructPiece, $template);\n $template = $this->replaceToken(\"view_elements_array\", $viewElementsArrayPiece, $template);\n\n $fh = fopen(\"../commands/\".$matches[1].\"/view/\".ucfirst($matches[2]).\".php\", \"w\");\n fwrite($fh, $template);\n fclose($fh);\n }", "protected function content_template() {\t}" ]
[ "0.5636014", "0.54392844", "0.53866154", "0.5380551", "0.5358474", "0.5294001", "0.5199711", "0.51903015", "0.5149154", "0.514327", "0.5140112", "0.5118747", "0.5089731", "0.50896627", "0.5080289", "0.5080289", "0.5057779", "0.5044192", "0.50403106", "0.5033249", "0.50261056", "0.5017043", "0.50039816", "0.49787793", "0.4947297", "0.49436632", "0.4934742", "0.4929867", "0.49253356", "0.49205446", "0.49196306", "0.49192202", "0.49159783", "0.49116647", "0.49094668", "0.48982832", "0.4893776", "0.48898706", "0.4889287", "0.4887784", "0.48676324", "0.4863281", "0.48622814", "0.48616683", "0.4858423", "0.48486835", "0.48408654", "0.48367777", "0.48347273", "0.48251796", "0.48232168", "0.48162663", "0.4816097", "0.4812728", "0.4810316", "0.4803699", "0.4796167", "0.47959366", "0.47933388", "0.47924653", "0.4791934", "0.4787883", "0.47842026", "0.47799903", "0.47782168", "0.47764337", "0.4773637", "0.47692505", "0.47675213", "0.47657493", "0.47619194", "0.47607818", "0.47541624", "0.475308", "0.4747395", "0.47466376", "0.4744797", "0.4732684", "0.4728813", "0.4727792", "0.47269884", "0.4726372", "0.4719045", "0.47150534", "0.47114435", "0.4710417", "0.47086832", "0.47069758", "0.4705888", "0.47048694", "0.47043958", "0.4702667", "0.4702667", "0.47019348", "0.47019348", "0.47019348", "0.4697169", "0.46929938", "0.4689778", "0.46879336" ]
0.8141462
0
Adds the cart taxes to the transaction object
Добавляет налоги на корзину в объект транзакции
function it_exchange_easy_eu_value_added_taxes_add_cart_taxes_to_txn_object() { $formatted = ( 'it_exchange_set_transaction_objet_cart_taxes_formatted' == current_filter() ); return it_exchange_easy_eu_value_added_taxes_addon_get_total_taxes_for_cart( $formatted ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function add_order_tax()\n {\n }", "public function update_taxes()\n {\n }", "public function get_cart_tax()\n {\n }", "public function create_order_tax_lines(&$order, $cart)\n {\n }", "public function calculateTaxesAndTotals(): void\n {\n $subtotal = '0';\n $discount = '0';\n\n // Initialize variables to hold the Taxes\n $transfers = [];\n $retentions = [];\n\n $totalTransferredAmount = '0';\n $totalRetainedAmount = '0';\n\n foreach ($this->itemList->getItems() as $it) {\n\n $subtotal = Math::add($subtotal, $it->getAmount());\n\n $itemDiscount = $it->getDiscount() ?? '0';\n $discount = Math::add($discount, $itemDiscount);\n\n // Process any Transferred taxes\n if ($it->getTaxes() && $it->getTaxes()->getTransferredList()) {\n foreach ($it->getTaxes()->getTransferredList()->getTransfers() as $tax) {\n $key = $tax->getTax() . '-' . $tax->getFactorType() . '-' . $tax->getRate();\n\n if (!array_key_exists($key, $transfers)) {\n $transfers[$key] = [\n 'tax' => $tax->getTax(),\n 'factorType' => $tax->getFactorType(),\n 'rate' => $tax->getRate(),\n 'amount' => '0',\n ];\n }\n\n $taxAmount = $tax->getAmount() ?? '0';\n $transfers[$key]['amount'] = Math::add($transfers[$key]['amount'], $taxAmount);\n $totalTransferredAmount = Math::add($totalTransferredAmount, $taxAmount);\n }\n }\n\n // Process any Retained taxes\n if ($it->getTaxes() && $it->getTaxes()->getRetainedList()) {\n foreach ($it->getTaxes()->getRetainedList()->getRetentions() as $tax) {\n $key = $tax->getTax();\n\n if (!array_key_exists($key, $retentions)) {\n $retentions[$key] = [\n 'tax' => $key,\n 'amount' => '0',\n ];\n }\n\n $taxAmount = $tax->getAmount() ?? '0';\n $retentions[$key]['amount'] = Math::add($retentions[$key]['amount'], $taxAmount);\n $totalRetainedAmount = Math::add($totalRetainedAmount, $taxAmount);\n }\n }\n }\n\n // Purge the taxes that amount to 0\n foreach ($transfers as $k => $t) {\n if (Math::equal($t['amount'], '0')) {\n unset($transfers[$k]);\n }\n }\n foreach ($retentions as $k => $t) {\n if (Math::equal($t['amount'], '0')) {\n unset($retentions[$k]);\n }\n }\n\n\n // Process Local Taxes\n $totalLocalTransferredAmount = '0';\n $totalLocalRetainedAmount = '0';\n\n if ($this->getLocalTaxes()) {\n foreach ($this->getLocalTaxes()->getTaxesTransferred() as $tax) {\n $totalLocalTransferredAmount = Math::add($totalLocalTransferredAmount, $tax->getAmount());\n }\n\n foreach ($this->getLocalTaxes()->getTaxesRetained() as $tax) {\n $totalLocalRetainedAmount = Math::add($totalLocalRetainedAmount, $tax->getAmount());\n }\n\n $this->getLocalTaxes()->setTotalTransferred($totalLocalTransferredAmount);\n $this->getLocalTaxes()->setTotalRetained($totalLocalRetainedAmount);\n }\n\n\n // Calculate the Total Amount\n $total = $subtotal;\n $total = Math::sub($total, $discount);\n $total = Math::add($total, $totalTransferredAmount);\n $total = Math::sub($total, $totalRetainedAmount);\n $total = Math::add($total, $totalLocalTransferredAmount);\n $total = Math::sub($total, $totalLocalRetainedAmount);\n\n // Update the CFDI object\n $this->setSubTotal($subtotal);\n $this->setDiscount($discount);\n $this->setTotal($total);\n\n\n // Build the Taxes node\n $this->taxes = new Taxes([]);\n $this->taxes->setTotalTransferredAmount(Math::round($totalTransferredAmount,2));\n $this->taxes->setTotalRetainedAmount(Math::round($totalRetainedAmount,2));\n\n $transferredList = new TaxesTransferredList([]);\n foreach ($transfers as $k => $t) {\n $tax = new TaxesTransferred($t);\n $transferredList->addTransfer($tax);\n }\n $this->taxes->setTransferredList($transferredList);\n\n\n $retentionList = new TaxesRetainedList([]);\n foreach ($retentions as $k => $t) {\n $tax = new TaxesRetained($t);\n $retentionList->addRetention($tax);\n }\n $this->taxes->setRetainedList($retentionList);\n }", "function it_exchange_easy_eu_value_added_taxes_add_taxes_row_to_receipt() {\n\n\tif ( empty( $GLOBALS['it_exchange']['transaction'] ) ) {\n\t\treturn;\n\t}\n\n\t$transaction = $GLOBALS['it_exchange']['transaction'];\n\n\t$tax_items = get_post_meta( $transaction->ID, '_it_exchange_easy_eu_value_added_taxes', true );\n\t$vat_moss_tax_items = get_post_meta( $transaction->ID, '_it_exchange_easy_eu_value_added_vat_moss_taxes', true );\n\t$memberstates = it_exchange_get_data_set( 'eu-member-states' );\n\t?>\n\n\t<?php if ( ! empty( $tax_items ) ) : ?>\n\t\t<?php foreach ( $tax_items as $tax ) : ?>\n\t\t\t<?php if ( empty( $tax['total'] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$tax_total = it_exchange_format_price( $tax['total'] );\n\t\t\t$tax_type = sprintf( __( '%s %s (%s%%)', 'LION' ), ( empty( $tax['country'] ) ? '' : $memberstates[$tax['country']] ), $tax['tax-rate']['label'], $tax['tax-rate']['rate'] );\n\t\t\t?>\n\t\t\t<tr>\n\t\t\t\t<td></td>\n\t\t\t\t<td align=\"right\" style=\"padding: 10px; \">\n\t\t\t\t\t<strong><?php echo $tax_type; ?></strong>\n\t\t\t\t</td>\n\t\t\t\t<td align=\"right\" style=\"padding: 10px 0 10px 10px; \">\n\t\t\t\t\t<?php echo $tax_total; ?>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t<?php endforeach; ?>\n\t<?php endif; ?>\n\n\t<?php if ( ! empty( $vat_moss_tax_items ) ) : ?>\n\t\t<?php foreach ( $vat_moss_tax_items as $tax ) : ?>\n\t\t\t<?php if ( empty( $tax['total'] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$tax_total = it_exchange_format_price( $tax['total'] );\n\t\t\t$tax_type = sprintf( __( '%s %s (%s%%)', 'LION' ), ( empty( $tax['country'] ) ? '' : $memberstates[$tax['country']] ), $tax['tax-rate']['label'], $tax['tax-rate']['rate'] );\n\t\t\t?>\n\t\t\t<tr>\n\t\t\t\t<td></td>\n\t\t\t\t<td align=\"right\" style=\"padding: 10px; \">\n\t\t\t\t\t<strong><?php echo $tax_type; ?></strong>\n\t\t\t\t</td>\n\t\t\t\t<td align=\"right\" style=\"padding: 10px 0 10px 10px; \">\n\t\t\t\t\t<?php echo $tax_total; ?>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t<?php endforeach; ?>\n\t<?php endif; ?>\n<?php\n\n}", "public function get_tax_totals()\n {\n }", "public function get_tax_totals()\n {\n }", "public function get_cart_contents_tax()\n {\n }", "public function cartTotalTax(){\n\t\tif($this->isRequest('POST')){\n\t\t\t$cartData = $this->actionQuery('totalTax');\n\t\t\tif($cartData){\n\t\t\t\t$returnAry = array(\n\t\t\t\t\t'cartTotalTax'=>$cartData,\n\t\t\t\t);\n\t\t\t\t$this->returnResponse = $this->successResponse($returnAry,'Cart total tax');\n\t\t\t}else{\n\t\t\t\t$this->returnResponse = $this->failedResponse('Invalid deviceId');\t\n\t\t\t}\n\t\t}else{\n\t\t\t$this->returnResponse = $this->failedResponse('Request type not found');\n\t\t}\n\t\techo $this->returnResponse;\n\t}", "public function itemsTaxedTotal();", "public function inc_tax_or_vat()\n {\n }", "protected function calculateTotals()\n {\n $this->attributes['subtotal'] = $this->quantity * $this->price;\n\n $taxFactor = optional($this->taxes)->sum('percentage_decimal') ?? 0;\n\n $tax = $this->is_before_tax\n ? $this->subtotal * $taxFactor\n : $this->subtotal / (1 + $taxFactor) * $taxFactor;\n\n $this->attributes['tax_amount'] = round($tax);\n\n if ($this->is_before_tax) {\n $this->attributes['total'] = $this->subtotal + $this->tax_amount;\n } else {\n $this->attributes['total'] = $this->subtotal;\n }\n }", "public function get_coupon_discount_tax_totals()\n {\n }", "public function tax($tax_settings = array()) {\r\n\t\t// populate defaults, and verify fields\r\n\t\t$tax_settings = array_merge(configure::read('GoogleCheckout.Tax'), set::filter($tax_settings));\r\n\t\t$tax_settings = array_merge(array('us_rate' => null, 'us_states' => null, 'international_rate' => null, 'international_areas' => null), $tax_settings);\r\n\t\textract($tax_settings);\r\n\r\n\t\t// Add US tax rules\r\n\t\tif (!empty($tax_rule_us)) {\r\n\t\t\t$tax_rule_us = new GoogleDefaultTaxRule($us_rate);\r\n\t\t\t$tax_rule_us->SetStateAreas($us_states);\r\n\t\t\t$this->cart->AddDefaultTaxRules($tax_rule_us);\r\n\t\t}\r\n\r\n\t\t// Add International tax rules\r\n\t\tif (!empty($international_areas)) {\r\n\t\t\t$tax_rule_international = new GoogleDefaultTaxRule($international_rate);\r\n\t\t\tforeach ( $international_areas as $area ) {\r\n\t\t\t\t$tax_rule_international->AddPostalArea($area);\r\n\t\t\t}\r\n\t\t\t$this->cart->AddDefaultTaxRules($tax_rule_international);\r\n\t\t}\r\n\t}", "protected function add_crumbs_tax()\n {\n }", "public function get_cart_discount_tax_total()\n {\n }", "private function addTaxTotalNode(UXML $parent, InvoiceTotals $totals) {\n $xml = $parent->add('cac:TaxTotal');\n\n // Add tax amount\n $this->addAmountNode($xml, 'cbc:TaxAmount', $totals->vatAmount, $totals->currency);\n\n // Add each tax details\n foreach ($totals->vatBreakdown as $item) {\n $vatBreakdownNode = $xml->add('cac:TaxSubtotal');\n $this->addAmountNode($vatBreakdownNode, 'cbc:TaxableAmount', $item->taxableAmount, $totals->currency);\n $this->addAmountNode($vatBreakdownNode, 'cbc:TaxAmount', $item->taxAmount, $totals->currency);\n $this->addVatNode($vatBreakdownNode, 'cac:TaxCategory', $item->category, $item->rate,\n $item->exemptionReasonCode, $item->exemptionReason);\n }\n }", "public function get_taxes()\n {\n }", "public function get_taxes()\n {\n }", "public function calculate_taxes($args = array())\n {\n }", "public function add_tax($tax_rate_id, $tax_amount = 0, $shipping_tax_amount = 0)\n {\n }", "protected function _addTaxPercents()\n {\n $classToRate = array();\n $request = Mage::getSingleton('tax/calculation')->getRateRequest();\n foreach ($this as &$item) {\n if (null === $item->getTaxClassId()) {\n $item->setTaxClassId($item->getMinimalTaxClassId());\n }\n if (!isset($classToRate[$item->getTaxClassId()])) {\n $request->setProductClassId($item->getTaxClassId());\n $classToRate[$item->getTaxClassId()] = Mage::getSingleton('tax/calculation')->getRate($request);\n }\n $item->setTaxPercent($classToRate[$item->getTaxClassId()]);\n }\n }", "public function get_cart_tax($context = 'view')\n {\n }", "function calculateCart(): void\n\t{\n\t\t$subtotal = $subtotal_with_tax = $discount = $discount_wthTax = $tax_total = $total_whtTax = $total = 0;\n\n\t\t// calculate total and subtotal w/tax for everyone product in the cart\n\t\tif (!$this->isEmpty())\n\t\t\tforeach ($this->products as $product) {\n\t\t\t\t$quantity = $product instanceof Product ? $this->getQuantity($product->getId()) : $this->getQuantity($product->product->getId(), $product->getId());\n\n\t\t\t\t$product_price_without_tax = $product->getPrice() * $quantity;\n\t\t\t\t$product_price_with_tax = $product->getPriceWthTax() * $quantity;\n\n\t\t\t\tif ($product instanceof Product && $product->isInSale() === true) {\n\t\t\t\t\t$product_price_without_tax = $product->getSale()->getPrice() * $quantity;\n\t\t\t\t\t$product_price_with_tax = $product->getSale()->getPriceWthTax() * $quantity;\n\t\t\t\t}\n\n\t\t\t\t$subtotal = $subtotal + $product_price_without_tax;\n\t\t\t\t$subtotal_with_tax = $subtotal_with_tax + $product_price_with_tax;\n\t\t\t}\n\n\t\t$total = $subtotal;\n\t\t$total_whtTax = $subtotal_with_tax;\n\t\t$tax_total = $total_whtTax - $total;\n\n\t\t$promocode = $this->getPromocode();\n\t\tif (@$promocode) {\n\t\t\tswitch ($promocode->getType()) {\n\t\t\t\tcase PromocodeManager::CURRENCY:\n\t\t\t\t\t$discount_value = $promocode->getValue() * (-1);\n\t\t\t\t\t$discount_wthTax = $discount_value;\n\n\t\t\t\t\t$total = $subtotal + $discount_value;\n\t\t\t\t\t$total_whtTax = $subtotal_with_tax + $discount_wthTax;\n\t\t\t\t\tbreak;\n\t\t\t\tcase PromocodeManager::PERCENTAGE:\n\t\t\t\t\t$discount_value = $promocode->getValue();\n\t\t\t\t\t$discount_wthTax = $subtotal_with_tax * ($discount_value / -100);\n\t\t\t\t\t$discount = $subtotal * ($discount_value / -100);\n\t\t\t\t\t$total = $subtotal + $discount;\n\t\t\t\t\t$total_whtTax = $subtotal_with_tax + $discount_wthTax;\n\t\t\t\t\t$tax_total = $total_whtTax - $total;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// While cart is empty set the payment and shipping methods to NULL\n\t\tif ($this->isEmpty()) {\n\t\t\t$this->setShippingMethod(null);\n\t\t\t$this->setPaymentMethod(null);\n\t\t}\n\n\t\t// check the shipping method, while is set return price of set method\n\t\t$shipping_method = $this->getShippingMethod();\n\t\tif (@$shipping_method) {\n\t\t\t$shipping_price = $shipping_method->getPrice();\n\n\t\t\tif ($subtotal_with_tax > $shipping_method->getCartValueHigher()) {\n\t\t\t\t$shipping_discount = $shipping_method->getPrice() * ($shipping_method->getCartValueDiscount() / -100);\n\t\t\t\t$shipping_price = $shipping_method->getPrice() + $shipping_discount;\n\t\t\t\t$discount_wthTax = $discount_wthTax + $shipping_discount;\n\t\t\t}\n\n\t\t\t$total_whtTax = $total_whtTax + $shipping_price;\n\t\t}\n\n\t\t// check the payment method, while is set return price of set method\n\t\t$payment_method = $this->getPaymentMethod();\n\t\tif (@$payment_method) {\n\t\t\t$total_whtTax = $total_whtTax + $payment_method->getPrice();\n\t\t}\n\n\t\t// summary of cart / total,subtotal,promocodes and shiping/payment methods\n\t\t$this->setSubtotal($subtotal);\n\t\t$this->setSubtotalWthTax($subtotal_with_tax);\n\t\t$this->setDiscount($discount);\n\t\t$this->setDiscountWthTax($discount_wthTax);\n\t\t$this->setTaxTotal($tax_total);\n\t\t$this->setTotalWthTax($total_whtTax);\n\t\t$this->setTotal($total);\n\t}", "protected function getOrderItemsTaxAndTotals()\n {\n $orderData = [];\n $sendLineItems = $this->config->get('payment_mpgs_hosted_checkout_send_line_items');\n if ($sendLineItems) {\n $this->load->model('catalog/product');\n foreach ($this->cart->getProducts() as $product) {\n $productModel = $this->model_catalog_product->getProduct($product['product_id']);\n\n $items = [];\n if ($productModel['manufacturer']) {\n $items['brand'] = utf8_substr($productModel['manufacturer'], 0, 127);\n }\n\n $description = [];\n foreach ($product['option'] as $option) {\n if ($option['type'] != 'file') {\n $value = isset($option['value']) ? $option['value'] : '';\n } else {\n $uploadInfo = $this->model_tool_upload->getUploadByCode($option['value']);\n\n if ($uploadInfo) {\n $value = $uploadInfo['name'];\n } else {\n $value = '';\n }\n }\n $description[] = $option['name'] . ':' . (utf8_strlen($value) > 20 ? utf8_substr($value, 0,\n 20) . '..' : $value);\n }\n if (!empty($description)) {\n $items['description'] = utf8_substr(implode(', ', $description), 0, 127);\n } elseif ($product['model']) {\n $items['description'] = utf8_substr($product['model'], 0, 127);\n }\n $items['name'] = utf8_substr($product['name'], 0, 127);\n $items['quantity'] = $product['quantity'];\n if ($product['model']) {\n $items['sku'] = utf8_substr($product['model'], 0, 127);\n }\n $items['unitPrice'] = round($product['price'], 2);\n\n $orderData['item'][] = $items;\n }\n }\n\n /** Tax, Shipping, Discount and Order Total */\n $totals = [];\n $taxes = $this->cart->getTaxes();\n $total = 0;\n\n // Because __call can not keep var references so we put them into an array.\n $totalData = [\n 'totals' => &$totals,\n 'taxes' => &$taxes,\n 'total' => &$total\n ];\n\n $this->load->model('setting/extension');\n\n // Display prices\n $sorOrder = [];\n $results = $this->model_setting_extension->getExtensions('total');\n\n foreach ($results as $key => $value) {\n $sorOrder[$key] = $this->config->get('total_' . $value['code'] . '_sort_order');\n }\n\n array_multisort($sorOrder, SORT_ASC, $results);\n\n foreach ($results as $result) {\n if ($this->config->get('total_' . $result['code'] . '_status')) {\n $this->load->model('extension/total/' . $result['code']);\n\n // We have to put the totals in an array so that they pass by reference.\n $this->{'model_extension_total_' . $result['code']}->getTotal($totalData);\n }\n\n $sorOrder = [];\n foreach ($totals as $key => $value) {\n $sorOrder[$key] = $value['sort_order'];\n }\n\n array_multisort($sorOrder, SORT_ASC, $totals);\n }\n\n $skipTotals = [\n 'sub_total',\n 'total',\n 'tax'\n ];\n\n $formattedTotal = round($total, 2);\n $subTotal = 0;\n $tax = 0;\n $taxInfo = [];\n $shipping = 0;\n\n foreach ($totals as $key => $value) {\n $formattedValue = round($value['value'], 2);\n\n if ($value['code'] == 'sub_total') {\n $subTotal += $formattedValue;\n }\n\n if ($value['code'] == 'tax') {\n $tax += $formattedValue;\n $taxInfo[] = [\n 'amount' => $formattedValue,\n 'type' => $value['title']\n ];\n }\n\n if (!in_array($value['code'], $skipTotals)) {\n $shipping += $formattedValue;\n }\n }\n\n $finalTotal = $subTotal + $tax + $shipping;\n if ($finalTotal == $formattedTotal) {\n $this->orderAmount = $formattedTotal;\n $orderData['amount'] = $formattedTotal;\n if ($sendLineItems) {\n $orderData['itemAmount'] = $subTotal;\n $orderData['shippingAndHandlingAmount'] = $shipping;\n $orderData['taxAmount'] = $tax;\n }\n }\n\n /** Order Tax Details */\n if (!empty($taxInfo) && $sendLineItems) {\n $orderData['tax'] = $taxInfo;\n }\n\n return $orderData;\n }", "public function get_total_tax()\n {\n }", "public function add_taxes() {\n\t\tregister_taxonomy_for_object_type('post_tag', 'page'); \n\t\t// Add category metabox to page\n\t\tregister_taxonomy_for_object_type('category', 'page'); \n\t}", "public function getTotalTaxAmount();", "public function priceTax()\n {\n return $this->price()->add($this->tax());\n }", "public function apply_before_tax()\n {\n }", "public function detailsTaxedTotal();", "public function calculate_totals($and_taxes = \\true)\n {\n }", "public function taxTotal()\n {\n return $this->tax()->multiply($this->qty);\n }", "public static function get_tax_total($taxes)\n {\n }", "function tep_add_tax($price, $tax) {\n global $currencies;\n\n if ( (DISPLAY_PRICE_WITH_TAX == 'true') && ($tax > 0) && $_SESSION['sppc_customer_group_show_tax'] == '1') {\n return tep_round($price, $currencies->currencies[DEFAULT_CURRENCY]['decimal_places']) + tep_calculate_tax($price, $tax);\n } else {\n return tep_round($price, $currencies->currencies[DEFAULT_CURRENCY]['decimal_places']);\n }\n }", "protected function add_order_item_totals_tax_rows(&$total_rows, $tax_display)\n {\n }", "function testTaxes($result)\n{\n $t_shirt=new Product(1,'T_Shirt' , 10.99 ,0);\n $jacket=new Product(3,'jacket' ,19.99 , 0);\n $shoes=new Product(4,'shoes' ,24.99 , 10 );\n $cart=new Cart();\n $cartItem2=$cart->addProduct($t_shirt,2);\n $cartItem3=$cart->addProduct($jacket,1);\n $cartItem4=$cart->addProduct($shoes,1);\n if($cart->Taxes() === $result)\n echo \"Success <br> \";\n else\n echo \"Failed <br> \";\n\n}", "public function set_subtotal_tax($value)\n {\n }", "function calculate_tax($cart=array())\n{\n $price = 0.0;\n if(is_array($cart))\n {\n foreach($cart as $prodid => $qty)\n { \n $query = \"select item_price, taxcode from products where idcode='$prodid'\";\n $result = mysql_query($query);\n if ($result)\n {\n $row=mysql_fetch_array($result);\n $item_price = $row[\"item_price\"];\n $taxcode = $row[\"taxcode\"];\n $price +=(($item_price*$qty)*$taxcode);\n }\n }\n }\n return $price;\n}", "function tax() \r\n\t{\r\n\t\t// Check if POST data has been submitted, if so, call the custom demo model function to handle the submitted data.\r\n\t\tif ($this->input->post('update_tax'))\r\n\t\t{\r\n\t\t\t$this->load->model('demo_cart_admin_model');\r\n\t\t\t$this->demo_cart_admin_model->demo_update_tax();\r\n\t\t}\r\n\t\r\n\t\t// Get an array of location data formatted with all sub-locations displayed 'tiered' into the location type groups, so locations can be listed \r\n\t\t// over multiple html select menus.\r\n\t\t$this->data['locations_tiered'] = $this->flexi_cart_admin->locations_tiered();\r\n\r\n\t\t// Get an array of all tax zones.\r\n\t\t$this->data['tax_zones'] = $this->flexi_cart_admin->location_zones('tax');\r\n\r\n\t\t// Get an array of all tax rates.\r\n\t\t$this->data['tax_data'] = $this->flexi_cart_admin->get_db_tax_query()->result_array();\r\n\r\n\t\t// Get any status message that may have been set.\r\n\t\t$this->data['message'] = (!isset($this->data['message'])) ? $this->session->flashdata('message') : $this->data['message'];\r\n\t\r\n\t\t$this->load->view('admin/tax/tax_update_view', $this->data);\r\n\t}", "public function getTaxAmount();", "public function getTaxAmount();", "public function get_total_ex_tax()\n {\n }", "function insert_tax() \r\n\t{\r\n\t\t// Check if POST data has been submitted, if so, call the custom demo model function to handle the submitted data.\r\n\t\tif ($this->input->post('insert_tax'))\r\n\t\t{\r\n\t\t\t$this->load->model('demo_cart_admin_model');\r\n\t\t\t$this->demo_cart_admin_model->demo_insert_tax();\r\n\t\t}\r\n\t\r\n\t\t// Get an array of location data formatted with all sub-locations displayed 'tiered' into the location type groups, so locations can be listed \r\n\t\t// over multiple html select menus.\r\n\t\t$this->data['locations_tiered'] = $this->flexi_cart_admin->locations_tiered();\r\n\r\n\t\t// Get an array of all tax zones.\r\n\t\t$this->data['tax_zones'] = $this->flexi_cart_admin->location_zones('tax');\r\n\r\n\t\t$this->load->view('admin/tax/tax_insert_view', $this->data);\r\n\t}", "function it_exchange_easy_eu_value_added_taxes_transaction_hook( $transaction_id ) {\n\t$tax_session = it_exchange_get_session_data( 'addon_easy_eu_value_added_taxes' );\n\n\tif ( !empty( $tax_session['taxes'] ) ) {\n\t\tupdate_post_meta( $transaction_id, '_it_exchange_easy_eu_value_added_taxes', $tax_session['taxes'] );\n\t}\n\tif ( !empty( $tax_session['vat_moss_taxes'] ) ) {\n\t\tupdate_post_meta( $transaction_id, '_it_exchange_easy_eu_value_added_vat_moss_taxes', $tax_session['vat_moss_taxes'] );\n\t}\n\tif ( !empty( $tax_session['product_taxes'] ) ) {\n\t\tupdate_post_meta( $transaction_id, '_it_exchange_easy_eu_value_added_taxes_product_taxes', $tax_session['product_taxes'] );\n\t}\n\tif ( !empty( $tax_session['vat_country'] ) ) {\n\t\tupdate_post_meta( $transaction_id, '_it_exchange_easy_eu_value_added_taxes_customer_vat_country', $tax_session['vat_country'] );\n\t}\n\tif ( !empty( $tax_session['vat_number'] ) ) {\n\t\tupdate_post_meta( $transaction_id, '_it_exchange_easy_eu_value_added_taxes_customer_vat_number', $tax_session['vat_number'] );\n\t}\n\tif ( !empty( $tax_session['total_taxes'] ) ) {\n\t\tupdate_post_meta( $transaction_id, '_it_exchange_easy_eu_value_added_taxes_taxes_total', $tax_session['total_taxes'] );\n\t}\n\tif ( !empty( $tax_session['summary_only'] ) ) {\n\t\tupdate_post_meta( $transaction_id, '_it_exchange_easy_eu_value_added_taxes_summary_only', $tax_session['summary_only'] );\n\t}\n\n\tit_exchange_clear_session_data( 'addon_easy_eu_value_added_taxes' );\n\treturn;\n}", "public function set_cart_contents_tax($value)\n {\n }", "public function set_coupon_discount_tax_totals($value = array())\n {\n }", "public function setTaxAmount($anount);", "public function tax(): float\n {\n $tax = 0;\n foreach ($this->cartItems as $item) {\n /** @var CartItem $item */\n $tax += $item->tax();\n }\n return $tax;\n }", "public static function ajax_update_order_tax() {\r\n\t\tglobal $wpdb;\r\n\r\n\t\t$order_id = absint( $_POST['order_id'] );\r\n\t\t$country = strtoupper( esc_attr( $_POST['country'] ) );\r\n\r\n\t\t// Get WC_WooTax_Order object\r\n\t\t$order = self::get_order( $order_id );\r\n\t\r\n\t\tif ( $country != 'US' && $country != 'United States' ) {\r\n\t\t\treturn; // Returning here allows WC_AJAX::calc_line_taxes to take over for non-US orders\r\n\t\t} else {\r\n\t\t\t// Build items array\r\n\t\t\tif ( version_compare( WOOCOMMERCE_VERSION, '2.2', '>=' ) ) {\r\n\t\t\t parse_str( $_POST['items'], $items );\r\n\t\t\t} else if ( version_compare( WOOCOMMERCE_VERSION, '2.1.0', '>=' ) ) {\r\n\t\t\t\t$items = array(\r\n\t\t\t\t\t'order_item_id' => array(),\r\n\t\t\t\t\t'order_item_qty' => array(),\r\n\t\t\t\t\t'line_total' => array(),\r\n\t\t\t\t\t'shipping_method_id' => array(),\r\n\t\t\t\t\t'shipping_cost' => array(),\r\n\t\t\t\t);\r\n\r\n\t\t\t\t// Add cart items/fees\r\n\t\t\t\tforeach ( $_POST['items'] as $item_id => $item ) {\r\n\t\t\t\t\t$items['order_item_id'][] = $item_id;\r\n\r\n\t\t\t\t\tif ( get_post_type( $order->get_item_meta( $item_id, '_product_id' ) ) == 'product' ) {\r\n\t\t\t\t\t\t$items['order_item_qty'][$item_id] = isset( $item['quantity'] ) ? $item['quantity'] : 1;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$items['line_total'][$item_id] = $item['line_total'];\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Add item for shipping cost\r\n\t\t\t\tif ( isset( $_POST['shipping'] ) && $_POST['shipping'] != 0 ) {\r\n\t\t\t\t\t$items['shipping_cost'][ WT_SHIPPING_ITEM ] = $_POST['shipping'];\r\n\t\t\t\t\t$items['shipping_method_id'][] = WT_SHIPPING_ITEM;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$order_items = array();\r\n\t\t\t$final_items = array();\r\n\r\n\t\t\t// Add cart items and fees\r\n\t\t\t$order_items = array_merge( $items['order_item_id'], $order_items );\r\n\r\n\t\t\t// Add shipping items\r\n\t\t\tif ( isset( $items['shipping_method_id'] ) ) {\r\n\t\t\t\t$order_items = array_merge( $items['shipping_method_id'], $order_items );\r\n\t\t\t}\r\n\r\n\t\t\t// Construct items array from POST data\r\n\t\t\tforeach ( $order_items as $item_id ) {\r\n\t\t\t\t$product_id = $order->get_item_meta( $item_id, '_product_id' );\r\n\r\n\t\t\t\tif ( get_post_type( $product_id ) == 'product' ) {\r\n\t\t\t\t\t$product = new WC_Product( $product_id );\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif ( !$product->is_taxable() ) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t} \r\n\r\n\t\t\t\t$qty = 1;\r\n\r\n\t\t\t\tif ( is_array( $items['shipping_method_id'] ) && in_array( $item_id, $items['shipping_method_id'] ) ) {\r\n\t\t\t\t\t// Shipping method\r\n\t\t\t\t\t$tic = WT_SHIPPING_TIC;\r\n\t\t\t\t\t$cost = $items['shipping_cost'][$item_id];\r\n\t\t\t\t\t$type = 'shipping';\r\n\t\t\t\t} else if ( isset( $items['order_item_qty'][$item_id] ) ) {\r\n\t\t\t\t\t// Cart item\r\n\t\t\t\t\t$tic = get_post_meta( $product_id, 'wootax_tic', true );\r\n\t\t\t\t\t$cost = $items['line_total'][ $item_id ];\r\n\t\t\t\t\t$type = 'cart';\r\n\t\t\t\t\t$qty = WC_WooTax::get_option('tax_based_on') == 'line-subtotal' ? 1 : $items['order_item_qty'][ $item_id ];\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Fee\r\n\t\t\t\t\t$tic = WT_FEE_TIC;\r\n\t\t\t\t\t$cost = $items['line_total'][$item_id];\r\n\t\t\t\t\t$type = 'fee';\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Calculate unit price\r\n\t\t\t\t$unit_price = $cost / $qty;\r\n\r\n\t\t\t\t// Add item to final items array\r\n\t\t\t\tif ( $unit_price != 0 ) {\r\n\t\t\t\t\t// Map item_id to item type \r\n\t\t\t\t\t$type_array[ $item_id ] = $type == 'shipping' ? 'shipping' : 'cart';\r\n\t\t\t\t\r\n\t\t\t\t\t// Add tax amount to tax array\r\n\t\t\t\t\t$old_taxes[ $item_id ] = $order->get_item_tax( $item_id );\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Add to items array \r\n\t\t\t\t\t$item_data = array(\r\n\t\t\t\t\t\t'Index' => '', // Leave index blank. It is assigned later.\r\n\t\t\t\t\t\t'ItemID' => $item_id, \r\n\t\t\t\t\t\t'Qty' => $qty, \r\n\t\t\t\t\t\t'Price' => $unit_price,\t\r\n\t\t\t\t\t\t'Type' => $type,\r\n\t\t\t\t\t);\t\r\n\r\n\t\t\t\t\tif ( !empty( $tic ) && $tic ) {\r\n\t\t\t\t\t\t$item_data['TIC'] = $tic;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$final_items[] = $item_data;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Send lookup request using the generated items and mapping array\r\n\t\t$res = $order->do_lookup( $final_items, $type_array );\r\n\r\n\t\t// Convert response array to be sent back to client\r\n\t\t// @see WC_AJAX::calc_line_taxes()\r\n\t\tif ( is_array( $res ) ) {\r\n\t\t\tif ( version_compare( WOOCOMMERCE_VERSION, '2.2', '>=' ) ) {\r\n\t\t\t\tif ( !isset( $items['line_tax'] ) ) {\r\n\t\t\t\t\t$items['line_tax'] = array();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( !isset( $items['line_subtotal_tax'] ) ) {\r\n\t\t\t\t\t$items['line_subtotal_tax'] = array();\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$items['order_taxes'] = array();\r\n\r\n\t\t\t\tforeach ( $res as $item ) {\r\n\t\t\t\t\t$id = $item->ItemID;\r\n\t\t\t\t\t$tax = $item->TaxAmount; \r\n\r\n\t\t\t\t\tif ( is_array( $items['shipping_method_id'] ) && in_array( $id, $items['shipping_method_id'] ) ) {\r\n\t\t\t\t\t\t$items['shipping_taxes'][ $id ][ WT_RATE_ID ] = $tax;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$items['line_tax'][ $id ][ WT_RATE_ID ] = $tax;\r\n\t\t\t\t\t\t$items['line_subtotal_tax'][ $id ][ WT_RATE_ID ] = $tax;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$items['order_taxes'][ self::get_meta( $order_id, 'tax_item_id' ) ] = absint( WT_RATE_ID );\r\n\r\n\t\t\t\twc_save_order_items( $order_id, $items );\r\n\r\n\t\t\t\t// Return HTML items\r\n\t\t\t\t$data = get_post_meta( $order_id );\r\n\t\t\t\t$order = $order->order;\r\n\r\n\t\t\t\tinclude( ABSPATH . '/'. PLUGINDIR . '/woocommerce/includes/admin/meta-boxes/views/html-order-items.php' );\r\n\r\n\t\t\t\tdie();\r\n\t\t\t} else if ( version_compare( WOOCOMMERCE_VERSION, '2.1', '>=' ) ) {\r\n\t\t\t\t// We are going to send back a JSON response\r\n\t\t\t\theader( 'Content-Type: application/json; charset=utf-8' );\r\n\r\n\t\t\t\t$item_tax = $shipping_tax = 0;\r\n\t\t\t\t$tax_row_html = '';\r\n\t\t\t\t$item_taxes = array();\r\n\r\n\t\t\t\t// Update item taxes\r\n\t\t\t\tforeach ( $res as $item ) {\r\n\t\t\t\t\t$id = $item->ItemID;\r\n\t\t\t\t\t$tax = $item->TaxAmount; \r\n\r\n\t\t\t\t\tif ( $id == WT_SHIPPING_ITEM ) {\r\n\t\t\t\t\t\t$shipping_tax += $tax;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$item_taxes[ $id ] = array(\r\n\t\t\t\t\t\t\t'line_subtotal_tax' => wc_format_localized_price( $tax ),\r\n\t\t\t\t\t\t\t'line_tax' => wc_format_localized_price( $tax ),\r\n\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t$item_tax += $tax;\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Fetch array mapping tax rate ids to tax codes\r\n\t\t\t\t$tax_codes = array();\r\n\t\t\t\t$taxes = $order->order->get_taxes();\r\n\r\n\t\t\t\tforeach ( $taxes as $item_id => $data ) {\r\n\t\t\t\t\t$code = array();\r\n\r\n\t\t\t\t\t$rate_id = $data['rate_id'];\r\n\t\t\t\t\t$rate_data = $wpdb->get_row( \"SELECT * FROM {$wpdb->prefix}woocommerce_tax_rates WHERE tax_rate_id = '$rate_id'\" );\r\n\r\n\t\t\t\t\t$code[] = $rate_data->tax_rate_country;\r\n\t\t\t\t\t$code[] = $rate_data->tax_rate_state;\r\n\t\t\t\t\t$code[] = $rate_data->tax_rate_name ? sanitize_title( $rate_data->tax_rate_name ) : 'TAX';\r\n\t\t\t\t\t$code[] = absint( $rate_data->tax_rate_priority );\r\n\r\n\t\t\t\t\t$tax_codes[ $rate_id ] = strtoupper( implode( '-', array_filter( $code ) ) );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Loop through tax items to build tax row HTML\r\n\t\t\t\tob_start();\r\n\r\n\t\t\t\tforeach ( $taxes as $item_id => $item ) {\r\n\t\t\t\t\tinclude( ABSPATH . '/'. PLUGINDIR . '/woocommerce/includes/admin/post-types/meta-boxes/views/html-order-tax.php' );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$tax_row_html = ob_get_clean();\r\n\r\n\t\t\t\t// Return\r\n\t\t\t\techo json_encode( array(\r\n\t\t\t\t\t'item_tax' \t\t=> $item_tax,\r\n\t\t\t\t\t'item_taxes' \t=> $item_taxes,\r\n\t\t\t\t\t'shipping_tax' \t=> $shipping_tax,\r\n\t\t\t\t\t'tax_row_html' \t=> $tax_row_html,\r\n\t\t\t\t) );\r\n\r\n\t\t\t\t// Quit out\r\n\t\t\t\tdie();\r\n\t\t\t} \r\n\t\t} else {\r\n\t\t\tdie( json_encode( array( \r\n\t\t\t\t'status' => 'error', \r\n\t\t\t\t'message' => $res,\r\n\t\t\t) ) ); \r\n\t\t}\r\n\t}", "public function getTaxCalculator();", "public function addToCart(): void\n {\n Cart::add($this->product->id, $this->product->name, $this->product->getRawOriginal('invoice_cost_price'), $this->quantity);\n $this->emit('productAddedToCart');\n }", "protected function set_total_tax($value)\n {\n }", "function woocommerce_cart_totals()\n {\n }", "function testCartTotals() {\n\t \n\t $teeshirtA = $this->objFromFixture('Product', 'teeshirtA');\n\t $teeshirtAVariation = $this->objFromFixture('Variation', 'teeshirtSmallRedPolyester'); \n\t \n $this->logInAs('admin');\n\t $teeshirtA->doPublish();\n\t $this->logOut();\n\n\t $quantity = 2;\n\t $expectedAmount = ($teeshirtA->Amount->getAmount() + $teeshirtAVariation->Amount->getAmount()) * $quantity;\n\n\t $this->get(Director::makeRelative($teeshirtA->Link())); \n\t \n\t //Add variation to the cart\n\t $sizeAttr = $this->objFromFixture('Attribute', 'attrSize');\n\t $colorAttr = $this->objFromFixture('Attribute', 'attrColor');\n\t $materialAttr = $this->objFromFixture('Attribute', 'attrMaterial');\n\t \n\t $teeshirtASmallOpt = $this->objFromFixture('Option', 'optSmallTeeshirt');\n\t $teeshirtARedOpt = $this->objFromFixture('Option', 'optRedTeeshirt');\n\t $teeshirtACottonOpt = $this->objFromFixture('Option', 'optCottonTeeshirt');\n\t $teeshirtAPolyesterOpt = $this->objFromFixture('Option', 'optPolyesterTeeshirt');\n\t \n\t $this->submitForm('AddToCartForm_AddToCartForm', null, array(\n\t 'Quantity' => $quantity,\n\t \"Options[{$sizeAttr->ID}]\" => $teeshirtASmallOpt->ID, //Small\n\t \"Options[{$colorAttr->ID}]\" => $teeshirtARedOpt->ID, //Red\n\t \"Options[{$materialAttr->ID}]\" => $teeshirtAPolyesterOpt->ID, //Polyester\n\t ));\n\n\t $order = CartControllerExtension::get_current_order();\n\n\t $this->assertEquals($expectedAmount, $order->Total->getAmount());\n\t $this->assertEquals($expectedAmount, $order->SubTotal->getAmount());\n\t}", "function oos_add_tax($price, $tax) {\n\n if( ($_SESSION['member']->group['show_price_tax'] == 1) && ($tax > 0) )\n {\n return $price + oos_calculate_tax($price, $tax);\n } else {\n return $price;\n }\n}", "function wc_prices_include_tax()\n {\n }", "public function set_taxes($raw_tax_data)\n {\n }", "public function set_taxes($raw_tax_data)\n {\n }", "public function set_taxes($raw_tax_data)\n {\n }", "public function tax()\n {\n return (float)array_sum(\n array_map(function (CartItem $item) {\n return $item->getTotalTax();\n }, $this->items)\n );\n }", "function setTaxCalculationMethod($priceFromNet) {\n \t \n \t \t$this->pricefromnet = $priceFromNet;\n \t \tforeach ($this->basket_items as $one_item) {\n \t\t\t$one_item->setTaxCalculationMethod($this->pricefromnet);\n \t\t}\n \t }", "public static function get_cart_totals()\n {\n }", "public function addToTax($item)\n {\n // validation for constraint: itemType\n if (!false) {\n throw new \\InvalidArgumentException(sprintf('The Tax property can only contain items of anyType, \"%s\" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);\n }\n $this->Tax[] = $item;\n return $this;\n }", "function testtotalPriceAfterTaxes($result)\n{\n $t_shirt=new Product(1,'T_Shirt' , 10.99 ,0);\n $jacket=new Product(3,'jacket' ,19.99 , 0);\n $shoes=new Product(4,'shoes' ,24.99 , 10 );\n $cart=new Cart();\n $cartItem2=$cart->addProduct($t_shirt,2);\n $cartItem3=$cart->addProduct($jacket,1);\n $cartItem4=$cart->addProduct($shoes,1);\n\n if($cart->totalPriceAfterTaxes() === $result)\n echo \"Success <br> \";\n else\n echo \"Failed <br> \".$cart->totalPriceAfterTaxes();\n}", "public static function add_to_cart()\n {\n }", "function update_item_tax($id)\r\n\t{\r\n\t\t$this->load->config('app');\r\n\t\t$this->data['app'] = $this->config->item('app');\r\n\r\n\t\t$this->load->model(array('product_model'));\r\n\r\n\t\t$this->data['product'] = $this->product_model->get_details($id);\r\n\r\n\t\tif ($this->input->post('insert_tax'))\r\n\t\t{\r\n\t\t\t$this->load->model('demo_cart_admin_model');\r\n\t\t\t$this->demo_cart_admin_model->demo_insert_item_tax($id);\r\n\t\t\tredirect(current_url());\r\n\t\t}\r\n\r\n\t\tif ($this->input->post('update_tax'))\r\n\t\t{\r\n\t\t\t// Update tax rates\r\n\t\t\t$this->load->model('demo_cart_admin_model');\r\n\t\t\t$this->demo_cart_admin_model->demo_update_item_tax();\r\n\t\t\t$this->session->set_flashdata('message', $this->flexi_cart_admin->get_messages('admin'));\r\n\t\t\tredirect(current_url());\r\n\t\t}\r\n\t\t\r\n\t\t// Get an array of location data formatted with all sub-locations displayed 'inline', so all locations can be listed in one html select menu.\r\n\t\t// Alternatively, the location data could have been formatted with all sub-locations displayed 'tiered' into the location type groups.\r\n\t\t$this->data['locations_inline'] = $this->flexi_cart_admin->locations_inline();\r\n\t\t\r\n\t\t// Get an array of all tax zones.\r\n\t\t$this->data['tax_zones'] = $this->flexi_cart_admin->location_zones('tax');\r\n\r\n\t\t// Get an array of all the item tax rates filtered by the id in the url.\r\n\t\t$sql_where = array($this->flexi_cart_admin->db_column('item_tax', 'item') => $id);\r\n\t\t$this->data['item_tax_data'] = $this->flexi_cart_admin->get_db_item_tax_query(FALSE, $sql_where)->result_array();\r\n\r\n\t\t// Get any status message that may have been set.\r\n\t\t$this->data['message'] = $this->session->flashdata('message');\r\n\t\t$this->load->view('admin/items/item_update_tax', $this->data);\t\t\r\n\t}", "public function set_total_tax($value)\n {\n }", "public function addTax(Request $request)\n {\n $tax = $request->input('tax');\n\n // Insert new vendor\n if( !empty($tax['country_id']) && !empty($tax['percent']) ) {\n // Check if country name is unique\n if( Tax::where('country_id', $tax['country_id'])->count() > 0 ) {\n return response()->json(\n array('status' => 'fail','message' => 'Tax Setup exists')\n );\n }\n \n // Initialise country object\n $tax = new Tax(\n array(\n 'country_id' => $tax['country_id'],\n 'percent' => $tax['percent'],\n )\n );\n\n // Save new country\n $tax->save();\n\n $return = array(\n 'status' => 'succcess'\n );\n } else {\n $return = array(\n 'status' => 'fail',\n 'message' => 'Name or Tax ID value not set'\n );\n }\n\n return response()->json($return);\n }", "public function set_total_tax($value)\n {\n }", "function cart_tax()\n\t{\n\t\treturn $this->view_formatted_number($this->_calculate_tax());\n\t}", "protected function combine_item_taxes($item_taxes)\n {\n }", "public function addVoucherSums () {\n\t\t$tablesObj = GeneralUtility::makeInstance('tx_ttproducts_tables');\n\t\t$voucher = $tablesObj->get('voucher');\n\t\t$voucherAmount = $voucher->getRebateAmount();\n\n\t\t$this->calculatedArray['priceNoTax']['vouchertotal'] = $this->calculatedArray['priceNoTax']['total'] - $voucherAmount - $this->calculatedArray['priceNoTax']['creditpoints'];\n\t\t$this->calculatedArray['priceTax']['vouchertotal'] = $this->calculatedArray['priceTax']['total'] - $voucherAmount - $this->calculatedArray['priceTax']['creditpoints'];\n\n\t\t$this->calculatedArray['priceNoTax']['vouchergoodstotal'] = $this->calculatedArray['priceNoTax']['goodstotal'] - $voucherAmount - $this->calculatedArray['priceNoTax']['creditpoints'];\n\t\t$this->calculatedArray['priceTax']['vouchergoodstotal'] = $this->calculatedArray['priceTax']['goodstotal'] - $voucherAmount - $this->calculatedArray['priceTax']['creditpoints'];\n\t}", "public function get_cart_item_tax_classes()\n {\n }", "function osc_add_tax($price, $tax) {\n if ( (DISPLAY_PRICE_WITH_TAX == 'true') && ($tax > 0) ) {\n return $price + osc_calculate_tax($price, $tax);\n } else {\n return $price;\n }\n }", "function addAllTaxes($finalPrice,$fedTax,$stateTax,$ssn,$medical){\r\n\t\t$fedTax = $finalPrice * $fedTax / 100;\r\n\t\t$stateTax = $finalPrice * $stateTax / 100;\r\n\t\t$ssn = $finalPrice * $ssn / 100;\r\n\t\t$medical = $finalPrice * $medical / 100;\r\n\t\t$total = $fedTax + $stateTax + $ssn + $medical;\r\n\t\treturn $total;\r\n\t}", "function insert_outlet_tax($outletID, $grossTotal, $promotional_discount, $invoiceID)\n {\n $outlet_tax_list = $this->outlet_tax_list($outletID);\n $amount_with_discount = $grossTotal - $promotional_discount;\n foreach ($outlet_tax_list as $outlet_tax) {\n $taxPercentage = $outlet_tax->taxPercentage;\n $tax_amount = ($amount_with_discount / 100) * $taxPercentage;\n //print_r($amount_with_discount);\n //print_r($outlet_tax);\n //print_r($tax_amount);\n $amount_with_tax = $amount_with_discount + $tax_amount;\n $menusalesoutlettaxes = array(\n \"wareHouseAutoID\" => $outletID,\n \"menuSalesID\" => $invoiceID,\n \"outletTaxID\" => $outlet_tax->outletTaxID,\n \"taxmasterID\" => $outlet_tax->taxMasterID,\n \"GLCode\" => $outlet_tax->supplierGLAutoID,\n \"taxPercentage\" => $taxPercentage,\n \"taxAmount\" => $tax_amount\n );\n $this->db->insert('srp_erp_pos_menusalesoutlettaxes', $menusalesoutlettaxes);\n }\n }", "public function postTaxTotal($items, $tax, $coupon) {\n $subtotal = $this->total($items, $coupon);\n return $subtotal + $this->tax($subtotal, $tax);\n }", "public function getTaxTotal()\n {\n return array_reduce(array_column($this->getTaxes(), 'total'), 'bcadd');\n }", "public function apply_invoice_taxing(&$sales_taxes)\n\t{\n\t\tif(!empty($sales_taxes))\n\t\t{\n\t\t\t$sort = array();\n\t\t\tforeach($sales_taxes as $k => $v)\n\t\t\t{\n\t\t\t\t$sort['print_sequence'][$k] = $v['print_sequence'];\n\t\t\t}\n\t\t\tarray_multisort($sort['print_sequence'], SORT_ASC, $sales_taxes);\n\t\t}\n\n\t\t$decimals = totals_decimals();\n\n\t\tforeach($sales_taxes as $row_number => $sales_tax)\n\t\t{\n\t\t\t$sales_taxes[$row_number]['sale_tax_amount'] = $this->get_sales_tax_for_amount($sales_tax['sale_tax_basis'], $sales_tax['tax_rate'], $sales_tax['rounding_code'], $decimals);\n\t\t}\n\t}", "function it_exchange_easy_eu_value_added_taxes_addon_add_taxes_to_template_totals_elements( $elements ) {\n\t// Locate the discounts key in elements array (if it exists)\n\t$index = array_search( 'totals-savings', $elements );\n\tif ( false === $index )\n\t\t$index = -1;\n\n\t// Bump index by 1 to show tax after discounts\n\tif ( -1 != $index )\n\t\t$index++;\n\n\tarray_splice( $elements, $index, 0, 'easy-eu-value-added-taxes' );\n\treturn $elements;\n}", "public function setTotalTaxAmount(?string $value): void {\n $this->getBackingStore()->set('totalTaxAmount', $value);\n }", "public function itemsTotal($withTax = false);", "public function calculateTotalPrice()\n {\n foreach ($this->transactions as $transaction) {\n if ($transaction != null) {\n $this->totalPrices[] = $this->calculateTransactionPrice($transaction);\n }\n }\n }", "public function setTax(float $tax);", "public function testSetSectionItemTax()\n {\n }", "public function getTaxTotalPrice()\n {\n \n \n\n }", "protected function get_item_costs_by_tax_class()\n {\n }", "public function tax()\n {\n return config('shopping.taxrate') * ( static::subtotal() - static::discount() );\n }", "public function get_total_tax($context = 'view')\n {\n }", "public function insertTax ($insertTax)\n {\n $this->cattermtaxonomy->insert($insertTax);\n }", "function saveOrderTaxes(&$order)\r\n\t{\r\n\t\tJTable::addIncludePath(JPATH_ADMINISTRATOR.'/components/com_tienda/tables');\r\n\r\n\t\t$taxclasses = $order->getTaxClasses();\r\n\t\tforeach($taxclasses as $taxclass)\r\n\t\t{\r\n\t\t\tunset($row);\r\n\t\t\t$row = JTable::getInstance('OrderTaxClasses', 'TiendaTable');\r\n\t\t\t$row->order_id = $order->order_id;\r\n\t\t\t$row->tax_class_id = $taxclass->tax_class_id;\r\n\t\t\t$row->ordertaxclass_amount = $order->getTaxClassAmount($taxclass->tax_class_id);\r\n\t\t\t$row->ordertaxclass_description = $taxclass->tax_class_description;\r\n\t\t\t$row->save();\r\n\t\t}\r\n\r\n\t\t$taxrates = $order->getTaxRates();\r\n\t\tforeach($taxrates as $taxrate)\r\n\t\t{\r\n\t\t\tunset($row);\r\n\t\t\t$row = JTable::getInstance('OrderTaxRates', 'TiendaTable');\r\n\t\t\t$row->order_id = $order->order_id;\r\n\t\t\t$row->tax_rate_id = $taxrate->tax_rate_id;\r\n\t\t\t$row->ordertaxrate_rate = $taxrate->tax_rate;\r\n\t\t\t$row->ordertaxrate_amount = $order->getTaxRateAmount($taxrate->tax_rate_id);\r\n\t\t\t$row->ordertaxrate_description = $taxrate->tax_rate_description;\r\n\t\t\t$row->ordertaxrate_level = $taxrate->level;\r\n\t\t\t$row->ordertaxclass_id = $taxrate->tax_class_id;\r\n\t\t\t$row->save();\r\n\t\t}\r\n\r\n\t\t// TODO Better error tracking necessary here\r\n\t\treturn true;\r\n\t}", "public static function get_taxes($args)\n {\n }", "public function getItemsTotalTax() {\r\n\r\n $total = 0.00;\r\n\r\n if (empty($this->items)) {\r\n\r\n return $total;\r\n }\r\n\r\n /* @var $item \\Openapi\\Phalcon\\Plugins\\PayPal\\Checkout\\Types\\ItemType */\r\n foreach ($this->items as $item) {\r\n\r\n $total += $item->calculateItemTaxTotal();\r\n }\r\n\r\n return $total;\r\n }", "public function amount_include_tax(){\n\t\treturn 1;\n\t}", "protected function addTotals($invoice, $request, $taxes, $sub_total, $discount_total, $tax_total)\n {\n if (!empty($request['totals'])) {\n $sort_order = 1;\n\n foreach ($request['totals'] as $total) {\n $total['invoice_id'] = $invoice->id;\n\n if (empty($total['sort_order'])) {\n $total['sort_order'] = $sort_order;\n }\n\n InvoiceTotal::create($total);\n\n $sort_order++;\n }\n\n return;\n }\n\n $sort_order = 1;\n\n // Added invoice sub total\n InvoiceTotal::create([\n 'company_id' => $request['company_id'],\n 'invoice_id' => $invoice->id,\n 'code' => 'sub_total',\n 'name' => 'invoices.sub_total',\n 'amount' => $sub_total,\n 'sort_order' => $sort_order,\n ]);\n\n $sort_order++;\n\n // Added invoice discount\n if ($discount_total) {\n InvoiceTotal::create([\n 'company_id' => $request['company_id'],\n 'invoice_id' => $invoice->id,\n 'code' => 'discount',\n 'name' => 'invoices.discount',\n 'amount' => $discount_total,\n 'sort_order' => $sort_order,\n ]);\n\n // This is for total\n $sub_total = $sub_total - $discount_total;\n\n $sort_order++;\n }\n\n // Added invoice taxes\n if (isset($taxes)) {\n foreach ($taxes as $tax) {\n InvoiceTotal::create([\n 'company_id' => $request['company_id'],\n 'invoice_id' => $invoice->id,\n 'code' => 'tax',\n 'name' => $tax['name'],\n 'amount' => $tax['amount'],\n 'sort_order' => $sort_order,\n ]);\n\n $sort_order++;\n }\n }\n\n // Added invoice total\n InvoiceTotal::create([\n 'company_id' => $request['company_id'],\n 'invoice_id' => $invoice->id,\n 'code' => 'total',\n 'name' => 'invoices.total',\n 'amount' => $sub_total + $tax_total,\n 'sort_order' => $sort_order,\n ]);\n }", "private function setupTaxRatesForSearch()\n {\n $objectManager = Bootstrap::getObjectManager();\n\n $taxRateUs12 = [\n 'tax_country_id' => 'US',\n 'tax_region_id' => 12,\n 'tax_postcode' => '*',\n 'code' => 'codeUs12',\n 'rate' => 22,\n 'region_name' => 'CA',\n ];\n $rates['codeUs12'] = $objectManager->create(\\Magento\\Tax\\Model\\Calculation\\Rate::class)\n ->setData($taxRateUs12)\n ->save();\n\n $taxRateUs14 = [\n 'tax_country_id' => 'US',\n 'tax_region_id' => 14,\n 'tax_postcode' => '*',\n 'code' => 'codeUs14',\n 'rate' => 22,\n ];\n $rates['codeUs14'] = $objectManager->create(\\Magento\\Tax\\Model\\Calculation\\Rate::class)\n ->setData($taxRateUs14)\n ->save();\n $taxRateBr13 = [\n 'tax_country_id' => 'BR',\n 'tax_region_id' => 13,\n 'tax_postcode' => '*',\n 'code' => 'codeBr13',\n 'rate' => 7.5,\n ];\n $rates['codeBr13'] = $objectManager->create(\\Magento\\Tax\\Model\\Calculation\\Rate::class)\n ->setData($taxRateBr13)\n ->save();\n\n $taxRateCz1 = [\n 'tax_country_id' => 'CZ',\n 'tax_postcode' => '110 00',\n 'code' => 'codeCz1',\n 'rate' => 1.1,\n ];\n $rates['codeCz1'] = $objectManager->create(\\Magento\\Tax\\Model\\Calculation\\Rate::class)\n ->setData($taxRateCz1)\n ->save();\n $taxRateCz2 = [\n 'tax_country_id' => 'CZ',\n 'tax_postcode' => '250 00',\n 'code' => 'codeCz2',\n 'rate' => 2.2,\n ];\n $rates['codeCz2'] = $objectManager->create(\\Magento\\Tax\\Model\\Calculation\\Rate::class)\n ->setData($taxRateCz2)\n ->save();\n\n // Set class variable so rates will be deleted on tearDown()\n $this->otherRates = $rates;\n return $rates;\n }", "public static function sync_order_taxes($order_id)\n {\n }", "function item_tax($item_id) \r\n\t{\r\n\t\t// Check if POST data has been submitted, if so, call the custom demo model function to handle the submitted data.\r\n\t\tif ($this->input->post('update_item_tax'))\r\n\t\t{\t\t\r\n\t\t\t$this->load->model('demo_cart_admin_model');\r\n\t\t\t$this->demo_cart_admin_model->demo_update_item_tax();\r\n\t\t}\r\n\t\t\r\n\t\t// Get an array of location data formatted with all sub-locations displayed 'inline', so all locations can be listed in one html select menu.\r\n\t\t// Alternatively, the location data could have been formatted with all sub-locations displayed 'tiered' into the location type groups.\r\n\t\t$this->data['locations_inline'] = $this->flexi_cart_admin->locations_inline();\r\n\t\t\r\n\t\t// Get an array of all tax zones.\r\n\t\t$this->data['tax_zones'] = $this->flexi_cart_admin->location_zones('tax');\r\n\r\n\t\t// Get the row array of the demo item filtered by the id in the url.\r\n\t\t$sql_where = array('item_id' => $item_id);\r\n\t\t$this->data['item_data'] = $this->flexi_cart_admin->get_db_table_data_query('demo_items', FALSE, $sql_where)->result_array();\r\n\t\t$this->data['item_data'] = $this->data['item_data'][0];\r\n\r\n\t\t// Get an array of all the item tax rates filtered by the id in the url.\r\n\t\t$sql_where = array($this->flexi_cart_admin->db_column('item_tax', 'item') => $item_id);\r\n\t\t$this->data['item_tax_data'] = $this->flexi_cart_admin->get_db_item_tax_query(FALSE, $sql_where)->result_array();\r\n\r\n\t\t// Get any status message that may have been set.\r\n\t\t$this->data['message'] = (!isset($this->data['message'])) ? $this->session->flashdata('message') : $this->data['message'];\r\n\t\r\n\t\t$this->load->view('admin/items/item_tax_update_view', $this->data);\r\n\t}" ]
[ "0.72788805", "0.6748811", "0.66093683", "0.65480095", "0.65435034", "0.6494481", "0.6481857", "0.6481184", "0.643071", "0.64155746", "0.63333994", "0.6316602", "0.6263759", "0.6244355", "0.6227343", "0.62194085", "0.617955", "0.6174392", "0.61518264", "0.6150013", "0.6137692", "0.61317724", "0.61168194", "0.6114358", "0.603739", "0.602785", "0.6016757", "0.60091865", "0.60042304", "0.59960747", "0.5983606", "0.5974645", "0.5960992", "0.59577954", "0.59545076", "0.58713275", "0.5862056", "0.58515686", "0.58331656", "0.582739", "0.5826379", "0.5825679", "0.5825679", "0.5821688", "0.5814381", "0.5812398", "0.58021075", "0.5801361", "0.5798687", "0.57901824", "0.57830375", "0.5773725", "0.5770132", "0.57403815", "0.5735686", "0.5732872", "0.5731815", "0.5712725", "0.5704764", "0.5704371", "0.5703958", "0.57029366", "0.5695156", "0.5692426", "0.5691628", "0.567881", "0.5673626", "0.5669271", "0.56663716", "0.56641805", "0.5664179", "0.56580424", "0.5652119", "0.56424254", "0.5640799", "0.5635703", "0.5628973", "0.5607949", "0.5595858", "0.5594315", "0.558557", "0.5581672", "0.5567083", "0.5563539", "0.55511373", "0.5535164", "0.5532228", "0.55297047", "0.5522368", "0.55131423", "0.5505578", "0.5501578", "0.54998314", "0.5499075", "0.5498217", "0.5493111", "0.5474899", "0.5467849", "0.54640704", "0.54615605" ]
0.74219805
0